.account-profile {
  --profile-primary: var(--ms-primary);
  --profile-panel-primary: var(--cm-dashboard-primary, var(--ms-primary));
  --profile-field-bg: var(--ms-bg);
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  color: var(--ms-text);
}
.account-profile .student-detail__clearable-field {
  position: relative;
  width: 100%;
  min-width: 0;
  --ms-field-end: 2.6rem;
}
.account-profile .student-detail__clearable-field:has(> input[type=number]) {
  --ms-field-end: 0.9rem;
}
.account-profile .student-detail__clearable-field:has(> input[type=number]) > .student-detail__clear-field-button {
  right: 2.4rem;
}
.account-profile .student-detail__clearable-field:has(> input[type=time][data-clear-field]) > input {
  padding-right: 4.5rem;
}
.account-profile .student-detail__clearable-field:has(> input[type=time][data-clear-field]) > .student-detail__clear-field-button {
  right: 2.4rem;
}
.account-profile .student-detail__clearable-field--date {
  display: block;
  width: 100%;
  max-width: none;
}
.account-profile .student-detail__clearable-field--date > input.form-control {
  position: relative;
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.account-profile .student-detail__clearable-field--date > input.form-control::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transform: translateY(-50%);
}
.account-profile .student-detail__clearable-field--date:not(.student-detail__clearable-field--datepicker) .student-detail__clear-field-button {
  display: none;
}
.account-profile .student-detail__clearable-field--date.student-detail__clearable-field--datepicker > input.js-datepicker-input {
  padding-right: 2.75rem;
}
.account-profile .student-detail__clearable-field--textarea .student-detail__clear-field-button {
  top: 0.55rem;
  transform: none;
}
.account-profile .student-detail__clearable-field--textarea .student-detail__clear-field-button:active {
  transform: scale(0.9);
}
.account-profile .student-detail__clear-field-button {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 0.55rem;
  display: inline-flex;
  width: 1.7rem;
  height: 1.7rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  outline: none;
  background: transparent;
  color: var(--ms-text-muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}
.account-profile .student-detail__clear-field-button[hidden] {
  display: none;
}
@media (max-width: 767.98px) {
  .account-profile .student-detail__clear-field-button::after {
    content: "";
    position: absolute;
    inset: -0.4rem;
  }
}
.account-profile .student-detail__clear-field-button:hover {
  background: color-mix(in srgb, var(--ms-primary) 9%, transparent);
  color: var(--ms-primary);
}
.account-profile .student-detail__clear-field-button:active {
  transform: translateY(-50%) scale(0.9);
}
.account-profile .student-detail__clear-field-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ms-primary) 32%, transparent);
  outline-offset: 1px;
}
.account-profile .student-detail__clear-field-button .ms-button__icon {
  font-size: 1.05rem;
}
.account-profile .student-detail__masked-field > input {
  padding-right: 2.75rem;
}
.account-profile .student-detail__masked-field > .student-detail__clear-field-button {
  right: 2.35rem;
}
.account-profile .student-detail__masked-field > input:not([readonly]) {
  padding-right: 4.55rem;
}
.account-profile .student-detail__masked-field-toggle {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 0.55rem;
  display: inline-flex;
  width: 1.7rem;
  height: 1.7rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  outline: none;
  background: transparent;
  color: var(--ms-text-muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}
.account-profile .student-detail__masked-field-toggle[hidden] {
  display: none;
}
@media (max-width: 767.98px) {
  .account-profile .student-detail__masked-field-toggle::after {
    content: "";
    position: absolute;
    inset: -0.4rem;
  }
}
.account-profile .student-detail__masked-field-toggle:hover {
  background: color-mix(in srgb, var(--ms-primary) 9%, transparent);
  color: var(--ms-primary);
}
.account-profile .student-detail__masked-field-toggle:active {
  transform: translateY(-50%) scale(0.9);
}
.account-profile .student-detail__masked-field-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ms-primary) 32%, transparent);
  outline-offset: 1px;
}
.account-profile .student-detail__masked-field-toggle .ms-button__icon {
  font-size: 1.05rem;
}
.account-profile .student-detail__masked-field-toggle .ms-button__icon {
  font-size: 1.15rem;
}

.ms-theme #ms-content > .account-profile.cm-shell {
  min-height: 0 !important;
  padding: 4px 2px 200px !important;
  background: transparent !important;
}

