:root {
  --ink: #102a43;
  --ink-soft: #486581;
  --navy: #102a43;
  --navy-deep: #071b2d;
  --teal: #24a69a;
  --teal-light: #7bd9cf;
  --paper: #f7f9fc;
  --white: #ffffff;
  --line: #d9e2ec;
  --danger: #b42318;
  --danger-bg: #fff1f0;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }

.login-page { min-height: 100vh; }
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(330px, 42%) 1fr;
}
.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(36px, 6vw, 82px);
  color: var(--white);
  background:
    radial-gradient(circle at 82% 18%, rgba(123, 217, 207, .3) 0 2px, transparent 3px),
    radial-gradient(circle at 20% 88%, rgba(123, 217, 207, .18) 0 140px, transparent 141px),
    linear-gradient(145deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.brand-panel::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -180px;
  top: 23%;
  border: 1px solid rgba(123, 217, 207, .22);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgba(123, 217, 207, .04), 0 0 0 128px rgba(123, 217, 207, .03);
}
.brand-panel > * { position: relative; z-index: 1; }
.brand-content { width: 100%; margin-top: auto; }
.login-logo {
  width: min(100%, 420px);
  padding: 10px 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,.16);
}
.login-logo img { display: block; width: 100%; height: auto; }
.brand-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 18px 18px 18px 4px;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.brand-mark span { color: var(--teal-light); font-family: Georgia, serif; font-size: 34px; font-weight: 700; }
.brand-mark.small { width: 42px; height: 42px; border-radius: 12px 12px 12px 3px; background: var(--navy); }
.brand-mark.small span { font-size: 24px; }
.brand-mark.tiny { width: 34px; height: 34px; border-radius: 9px 9px 9px 2px; background: var(--navy); }
.brand-mark.tiny span { font-size: 20px; }
.eyebrow {
  margin: 0 0 18px;
  color: var(--teal-light);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow.dark { color: #16877d; }
.brand-copy { max-width: 430px; margin: 28px 0 0; color: #bcccdc; font-size: 17px; line-height: 1.7; }
.brand-foot { margin: auto 0 0; color: #829ab1; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

.form-panel { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(28px, 8vw, 120px) 24px; }
.form-wrap { width: 100%; max-width: 430px; margin: auto; }
.mobile-brand { display: none; }
.mobile-brand img { display: block; width: min(100%, 310px); height: auto; }
.form-wrap h2 { margin: 0; color: var(--ink); font-family: Georgia, 'Times New Roman', serif; font-size: clamp(34px, 4vw, 46px); font-weight: 500; letter-spacing: -.025em; }
.form-intro { margin: 12px 0 34px; color: var(--ink-soft); line-height: 1.6; }
label { display: block; margin: 0 0 8px; color: #243b53; font-size: 13px; font-weight: 700; }
input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #bcccdc;
  border-radius: 10px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
input::placeholder { color: #9fb3c8; }
input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(36,166,154,.12); }
.label-row { margin-top: 22px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.password-toggle { position: absolute; top: 50%; right: 8px; width: 40px; height: 40px; transform: translateY(-50%); border: 0; border-radius: 8px; color: var(--ink-soft); background: transparent; cursor: pointer; }
.password-toggle:hover, .password-toggle:focus-visible { background: #edf2f7; outline: none; }
.eye { display: block; width: 19px; height: 13px; margin: auto; border: 1.8px solid currentColor; border-radius: 70% 20% 70% 20%; transform: rotate(45deg); }
.eye::after { content: ""; display: block; width: 5px; height: 5px; margin: 2px auto 0; border: 1.6px solid currentColor; border-radius: 50%; }
[aria-pressed="true"] .eye::before { content: ""; position: absolute; width: 22px; height: 2px; left: 9px; top: 19px; background: currentColor; transform: rotate(-45deg); }
.primary-button {
  width: 100%;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
  padding: 0 20px;
  color: var(--white);
  background: var(--navy);
  border: 0;
  border-radius: 10px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s, background .18s, opacity .18s;
}
.primary-button:hover { background: #183f5d; transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .7; transform: none; }
.message { margin: 0 0 22px; padding: 12px 14px; color: var(--danger); background: var(--danger-bg); border: 1px solid #f7c5c1; border-radius: 9px; font-size: 13px; line-height: 1.45; }
.support-note { margin: 22px 0 0; color: #829ab1; font-size: 12px; text-align: center; }
.copyright { margin: 40px auto 0; color: #9fb3c8; font-size: 12px; }

.workspace-page { min-height: 100vh; background: linear-gradient(145deg, #f7f9fc, #eef6f5); }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(22px, 5vw, 72px); background: rgba(255,255,255,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.wordmark { display: flex; align-items: center; gap: 12px; font-weight: 750; }
.header-logo-crop { position: relative; width: 42px; height: 42px; flex: 0 0 42px; overflow: hidden; }
.header-logo-crop img { position: absolute; width: 153px; max-width: none; height: auto; left: -2px; top: -5px; }
.secondary-button { padding: 9px 15px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 8px; font-weight: 700; cursor: pointer; }
.workspace-main { width: min(1180px, calc(100% - 44px)); margin: 0 auto; padding: clamp(54px, 8vw, 92px) 0 72px; }
.workspace-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 52px; }
.workspace-intro h1 { margin: 0 0 12px; font-family: Georgia, serif; font-size: clamp(40px, 6vw, 62px); font-weight: 500; letter-spacing: -.035em; }
.workspace-intro > div > p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: 17px; }
.role-chip { flex: 0 0 auto; display: inline-block; margin-bottom: 6px; padding: 8px 12px; color: #0d655e; background: #dff5f2; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.dashboard-section { margin-bottom: 42px; }
.workspace-section-heading h2, .module-section h2 { margin: 0 0 20px; color: #526d82; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.workspace-section-heading .eyebrow { margin-bottom: 5px; }
.monthly-admissions-card { position: relative; min-height: 260px; padding: 28px 30px; overflow: hidden; color: #fff; background: linear-gradient(132deg, #0d2d47 0%, #123f5b 58%, #126c70 145%); border: 1px solid rgba(255,255,255,.18); border-radius: 22px; box-shadow: 0 20px 48px rgba(12,43,65,.17); }
.monthly-admissions-card::before { content: ""; position: absolute; width: 270px; height: 270px; right: -95px; top: -130px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.035), 0 0 0 84px rgba(255,255,255,.025); }
.monthly-card-heading { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.monthly-card-heading > div:first-child { display: grid; gap: 5px; }
.dashboard-card-label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .78; }
.dashboard-status { min-height: 16px; color: #ffd9a1; font-size: 11px; font-weight: 650; }
.month-control { display: grid; grid-template-columns: 38px minmax(104px, auto) 38px; align-items: center; padding: 4px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.17); border-radius: 12px; backdrop-filter: blur(8px); }
.month-control button { width: 38px; height: 34px; display: grid; place-items: center; color: #fff; background: transparent; border: 0; border-radius: 8px; font-size: 17px; cursor: pointer; transition: background .18s, opacity .18s; }
.month-control button:hover:not(:disabled), .month-control button:focus-visible { background: rgba(255,255,255,.15); outline: none; }
.month-control button:disabled { opacity: .28; cursor: default; }
.month-control strong { padding: 0 9px; font-size: 13px; letter-spacing: .03em; text-align: center; }
.monthly-primary-metrics { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(210px, .72fr) minmax(310px, 1.28fr); gap: 14px; margin: 19px 0 14px; }
.monthly-admission-total,
.monthly-agreed-fees-total { min-height: 122px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 18px 21px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; }
.monthly-admission-total strong,
.monthly-agreed-fees-total strong { font-family: Georgia, serif; font-size: clamp(50px, 6vw, 70px); font-weight: 500; line-height: .92; letter-spacing: -.045em; transition: opacity .18s; }
.monthly-agreed-fees-total strong { font-size: clamp(40px, 5vw, 60px); }
.monthly-admission-total span,
.monthly-agreed-fees-total span { font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; opacity: .72; }
.monthly-admission-breakdown { position: relative; z-index: 1; display: flex; gap: 12px; }
.monthly-admission-breakdown > div { min-width: 190px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 11px 13px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); border-radius: 11px; }
.monthly-admission-breakdown span:not(.breakdown-dot) { font-size: 12px; font-weight: 650; opacity: .8; }
.monthly-admission-breakdown strong { font-size: 18px; }
.breakdown-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.07); }
.breakdown-dot.joc { background: #6dd5c5; }
.breakdown-dot.short-term { background: #ffc978; }
.monthly-admissions-card.is-loading .monthly-admission-total strong,
.monthly-admissions-card.is-loading .monthly-agreed-fees-total strong,
.monthly-admissions-card.is-loading .monthly-admission-breakdown strong { opacity: .38; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.module-card {
  position: relative;
  min-height: 245px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(16,42,67,.08);
  border-radius: 20px;
  box-shadow: 0 16px 42px rgba(16,42,67,.07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.module-card::after { content: ""; position: absolute; right: -55px; bottom: -70px; width: 170px; height: 170px; border: 1px solid currentColor; border-radius: 50%; opacity: .1; box-shadow: 0 0 0 30px currentColor; }
.module-card:hover { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(16,42,67,.11); }
.module-link { color: inherit; text-decoration: none; cursor: pointer; }
.module-link:focus-visible { outline: 3px solid rgba(49,95,159,.28); outline-offset: 4px; }
.module-admissions { color: #315f9f; background: #eaf2ff; }
.module-fees { color: #167361; background: #e3f5ef; }
.module-reports { color: #a65c23; background: #fff0df; }
.module-icon { position: relative; z-index: 1; width: 54px; height: 54px; display: grid; place-items: center; background: rgba(255,255,255,.72); border-radius: 15px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.module-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.module-copy { position: relative; z-index: 1; }
.module-copy h3 { margin: 0 0 9px; color: var(--ink); font-family: Georgia, serif; font-size: 27px; font-weight: 600; letter-spacing: -.015em; }
.module-copy p { max-width: 250px; margin: 0; color: #526d82; font-size: 14px; line-height: 1.55; }

.wordmark-link { color: var(--ink); text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.button-link { display: inline-flex; align-items: center; text-decoration: none; }
.admission-main { width: min(1040px, calc(100% - 44px)); margin: 0 auto; padding: clamp(46px, 7vw, 78px) 0 max(165px, calc(100vh - 460px)); }
.page-heading { margin-bottom: 36px; }
.page-heading h1 { margin: 0 0 12px; font-family: Georgia, serif; font-size: clamp(40px, 6vw, 58px); font-weight: 500; letter-spacing: -.035em; }
.page-heading > p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.milestone-bar { position: sticky; top: 77px; z-index: 8; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; padding: 12px 0; background: rgba(244,249,250,.96); box-shadow: 0 12px 18px -18px rgba(16,42,67,.42); backdrop-filter: blur(12px); }
.milestone { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 13px 14px; color: var(--ink); border: 1px solid transparent; border-radius: 13px; text-align: left; cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s, background .18s; }
.milestone:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,42,67,.08); }
.milestone:focus-visible { outline: 3px solid rgba(36,166,154,.2); outline-offset: 2px; }
.milestone-number { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.72); font-size: 10px; font-weight: 850; }
.milestone-copy { min-width: 0; display: grid; gap: 2px; }
.milestone-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; }
.milestone-copy small { font-size: 10px; font-weight: 700; opacity: .7; }
.milestone[data-status="empty"] { color: #9d332b; background: #fff0ef; border-color: #f2c4c0; }
.milestone[data-status="partial"] { color: #8a5a05; background: #fff7df; border-color: #ecd18c; }
.milestone[data-status="complete"] { color: #176b56; background: #e6f7f0; border-color: #a9decd; }
.admission-form { display: grid; gap: 22px; }
.form-section { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 34px rgba(16,42,67,.05); transition: background .2s, border-color .2s, box-shadow .2s; scroll-margin-top: 175px; }
.form-section[data-status="empty"] { background: #fff3f2; border-color: #f0c8c4; }
.form-section[data-status="partial"] { background: #fff8e7; border-color: #ead296; }
.form-section[data-status="complete"] { background: #eaf8f2; border-color: #adddce; }
.form-section.is-open { box-shadow: 0 17px 42px rgba(16,42,67,.09); }
.section-toggle { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 15px; padding: 24px clamp(22px, 4vw, 36px); color: var(--ink); background: transparent; border: 0; text-align: left; cursor: pointer; }
.section-number { width: 36px; height: 36px; display: grid; place-items: center; color: inherit; background: rgba(255,255,255,.72); border-radius: 10px; font-size: 11px; font-weight: 850; letter-spacing: .04em; }
.section-title { min-width: 0; display: grid; gap: 4px; }
.section-title strong { font-family: Georgia, serif; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.section-title small { color: #627d98; font-size: 12px; }
.section-state-label { padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.68); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.form-section[data-status="empty"] .section-state-label { color: #9d332b; }
.form-section[data-status="partial"] .section-state-label { color: #8a5a05; }
.form-section[data-status="complete"] .section-state-label { color: #176b56; }
.form-section[data-save-state="saving"] .section-state-label { color: #8a6418; }
.form-section[data-save-state="saved"] .section-state-label { color: #267766; }
.form-section[data-save-state="error"] .section-state-label { color: var(--danger); }
.section-chevron { width: 11px; height: 11px; margin: 0 3px 5px 6px; border-right: 2px solid #526d82; border-bottom: 2px solid #526d82; transform: rotate(45deg); transition: transform .2s; }
.section-toggle[aria-expanded="true"] .section-chevron { margin-bottom: -5px; transform: rotate(225deg); }
.section-body { padding: 4px clamp(22px, 4vw, 36px) clamp(26px, 4vw, 36px); }
.section-body[hidden] { display: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admission-details-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-full { grid-column: 1 / -1; }
.field label { margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; color: var(--ink); background: #fbfcfe; border: 1px solid #bcccdc; border-radius: 10px; outline: none; transition: border-color .18s, box-shadow .18s, background .18s; }
.field input, .field select { height: 50px; padding: 0 14px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #627d98 50%), linear-gradient(135deg, #627d98 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.field textarea { min-height: 92px; padding: 13px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(36,166,154,.11); }
.money-input { position: relative; }
.money-input > span { position: absolute; z-index: 1; left: 14px; top: 50%; transform: translateY(-50%); color: #627d98; }
.money-input input { padding-left: 31px; }
.money-input input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.money-input input[type="number"]::-webkit-inner-spin-button,
.money-input input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 4px; }
.form-reset { min-width: 120px; }
.save-button { min-width: 190px; height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; color: #fff; background: var(--navy); border: 0; border-radius: 10px; font-weight: 750; cursor: pointer; transition: transform .18s, background .18s, opacity .18s; }
.save-button:hover { background: #183f5d; transform: translateY(-1px); }
.save-button:disabled { cursor: wait; opacity: .65; transform: none; }
.form-status { margin: 0 0 22px; padding: 15px 17px; border-radius: 11px; font-size: 14px; font-weight: 650; }
.form-status.success { position: fixed; z-index: 1100; top: 82px; right: 24px; width: max-content; max-width: min(420px, calc(100vw - 32px)); margin: 0; padding: 11px 14px; color: #126353; background: rgba(240,250,246,.98); border: 1px solid #b8e2d4; border-radius: 10px; box-shadow: 0 10px 30px rgba(7,27,45,.13); font-size: 13px; transition: opacity .22s ease, transform .22s ease; animation: toast-arrive .22s ease-out; }
.form-status.success::before { content: '\2713'; display: inline-grid; width: 20px; height: 20px; margin-right: 8px; place-items: center; color: #fff; background: #29927e; border-radius: 50%; font-size: 12px; }
.form-status.success.is-leaving { opacity: 0; transform: translateY(-7px); }
.form-status.error { color: var(--danger); background: var(--danger-bg); border: 1px solid #f7c5c1; }
@keyframes toast-arrive { from { opacity: 0; transform: translateY(-7px); } }
.review-dialog { width: min(920px, calc(100% - 36px)); max-height: min(90vh, 900px); margin: auto; padding: 0; overflow: hidden; color: var(--ink); background: #f8fafc; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 90px rgba(7,27,45,.28); }
.review-dialog::backdrop { background: rgba(7,27,45,.58); backdrop-filter: blur(4px); }
.review-dialog-inner { max-height: min(90vh, 900px); display: flex; flex-direction: column; }
.review-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 28px 30px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.review-heading .eyebrow { margin-bottom: 8px; }
.review-heading h2 { margin: 0 0 7px; font-family: Georgia, serif; font-size: 32px; font-weight: 600; }
.review-heading p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: 14px; }
.dialog-close { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; color: #627d98; background: #f0f4f8; border: 0; border-radius: 10px; font-size: 25px; line-height: 1; cursor: pointer; }
.review-content { display: grid; gap: 14px; padding: 22px 30px 28px; overflow-y: auto; }
.review-section { padding: 18px 20px; background: #fff; border: 1px solid #e1e8ef; border-radius: 13px; }
.review-section h3 { margin: 0 0 15px; color: #147d74; font-size: 12px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.review-section dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 24px; margin: 0; }
.review-section dl > div { min-width: 0; }
.review-section dt { margin-bottom: 4px; color: #829ab1; font-size: 10px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.review-section dd { margin: 0; overflow-wrap: anywhere; color: #243b53; font-size: 14px; font-weight: 650; line-height: 1.45; white-space: pre-line; }
.review-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 18px 30px; background: #fff; border-top: 1px solid var(--line); }
.review-edit { min-width: 125px; }
.review-confirm { min-width: 190px; }
body:has(dialog[open]) { overflow: hidden; }

.fee-main { width: min(100% - 48px, 1480px); margin: 0 auto; padding: 56px 0 72px; }
.fee-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.fee-page-heading h1 { margin: 5px 0 8px; font-family: Georgia, serif; color: var(--navy); font-size: clamp(36px, 5vw, 56px); font-weight: 600; letter-spacing: -.035em; }
.fee-page-heading p:not(.eyebrow) { margin: 0; color: var(--ink-soft); }
.record-count { flex: 0 0 auto; padding: 9px 13px; color: #176f67; background: #e6f5f1; border-radius: 999px; font-size: 13px; font-weight: 750; }
.list-message { padding: 30px; color: var(--ink-soft); background: #fff; border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.list-message.error { color: var(--danger); background: var(--danger-bg); border-color: #f7c5c1; }
.admissions-table-panel { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 40px rgba(16,42,67,.07); }
.admissions-table-scroll { overflow-x: auto; }
.admissions-table { width: 100%; min-width: 1220px; border-collapse: collapse; }
.admissions-table th { padding: 0; background: #f4f7fa; border-bottom: 1px solid #dbe4ec; text-align: left; white-space: nowrap; }
.admissions-table th button { width: 100%; display: flex; align-items: center; gap: 7px; padding: 14px 16px; color: #526d82; background: transparent; border: 0; font: inherit; font-size: 11px; font-weight: 800; letter-spacing: .045em; text-align: left; text-transform: uppercase; cursor: pointer; }
.admissions-table th button:hover { color: var(--navy); background: #eaf0f5; }
.admissions-table th[aria-sort="ascending"] button,
.admissions-table th[aria-sort="descending"] button { color: #13796f; background: #e5f3f0; }
.sort-indicator { min-width: 12px; font-size: 14px; line-height: 1; }
.admissions-table td { padding: 15px 16px; color: #334e68; border-bottom: 1px solid #edf1f5; font-size: 13px; white-space: nowrap; }
.admissions-table tbody tr:last-child td { border-bottom: 0; }
.admissions-table tbody tr:hover td { background: #f8fbfc; }
.admissions-table .reference-cell { color: #13796f; font-weight: 750; }
.admissions-table .student-cell { color: var(--navy); font-weight: 750; }
.admissions-table .paid-cell { color: #187565; font-weight: 700; }
.admissions-table .balance-cell { color: #9a5c14; font-weight: 750; }
.admissions-table .number-column { text-align: right; }
.admissions-table th.number-column button { justify-content: flex-end; text-align: right; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.admissions-table .action-column { width: 52px; min-width: 52px; padding: 7px 9px; text-align: center; }
.row-action-button { width: 34px; height: 34px; display: inline-grid; place-items: center; color: #526d82; background: transparent; border: 1px solid transparent; border-radius: 9px; font-size: 24px; line-height: 1; cursor: pointer; }
.row-action-button:hover, .row-action-button:focus-visible { color: var(--navy); background: #eaf0f5; border-color: #d8e2ea; outline: none; }
.row-action-menu { position: fixed; z-index: 1200; width: 158px; padding: 6px; background: #fff; border: 1px solid #dce5ec; border-radius: 11px; box-shadow: 0 15px 40px rgba(7,27,45,.18); }
.row-action-menu button { width: 100%; padding: 10px 11px; color: #334e68; background: transparent; border: 0; border-radius: 7px; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.row-action-menu button:hover, .row-action-menu button:focus-visible { color: #126b63; background: #edf7f4; outline: none; }

.fee-dialog { width: min(940px, calc(100% - 32px)); max-height: min(92vh, 900px); margin: auto; padding: 0; overflow: hidden; color: var(--ink); background: #f7f9fb; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 90px rgba(7,27,45,.3); }
.fee-dialog::backdrop { background: rgba(7,27,45,.58); backdrop-filter: blur(4px); }
.fee-dialog-shell { max-height: min(92vh, 900px); display: flex; flex-direction: column; margin: 0; }
.fee-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.fee-dialog-heading .eyebrow { margin-bottom: 6px; }
.fee-dialog-heading h2 { margin: 0 0 5px; font-family: Georgia, serif; color: var(--navy); font-size: 28px; font-weight: 600; }
.fee-dialog-heading p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: 13px; }
.dialog-loading, .dialog-empty { margin: 20px; padding: 32px; color: var(--ink-soft); background: #fff; border: 1px dashed #cad6df; border-radius: 12px; text-align: center; }
.dialog-empty { display: grid; gap: 7px; }
.dialog-empty strong { color: var(--navy); font-size: 15px; }
.dialog-empty.error { color: var(--danger); background: var(--danger-bg); border-color: #f3bbb6; }
.compact-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 16px; overflow-y: auto; }
.compact-detail-section { padding: 14px 16px; background: #fff; border: 1px solid #e1e8ef; border-radius: 11px; }
.compact-detail-section h3 { margin: 0 0 11px; color: #147d74; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.compact-detail-section dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.compact-detail-section dl > div { min-width: 0; }
.compact-detail-section dt { margin-bottom: 2px; color: #829ab1; font-size: 9px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.compact-detail-section dd { margin: 0; overflow-wrap: anywhere; color: #243b53; font-size: 12px; font-weight: 650; line-height: 1.35; white-space: pre-line; }
.schedule-dialog { width: min(820px, calc(100% - 32px)); }
.schedule-content { display: grid; gap: 11px; padding: 16px; overflow-y: auto; }
.schedule-item { padding: 15px 16px 0; background: #fff; border: 1px solid #e0e8ee; border-radius: 12px; }
.schedule-item.payable { border-color: #86cfbf; }
.schedule-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.schedule-item-top small { color: #829ab1; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.schedule-item-top h3 { margin: 3px 0 0; color: var(--navy); font-size: 15px; }
.schedule-status { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.schedule-status.paid { color: #126353; background: #ddf3eb; }
.schedule-status.partial, .schedule-status.due { color: #875311; background: #fff0cf; }
.schedule-status.overdue { color: #a43d36; background: #fde5e3; }
.schedule-status.unpaid { color: #526d82; background: #edf2f6; }
.schedule-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.schedule-values div { display: grid; gap: 2px; }
.schedule-values span { color: #829ab1; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.schedule-values strong { color: #334e68; font-size: 12px; }
.schedule-item-action { min-height: 39px; display: flex; align-items: center; justify-content: flex-end; margin: 0 -16px; padding: 0 16px; color: #829ab1; background: #f8fafb; border-top: 1px solid #edf1f4; border-radius: 0 0 12px 12px; font-size: 11px; font-weight: 650; }
.schedule-item-action.locked { justify-content: flex-start; }
.schedule-pay-button { padding: 7px 11px; color: #fff; background: #147d74; border: 0; border-radius: 8px; font-size: 11px; font-weight: 750; cursor: pointer; }
.schedule-pay-button:hover { background: #0f685f; }
.payment-dialog { width: min(760px, calc(100% - 32px)); }
.payment-content { padding: 18px 22px; overflow-y: auto; }
.payment-message { margin-bottom: 14px; padding: 10px 12px; color: var(--danger); background: var(--danger-bg); border: 1px solid #f3bbb6; border-radius: 9px; font-size: 12px; font-weight: 650; }
.payment-top-fields { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 16px; }
.payment-balance { min-height: 45px; display: flex; align-items: center; justify-content: space-between; padding: 0 13px; background: #edf7f4; border: 1px solid #cce9e1; border-radius: 9px; }
.payment-balance span, .payment-total span { color: #52736e; font-size: 11px; font-weight: 750; text-transform: uppercase; }
.payment-balance strong, .payment-total strong { color: #126353; font-size: 16px; }
.payment-lines-heading { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 9px; }
.payment-lines-heading h3 { margin: 0; color: var(--navy); font-size: 13px; }
.text-button { padding: 5px 7px; color: #147d74; background: transparent; border: 0; font-size: 12px; font-weight: 750; cursor: pointer; }
.text-button:disabled { opacity: .45; cursor: default; }
.payment-lines { display: grid; gap: 8px; margin-bottom: 17px; }
.payment-line { display: grid; grid-template-columns: minmax(145px, .8fr) minmax(110px, .55fr) minmax(180px, 1fr) 34px; gap: 8px; }
.payment-line select, .payment-line input { width: 100%; min-width: 0; height: 42px; padding: 0 11px; color: var(--ink); background: #fbfcfd; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12px; outline: none; }
.payment-line input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.payment-line input[type="number"]::-webkit-inner-spin-button,
.payment-line input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.remove-payment-line { width: 34px; height: 42px; color: #9b4a45; background: #fff4f3; border: 1px solid #f0d3d0; border-radius: 8px; font-size: 19px; cursor: pointer; }
.remove-payment-line:disabled { opacity: .35; cursor: default; }
.payment-total { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 13px 14px; background: #f2f6f8; border-radius: 9px; }
.fee-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: #fff; border-top: 1px solid var(--line); }
.fee-dialog-actions .save-button { min-width: 165px; height: 44px; }
.fee-toast { position: fixed; z-index: 1300; top: 82px; right: 24px; max-width: min(430px, calc(100vw - 32px)); padding: 11px 14px; color: #126353; background: #f0faf6; border: 1px solid #b8e2d4; border-radius: 10px; box-shadow: 0 10px 30px rgba(7,27,45,.15); font-size: 13px; font-weight: 700; transition: opacity .22s, transform .22s; animation: toast-arrive .22s ease-out; }
.fee-toast.is-leaving { opacity: 0; transform: translateY(-7px); }

@media (max-width: 760px) {
  .login-shell { display: block; }
  .brand-panel { display: none; }
  .form-panel { padding: 28px 22px 20px; }
  .mobile-brand { display: block; margin-bottom: clamp(54px, 10vh, 84px); }
  .copyright { margin-top: 60px; }
  .workspace-main { width: min(100% - 36px, 620px); padding-top: 44px; }
  .workspace-intro { align-items: flex-start; flex-direction: column; margin-bottom: 40px; }
  .role-chip { margin: 0; }
  .dashboard-section { margin-bottom: 36px; }
  .monthly-admissions-card { min-height: 0; padding: 22px 20px; border-radius: 18px; }
  .monthly-card-heading { align-items: stretch; flex-direction: column; gap: 14px; }
  .month-control { align-self: flex-start; }
  .monthly-primary-metrics { grid-template-columns: 1fr; margin: 20px 0 12px; }
  .monthly-admission-total, .monthly-agreed-fees-total { min-height: 104px; }
  .monthly-admission-breakdown { display: grid; grid-template-columns: 1fr 1fr; }
  .monthly-admission-breakdown > div { min-width: 0; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 205px; }
  .topbar-actions .button-link { display: none; }
  .admission-main { width: min(100% - 32px, 620px); padding-top: 38px; }
  .milestone-bar { grid-template-columns: repeat(5, minmax(118px, 1fr)); margin-right: -16px; padding-right: 16px; overflow-x: auto; scrollbar-width: thin; }
  .milestone { padding: 11px; }
  .form-grid, .form-grid-three { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .section-toggle { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 20px; }
  .section-title strong { font-size: 20px; }
  .section-state-label { display: none; }
  .section-body { padding: 2px 20px 24px; }
  .form-actions { flex-direction: column-reverse; }
  .save-button, .form-reset { width: 100%; }
  .review-dialog { width: calc(100% - 20px); max-height: 94vh; border-radius: 16px; }
  .review-dialog-inner { max-height: 94vh; }
  .review-heading, .review-content { padding-left: 20px; padding-right: 20px; }
  .review-section dl { grid-template-columns: 1fr; }
  .review-actions { flex-direction: column-reverse; padding: 16px 20px; }
  .review-edit, .review-confirm { width: 100%; }
  .form-status.success { top: 74px; right: 16px; }
  .fee-main { width: min(100% - 28px, 620px); padding-top: 36px; }
  .fee-page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .fee-dialog { width: calc(100% - 18px); max-height: 95vh; border-radius: 14px; }
  .fee-dialog-shell { max-height: 95vh; }
  .fee-dialog-heading { padding: 18px; }
  .compact-details { grid-template-columns: 1fr; padding: 10px; }
  .compact-detail-section dl { grid-template-columns: 1fr 1fr; }
  .schedule-values { grid-template-columns: 1fr 1fr; }
  .payment-content { padding: 16px; }
  .payment-top-fields { grid-template-columns: 1fr; }
  .payment-line { grid-template-columns: 1fr 1fr 34px; }
  .payment-line .payment-reference { grid-column: 1 / -1; grid-row: 2; }
  .payment-line .remove-payment-line { grid-column: 3; grid-row: 1; }
  .fee-dialog-actions { padding: 13px 16px; }
  .fee-toast { top: 74px; right: 16px; }
}

@media (min-width: 761px) and (max-width: 1040px) {
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
