/* Scoped to the profile: other dialogs retain their existing appearance. */
#profileModal { background: rgb(16 35 63 / 48%); }
#profileModal .lp-profile-sheet {
  width: min(760px, 100%); max-height: calc(100dvh - 36px);
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #dce2ea; border-radius: 22px; background: #f5f7fa;
}
#profileModal .sheet-head {
  flex: 0 0 auto; align-items: flex-start; gap: 16px; padding: 24px 28px 20px;
  border-bottom: 1px solid #e2e7ed; background: #fff;
}
#profileModal .lp-profile-eyebrow { margin: 0 0 6px; color: #66748a; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
#profileModal #profileTitle { margin: 0; color: #10233f; font-size: 25px; line-height: 1.2; }
#profileModal #profileDescription { margin: 8px 0 0; color: #627084; font-size: 14px; }
#profileModal #closeProfile { width: 42px; height: 42px; flex: 0 0 42px; padding: 0; border-radius: 12px; background: #eff2f6; color: #10233f; font-size: 27px; }
#profileModal .lp-profile-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 28px; display: grid; gap: 16px; }
#profileModal .lp-profile-card { min-width: 0; border: 1px solid #e0e6ee; border-radius: 16px; padding: 20px; background: #fff; }
#profileModal .lp-profile-card.hidden, #profileModal .hidden { display: none !important; }
#profileModal h3 { margin: 0 0 14px; font-size: 17px; color: #10233f; line-height: 1.4; }
#profileModal .lp-profile-hint, #profileModal .account-note { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: #5c687b; }
#profileModal h3 + .lp-profile-hint { margin: -7px 0 16px; }
#profileModal .lp-profile-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 20px; align-items: start; }
#profileModal .field { min-width: 0; display: grid; gap: 8px; }
#profileModal .field > label { color: #34445b; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
#profileModal input:not([type=file]), #profileModal select { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #cdd6e1; border-radius: 10px; padding: 11px 12px; color: #10233f; background: #fff; font-size: 16px; box-sizing: border-box; }
#profileModal input[readonly] { background: #f1f4f7; color: #66748a; }
#profileModal button, #profileModal .avatar-action { min-height: 44px; font-size: 14px; border-radius: 10px; }
#profileModal :is(button,input,select,.avatar-action):focus-visible { outline: 3px solid #386ec4; outline-offset: 3px; }
#profileModal #profileSchoolNameField { grid-column: 1 / -1; }
#profileModal .avatar-editor { display: flex; gap: 20px; align-items: center; margin: 0; }
#profileModal .avatar-editor img { width: 88px; height: 88px; flex: 0 0 88px; border: 3px solid #fff; border-radius: 24px; object-fit: cover; box-shadow: 0 3px 14px #10233f16; }
#profileModal .avatar-label { font-size: 16px; color: #10233f; font-weight: 700; text-transform: none; }
#profileModal .avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#profileModal .avatar-action { display: inline-flex; width: auto; align-items: center; justify-content: center; margin: 0; padding: 10px 14px; cursor: pointer; }
#profileModal .lp-profile-photo { background: #fdfaf6; }
#profileModal .lp-profile-password { display: flex; gap: 8px; }
#profileModal .lp-profile-password input { flex: 1; }
#profileModal #profileTogglePassword { flex: 0 0 76px; padding: 10px; }
#profileModal .lp-profile-security-note { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: #f1f5fa; color: #506079; font-size: 13px; line-height: 1.6; }
#profileModal .lp-profile-account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
#profileModal #logoutButton { background: #fff4f3; color: #a33030; border: 1px solid #efcfcb; margin-left: auto; }
#profileModal .activation-link { overflow-wrap: anywhere; font-size: 12px; }
#profileModal .activation-link:empty { display: none; }
#profileModal .account-note.error { color: #a82727; background: #fff1f1; padding: 12px; border-radius: 10px; }
#profileModal .lp-profile-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px; border-top: 1px solid #dce2ea; background: #fff; }
#profileModal .lp-profile-footer p { margin: 0; color: #627084; font-size: 12px; }
#profileModal #saveUser { min-width: 180px; padding: 13px 22px; background: #10233f; color: #fff; }
#profileModal #profileTeacherField { gap: 12px; }
#profileModal .selected-teachers { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 600px) {
  #profileModal { padding: 10px; align-items: center; }
  #profileModal .lp-profile-sheet { max-height: calc(100dvh - 20px); border-radius: 18px; }
  #profileModal .sheet-head { padding: 18px; }
  #profileModal #profileTitle { font-size: 21px; }
  #profileModal .lp-profile-body { padding: 14px; gap: 12px; }
  #profileModal .lp-profile-card { padding: 16px; }
  #profileModal .lp-profile-grid { grid-template-columns: 1fr; gap: 16px; }
  #profileModal .avatar-editor { align-items: flex-start; gap: 12px; }
  #profileModal .avatar-editor img { width: 64px; height: 64px; flex-basis: 64px; border-radius: 18px; }
  #profileModal .avatar-actions { flex-direction: column; align-items: stretch; }
  #profileModal .lp-profile-footer { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  #profileModal .lp-profile-footer p { display: none; }
  #profileModal #saveUser { width: 100%; }
  #profileModal #logoutButton { margin-left: 0; }
}