.account-profile__security-notice,
.account-profile .ms-button,
.account-profile__avatar,
.account-profile__avatar-image {
  box-shadow: none !important;
}

.account-profile .ms-button {
  border-color: transparent !important;
}

.account-profile .ms-button--secondary {
  border-color: var(--ms-border) !important;
}

[data-bs-theme=dark] .account-profile .ms-button--secondary,
html.dark .account-profile .ms-button--secondary {
  border-color: transparent !important;
}

.account-profile__security-notice {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: var(--ms-radius);
  padding: 0.75rem 1.5rem;
  border: 0;
  background: color-mix(in srgb, var(--ms-success) 8%, transparent);
  color: var(--ms-text-muted);
}

.account-profile__security-notice.is-warning {
  padding: 0.75rem 1.5rem;
  border: 1px solid color-mix(in srgb, var(--ms-warning) 30%, transparent);
  background: color-mix(in srgb, var(--ms-warning) 12%, var(--ms-neutralWhite));
  color: color-mix(in srgb, var(--ms-warning) 42%, #000);
}

.account-profile__security-notice-icon {
  flex: 0 0 auto;
  color: var(--ms-success);
  font-size: 1.55rem;
}

.account-profile__security-notice.is-warning .account-profile__security-notice-icon {
  color: color-mix(in srgb, var(--ms-warning) 67%, #000);
}

.account-profile__security-notice-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.4;
}

.account-profile__security-notice-copy strong {
  font-size: 0.925rem;
  font-weight: 400;
}

.account-profile__security-notice:not(.is-warning) .account-profile__security-notice-copy span {
  color: var(--ms-text-muted);
}

.account-profile__notice-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--ms-radius-pill);
  color: inherit;
  font-size: 0.78rem;
  font-weight: 400;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.15s ease, color 0.15s ease, filter 0.15s ease, transform 0.12s ease;
}

.account-profile__notice-link:hover {
  background: color-mix(in srgb, var(--ms-success) 12%, transparent);
  color: inherit;
}

.account-profile__notice-link .material-symbols-outlined {
  font-size: 1.1rem;
}

.account-profile__notice-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
}

button.account-profile__notice-link {
  border: 0;
  background: transparent;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
}

button.account-profile__notice-link:disabled {
  opacity: 0.7;
  cursor: wait;
}

.account-profile__grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.account-profile__avatar-card {
  grid-column: 1/-1;
}

.account-profile__main-column,
.account-profile__side-column {
  display: grid;
  gap: 2rem;
  min-width: 0;
}

.account-profile__panel {
  min-width: 0;
}

.account-profile__card-description {
  margin: 0 0 1.5rem;
  color: var(--ms-text-muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.account-profile__identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.account-profile__field {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.account-profile__field label {
  margin: 0;
  color: var(--ms-text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: calc(0.055em + var(--ms-a11y-letter-add, 0em));
  line-height: 1rem;
  text-transform: uppercase;
}

.account-profile__validation-message {
  color: var(--bs-danger-text-emphasis, #b42318);
  font-size: 0.72rem;
  line-height: 1.35;
}

.account-profile__validation-message:empty {
  display: none;
}

.account-profile__validation-summary.validation-summary-valid {
  display: none;
}

.account-profile__validation-summary ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}

.account-profile__password-control {
  position: relative;
  min-width: 0;
}

.account-profile__password-control > .account-profile__password-input {
  padding-right: 3rem;
}

.account-profile__password-input {
  -webkit-appearance: none;
  appearance: none;
  background-image: none !important;
  text-decoration: none;
}

.account-profile__password-input:focus,
.account-profile__password-input:focus-visible {
  background-image: none !important;
}

.account-profile__password-input::placeholder {
  color: color-mix(in srgb, var(--ms-text-muted) 82%, transparent);
  letter-spacing: calc(0.16em + var(--ms-a11y-letter-add, 0em));
  opacity: 1;
}

.account-profile__password-visibility {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ms-text-muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.15s ease, color 0.15s ease, filter 0.15s ease, transform 0.12s ease;
}

.account-profile__password-visibility:hover {
  background: color-mix(in srgb, var(--profile-primary) 9%, transparent);
  color: var(--profile-primary);
}

.account-profile__password-visibility:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--profile-primary) 45%, transparent);
  outline-offset: 1px;
}

.account-profile__password-visibility .material-symbols-outlined {
  font-size: 1.2rem;
}

.account-profile .is-monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.account-profile__password-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.account-profile__identity-form > .alert,
.account-profile__password-form > .alert {
  margin-bottom: 1.5rem;
}

.account-profile__form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.account-profile__notice-link:hover,
.account-profile__password-visibility:hover,
#profile-identity-confirmation .btn:hover,
#profile-identity-confirmation .btn-close:hover,
#profile-password-confirmation .btn:hover,
#profile-password-confirmation .btn-close:hover {
  filter: brightness(0.92);
}

#profile-password-form .account-profile__password-visibility:hover {
  background: transparent;
  color: var(--ms-text-muted);
  filter: none;
}

.account-profile__notice-link:active,
#profile-identity-confirmation .btn:active,
#profile-identity-confirmation .btn-close:active,
#profile-password-confirmation .btn:active,
#profile-password-confirmation .btn-close:active {
  transform: scale(0.9);
}

.account-profile__password-visibility:active {
  transform: translateY(-50%) scale(0.9);
}

.account-profile__notice-link:focus-visible,
#profile-identity-confirmation .modal-footer .btn,
#profile-password-confirmation .modal-footer .btn {
  border-radius: var(--ms-radius-pill);
}

#profile-identity-confirmation .btn,
#profile-identity-confirmation .btn-close,
#profile-password-confirmation .btn,
#profile-identity-confirmation .btn-close,
#profile-password-confirmation .btn-close {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease, transform 0.12s ease;
}

#profile-password-confirmation .btn-close {
  border-radius: 50%;
}

.account-profile__permission-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.75rem;
  align-content: start;
}

.account-profile__permission {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
}

.account-profile__permission > .material-symbols-outlined {
  flex: 0 0 auto;
  margin-top: 0.05rem;
  color: var(--ms-success);
  font-size: 1.05rem;
}

.account-profile__permission > span:last-child {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.account-profile__permission strong {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile__permission code {
  color: var(--ms-text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile__empty-state {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem;
  border: 1px dashed var(--ms-border);
  border-radius: var(--ms-radius-sm);
  background: var(--profile-field-bg);
  color: var(--ms-text-muted);
  font-size: 0.85rem;
}

.account-profile__empty-state .material-symbols-outlined {
  font-size: 1.2rem;
}

.account-profile__avatar-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.account-profile__avatar-wrap {
  position: relative;
  display: inline-flex;
  margin-bottom: 1rem;
}

.account-profile__avatar,
.account-profile__avatar-image {
  width: 10rem;
  height: 10rem;
  border: 1px solid color-mix(in srgb, var(--ms-border) 75%, var(--ms-surface));
  border-radius: 50%;
}

.account-profile__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--ms-orange);
  color: var(--ms-neutralWhite);
  font-size: 2.75rem;
  font-weight: 500;
  letter-spacing: calc(0.04em + var(--ms-a11y-letter-add, 0em));
}

.account-profile__avatar-image {
  display: block;
  background: var(--profile-field-bg);
  object-fit: cover;
  object-position: center;
}

.account-profile__avatar-name {
  max-width: 100%;
  font-size: 1.05rem;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile__avatar-user {
  max-width: 100%;
  margin-top: 0.15rem;
  color: var(--ms-text-muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile__photo-actions {
  display: grid;
  width: 100%;
  margin-top: 1.15rem;
  gap: 0.65rem;
}

.account-profile__photo-button {
  width: 100%;
  max-width: 100%;
}

.account-profile__photo-button.ms-button--danger {
  min-height: 0;
  padding: 0.35rem 0.5rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ms-danger);
  font-weight: 400;
  letter-spacing: calc(0em + var(--ms-a11y-letter-add, 0em));
  text-transform: none;
  text-decoration: underline;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.account-profile__photo-button.ms-button--danger .ms-button__icon {
  display: none;
}
.account-profile__photo-button.ms-button--danger:hover, .account-profile__photo-button.ms-button--danger:focus-visible {
  border: 0;
  background: transparent;
  color: var(--ms-danger);
  text-decoration: underline;
  opacity: 1;
}
.account-profile__photo-button.ms-button--danger:active {
  transform: none;
}
.account-profile__photo-button.ms-button--danger:disabled {
  opacity: 0.35;
  text-decoration: underline;
}

.account-profile__avatar-help {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  margin-top: 1.4rem;
  padding: 0.85rem;
  border: 2px dashed var(--ms-border);
  border-radius: var(--ms-radius);
  color: var(--ms-text-muted);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: left;
}

.account-profile__avatar-help .material-symbols-outlined {
  flex: 0 0 auto;
  color: var(--ms-text-muted);
  font-size: 1.45rem;
}

.account-profile__status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ms-text);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.3;
}

.account-profile__status-badge::before {
  content: "";
  flex: 0 0 auto;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--ms-success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ms-success) 22%, transparent);
  animation: profile-status-pulse 2.4s ease-in-out infinite;
}

@keyframes profile-status-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ms-success) 28%, transparent);
  }
  50% {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--ms-success) 10%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .account-profile__status-badge::before {
    animation: none;
  }
}
[data-bs-theme=dark] .account-profile__avatar-help,
html.dark .account-profile__avatar-help {
  border-color: color-mix(in srgb, var(--ms-text) 24%, transparent);
}

[data-bs-theme=dark] .account-profile__security-notice,
html.dark .account-profile__security-notice {
  border: 0;
  background: color-mix(in srgb, var(--ms-success) 14%, transparent);
  color: var(--ms-text-muted);
}

[data-bs-theme=dark] .account-profile__security-notice-icon,
html.dark .account-profile__security-notice-icon {
  color: #6ffbbe;
}

[data-bs-theme=dark] .account-profile__security-notice,
html.dark .account-profile__security-notice,
[data-bs-theme=dark] .account-profile__security-notice:not(.is-warning) .account-profile__security-notice-copy span,
html.dark .account-profile__security-notice:not(.is-warning) .account-profile__security-notice-copy span {
  color: rgba(255, 255, 255, 0.78);
}

[data-bs-theme=dark] .account-profile__security-notice.is-warning,
html.dark .account-profile__security-notice.is-warning {
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(120, 53, 15, 0.38);
  color: #fde68a;
}

[data-bs-theme=dark] .account-profile__security-notice.is-warning .account-profile__security-notice-icon,
html.dark .account-profile__security-notice.is-warning .account-profile__security-notice-icon {
  color: #fbbf24;
}

[data-bs-theme=dark] .account-profile__notice-link:hover,
html.dark .account-profile__notice-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 991.98px) {
  .account-profile__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 767.98px) {
  .account-profile__identity-grid,
  .account-profile__password-fields,
  .account-profile__permission-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .account-profile__security-notice {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .account-profile__notice-link {
    margin-left: 2.4rem;
  }
  .account-profile__notice-action {
    margin-left: 2.4rem;
  }
  .account-profile__notice-action .account-profile__notice-link {
    margin-left: 0;
  }
}
@media (max-width: 575.98px) {
  .account-profile__form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .account-profile .ms-button {
    width: 100%;
  }
  .account-profile__notice-link {
    width: 100%;
    margin-left: 0;
  }
  .account-profile__notice-action {
    width: 100%;
    margin-left: 0;
  }
  .account-profile__permission-group-count {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .account-profile__notice-link,
  .account-profile__password-visibility,
  #profile-identity-confirmation .btn,
  #profile-identity-confirmation .btn-close,
  #profile-password-confirmation .btn,
  #profile-password-confirmation .btn-close {
    transition: none;
  }
  .account-profile__notice-link:active,
  .account-profile__permission-group summary:active,
  #profile-identity-confirmation .btn:active,
  #profile-identity-confirmation .btn-close:active,
  #profile-password-confirmation .btn:active,
  #profile-password-confirmation .btn-close:active {
    transform: none;
  }
  .account-profile__password-visibility:active {
    transform: translateY(-50%);
  }
}
[data-bs-theme=dark] .ms-theme #ms-content > .account-profile.cm-shell,
html.dark .ms-theme #ms-content > .account-profile.cm-shell {
  background: transparent !important;
}

.ms-theme #ms-content > .account-profile.cm-shell .cm-card {
  box-shadow: var(--ms-shadow-card);
}

[data-bs-theme=dark] .ms-theme .account-profile.cm-shell .cm-card,
html.dark .ms-theme .account-profile.cm-shell .cm-card {
  border: 0;
  background: var(--ms-surface);
}
[data-bs-theme=dark] .ms-theme .account-profile.cm-shell .cm-card--panel > .cm-card-header,
html.dark .ms-theme .account-profile.cm-shell .cm-card--panel > .cm-card-header {
  background: transparent;
  border-bottom: 0;
}
