:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-soft: #f1f3f6;
    --text: #1f2937;
    --muted: #5b6678;
    --border: #e3e7ec;
    --color-primary: #c0392b;
    --primary: #c0392b;
    --primary-dark: #a52f23;
    --primary-light: #e9a198;
    --primary-soft: #fdf0ee;
    --primary-cream: #fef7f6;
    --primary-gradient: var(--primary);
    --brand-logo: #860e26; /* đỏ đô của logo STEPNELO */
    --brand-red: #c0392b;
    --brand-red-dark: #a52f23;
    --brand-red-light: #d8574a;
    --brand-red-gradient: var(--brand-red);
    --accent: #c0392b;
    --danger: #c62828;
    --warning: #a15c07;
    --success: #1f7a4d;
    --shadow: 0 4px 16px rgba(16, 24, 40, .06);
    --radius: 16px;
    --sidebar: 258px;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --search-border: #dce1e6;
    --search-surface: #f8fafb;
    --search-focus-ring: 0 0 0 3px rgba(192, 57, 43, .1);
}

/* Potential students and weekly callback coordination */
.tone-lead, [data-tone="lead"] { --tone: #7c3aed; --tone-dark: #5b21b6; --tone-soft: #f3e8ff; --tone-border: #ddd6fe; }
.lead-hero { background: linear-gradient(135deg, #fff 0%, #faf5ff 58%, #f3e8ff 100%); }
.lead-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.lead-stat-grid article { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 17px; border: 1px solid #e9e4f2; border-radius: 16px; background: #fff; box-shadow: 0 10px 28px rgba(52, 31, 84, .055); }
.lead-stat-grid article.has-alert { border-color: #fecaca; background: #fff8f8; }
.lead-stat-icon { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; color: #6d28d9; border-radius: 12px; background: #f3e8ff; }
.lead-stat-grid .has-alert .lead-stat-icon { color: #b91c1c; background: #fee2e2; }
.lead-stat-grid strong { display: block; color: var(--text); font-size: 1.45rem; line-height: 1; }
.lead-stat-grid small { display: block; margin-top: 5px; color: var(--muted); font-size: .75rem; }
.callback-board-card { overflow: hidden; margin-bottom: 18px; }
.callback-week-board { display: grid; grid-template-columns: repeat(7, minmax(185px, 1fr)); gap: 10px; overflow-x: auto; padding: 14px 16px 18px; scrollbar-width: thin; }
.callback-day { min-height: 190px; overflow: hidden; border: 1px solid #ebe7f1; border-radius: 14px; background: #f8f7fa; }
.callback-day > header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; color: #615a6b; border-bottom: 1px solid #ebe7f1; background: #fff; font-size: .72rem; font-weight: 700; }
.callback-day > header strong { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; font-size: .8rem; }
.callback-day.is-today { border-color: #a78bfa; box-shadow: inset 0 0 0 1px #a78bfa; }
.callback-day.is-today > header { color: #5b21b6; background: #f5f3ff; }
.callback-day.is-today > header strong { color: #fff; background: #7c3aed; }
.callback-day-list { display: grid; gap: 8px; align-content: start; padding: 8px; }
.callback-empty { margin: 25px 4px; color: #aaa2b5; text-align: center; font-size: .72rem; }
.callback-card { overflow: hidden; border: 1px solid #e4dcf2; border-left: 3px solid #8b5cf6; border-radius: 10px; background: #fff; box-shadow: 0 5px 14px rgba(66, 42, 92, .06); }
.callback-card.is-overdue { border-color: #fecaca; border-left-color: #dc2626; background: #fffafa; }
.callback-card > a { display: grid; gap: 4px; padding: 10px; color: inherit; text-decoration: none; }
.callback-card time { color: #6d28d9; font-size: .68rem; font-weight: 800; }
.callback-card.is-overdue time { color: #b91c1c; }
.callback-card strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.callback-card small { display: flex; align-items: center; gap: 5px; overflow: hidden; color: var(--muted); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.callback-complete-form { padding: 0 8px 8px; }
.callback-complete-form button { width: 100%; padding: 6px 8px; color: #166534; border: 0; border-radius: 7px; background: #dcfce7; font: inherit; font-size: .67rem; font-weight: 750; cursor: pointer; }
.lead-status-filter { display: flex; gap: 7px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: thin; }
.lead-status-filter a { flex: 0 0 auto; padding: 7px 10px; color: #60596b; border: 1px solid #e8e3ed; border-radius: 999px; background: #fff; font-size: .7rem; font-weight: 700; text-decoration: none; }
.lead-status-filter a.active { color: #fff !important; border-color: #6d28d9 !important; background: #6d28d9 !important; box-shadow: 0 5px 13px rgba(109, 40, 217, .22); }
.lead-row-list { --lead-row-cols: minmax(0, 1.45fr) minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.15fr) 172px; display: grid; padding: 4px 16px 12px; }
.lead-row-list > .empty-state { margin: 12px 0; }
.lead-row-head, .lead-row { display: grid; grid-template-columns: var(--lead-row-cols); gap: 14px; align-items: center; }
.lead-row-head { padding: 11px 14px; color: #8a8293; border-bottom: 1px solid #efebf2; background: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.lead-row-head > span { min-width: 0; text-align: left; }
.lead-row-head > .lead-row-head-actions { text-align: right; }
.lead-row { position: relative; min-width: 0; padding: 11px 14px; border-bottom: 1px solid #f1eef4; transition: background-color .14s ease; }
.lead-row::before { position: absolute; inset: 10px auto 10px 0; width: 3px; border-radius: 0 3px 3px 0; background: transparent; content: ""; }
.lead-row:hover { background: #faf7fd; }
.lead-row.is-overdue::before { background: #dc2626; }
.lead-row.is-today::before { background: #f59e0b; }
.lead-row > div { min-width: 0; }
.lead-row-label { display: none; }
.lead-row-student { display: flex; align-items: center; gap: 11px; }
.lead-row-student > div { display: grid; min-width: 0; gap: 2px; }
.lead-row-student .avatar { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; font-size: .85rem; }
.lead-row-name { overflow: hidden; color: var(--text); font-size: .86rem; font-weight: 750; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.lead-row-name:hover, .lead-row-name:focus-visible { color: #5b21b6; text-decoration: underline; text-underline-offset: 3px; }
.lead-row small, .lead-row-branch > span:last-child { display: flex; min-width: 0; align-items: center; gap: 5px; overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.lead-row .icon { flex: 0 0 auto; width: 13px; height: 13px; }
.lead-profile-flag { display: inline-flex; align-items: center; gap: 4px; color: #a39cab; }
.lead-profile-flag.has-profile { color: #15803d; }
.lead-row-contact { display: grid; gap: 2px; }
.lead-row-contact strong { overflow: hidden; font-size: .8rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.lead-row-branch > span:last-child { color: #4b4556; font-size: .76rem; }
.lead-row-status .status { max-width: 100%; line-height: 1.35; white-space: normal; }
.lead-callback-chip { display: inline-flex; max-width: 100%; align-items: center; gap: 6px; padding: 5px 9px; color: #8a8293; border-radius: 8px; background: #f6f4f8; font-size: .72rem; font-weight: 700; }
.lead-callback-chip > span { display: inline-flex; min-width: 0; flex-wrap: wrap; align-items: baseline; gap: 0 6px; white-space: nowrap; }
.lead-callback-chip em { font-size: .64rem; font-style: normal; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.lead-row.is-upcoming .lead-callback-chip { color: #5b21b6; background: #f5f3ff; }
.lead-row.is-today .lead-callback-chip { color: #92400e; background: #fef3c7; }
.lead-row.is-overdue .lead-callback-chip { color: #b91c1c; background: #fee2e2; }
.lead-card-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 6px; }
.lead-card-actions a { display: inline-flex; min-height: 32px; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px; font-size: .72rem; font-weight: 750; text-decoration: none; white-space: nowrap; transition: filter .14s ease; }
.lead-card-actions a:hover { filter: brightness(.95); }
.lead-call-action { color: #166534; background: #dcfce7; }
.lead-open-action { color: #5b21b6; background: #ede9fe; }
.lead-card-actions .icon { width: 13px; height: 13px; }
.lead-status { max-width: 175px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Status palette: one hue per consultation status, no two statuses share a family. Class names kept from the first draft:
   lilac = not arrived (blue), coral = considering (amber), peach = enrollment scheduled (orange),
   violet = follow-up 2 (violet), purple = follow-up 3+ (rose), green = enrolled. */
.lead-status-lilac { color: #1d4ed8 !important; background: #dbeafe !important; border-color: #bfdbfe !important; }
.lead-status-coral { color: #a16207 !important; background: #fef9c3 !important; border-color: #fde68a !important; }
.lead-status-peach { color: #c2410c !important; background: #ffedd5 !important; border-color: #fed7aa !important; }
.lead-status-violet { color: #6d28d9 !important; background: #ede9fe !important; border-color: #ddd6fe !important; }
.lead-status-purple { color: #be123c !important; background: #ffe4e6 !important; border-color: #fecdd3 !important; }
.lead-status-green { color: #166534 !important; background: #dcfce7 !important; border-color: #bbf7d0 !important; }
.lead-profile-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .75fr); gap: 20px; }
.lead-callback-history { min-width: 0; padding: 14px; border: 1px solid #e9e5ee; border-radius: 14px; background: #faf9fb; }
.callback-history-list { display: grid; gap: 1px; margin-top: 12px; }
.callback-history-list article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: start; padding: 10px 0; border-bottom: 1px solid #ebe7ef; }
.callback-history-list article:last-child { border-bottom: 0; }
.callback-history-dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #8b5cf6; }
.callback-history-dot.status-completed { background: #16a34a; }
.callback-history-dot.status-cancelled { background: #94a3b8; }
.callback-history-list strong, .callback-history-list small { display: block; }
.callback-history-list strong { font-size: .75rem; }
.callback-history-list small { margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.callback-history-list .status { padding: 4px 6px; font-size: .6rem; }
.callback-required-callout { display: flex; gap: 12px; margin-bottom: 16px; padding: 13px; color: #5b21b6; border: 1px solid #ddd6fe; border-radius: 12px; background: #f5f3ff; }
.callback-required-callout > svg { flex: 0 0 auto; margin-top: 2px; }
.callback-required-callout strong, .callback-required-callout p { display: block; margin: 0; }
.callback-required-callout p { margin-top: 3px; color: #6f6680; font-size: .73rem; }
.lead-quick-create { display: grid; gap: 18px; }
.lead-choice-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.lead-choice-fieldset > legend { width: 100%; margin-bottom: 9px; color: #443b51; font-size: .78rem; font-weight: 800; }
.lead-choice-fieldset > legend small { color: var(--muted); font-weight: 500; }
.lead-field-hint { display: flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--muted); font-size: .67rem; }
.lead-status-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.lead-choice-card { position: relative; display: grid; min-height: 78px; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; padding: 11px; color: #544b61 !important; border: 1px solid #e6e0ec !important; border-radius: 12px; background: #fff !important; cursor: pointer; }
.lead-choice-card input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lead-choice-card > span { display: grid; width: 34px; height: 34px; place-items: center; color: inherit; border-radius: 10px; background: color-mix(in srgb, currentColor 10%, white); }
.lead-choice-card > strong { font-size: .73rem; line-height: 1.35; }
.lead-choice-card > small { grid-column: 2; margin-top: -7px; color: var(--muted); font-size: .65rem; line-height: 1.35; }
.lead-choice-card.lead-status-lilac { color: #1d4ed8 !important; }
.lead-choice-card.lead-status-coral { color: #a16207 !important; }
.lead-choice-card.lead-status-peach { color: #c2410c !important; }
.lead-choice-card.lead-status-violet { color: #6d28d9 !important; }
.lead-choice-card.lead-status-purple { color: #be123c !important; }
.lead-choice-card.lead-status-green { color: #166534 !important; }
.lead-choice-card:has(input:checked) { border-color: currentColor !important; box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 18%, transparent), 0 7px 16px rgba(55, 36, 76, .08); }
.lead-choice-card:has(input:checked)::after { position: absolute; top: 7px; right: 8px; content: '✓'; font-size: .68rem; font-weight: 900; }
.profile-method-fieldset { padding: 13px; border: 1px solid #e9e4ee; border-radius: 14px; background: #faf9fb; }
.profile-method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.profile-method-grid > label { position: relative; display: flex; min-height: 58px; align-items: center; gap: 8px; padding: 10px; color: #62586e; border: 1px solid #e5dfea; border-radius: 11px; background: #fff; cursor: pointer; }
.profile-method-grid input { position: absolute; opacity: 0; }
.profile-method-grid label:has(input:checked) { color: #5b21b6; border-color: #8b5cf6; background: #f5f3ff; box-shadow: 0 0 0 2px #ede9fe; }
.profile-method-grid span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: #f1eef4; }
.profile-method-grid strong { font-size: .72rem; line-height: 1.25; }
.profile-method-panel { margin-top: 11px; padding: 12px; border-radius: 11px; background: #fff; }
.profile-current-file { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 10px 11px; border: 1px solid #d9ede4; border-radius: 11px; background: #f3fbf7; }
.profile-current-file > span { min-width: 0; flex: 1; }
.profile-current-file strong, .profile-current-file small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-current-file strong { font-size: .76rem; }
.profile-current-file small { color: var(--muted); font-size: .67rem; }
.profile-current-file .btn { flex: 0 0 auto; padding: 7px 9px; font-size: .67rem; }
.callback-outcome-modal .modal-shell { width: min(860px, 100%); }
.callback-outcome-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.callback-rebook-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 15px 0; padding: 13px; border: 1px solid #ddd6fe; border-radius: 12px; background: #faf5ff; }
.callback-transition-notice { display: flex; align-items: center; gap: 9px; margin-top: 13px; padding: 11px 12px; color: #5b21b6; border: 1px solid #ddd6fe; border-radius: 10px; background: #f5f3ff; font-size: .74rem; font-weight: 650; }
.callback-confirm-check { margin-top: 11px; padding: 11px; border: 1px solid #e6e0eb; border-radius: 10px; background: #fff; font-size: .74rem; }
.enrollment-fields { display: grid; gap: 12px; margin: 15px 0; padding: 14px; border: 1px solid #bbf7d0; border-radius: 13px; background: #f0fdf4; }
.call-evidence-upload { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 11px; align-items: center; margin-top: 13px; padding: 13px; border: 1px dashed #c4b5fd; border-radius: 12px; background: #faf5ff; cursor: pointer; }
.call-evidence-upload > .icon { grid-row: 1 / 3; color: #6d28d9; }
.call-evidence-upload strong, .call-evidence-upload small { display: block; }
.call-evidence-upload small { color: var(--muted); font-size: .67rem; }
.call-evidence-upload input { grid-column: 2; margin-top: 7px; }
.callback-evidence-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: #6d28d9; font-size: .66rem; font-weight: 750; }
.dashboard-lead-overview { margin-bottom: 18px; overflow: hidden; }
.dashboard-lead-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.dashboard-lead-grid > a { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: center; padding: 16px; background: #fff; }
.dashboard-lead-grid > a > span { grid-row: 1 / 3; display: grid; width: 38px; height: 38px; place-items: center; color: #6d28d9; border-radius: 11px; background: #f3e8ff; }
.dashboard-lead-grid strong, .dashboard-lead-grid small { display: block; }
.dashboard-lead-grid strong { font-size: 1.15rem; line-height: 1.2; }
.dashboard-lead-grid small { color: var(--muted); font-size: .67rem; }
.dashboard-lead-grid > a.is-warning > span { color: #b91c1c; background: #fee2e2; }

@media (max-width: 1100px) {
    .lead-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lead-row-list { --lead-row-cols: minmax(0, 1.4fr) minmax(0, 1.15fr) minmax(0, 1.1fr) minmax(0, 1.1fr) 132px; }
    .lead-row-head > span:nth-child(3), .lead-row-branch { display: none; }
    .lead-call-action span { display: none; }
    .lead-profile-body { grid-template-columns: 1fr; }
    .lead-status-choice-grid, .callback-outcome-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-lead-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
    .lead-stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .lead-stat-grid article { padding: 12px; }
    .lead-stat-icon { width: 34px; height: 34px; flex-basis: 34px; }
    .lead-row-list { gap: 10px; padding: 11px; }
    .lead-row-head { display: none; }
    .lead-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "student" "status" "contact" "branch" "callback" "actions"; gap: 9px 10px; padding: 13px; border: 1px solid #e9e5ee; border-radius: 13px; background: #fff; }
    .lead-row::before { inset: 12px auto 12px 0; }
    .lead-row-student { grid-area: student; }
    .lead-row-status { grid-area: status; }
    .lead-row-contact { grid-area: contact; display: flex; align-items: center; gap: 10px; }
    .lead-row-callback { grid-area: callback; }
    .lead-row-branch { display: block; grid-area: branch; }
    .lead-row .lead-card-actions { grid-area: actions; }
    .lead-callback-chip { width: 100%; }
    .lead-call-action span { display: inline; }
    .callback-week-board { grid-template-columns: 1fr; overflow-x: visible; padding: 10px; }
    .callback-day { min-height: 0; }
    .callback-day:not(.is-today):has(.callback-empty) { display: none; }
    .callback-empty { margin: 12px 4px; }
    .lead-card-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .lead-card-actions a { justify-content: center; min-height: 38px; }
    .dashboard-lead-grid { grid-template-columns: 1fr 1fr; }
    .dashboard-lead-grid > a { padding: 12px; }
    .lead-status-choice-grid, .callback-outcome-grid, .profile-method-grid, .callback-rebook-fields { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { max-width: 100%; overflow-x: hidden; color-scheme: light; }
body { max-width: 100%; margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: var(--sidebar); flex-direction: column; padding: calc(22px + var(--safe-area-top)) 16px calc(16px + var(--safe-area-bottom)); overflow-y: auto; color: var(--text); border-right: 1px solid #e3e7ec; background: #ffffff; box-shadow: 1px 0 3px rgba(16,24,40,.04); }
.brand { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 5px 8px 22px; color: #3f4652; }
.brand-mark { display: inline-grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: #fff; background: var(--brand-red-gradient); font-weight: 850; letter-spacing: -.04em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.32), 0 8px 20px rgba(192,57,43,.24); }
img.brand-mark { display: block; object-fit: cover; background: var(--brand-logo); }
.brand strong, .brand small, .sidebar-user strong, .sidebar-user small, .login-brand strong, .login-brand small { display: block; }
.brand strong, .login-brand strong { color: var(--brand-logo); }
.brand strong { font-size: 1.18rem; letter-spacing: .01em; }
.brand small { color: #7d7473; font-size: .7rem; letter-spacing: .04em; }
.nav { display: grid; gap: 5px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 45px; padding: 9px 11px; border: 1px solid transparent; border-radius: 12px; color: #5f6878; font-weight: 680; transition: transform .18s ease, color .18s ease, background .18s ease, border-color .18s ease; }
.nav a:hover { color: var(--tone, var(--primary-dark)); border-color: var(--nav-tint, #f1cbc5); background: var(--tone-soft, var(--primary-soft)); }
.nav a:hover { transform: translateX(2px); }
.nav-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: var(--tone, var(--primary)); background: var(--tone-soft, var(--primary-soft)); }
.nav a.active { color: #fff; border-color: transparent; background: var(--brand-red); box-shadow: 0 8px 20px rgba(192,57,43,.24); }
.nav a.active .nav-icon { color: #fff; background: rgba(255,255,255,.18); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 20px 7px 12px; border-top: 1px solid #e3e7ec; }
.sidebar-user > div:last-child { min-width: 0; }
.sidebar-user strong { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.sidebar-user small { color: #7d7473; font-size: .75rem; }
.sidebar-logout { margin: 0; }
.sidebar-backdrop { display: none; }

.main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 13px; min-height: calc(82px + var(--safe-area-top)); padding: calc(14px + var(--safe-area-top)) clamp(20px, 3vw, 42px) 14px; border-bottom: 1px solid #e3e7ec; background: rgba(246,247,249,.92); backdrop-filter: blur(16px); }
.topbar > div { flex: 1; }
.topbar h1 { margin: 1px 0 0; font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.2; }
.eyebrow { margin: 0; color: var(--primary-dark); font-size: .68rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.icon-button { display: inline-grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid var(--border); border-radius: 11px; color: var(--muted); background: var(--surface); cursor: pointer; }
.topbar [data-sidebar-toggle] { display: none; }
.page-content { width: min(1500px, 100%); margin: 0 auto; padding: 28px clamp(18px, 3vw, 42px) calc(44px + var(--safe-area-bottom)); overflow-anchor: none; }
footer { padding: 0 30px 25px; color: #8994a5; font-size: .78rem; text-align: center; }

.hero-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: clamp(26px, 4vw, 42px); overflow: hidden; border: 1px solid #e8c1ba; border-radius: 22px; color: #4b2d2a; background: radial-gradient(circle at 88% 8%, rgba(255,255,255,.76), transparent 32%), radial-gradient(circle at 20% 130%, rgba(192,57,43,.06), transparent 38%), linear-gradient(120deg, #f6f7f9, #e2f6ee 54%, #a9dbc7); box-shadow: 0 18px 44px rgba(124,55,45,.12); }
.hero-card::after { content: ''; position: absolute; right: -45px; bottom: -95px; width: 240px; height: 240px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 35px rgba(255,255,255,.035), 0 0 0 70px rgba(255,255,255,.025); }
.hero-card > * { position: relative; z-index: 1; }
.hero-card .eyebrow { color: var(--primary-dark); }
.hero-card h2 { margin: 6px 0; font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1.2; }
.hero-card p:last-child { max-width: 720px; margin: 5px 0 0; color: #71524e; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 13px; padding: 5px 10px; border: 1px solid #dfaaa1; border-radius: 999px; color: var(--primary-dark); background: rgba(255,255,255,.68); font-size: .72rem; font-weight: 750; }
.btn-hero { color: #fff; background: var(--primary-gradient); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-actions p { margin: 0; color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 20px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, #fff, var(--tone-soft, #f1f3f6)); box-shadow: 0 8px 24px rgba(64,50,30,.055); transition: transform .18s ease, box-shadow .18s ease; }
.stat-card::after { content: ''; position: absolute; top: -35px; right: -35px; width: 90px; height: 90px; border-radius: 50%; background: var(--tone-soft, var(--primary-soft)); opacity: .8; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(64,50,30,.09); }
.stat-card > span { position: relative; z-index: 1; display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; color: var(--tone, var(--primary)); background: var(--tone-soft, var(--primary-soft)); }
.stat-card strong, .stat-card small { display: block; }
.stat-card strong { font-size: 1.7rem; line-height: 1; }
.stat-card small { margin-top: 6px; color: var(--muted); }

.content-grid { display: grid; gap: 20px; align-items: start; }
.content-grid.split { grid-template-columns: minmax(300px, .78fr) minmax(460px, 1.22fr); }
.content-grid.two-thirds { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.assessment-layout { grid-template-columns: minmax(320px, .72fr) minmax(520px, 1.45fr); }
.assessment-detail { display: grid; gap: 20px; }
.card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.card-header h2 { margin: 0; font-size: 1.08rem; }
.card-header .eyebrow + h2 { margin-top: 3px; }
.count-chip { display: inline-grid; min-width: 30px; min-height: 26px; place-items: center; padding: 2px 8px; border-radius: 999px; color: var(--primary); background: var(--primary-soft); font-size: .8rem; font-weight: 800; }
.narrow-card { width: min(650px, 100%); margin: 18px auto; padding-bottom: 4px; }
.narrow-card > p, .narrow-card > form { margin-right: 22px; margin-left: 22px; }
.muted { color: var(--muted); }

.btn { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 0; border-radius: 10px; font-weight: 750; cursor: pointer; transition: .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .65; cursor: wait; transform: none; }
.btn-primary { color: #fff; background: var(--primary); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { color: var(--primary-dark); border: 1px solid #e4aaa1; background: linear-gradient(135deg, #fff, var(--primary-soft)); box-shadow: 0 4px 12px rgba(165,47,35,.08); }
.btn-secondary:hover { border-color: #d97869; background: var(--primary-soft); }
.btn-ghost { color: #656d78; border: 1px solid #d8dde4; background: #fff; }
.btn-ghost:hover { color: var(--primary-dark); border-color: #e2aaa1; background: #fff; }
.btn-block { width: 100%; }
.text-link { color: var(--primary); font-weight: 750; }

.alert { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; padding: 12px 15px; border: 1px solid; border-radius: 12px; transition: opacity .2s ease, transform .2s ease; }
.alert.is-dismissing { opacity: 0; transform: translateY(-5px); }
.alert > span { flex: 1; }
.alert button { border: 0; color: inherit; background: none; font-size: 1.25rem; cursor: pointer; }
.alert-success { color: #176046; border-color: #a9d9c7; background: #ebf8f2; }
.alert-error { color: #8f2537; border-color: #e5b3bc; background: #fff0f3; }
.alert-warning { color: #7c5314; border-color: #ead2a4; background: #fff8e9; }
.alert-info { color: #24567f; border-color: #b7d2ea; background: #eef7ff; }

.form-stack { display: grid; gap: 16px; padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: .68rem; font-weight: 500; line-height: 1.4; }
label { display: grid; gap: 7px; color: #344054; font-size: .85rem; font-weight: 700; }
.field-caption { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; gap: 6px; }
.field-help { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; }
.field-help-trigger { display: inline-grid; width: 18px; height: 18px; place-items: center; color: #50677f; border: 1px solid #b9c8d7; border-radius: 50%; background: #f7fafc; font-size: .67rem; font-weight: 900; line-height: 1; cursor: help; transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease; }
.field-help-trigger:hover, .field-help-trigger:focus-visible, .field-help.is-open .field-help-trigger { color: #fff; border-color: #bd513f; background: #d05a47; outline: none; transform: translateY(-1px); }
.field-help-tooltip { position: absolute; top: calc(100% + 9px); left: -10px; z-index: 240; display: grid; width: min(320px, calc(100vw - 40px)); gap: 5px; padding: 11px 12px; visibility: hidden; color: #eaf2f8; border: 1px solid rgba(255,255,255,.13); border-radius: 11px; background: #24384c; box-shadow: 0 14px 34px rgba(20,35,49,.24); font-size: .72rem; font-weight: 500; line-height: 1.5; opacity: 0; pointer-events: none; transform: translateY(-5px) scale(.98); transform-origin: top left; transition: opacity .14s ease, visibility .14s ease, transform .14s ease; }
.field-help-tooltip::after { position: absolute; bottom: 100%; left: 14px; border: 6px solid transparent; border-bottom-color: #24384c; content: ''; }
.field-help-tooltip strong { color: #fff; font-size: .75rem; font-weight: 850; }
.field-help-tooltip > span { display: block; }
.field-help:hover .field-help-tooltip, .field-help:focus-within .field-help-tooltip, .field-help.is-open .field-help-tooltip { visibility: visible; opacity: 1; transform: translateY(0) scale(1); }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #cfd8e4; border-radius: 9px; outline: none; color: var(--text); background: #fff; transition: .15s ease; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #d86a59; box-shadow: 0 0 0 3px rgba(192,57,43,.14); }
input:disabled, select:disabled { color: #6d7887; background: #f1f4f7; }
fieldset { margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
legend { padding: 0 7px; font-weight: 800; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-weight: 600; }
.check-row input { width: 17px; min-height: 17px; margin-top: 2px; flex: 0 0 auto; }
.check-row strong, .check-row small { display: block; }
.check-row small { color: var(--muted); font-family: ui-monospace, monospace; font-weight: 500; }
.form-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
.permission-groups { display: grid; gap: 12px; }
.searchable-select { position: relative; }
.searchable-select-native { position: absolute; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; opacity: 0; pointer-events: none; }
.searchable-select-input { min-height: 42px; padding-right: 38px !important; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23687986' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat right 12px center !important; }
.searchable-select:focus-within .searchable-select-input { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
.searchable-select.is-disabled { opacity: .62; }
.searchable-select-menu { position: absolute; z-index: 30; top: calc(100% + 5px); right: 0; left: 0; max-height: 270px; padding: 6px; overflow-y: auto; border: 1px solid #d8e2e4; border-radius: 11px; background: #fff; box-shadow: 0 14px 30px rgba(45,58,67,.18); }
.searchable-select-option { display: block; width: 100%; padding: 9px 10px; overflow: hidden; border: 0; border-radius: 8px; color: var(--text); background: transparent; cursor: pointer; font-size: .78rem; font-weight: 650; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.searchable-select-option:hover, .searchable-select-option[aria-selected='true'] { color: var(--primary-dark); background: var(--primary-soft); }
.searchable-select-empty, .searchable-select-hint { margin: 4px; padding: 7px 8px; color: var(--muted); font-size: .7rem; line-height: 1.35; }

.record-list { display: grid; padding: 9px; }
.record-item { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 11px; border: 1px solid transparent; border-radius: 11px; }
.record-item:hover { background: var(--surface-soft); }
.record-item.active { border-color: var(--tone, #df9185); background: var(--tone-soft, var(--primary-soft)); box-shadow: inset 3px 0 var(--tone, var(--primary)); }
.record-item > span:nth-child(2) { min-width: 0; flex: 1; }
.record-item strong, .record-item small { display: block; }
.record-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-item small { color: var(--muted); font-size: .76rem; }
.avatar { display: inline-grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #123c3a; background: #d9b65f; font-weight: 850; }
.avatar-soft { color: var(--tone, var(--primary)); background: var(--tone-soft, var(--primary-soft)); }
.avatar.has-image, .account-hero-avatar.has-image, .avatar-preview-image.has-image { overflow: hidden; padding: 0; background: #e3f4ed; }
.avatar img, .account-hero-avatar img, .avatar-preview-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.date-tile { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-content: center; border-radius: 10px; color: var(--tone, var(--primary)); background: var(--tone-soft, var(--primary-soft)); text-align: center; }
.date-tile strong { line-height: 1; }
.date-tile small { font-size: .65rem; }
.management-list-card { width: 100%; overflow: hidden; }
.management-record-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 12px; }
.management-record-list .record-item { min-height: 66px; border-color: var(--border); background: #fff; transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease; }
.management-record-list .record-item:hover { border-color: color-mix(in srgb, var(--tone, var(--primary)) 42%, var(--border)); background: var(--tone-soft, var(--primary-soft)); box-shadow: 0 8px 20px rgba(58,68,82,.07); transform: translateY(-1px); }
.record-modal-trigger { cursor: pointer; }
.record-modal-trigger.is-loading { opacity: .62; pointer-events: none; }
.record-modal-trigger.is-loading::after { content: ''; width: 15px; height: 15px; flex: 0 0 auto; border: 2px solid #f1d0cb; border-top-color: var(--tone, var(--primary)); border-radius: 50%; animation: spin .7s linear infinite; }
.record-open-hint { display: inline-flex; flex: 0 0 auto !important; align-items: center; gap: 5px; color: var(--tone, var(--primary)); }
.record-open-hint .icon { width: 15px; height: 15px; }
.record-open-hint small { font-size: .68rem; font-weight: 750; }
.clickable-row, .clickable-card { cursor: pointer; }
.clickable-row:hover { background: #f1f3f6; }
.clickable-row:focus-visible, .clickable-card:focus-visible, .record-modal-trigger:focus-visible { outline: 3px solid rgba(192,57,43,.22); outline-offset: -3px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); background: var(--surface-soft); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
td a { color: var(--primary); font-weight: 750; }
td code { font-size: .75rem; white-space: normal; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.status-scheduled { color: #376080; background: #eaf3fb; }
.status-in_progress, .status-active { color: #7b5415; background: #fff4d8; }
.status-completed { color: #176046; background: #e6f6ee; }
.status-cancelled, .status-ended { color: #8f3543; background: #fdecef; }
.status-list { display: grid; gap: 4px; padding: 14px 20px 20px; }
.status-list > div { display: flex; align-items: center; justify-content: space-between; padding: 11px 3px; border-bottom: 1px solid var(--border); }
.status-list span { display: flex; align-items: center; gap: 9px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #91a0b4; }
.status-dot.status-in_progress { background: #d99b2b; }
.status-dot.status-completed { background: #2e9b74; }
.status-dot.status-cancelled { background: #c74b5e; }

.details { display: grid; gap: 0; margin: 0; padding: 10px 22px 22px; }
.details > div { display: grid; grid-template-columns: 150px 1fr; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 700; }
.empty-state { display: grid; min-height: 160px; place-items: center; align-content: center; gap: 7px; padding: 28px; color: var(--muted); text-align: center; }
.empty-state .icon { width: 30px; height: 30px; color: #9aa7b7; }
.empty-state h3, .empty-state p { margin: 0; }
.empty-inline { display: grid; min-height: 105px; place-items: center; align-content: center; gap: 6px; margin: 16px 22px; padding: 16px; border: 1px dashed #d8cdbd; border-radius: 11px; color: var(--muted); background: var(--surface-soft); text-align: center; }
.empty-inline p { margin: 0; }

.notice { display: flex; gap: 10px; margin: 17px 22px; padding: 12px 14px; border: 1px solid #c7dceb; border-radius: 11px; color: #35586f; background: #f0f8fd; }
.notice p { margin: 0; }
.notice-safe { color: #286152; border-color: #b8dacf; background: #eff9f5; }
.result-grid, .resource-list { display: grid; gap: 11px; padding: 0 22px 20px; }
.result-card { display: flex; gap: 13px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.result-card > div { min-width: 0; }
.result-card strong, .result-card small { display: block; }
.result-card small { color: var(--muted); }
.result-card p { margin: 8px 0; }
.inline-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.inline-actions form { margin: 0; }
.btn-link-danger { padding: 0; border: 0; color: var(--danger); background: transparent; font-weight: 750; cursor: pointer; }
.btn-danger { color: #fff; background: var(--danger); }
.btn-danger-light { color: var(--danger); border: 1px solid #efc5c1; background: #fff5f4; }
.btn-danger-light:hover { border-color: #df9e98; background: #ffebe9; }
.file-icon { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.resource-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; transition: .15s ease; }
.resource-card:hover { border-color: #8bc2bb; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(23,107,99,.08); }
.resource-card > span:first-child { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.resource-card > div { min-width: 0; flex: 1; }
.resource-card strong, .resource-card small { display: block; }
.resource-card small, .resource-card > span:last-child { color: var(--muted); font-size: .75rem; }
.resource-entry { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; }
.resource-entry .resource-card { border: 0; border-radius: 0; }
.resource-actions { border-top: 1px solid var(--border); background: var(--surface-soft); }
.resource-actions summary { padding: 9px 14px; color: var(--primary); font-size: .78rem; font-weight: 750; cursor: pointer; }
.delete-form { display: flex; justify-content: flex-end; padding: 0 22px 18px; }
.form-disclosure { margin: 0 22px 22px; border: 1px solid var(--border); border-radius: 12px; }
.form-disclosure summary { display: flex; align-items: center; gap: 8px; padding: 13px 15px; color: var(--primary); font-weight: 800; cursor: pointer; }
.form-disclosure[open] summary { border-bottom: 1px solid var(--border); }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: calc(22px + var(--safe-area-top)) 22px calc(22px + var(--safe-area-bottom)); background: linear-gradient(160deg, #f6f7f9, #eef1f5); }
.login-card { width: min(450px, 100%); padding: 32px; border: 1px solid rgba(255,255,255,.8); border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 12px 40px rgba(16,24,40,.08); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.login-brand strong { font-size: 1.3rem; }
.login-brand small { color: var(--muted); font-size: .7rem; }
.login-copy h1 { margin: 5px 0; font-size: 1.75rem; }
.login-copy > p:last-child { margin: 0 0 18px; color: var(--muted); }
.login-card .form-stack { padding: 0; }
.login-card .form-errors { margin: 0; font-size: .9rem; line-height: 1.45; }
.login-remember { display: flex; align-items: center; gap: 10px; padding: 2px 0; cursor: pointer; }
.login-remember input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--primary); }
.login-remember strong, .login-remember small { display: block; }
.login-remember strong { font-size: .8rem; }
.login-remember small { margin-top: 2px; color: var(--muted); font-size: .66rem; font-weight: 500; }
.login-aac { margin-top: 20px; }
.login-aac > span { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.login-aac > span::before, .login-aac > span::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.login-aac-btn { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid var(--brand-logo); border-radius: 14px; color: #fff; background: var(--brand-logo); box-shadow: 0 6px 18px rgba(134,14,38,.25); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.login-aac-btn:hover { background: #6d0b1f; border-color: #6d0b1f; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(134,14,38,.32); }
.login-aac-btn:focus-visible { outline: 3px solid rgba(134,14,38,.35); outline-offset: 2px; }
.login-aac-btn .icon, .login-aac-btn svg { width: 28px; height: 28px; flex: 0 0 auto; padding: 8px; box-sizing: content-box; border-radius: 12px; background: rgba(255,255,255,.18); }
.login-aac-btn strong, .login-aac-btn small { display: block; }
.login-aac-btn strong { font-size: 1rem; }
.login-aac-btn small { margin-top: 1px; color: rgba(255,255,255,.82); font-size: .74rem; }
.login-note { margin: 18px 0 0; color: var(--muted); font-size: .75rem; text-align: center; }
.login-footer { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: .75rem; line-height: 1.6; text-align: center; }
.login-footer p { margin: 0; }
.login-footer p + p { margin-top: 4px; }
.login-footer strong { font-weight: 600; }
.login-footer a { color: inherit; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 3px; }
.login-footer a:hover { color: var(--brand-logo); }
.login-footer a:focus-visible { outline: 2px solid var(--brand-logo); outline-offset: 3px; border-radius: 2px; }
.error-card { padding: 35px; text-align: center; }
.error-card > * { margin-right: auto; margin-left: auto; }
.error-icon { width: 46px; height: 46px; color: var(--danger); }
.error-code { display: block; color: var(--primary); font-size: 4rem; line-height: 1; }
.feature-icon { width: 28px; height: 28px; color: var(--primary); }

/* Functional color system */
.tone-overview, [data-tone="overview"] { --tone: #c0392b; --tone-soft: #fdf0ee; --nav-tint: rgba(192,57,43,.19); }
.tone-student, [data-tone="student"] { --tone: #3478d4; --tone-soft: #eaf3ff; --nav-tint: rgba(52,120,212,.19); }
.tone-teacher, [data-tone="teacher"] { --tone: #8055c7; --tone-soft: #f2ecff; --nav-tint: rgba(128,85,199,.19); }
.tone-assignment, [data-tone="assignment"] { --tone: #168a82; --tone-soft: #e7f8f6; --nav-tint: rgba(22,138,130,.19); }
.tone-assessment, [data-tone="assessment"] { --tone: #d17a19; --tone-soft: #fff2df; --nav-tint: rgba(209,122,25,.2); }
.tone-result { --tone: #2d9167; --tone-soft: #e8f7f0; --nav-tint: rgba(45,145,103,.18); }
.tone-resource { --tone: #168ca5; --tone-soft: #e7f8fb; --nav-tint: rgba(22,140,165,.18); }
.tone-health { --tone: #2d9167; --tone-soft: #e8f7f0; --nav-tint: rgba(45,145,103,.18); }
.tone-incident { --tone: #b74747; --tone-soft: #fff0f0; --nav-tint: rgba(183,71,71,.18); }
.tone-learning { --tone: #8055c7; --tone-soft: #f2ecff; --nav-tint: rgba(128,85,199,.19); }
.tone-document { --tone: #168ca5; --tone-soft: #e7f8fb; --nav-tint: rgba(22,140,165,.18); }
.tone-account, [data-tone="account"] { --tone: #5264c7; --tone-soft: #edf0ff; --nav-tint: rgba(82,100,199,.19); }
.tone-guardian, [data-tone="guardian"] { --tone: #c45e7b; --tone-soft: #fff0f4; --nav-tint: rgba(196,94,123,.19); }
.tone-role, [data-tone="role"] { --tone: #c0392b; --tone-soft: #fdf0ee; --nav-tint: rgba(192,57,43,.19); }
.tone-audit, [data-tone="audit"] { --tone: #60758b; --tone-soft: #edf2f6; --nav-tint: rgba(96,117,139,.2); }
.tone-staff, [data-tone="staff"] { --tone: #9b6c35; --tone-soft: #f8f0e6; --nav-tint: rgba(155,108,53,.19); }
.tone-card { border-top: 3px solid var(--tone, var(--primary)); }
.tone-card .count-chip { color: var(--tone, var(--primary)); background: var(--tone-soft, var(--primary-soft)); }
.heading-with-icon { display: flex; align-items: center; gap: 11px; }
.heading-with-icon > span, .topbar-feature { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--tone, var(--primary)); background: var(--tone-soft, var(--primary-soft)); }
.topbar-feature { width: 38px; height: 38px; }
.heading-with-icon h2 { margin: 2px 0 0; }
.avatar.tone-student, .avatar.tone-teacher, .avatar.tone-assignment, .avatar.tone-assessment, .avatar.tone-result, .avatar.tone-resource, .avatar.tone-account, .avatar.tone-role, .avatar.tone-audit, .avatar.tone-staff,
.date-tile.tone-assessment, .file-icon.tone-result, .modal-icon, .empty-icon, .role-card-icon { color: var(--tone); background: var(--tone-soft); }
.th-icon { display: inline-flex; color: var(--tone); }

/* Toolbars, previews and denser data views */
.list-toolbar { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.search-box { position: relative; display: block; width: min(440px, 100%); min-width: 0; border: 1px solid var(--search-border); border-radius: 10px; background: var(--search-surface); transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.search-box .icon { position: absolute; top: 50%; left: 13px; z-index: 1; width: 17px; height: 17px; color: var(--muted); pointer-events: none; transform: translateY(-50%); }
.search-box input { min-height: 42px; padding: 10px 12px 10px 40px; border: 0; border-radius: inherit; background: transparent; box-shadow: none; font-size: .84rem; }
.search-box.is-loading input { padding-right: 38px; }
.search-box.is-loading input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-box.is-loading::after { content: ''; position: absolute; top: 50%; right: 13px; width: 14px; height: 14px; margin-top: -7px; border: 2px solid var(--search-border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
.search-empty, .search-empty-row td { color: var(--muted); text-align: center; }
.search-empty { display: grid; min-height: 130px; place-content: center; gap: 4px; padding: 24px; }
.search-empty strong, .search-empty small, .search-empty-row span, .search-empty-row small { display: block; }
.search-empty-row td { padding: 34px 18px; background: #f6f7f9; }
.search-empty-row span { color: var(--text); font-weight: 750; }
.search-empty-row small { margin-top: 4px; }
.detail-card { overflow: hidden; }
.detail-empty { min-height: 390px; }
.empty-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 17px; }
.empty-icon .icon { width: 26px; height: 26px; }
.profile-heading { display: flex; align-items: center; gap: 13px; }
.profile-heading h2, .profile-heading small { display: block; margin: 0; }
.profile-heading small { color: var(--muted); }
.avatar-large { width: 50px; height: 50px; border-radius: 15px; font-size: 1.05rem; }
.avatar-large .icon { width: 23px; height: 23px; }
.branch-list-banner { width: 100%; height: 100%; object-fit: cover; }
.branch-banner-preview { display: block; width: calc(100% - 44px); max-height: 210px; margin: 18px 22px 0; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 14px; }
.details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.details-grid > div { grid-template-columns: 1fr; gap: 4px; }
.details dt { display: flex; align-items: center; gap: 7px; }
.details dt .icon { width: 14px; height: 14px; color: var(--primary); }
.detail-note { margin: 0 22px 22px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.detail-note strong { display: flex; align-items: center; gap: 7px; }
.detail-note p { margin: 7px 0 0; color: var(--muted); }
.header-actions, .summary-actions, .inline-actions, .resource-controls, .chip-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.table-person { display: flex; align-items: center; gap: 10px; }
.table-person strong, .table-person small { display: block; }
.table-person small { color: var(--muted); }
.soft-chip { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; color: #714b46; background: #e8f5f0; font-size: .69rem; font-weight: 750; }
.table-action { display: inline-flex; min-width: 34px; min-height: 34px; align-items: center; justify-content: center; gap: 5px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); background: #fff; cursor: pointer; transition: .15s ease; }
.table-action:hover { color: var(--primary-dark); border-color: #e2aaa1; background: var(--primary-soft); }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.role-card { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: start; padding: 17px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(145deg, #fff, var(--surface-soft)); }
.role-card-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: var(--role-color, var(--primary)); background: var(--role-soft, var(--primary-soft)); }
.role-card h3, .role-card p { margin: 0; }
.role-card p { margin-top: 5px; color: var(--muted); }
.role-card small { display: flex; align-items: center; gap: 5px; margin-top: 9px; color: var(--muted); }
.role-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.role-icon-picker { margin: 4px 0 2px; padding: 0; border: 0; }
.role-icon-picker > legend { margin-bottom: 9px; font-size: .78rem; font-weight: 800; }
.role-icon-picker > div { display: grid; grid-template-columns: repeat(8, minmax(70px, 1fr)); gap: 7px; }
.role-icon-picker label { position: relative; display: grid; justify-items: center; gap: 5px; padding: 9px 5px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; }
.role-icon-picker input { position: absolute; opacity: 0; }
.role-icon-picker label:has(input:checked) { color: var(--role-color, var(--primary-dark)); border-color: var(--role-color, var(--primary)); background: var(--role-soft, var(--primary-soft)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--role-color, var(--primary)) 18%, transparent); }
.role-icon-picker label > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: var(--role-color, var(--primary)); background: var(--role-soft, var(--primary-soft)); }
.role-icon-picker small { font-size: .58rem; text-align: center; }
.permission-row { grid-template-columns: auto auto minmax(0, 1fr); }
.permission-group { --permission-color: #3478d4; --permission-soft: #eaf3ff; border-color: color-mix(in srgb, var(--permission-color) 24%, var(--border)); }
.permission-group legend { display: inline-flex; align-items: center; gap: 6px; color: var(--permission-color); }
.permission-group-icon, .permission-icon { display: grid; width: 30px; height: 30px; place-items: center; color: var(--permission-color); border-radius: 8px; background: var(--permission-soft); }
.permission-group-icon { width: 26px; height: 26px; }
.permission-row { padding: 7px; border: 1px solid transparent; border-radius: 10px; transition: .15s ease; }
.permission-row:hover, .permission-row:has(input:checked) { border-color: color-mix(in srgb, var(--permission-color) 25%, var(--border)); background: var(--permission-soft); }
.sensitive-permission-row { border-color: #efc1c5; background: #fff7f7; }
.critical-warning { display: flex; align-items: flex-start; gap: 10px; color: #8f3038; border: 1px solid #e8b7bb; border-radius: 11px; background: #fff0f1; }
.critical-warning > .icon { flex: 0 0 auto; margin-top: 2px; }
.critical-warning p { margin: 0; line-height: 1.55; }
.sensitive-confirmation-modal .critical-warning { padding: 12px 13px; }
.permission-icon .icon { width: 15px; height: 15px; }
.permission-tone-blue { --permission-color: #3478d4; --permission-soft: #eaf3ff; }
.permission-tone-teal { --permission-color: #087f75; --permission-soft: #e4f7f4; }
.permission-tone-amber { --permission-color: #b77413; --permission-soft: #fff3dd; }
.permission-tone-violet { --permission-color: #7651b8; --permission-soft: #f1ebfc; }
.permission-tone-rose { --permission-color: #c1527a; --permission-soft: #fdebf2; }
.permission-tone-orange { --permission-color: #c76a1c; --permission-soft: #fff0e1; }
.permission-tone-indigo { --permission-color: #4f63bf; --permission-soft: #ebefff; }
.permission-tone-green { --permission-color: #21845f; --permission-soft: #e7f6ef; }
.permission-tone-cyan { --permission-color: #16899e; --permission-soft: #e5f7fa; }
.permission-tone-brown { --permission-color: #9b6c35; --permission-soft: #f8f0e6; }
.permission-tone-red { --permission-color: #bd4053; --permission-soft: #fdecef; }
/* Permission editor: one permission per row, read top to bottom; the code sits under the label for reference. */
.permission-groups .check-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.permission-group { padding: 12px 14px 10px; }
.permission-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 10px; }
.permission-row > span:last-child { display: grid; min-width: 0; gap: 1px; }
.permission-row strong { font-size: .86rem; font-weight: 650; }
.permission-row small { font-family: "SFMono-Regular", Consolas, monospace; font-size: .72rem; color: var(--muted); }
.role-tone-blue { --role-color: #3478d4; --role-soft: #eaf3ff; }
.role-tone-teal { --role-color: #087f75; --role-soft: #e4f7f4; }
.role-tone-amber { --role-color: #b77413; --role-soft: #fff3dd; }
.role-tone-violet { --role-color: #7651b8; --role-soft: #f1ebfc; }
.role-tone-rose { --role-color: #c1527a; --role-soft: #fdebf2; }
.role-tone-orange { --role-color: #c76a1c; --role-soft: #fff0e1; }
.role-tone-indigo { --role-color: #4f63bf; --role-soft: #ebefff; }
.role-tone-green { --role-color: #21845f; --role-soft: #e7f6ef; }
.role-tone-cyan { --role-color: #16899e; --role-soft: #e5f7fa; }
.role-tone-red { --role-color: #bd4053; --role-soft: #fdecef; }
.assessment-summary { overflow: hidden; }
.assessment-summary-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 22px; }
.summary-strip { display: grid; grid-template-columns: .8fr 1fr 1.5fr; margin: 0; border-top: 1px solid var(--border); background: var(--surface-soft); }
.summary-strip > div { padding: 14px 18px; border-right: 1px solid var(--border); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .72rem; }
.summary-strip dd { margin: 4px 0 0; font-weight: 750; }
.status .icon { width: 12px; height: 12px; }
.resource-controls { justify-content: flex-end; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface-soft); }
.resource-controls form { margin: 0; }
.resource-controls .table-action span { font-size: .75rem; }
.file-drop { display: grid; min-height: 115px; place-items: center; align-content: center; gap: 5px; border: 1.5px dashed #dfa49a; border-radius: 12px; color: var(--primary-dark); background: var(--primary-cream); cursor: pointer; }
.file-drop .icon { width: 25px; height: 25px; }
.file-drop input { width: auto; min-height: 0; padding: 4px; border: 0; background: transparent; }

/* Audit log explorer */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.audit-intro { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 17px; align-items: center; margin-bottom: 18px; padding: 21px 23px; border: 1px solid #dce3e8; border-radius: 17px; background: linear-gradient(135deg, #fff 15%, #f6f9fb 100%); box-shadow: 0 9px 28px rgba(52,69,84,.06); }
.audit-intro-icon { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 16px; color: var(--tone); background: var(--tone-soft); }
.audit-intro-icon .icon { width: 25px; height: 25px; }
.audit-intro h2, .audit-intro p { margin: 0; }
.audit-intro h2 { margin-top: 3px; font-size: 1.28rem; }
.audit-intro > div:nth-child(2) > p:last-child { margin-top: 5px; color: var(--muted); }
.audit-intro-stats { display: flex; gap: 9px; }
.audit-intro-stats span { min-width: 102px; padding: 10px 13px; border: 1px solid #e2e8ed; border-radius: 12px; background: rgba(255,255,255,.78); text-align: center; }
.audit-intro-stats strong, .audit-intro-stats small { display: block; }
.audit-intro-stats strong { color: #42586d; font-size: 1.18rem; }
.audit-intro-stats small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.audit-console { overflow: hidden; }
.audit-filter-panel { position: relative; padding: 17px 18px 13px; border-bottom: 1px solid var(--border); background: #fff; }
.audit-search-row { display: flex; gap: 10px; align-items: center; }
.audit-search { max-width: none; flex: 1; }
.audit-search input { min-height: 42px; }
.audit-search-actions { display: flex; gap: 8px; }
.audit-search-actions .btn { min-height: 42px; white-space: nowrap; }
.audit-advanced-filters { margin-top: 8px; }
.audit-advanced-filters summary { display: inline-flex; min-height: 36px; align-items: center; gap: 7px; padding: 6px 4px; color: #586a7a; cursor: pointer; font-size: .76rem; font-weight: 700; list-style: none; }
.audit-advanced-filters summary::-webkit-details-marker { display: none; }
.audit-advanced-filters summary:hover { color: var(--primary-dark); }
.audit-advanced-filters summary > .icon { width: 15px; height: 15px; }
.audit-filter-chevron { width: 12px !important; height: 12px !important; transition: transform .15s ease; }
.audit-advanced-filters[open] .audit-filter-chevron { transform: rotate(90deg); }
.audit-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(145px, 1fr)); gap: 11px; margin: 8px 0 4px; }
.audit-filter-grid label { min-width: 0; }
.audit-filter-grid label > span { display: flex; align-items: center; gap: 6px; margin: 0 0 6px 2px; color: #586a7a; font-size: .72rem; font-weight: 750; }
.audit-filter-grid label > span .icon { width: 14px; height: 14px; color: var(--primary); }
.audit-filter-grid input, .audit-filter-grid select { min-height: 39px; padding: 8px 10px; background-color: #fff; }
.audit-filter-panel.is-loading::after { content: ''; position: absolute; right: 0; bottom: -1px; left: 0; z-index: 2; height: 2px; background: linear-gradient(90deg, transparent, var(--primary), transparent); animation: progress-slide 1s ease-in-out infinite; }
.audit-result-bar { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.audit-result-bar strong, .audit-result-bar span { display: block; }
.audit-result-bar > div > span { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.filter-active-badge { display: inline-flex !important; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; color: var(--primary-dark); background: var(--primary-soft); font-size: .7rem; font-weight: 750; }
.filter-active-badge .icon { width: 13px; height: 13px; }
.audit-table-wrap { width: 100%; max-width: 100%; contain: inline-size; transition: opacity .15s ease; }
.audit-table { min-width: 900px; table-layout: auto; }
.audit-table th { color: #607080; background: #f8fafb; }
.audit-table th .icon { width: 13px; height: 13px; margin-right: 4px; color: var(--tone); vertical-align: -2px; }
.audit-table td { vertical-align: middle; }
.audit-row { transition: background .14s ease; }
.audit-row:hover { background: #f1f3f6; }
.audit-row time { display: block; min-width: 116px; color: #314657; font-size: .76rem; font-weight: 750; }
.audit-detail-button { display: inline-flex; align-items: center; gap: 6px; }
.audit-detail-button span { display: none; }
.audit-request-id { display: block; margin-top: 3px; color: #929daa; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .63rem; }
.audit-actor { display: flex; min-width: 150px; align-items: center; gap: 9px; }
.audit-actor .avatar { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; }
.audit-actor strong, .audit-actor small { display: block; }
.audit-actor strong { font-size: .77rem; }
.audit-actor small { margin-top: 2px; color: var(--muted); font-size: .67rem; }
.audit-action { --event-color: #60758b; --event-soft: #edf2f6; display: flex; min-width: 205px; align-items: center; gap: 10px; }
.audit-action > span { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--event-color); background: var(--event-soft); }
.audit-action > span .icon { width: 16px; height: 16px; }
.audit-action strong, .audit-action small { display: block; }
.audit-action strong { color: #33495b; font-size: .77rem; }
.audit-action small { max-width: 230px; margin-top: 2px; overflow: hidden; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.audit-group-auth { --event-color: #3478d4; --event-soft: #eaf3ff; }
.audit-group-create { --event-color: #21845f; --event-soft: #e7f6ef; }
.audit-group-update { --event-color: #c07a1e; --event-soft: #fff3df; }
.audit-group-delete, .audit-group-error { --event-color: #bd4053; --event-soft: #fdecef; }
.audit-group-permission { --event-color: #8055c7; --event-soft: #f2ecff; }
.audit-group-assessment { --event-color: #d17a19; --event-soft: #fff2df; }
.audit-target { min-width: 115px; }
.audit-target strong, .audit-target code { display: block; }
.audit-target strong { color: #506476; font-size: .71rem; text-transform: capitalize; }
.audit-target code { max-width: 180px; margin-top: 3px; overflow: hidden; color: #7a8793; font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.audit-results { position: relative; }
[data-audit-results].is-loading { min-height: 150px; opacity: .55; pointer-events: none; }
[data-audit-results].is-loading::after { content: ''; position: absolute; top: 65px; left: 50%; width: 26px; height: 26px; border: 3px solid #e6edf1; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
.audit-empty { min-height: 280px; }
.paged-list-results { position: relative; transition: opacity .15s ease; }
.paged-list-results.is-loading { min-height: 140px; opacity: .55; pointer-events: none; }
.paged-list-results.is-loading::after { content: ''; position: absolute; top: 62px; left: 50%; z-index: 3; width: 25px; height: 25px; border: 3px solid #e8edf0; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
.list-result-bar { display: flex; min-height: 45px; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 18px; border-top: 1px solid var(--border); color: var(--muted); background: #fff; font-size: .7rem; }
.list-result-bar strong { color: #42586d; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-top: 1px solid var(--border); background: #fafbfc; }
.pagination a, .pagination > span, .pagination-pages > span { display: inline-flex; min-width: 35px; min-height: 35px; align-items: center; justify-content: center; gap: 5px; padding: 6px 10px; border: 1px solid #dde4e9; border-radius: 9px; color: #526779; background: #fff; font-size: .72rem; font-weight: 750; transition: .14s ease; }
.pagination a:hover { color: var(--primary-dark); border-color: #dfa49a; background: #fdf0ee; }
.pagination a.active { color: #fff; border-color: var(--primary); background: var(--primary-gradient); box-shadow: 0 5px 12px rgba(192,57,43,.22); }
.pagination .disabled { color: #a7b0b8; background: #f4f6f7; cursor: not-allowed; }
.pagination-pages { display: flex; gap: 6px; align-items: center; }
.pagination .icon { width: 13px; height: 13px; }
.pagination-prev-icon { transform: rotate(180deg); }
.audit-detail-body { gap: 19px; }
.audit-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.audit-detail-grid > div, .audit-metadata dl > div { padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); }
.audit-detail-grid dt, .audit-metadata dt { color: var(--muted); font-size: .68rem; font-weight: 750; }
.audit-detail-grid dd, .audit-metadata dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: .8rem; font-weight: 700; }
.audit-detail-grid code, .audit-metadata code { color: #40566a; white-space: pre-wrap; }
.audit-metadata h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: .9rem; }
.audit-metadata h3 .icon { width: 15px; height: 15px; color: var(--primary); }
.audit-metadata dl { display: grid; gap: 8px; margin: 0; }
.audit-metadata dl > div { display: grid; grid-template-columns: minmax(110px, .35fr) 1fr; gap: 12px; }

/* Modal system */
.modal { width: min(680px, calc(100vw - 28px)); max-height: min(88vh, 860px); padding: 0; overflow: hidden; border: 0; border-radius: 20px; color: var(--text); background: transparent; box-shadow: 0 30px 90px rgba(43,31,15,.27); }
.modal.modal-wide { width: min(940px, calc(100vw - 28px)); }
.modal.modal-record { width: min(760px, calc(100vw - 28px)); }
.modal.modal-record.modal-wide { width: min(1040px, calc(100vw - 28px)); }
.modal::backdrop { background: rgba(52,58,68,.36); backdrop-filter: blur(5px); }
.modal[open] { animation: modal-in .2s ease-out; }
.modal-shell { position: relative; display: flex; max-height: 88vh; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.65); border-radius: 20px; background: #fff; }
.modal-header { display: flex; align-items: center; gap: 12px; padding: 19px 21px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #fff, #fdf0ee); }
.modal-header > div { min-width: 0; flex: 1; }
.modal-header h2 { margin: 2px 0 0; font-size: 1.17rem; }
.modal-subtitle { display: block; margin-top: 2px; color: var(--muted); font-size: .73rem; }
.modal-icon { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 13px; }
.modal-close { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; }
.modal-close:hover { color: var(--text); background: #e8f5f0; }
.modal-form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.modal-body { display: grid; min-height: 0; flex: 1; gap: 16px; padding: 21px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 21px; border-top: 1px solid var(--border); background: var(--surface-soft); }
.modal-details { padding: 0; }
.record-edit-section { display: grid; gap: 16px; padding: 2px; }
.assessment-modal-body { align-content: start; }
.modal-subsection { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.modal-subsection-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 17px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #fff, var(--tone-soft, var(--surface-soft))); }
.modal-subsection-header h3, .modal-subsection-header p { margin: 0; }
.modal-subsection-header h3 { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: .95rem; }
.modal-subsection .notice { margin: 14px 16px; }
.modal-subsection .result-grid, .modal-subsection .resource-list { padding: 0 16px 16px; }
.modal-subsection .empty-inline { margin: 14px 16px 16px; }
.btn-ghost-light { color: #625b51; border: 1px solid var(--border); background: #fff; }
.form-errors { margin: 16px 21px 0; padding: 10px 12px; border: 1px solid #e6b5bd; border-radius: 10px; color: #932f40; background: #fff0f3; font-size: .82rem; }
.is-invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(183,59,76,.1) !important; }
.field-error { color: var(--danger); font-weight: 650; }
.button-spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.42); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
body.modal-open { overflow: hidden; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* AJAX progress, skeleton and toasts */
.ajax-progress { position: fixed; top: 0; right: 0; left: var(--sidebar); z-index: 100; height: 3px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .15s; }
.ajax-progress span { display: block; width: 35%; height: 100%; background: linear-gradient(90deg, #f2b9b0, #c0392b, #f7d4cf); animation: progress-slide 1s ease-in-out infinite; }
.ajax-progress.active { opacity: 1; }
@keyframes progress-slide { from { transform: translateX(-110%); } to { transform: translateX(390%); } }
.page-content { position: relative; }
.page-content.is-loading { min-height: 240px; }
.page-content.is-loading::after { content: ''; position: absolute; inset: 8px 18px auto; z-index: 12; height: 170px; border-radius: 16px; background: linear-gradient(100deg, rgba(255,255,255,.45) 20%, rgba(255,244,223,.96) 40%, rgba(255,255,255,.45) 60%); background-size: 220% 100%; box-shadow: 0 20px 60px rgba(58,43,22,.08); animation: shimmer 1.1s linear infinite; }
@keyframes shimmer { to { background-position-x: -220%; } }
.toast-stack { position: fixed; top: calc(18px + var(--safe-area-top)); right: 20px; z-index: 200; display: grid; width: min(390px, calc(100vw - 32px)); gap: 10px; pointer-events: none; }
.toast { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 13px; overflow: hidden; border: 1px solid var(--border); border-left: 4px solid #718096; border-radius: 13px; opacity: 0; background: rgba(255,255,255,.97); box-shadow: 0 16px 45px rgba(45,34,20,.16); transform: translateY(-10px); transition: .2s ease; pointer-events: auto; }
.toast.show { opacity: 1; transform: none; }
.toast.show::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; transform-origin: left; background: currentColor; opacity: .35; animation: toast-countdown var(--toast-duration, 4s) linear forwards; }
@keyframes toast-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: #d39428; }
.toast-info { border-left-color: #3685bb; }
.toast-symbol { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: #fff; background: #718096; font-weight: 900; }
.toast-success .toast-symbol { background: var(--success); }
.toast-error .toast-symbol { background: var(--danger); }
.toast-warning .toast-symbol { background: #d39428; }
.toast-info .toast-symbol { background: #3685bb; }
.toast-close { border: 0; color: var(--muted); background: transparent; font-size: 1.15rem; cursor: pointer; }
.toast-stack-modal { position: absolute; top: 12px; right: 12px; z-index: 20; width: min(390px, calc(100% - 24px)); }

/* Account menu and personal settings */
.sidebar-user { color: var(--text); border-radius: 12px; transition: background .15s ease; }
.sidebar-user:hover { background: #f1f3f6; }
.account-menu { position: relative; flex: 0 0 auto; }
.account-menu summary { display: flex; min-width: 190px; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 13px; list-style: none; background: #fff; cursor: pointer; box-shadow: 0 4px 15px rgba(55,63,75,.05); }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary > span:nth-child(2) { min-width: 0; flex: 1; }
.account-menu summary strong, .account-menu summary small { display: block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu summary strong { font-size: .78rem; }
.account-menu summary small { color: var(--muted); font-size: .67rem; }
.account-menu-chevron { width: 13px; height: 13px; transform: rotate(90deg); transition: transform .15s ease; }
.account-menu[open] .account-menu-chevron { transform: rotate(-90deg); }
.account-dropdown { position: absolute; top: calc(100% + 9px); right: 0; z-index: 80; width: 260px; padding: 8px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.99); box-shadow: 0 20px 50px rgba(43,48,58,.16); animation: modal-in .14s ease; }
.account-dropdown-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; padding: 10px; border-bottom: 1px solid var(--border); }
.account-dropdown-head strong, .account-dropdown-head small { display: block; }
.account-dropdown-head small { color: var(--muted); font-size: .7rem; }
.account-dropdown a, .account-dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; color: #4d5c6b; background: transparent; text-align: left; cursor: pointer; }
.account-dropdown a:hover, .account-dropdown button:hover { color: var(--primary-dark); background: var(--primary-soft); }
.account-dropdown form { margin: 5px 0 0; padding-top: 5px; border-top: 1px solid var(--border); }
.account-dropdown form button { color: var(--danger); }
.account-hero { display: flex; align-items: center; gap: 17px; margin-bottom: 16px; padding: 22px 24px; border: 1px solid #e8c5bf; border-radius: 19px; background: radial-gradient(circle at 90% 0, rgba(255,255,255,.9), transparent 34%), linear-gradient(135deg, #fff, #fdf0ee); box-shadow: var(--shadow); }
.account-hero-avatar { display: grid; width: 62px; height: 62px; flex: 0 0 auto; place-items: center; border-radius: 18px; color: #fff; background: var(--primary-gradient); font-size: 1.35rem; font-weight: 850; box-shadow: 0 10px 22px rgba(192,57,43,.22); }
.account-hero > div { min-width: 0; flex: 1; }
.account-hero h2, .account-hero p { margin: 0; }
.account-hero h2 { margin-top: 3px; font-size: 1.35rem; }
.account-hero div > p:last-child { margin-top: 4px; color: var(--muted); }
.account-settings-rail { position: static; overflow: hidden; margin-bottom: 18px; padding: 9px; border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(46,56,68,.065); }
.account-settings-rail-header { display: flex; align-items: center; gap: 11px; margin-bottom: 6px; padding: 12px 11px 15px; border-bottom: 1px solid var(--border); }
.account-settings-rail-header > span { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--primary-dark); background: var(--primary-soft); }
.account-settings-rail-header .icon { width: 18px; height: 18px; }
.account-settings-rail-header p { margin: 0; }
.account-settings-rail-header strong { display: block; margin-top: 2px; font-size: .84rem; }
.account-tabs { display: grid; gap: 5px; }
.account-tabs a { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; min-width: 0; min-height: 62px; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid transparent; border-radius: 12px; color: #596877; transition: .15s ease; }
.account-tab-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: var(--tone, #60758b); background: var(--tone-soft, #edf2f6); transition: .15s ease; }
.account-tab-icon .icon { width: 18px; height: 18px; }
.account-tab-copy { min-width: 0; }
.account-tab-copy strong, .account-tab-copy small { display: block; }
.account-tab-copy strong { font-size: .78rem; }
.account-tab-copy small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: .61rem; font-weight: 560; line-height: 1.35; text-overflow: ellipsis; }
.account-tab-chevron { width: 13px; height: 13px; color: #a2abb3; transition: transform .15s ease; }
.account-tabs a:hover { color: var(--tone, #60758b); border-color: color-mix(in srgb, var(--tone, #60758b) 18%, var(--border)); background: var(--tone-soft, #edf2f6); transform: translateX(2px); }
.account-tabs a:hover .account-tab-chevron { color: var(--tone, #60758b); transform: translateX(2px); }
.account-tabs a.active { color: var(--tone, #60758b); border-color: color-mix(in srgb, var(--tone, #60758b) 24%, var(--border)); background: var(--tone-soft, #edf2f6); box-shadow: inset 3px 0 var(--tone, #60758b), 0 6px 16px color-mix(in srgb, var(--tone, #60758b) 10%, transparent); }
.account-tabs a.active .account-tab-icon { color: #fff; background: var(--tone, #60758b); box-shadow: 0 5px 12px color-mix(in srgb, var(--tone, #60758b) 22%, transparent); }
.account-tabs a.active .account-tab-chevron { color: var(--tone, #60758b); }
.account-settings-rail-footer { display: flex; align-items: center; gap: 9px; margin: 8px 4px 3px; padding: 10px; border-radius: 11px; color: #277453; background: #edf8f3; }
.account-settings-rail-footer > .icon { width: 17px; height: 17px; flex: 0 0 auto; }
.account-settings-rail-footer strong, .account-settings-rail-footer small { display: block; }
.account-settings-rail-footer strong { font-size: .68rem; }
.account-settings-rail-footer small { margin-top: 1px; color: #5d7a6d; font-size: .58rem; }
.account-subpage-header { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 12px; align-items: center; margin-bottom: 18px; padding: 15px 18px; border: 1px solid color-mix(in srgb, var(--tone, #60758b) 22%, var(--border)); border-radius: 17px; background: radial-gradient(circle at 92% 0, var(--tone-soft, #edf2f6), transparent 42%), #fff; box-shadow: 0 9px 26px rgba(46,56,68,.06); animation: panel-in .16s ease; }
.account-subpage-back { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: #596877; background: #fff; box-shadow: 0 4px 12px rgba(46,56,68,.06); transition: .15s ease; }
.account-subpage-back:hover { color: var(--tone, #60758b); border-color: color-mix(in srgb, var(--tone, #60758b) 32%, var(--border)); background: var(--tone-soft, #edf2f6); transform: translateX(-2px); }
.account-subpage-back .icon { width: 19px; height: 19px; }
.account-subpage-icon { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 13px; color: #fff; background: var(--tone, #60758b); box-shadow: 0 7px 16px color-mix(in srgb, var(--tone, #60758b) 22%, transparent); }
.account-subpage-icon .icon { width: 21px; height: 21px; }
.account-subpage-header h2, .account-subpage-header p { margin: 0; }
.account-subpage-header h2 { margin-top: 2px; font-size: 1.12rem; }
.account-subpage-header div > p:last-child { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.account-tab-panels { min-width: 0; }
.account-panel { animation: panel-in .16s ease; }
.account-grid { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(420px, 1.15fr); gap: 17px; align-items: start; }
.account-details { display: grid; gap: 0; margin: 0; padding: 8px 22px 14px; }
.account-details > div { display: grid; grid-template-columns: minmax(120px, .42fr) 1fr; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.account-details dt { color: var(--muted); }
.account-details dd { margin: 0; font-weight: 720; }
.account-readonly-note { margin-top: 0; }
.account-form-card .account-form { padding-top: 19px; }
.avatar-manager { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; margin: 18px 22px 4px; padding: 15px; border: 1px solid #efd1cc; border-radius: 14px; background: linear-gradient(135deg, #f6f7f9, #fdf0ee); }
.avatar-preview { grid-row: 1 / 3; }
.avatar-preview-image { display: grid; width: 72px; height: 72px; place-items: center; overflow: hidden; border: 3px solid #fff; border-radius: 20px; color: #fff; background: var(--primary-gradient); font-size: 1.35rem; font-weight: 850; box-shadow: 0 8px 18px rgba(137,54,44,.16); }
.avatar-manager-copy { min-width: 0; }
.avatar-manager-copy strong, .avatar-manager-copy small, .avatar-manager-copy span { display: block; }
.avatar-manager-copy small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.avatar-manager-copy span { margin-top: 5px; overflow: hidden; color: var(--primary-dark); font-size: .72rem; font-weight: 730; text-overflow: ellipsis; white-space: nowrap; }
.avatar-upload-form { display: flex; min-width: 0; align-items: center; gap: 8px; }
.avatar-upload-form .form-errors { flex: 1 0 100%; }
.avatar-manager-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-manager-actions .btn, .avatar-remove-form .btn { min-height: 35px; padding: 7px 10px; font-size: .72rem; }
.avatar-remove-form { grid-column: 3; grid-row: 1 / 3; margin: 0; }
.security-state { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; color: var(--success); background: #e8f7f0; font-size: .69rem; font-weight: 800; }
.security-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 19px 22px; }
.security-facts > div { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.security-facts > div > span { grid-row: 1 / 3; display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; color: var(--tone, var(--primary)); background: var(--tone-soft, var(--primary-soft)); }
.security-facts dt { color: var(--muted); font-size: .68rem; }
.security-facts dd { margin: 0; font-size: .78rem; font-weight: 760; }
.account-security-actions { display: flex; justify-content: flex-end; padding: 0 22px 21px; }
.current-session { display: flex; align-items: center; gap: 12px; margin: 20px 22px 0; padding: 15px; border: 1px solid #b9decf; border-radius: 12px; background: #eefaf5; }
.current-session > span { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--success); background: #dff4eb; }
.current-session strong, .current-session small { display: block; }
.current-session small { margin-top: 3px; color: var(--muted); }
.account-notification-card, .account-appearance-card { max-width: 960px; margin: 0 auto; }
.maintenance-settings-card { margin-bottom: 18px; }
.maintenance-settings-card .status-danger { color: #9f2d35; border-color: #efc1c5; background: #fff0f1; }
.maintenance-warning { color: #8b343b; border-color: #edc0c4; background: #fff3f4; }
.notification-options { display: grid; gap: 0; padding: 0 22px 22px; }
.setting-toggle { display: flex; grid-template-columns: none; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 2px; border-bottom: 1px solid var(--border); }
.setting-toggle strong, .setting-toggle small { display: block; }
.setting-toggle small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.setting-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.setting-toggle i { position: relative; width: 42px; height: 23px; flex: 0 0 auto; border-radius: 999px; background: #d8dfe5; }
.setting-toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.16); }
.setting-toggle input:checked + i { background: var(--success); }
.setting-toggle input:checked + i::after { left: 22px; }
.preference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 10px 22px 6px; }
.preference-grid label > span { display: flex; align-items: center; gap: 7px; }
.account-appearance-card > .muted { margin: 18px 22px 6px; }
.account-appearance-card > .form-actions { padding: 16px 22px 22px; }
.password-field { position: relative; }
.password-field input { padding-right: 46px; }
.password-field button { position: absolute; top: 50%; right: 5px; display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; transform: translateY(-50%); }
.password-field button:hover { color: var(--primary-dark); background: var(--primary-soft); }
body.density-compact .record-item { padding-top: 7px; padding-bottom: 7px; }
body.density-compact th, body.density-compact td { padding-top: 9px; padding-bottom: 9px; }
body.density-compact .management-record-list .record-item { min-height: 54px; }

.maintenance-state { display: grid; width: min(720px, 100%); min-height: 430px; place-items: center; align-content: center; gap: 13px; margin: clamp(20px, 7vh, 72px) auto; padding: clamp(30px, 6vw, 64px); border: 1px solid #ead8c5; border-radius: 24px; background: radial-gradient(circle at 50% 0, #fff8e9 0, #fff 48%); box-shadow: 0 22px 65px rgba(73, 50, 27, .1); text-align: center; }
.maintenance-state h2, .maintenance-state p { margin: 0; }
.maintenance-state h2 { font-size: clamp(1.55rem, 4vw, 2.25rem); }
.maintenance-state > p:not(.eyebrow) { max-width: 570px; color: var(--muted); line-height: 1.7; }
.maintenance-illustration { position: relative; display: grid; width: 88px; height: 88px; place-items: center; margin-bottom: 6px; border-radius: 26px; color: #9a6428; background: #fff0cf; box-shadow: inset 0 0 0 1px #ebd4a9; }
.maintenance-illustration > span .icon { width: 43px; height: 43px; }
.maintenance-illustration > i { position: absolute; right: -8px; bottom: -7px; display: grid; width: 34px; height: 34px; place-items: center; border: 4px solid #fff; border-radius: 50%; color: #a13b42; background: #ffe1e3; }
.maintenance-illustration > i .icon { width: 17px; height: 17px; }
.maintenance-meta { display: flex; max-width: 520px; align-items: center; gap: 9px; margin: 7px 0 5px; padding: 11px 14px; border-radius: 11px; color: #596b69; background: #f2f7f6; font-size: .77rem; }
.maintenance-meta .icon { flex: 0 0 auto; }

/* Education Workspace shell */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.sidebar, .main, .ajax-progress { transition: width .2s ease, margin-left .2s ease, left .2s ease, transform .2s ease; }
.brand-copy { min-width: 0; }
.nav-section-label { margin: 18px 10px 5px; color: #9b8d78; font-size: .62rem; font-weight: 820; letter-spacing: .1em; text-transform: uppercase; }
.nav-section-label:first-child { margin-top: 4px; }
.nav-section-admin { margin-top: 22px; }
.sidebar-collapse { display: flex; width: 100%; min-height: 37px; align-items: center; justify-content: center; gap: 8px; margin: 16px 0 8px; border: 1px solid #ebdfcb; border-radius: 10px; color: #776d5f; background: rgba(255,255,255,.7); cursor: pointer; }
.sidebar-collapse:hover { color: var(--primary-dark); border-color: #dfa49a; background: #fff; }
.sidebar-collapse .icon { width: 14px; height: 14px; transform: rotate(180deg); transition: transform .2s ease; }
body.sidebar-collapsed .sidebar { width: 84px; padding-inline: 12px; }
body.sidebar-collapsed .main { margin-left: 84px; }
body.sidebar-collapsed .ajax-progress { left: 84px; }
body.sidebar-collapsed .brand { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .brand-copy, body.sidebar-collapsed .nav-label, body.sidebar-collapsed .nav-section-label, body.sidebar-collapsed .sidebar-collapse span, body.sidebar-collapsed .sidebar-user > div:last-child, body.sidebar-collapsed .sidebar-logout { display: none; }
body.sidebar-collapsed .nav a { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .nav-icon { width: 38px; height: 38px; }
body.sidebar-collapsed .sidebar-collapse .icon { transform: rotate(0); }
body.sidebar-collapsed .sidebar-user { justify-content: center; padding-inline: 0; }

.topbar-heading { min-width: 150px; }
.topbar-breadcrumb { display: flex; align-items: center; gap: 7px; margin: 0; color: #8b8172; font-size: .68rem; font-weight: 680; }
.topbar-breadcrumb a { color: var(--primary-dark); }
.global-search-trigger { display: flex; width: min(330px, 28vw); min-height: 42px; align-items: center; gap: 10px; padding: 8px 10px 8px 13px; border: 1px solid var(--search-border); border-radius: 10px; color: var(--muted); background: var(--surface); cursor: pointer; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.global-search-trigger:hover { color: var(--text); border-color: #bac3cd; background: var(--search-surface); }
.global-search-trigger > .icon { width: 17px; height: 17px; }
.global-search-trigger > span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-size: .82rem; }
.global-search-trigger kbd, .command-palette kbd { flex: 0 0 auto; padding: 3px 6px; border: 1px solid var(--search-border); border-radius: 5px; color: var(--muted); background: var(--search-surface); font: 500 .65rem/1.3 ui-monospace, monospace; }

body.command-open { overflow: hidden; }
.command-palette { --command-top: min(12dvh, 80px); width: min(660px, calc(100vw - 24px)); max-width: none; max-height: min(680px, calc(100dvh - var(--command-top) - 24px)); margin: var(--command-top) auto 0; padding: 0; overflow: hidden; border: 1px solid var(--search-border); border-radius: 16px; background: #fff; color: var(--text); box-shadow: 0 24px 80px rgba(27,36,48,.2); }
.command-palette::backdrop { background: rgba(27,36,48,.36); backdrop-filter: blur(3px); }
.command-shell { display: flex; max-height: min(680px, calc(100dvh - var(--command-top) - 24px)); flex-direction: column; }
.command-header, .command-input, .command-status, .command-footer { flex-shrink: 0; }
.command-header { display: flex; align-items: center; gap: 12px; padding: 20px 20px 0; background: #fff; }
.command-header > .icon { display: none; }
.command-header > div { min-width: 0; flex: 1; }
.command-header h2, .command-header small { display: block; margin: 0; }
.command-header h2 { font-size: 1rem; font-weight: 650; }
.command-header small { margin-top: 4px; color: var(--muted); font-size: .75rem; }
.command-header button { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; }
.command-header button:hover { color: var(--text); background: var(--search-surface); }
.command-input { position: relative; display: flex; align-items: center; gap: 12px; margin: 18px 20px 8px; padding: 0 14px; border: 1px solid var(--search-border); border-radius: 10px; background: var(--search-surface); transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.command-input > .icon { width: 19px; height: 19px; color: var(--muted); }
.command-input input { min-width: 0; min-height: 50px; flex: 1; padding: 12px 0; border: 0; border-radius: 0; background: transparent; font-size: .94rem; }
.command-clear { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; }
.command-clear:hover { color: var(--text); background: #edf0f3; }
.command-clear .icon { width: 14px; height: 14px; }
.command-input input::-webkit-search-cancel-button { -webkit-appearance: none; }
.command-status { min-height: 21px; margin: 0 22px 4px; color: var(--muted); font-size: .72rem; }
.command-status:empty { display: none; }
.command-status:not(:empty)::before { content: ''; display: inline-block; width: 11px; height: 11px; margin-right: 7px; vertical-align: -1px; border: 2px solid var(--search-border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
.command-results { min-height: 0; padding: 8px 16px 16px; overflow-y: auto; overscroll-behavior: contain; }
.command-results.is-loading { opacity: .7; }
.command-result-summary { display: flex; gap: 5px; padding: 5px 3px 11px; color: var(--muted); font-size: .73rem; }
.command-result-summary strong { color: var(--text); }
.command-group + .command-group { margin-top: 13px; }
.command-group > header { display: flex; align-items: center; gap: 8px; padding: 0 4px 6px; color: var(--muted); }
.command-group > header > span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; background: var(--tone-soft, var(--primary-soft)); }
.command-group > header .icon { width: 14px; height: 14px; }
.command-group > header strong { flex: 1; font-size: .75rem; font-weight: 600; }
.command-group > header small { display: grid; min-width: 23px; height: 23px; place-items: center; border-radius: 999px; background: var(--tone-soft, var(--primary-soft)); font-weight: 800; }
.command-group > div { display: grid; gap: 4px; }
.command-group a { display: flex; align-items: center; gap: 11px; padding: 11px 10px; border: 1px solid transparent; border-radius: 8px; transition: background-color .12s ease, border-color .12s ease; }
.command-group a:hover, .command-group a:focus { border-color: var(--search-border); outline: 0; background: var(--search-surface); }
.command-group a:focus-visible { border-color: var(--primary); box-shadow: inset 3px 0 var(--primary); }
.command-group a strong { font-size: .86rem; font-weight: 600; }
.command-result-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--tone, var(--primary)); background: var(--tone-soft, var(--primary-soft)); }
.command-group a > span:nth-child(2) { min-width: 0; flex: 1; }
.command-group a strong, .command-group a small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-group a small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.command-group a > .icon { width: 14px; height: 14px; color: #aaa095; }
.command-empty { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 8px; padding: 28px 20px; color: var(--muted); text-align: center; }
.command-empty > span { display: grid; width: 48px; height: 48px; margin-bottom: 4px; place-items: center; border-radius: 50%; color: var(--muted); background: var(--search-surface); }
.command-empty > span .icon { width: 23px; height: 23px; }
.command-empty strong { color: var(--text); font-size: .9rem; font-weight: 600; }
.command-empty small { max-width: 380px; font-size: .78rem; }
.command-footer { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--search-border); color: var(--muted); background: #fff; font-size: .7rem; }
.command-footer span { display: inline-flex; align-items: center; gap: 4px; }

/* Workspace dashboard */
.workspace-hero { align-items: stretch; padding: 32px 36px; }
.workspace-hero-copy { align-self: center; }
.workspace-health { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.workspace-health span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid rgba(164,114,31,.16); border-radius: 999px; color: #6f5630; background: rgba(255,255,255,.57); font-size: .7rem; font-weight: 740; }
.workspace-health .icon { width: 14px; height: 14px; color: var(--primary-dark); }
.topbar-presence { position: relative; flex: 0 0 auto; }
.topbar-presence > summary { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 6px 11px 6px 8px; color: #31594a; border: 1px solid rgba(34,139,94,.18); border-radius: 12px; background: rgba(255,255,255,.82); cursor: pointer; list-style: none; box-shadow: 0 4px 15px rgba(55,63,75,.04); transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.topbar-presence > summary::-webkit-details-marker { display: none; }
.topbar-presence:hover > summary, .topbar-presence:focus-within > summary, .topbar-presence[open] > summary { border-color: rgba(34,139,94,.36); background: #fff; box-shadow: 0 8px 22px rgba(32,104,77,.1); transform: translateY(-1px); }
.topbar-presence-symbol { position: relative; display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; color: #16734b; background: #e1f7eb; }
.topbar-presence-symbol .icon { width: 16px; height: 16px; }
.topbar-presence-symbol i { position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #22ad69; box-shadow: 0 0 0 2px rgba(34,173,105,.12); }
.topbar-presence-label { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.topbar-presence-label strong { color: #116943; font-size: .88rem; font-variant-numeric: tabular-nums; }
.topbar-presence-label small { color: #71847b; font-size: .67rem; font-weight: 700; }
.topbar-presence-popover { position: absolute; top: calc(100% + 9px); right: 0; z-index: 60; width: min(330px, calc(100vw - 28px)); overflow: hidden; visibility: hidden; opacity: 0; border: 1px solid #dce8e2; border-radius: 16px; background: rgba(255,255,255,.98); box-shadow: 0 20px 50px rgba(37,60,51,.17); transform: translateY(-6px) scale(.985); transform-origin: top right; transition: opacity .16s ease, visibility .16s ease, transform .16s ease; }
.topbar-presence:hover .topbar-presence-popover, .topbar-presence:focus-within .topbar-presence-popover, .topbar-presence[open] .topbar-presence-popover { visibility: visible; opacity: 1; transform: translateY(0) scale(1); }
.topbar-presence-popover::before { position: absolute; top: 0; right: 25px; width: 36px; height: 3px; border-radius: 0 0 3px 3px; background: #28a86c; content: ''; }
.topbar-presence-popover > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 16px 12px; }
.topbar-presence-popover > header span { display: grid; gap: 1px; }
.topbar-presence-popover > header strong { color: var(--text); font-size: .84rem; }
.topbar-presence-popover > header small { color: var(--muted); font-size: .65rem; }
.topbar-presence-popover > header b { display: grid; min-width: 28px; height: 28px; place-items: center; padding-inline: 7px; color: #14734a; border-radius: 9px; background: #e6f8ee; font-size: .76rem; }
.online-user-list { display: grid; max-height: 280px; overflow: auto; border-top: 1px solid rgba(34,139,94,.1); }
.online-user-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 13px; border-bottom: 1px solid rgba(34,139,94,.09); }
.online-user-item:last-child { border-bottom: 0; }
.online-user-avatar { position: relative; display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #317e63, #63af8e); font-size: .78rem; font-weight: 800; }
.online-user-avatar i { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #21b36b; }
.online-user-item > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.online-user-item strong, .online-user-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-user-item strong { color: var(--text); font-size: .78rem; }
.online-user-item small { color: var(--muted); font-size: .68rem; }
.online-user-item em { display: inline-flex; align-items: center; gap: 4px; color: #168054; font-size: .63rem; font-style: normal; font-weight: 750; }
.online-user-item em::before { width: 6px; height: 6px; border-radius: 50%; background: #22ad69; content: ''; }
.hero-quick-actions { display: grid; min-width: 205px; align-content: center; gap: 8px; padding: 17px; border: 1px solid rgba(255,255,255,.66); border-radius: 17px; background: rgba(255,255,255,.42); box-shadow: inset 0 1px rgba(255,255,255,.7); backdrop-filter: blur(7px); }
.hero-quick-actions > small { margin-bottom: 2px; color: #786541; font-size: .65rem; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }
.hero-quick-actions .btn { width: 100%; justify-content: flex-start; }
.btn-hero-soft { color: #684b1d; border: 1px solid rgba(175,121,33,.22); background: rgba(255,255,255,.74); }
.btn-hero-soft:hover { background: #fff; box-shadow: 0 8px 20px rgba(90,62,23,.09); }
.workspace-stat-grid .stat-card { color: inherit; }
.workspace-stat-grid .stat-card > div { min-width: 0; flex: 1; }
.workspace-stat-grid .stat-card em { display: flex; align-items: center; gap: 4px; margin-top: 10px; color: var(--tone, var(--primary)); font-size: .66rem; font-style: normal; font-weight: 760; }
.workspace-stat-grid .stat-card em .icon { width: 12px; height: 12px; }
.dashboard-analytics-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr); gap: 18px; margin-bottom: 18px; }
.workspace-chart { display: grid; grid-template-columns: repeat(6, minmax(42px, 1fr)); gap: 13px; height: 260px; padding: 25px 22px 18px; }
.chart-column { display: grid; grid-template-rows: 20px minmax(100px, 1fr) auto; gap: 6px; text-align: center; }
.chart-value { color: var(--text); font-size: .72rem; font-weight: 820; }
.chart-column > div { position: relative; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border-radius: 9px; background: repeating-linear-gradient(to top, #e5f3ed 0 1px, transparent 1px 25%); }
.chart-column i { width: min(40px, 68%); min-height: 7px; border-radius: 9px 9px 4px 4px; background: linear-gradient(180deg, #d8574a, #a52f23); box-shadow: 0 7px 16px rgba(192,57,43,.22); animation: chart-rise .55s ease both; }
.chart-height-1 { height: 10%; } .chart-height-2 { height: 20%; } .chart-height-3 { height: 30%; } .chart-height-4 { height: 40%; } .chart-height-5 { height: 50%; }
.chart-height-6 { height: 60%; } .chart-height-7 { height: 70%; } .chart-height-8 { height: 80%; } .chart-height-9 { height: 90%; } .chart-height-10 { height: 100%; }
.chart-column small { color: var(--muted); font-size: .66rem; }
@keyframes chart-rise { from { height: 0; opacity: .2; } }
.completion-overview { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 24px 22px; }
.completion-ring { display: grid; width: 132px; height: 132px; place-items: center; border-radius: 50%; background: #edf0ec; box-shadow: inset 0 0 0 1px rgba(41,113,83,.05); }
.completion-1 { background: conic-gradient(var(--success) 10%, #edf0ec 0); } .completion-2 { background: conic-gradient(var(--success) 20%, #edf0ec 0); }
.completion-3 { background: conic-gradient(var(--success) 30%, #edf0ec 0); } .completion-4 { background: conic-gradient(var(--success) 40%, #edf0ec 0); }
.completion-5 { background: conic-gradient(var(--success) 50%, #edf0ec 0); } .completion-6 { background: conic-gradient(var(--success) 60%, #edf0ec 0); }
.completion-7 { background: conic-gradient(var(--success) 70%, #edf0ec 0); } .completion-8 { background: conic-gradient(var(--success) 80%, #edf0ec 0); }
.completion-9 { background: conic-gradient(var(--success) 90%, #edf0ec 0); } .completion-10 { background: conic-gradient(var(--success) 100%, #edf0ec 0); }
.completion-ring::before { content: ''; grid-area: 1 / 1; width: 96px; height: 96px; border-radius: 50%; background: #fff; box-shadow: 0 3px 12px rgba(42,54,63,.08); }
.completion-ring > span { z-index: 1; grid-area: 1 / 1; text-align: center; }
.completion-ring strong, .completion-ring small { display: block; }
.completion-ring strong { font-size: 1.55rem; }
.completion-ring small { color: var(--muted); font-size: .64rem; }
.compact-status-list { padding: 0; }
.compact-status-list div { padding: 9px 0; }
.dashboard-work-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .8fr); gap: 18px; margin-bottom: 18px; }
.workspace-timeline { display: grid; padding: 8px 18px 17px; }
.workspace-timeline > a { position: relative; display: flex; align-items: center; gap: 13px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.workspace-timeline > a:last-child { border-bottom: 0; }
.workspace-timeline > a::before { content: ''; position: absolute; left: 22px; bottom: -9px; width: 1px; height: 17px; background: #e5d6bc; }
.workspace-timeline > a:last-child::before { display: none; }
.workspace-timeline time { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-content: center; border-radius: 13px; color: var(--primary-dark); background: var(--primary-soft); text-align: center; }
.workspace-timeline time strong, .workspace-timeline time small { display: block; line-height: 1.05; }
.workspace-timeline time small { margin-top: 3px; font-size: .6rem; }
.workspace-timeline > a > span:nth-child(2) { min-width: 0; flex: 1; }
.workspace-timeline > a > span:nth-child(2) strong, .workspace-timeline > a > span:nth-child(2) small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-timeline > a > span:nth-child(2) small { color: var(--muted); font-size: .72rem; }
.attention-list { display: grid; gap: 9px; padding: 16px; }
.attention-item { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.attention-item:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(52,60,70,.06); }
.attention-item > span:first-child { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--success); background: #e9f6f0; }
.attention-item.is-warning > span:first-child { color: #a46813; background: #fff1d9; }
.attention-item.is-info > span:first-child { color: #27648f; background: #eaf4fb; }
.attention-item > div { min-width: 0; flex: 1; }
.attention-item strong, .attention-item small { display: block; }
.attention-item small { margin-top: 2px; color: var(--muted); font-size: .67rem; }
.attention-item > .icon { width: 14px; height: 14px; color: #aaa095; }
.dashboard-recent-card { overflow: hidden; }
.workspace-table tbody tr { transition: background .12s ease; }
.workspace-table tbody tr:hover { background: #f1f3f6; }
.table-date { color: #65717d; font-variant-numeric: tabular-nums; }

/* Education command center */
.command-hero { position: relative; display: grid; min-width: 0; min-height: 340px; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); gap: 24px; margin-bottom: 18px; padding: 34px 38px; overflow: hidden; border: 1px solid #eadcc8; border-radius: 24px; background: radial-gradient(circle at 82% 20%, rgba(255,255,255,.9), transparent 27%), radial-gradient(circle at 18% 110%, rgba(45,145,103,.16), transparent 35%), linear-gradient(135deg, #fffdf8 0%, #f8f2e8 54%, #f1eadc 100%); box-shadow: 0 20px 55px rgba(77,63,40,.09); isolation: isolate; }
.command-hero > * { min-width: 0; }
.command-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .38; background-image: linear-gradient(rgba(133,108,69,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(133,108,69,.07) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(90deg, #000, transparent 72%); }
.command-hero::after { content: none; }
.command-hero-copy { position: relative; z-index: 2; width: 100%; min-width: 0; max-width: 720px; align-self: center; }
.command-hero-topline { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 9px; margin-bottom: 20px; }
.command-hero .hero-kicker { margin: 0; }
.command-hero .eyebrow { color: #927143; }
.command-hero h2 { max-width: 720px; margin: 4px 0 10px; overflow-wrap: anywhere; color: #263f36; font-size: clamp(1.75rem, 2.5vw, 2.55rem); line-height: 1.12; letter-spacing: -.035em; }
.command-hero-copy > p:last-of-type { max-width: 650px; margin: 0; color: #68746d; font-size: .92rem; line-height: 1.7; }
.system-live { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; color: #287657; border: 1px solid rgba(45,145,103,.18); border-radius: 999px; background: rgba(255,255,255,.72); font-size: .63rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.system-live i { width: 7px; height: 7px; border-radius: 50%; background: #35a873; box-shadow: 0 0 0 4px rgba(53,168,115,.13); animation: live-pulse 2.2s ease-in-out infinite; }
.command-hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.command-hero-actions .btn { min-height: 40px; }
.command-hero .workspace-health { margin-top: 17px; }

.education-orbit { position: relative; min-height: 270px; align-self: center; perspective: 900px; transform-style: preserve-3d; }
.orbit-glow { position: absolute; top: 50%; left: 50%; width: 250px; height: 130px; border-radius: 50%; background: rgba(201,155,76,.22); filter: blur(24px); transform: translate(-50%, -35%); }
.orbit-platform { position: absolute; top: 50%; left: 50%; width: 225px; height: 225px; border: 1px solid rgba(94,118,103,.16); border-radius: 36px; transform: translate(-50%, -50%) rotateX(66deg) rotateZ(45deg); transform-style: preserve-3d; }
.platform-back { background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(220,232,223,.72)); box-shadow: 22px 26px 35px rgba(68,74,55,.15); }
.platform-front { width: 170px; height: 170px; border-color: rgba(45,145,103,.17); background: repeating-linear-gradient(0deg, rgba(45,145,103,.04) 0 1px, transparent 1px 25px), repeating-linear-gradient(90deg, rgba(45,145,103,.04) 0 1px, transparent 1px 25px); }
.orbit-building { position: absolute; top: 78px; left: 50%; z-index: 4; display: grid; width: 92px; height: 100px; grid-template-columns: 1fr 1fr; gap: 8px; padding: 18px 14px; border-radius: 16px 16px 9px 9px; background: linear-gradient(135deg, #467e69, #214e3e); box-shadow: 16px 20px 28px rgba(42,69,56,.24); transform: translateX(-50%) rotateY(-8deg); transform-style: preserve-3d; }
.orbit-building::before { content: ''; position: absolute; top: -24px; right: 8px; left: 8px; height: 45px; border-radius: 8px 8px 3px 3px; background: linear-gradient(135deg, #f3c66d, #d39a34); clip-path: polygon(50% 0, 100% 53%, 87% 53%, 87% 100%, 13% 100%, 13% 53%, 0 53%); }
.orbit-building::after { content: ''; position: absolute; top: 13px; right: -14px; width: 14px; height: 82px; border-radius: 0 6px 6px 0; background: #183c31; transform: skewY(-35deg); transform-origin: left top; }
.orbit-building i { border-radius: 4px; background: rgba(255,239,180,.92); box-shadow: 0 0 12px rgba(255,210,112,.38); }
.orbit-building span { position: absolute; right: 0; bottom: 8px; left: 0; color: #fff; font-size: .64rem; font-weight: 900; letter-spacing: .12em; text-align: center; }
.orbit-node { position: absolute; z-index: 6; display: grid; width: 51px; height: 51px; place-items: center; color: var(--node-color, #2d9167); border: 1px solid rgba(255,255,255,.9); border-radius: 16px; background: rgba(255,255,255,.92); box-shadow: 0 12px 26px rgba(55,65,57,.15), inset 0 0 0 1px var(--node-soft, #e8f7f0); backdrop-filter: blur(8px); animation: orbit-float 4s ease-in-out infinite; }
.orbit-node .icon { width: 22px; height: 22px; }
.orbit-node small { position: absolute; top: calc(100% + 5px); padding: 3px 7px; color: #59665f; border-radius: 999px; background: rgba(255,255,255,.84); font-size: .55rem; font-weight: 800; white-space: nowrap; }
.node-student { --node-color: #3478d4; --node-soft: #eaf3ff; top: 24px; left: 16px; }
.node-teacher { --node-color: #8055c7; --node-soft: #f2ecff; top: 20px; right: 21px; animation-delay: -.9s; }
.node-guardian { --node-color: #c45e7b; --node-soft: #fff0f4; right: 5px; bottom: 24px; animation-delay: -1.8s; }
.node-assessment { --node-color: #d17a19; --node-soft: #fff2df; bottom: 20px; left: 20px; animation-delay: -2.7s; }
.orbit-link { position: absolute; z-index: 2; top: 50%; left: 50%; width: 122px; height: 1px; background: linear-gradient(90deg, rgba(45,145,103,.65), rgba(45,145,103,.05)); transform-origin: left center; }
.link-student { transform: rotate(-140deg); }.link-teacher { transform: rotate(-39deg); }.link-guardian { transform: rotate(41deg); }
.orbit-pulse { position: absolute; z-index: 1; top: 50%; left: 50%; width: 112px; height: 112px; border: 1px solid rgba(45,145,103,.22); border-radius: 50%; transform: translate(-50%, -50%); animation: orbit-pulse 3s ease-out infinite; }
.pulse-two { animation-delay: -1.5s; }

.command-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.command-kpi-card { position: relative; display: grid; min-height: 206px; padding: 18px; overflow: hidden; color: var(--text); border: 1px solid color-mix(in srgb, var(--tone, var(--primary)) 16%, var(--border)); border-radius: 18px; background: linear-gradient(150deg, #fff 35%, color-mix(in srgb, var(--tone-soft, var(--primary-soft)) 62%, #fff)); box-shadow: 0 10px 30px rgba(50,62,57,.06); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.command-kpi-card:hover { color: var(--text); border-color: color-mix(in srgb, var(--tone, var(--primary)) 35%, var(--border)); box-shadow: 0 17px 38px rgba(50,62,57,.11); transform: translateY(-3px); }
.command-kpi-card header { display: flex; position: relative; z-index: 2; align-items: center; justify-content: space-between; }
.command-kpi-card header > span { display: grid; width: 42px; height: 42px; place-items: center; color: var(--tone, var(--primary)); border-radius: 13px; background: var(--tone-soft, var(--primary-soft)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.85); }
.command-kpi-card header .icon { width: 20px; height: 20px; }
.command-kpi-card header em { padding: 5px 8px; color: #67736d; border-radius: 999px; background: #f0f3f1; font-size: .64rem; font-style: normal; font-weight: 850; }
.command-kpi-card header em.is-up, .command-kpi-card header em.is-new { color: #267a58; background: #e6f6ee; }
.command-kpi-card header em.is-down { color: #aa4c40; background: #fff0ee; }
.command-kpi-value { position: relative; z-index: 2; margin-top: 13px; }
.command-kpi-value strong, .command-kpi-value small { display: block; }
.command-kpi-value strong { font-size: 2rem; line-height: 1; letter-spacing: -.035em; }
.command-kpi-value small { margin-top: 5px; color: #66736d; font-size: .7rem; font-weight: 700; }
.kpi-sparkline { position: absolute; right: 10px; bottom: 39px; left: 45%; width: calc(55% - 20px); height: 52px; overflow: visible; opacity: .72; }
.kpi-sparkline polyline { fill: none; stroke: var(--tone, var(--primary)); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; vector-effect: non-scaling-stroke; }
.command-kpi-card footer { display: flex; position: relative; z-index: 2; align-items: flex-end; align-self: end; justify-content: space-between; gap: 8px; margin-top: 19px; padding-top: 11px; border-top: 1px solid rgba(113,124,117,.12); }
.command-kpi-card footer span { color: var(--tone, var(--primary)); font-size: .66rem; font-weight: 820; }
.command-kpi-card footer small { color: var(--muted); font-size: .58rem; text-align: right; }

.command-analytics-grid { grid-template-columns: minmax(0, 1.7fr) minmax(310px, .8fr); }
.command-trend-card, .command-status-card { overflow: hidden; border-radius: 18px; }
.command-trend-card { display: flex; flex-direction: column; }
.command-card-header { flex-wrap: wrap; }
.dashboard-range { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); }
.dashboard-range a { padding: 7px 9px; color: var(--muted); border-radius: 7px; font-size: .65rem; font-weight: 800; }
.dashboard-range a:hover { color: var(--text); background: #fff; }
.dashboard-range a.active { color: #fff; background: #315f4e; box-shadow: 0 5px 12px rgba(49,95,78,.18); }
.trend-summary { display: flex; gap: 0; padding: 0 22px; }
.trend-summary > div { min-width: 0; padding: 12px 24px 8px 0; }
.trend-summary > div + div { padding-left: 24px; border-left: 1px solid var(--border); }
.trend-summary strong, .trend-summary span { display: block; }
.trend-summary strong { color: #2c463c; font-size: 1.15rem; }
.trend-summary span { margin-top: 2px; color: var(--muted); font-size: .62rem; }
.command-chart { display: flex; min-height: 245px; flex: 1; flex-direction: column; padding: 3px 18px 16px; }
.command-chart > svg { display: block; width: 100%; min-height: 205px; flex: 1; overflow: visible; }
.chart-grid-lines line { stroke: #e5ebe7; stroke-dasharray: 4 6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-area { fill: url(#assessmentArea); animation: chart-fade .6s ease both; }
.chart-line { fill: none; stroke: #d17a19; stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; vector-effect: non-scaling-stroke; animation: chart-fade .6s ease both; }
.chart-point { fill: #fff; stroke: #d17a19; stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart-month-labels { display: grid; grid-template-columns: repeat(var(--chart-columns, 6), minmax(0, 1fr)); gap: 4px; padding: 0 2px; color: var(--muted); font-size: .58rem; text-align: center; }
.chart-columns-3 { --chart-columns: 3; }.chart-columns-6 { --chart-columns: 6; }.chart-columns-12 { --chart-columns: 12; }
.command-completion-overview { grid-template-columns: 1fr; justify-items: center; padding-bottom: 16px; }
.command-status-card .completion-ring { width: 145px; height: 145px; box-shadow: 0 13px 30px rgba(45,145,103,.12); }
.command-status-card .completion-ring::before { width: 105px; height: 105px; }
.command-status-list { width: 100%; }
.command-status-list div { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
.command-status-list b { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 999px; background: #edf0ec; }
.command-status-list b i { display: block; height: 100%; border-radius: inherit; background: #5c8e7a; }
.status-width-0 { width: 0; }.status-width-1 { width: 10%; }.status-width-2 { width: 20%; }.status-width-3 { width: 30%; }.status-width-4 { width: 40%; }.status-width-5 { width: 50%; }
.status-width-6 { width: 60%; }.status-width-7 { width: 70%; }.status-width-8 { width: 80%; }.status-width-9 { width: 90%; }.status-width-10 { width: 100%; }
.status-insight { display: flex; align-items: center; gap: 10px; margin: 0 18px 18px; padding: 12px; color: #836019; border: 1px solid #f0dbb5; border-radius: 12px; background: #fff8e9; }
.status-insight > .icon { width: 19px; height: 19px; }
.status-insight strong, .status-insight small { display: block; }
.status-insight strong { font-size: .75rem; }.status-insight small { margin-top: 2px; font-size: .62rem; }
.command-work-grid { grid-template-columns: minmax(0, 1.5fr) minmax(330px, .75fr); }
.priority-count { display: grid; min-width: 30px; height: 30px; place-items: center; color: #a45c18; border-radius: 999px; background: #fff0d5; font-size: .72rem; font-weight: 850; }
.command-attention-card .attention-item { align-items: flex-start; background: #fff; }
.command-attention-card .attention-item em { display: flex; align-items: center; gap: 3px; margin-top: 8px; color: #657870; font-size: .61rem; font-style: normal; font-weight: 800; }
.command-attention-card .attention-item em .icon { width: 11px; height: 11px; }
.command-lead-overview { border-top: 0; border-radius: 18px; }
.command-lead-overview .dashboard-lead-grid > a { transition: background .16s ease, transform .16s ease; }
.command-lead-overview .dashboard-lead-grid > a:hover { z-index: 1; background: #fbf8ff; transform: translateY(-2px); }
.command-recent-card { border-radius: 18px; }

/* Recruitment action center */
.enrollment-command { position: relative; margin-bottom: 18px; overflow: hidden; color: #312b31; border: 1px solid #ead9e7; border-radius: 20px; background: linear-gradient(135deg, #fff 0%, #fdf9ff 55%, #fff7f2 100%); box-shadow: 0 14px 38px rgba(80,48,76,.075); }
.enrollment-command::before { content: ''; position: absolute; top: -90px; right: -70px; width: 250px; height: 250px; border-radius: 50%; background: radial-gradient(circle, rgba(192,57,43,.13), transparent 68%); pointer-events: none; }
.enrollment-command.has-urgent-calls { border-color: #ebc1b7; box-shadow: 0 14px 42px rgba(169,67,46,.11); }
.enrollment-command-header { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 20px; border-bottom: 1px solid #ede2eb; background: rgba(255,255,255,.72); }
.enrollment-command-header .heading-with-icon > span { color: #7d3fb2; background: #f4eaff; }
.enrollment-command-header h2 { margin: 2px 0 0; font-size: 1.08rem; }
.enrollment-command-header .heading-with-icon small { display: block; margin-top: 3px; color: #7a717d; font-size: .67rem; }
.enrollment-urgency { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 9px 12px; color: #9e3f32; border: 1px solid #f0c9c1; border-radius: 12px; background: #fff3f0; }
.enrollment-urgency > i { width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: #c0392b; box-shadow: 0 0 0 4px rgba(192,57,43,.14); animation: urgent-pulse 1.7s ease-in-out infinite; }
.enrollment-urgency strong, .enrollment-urgency small { display: block; }
.enrollment-urgency strong { font-size: .74rem; }.enrollment-urgency small { margin-top: 2px; color: #aa6259; font-size: .61rem; }
.enrollment-command-body { position: relative; display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(390px, .82fr); gap: 0; }
.enrollment-funnel-panel { padding: 18px 20px 20px; }
.enrollment-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.enrollment-panel-title strong, .enrollment-panel-title small { display: block; }
.enrollment-panel-title strong { font-size: .8rem; }.enrollment-panel-title small { margin-top: 2px; color: var(--muted); font-size: .61rem; }
.enrollment-panel-title em { padding: 6px 9px; color: #5d2f80; border-radius: 999px; background: #f3e8ff; font-size: .65rem; font-style: normal; font-weight: 850; }
.enrollment-funnel { display: grid; grid-template-columns: minmax(120px, 1.18fr) auto minmax(110px, 1fr) auto minmax(100px, .88fr) auto minmax(95px, .78fr); align-items: center; gap: 7px; }
.enrollment-funnel > i { color: #b7aabb; }.enrollment-funnel > i .icon { width: 14px; height: 14px; }
.funnel-stage { position: relative; display: grid; min-width: 0; grid-template-columns: auto 1fr; align-items: center; gap: 9px; padding: 12px; overflow: hidden; color: #423b46; border: 1px solid var(--funnel-border, #e7ddeb); border-radius: 13px; background: linear-gradient(145deg, #fff, var(--funnel-soft, #faf7fb)); transition: transform .16s ease, box-shadow .16s ease; }
.funnel-stage:hover { color: #423b46; box-shadow: 0 10px 22px rgba(81,60,84,.1); transform: translateY(-2px); }
.funnel-stage > span { display: grid; width: 34px; height: 34px; place-items: center; color: var(--funnel-color, #7d3fb2); border-radius: 10px; background: var(--funnel-soft, #f3e8ff); }
.funnel-stage > span .icon { width: 16px; height: 16px; }
.funnel-stage strong, .funnel-stage small { display: block; }.funnel-stage strong { font-size: 1.08rem; line-height: 1; }.funnel-stage small { margin-top: 4px; overflow: hidden; color: #786e7c; font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
.stage-total { --funnel-color: #3478d4; --funnel-soft: #eaf3ff; --funnel-border: #d8e7fb; }
.stage-engaged { --funnel-color: #7d3fb2; --funnel-soft: #f3e8ff; --funnel-border: #e4d5f2; }
.stage-follow { --funnel-color: #c16b16; --funnel-soft: #fff2df; --funnel-border: #f3ddbd; }
.stage-enrolled { --funnel-color: #22805a; --funnel-soft: #e6f6ee; --funnel-border: #cae9da; }
.enrollment-progress { display: grid; grid-template-columns: minmax(100px, .45fr) 1fr; align-items: center; gap: 12px; margin-top: 14px; }
.enrollment-progress > span { height: 7px; overflow: hidden; border-radius: 999px; background: #eee8ef; }
.enrollment-progress > span i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8d4bb9, #d17a19); }
.enrollment-progress small { color: #766d79; font-size: .63rem; }.enrollment-progress small b { color: #a34835; }
.conversion-width-0 { width: 0; }.conversion-width-1 { width: 10%; }.conversion-width-2 { width: 20%; }.conversion-width-3 { width: 30%; }.conversion-width-4 { width: 40%; }.conversion-width-5 { width: 50%; }
.conversion-width-6 { width: 60%; }.conversion-width-7 { width: 70%; }.conversion-width-8 { width: 80%; }.conversion-width-9 { width: 90%; }.conversion-width-10 { width: 100%; }
.call-mission-panel { padding: 17px; border-left: 1px solid #ede2eb; background: rgba(255,250,248,.78); }
.call-mission-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.call-mission-head > span { display: inline-flex; align-items: center; gap: 7px; color: #773d36; font-size: .73rem; }
.call-mission-head > span i { width: 7px; height: 7px; border-radius: 50%; background: #c0392b; box-shadow: 0 0 0 4px rgba(192,57,43,.1); }
.call-mission-head > a { display: inline-flex; align-items: center; gap: 3px; color: #8b574f; font-size: .6rem; font-weight: 800; }
.call-mission-head > a .icon { width: 11px; height: 11px; }
.call-mission-list { display: grid; gap: 7px; }
.call-mission-list article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid #eadedb; border-radius: 12px; background: #fff; }
.call-mission-list article.is-overdue { border-color: #efb7ac; background: #fff7f5; box-shadow: inset 3px 0 #c0392b; }
.call-mission-list time { display: grid; min-width: 47px; justify-items: center; padding: 6px; color: #85443a; border-radius: 9px; background: #fff0ec; font-size: .77rem; font-weight: 850; }
.call-mission-list time small { margin-top: 1px; font-size: .48rem; font-weight: 800; text-transform: uppercase; }
.call-mission-list article > div { min-width: 0; }.call-mission-list article > div strong, .call-mission-list article > div small, .call-mission-list article > div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-mission-list article > div strong { font-size: .72rem; }.call-mission-list article > div small { margin-top: 1px; color: var(--muted); font-size: .58rem; }.call-mission-list article > div span { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: #8b574f; font-size: .58rem; font-weight: 750; }.call-mission-list article > div span .icon { width: 11px; height: 11px; }
.call-now-button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 5px; padding: 7px 9px; color: #fff; border-radius: 9px; background: linear-gradient(135deg, #c0392b, #a93d31); box-shadow: 0 7px 14px rgba(176,61,47,.2); font-size: .6rem; font-weight: 850; }
.call-now-button:hover { color: #fff; transform: translateY(-1px); }.call-now-button .icon { width: 13px; height: 13px; }
.call-mission-empty { display: grid; min-height: 105px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px; border: 1px dashed #e5c8c1; border-radius: 12px; background: #fff; }
.call-mission-empty > .icon { color: #b05a4d; }.call-mission-empty strong, .call-mission-empty small { display: block; }.call-mission-empty strong { font-size: .72rem; }.call-mission-empty small { margin-top: 3px; color: var(--muted); font-size: .59rem; line-height: 1.4; }
.btn-call-now { color: #fff; background: linear-gradient(135deg, #c0392b, #a93d31); font-size: .62rem; }

/* Detailed CSS 3D campus */
.education-orbit { min-height: 300px; }
.campus-shadow { position: absolute; top: 58%; left: 50%; width: 310px; height: 110px; border-radius: 50%; background: rgba(54,67,56,.2); filter: blur(19px); transform: translate(-50%, -10%); }
.campus-ground { position: absolute; top: 51%; left: 50%; width: 330px; height: 225px; border: 1px solid rgba(255,255,255,.9); border-radius: 35px; background: linear-gradient(135deg, #f8fcf9 0 58%, #dce9df 58% 100%); box-shadow: 22px 30px 35px rgba(68,74,55,.18); transform: translate(-50%, -50%) rotateX(64deg) rotateZ(-2deg); }
.campus-ground::before { content: ''; position: absolute; inset: 14px; border: 1px solid rgba(67,126,101,.14); border-radius: 26px; background: linear-gradient(90deg, transparent 48%, rgba(210,164,84,.22) 48% 52%, transparent 52%); }
.campus-road { position: absolute; z-index: 2; top: 191px; left: 50%; width: 52px; height: 86px; background: linear-gradient(90deg, #d4d8d4, #eef1ee 45% 55%, #d4d8d4); clip-path: polygon(27% 0, 73% 0, 100% 100%, 0 100%); transform: translateX(-50%); }
.campus-main { position: absolute; z-index: 5; top: 88px; left: 50%; width: 112px; height: 112px; border-radius: 5px 5px 8px 8px; background: linear-gradient(90deg, #315f4e 0 78%, #244838 78%); box-shadow: 15px 18px 24px rgba(39,65,52,.22); transform: translateX(-50%); }
.campus-main .campus-roof { position: absolute; top: -34px; left: -9px; width: 130px; height: 42px; background: linear-gradient(135deg, #f3c66d, #d8982e); clip-path: polygon(50% 0, 100% 82%, 92% 100%, 8% 100%, 0 82%); filter: drop-shadow(7px 7px 6px rgba(92,65,23,.16)); }
.campus-main b { position: absolute; top: 13px; right: 0; left: 0; color: #fff4cc; font-size: .56rem; letter-spacing: .12em; text-align: center; }
.campus-main > i { position: absolute; top: 36px; width: 22px; height: 30px; border: 3px solid #d9efe6; border-radius: 3px; background: linear-gradient(90deg, #a6d0bf 47%, #d9efe6 47% 53%, #a6d0bf 53%); box-shadow: inset 0 0 8px rgba(255,255,255,.45); }
.campus-main > i:nth-of-type(1) { left: 16px; }.campus-main > i:nth-of-type(2) { right: 16px; }
.campus-main > em { position: absolute; bottom: 0; left: 42px; width: 29px; height: 36px; border-radius: 5px 5px 0 0; background: #f1c66d; box-shadow: inset -7px 0 rgba(158,103,27,.18); }
.campus-wing { position: absolute; z-index: 4; top: 126px; display: grid; width: 91px; height: 72px; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 14px; border-top: 8px solid #d9a444; border-radius: 4px 4px 7px 7px; background: linear-gradient(90deg, #f4ead2 0 82%, #d9c9aa 82%); box-shadow: 10px 14px 20px rgba(72,66,48,.16); }
.campus-wing-left { left: calc(50% - 141px); transform: skewY(-5deg); }.campus-wing-right { right: calc(50% - 141px); transform: skewY(5deg); }
.campus-wing i { border: 2px solid #6e9c8a; border-radius: 2px; background: #b9d8cc; box-shadow: inset 0 0 5px rgba(255,255,255,.6); }
.campus-yard { position: absolute; z-index: 6; top: 198px; left: 50%; width: 270px; height: 65px; transform: translateX(-50%); }
.campus-yard i { position: absolute; width: 18px; height: 27px; border-radius: 50% 50% 43% 43%; background: linear-gradient(135deg, #71a886, #397459); box-shadow: inset -5px -5px rgba(25,85,60,.12), 4px 7px 8px rgba(39,74,56,.13); }
.campus-yard i::after { content: ''; position: absolute; bottom: -7px; left: 8px; width: 3px; height: 9px; background: #85643b; }
.campus-yard i:nth-child(1) { left: 12px; top: 4px; }.campus-yard i:nth-child(2) { left: 48px; top: 26px; transform: scale(.8); }.campus-yard i:nth-child(3) { right: 12px; top: 4px; }.campus-yard i:nth-child(4) { right: 48px; top: 26px; transform: scale(.8); }
.education-orbit .orbit-node { display: flex; width: auto; min-width: 108px; height: 58px; align-items: center; justify-content: flex-start; gap: 8px; padding: 9px 11px; border-radius: 15px; }
.education-orbit .orbit-node > .icon { width: 21px; height: 21px; flex: 0 0 auto; }
.education-orbit .orbit-node > span { min-width: 0; }.education-orbit .orbit-node strong, .education-orbit .orbit-node small { display: block; position: static; padding: 0; background: transparent; white-space: nowrap; }.education-orbit .orbit-node strong { color: #263c34; font-size: .95rem; line-height: 1; }.education-orbit .orbit-node small { margin-top: 3px; color: #66736d; font-size: .54rem; }
.education-orbit .node-student { top: 4px; left: -2px; }.education-orbit .node-teacher { top: 4px; right: -4px; }.education-orbit .node-assignment { --node-color: #168ca5; --node-soft: #e7f8fb; right: -8px; bottom: 4px; animation-delay: -1.8s; }.education-orbit .node-assessment { bottom: 4px; left: -4px; animation-delay: -2.7s; }
.education-orbit .orbit-link { width: 155px; background: linear-gradient(90deg, rgba(58,116,91,.54), rgba(58,116,91,.03)); }
.education-orbit .link-student { transform: rotate(-143deg); }.education-orbit .link-teacher { transform: rotate(-37deg); }.education-orbit .link-assignment { transform: rotate(36deg); }.education-orbit .link-assessment { transform: rotate(143deg); }

/* Campus v2: layered miniature, depth and mobile-safe metric cards */
.education-orbit { overflow: hidden; border-radius: 24px; background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.72), transparent 38%), linear-gradient(180deg, rgba(235,247,241,.28), transparent 75%); transform-style: preserve-3d; }
.education-orbit::before { content: ''; position: absolute; top: 50%; left: 50%; width: 255px; height: 255px; border: 1px solid rgba(49,95,78,.08); border-radius: 50%; box-shadow: 0 0 0 28px rgba(49,95,78,.025), 0 0 0 58px rgba(49,95,78,.018); transform: translate(-50%, -50%) rotateX(66deg); }
.campus-model { position: absolute; inset: 0; z-index: 2; transform-style: preserve-3d; transition: transform .35s ease; animation: campus-breathe 5.5s ease-in-out infinite; }
.education-orbit:hover .campus-model { animation-play-state: paused; transform: translateY(-3px) rotateX(1deg) rotateY(-1.5deg); }
.campus-model .orbit-glow { width: 295px; height: 145px; background: radial-gradient(ellipse, rgba(223,177,91,.28), rgba(49,95,78,.12) 54%, transparent 72%); filter: blur(19px); }
.campus-shadow { width: 330px; height: 118px; background: radial-gradient(ellipse, rgba(38,55,46,.28), transparent 68%); filter: blur(13px); }
.campus-ground { width: 345px; height: 230px; border: 2px solid rgba(255,255,255,.92); background: linear-gradient(145deg, #f9fcf9 0 47%, #e4efe7 47% 74%, #d1e2d6 74%); box-shadow: 0 8px 0 #bed1c4, 22px 34px 38px rgba(54,70,58,.2); }
.campus-ground::after { content: ''; position: absolute; right: 11px; bottom: -14px; left: 11px; height: 18px; border-radius: 0 0 24px 24px; background: linear-gradient(180deg, #adc5b6, #8ba99a); clip-path: polygon(3% 0, 97% 0, 90% 100%, 10% 100%); }
.campus-court { position: absolute; z-index: 3; top: 176px; left: 50%; width: 102px; height: 59px; border: 2px solid rgba(255,255,255,.82); border-radius: 12px; background: linear-gradient(135deg, rgba(211,157,55,.38), rgba(225,189,112,.23)); transform: translateX(-50%) rotateX(61deg); }
.campus-court::before { content: ''; position: absolute; inset: 8px 34px; border: 1px solid rgba(255,255,255,.78); border-radius: 50%; }
.campus-court::after { content: ''; position: absolute; top: 50%; right: 0; left: 0; border-top: 1px solid rgba(255,255,255,.75); }
.campus-road { top: 203px; z-index: 4; height: 78px; background: linear-gradient(90deg, #bfc9c2, #eef2ef 43% 57%, #bfc9c2); box-shadow: inset 7px 0 rgba(255,255,255,.38), inset -7px 0 rgba(84,104,92,.08); }
.campus-main { top: 81px; width: 118px; height: 122px; border: 1px solid rgba(255,255,255,.28); background: linear-gradient(90deg, #356b57 0 73%, #27503f 73% 100%); box-shadow: 15px 21px 28px rgba(31,55,44,.28), inset 0 1px rgba(255,255,255,.25); }
.campus-main::after { content: ''; position: absolute; top: 9px; right: -17px; bottom: -1px; width: 18px; border-radius: 0 4px 5px 0; background: linear-gradient(180deg, #244a3b, #1d3c31); clip-path: polygon(0 0, 100% 12%, 100% 92%, 0 100%); }
.campus-main .campus-roof { top: -37px; left: -13px; width: 143px; height: 47px; background: linear-gradient(135deg, #ffd477 0 48%, #d49328 49% 100%); filter: drop-shadow(8px 9px 7px rgba(92,65,23,.2)); }
.campus-main .campus-roof::after { content: ''; position: absolute; right: 10px; bottom: -7px; left: 10px; height: 9px; background: #b97620; clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%); }
.campus-main b { top: 12px; z-index: 2; color: #fff7d7; font-size: .6rem; text-shadow: 0 1px 2px rgba(0,0,0,.22); }
.campus-main > i { top: 38px; height: 32px; border-color: #e1f4ec; background: linear-gradient(90deg, #8fc1ad 0 44%, #e7f8f1 44% 55%, #8fc1ad 55%); box-shadow: inset 0 -8px rgba(49,107,84,.1), 0 2px 5px rgba(0,0,0,.1); }
.campus-main > em { left: 43px; width: 32px; height: 39px; background: linear-gradient(90deg, #d49a39 0 47%, #f4d07c 47% 53%, #bd7d25 53%); box-shadow: inset 0 4px rgba(255,255,255,.18); }
.campus-flag { position: absolute; z-index: 5; top: -65px; left: 59px; width: 2px; height: 39px; background: #8b7044; filter: drop-shadow(2px 3px 2px rgba(71,52,22,.18)); }
.campus-flag i { position: absolute; top: 1px; left: 2px; width: 22px; height: 13px; background: linear-gradient(135deg, #d95443, #a93229); clip-path: polygon(0 0, 100% 12%, 82% 100%, 0 88%); animation: flag-wave 2.8s ease-in-out infinite; transform-origin: left center; }
.campus-flag i::after { content: ''; position: absolute; top: 4px; left: 9px; width: 4px; height: 4px; border-radius: 50%; background: #ffd872; }
.campus-wing { top: 124px; width: 96px; height: 80px; padding: 15px 14px; border-top-width: 9px; border-top-color: #dba13a; background: linear-gradient(90deg, #fff5de 0 78%, #d9c7a4 78%); box-shadow: 12px 17px 23px rgba(65,61,45,.2), inset 0 1px rgba(255,255,255,.85); }
.campus-wing::before { content: ''; position: absolute; top: -15px; right: -3px; left: -3px; height: 12px; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, #f3c25f, #c98725); transform: skewX(-9deg); }
.campus-wing::after { content: ''; position: absolute; top: 0; right: -11px; width: 12px; height: 72px; background: #c5b28e; clip-path: polygon(0 0, 100% 10%, 100% 90%, 0 100%); }
.campus-wing-left { left: calc(50% - 149px); }.campus-wing-right { right: calc(50% - 149px); }
.campus-wing i { border-color: #5f927d; background: linear-gradient(135deg, #d8eee5, #88b8a4); box-shadow: inset 0 0 0 2px rgba(255,255,255,.38), 0 2px 4px rgba(46,75,62,.11); }
.campus-wing > span { position: absolute; right: 13px; bottom: 0; left: 13px; height: 5px; border-radius: 4px 4px 0 0; background: #7fa38f; opacity: .32; }
.campus-yard { top: 204px; width: 286px; }
.campus-yard i { width: 20px; height: 31px; background: linear-gradient(135deg, #82bd92 0 45%, #35735a 46% 100%); filter: drop-shadow(4px 6px 5px rgba(40,77,58,.16)); }
.campus-status-label { position: absolute; z-index: 9; top: 238px; left: 50%; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; color: #346550; border: 1px solid rgba(49,95,78,.13); border-radius: 999px; background: rgba(255,255,255,.86); box-shadow: 0 7px 16px rgba(52,72,60,.1); font-size: .51rem; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; transform: translateX(-50%); backdrop-filter: blur(8px); }
.campus-status-label i { width: 6px; height: 6px; border-radius: 50%; background: #38a875; box-shadow: 0 0 0 3px rgba(56,168,117,.12); }
.education-orbit .orbit-node { z-index: 12; border-color: rgba(255,255,255,.96); background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(248,251,249,.88)); box-shadow: 0 14px 28px rgba(43,61,51,.16), inset 0 0 0 1px color-mix(in srgb, var(--node-color, #2d9167) 12%, transparent); }
.education-orbit .orbit-node::after { content: ''; position: absolute; top: 10px; bottom: 10px; left: 0; width: 3px; border-radius: 0 4px 4px 0; background: var(--node-color, #2d9167); opacity: .75; }
.education-orbit .orbit-node strong { font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.education-orbit .orbit-link { z-index: 1; height: 2px; overflow: hidden; border-radius: 999px; background: repeating-linear-gradient(90deg, rgba(58,116,91,.52) 0 5px, transparent 5px 10px); opacity: .52; }

@keyframes campus-breathe { 50% { transform: translateY(-3px); } }
@keyframes flag-wave { 50% { transform: skewY(-8deg) scaleX(.88); } }

/* Live southern Vietnam branch network */
.command-hero:has(.branch-network-map) { min-height: 560px; grid-template-columns: minmax(0, .88fr) minmax(540px, 1.12fr); gap: 34px; }
.branch-network-map { min-width: 0; min-height: 0; padding: 14px 16px 13px; overflow: visible; border: 1px solid rgba(125,36,43,.13); border-radius: 22px; background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.98), rgba(255,248,244,.88) 58%, rgba(117,30,38,.06)), linear-gradient(145deg, rgba(255,255,255,.82), rgba(250,239,235,.68)); box-shadow: 0 22px 48px rgba(84,35,36,.12), inset 0 1px rgba(255,255,255,.95); transform-style: flat; }
.branch-network-map::before { content: ''; position: absolute; inset: 55px 18px 54px; width: auto; height: auto; border: 0; border-radius: 50%; background: radial-gradient(ellipse, rgba(130,39,46,.08), transparent 67%); box-shadow: none; transform: none; pointer-events: none; }
.branch-map-header { position: relative; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 1px 2px 8px; }
.branch-map-header > div { min-width: 0; }
.branch-map-header strong, .branch-map-kicker { display: block; }
.branch-map-kicker { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; color: #8b2931; font-size: .56rem; font-weight: 900; letter-spacing: .095em; }
.branch-map-kicker .icon { width: 12px; height: 12px; }
.branch-map-header strong { color: #41282a; font-size: .83rem; letter-spacing: -.01em; }
.branch-map-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.branch-map-live { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; padding: 6px 8px; color: #7b3035; border: 1px solid rgba(125,36,43,.12); border-radius: 999px; background: rgba(255,255,255,.8); font-size: .54rem; font-weight: 820; white-space: nowrap; }
.branch-map-live i { width: 6px; height: 6px; border-radius: 50%; background: #2f9b6d; box-shadow: 0 0 0 4px rgba(47,155,109,.12); animation: live-pulse 2.2s ease-in-out infinite; }
.branch-map-expand { display: inline-flex; min-height: 29px; align-items: center; justify-content: center; gap: 6px; padding: 6px 9px; color: #fff; border: 1px solid rgba(91,22,29,.15); border-radius: 999px; background: linear-gradient(145deg, #9a3039, #6f1d26); box-shadow: 0 7px 15px rgba(103,29,36,.18); font: inherit; font-size: .54rem; font-weight: 850; white-space: nowrap; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.branch-map-expand .icon { width: 13px; height: 13px; }
.branch-map-expand:hover, .branch-map-expand:focus-visible { outline: none; box-shadow: 0 9px 20px rgba(103,29,36,.25); filter: brightness(1.07); transform: translateY(-1px); }
.southern-map-stage { position: relative; width: min(100%, 570px); aspect-ratio: 640 / 420; margin: 2px auto 0; isolation: isolate; }
.southern-map-stage::after { content: ''; position: absolute; z-index: -1; right: 10%; bottom: 4%; left: 10%; height: 17%; border-radius: 50%; background: rgba(78,26,30,.2); filter: blur(22px); transform: skewX(-8deg); }
.southern-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.province-depth path { fill: #7b3037; stroke: #70272e; stroke-width: 2.5; }
.province-faces path { fill: url(#mapProvinceTop); fill-rule: evenodd; clip-rule: evenodd; stroke: rgba(255,255,255,.95); stroke-width: 2.2; stroke-linejoin: round; opacity: .78; cursor: pointer; transition: filter .18s ease, opacity .18s ease, stroke .18s ease; transform-origin: center; }
.province-faces path.has-branch { fill: url(#mapProvinceActive); filter: saturate(.95); }
.province-faces path:hover, .province-faces path:focus-visible, .province-faces path.is-active { outline: none; opacity: 1; stroke: #7d252e; stroke-width: 3.4; filter: saturate(1.28) brightness(.92) drop-shadow(0 4px 5px rgba(86,27,33,.22)); }
.province-labels { fill: #783039; font-size: 10px; font-weight: 900; letter-spacing: .02em; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: rgba(255,250,247,.9); stroke-width: 3px; stroke-linejoin: round; }
.province-faces path[data-province="lam-dong"] { fill: #e9e1f4; }.province-faces path[data-province="tay-ninh"] { fill: #f7dfd1; }
.province-faces path[data-province="dong-nai"] { fill: #dcebed; }.province-faces path[data-province="ho-chi-minh"] { fill: #efd4d8; }
.province-faces path[data-province="dong-thap"] { fill: #d9e7f5; }.province-faces path[data-province="vinh-long"] { fill: #e2eedb; }
.province-faces path[data-province="an-giang"] { fill: #f4e6c7; }.province-faces path[data-province="can-tho"] { fill: #e7dbf0; }
.province-faces path[data-province="ca-mau"] { fill: #d7eae5; }
.province-faces path.has-branch { opacity: 1; filter: saturate(1.45) brightness(.84); stroke: #fff; stroke-width: 2.8; }
.map-geography { transform-origin: 0 0; }
.province-count-layer { pointer-events: none; }
.province-count-badge circle { fill: #7d252e; stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 4px 5px rgba(76,23,29,.28)); }
.province-count-badge text { fill: #fff; font-size: 10px; font-weight: 950; text-anchor: middle; }
.province-count-badge.is-active circle { fill: #b33d47; stroke-width: 3; }
.province-map-details { position: absolute; z-index: 24; top: 10px; left: 10px; width: min(220px, 43%); pointer-events: none; }
.province-map-details article { overflow: hidden; border: 1px solid rgba(113,31,39,.15); border-radius: 15px; background: rgba(255,253,251,.94); box-shadow: 0 16px 34px rgba(76,28,32,.16); backdrop-filter: blur(13px); pointer-events: auto; animation: province-detail-in .18s ease both; }
.province-map-details article > header { display: flex; align-items: center; gap: 9px; padding: 10px 11px 8px; border-bottom: 1px solid rgba(123,34,42,.08); }
.province-map-details article > header > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 10px; background: linear-gradient(145deg, #a93a44, #711e27); font-size: .72rem; font-weight: 900; box-shadow: 0 6px 12px rgba(116,31,39,.2); }
.province-map-details article > header div { min-width: 0; }
.province-map-details article > header small, .province-map-details article > header strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.province-map-details article > header small { color: #a0787b; font-size: .43rem; font-weight: 850; letter-spacing: .075em; }
.province-map-details article > header strong { margin-top: 1px; color: #45292c; font-size: .72rem; }
.province-detail-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(122,34,42,.08); }
.province-detail-metrics > span { display: grid; min-width: 0; justify-items: center; gap: 1px; padding: 7px 2px 6px; background: rgba(255,255,255,.88); text-align: center; }
.province-detail-metrics .icon { width: 11px; height: 11px; color: #8e2a33; }
.province-detail-metrics b { color: #43282b; font-size: .67rem; line-height: 1; }.province-detail-metrics small { overflow: hidden; max-width: 100%; color: #8b7274; font-size: .4rem; text-overflow: ellipsis; white-space: nowrap; }
.province-branch-list { max-height: 112px; padding: 5px; overflow-y: auto; scrollbar-width: thin; }
.province-branch-list a { display: flex; min-width: 0; align-items: center; gap: 6px; padding: 6px; border-radius: 8px; color: inherit; }
.province-branch-list a:hover, .province-branch-list a:focus-visible { outline: none; background: #f8e9e7; }
.province-branch-list a > span { min-width: 0; flex: 1; }.province-branch-list strong, .province-branch-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.province-branch-list strong { color: #4b2e31; font-size: .55rem; }.province-branch-list small { margin-top: 1px; color: #92787a; font-size: .43rem; }.province-branch-list .icon { width: 10px; height: 10px; color: #9a4850; }
.province-detail-empty { margin: 0; padding: 10px; color: #876b6e; font-size: .52rem; line-height: 1.45; text-align: center; }
@keyframes province-detail-in { from { opacity: 0; transform: translateY(4px); } }
.branch-connector-layer, .branch-orbit-layer { pointer-events: none; }
.orbit-tone-0 { --orbit-color: #8d2731; --orbit-soft: #f7e3e5; }.orbit-tone-1 { --orbit-color: #2b8791; --orbit-soft: #dff1f2; }
.orbit-tone-2 { --orbit-color: #cb7b28; --orbit-soft: #fbecd7; }.orbit-tone-3 { --orbit-color: #4b72b7; --orbit-soft: #e3eaf7; }
.orbit-tone-4 { --orbit-color: #8154a8; --orbit-soft: #eee5f5; }.orbit-tone-5 { --orbit-color: #3a8d67; --orbit-soft: #dfefe7; }
.branch-connector-line { fill: none; stroke: var(--orbit-color); stroke-width: 1.65; stroke-dasharray: 4 3; stroke-linecap: round; opacity: .7; vector-effect: non-scaling-stroke; animation: connector-flow 9s linear infinite; }
.branch-map-target { fill: #fff; stroke: var(--orbit-color); stroke-width: 2.4; vector-effect: non-scaling-stroke; filter: drop-shadow(0 2px 3px rgba(72,25,29,.2)); }
.branch-map-target-count { fill: #6f2029; font-size: 7px; font-weight: 950; text-anchor: middle; paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 1.4px; pointer-events: none; }
.branch-orbit-object { overflow: visible; pointer-events: all; }
.branch-orbit-card { position: relative; display: flex; width: 100%; height: 100%; align-items: center; gap: 5px; padding: 4px 5px 4px 4px; overflow: hidden; color: #43292c; border: 1px solid color-mix(in srgb, var(--orbit-color) 25%, #fff); border-radius: 9px; background: linear-gradient(145deg, rgba(255,255,255,.98), var(--orbit-soft)); box-shadow: 0 5px 12px rgba(74,29,34,.14), inset 3px 0 var(--orbit-color); text-decoration: none; }
.branch-orbit-card:hover, .branch-orbit-card:focus-visible { outline: 2px solid color-mix(in srgb, var(--orbit-color) 45%, #fff); outline-offset: -2px; filter: brightness(1.035); }
.orbit-campus-model { position: relative; width: 30px; height: 27px; flex: 0 0 auto; filter: drop-shadow(2px 3px 2px rgba(77,24,30,.2)); }
.orbit-campus-model > i { position: absolute; z-index: 2; top: 1px; left: 1px; width: 28px; height: 10px; background: linear-gradient(135deg, #ad444d, #6d1923 72%); clip-path: polygon(50% 0, 100% 75%, 91% 100%, 9% 100%, 0 75%); }
.orbit-campus-model > b { position: absolute; right: 4px; bottom: 1px; left: 4px; height: 18px; border-radius: 2px 2px 4px 4px; background: linear-gradient(90deg, #8b2530 0 72%, #5e1820 72%); box-shadow: inset 0 1px rgba(255,255,255,.28); }
.orbit-campus-model > b::after { content: ''; position: absolute; top: 8px; bottom: 0; left: 50%; width: 5px; background: #f0bea4; transform: translateX(-50%); }
.orbit-campus-model em { position: absolute; top: 5px; width: 5px; height: 6px; border-radius: 1px; background: var(--orbit-soft); box-shadow: inset 0 0 0 1px rgba(255,255,255,.62); }
.orbit-campus-model em:first-child { left: 4px; }.orbit-campus-model em:last-child { right: 4px; }
.orbit-campus-copy { min-width: 0; flex: 1; }
.orbit-campus-copy strong, .orbit-campus-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orbit-campus-copy strong { color: #482a2d; font-size: 7.2px; font-weight: 900; letter-spacing: -.01em; }
.orbit-campus-copy small { margin-top: 2px; color: #876a6d; font-size: 5.6px; }
.orbit-campus-copy small b { color: var(--orbit-color); font-size: 6.2px; }
.orbit-campus-index { display: grid; width: 13px; height: 13px; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 50%; background: var(--orbit-color); box-shadow: 0 2px 5px color-mix(in srgb, var(--orbit-color) 30%, transparent); font-size: 5.6px; font-style: normal; font-weight: 900; }
.branch-orbit-card.is-dense { gap: 3px; padding-block: 2px; }
.branch-orbit-card.is-dense .orbit-campus-model { width: 23px; height: 22px; transform: scale(.8); transform-origin: center; }
.branch-orbit-card.is-dense .orbit-campus-copy strong { font-size: 6.2px; }.branch-orbit-card.is-dense .orbit-campus-copy small { display: none; }
.branch-orbit-card.is-top, .branch-orbit-card.is-bottom { gap: 3px; padding-inline: 3px; }
.branch-orbit-card.is-top .orbit-campus-model, .branch-orbit-card.is-bottom .orbit-campus-model { width: 24px; transform: scale(.82); transform-origin: center; }
.branch-orbit-card.is-top .orbit-campus-copy small, .branch-orbit-card.is-bottom .orbit-campus-copy small { display: none; }
.branch-marker-layer { position: absolute; inset: 0; z-index: 12; }
.branch-map-marker { position: absolute; top: calc(var(--marker-y) + var(--marker-offset-y, 0px)); left: calc(var(--marker-x) + var(--marker-offset-x, 0px)); z-index: 2; display: block; width: 68px; height: 59px; color: inherit; transform: translate(-50%, -74%); transition: z-index 0s .18s; animation: branch-marker-float 4.8s ease-in-out infinite; }
.marker-province-lam-dong { --marker-x: 70%; --marker-y: 14.694%; }.marker-province-tay-ninh { --marker-x: 32.203%; --marker-y: 29.592%; }
.marker-province-dong-nai { --marker-x: 76.61%; --marker-y: 35.51%; }.marker-province-ho-chi-minh { --marker-x: 54.576%; --marker-y: 41.02%; }
.marker-province-dong-thap { --marker-x: 25.424%; --marker-y: 56.327%; }.marker-province-vinh-long { --marker-x: 50.678%; --marker-y: 64.082%; }
.marker-province-an-giang { --marker-x: 18.644%; --marker-y: 74.49%; }.marker-province-can-tho { --marker-x: 41.695%; --marker-y: 76.735%; }
.marker-province-ca-mau { --marker-x: 43.559%; --marker-y: 90%; }
.marker-slot-1 { --marker-offset-x: -24px; --marker-offset-y: -12px; }.marker-slot-2 { --marker-offset-x: 24px; --marker-offset-y: 10px; }
.marker-slot-3 { --marker-offset-x: -30px; --marker-offset-y: 18px; }.marker-slot-4 { --marker-offset-x: 31px; --marker-offset-y: -18px; }.marker-slot-5 { --marker-offset-y: 25px; }
.marker-delay-1 { animation-delay: -.35s; }.marker-delay-2 { animation-delay: -.7s; }.marker-delay-3 { animation-delay: -1.05s; }.marker-delay-4 { animation-delay: -1.4s; }
.branch-map-marker:hover, .branch-map-marker:focus-visible { z-index: 40; transition-delay: 0s; outline: none; animation-play-state: paused; }
.branch-mini-campus { position: absolute; inset: 0; display: block; filter: drop-shadow(7px 10px 8px rgba(74,27,30,.24)); }
.mini-campus-body { position: absolute; right: 7px; bottom: 9px; left: 7px; height: 32px; border: 1px solid rgba(255,255,255,.35); border-radius: 3px 3px 6px 6px; background: linear-gradient(90deg, #8b2630 0 72%, #651b23 72%); box-shadow: inset 0 1px rgba(255,255,255,.22); }
.mini-campus-body::after { content: ''; position: absolute; top: 4px; right: -6px; bottom: 1px; width: 7px; background: #51151b; clip-path: polygon(0 0, 100% 15%, 100% 88%, 0 100%); }
.mini-campus-roof { position: absolute; z-index: 2; top: 6px; left: 3px; width: 61px; height: 20px; background: linear-gradient(135deg, #c46255, #7d2029 65%); clip-path: polygon(50% 0, 100% 76%, 92% 100%, 8% 100%, 0 76%); filter: drop-shadow(3px 4px 2px rgba(75,24,28,.16)); }
.mini-campus-body b { position: absolute; z-index: 2; top: 5px; right: 2px; left: 2px; overflow: hidden; color: #fff8f2; font-size: 6.2px; font-style: normal; font-weight: 900; letter-spacing: .015em; line-height: 1; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.mini-campus-body em { position: absolute; top: 16px; width: 9px; height: 10px; border-radius: 1px; background: linear-gradient(135deg, #f6dcd5, #d99e94); box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }
.mini-campus-body em:first-of-type { left: 10px; }.mini-campus-body em:nth-of-type(2) { right: 10px; }
.mini-campus-body > span { position: absolute; bottom: 0; left: 50%; width: 10px; height: 12px; border-radius: 2px 2px 0 0; background: #f1c0a5; transform: translateX(-50%); }
.mini-campus-pin { position: absolute; bottom: 1px; left: 50%; width: 10px; height: 6px; border-radius: 50%; background: rgba(82,20,27,.36); filter: blur(2px); transform: translateX(-50%); }
.branch-map-index { position: absolute; z-index: 5; top: 1px; right: 0; display: grid; width: 17px; height: 17px; place-items: center; color: #fff; border: 2px solid #fff; border-radius: 50%; background: #6f1d26; box-shadow: 0 4px 10px rgba(91,24,31,.27); font-size: .48rem; font-weight: 900; }
.branch-map-popover { position: absolute; z-index: 50; bottom: calc(100% + 8px); left: 50%; display: block; width: 245px; padding: 11px; visibility: hidden; border: 1px solid rgba(118,32,40,.14); border-radius: 14px; background: rgba(255,253,251,.97); box-shadow: 0 18px 38px rgba(71,29,31,.18); opacity: 0; transform: translate(-50%, 8px); transition: opacity .18s ease, transform .18s ease, visibility .18s; backdrop-filter: blur(12px); pointer-events: none; }
.branch-map-marker.is-east .branch-map-popover { right: -10px; left: auto; transform: translate(0, 8px); }
.branch-map-marker.is-south .branch-map-popover { top: calc(100% + 7px); bottom: auto; }
.branch-map-marker:hover .branch-map-popover, .branch-map-marker:focus-visible .branch-map-popover { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
.branch-map-marker.is-east:hover .branch-map-popover, .branch-map-marker.is-east:focus-visible .branch-map-popover { transform: translate(0, 0); }
.branch-popover-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(118,32,40,.09); }
.branch-popover-head > i { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 8px; background: linear-gradient(145deg, #9b3039, #6d1d25); font-size: .63rem; font-style: normal; font-weight: 900; }
.branch-popover-head > span { min-width: 0; }
.branch-popover-head strong, .branch-popover-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.branch-popover-head strong { color: #3e2829; font-size: .73rem; }.branch-popover-head small { margin-top: 2px; color: #8b6a6c; font-size: .52rem; }
.branch-popover-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.branch-popover-metrics > span { display: grid; grid-template-columns: auto 1fr; gap: 0 5px; align-items: center; padding: 6px; border-radius: 9px; background: #fbf2ef; }
.branch-popover-metrics .icon { width: 13px; height: 13px; grid-row: 1 / 3; color: #9b3039; }
.branch-popover-metrics b { color: #4b2a2d; font-size: .7rem; line-height: 1; }.branch-popover-metrics small { color: #856c6d; font-size: .46rem; }
.branch-map-empty { position: absolute; top: 50%; left: 50%; z-index: 20; display: grid; width: 220px; justify-items: center; gap: 4px; padding: 14px; color: #71444a; border: 1px dashed rgba(126,39,47,.25); border-radius: 16px; background: rgba(255,255,255,.86); text-align: center; transform: translate(-50%, -50%); }
.branch-map-empty .icon { width: 22px; height: 22px; }.branch-map-empty strong { font-size: .75rem; }.branch-map-empty small { font-size: .56rem; line-height: 1.45; }
.branch-map-totals { position: relative; z-index: 25; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 2px; }
.branch-map-totals > span { display: grid; grid-template-columns: auto 1fr; gap: 0 6px; align-items: center; min-width: 0; padding: 7px 8px; border: 1px solid rgba(122,34,42,.09); border-radius: 11px; background: rgba(255,255,255,.76); }
.branch-map-totals .icon { width: 14px; height: 14px; grid-row: 1 / 3; color: #942f38; }
.branch-map-totals strong { color: #42282b; font-size: .77rem; line-height: 1; }.branch-map-totals small { overflow: hidden; color: #846c6d; font-size: .48rem; text-overflow: ellipsis; white-space: nowrap; }
.branch-map-totals > span:nth-child(1) { background: linear-gradient(145deg, #fff, #f8e4e6); }.branch-map-totals > span:nth-child(1) .icon { color: #8d2731; }
.branch-map-totals > span:nth-child(2) { background: linear-gradient(145deg, #fff, #e2eef9); }.branch-map-totals > span:nth-child(2) .icon { color: #3975b9; }
.branch-map-totals > span:nth-child(3) { background: linear-gradient(145deg, #fff, #eee5f6); }.branch-map-totals > span:nth-child(3) .icon { color: #8050aa; }
.branch-map-totals > span:nth-child(4) { background: linear-gradient(145deg, #fff, #fbecd8); }.branch-map-totals > span:nth-child(4) .icon { color: #c97824; }
.branch-mobile-list { display: none; }
.branch-mobile-list a:nth-child(6n+1) > i { background: #8d2731; }.branch-mobile-list a:nth-child(6n+2) > i { background: #2b8791; }
.branch-mobile-list a:nth-child(6n+3) > i { background: #cb7b28; }.branch-mobile-list a:nth-child(6n+4) > i { background: #4b72b7; }
.branch-mobile-list a:nth-child(6n+5) > i { background: #8154a8; }.branch-mobile-list a:nth-child(6n+6) > i { background: #3a8d67; }

/* Near-fullscreen branch network view */
.branch-map-dialog { width: min(1440px, calc(100vw - 32px)); height: min(940px, calc(100dvh - 32px)); max-height: none; border-radius: 26px; box-shadow: 0 38px 110px rgba(57,18,23,.38); }
.branch-map-dialog::backdrop { background: rgba(41,22,25,.58); backdrop-filter: blur(8px) saturate(.85); }
.branch-map-dialog .branch-map-dialog-shell { height: 100%; max-height: none; border-color: rgba(255,255,255,.7); border-radius: 26px; background: radial-gradient(circle at 32% 35%, rgba(255,255,255,.98), rgba(252,244,240,.96) 58%, rgba(241,222,216,.96)); }
.branch-map-dialog-header { position: relative; z-index: 80; display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-bottom: 1px solid rgba(120,37,44,.12); background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(249,233,228,.92)); }
.branch-map-dialog-heading { display: flex; min-width: 0; align-items: center; gap: 13px; }
.branch-map-dialog-icon { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 15px; background: linear-gradient(145deg, #a83b43, #6c1923); box-shadow: 0 10px 24px rgba(105,27,34,.22); }
.branch-map-dialog-icon .icon { width: 22px; height: 22px; }
.branch-map-dialog-heading > div { min-width: 0; }
.branch-map-dialog-heading .eyebrow { margin: 0 0 2px; color: #96323a; font-size: .61rem; letter-spacing: .1em; }
.branch-map-dialog-heading h2 { margin: 0; color: #3f282a; font-size: clamp(1.12rem, 2vw, 1.55rem); letter-spacing: -.025em; }
.branch-map-dialog-heading small { display: block; margin-top: 3px; color: #826568; font-size: .69rem; }
.branch-map-dialog-close { flex: 0 0 auto; color: #7f343b; border: 1px solid rgba(122,35,43,.1); background: rgba(255,255,255,.76); }
.branch-map-dialog-close:hover { color: #fff; background: #7c252e; }
.branch-map-dialog-body { display: grid; min-height: 0; flex: 1; grid-template-columns: minmax(0, 1fr) minmax(310px, 380px); gap: 16px; padding: 16px; overflow: hidden; }
.branch-map-expanded-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: 12px; padding: 13px; border: 1px solid rgba(123,35,43,.1); border-radius: 20px; background: radial-gradient(ellipse at center, rgba(255,255,255,.96), rgba(249,233,228,.7)); box-shadow: inset 0 1px rgba(255,255,255,.9); }
.branch-map-expanded-canvas { display: grid; min-width: 0; min-height: 0; flex: 1; place-items: center; }
.branch-map-expanded-canvas .southern-map-stage { width: min(100%, 920px); max-height: 100%; margin: 0 auto; }
.branch-map-expanded-canvas .province-labels { font-size: 11px; }
.branch-map-expanded-canvas .branch-map-marker { width: 78px; height: 68px; }
.branch-map-expanded-canvas .mini-campus-body b { font-size: 6.5px; }
.branch-map-expanded-canvas .branch-map-index { width: 19px; height: 19px; font-size: .52rem; }
.branch-map-expanded-totals { display: grid; flex: 0 0 auto; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.branch-map-expanded-totals > span { display: grid; min-width: 0; grid-template-columns: auto 1fr; align-items: center; gap: 1px 8px; padding: 10px 11px; border: 1px solid rgba(122,35,43,.09); border-radius: 13px; background: rgba(255,255,255,.84); box-shadow: 0 7px 18px rgba(91,36,40,.055); }
.branch-map-expanded-totals .icon { width: 17px; height: 17px; grid-row: 1 / 3; color: #93303a; }
.branch-map-expanded-totals b { overflow: hidden; color: #41272a; font-size: .92rem; line-height: 1; text-overflow: ellipsis; }
.branch-map-expanded-totals small { overflow: hidden; color: #896d6f; font-size: .54rem; text-overflow: ellipsis; white-space: nowrap; }
.branch-map-expanded-totals > span:nth-child(1) { background: linear-gradient(145deg, #fff, #f8e3e5); }.branch-map-expanded-totals > span:nth-child(1) .icon { color: #8d2731; }
.branch-map-expanded-totals > span:nth-child(2) { background: linear-gradient(145deg, #fff, #e1eef9); }.branch-map-expanded-totals > span:nth-child(2) .icon { color: #3975b9; }
.branch-map-expanded-totals > span:nth-child(3) { background: linear-gradient(145deg, #fff, #eee4f6); }.branch-map-expanded-totals > span:nth-child(3) .icon { color: #8050aa; }
.branch-map-expanded-totals > span:nth-child(4) { background: linear-gradient(145deg, #fff, #e2f1e9); }.branch-map-expanded-totals > span:nth-child(4) .icon { color: #348c63; }
.branch-map-expanded-totals > span:nth-child(5) { background: linear-gradient(145deg, #fff, #fbecd8); }.branch-map-expanded-totals > span:nth-child(5) .icon { color: #c97824; }
.branch-map-expanded-sidebar { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; border: 1px solid rgba(123,35,43,.1); border-radius: 20px; background: rgba(255,255,255,.82); box-shadow: 0 15px 35px rgba(77,30,34,.08); }
.branch-map-expanded-sidebar > header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid rgba(122,35,43,.09); }
.branch-map-expanded-sidebar > header strong { display: block; color: #44282b; font-size: .89rem; }
.branch-map-expanded-sidebar > header .branch-map-kicker { margin-bottom: 4px; }
.branch-map-expanded-sidebar > header em { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 10px; background: #7d252e; font-size: .69rem; font-style: normal; font-weight: 900; }
.branch-map-expanded-list { min-height: 0; padding: 8px; overflow-y: auto; scrollbar-color: rgba(124,37,46,.25) transparent; scrollbar-width: thin; }
.branch-map-expanded-list > a { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 9px; align-items: center; margin-bottom: 7px; padding: 11px 9px; color: inherit; border: 1px solid rgba(122,35,43,.08); border-radius: 14px; background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(252,242,238,.78)); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.branch-map-expanded-list > a:hover, .branch-map-expanded-list > a:focus-visible { outline: none; border-color: rgba(129,39,47,.24); box-shadow: 0 9px 20px rgba(83,31,35,.09); transform: translateY(-1px); }
.branch-map-expanded-list > a > i { display: grid; width: 29px; height: 29px; place-items: center; color: #fff; border-radius: 10px; background: linear-gradient(145deg, #a03942, #701e27); box-shadow: 0 6px 13px rgba(108,29,36,.18); font-size: .65rem; font-style: normal; font-weight: 900; }
.branch-map-expanded-list > a:nth-child(6n+2) > i { background: linear-gradient(145deg, #45a1aa, #256f78); }.branch-map-expanded-list > a:nth-child(6n+3) > i { background: linear-gradient(145deg, #dc9745, #ae641b); }
.branch-map-expanded-list > a:nth-child(6n+4) > i { background: linear-gradient(145deg, #6689c8, #3d60a0); }.branch-map-expanded-list > a:nth-child(6n+5) > i { background: linear-gradient(145deg, #9870ba, #714396); }
.branch-map-expanded-list > a:nth-child(6n+6) > i { background: linear-gradient(145deg, #58a47d, #317856); }
.branch-expanded-identity { min-width: 0; }
.branch-expanded-identity strong, .branch-expanded-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.branch-expanded-identity strong { color: #42282b; font-size: .72rem; }
.branch-expanded-identity small { margin-top: 3px; color: #8a6d70; font-size: .52rem; }
.branch-expanded-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; }
.branch-expanded-metrics b { color: #917176; font-size: .48rem; font-weight: 760; white-space: nowrap; }
.branch-expanded-metrics strong { color: #74212a; font-size: .61rem; }
.branch-map-expanded-list > a > .icon { width: 13px; height: 13px; color: #a27e81; }
.branch-map-expanded-sidebar > footer { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 11px 14px; color: #80676a; border-top: 1px solid rgba(122,35,43,.08); background: rgba(251,242,239,.75); font-size: .54rem; }
.branch-map-expanded-sidebar > footer i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #2f9b6d; box-shadow: 0 0 0 4px rgba(47,155,109,.11); }
.branch-map-expanded-empty { display: grid; flex: 1; place-items: center; align-content: center; gap: 7px; padding: 30px; color: #7d5c60; text-align: center; }
.branch-map-expanded-empty .icon { width: 28px; height: 28px; color: #8a2932; }
.branch-map-expanded-empty strong { color: #482b2e; }.branch-map-expanded-empty small { max-width: 230px; font-size: .66rem; line-height: 1.5; }

@media (max-width: 900px) {
    .branch-map-dialog-body { grid-template-columns: minmax(0, 1fr) minmax(280px, 320px); gap: 10px; padding: 10px; }
    .branch-map-expanded-panel { gap: 8px; padding: 9px; }
    .branch-map-expanded-totals { gap: 5px; }
    .branch-map-expanded-totals > span { gap: 1px 5px; padding: 8px 7px; }
    .branch-expanded-metrics { display: none; }
}

@media (max-width: 720px) {
    .branch-map-dialog { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
    .branch-map-dialog .branch-map-dialog-shell { border: 0; border-radius: 0; }
    .branch-map-dialog-header { padding: 12px 14px; }
    .branch-map-dialog-icon { width: 38px; height: 38px; border-radius: 12px; }
    .branch-map-dialog-heading .eyebrow { font-size: .5rem; }
    .branch-map-dialog-heading h2 { font-size: 1rem; }
    .branch-map-dialog-heading small { font-size: .56rem; }
    .branch-map-dialog-body { display: flex; flex-direction: column; gap: 8px; padding: 8px; overflow-y: auto; }
    .branch-map-expanded-panel { min-height: min(57vh, 470px); flex: 0 0 auto; border-radius: 16px; }
    .branch-map-expanded-canvas .southern-map-stage { width: min(100%, 620px); }
    .branch-map-expanded-canvas .branch-map-marker { width: 58px; height: 50px; transform: translate(-50%, -72%) scale(.86); }
    .branch-map-expanded-canvas .branch-map-marker:hover, .branch-map-expanded-canvas .branch-map-marker:focus-visible { transform: translate(-50%, -72%) scale(.86); }
    .branch-map-expanded-canvas .branch-map-popover { display: none; }
    .branch-map-expanded-totals { grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
    .branch-map-expanded-totals > span { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; text-align: center; }
    .branch-map-expanded-totals .icon { width: 14px; height: 14px; grid-row: auto; }
    .branch-map-expanded-totals b { font-size: .78rem; }.branch-map-expanded-totals small { font-size: .45rem; }
    .branch-map-expanded-sidebar { min-height: 250px; flex: 1 0 auto; border-radius: 16px; overflow: visible; }
    .branch-map-expanded-list { max-height: none; overflow: visible; }
    .branch-expanded-metrics { display: grid; }
}

@keyframes branch-marker-float { 50% { transform: translate(-50%, calc(-74% - 3px)); } }
@keyframes connector-flow { to { stroke-dashoffset: -28; } }

@keyframes urgent-pulse { 50% { box-shadow: 0 0 0 8px rgba(192,57,43,0); } }

@keyframes live-pulse { 50% { box-shadow: 0 0 0 7px rgba(53,168,115,0); } }
@keyframes orbit-float { 50% { transform: translateY(-6px) rotate(2deg); } }
@keyframes orbit-pulse { from { opacity: .8; transform: translate(-50%, -50%) scale(.65); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.65); } }
@keyframes chart-fade { from { opacity: 0; transform: translateY(7px); } }

@media (max-width: 1120px) {
    .command-hero { grid-template-columns: minmax(0, 1fr) 300px; padding: 30px; }
    .command-hero:has(.branch-network-map) { grid-template-columns: minmax(0, 1fr); }
    .branch-network-map { width: min(100%, 680px); justify-self: center; }
    .command-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .enrollment-command-body { grid-template-columns: 1fr; }
    .call-mission-panel { border-top: 1px solid #ede2eb; border-left: 0; }
}

@media (max-width: 850px) {
    .command-hero { grid-template-columns: minmax(0, 1fr); }
    .education-orbit { min-height: 315px; order: -1; }
    .education-orbit.branch-network-map { min-height: 0; order: 0; }
    .command-hero-copy { max-width: none; }
    .command-analytics-grid, .command-work-grid { grid-template-columns: 1fr; }
    .command-completion-overview { grid-template-columns: auto 1fr; justify-items: stretch; }
    .enrollment-funnel { grid-template-columns: 1fr auto 1fr; }
    .enrollment-funnel > :nth-child(4), .enrollment-funnel > :nth-child(5), .enrollment-funnel > :nth-child(6), .enrollment-funnel > :nth-child(7) { margin-top: 2px; }
    .enrollment-funnel > :nth-child(4) { display: none; }
}

@media (max-width: 560px) {
    html, body { scroll-behavior: auto; }
    .topbar { backdrop-filter: none; }
    .command-hero { min-height: 0; padding: 22px 18px; border-radius: 19px; }
    .education-orbit { min-height: 318px; order: 0; margin: 10px -8px -4px; overflow: hidden; transform: none; }
    .education-orbit.branch-network-map { width: 100%; max-width: 100%; min-height: 0; margin: 15px 0 -4px; padding: 12px 10px; overflow: hidden; border-radius: 17px; }
    .branch-network-map::before { inset: 50px 8px 82px; }
    .branch-map-header { padding-inline: 2px; }
    .branch-map-header strong { font-size: .72rem; }
    .branch-map-live { display: none; }
    .southern-map-stage { width: 100%; margin: 1px auto -5px; aspect-ratio: auto; }
    .southern-map-svg { position: relative; display: block; aspect-ratio: 640 / 420; overflow: visible; }
    .province-map-details { position: relative; inset: auto; width: 100%; margin-top: 4px; }
    .province-map-details article { border-radius: 12px; box-shadow: 0 10px 22px rgba(76,28,32,.11); backdrop-filter: none; }
    .branch-network-map > .southern-map-stage .province-branch-list { max-height: none; overflow-y: visible; }
    .province-faces path { transition-duration: .08s; }
    .province-count-badge circle { r: 11px; }
    .province-labels { font-size: 8px; stroke-width: 2.5px; }
    .branch-map-marker { width: 55px; height: 49px; animation: none; transform: translate(-50%, -72%) scale(.82); }
    .branch-map-marker:hover, .branch-map-marker:focus-visible { transform: translate(-50%, -72%) scale(.82); }
    .mini-campus-body b { font-size: 5.7px; }
    .branch-map-popover { display: none; }
    .branch-map-index { top: -1px; right: -2px; width: 16px; height: 16px; }
    .branch-orbit-card { justify-content: center; gap: 1px; padding: 2px; border-radius: 7px; }
    .branch-orbit-card .orbit-campus-model { width: 23px; height: 22px; flex-basis: 23px; transform: scale(.78); transform-origin: center; }
    .branch-orbit-card .orbit-campus-copy { display: none; }
    .branch-orbit-card .orbit-campus-index { width: 11px; height: 11px; font-size: 5px; }
    .branch-connector-line { stroke-width: 1.35; stroke-dasharray: 3 3; }
    .branch-map-totals { grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 6px; }
    .branch-map-totals > span { padding: 7px; }
    .branch-mobile-list { display: flex; gap: 6px; margin-top: 8px; padding-bottom: 2px; overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity; }
    .branch-mobile-list a { display: grid; min-width: 190px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 8px; border: 1px solid rgba(123,34,43,.1); border-radius: 11px; background: rgba(255,255,255,.86); scroll-snap-align: start; }
    .branch-mobile-list a > i { display: grid; width: 24px; height: 24px; place-items: center; color: #fff; border-radius: 8px; background: #7e2630; font-size: .58rem; font-style: normal; font-weight: 900; }
    .branch-mobile-list a > span { min-width: 0; }.branch-mobile-list strong, .branch-mobile-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .branch-mobile-list strong { color: #442a2c; font-size: .64rem; }.branch-mobile-list small { margin-top: 2px; color: #8a6d70; font-size: .49rem; }.branch-mobile-list a > b { color: #8a2932; font-size: .57rem; white-space: nowrap; }
    .education-orbit::before { width: 210px; height: 210px; }
    .campus-model { animation: none; transform: scale(.78) translateY(9px); transform-origin: center center; }
    .education-orbit:hover .campus-model { transform: scale(.78) translateY(9px); }
    .education-orbit .orbit-node { width: calc(50% - 6px); min-width: 0; height: 52px; gap: 7px; padding: 7px 9px; border-radius: 13px; animation: none; }
    .education-orbit .orbit-node::after { top: 8px; bottom: 8px; }
    .education-orbit .orbit-node > .icon { width: 18px; height: 18px; }
    .education-orbit .orbit-node strong { font-size: .84rem; }
    .education-orbit .orbit-node small { margin-top: 2px; font-size: .49rem; }
    .education-orbit .node-student { top: 3px; left: 0; }
    .education-orbit .node-teacher { top: 3px; right: 0; }
    .education-orbit .node-assessment { bottom: 3px; left: 0; }
    .education-orbit .node-assignment { right: 0; bottom: 3px; }
    .education-orbit .orbit-link, .education-orbit .orbit-pulse, .campus-status-label { display: none; }
    .command-hero-topline { margin-bottom: 14px; }
    .system-live { display: none; }
    .command-hero-actions { display: grid; width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
    .command-hero-actions .btn { width: 100%; min-width: 0; max-width: 100%; justify-content: center; }
    .command-kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .command-kpi-card { min-height: 185px; padding: 14px; }
    .command-kpi-card footer { display: block; }
    .command-kpi-card footer small { display: none; }
    .kpi-sparkline { left: 48%; }
    .command-card-header { align-items: stretch; flex-direction: column; }
    .dashboard-range { width: 100%; }
    .dashboard-range a { flex: 1; text-align: center; }
    .trend-summary { padding-inline: 14px; }
    .trend-summary > div { padding-right: 12px; }
    .trend-summary > div + div { padding-left: 12px; }
    .trend-summary span { font-size: .55rem; }
    .command-chart { padding-inline: 10px; overflow: hidden; }
    .command-completion-overview { grid-template-columns: 1fr; justify-items: center; }
    .enrollment-command-header { align-items: stretch; flex-direction: column; }
    .enrollment-urgency { width: 100%; }
    .enrollment-funnel-panel, .call-mission-panel { padding: 14px; }
    .enrollment-funnel { grid-template-columns: 1fr 1fr; }
    .enrollment-funnel > i { display: none; }
    .enrollment-progress { grid-template-columns: 1fr; }
    .call-mission-list article { grid-template-columns: auto minmax(0, 1fr); }
    .call-now-button { grid-column: 2; }.call-now-button span { display: inline; }
    .call-mission-empty { grid-template-columns: auto 1fr; }.call-mission-empty .btn { grid-column: 1 / -1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .system-live i, .branch-map-live i, .branch-map-marker, .orbit-node, .orbit-pulse, .chart-area, .chart-line, .enrollment-urgency > i { animation: none !important; }
}

/* Module workspace and Student 360 */
.module-hero { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 17px; align-items: center; margin-bottom: 18px; padding: 22px 24px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--tone, var(--primary)) 22%, var(--border)); border-radius: 18px; background: radial-gradient(circle at 88% 5%, var(--tone-soft, var(--primary-soft)), transparent 38%), #fff; box-shadow: 0 10px 30px rgba(57,66,78,.055); }
.module-hero::after { content: ''; position: absolute; top: -45px; right: 15%; width: 130px; height: 130px; border: 1px solid color-mix(in srgb, var(--tone, var(--primary)) 13%, transparent); border-radius: 50%; }
.module-hero > * { position: relative; z-index: 1; }
.module-hero-icon { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 16px; color: var(--tone, var(--primary)); background: var(--tone-soft, var(--primary-soft)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); }
.module-hero-icon .icon { width: 25px; height: 25px; }
.module-hero h2, .module-hero p { margin: 0; }
.module-hero h2 { margin-top: 3px; font-size: 1.25rem; }
.module-hero div > p:last-child { margin-top: 4px; color: var(--muted); }
.module-hero-actions { display: flex; align-items: center; gap: 9px; }
.card-header-actions { display: flex; align-items: center; gap: 10px; }
.view-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); }
.view-switch button { display: grid; width: 30px; height: 28px; place-items: center; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; }
.view-switch button.active { color: #fff; background: var(--tone, var(--primary)); box-shadow: 0 4px 10px color-mix(in srgb, var(--tone, var(--primary)) 22%, transparent); }
.view-switch .icon { width: 14px; height: 14px; }
.toolbar-hint { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .69rem; }
.toolbar-hint .icon { width: 14px; height: 14px; color: var(--tone, var(--primary)); }
.toolbar-icon-button { display: grid; width: 36px; height: 36px; margin-left: auto; place-items: center; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); background: #fff; cursor: pointer; }
.toolbar-icon-button:hover { color: var(--tone, var(--primary)); border-color: color-mix(in srgb, var(--tone, var(--primary)) 35%, var(--border)); }
.workspace-record-grid .record-item { min-height: 88px; }
.workspace-record-grid .record-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 5px; }
.workspace-record-grid .record-meta i { display: inline-flex; align-items: center; gap: 4px; overflow: hidden; color: #78828d; font-size: .64rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.workspace-record-grid .record-meta .icon { width: 12px; height: 12px; }
.workspace-record-grid .record-state { display: grid; flex: 0 0 auto !important; gap: 8px; justify-items: end; }
.workspace-record-grid[data-view="rows"] { grid-template-columns: 1fr; }
.workspace-record-grid[data-view="rows"] .record-item { min-height: 72px; }
.workspace-record-grid[data-view="rows"] .record-meta { gap: 18px; }
.form-section-title, .panel-section-heading { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.form-section-title > .icon, .panel-section-heading > span { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--tone, var(--primary)); background: var(--tone-soft, var(--primary-soft)); }
.panel-section-heading > span .icon { width: 18px; height: 18px; }
.form-section-title strong, .form-section-title small, .panel-section-heading strong, .panel-section-heading small { display: block; }
.form-section-title small, .panel-section-heading small { color: var(--muted); font-size: .68rem; }
.student-profile-header { padding-block: 17px; }
.student-profile-modal .modal-shell { height: min(880px, 88vh); }
.student-profile-modal .student-profile-body { overflow-y: auto; scroll-behavior: smooth; }
.student-profile-modal .profile-tabs { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: 0 0 auto; margin: 0; overflow: hidden; box-shadow: 0 8px 18px rgba(50,72,82,.08); }
.student-profile-modal .profile-tabs button { min-width: 0; white-space: nowrap; }
.student-profile-modal .profile-panel { min-height: 0; }
.student-profile-avatar { display: grid; width: 52px; height: 52px; flex: 0 0 auto; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(145deg, #447fba, #2e679e); font-size: 1.12rem; font-weight: 850; box-shadow: 0 8px 18px rgba(50,105,156,.18); }
.code-year { --code-color: #2463d4; --code-soft: #eaf2ff; --code-border: #b9d1fb; }
.code-company { --code-color: #2463d4; --code-soft: #eaf2ff; --code-border: #b9d1fb; }
.code-region { --code-color: #c1527a; --code-soft: #fdebf2; --code-border: #efbdd0; }
.code-department { --code-color: #7c43bd; --code-soft: #f1e9fb; --code-border: #d3b9ee; }
.code-unit { --code-color: #087f75; --code-soft: #e4f7f4; --code-border: #a9ddd6; }
.code-class { --code-color: #7c43bd; --code-soft: #f1e9fb; --code-border: #d3b9ee; }
.code-sequence { --code-color: #b95c0b; --code-soft: #fff0dd; --code-border: #f3c994; }
.business-code-builder { display: grid; gap: 12px; padding: 15px; border: 1px solid #cfe0ee; border-radius: 15px; background: radial-gradient(circle at 93% 0, #e9f3ff, transparent 35%), linear-gradient(145deg, #fff, #f8fbfd); box-shadow: 0 8px 22px rgba(55,84,111,.07); transition: border-color .16s ease, background .16s ease; }
.business-code-builder > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.business-code-builder > header strong, .business-code-builder > header small { display: block; }
.business-code-builder > header strong { color: #2b4157; font-size: .82rem; }
.business-code-builder > header small { margin-top: 2px; color: var(--muted); font-size: .64rem; }
.business-code-builder-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: #2463d4; background: #eaf2ff; }
.business-code-builder-icon .icon { width: 18px; height: 18px; }
.business-code-state { padding: 5px 8px; border: 1px solid #b9dacd; border-radius: 999px; color: #176b50; background: #ecf9f4; font-size: .61rem; font-weight: 850; white-space: nowrap; }
.business-code-display { display: flex; align-items: stretch; justify-content: center; gap: 5px; }
.business-code-display > span { display: grid; min-width: 48px; min-height: 43px; place-items: center; padding: 8px 10px; border: 1px solid var(--code-border); border-radius: 10px; color: var(--code-color); background: var(--code-soft); font-family: "SFMono-Regular", Consolas, monospace; font-size: 1rem; font-weight: 900; letter-spacing: .08em; }
.business-code-display > span:last-of-type { min-width: 64px; }
.business-code-display > i { align-self: center; color: #9aa8b6; font-style: normal; font-weight: 800; }
.business-code-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; }
.business-code-legend span { display: inline-flex; align-items: center; gap: 5px; color: #657587; font-size: .61rem; font-weight: 700; }
.business-code-legend b { width: 7px; height: 7px; border-radius: 50%; background: var(--code-color); box-shadow: 0 0 0 3px var(--code-soft); }
.business-code-builder > p { margin: 0; color: #64778b; font-size: .68rem; line-height: 1.5; text-align: center; }
.business-code-impact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 10px; border: 1px solid #efd6a9; border-radius: 11px; background: #fffaf0; list-style: none; }
.business-code-impact li { display: grid; gap: 2px; min-width: 0; }
.business-code-impact strong { color: #7c5b21; font-size: .6rem; text-transform: uppercase; letter-spacing: .04em; }
.business-code-impact span { overflow: hidden; color: #584b36; font-size: .66rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.business-code-builder.is-changing { border-color: #e8bf74; background: radial-gradient(circle at 93% 0, #fff0cf, transparent 35%), linear-gradient(145deg, #fff, #fffcf5); }
.business-code-builder.is-changing .business-code-state { color: #8a5a08; border-color: #edcb8c; background: #fff4dc; }
.business-code-builder.is-invalid { border-color: #e6a5ad; background: #fff8f8; }
.business-code-builder.is-invalid .business-code-state { color: #9d3442; border-color: #ebb6bd; background: #fff0f2; }
.business-code-confirmation-modal { width: min(610px, calc(100vw - 28px)); z-index: 300; }
.business-code-confirmation-modal .modal-body { align-content: start; background: #f8fafc; }
.business-code-confirm-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.business-code-confirm-flow code { display: grid; min-height: 52px; place-items: center; padding: 10px; overflow: hidden; border: 1px solid #d8e2ec; border-radius: 12px; color: #31465c; background: #fff; font-size: 1rem; font-weight: 850; letter-spacing: .06em; text-overflow: ellipsis; }
.business-code-confirm-flow code:last-child { color: #176b50; border-color: #addbc9; background: #effaf5; }
.business-code-confirm-flow > span { color: #8b99a7; font-size: 1.25rem; font-weight: 800; }
.business-code-confirm-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.business-code-confirm-list li { display: grid; grid-template-columns: 135px minmax(0, 1fr); gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.business-code-confirm-list strong { color: #657587; font-size: .68rem; }
.business-code-confirm-list span { color: #35475a; font-size: .7rem; font-weight: 750; }
.business-code-confirm-notice { margin: 0; padding: 11px 12px; color: #315d76; border: 1px solid #c8e1ec; border-radius: 10px; background: #eef8fc; font-size: .68rem; line-height: 1.5; }
.modal-delete-strip { display: flex; justify-content: flex-start; padding: 0 20px 18px; background: #fff; }
.student-code-inspector { position: relative; display: inline-flex; max-width: 100%; align-items: center; border-radius: 8px; outline: none; vertical-align: middle; }
.student-code-inspector:focus-visible { box-shadow: 0 0 0 3px rgba(52,120,212,.2); }
.student-code-ribbon { display: inline-flex; max-width: 100%; align-items: stretch; overflow: hidden; border: 1px solid #d9e1e8; border-radius: 7px; background: #fff; box-shadow: 0 2px 7px rgba(45,58,72,.06); }
.student-code-part { display: inline-flex; min-width: 25px; align-items: center; justify-content: center; padding: 3px 5px; border-right: 1px solid var(--code-border); color: var(--code-color); background: var(--code-soft); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .72rem; font-weight: 850; line-height: 1.25; letter-spacing: .045em; }
.student-code-part:last-child { min-width: 35px; border-right: 0; }
.business-code-ribbon .student-code-part { cursor: help; transition: filter .14s ease, box-shadow .14s ease; }
.business-code-ribbon .student-code-part:hover { z-index: 1; filter: saturate(1.14); box-shadow: inset 0 0 0 1px var(--code-color); }
.student-code-inspector::after { content: ''; position: absolute; right: -5px; bottom: -4px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: #3478d4; box-shadow: 0 1px 3px rgba(28,58,91,.28); }
.student-code-unavailable { color: var(--muted); font-size: .75rem; }
.student-code-tooltip { position: absolute; top: calc(100% + 11px); left: 0; z-index: 120; display: grid; width: min(340px, calc(100vw - 34px)); gap: 12px; padding: 14px; border: 1px solid #d8e2ec; border-radius: 15px; color: var(--text); background: rgba(255,255,255,.985); box-shadow: 0 20px 55px rgba(33,47,64,.2); opacity: 0; pointer-events: none; text-align: left; transform: translateY(-5px) scale(.985); transform-origin: top left; transition: opacity .16s ease, transform .16s ease; }
.student-code-tooltip::before { content: ''; position: absolute; top: -6px; left: 24px; width: 10px; height: 10px; border-top: 1px solid #d8e2ec; border-left: 1px solid #d8e2ec; background: #fff; transform: rotate(45deg); }
.student-code-inspector:hover .student-code-tooltip, .student-code-inspector:focus .student-code-tooltip, .student-code-inspector.is-open .student-code-tooltip, .record-item:focus-visible .student-code-on-card .student-code-tooltip { opacity: 1; pointer-events: auto; transform: none; }
.student-code-tooltip-head { display: flex; min-width: 0; align-items: center; gap: 10px; }
.student-code-tooltip-head > span:last-child { min-width: 0; }
.student-code-tooltip-head strong, .student-code-tooltip-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-code-tooltip-head strong { color: #253445; font-size: .83rem; }
.student-code-tooltip-head small { margin-top: 2px; color: #718096; font-size: .66rem; font-weight: 600; }
.student-code-tooltip-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #3478d4; background: #eaf3ff; }
.student-code-tooltip-icon .icon { width: 17px; height: 17px; }
.student-code-tooltip-code { display: flex; justify-content: center; padding: 10px; border-radius: 11px; background: #f7f9fc; }
.student-code-tooltip-code .student-code-part { min-width: 40px; padding: 6px 9px; font-size: .89rem; }
.student-code-tooltip-code .student-code-part:last-child { min-width: 51px; }
.student-code-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.student-code-facts > span { position: relative; display: grid; min-width: 0; grid-template-columns: 8px minmax(0, 1fr); gap: 1px 7px; padding: 8px 9px; border: 1px solid #e7ecf1; border-radius: 10px; background: #fff; }
.student-code-facts .code-dot { grid-row: 1 / 3; width: 7px; height: 7px; align-self: center; border-radius: 50%; background: var(--code-color); box-shadow: 0 0 0 3px var(--code-soft); }
.student-code-facts small, .student-code-facts strong { min-width: 0; }
.student-code-facts small { overflow: hidden; color: #7b8794; font-size: .59rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.student-code-facts strong { color: #344254; font-size: .68rem; line-height: 1.35; }
.student-code-tooltip-foot { padding-top: 8px; border-top: 1px solid #edf0f3; color: #718096; font-size: .61rem; font-weight: 600; line-height: 1.4; text-align: center; }
.student-code-on-card { margin-top: 4px; }
.student-code-on-card .student-code-tooltip { left: -4px; }
.business-code-on-card { margin-top: 0; }
.record-business-code-row { display: flex; min-width: 0; align-items: center; gap: 8px; margin-top: 5px; }
/* Staff directory: aligned rows for scanning, compact groups on smaller screens. */
.staff-directory-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 3px 0 22px; }
.staff-directory-title { display: flex; align-items: center; gap: 10px; }
.staff-directory-title h2 { margin: 0; color: #283747; font-size: 1.18rem; font-weight: 750; letter-spacing: -.02em; }
.staff-directory-title > span { padding: 3px 9px; color: #667085; border: 1px solid #e4e8ed; border-radius: 7px; background: #fff; font-size: .72rem; font-weight: 650; }
.staff-directory-intro p { margin: 7px 0 0; color: #7a8493; font-size: .78rem; line-height: 1.5; }
.staff-directory-intro > .btn { flex-shrink: 0; min-height: 42px; border-radius: 9px; box-shadow: none; }
.staff-directory-shell { --staff-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) 142px minmax(0, 1.2fr) 28px 30px; overflow: visible; border: 1px solid #e3e8e9; border-radius: 14px; background: #fff; box-shadow: 0 4px 20px rgba(29,49,62,.025); }
.staff-directory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; }
.staff-directory-toolbar > .search-box { flex: 1; width: auto; max-width: 460px; min-width: 180px; margin: 0; border-color: #e3e8ed; border-radius: 9px; background: #f9fafb; }
.staff-directory-toolbar .search-box input { min-width: 0; font-size: .76rem; }
.staff-directory-filters { display: flex; gap: 10px; min-width: 0; }
.staff-directory-filters select { width: auto; max-width: 220px; min-height: 40px; padding: 9px 30px 9px 12px; color: #556171; border-color: #e3e8ed; border-radius: 9px; background-color: #fff; font-size: .78rem; }
.staff-directory-columns, .staff-directory-row { display: grid; grid-template-columns: var(--staff-columns); align-items: center; gap: 18px; padding: 0 20px; }
.staff-directory-columns { min-height: 43px; color: #697586; border-block: 1px solid #edf0f2; background: #fafbfc; font-size: .65rem; font-weight: 650; }
.staff-directory-columns > span:nth-last-child(2) { display: grid; place-items: center; }
.staff-directory-columns .icon { width: 15px; height: 15px; }
.staff-directory-row { position: relative; min-height: 88px; padding-block: 17px; color: #334155; border-bottom: 1px solid #edf0f2; text-decoration: none; transition: background .15s ease; }
.staff-directory-row.is-loading::after { position: absolute; top: calc(50% - 7px); right: 27px; }
.staff-directory-row.is-loading .staff-directory-open { visibility: hidden; }
.staff-directory-row:last-child { border-bottom: 0; }
.staff-directory-row:hover { z-index: 2; background: #f5faf8; }
.staff-directory-row:focus-visible { z-index: 3; outline: 2px solid #2e8b6c; outline-offset: -2px; background: #f5faf8; }
.staff-directory-row > span { min-width: 0; }
.staff-directory-person { display: flex; align-items: center; gap: 11px; }
.staff-directory-person > .avatar { width: 36px; height: 36px; border-radius: 11px; color: #637e72; background: #edf4f0; font-size: .8rem; }
.staff-directory-identity { display: grid; min-width: 0; gap: 5px; }
.staff-directory-identity > strong { color: #263647; overflow-wrap: anywhere; font-size: .86rem; font-weight: 700; line-height: 1.4; }
.staff-directory-identity > small { color: #697586; overflow-wrap: anywhere; font-size: .72rem; line-height: 1.4; }
.staff-directory-work { display: grid; gap: 6px; overflow-wrap: anywhere; }
.staff-directory-work > span { color: #4f5e6c; font-size: .78rem; line-height: 1.5; }
.staff-directory-work > small { color: #697586; font-size: .7rem; line-height: 1.5; }
.staff-directory-code { display: grid; justify-items: start; gap: 7px; }
.staff-directory-code .student-code-unavailable { color: #a0a8b3; font-size: .7rem; }
.staff-directory-code .business-code-on-card { margin: 0; }
.staff-directory-access { display: grid; gap: 8px; }
.staff-directory-roles { display: flex; flex-wrap: wrap; gap: 5px; }
.staff-directory-roles > span { max-width: 100%; padding: 3px 7px; color: #586675; border: 1px solid #e8edf0; border-radius: 5px; background: #f6f8fa; overflow-wrap: anywhere; font-size: .68rem; font-weight: 600; line-height: 1.5; }
.staff-directory-login { display: flex; align-items: center; gap: 5px; color: #697586; font-size: .65rem; line-height: 1.5; }
.staff-directory-login > .icon { width: 12px; height: 12px; flex-shrink: 0; }
.staff-directory-label { display: none; color: #697586; font-size: .62rem; }
.staff-directory-row .staff-account-status { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 4px; justify-self: center; }
.staff-account-status .icon { width: 14px; height: 14px; }
.staff-directory-open { display: grid; width: 30px; height: 30px; place-items: center; color: #97a1ad; border-radius: 7px; }
.staff-directory-open .icon { width: 16px; height: 16px; }
.staff-directory-row:hover .staff-directory-open { color: #2b7259; background: #e7f1eb; }
.staff-directory-shell .list-result-bar { padding: 15px 20px; color: #697586; border-top: 1px solid #edf0f2; font-size: .67rem; }
@media (max-width: 1150px) {
    .staff-directory-shell { --staff-columns: minmax(0, 1.2fr) minmax(0, 1fr) 132px minmax(0, 1fr) 24px 28px; }
    .staff-directory-columns, .staff-directory-row { gap: 12px; padding-inline: 16px; }
    .staff-directory-toolbar { flex-wrap: wrap; }
    .staff-directory-toolbar > .search-box { max-width: none; }
    .staff-directory-filters select { max-width: 180px; }
}
@media (max-width: 1000px) {
    .staff-directory-columns { display: none; }
    .staff-directory-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 15px 22px; padding: 20px; }
    .staff-directory-person { grid-column: 1 / -1; padding-right: 70px; }
    .staff-directory-work { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-left: 47px; }
    .staff-directory-work > small { padding-left: 12px; border-left: 1px solid #e0e5e9; }
    .staff-directory-code { align-content: start; }
    .staff-directory-label { display: block; margin: 0 0 1px; }
    .staff-directory-access { gap: 6px; }
    .staff-directory-row .staff-account-status { position: absolute; top: 22px; right: 58px; }
    .staff-directory-open { position: absolute; top: 19px; right: 18px; }
}
@media (max-width: 560px) {
    .staff-directory-intro { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 18px; }
    body:has(.staff-directory-shell) .topbar { gap: 8px; }
    body:has(.staff-directory-shell) .topbar-feature { display: none; }
    body:has(.staff-directory-shell) .topbar h1 { font-size: 1rem; line-height: 1.35; }
    .staff-directory-intro > .btn { width: 100%; justify-content: center; }
    .staff-directory-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 15px; }
    .staff-directory-toolbar > .search-box { width: 100%; min-width: 0; }
    .staff-directory-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
    .staff-directory-filters select { width: 100%; min-width: 0; max-width: none; font-size: .69rem; }
    .staff-directory-row { grid-template-columns: 142px minmax(0, 1fr); gap: 14px 16px; padding: 18px 15px; }
    .staff-directory-person { padding-right: 60px; }
    .staff-directory-row .staff-account-status { top: 21px; right: 49px; }
    .staff-directory-open { top: 18px; right: 12px; }
    .staff-directory-work { padding-left: 0; }
    .staff-directory-work > small { padding-left: 0; border: 0; }
    .staff-directory-identity > strong { font-size: .8rem; }
    .staff-directory-shell .list-result-bar { align-items: flex-start; gap: 8px; padding: 14px 15px; font-size: .62rem; }
}
@media (max-width: 360px) {
    .staff-directory-filters { grid-template-columns: minmax(0, 1fr); }
}
/* Staff profile editor: fixed control heights and top-aligned field content. */
.modal.modal-record.staff-editor { width: min(980px, calc(100vw - 28px)); max-height: min(90dvh, 900px); border-radius: 16px; }
.staff-editor .modal-shell { max-height: min(90dvh, 900px); border: 1px solid #e5e9ed; border-radius: 16px; }
.staff-editor .staff-editor-header { gap: 14px; padding: 21px 26px; background: #fff; border-color: #e9edf1; }
.staff-editor-header > .avatar { width: 46px; height: 46px; color: #61796e; border-radius: 13px; background: #eef4f0; }
.staff-editor-header .eyebrow { color: #7d8794; font-size: .6rem; letter-spacing: .1em; }
.staff-editor-header h2 { margin: 4px 0 6px; color: #293849; font-size: 1.15rem; line-height: 1.35; overflow-wrap: anywhere; }
.staff-editor-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: #818b98; font-size: .7rem; }
.staff-editor .staff-editor-body { align-content: start; gap: 0; padding: 0 26px; overflow-x: hidden; background: #fff; scrollbar-gutter: stable; }
.staff-editor-section { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: start; gap: 26px; padding: 25px 0; border-bottom: 1px solid #edf0f3; }
.staff-editor-section:last-child { border-bottom: 0; }
.staff-editor-section-title { display: flex; align-items: flex-start; gap: 9px; padding-top: 2px; }
.staff-editor-section-title > .icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: #748578; }
.staff-editor-section-title h3 { margin: 0; color: #354456; font-size: .8rem; font-weight: 700; line-height: 1.5; }
.staff-editor-section-title p { margin: 7px 0 0; color: #8a93a0; font-size: .68rem; line-height: 1.65; }
.staff-editor-section-content { display: grid; min-width: 0; gap: 18px; }
.staff-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px 20px; min-width: 0; }
.staff-editor-grid > label { display: flex; min-width: 0; align-self: start; flex-direction: column; align-items: stretch; gap: 7px; color: #4c5a6c; font-size: .76rem; font-weight: 600; line-height: 20px; }
.staff-editor-grid .field-caption { min-height: 20px; }
.staff-editor-grid input:not([type="checkbox"]):not([type="hidden"]), .staff-editor-grid select { width: 100%; height: 42px; min-height: 42px; flex: 0 0 42px; padding: 10px 12px; color: #354456; border: 1px solid #dfe5ec; border-radius: 8px; background: #fff; font-size: .79rem; font-weight: 500; line-height: 20px; }
.staff-editor-grid input[readonly] { color: #667486; background: #f7f9fb; }
.staff-editor-grid input:focus, .staff-editor-grid select:focus { outline: 0; border-color: #cd7668; box-shadow: 0 0 0 3px rgba(205,118,104,.1); }
.staff-editor-grid .field-hint, .staff-editor-grid label > small { margin: 0; color: #86909e; font-size: .64rem; font-weight: 400; line-height: 1.6; }
.staff-editor-grid .muted { font-size: .66rem; font-weight: 400; }
.staff-editor-code-field { min-width: 0; }
.staff-editor-code-field input { font-family: Consolas, monospace; letter-spacing: .06em; }
.staff-editor .staff-editor-code-details { display: block; align-self: start; min-width: 0; margin-top: 27px; padding: 0; border: 1px solid #e5eaf0; border-radius: 9px; background: #fafbfc; box-shadow: none; }
.staff-editor-code-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; cursor: pointer; list-style: none; }
.staff-editor-code-details > summary::-webkit-details-marker { display: none; }
.staff-editor-code-details:not([open]) > summary { min-height: 40px; padding-block: 7px; }
.staff-editor-code-details > summary > span:first-child { display: flex; align-items: center; gap: 7px; color: #667486; font-size: .7rem; font-weight: 600; }
.staff-editor-code-details > summary .icon { width: 14px; height: 14px; transition: transform .15s ease; }
.staff-editor-code-details[open] > summary .icon { transform: rotate(90deg); }
.staff-editor-code-details[open] > summary { border-bottom: 1px solid #e5eaf0; }
.staff-editor-code-details > .business-code-display { gap: 4px; margin: 15px 10px 12px; }
.staff-editor-code-details .business-code-display > span { min-width: 36px; min-height: 34px; padding: 6px 8px; border-radius: 7px; font-size: .82rem; }
.staff-editor-code-details .business-code-display > span:last-of-type { min-width: 46px; }
.staff-editor-code-details > .business-code-legend { gap: 6px 10px; margin: 0 12px 10px; }
.staff-editor-code-details > p { margin: 0 13px 14px; font-size: .65rem; }
.staff-editor-code-details > .business-code-impact { margin: 12px; }
.staff-editor-active { display: flex; height: 42px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #e5eaf0; border-radius: 8px; background: #fafbfc; cursor: pointer; }
.staff-editor-active > span { color: #4c5a6c; font-size: .73rem; font-weight: 500; }
.staff-editor-active input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: #c95947; }
.staff-editor-roles { min-width: 0; margin: 0; padding: 0; border: 0; }
.staff-editor-roles > legend { margin-bottom: 10px; color: #4c5a6c; font-size: .76rem; font-weight: 600; }
.staff-editor-roles .check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.staff-editor-roles .check-row { display: flex; min-width: 0; min-height: 40px; gap: 9px; margin: 0; padding: 9px 11px; border: 1px solid #e5eaf0; border-radius: 8px; color: #667486; font-size: .72rem; font-weight: 500; cursor: pointer; }
.staff-editor-roles .check-row:has(input:checked) { color: #68594f; border-color: #e8c4bc; background: #fcf6f3; }
.staff-editor-roles .check-row input { width: 15px; height: 15px; flex-shrink: 0; margin: 0; accent-color: #c95947; }
.staff-editor-last-login { display: flex; align-items: center; gap: 6px; margin: 0; color: #8a93a0; font-size: .65rem; line-height: 1.5; }
.staff-editor-last-login > .icon { width: 13px; height: 13px; flex-shrink: 0; }
.staff-editor .staff-editor-footer { align-items: center; padding: 15px 26px; border-color: #e9edf1; background: #fff; }
.staff-editor-footer > .btn { min-height: 40px; border-radius: 8px; box-shadow: none; font-size: .76rem; }
.staff-editor-footer > .staff-editor-reset { margin-right: auto; padding-inline: 0; color: #8a6c61; }
@media (min-width: 561px) {
    .staff-editor-grid > label:nth-child(even) .field-help-tooltip { right: -10px; left: auto; transform-origin: top right; }
    .staff-editor-grid > label:nth-child(even) .field-help-tooltip::after { right: 14px; left: auto; }
}
@media (max-width: 800px) {
    .staff-editor-section { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .staff-editor-section-title p { margin-top: 3px; }
    .staff-editor-roles .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .staff-editor .staff-editor-header { align-items: flex-start; gap: 11px; padding: 17px; }
    .staff-editor-header > .avatar { width: 38px; height: 38px; }
    .staff-editor-header h2 { font-size: 1rem; }
    .staff-editor-header .modal-close { width: 28px; height: 28px; flex-shrink: 0; }
    .staff-editor .staff-editor-body { padding: 0 17px; }
    .staff-editor-section { gap: 16px; padding: 20px 0; }
    .staff-editor-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .staff-editor .staff-editor-code-details { margin-top: 0; }
    .staff-editor-roles .check-grid { grid-template-columns: minmax(0, 1fr); }
    .staff-editor .staff-editor-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 17px; }
    .staff-editor-footer > .staff-editor-reset { grid-column: 1 / -1; justify-self: start; min-height: 30px; padding-block: 0; }
    .staff-editor-code-details > summary { padding: 10px; }
    .staff-editor-code-details > summary > span:first-child { font-size: .64rem; }
    .staff-editor-code-details .business-code-display > span { min-width: 29px; padding-inline: 5px; font-size: .73rem; }
    .staff-editor-code-details .business-code-display > span:last-of-type { min-width: 37px; }
}
.record-business-code-row > small { display: inline !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-business-code-row > small::before { margin-right: 7px; color: #a4afba; content: '·'; }
.modal-business-code { width: fit-content; overflow: visible; }
.business-code-list { overflow: visible; }
.business-code-list .record-item { position: relative; }
.business-code-list .record-item:hover, .business-code-list .record-item:focus-visible { z-index: 15; }
.student-code-list { overflow: visible; }
.student-code-list .record-item { position: relative; }
.student-code-list .record-item:hover, .student-code-list .record-item:focus-visible { z-index: 15; }
.profile-code-meta { overflow: visible !important; }
.profile-code-meta > .icon { flex: 0 0 auto; }
.student-code-in-profile .student-code-tooltip { top: calc(100% + 13px); }
.business-code-in-profile .student-code-tooltip { top: calc(100% + 13px); }
.student-code-in-detail .student-code-tooltip { top: auto; bottom: calc(100% + 11px); }
.student-code-in-detail .student-code-tooltip::before { top: auto; bottom: -6px; border: 0; border-right: 1px solid #d8e2ec; border-bottom: 1px solid #d8e2ec; }
.business-code-in-detail .student-code-tooltip { top: auto; bottom: calc(100% + 11px); }
.business-code-in-detail .student-code-tooltip::before { top: auto; bottom: -6px; border: 0; border-right: 1px solid #d8e2ec; border-bottom: 1px solid #d8e2ec; }
.student-code-guide-modal { width: min(980px, calc(100vw - 28px)); }
.student-code-guide-header { background: radial-gradient(circle at 78% 0, #e4efff, transparent 42%), linear-gradient(135deg, #fff, #f4f8ff); }
.student-code-guide-body { grid-auto-rows: max-content; align-content: start; gap: 18px; background: #f8fafc; }
.code-guide-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 22px; overflow: hidden; border: 1px solid #dfe7f0; border-radius: 17px; background: radial-gradient(circle at 90% 10%, #e5efff, transparent 38%), #fff; }
.code-guide-hero h3 { margin: 7px 0 3px; color: #23364b; font-family: "SFMono-Regular", Consolas, monospace; font-size: 1.75rem; letter-spacing: .08em; }
.code-guide-hero p { max-width: 590px; margin: 0; color: var(--muted); line-height: 1.55; }
.guide-kicker { display: inline-flex; align-items: center; gap: 6px; color: #3478d4; font-size: .65rem; font-weight: 850; letter-spacing: .1em; }
.guide-kicker .icon { width: 14px; height: 14px; }
.guide-code-display { display: flex; overflow: hidden; border: 1px solid #d6e0eb; border-radius: 12px; box-shadow: 0 12px 28px rgba(50,74,102,.12); }
.guide-code-display .student-code-part { min-width: 60px; padding: 15px 12px; font-size: 1.18rem; }
.guide-code-display .student-code-part:last-child { min-width: 78px; }
.code-guide-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 9px; }
.code-guide-step { position: relative; display: grid; min-width: 0; gap: 10px; padding: 15px; overflow: hidden; border: 1px solid var(--code-border); border-radius: 14px; background: linear-gradient(145deg, #fff, var(--code-soft)); }
.code-guide-step::after { content: ''; position: absolute; right: -18px; bottom: -22px; width: 70px; height: 70px; border-radius: 50%; background: var(--code-color); opacity: .06; }
.code-guide-step > strong { color: var(--code-color); font-family: "SFMono-Regular", Consolas, monospace; font-size: 1.45rem; letter-spacing: .06em; }
.code-guide-step h4, .code-guide-step p { margin: 0; }
.code-guide-step h4 { color: #334155; font-size: .78rem; }
.code-guide-step p { margin-top: 3px; color: #718096; font-size: .66rem; line-height: 1.4; }
.guide-step-number { position: absolute; top: 9px; right: 10px; color: var(--code-color); font-size: .58rem; font-weight: 850; opacity: .55; }
.code-guide-plus { display: grid; place-items: center; color: #9aa7b5; font-size: 1.15rem; font-weight: 700; }
.code-guide-reading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px; }
.code-guide-result, .code-guide-tip { display: flex; align-items: flex-start; gap: 12px; padding: 15px 16px; border-radius: 14px; }
.code-guide-result { color: #195f4c; border: 1px solid #bfe5d8; background: #edfaf5; }
.code-guide-tip { color: #315d92; border: 1px solid #c9daf1; background: #eff6ff; }
.code-guide-result > span, .code-guide-tip > span { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: rgba(255,255,255,.72); }
.code-guide-result strong, .code-guide-result small, .code-guide-tip strong { display: block; }
.code-guide-result small { margin-bottom: 3px; font-size: .58rem; font-weight: 850; letter-spacing: .08em; }
.code-guide-result strong, .code-guide-tip strong { font-size: .74rem; line-height: 1.5; }
.code-guide-tip p { margin: 3px 0 0; color: #5e7590; font-size: .67rem; line-height: 1.5; }
.code-guide-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.code-guide-rules > div { display: flex; gap: 11px; padding: 14px; border: 1px solid #e0e6ec; border-radius: 13px; background: #fff; }
.code-guide-rules > div > span { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #64748b; background: #f1f5f9; }
.code-guide-rules p { margin: 0; }
.code-guide-rules strong, .code-guide-rules small { display: block; }
.code-guide-rules strong { color: #344254; font-size: .75rem; }
.code-guide-rules small { margin-top: 3px; color: #718096; font-size: .65rem; line-height: 1.5; }
.code-guide-rules code { padding: 1px 4px; border-radius: 4px; color: #315d92; background: #edf3fb; }
.guide-footer-note { display: inline-flex; margin-right: auto; align-items: center; gap: 7px; color: #667485; font-size: .67rem; font-weight: 650; }
.guide-footer-note .icon { color: #168a82; }
.profile-header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 13px; margin-top: 5px; color: var(--muted); font-size: .68rem; }
.profile-header-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.profile-header-meta .icon { width: 13px; height: 13px; }
.student-profile-form { display: contents; }
.student-profile-body { gap: 14px; padding-top: 15px; align-content: start; grid-auto-rows: max-content; }
.student-daily-quick-action { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px; border: 1px solid #cfe6de; border-radius: 12px; background: #f0faf5; }
.student-daily-quick-action > div:first-child { display: flex; min-width: 0; align-items: center; gap: 10px; }
.student-daily-quick-icon { display: grid; width: 38px; height: 38px; flex-shrink: 0; place-items: center; border-radius: 10px; color: #166534; background: #dcfce7; }
.student-daily-quick-action strong, .student-daily-quick-action small { display: block; }
.student-daily-quick-action small { margin-top: 3px; color: var(--muted); font-size: .72rem; overflow-wrap: anywhere; }
.student-daily-quick-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 600px) { .student-daily-quick-buttons { width: 100%; } .student-daily-quick-buttons .btn { flex: 1 1 auto; justify-content: center; } }
.profile-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.profile-kpis > div { display: grid; grid-template-columns: auto 1fr; gap: 0 9px; align-items: center; padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px; background: linear-gradient(145deg, #fff, var(--surface-soft)); }
.profile-kpis > div > span { grid-row: 1 / 3; display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.profile-kpis strong, .profile-kpis small { display: block; }
.profile-kpis strong { font-size: 1.05rem; }
.profile-kpis small { color: var(--muted); font-size: .66rem; }
.profile-tabs { display: flex; gap: 5px; padding: 5px; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.profile-tabs button { display: inline-flex; min-height: 38px; flex: 1 0 auto; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 8px; color: #687582; background: transparent; font-size: .72rem; font-weight: 760; cursor: pointer; }
.profile-tabs button:hover { color: var(--tone, #60758b); background: var(--tone-soft, #edf2f6); }
.profile-tabs button.active { color: #fff; background: var(--tone, #60758b); box-shadow: 0 6px 13px color-mix(in srgb, var(--tone, #60758b) 24%, transparent); }
.profile-tabs .icon { width: 15px; height: 15px; }
.student-profile-modal .modal-body { min-width: 0; overflow-x: hidden; align-content: start; }
.student-profile-modal .modal-body > * { min-width: 0; }
.student-profile-modal .profile-tabs { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-width: 0; min-height: 58px; overflow: hidden; box-shadow: 0 5px 12px rgba(45,55,67,.08); }
.student-profile-modal .profile-tabs button { width: 100%; min-width: 0; min-height: 44px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.student-profile-modal .profile-tabs button .icon { flex: 0 0 auto; }
.student-profile-modal .profile-panel { min-width: 0; }
.student-profile-modal.has-document-tab .profile-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.profile-panel { display: grid; gap: 14px; animation: panel-in .16s ease; }
@keyframes panel-in { from { opacity: .35; transform: translateY(3px); } }
.profile-active-toggle { padding: 12px; border-radius: 10px; background: #f1faf6; }
.profile-entity-list, .profile-timeline, .profile-resource-list { display: grid; gap: 7px; }
.profile-entity-list > a, .profile-timeline > a, .profile-resource-list > a { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 11px; background: #fff; transition: .12s ease; }
.profile-entity-list > a:hover, .profile-timeline > a:hover, .profile-resource-list > a:hover { border-color: #dfa49a; background: #f1f3f6; transform: translateX(2px); }
.profile-entity-list > a > span:nth-child(2), .profile-timeline > a > span:nth-child(2), .profile-resource-list > a > span:nth-child(2) { min-width: 0; flex: 1; }
.profile-entity-list strong, .profile-entity-list small, .profile-timeline strong, .profile-timeline small, .profile-resource-list strong, .profile-resource-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-entity-list small, .profile-timeline small, .profile-resource-list small { color: var(--muted); font-size: .68rem; }
.profile-timeline time { flex: 0 0 auto; color: var(--primary-dark); font-size: .68rem; font-weight: 780; }
.profile-resource-list > a > span:first-child { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #087e91; background: #e6f7fa; }
.student-document-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid #d7e9e6; border-radius: 11px; background: #f4fcfa; color: var(--muted); font-size: .68rem; }
.student-document-toolbar > span { display: inline-flex; min-width: 0; align-items: center; gap: 6px; }
.student-document-toolbar > span .icon { width: 14px; height: 14px; color: #168a82; }
.student-document-add-button { min-height: 42px; padding-inline: 17px; box-shadow: 0 9px 20px rgba(165,47,35,.25); }
.student-document-add-button .icon { width: 17px; height: 17px; }
.student-document-list { display: grid; gap: 9px; }
.student-document-card { display: grid; gap: 9px; padding: 13px; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
.student-document-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.student-document-card-head > div:nth-child(2) { min-width: 0; }
.student-document-card-head strong, .student-document-card-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-document-card-head strong { margin-top: 2px; font-size: .84rem; }
.student-document-card-head small { margin-top: 3px; color: var(--muted); font-size: .67rem; }
.student-document-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--tone, var(--primary)); background: var(--tone-soft, var(--primary-soft)); }
.student-document-icon .icon { width: 18px; height: 18px; }
.student-document-actions { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; }
.student-document-actions .table-action { display: grid; width: 30px; height: 30px; place-items: center; }
.student-document-actions .btn { white-space: nowrap; }
.student-document-card > p { margin: 0; padding-left: 48px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.student-document-delete { justify-self: end; display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; color: #a33d40; border: 0; border-radius: 7px; background: #fff4f4; font-size: .66rem; font-weight: 750; cursor: pointer; }
.student-document-delete:hover { background: #ffe7e7; }
.student-document-delete .icon { width: 13px; height: 13px; }
.student-document-delete-form { display: none; }
.student-document-modal { width: min(700px, calc(100vw - 28px)); }
.student-document-form-body { align-content: start; background: #fbfdfd; }
.student-document-source-fieldset { min-width: 0; margin: 0; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.student-document-source-fieldset > legend { padding: 0 4px; font-size: .77rem; font-weight: 800; }
.student-document-source-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.student-document-source-options > label { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 7px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); cursor: pointer; }
.student-document-source-options > label:has(input:checked) { color: var(--primary-dark); border-color: var(--primary); background: var(--primary-soft); }
.student-document-source-options > label > .icon { width: 15px; height: 15px; color: var(--primary); }
.student-document-source-options strong, .student-document-source-options small { display: block; }
.student-document-source-options strong { font-size: .73rem; }
.student-document-source-options small { margin-top: 2px; color: var(--muted); font-size: .62rem; }

/* Assessment Center */
.assessment-control-deck { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .75fr) auto; gap: 12px; align-items: center; margin-bottom: 16px; padding: 12px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: 0 8px 24px rgba(54,62,74,.05); }
.assessment-control-deck + .page-actions { display: none; }
.assessment-status-summary { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 7px; }
.assessment-status-summary button { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid transparent; border-radius: 10px; color: var(--text); background: var(--surface-soft); cursor: pointer; text-align: left; }
.assessment-status-summary button:hover, .assessment-status-summary button.active { border-color: #e4aaa1; background: #fdf0ee; transform: translateY(-1px); }
.assessment-status-summary .status-icon { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 9px; }
.assessment-status-summary .status-icon .icon { width: 15px; height: 15px; }
.assessment-status-summary button > span:last-child { min-width: 0; }
.assessment-status-summary strong, .assessment-status-summary small { display: block; }
.assessment-status-summary strong { font-size: .92rem; line-height: 1; }
.assessment-status-summary small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
.assessment-quick-search { position: relative; display: flex; min-width: 0; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--search-border); border-radius: 10px; background: var(--search-surface); transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.assessment-quick-search > .icon { width: 17px; height: 17px; color: var(--muted); }
.assessment-quick-search input { min-width: 0; min-height: 39px; flex: 1; padding: 0; border: 0; outline: 0; background: transparent; font-size: .73rem; }
.assessment-quick-search button { display: grid; width: 26px; height: 26px; place-items: center; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.assessment-quick-search button:hover { color: var(--danger); background: #fff0ef; }
.assessment-view-switch { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-soft); }
.assessment-view-switch button { display: inline-flex; min-height: 35px; align-items: center; gap: 6px; padding: 7px 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: .68rem; font-weight: 750; white-space: nowrap; cursor: pointer; }
.assessment-view-switch button:hover { color: var(--tone, #60758b); background: var(--tone-soft, #edf2f6); }
.assessment-view-switch button.active { color: #fff; background: var(--tone, #60758b); box-shadow: 0 5px 12px color-mix(in srgb, var(--tone, #60758b) 24%, transparent); }
.assessment-view-switch .icon { width: 14px; height: 14px; }
.assessment-center-hero ~ [data-paged-list="assessment-list"] .list-toolbar { display: none; }
.assessment-board-view { display: grid; grid-template-columns: repeat(4, minmax(245px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 7px; }
.assessment-board-column { min-height: 430px; padding: 9px; border: 1px solid var(--border); border-radius: 15px; background: #f6f7f9; }
.assessment-board-column > header { display: flex; align-items: center; gap: 8px; padding: 6px 5px 12px; }
.assessment-board-column > header > span { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; }
.assessment-board-column > header strong { flex: 1; font-size: .75rem; }
.assessment-board-column > header small { display: grid; min-width: 25px; height: 25px; place-items: center; border-radius: 999px; background: #fff; font-weight: 820; }
.assessment-board-column > div { display: grid; gap: 8px; }
.assessment-board-card { display: grid; gap: 6px; padding: 12px; border: 1px solid #e3e7ec; border-radius: 11px; background: #fff; box-shadow: 0 4px 12px rgba(59,66,75,.045); transition: .13s ease; }
.assessment-board-card:hover { border-color: #dfa49a; box-shadow: 0 9px 20px rgba(104,52,44,.08); transform: translateY(-2px); }
.assessment-board-card > strong { font-size: .8rem; }
.assessment-board-card > small { color: var(--muted); font-size: .68rem; }
.assessment-card-date, .assessment-card-teacher { display: flex; align-items: center; gap: 5px; color: #7a746b; font-size: .63rem; }
.assessment-card-date .icon, .assessment-card-teacher .icon { width: 12px; height: 12px; }
.assessment-card-teacher { margin-top: 3px; padding-top: 7px; border-top: 1px solid var(--border); }
.board-empty { display: grid; min-height: 115px; place-items: center; align-content: center; gap: 6px; color: #aaa39a; font-size: .7rem; text-align: center; }
.status-column-scheduled > header > span { color: #376080; background: #eaf3fb; }
.status-column-in_progress > header > span { color: #8a5d12; background: #fff1d3; }
.status-column-completed > header > span { color: #176046; background: #e4f5ed; }
.status-column-cancelled > header > span { color: #8f4651; background: #fae9ec; }
.assessment-calendar-view { overflow: hidden; }
.assessment-agenda { display: grid; gap: 0; padding: 9px 20px 20px; }
.assessment-agenda > section { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.assessment-agenda > section:last-child { border-bottom: 0; }
.assessment-agenda > section > header { display: flex; align-items: center; gap: 10px; }
.assessment-agenda > section > header time { display: grid; width: 48px; height: 48px; place-content: center; border-radius: 13px; color: var(--primary-dark); background: var(--primary-soft); text-align: center; }
.assessment-agenda time strong, .assessment-agenda time small, .assessment-agenda > section > header > div strong, .assessment-agenda > section > header > div small { display: block; }
.assessment-agenda time small, .assessment-agenda > section > header > div small { color: var(--muted); font-size: .62rem; }
.assessment-agenda > section > div { display: grid; gap: 6px; }
.assessment-agenda > section > div > a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.assessment-agenda > section > div > a:hover { border-color: #dfa49a; background: #f1f3f6; }
.assessment-agenda > section > div > a > span:nth-child(2) { min-width: 0; flex: 1; }
.assessment-agenda > section > div > a strong, .assessment-agenda > section > div > a small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assessment-agenda > section > div > a small { color: var(--muted); font-size: .66rem; }

/* System-wide polish */
.page-actions { padding: 18px 20px; border: 1px solid var(--border); border-radius: 16px; background: radial-gradient(circle at 90% 0, rgba(220,244,235,.78), transparent 38%), #fff; box-shadow: 0 8px 25px rgba(57,65,76,.045); }
.page-actions .eyebrow { color: var(--primary-dark); }
.page-actions div > p:last-child { margin-top: 3px; }
.table-wrap thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px var(--border); }
.table-wrap tbody tr { transition: background .12s ease, box-shadow .12s ease; }
.table-wrap tbody tr:hover { background: #f1f3f6; }
.card, .module-hero, .assessment-control-deck { transition: border-color .15s ease, box-shadow .15s ease; }
.card:hover { border-color: #e4dccf; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(192,57,43,.2); outline-offset: 2px; }
/* Search fields own one focus indicator on their outer frame. */
.search-box:hover, .assessment-quick-search:hover, .command-input:hover { border-color: #bac3cd; }
.search-box:focus-within, .assessment-quick-search:focus-within, .command-input:focus-within { border-color: var(--primary); background: #fff; box-shadow: var(--search-focus-ring); }
.search-box input:focus, .assessment-quick-search input:focus, .command-input input:focus { outline: none; box-shadow: none; }
.search-box input::placeholder, .assessment-quick-search input::placeholder, .command-input input::placeholder { color: var(--muted); opacity: 1; }
.global-search-trigger:focus-visible { outline: none; border-color: var(--primary); box-shadow: var(--search-focus-ring); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content-grid.split, .assessment-layout { grid-template-columns: minmax(270px, .8fr) minmax(400px, 1.2fr); }
    .audit-filter-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
    .global-search-trigger { width: 48px; padding: 0; justify-content: center; }
    .global-search-trigger > span, .global-search-trigger kbd { display: none; }
    .dashboard-analytics-grid { grid-template-columns: minmax(0, 1.35fr) minmax(285px, .85fr); }
    .completion-overview { grid-template-columns: 1fr; justify-items: center; }
    .assessment-control-deck { grid-template-columns: 1fr auto; }
    .assessment-status-summary { grid-column: 1 / -1; }
}

.guardian-management-body { display: grid; gap: 18px; }
.guardian-management-body .modal-details { padding-bottom: 0; }
.guardian-link-section { margin-inline: 4px; padding: 17px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-soft); }
.guardian-link-form { display: grid; gap: 12px; margin-top: 14px; }
.guardian-link-form .btn { justify-self: start; }
.guardian-assignment-list { display: grid; gap: 8px; margin-top: 14px; }
.guardian-assignment-list article { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.guardian-assignment-list article > span:nth-child(2) { min-width: 0; flex: 1; }
.guardian-assignment-list strong, .guardian-assignment-list small { display: block; }
.guardian-assignment-list small { color: var(--muted); }
.guardian-assignment-list form { margin: 0; }
.tuition-history { margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.tuition-history td { vertical-align: middle; }
.tuition-history .tuition-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tuition-history .tuition-note { min-width: 160px; white-space: pre-line; overflow-wrap: anywhere; }

.parent-portal-page { min-height: 100vh; background: radial-gradient(circle at 8% 4%, rgba(47,143,107,.11), transparent 28%), #f6f7f9; }
.parent-portal-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: calc(82px + var(--safe-area-top)); padding: calc(12px + var(--safe-area-top)) max(22px, calc((100vw - 1120px) / 2)) 12px; border-bottom: 1px solid #e3e7ec; background: rgba(255,255,255,.94); backdrop-filter: blur(16px); }
.parent-portal-header .brand { min-height: 0; padding: 0; }
.parent-portal-header nav, .parent-portal-header nav form { display: flex; align-items: center; gap: 8px; margin: 0; }
.parent-portal-header nav a, .parent-portal-header nav button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: #fff; cursor: pointer; }
.parent-portal-header nav a:hover, .parent-portal-header nav button:hover { color: var(--primary-dark); border-color: #dfa49a; background: var(--primary-soft); }
.parent-portal-main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 calc(60px + var(--safe-area-bottom)); }
.parent-welcome { margin-bottom: 25px; padding: 28px 30px; border: 1px solid #e3e7ec; border-radius: 22px; background: linear-gradient(135deg, #fff, #fdf0ee); box-shadow: var(--shadow); }
.parent-welcome h1 { margin: 5px 0; font-size: clamp(1.55rem, 4vw, 2.25rem); }
.parent-welcome > p:last-child { margin: 0; color: var(--muted); }
.parent-children { padding: 22px; border: 1px solid var(--border); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.parent-section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.parent-section-heading > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; color: var(--primary); background: var(--primary-soft); }
.parent-section-heading > div { min-width: 0; flex: 1; }
.parent-section-heading h2 { margin: 2px 0 0; }
.parent-section-heading > strong { display: grid; min-width: 34px; height: 34px; place-items: center; border-radius: 999px; color: var(--primary); background: var(--primary-soft); }
.parent-child-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.parent-child-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 17px; background: #fff; transition: .16s ease; }
.parent-child-card:hover { border-color: #dfa49a; background: #f6f7f9; box-shadow: 0 10px 24px rgba(85,55,51,.08); transform: translateY(-2px); }
.parent-child-avatar { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 16px; color: #fff; background: var(--primary-gradient); font-size: 1.12rem; font-weight: 850; }
.parent-child-card > span:nth-child(2) { min-width: 0; }
.parent-child-card small, .parent-child-card strong, .parent-child-card i { display: block; }
.parent-child-card small { color: var(--primary-dark); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.parent-child-card strong { margin: 2px 0 5px; font-size: 1.05rem; }
.parent-child-card i { color: var(--muted); font-size: .78rem; font-style: normal; }
.parent-child-card > b { grid-column: 2; display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--primary); font-size: .78rem; }
.parent-empty { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 6px; padding: 24px; border: 1px dashed #e3bbb4; border-radius: 16px; color: var(--muted); background: #f6f7f9; text-align: center; }
.parent-empty > span { color: var(--primary); }
.parent-empty h3, .parent-empty p { margin: 0; }
.parent-portal-header nav a.active { color: #fff; border-color: var(--primary); background: var(--primary-gradient); }
.parent-notification-link { position: relative; }
.parent-notification-link > b { display: grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border-radius: 999px; color: #fff; background: #b8202e; font-size: .64rem; line-height: 1; }
.parent-portal-header nav a.active > b { color: var(--primary-dark); background: #fff; }
.parent-notification-list { display: grid; gap: 11px; }
.parent-notification-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; padding: 17px; border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.parent-notification-item.is-unread { border-color: #e2a69d; background: #f1f3f6; box-shadow: inset 4px 0 var(--primary); }
.parent-notification-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: var(--muted); background: var(--surface-soft); }
.parent-notification-item.is-unread .parent-notification-icon { color: var(--primary); background: var(--primary-soft); }
.parent-notification-content { min-width: 0; }
.parent-notification-content > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.parent-notification-content h3 { margin: 3px 0 0; font-size: 1rem; }
.parent-notification-content time { flex: 0 0 auto; color: var(--muted); font-size: .7rem; }
.parent-notification-content > p { margin: 10px 0 13px; color: #4d5662; line-height: 1.6; }
.parent-notification-content > footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 15px; padding: 0; color: var(--muted); font-size: .72rem; text-align: left; }
.parent-notification-content > footer > span { display: inline-flex; align-items: center; gap: 5px; }
.parent-notification-content > footer form { margin: 0 0 0 auto; }
.notification-state { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.is-unread .notification-state { color: var(--primary-dark); }

/* Parent workspace: fixed navigation and contextual notification drawer */
.parent-app-shell .sidebar { border-right-color: #e3e7ec; }
.parent-app-shell .nav a { position: relative; }
.parent-app-shell .parent-notification-link > b { margin-left: auto; }
.parent-topbar { overflow: visible; }
.parent-notification-menu { position: relative; flex: 0 0 auto; }
.parent-notification-menu > summary { position: relative; list-style: none; }
.parent-notification-menu > summary::-webkit-details-marker { display: none; }
.parent-notification-bell b { position: absolute; top: -6px; right: -6px; display: grid; min-width: 19px; height: 19px; padding: 0 5px; place-items: center; border: 2px solid #fff; border-radius: 999px; color: #fff; background: var(--brand-red); font-size: .58rem; line-height: 1; }
.parent-notification-dropdown { position: absolute; top: calc(100% + 11px); right: 0; z-index: 85; width: min(390px, calc(100vw - 28px)); overflow: hidden; border: 1px solid #ead7d3; border-radius: 17px; background: rgba(255,255,255,.99); box-shadow: 0 22px 60px rgba(54,38,35,.18); animation: modal-in .14s ease; }
.parent-notification-dropdown > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 17px; border-bottom: 1px solid var(--border); background: #f6f7f9; }
.parent-notification-dropdown > header strong, .parent-notification-dropdown > header small { display: block; }
.parent-notification-dropdown > header small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.parent-notification-dropdown > header a { color: var(--primary-dark); font-size: .74rem; font-weight: 800; }
.parent-dropdown-list { max-height: min(440px, calc(100vh - 145px)); overflow-y: auto; }
.parent-dropdown-list > a { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.parent-dropdown-list > a:last-child { border-bottom: 0; }
.parent-dropdown-list > a:hover { background: #f1f3f6; }
.parent-dropdown-list > a.is-unread { background: #f1f3f6; }
.parent-dropdown-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #c9c4c2; }
.parent-dropdown-list > a.is-unread .parent-dropdown-dot { background: var(--brand-red); box-shadow: 0 0 0 4px rgba(192,57,43,.1); }
.parent-dropdown-list strong, .parent-dropdown-list small, .parent-dropdown-list em { display: block; }
.parent-dropdown-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.parent-dropdown-list small { margin: 3px 0 5px; color: var(--muted); font-size: .66rem; }
.parent-dropdown-list em { overflow: hidden; color: #59616d; font-size: .72rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.parent-dropdown-empty { display: flex; align-items: center; gap: 11px; padding: 22px 17px; color: var(--muted); }
.parent-dropdown-empty > .icon { color: var(--primary); }
.parent-dropdown-empty strong, .parent-dropdown-empty small { display: block; }
.parent-dropdown-empty small { margin-top: 2px; font-size: .7rem; }
.parent-portal-page .parent-portal-main { width: min(1180px, 100%); margin: 0 auto; padding: 28px clamp(18px, 3vw, 42px) calc(48px + var(--safe-area-bottom)); }
.parent-portal-page .parent-welcome { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.parent-portal-page .parent-welcome > div:first-child { min-width: 0; }
.parent-quick-stats { display: grid; grid-template-columns: repeat(2, minmax(112px, 1fr)); gap: 9px; flex: 0 0 auto; }
.parent-quick-stats > span { padding: 13px 15px; border: 1px solid #ecd5d0; border-radius: 14px; background: rgba(255,255,255,.8); }
.parent-quick-stats strong, .parent-quick-stats small { display: block; }
.parent-quick-stats strong { color: var(--brand-red); font-size: 1.25rem; }
.parent-quick-stats small { color: var(--muted); font-size: .66rem; }
.btn-small { min-height: 34px; padding: 6px 10px; font-size: .68rem; }

.notification-compose-body { display: grid; gap: 18px; }
.notification-compose-fields { grid-template-columns: 1fr; }
.notification-recipient-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.notification-recipient-fieldset > legend { margin-bottom: 9px; color: var(--text); font-size: .76rem; font-weight: 800; }
.notification-recipient-list { display: grid; gap: 8px; }
.notification-recipient-list > label { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; }
.notification-recipient-list > label:hover { border-color: #dfa49a; background: #f1f3f6; }
.notification-recipient-list input { width: 17px; height: 17px; accent-color: var(--primary); }
.notification-recipient-list label > span:last-child { min-width: 0; flex: 1; }
.notification-recipient-list strong, .notification-recipient-list small { display: block; }
.notification-recipient-list small { margin-top: 2px; color: var(--muted); font-size: .68rem; }

@media (max-width: 850px) {
    .sidebar { transform: translateX(-102%); transition: transform .2s ease; }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-open .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; display: block; background: rgba(14,28,37,.45); }
    .main { margin-left: 0; }
    body.sidebar-collapsed .main { margin-left: 0; }
    body.sidebar-collapsed .sidebar { width: var(--sidebar); padding: calc(22px + var(--safe-area-top)) 16px calc(16px + var(--safe-area-bottom)); }
    body.sidebar-collapsed .brand { justify-content: flex-start; padding: 5px 8px 22px; }
    body.sidebar-collapsed .brand-copy, body.sidebar-collapsed .nav-label, body.sidebar-collapsed .nav-section-label, body.sidebar-collapsed .sidebar-user > div:last-child { display: block; }
    body.sidebar-collapsed .nav a { justify-content: flex-start; padding: 9px 11px; }
    body.sidebar-collapsed .nav-icon { width: 30px; height: 30px; }
    body.sidebar-collapsed .sidebar-user { justify-content: flex-start; padding: 20px 7px 12px; }
    .sidebar-collapse { display: none; }
    .ajax-progress { left: 0; }
    .topbar [data-sidebar-toggle] { display: inline-grid; }
    .content-grid.split, .content-grid.two-thirds, .assessment-layout { grid-template-columns: 1fr; }
    .assessment-list { max-height: 450px; overflow-y: auto; }
    .role-grid { grid-template-columns: 1fr; }
    .audit-intro { grid-template-columns: auto 1fr; }
    .audit-intro-stats { grid-column: 1 / -1; }
    .audit-intro-stats span { flex: 1; }
    .audit-filter-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .management-record-list { grid-template-columns: 1fr; }
    .account-grid { grid-template-columns: 1fr; }
    .module-hero { grid-template-columns: auto 1fr; }
    .module-hero > .btn { grid-column: 1 / -1; width: 100%; }
    .module-hero-actions { grid-column: 1 / -1; width: 100%; }
    .module-hero-actions .btn { flex: 1; justify-content: center; }
    .code-guide-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .code-guide-plus { display: none; }
    .code-guide-reading { grid-template-columns: 1fr; }
    .dashboard-analytics-grid, .dashboard-work-grid { grid-template-columns: 1fr; }
    .completion-overview { grid-template-columns: auto 1fr; justify-items: stretch; }
}

@media (max-width: 560px) {
    .parent-portal-header { min-height: calc(70px + var(--safe-area-top)); padding: calc(10px + var(--safe-area-top)) 12px 10px; }
    .parent-portal-header .brand-copy small, .parent-portal-header nav a > span, .parent-portal-header nav button > span { display: none; }
    .parent-portal-header nav a { padding-inline: 10px; }
    .parent-notification-link > b { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; font-size: .57rem; }
    .parent-portal-header nav button { padding-inline: 10px; }
    .parent-portal-main { width: min(100% - 20px, 1120px); padding: 22px 0 calc(38px + var(--safe-area-bottom)); }
    .parent-welcome, .parent-children { padding: 18px; border-radius: 17px; }
    .parent-child-grid { grid-template-columns: 1fr; }
    .parent-notification-item { grid-template-columns: 1fr; }
    .parent-notification-icon { display: none; }
    .parent-notification-content > header { flex-direction: column; gap: 5px; }
    .parent-notification-content > footer form { width: 100%; margin-left: 0; }
    .parent-topbar .account-menu { display: none; }
    .parent-notification-dropdown { position: fixed; top: calc(66px + var(--safe-area-top)); right: 8px; left: 8px; width: auto; }
    .parent-portal-page .parent-portal-main { width: 100%; padding: 18px 12px calc(35px + var(--safe-area-bottom)); }
    .parent-portal-page .parent-welcome { align-items: stretch; flex-direction: column; gap: 16px; }
    .parent-quick-stats { width: 100%; }
    .guardian-assignment-list article { align-items: flex-start; flex-wrap: wrap; }
    .guardian-assignment-list article form { width: 100%; padding-left: 51px; }
    .page-content { padding: 18px 12px calc(35px + var(--safe-area-bottom)); }
    .topbar { min-height: calc(70px + var(--safe-area-top)); padding: calc(11px + var(--safe-area-top)) 13px 11px; }
    .topbar .eyebrow { display: none; }
    .topbar-breadcrumb { display: none; }
    .topbar-heading { min-width: 0; }
    .global-search-trigger { width: 40px; min-height: 40px; flex: 0 0 auto; }
    .topbar-presence > summary { min-height: 40px; gap: 5px; padding: 5px 7px 5px 5px; }
    .topbar-presence-label small { display: none; }
    .topbar-presence-popover { position: fixed; top: calc(64px + var(--safe-area-top)); right: 10px; width: min(330px, calc(100vw - 20px)); transform-origin: top right; }
    .command-palette { --command-top: 24px; width: calc(100vw - 24px); max-height: calc(100dvh - 48px); border-radius: 14px; }
    .command-shell { max-height: calc(100dvh - 48px); }
    .command-header { padding: 14px; }
    .command-header small, .command-footer { display: none; }
    .command-input { margin: 14px 14px 8px; }
    .command-input input { font-size: 16px; }
    .command-status { margin-inline: 16px; }
    .command-results { padding-inline: 10px; }
    .account-menu summary { min-width: 43px; padding: 4px; border: 0; background: transparent; box-shadow: none; }
    .account-menu summary > span:nth-child(2), .account-menu-chevron { display: none; }
    .account-dropdown { position: fixed; top: 64px; right: 10px; width: min(280px, calc(100vw - 20px)); }
    .account-hero { align-items: flex-start; flex-direction: column; padding: 18px; }
    .account-hero .btn { width: 100%; }
    .account-settings-rail { padding: 8px; border-radius: 16px; }
    .account-tabs a { min-width: 0; min-height: 59px; }
    .account-details > div, .security-facts, .preference-grid { grid-template-columns: 1fr; }
    .avatar-manager { grid-template-columns: auto minmax(0, 1fr); margin: 16px; }
    .avatar-remove-form { grid-column: 2; grid-row: auto; }
    .security-facts { padding: 16px; }
    .hero-card, .page-actions { align-items: stretch; flex-direction: column; }
    .stat-grid, .form-grid, .check-grid { grid-template-columns: 1fr; }
    .card-header, .form-stack { padding: 16px; }
    .modal { width: calc(100vw - 16px); max-height: calc(100vh - 18px); border-radius: 16px; }
    .modal-shell { max-height: calc(100vh - 18px); border-radius: 16px; }
    .student-profile-modal .modal-shell { height: calc(100vh - 18px); }
    .modal-header, .modal-body { padding: 16px; }
    .modal-footer { position: sticky; bottom: 0; padding: 12px 16px; }
    .summary-strip, .details-grid { grid-template-columns: 1fr; }
    .summary-strip > div { border-right: 0; border-bottom: 1px solid var(--border); }
    .assessment-summary-top { align-items: flex-start; flex-direction: column; }
    .summary-actions { width: 100%; justify-content: space-between; }
    .toast-stack { top: calc(10px + var(--safe-area-top)); right: 10px; width: calc(100vw - 20px); }
    .toast-stack-modal { top: 8px; right: 8px; width: calc(100% - 16px); }
    .details > div { grid-template-columns: 1fr; gap: 3px; }
    .record-item .status { display: none; }
    .record-open-hint small { display: none; }
    .modal-subsection-header { align-items: stretch; flex-direction: column; }
    .modal-subsection-header .btn { width: 100%; }
    .login-card { padding: 23px; }
    .audit-intro { grid-template-columns: 1fr; padding: 17px; }
    .audit-intro-icon { width: 46px; height: 46px; }
    .audit-intro-stats { display: grid; grid-template-columns: 1fr 1fr; }
    .audit-search-row { align-items: stretch; flex-direction: column; }
    .audit-search-row .btn { justify-content: center; }
    .audit-filter-grid { grid-template-columns: 1fr; }
    .audit-result-bar { align-items: flex-start; flex-direction: column; }
    .workspace-hero { padding: 23px 20px; }
    .hero-quick-actions { width: 100%; min-width: 0; }
    .workspace-health { display: grid; }
    .workspace-chart { gap: 6px; height: 220px; padding-inline: 12px; }
    .chart-column i { width: 72%; }
    .completion-overview { grid-template-columns: 1fr; justify-items: center; }
    .compact-status-list { width: 100%; }
    .workspace-timeline > a { align-items: flex-start; }
    .workspace-timeline > a > .status { display: none; }
    .module-hero { grid-template-columns: 1fr; padding: 18px; }
    .module-hero-icon { width: 46px; height: 46px; }
    .module-hero-actions { align-items: stretch; flex-direction: column; }
    .student-code-guide-body { padding: 12px; }
    .code-guide-hero { grid-template-columns: 1fr; padding: 17px; }
    .guide-code-display { width: 100%; }
    .guide-code-display .student-code-part { min-width: 0; flex: 1; padding-inline: 7px; }
    .guide-code-display .student-code-part:last-child { min-width: 0; flex: 1.35; }
    .code-guide-flow, .code-guide-rules { grid-template-columns: 1fr; }
    .business-code-builder { padding: 12px; }
    .business-code-builder > header { grid-template-columns: auto minmax(0, 1fr); }
    .business-code-state { grid-column: 1 / -1; justify-self: start; }
    .business-code-display { gap: 3px; }
    .business-code-display > span { min-width: 0; min-height: 39px; flex: 1; padding: 7px 4px; font-size: .82rem; }
    .business-code-display > span:last-of-type { min-width: 0; flex: 1.25; }
    .business-code-display > i { font-size: .7rem; }
    .business-code-legend { justify-content: flex-start; }
    .business-code-impact { grid-template-columns: 1fr; }
    .business-code-confirm-flow { gap: 6px; }
    .business-code-confirm-flow code { min-height: 46px; padding: 7px 4px; font-size: .75rem; }
    .business-code-confirm-list li { grid-template-columns: 1fr; gap: 3px; }
    .guide-footer-note { display: none; }
    .student-code-tooltip { position: fixed; top: auto !important; right: 12px; bottom: calc(12px + var(--safe-area-bottom)); left: 12px !important; z-index: 999; width: auto; transform: translateY(8px) scale(.985); transform-origin: bottom center; }
    .student-code-tooltip::before { display: none; }
    .toolbar-hint { display: none; }
    .workspace-record-grid .record-meta { display: none; }
    .workspace-record-grid .record-state > .status { display: none; }
    .profile-kpis { grid-template-columns: 1fr 1fr 1fr; }
    .profile-kpis > div { grid-template-columns: 1fr; justify-items: center; padding: 9px 5px; text-align: center; }
    .profile-kpis > div > span { grid-row: auto; width: 30px; height: 30px; }
    .profile-tabs { margin-inline: -4px; }
    .student-profile-modal .profile-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 52px; margin-inline: -4px; overflow: hidden; }
    .student-profile-modal .profile-tabs button { min-width: 0; min-height: 40px; padding-inline: 5px; font-size: .64rem; }
    .student-document-toolbar { align-items: stretch; flex-direction: column; }
    .student-document-toolbar .btn { justify-content: center; }
    .student-document-source-options { grid-template-columns: 1fr; }
    .student-document-card-head { grid-template-columns: auto minmax(0, 1fr); }
    .student-document-actions { grid-column: 2; justify-content: flex-start; }
    .student-document-card > p { padding-left: 0; }
    .student-profile-header { align-items: flex-start; }
    .profile-header-meta { gap: 5px 9px; }
    .assessment-control-deck { grid-template-columns: 1fr; }
    .assessment-status-summary { grid-column: auto; grid-template-columns: repeat(2, 1fr); }
    .assessment-view-switch { overflow-x: auto; }
    .assessment-view-switch button { flex: 1 0 auto; }
    .assessment-board-view { grid-template-columns: repeat(4, minmax(225px, 82vw)); }
    .assessment-agenda { padding-inline: 14px; }
    .assessment-agenda > section { grid-template-columns: 1fr; }
    .assessment-agenda > section > header { padding-bottom: 4px; }
    .assessment-agenda > section > div > a > .status { display: none; }
    .pagination { align-items: stretch; flex-wrap: wrap; }
    .pagination-pages { order: -1; width: 100%; justify-content: center; overflow-x: auto; }
    .pagination > a, .pagination > span { flex: 1; }
    .audit-detail-grid { grid-template-columns: 1fr; }
    .audit-metadata dl > div { grid-template-columns: 1fr; gap: 4px; }
    .role-icon-picker > div { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 850px) {
    .audit-filter-panel { padding: 14px; }
    .audit-search-actions { width: 100%; }
    .audit-search-actions .btn { flex: 1; justify-content: center; padding-inline: 10px; color: var(--text); border-color: var(--search-border); background: #fff; box-shadow: none; font-size: .76rem; }
    .audit-search-actions .btn:hover { transform: none; background: var(--search-surface); }
    .audit-advanced-filters { margin-top: 5px; }
    .audit-result-bar { min-height: 0; align-items: center; flex-direction: row; padding: 12px 15px; }
    .audit-result-bar > div { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; }
    .audit-result-bar > div > span { margin: 0; }
    .audit-table-wrap { overflow: visible; contain: none; }
    .audit-table { display: block; min-width: 0; width: 100%; }
    .audit-table thead { display: none; }
    .audit-table tbody { display: grid; gap: 10px; padding: 14px; }
    .audit-row { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'action result' 'actor actor' 'time detail'; align-items: center; gap: 10px 8px; padding: 13px; border: 1px solid var(--search-border); border-radius: 12px; background: #fff; }
    .audit-row > td { display: block; min-width: 0; padding: 0; border: 0; }
    .audit-action-cell { grid-area: action; }
    .audit-result-cell { grid-area: result; justify-self: end; }
    .audit-actor-cell { grid-area: actor; }
    .audit-target-cell { display: none !important; }
    .audit-time-cell { grid-area: time; }
    .audit-detail-cell { grid-area: detail; justify-self: end; }
    .audit-action { min-width: 0; gap: 9px; }
    .audit-action > span { width: 32px; height: 32px; }
    .audit-action strong { font-size: .87rem; line-height: 1.35; }
    .audit-actor { min-width: 0; gap: 8px; }
    .audit-actor .avatar { width: 26px; height: 26px; border-radius: 8px; font-size: .7rem; }
    .audit-actor strong { font-size: .76rem; font-weight: 600; }
    .audit-actor small { display: none; }
    .audit-target { display: flex; min-width: 0; align-items: baseline; gap: 7px; }
    .audit-target strong { flex: 0 0 auto; font-size: .7rem; }
    .audit-target code { min-width: 0; max-width: 100%; margin: 0; }
    .audit-row time { min-width: 0; color: var(--muted); font-size: .7rem; font-weight: 500; }
    .audit-result-cell .status { padding: 4px 7px; font-size: .64rem; }
    .audit-detail-button { width: auto; min-height: 32px; padding: 4px 7px; color: var(--primary-dark); font-size: .7rem; }
    .audit-detail-button span { display: inline; }
}
.news-strip { min-width: 0; margin: 0 0 22px; padding: 18px 20px 12px; border: 1px solid #e2e9f2; border-radius: 18px; background: linear-gradient(115deg, #f5f9ff, #fff 65%); }
.news-strip-header, .news-strip-heading, .news-strip-actions { display: flex; align-items: center; gap: 10px; }
.news-strip-header { justify-content: space-between; margin-bottom: 14px; }
.news-strip-heading { min-width: 0; }
.news-strip-symbol { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 11px; color: #3768a5; background: #e8f0fc; }
.news-strip-heading h2 { margin: 0; font-size: .92rem; }
.news-strip-heading small { color: var(--muted); font-size: .7rem; }
.news-text-button { border: 0; background: transparent; color: #4b637e; font-size: .72rem; font-weight: 600; cursor: pointer; white-space: nowrap; padding: 5px; }
.news-text-button:hover { color: var(--primary-dark); }
.news-arrow { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #dce5ef; border-radius: 9px; background: #fff; color: #3e5a7e; cursor: pointer; font-size: 1.2rem; }
.news-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, calc((100% - 24px) / 3)); gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; padding: 2px 1px 8px; }
.news-tile { --news-accent: #476d9d; position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px 18px 16px; overflow: hidden; background: #fff; border: 1px solid #e4eaf1; border-radius: 14px; color: inherit; text-decoration: none; scroll-snap-align: start; box-shadow: 0 1px 2px rgba(24, 54, 87, .04); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.news-tile::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--news-accent); }
.news-tile:has(.news-category-professional) { --news-accent: #347461; }
.news-tile:has(.news-category-activity) { --news-accent: #8062a0; }
.news-tile:has(.news-category-sharing) { --news-accent: #b08a4f; }
.news-tile:hover { border-color: #c9d8ea; box-shadow: 0 12px 26px rgba(24, 54, 87, .09); transform: translateY(-2px); }
.news-tile:focus-visible { outline: 2px solid var(--news-accent); outline-offset: 3px; }
.news-tile h3 { margin: 0; font-size: .95rem; line-height: 1.45; font-weight: 700; color: #1f2d3d; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.news-tile > p { margin: 0; color: #5b6b7d; font-size: .8rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-category { align-self: flex-start; font-size: .7rem; font-weight: 700; letter-spacing: .01em; color: #476d9d; background: #eef4fd; border-radius: 999px; padding: 3px 10px; }
.news-category-professional { color: #347461; background: #edf7f1; }
.news-category-activity { color: #8062a0; background: #f4eff9; }
.news-category-sharing { color: #8b7047; background: #faf4e9; }
.news-tile footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: auto; padding-top: 11px; border-top: 1px solid #eef2f6; font-size: .72rem; color: #7a8798; }
.news-tile footer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-tile footer small { white-space: nowrap; font-size: inherit; }
.news-empty { color: var(--muted); font-size: .8rem; }
.news-is-collapsed { padding-bottom: 18px; }
.news-is-collapsed .news-strip-header { margin-bottom: 0; }
.news-strip[hidden], .news-track[hidden], .news-arrow[hidden], [data-news-global-message][hidden] { display: none !important; }
.news-management-settings, .news-editor-list { margin-bottom: 22px; }
.news-editor-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 0; border-top: 1px solid var(--border); }
.news-editor-row > div { min-width: 0; }
.news-editor-row h3 { margin: 7px 0; font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
.news-status { display: inline-block; font-size: .65rem; padding: 3px 8px; border-radius: 6px; background: #f0f2f5; color: #64748b; }
.news-status-draft { background: #fff4dc; color: #906c26; }
.news-status-published { background: #eaf6ee; color: #33754d; }
.news-pagination { display: flex; justify-content: flex-end; gap: 18px; padding-top: 15px; font-size: .78rem; }
.news-reader-meta { margin: 0 0 16px; color: #6b7a8c; font-size: .8rem; }
.news-reader-summary { margin: 0 0 22px; padding: 16px 18px; border-left: 3px solid #90acd0; border-radius: 0 12px 12px 0; background: #f5f8fc; color: #2e4159; font-size: .95rem; font-weight: 500; line-height: 1.7; }
.news-reader-content { max-width: 72ch; color: #1f2d3d; font-size: .92rem; line-height: 1.85; overflow-wrap: anywhere; }
.news-reader-content > :first-child { margin-top: 0; }
.news-reader-content p { margin: 0 0 1em; }
.news-reader-content h2, .news-reader-content h3 { margin: 1.4em 0 .5em; color: #1f2d3d; line-height: 1.35; }
.news-reader-content img { max-width: 100%; height: auto; border-radius: 10px; }
.news-reader-content blockquote { margin: 1em 0; padding: 10px 16px; border-left: 3px solid #d5dfeb; color: #4d5d70; background: #fafbfd; border-radius: 0 10px 10px 0; }
.news-reader-content a { color: #2f62a8; text-decoration: underline; text-underline-offset: 3px; }
.news-reader-modal .modal-header h2 { font-size: 1.2rem; line-height: 1.35; }
.rich-text-field { position: relative; min-width: 0; }
.rich-text-field > label { display: block; margin-bottom: 7px; }
.rich-text-editor-shell { min-width: 0; margin-top: 7px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(36, 72, 111, .02); }
.rich-text-editor-shell .ql-toolbar.ql-snow { display: flex; flex-wrap: wrap; gap: 3px; padding: 9px 10px; border-color: var(--border); border-radius: 12px 12px 0 0; background: #f8fafc; font-family: inherit; }
.rich-text-editor-shell .ql-container.ql-snow { border-color: var(--border); border-radius: 0 0 12px 12px; font-family: inherit; font-size: .86rem; }
.rich-text-editor-shell .ql-editor { min-height: 210px; max-height: 52vh; padding: 16px; color: var(--text); line-height: 1.7; overflow-y: auto; }
.notification-compose-fields .rich-text-editor-shell .ql-editor { min-height: 155px; }
.rich-text-editor-shell:focus-within .ql-toolbar.ql-snow, .rich-text-editor-shell:focus-within .ql-container.ql-snow { border-color: #75a6d9; }
.rich-text-editor[aria-invalid="true"] { border-color: var(--danger, #b42318) !important; }
.rich-text-source { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; }
.rich-text-help { display: block; margin-top: 7px; color: var(--muted); font-size: .68rem; font-weight: 500; line-height: 1.45; }
.rich-text-content { overflow-wrap: anywhere; }
.rich-text-content > :first-child { margin-top: 0; }
.rich-text-content > :last-child { margin-bottom: 0; }
.rich-text-content p { margin: 0 0 .85em; }
.rich-text-content h2, .rich-text-content h3 { margin: 1.15em 0 .55em; color: var(--text); line-height: 1.35; }
.rich-text-content h2 { font-size: 1.22em; }
.rich-text-content h3 { font-size: 1.08em; }
.rich-text-content blockquote { margin: 1em 0; padding: .7em 1em; border-left: 3px solid #8eadd0; border-radius: 0 9px 9px 0; background: #f5f8fc; color: #465b73; }
.rich-text-content ol, .rich-text-content ul { margin: .75em 0; padding-left: 1.6em; }
.rich-text-content li { margin: .28em 0; }
.rich-text-content li[data-list="bullet"] { list-style-type: disc; }
.rich-text-content li[data-list="ordered"] { list-style-type: decimal; }
.rich-text-content a { color: #2769a7; text-decoration: underline; text-underline-offset: 2px; }
.rich-text-content .ql-align-center { text-align: center; }
.rich-text-content .ql-align-right { text-align: right; }
.rich-text-content .ql-align-justify { text-align: justify; }
.rich-text-content .ql-direction-rtl { direction: rtl; }
.rich-text-content .ql-indent-1 { margin-left: 2em; }
.rich-text-content .ql-indent-2 { margin-left: 4em; }
.rich-text-content .ql-indent-3 { margin-left: 6em; }
.rich-text-content .ql-indent-4, .rich-text-content .ql-indent-5, .rich-text-content .ql-indent-6, .rich-text-content .ql-indent-7, .rich-text-content .ql-indent-8 { margin-left: 8em; }
.rich-text-content .ql-size-small { font-size: .8em; }
.rich-text-content .ql-size-large { font-size: 1.25em; }
.rich-text-content .ql-size-huge { font-size: 1.6em; }
.rich-text-content .ql-font-serif { font-family: Georgia, 'Times New Roman', serif; }
.rich-text-content .ql-font-monospace { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.parent-notification-body { margin: 10px 0 13px; color: #4d5662; line-height: 1.6; }
@media (max-width: 700px) {
    .field-help-tooltip { position: fixed; top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; transform: translateY(8px) scale(.99); transform-origin: bottom center; }
    .field-help-tooltip::after { display: none; }
    .news-strip { padding: 14px 12px 10px; }
    .news-strip-header { align-items: flex-start; gap: 8px; flex-wrap: wrap; }
    .news-strip-actions { gap: 6px; margin-left: auto; }
    .news-track { grid-auto-columns: minmax(230px, 86%); }
    .news-strip-heading small { font-size: .65rem; }
    .news-is-collapsed { padding-bottom: 14px; }
    .news-editor-row { align-items: flex-start; }
    .rich-text-editor-shell .ql-editor { min-height: 180px; max-height: 46vh; padding: 13px; }
    .rich-text-editor-shell .ql-toolbar.ql-snow { padding: 7px 6px; }
}
/* Shared catalogs and clearly scoped changes. */
.operation-impact { margin-top:20px; padding:20px; border:1px solid #e9d4ab; border-radius:16px; background:#fffaf0; }
.operation-impact-heading { display:flex; gap:10px; align-items:center; color:#8c641e; }
.operation-impact-stats { display:flex; flex-wrap:wrap; gap:12px; margin:16px 0; }
.operation-impact-stats > span { flex:1; min-width:110px; display:flex; flex-direction:column; gap:4px; padding:12px; border-radius:12px; background:#fff; color:#65748a; font-size:13px; }
.operation-impact-stats strong { font-size:25px; line-height:1.2; color:#303f51; }
.operation-impact p { font-size:13px; line-height:1.7; }
.operation-danger { padding:12px 14px; border:1px solid #f1c3c0; border-radius:12px; background:#fff3f2; color:#9f342c; font-size:13px; line-height:1.6; }
.operation-confirm { margin-top:14px; padding-top:14px; border-top:1px solid #e9d4ab; }
.specialization-picker { margin:16px 0; border:1px solid #dce6e9; border-radius:14px; padding:16px; }
.specialization-picker legend { font-weight:700; }
.specialization-picker .check-grid { gap:12px; }
.lead-archive-tools { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:16px; }
.archived-profile-note { margin-bottom:16px; padding:16px; background:#f4f6f9; border:1px solid #dbe2e9; border-radius:14px; }
.archived-profile-note p { margin:6px 0; }
/* Student administrative register: familiar desktop placement, stacked mobile fields. */
.student-register{
    padding:22px;
    min-width:0
}
.student-register-heading,.student-register-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    flex-wrap:wrap
}
.student-register-heading h2{
    font-size:20px;
    margin:0
}
.student-register-filters{
    display:grid;
    grid-template-columns:repeat(4,minmax(120px,1fr)) minmax(160px,1.2fr) auto;
    gap:12px;
    align-items:end;
    margin:22px 0
}
.student-register label{
    display:grid;
    gap:6px;
    font-size:13px;
    font-weight:600
}
.student-register-scroll{
    overflow:auto;
    border:1px solid #dce8e5;
    border-radius:12px
}
.student-register-table{
    width:100%;
    border-collapse:collapse;
    font-size:13px
}
.student-register-table th{
    background:#edf6f3;
    color:#245c51;
    white-space:nowrap;
    text-align:left;
    padding:13px 12px;
    position:sticky;
    top:0
}
.student-register-table td{
    padding:14px 12px;
    border-top:1px solid #e8efed;
    white-space:nowrap
}
.student-register-table tbody tr:hover{
    background:#f5faf8
}
.student-register-table td a{
    font-weight:650
}
.student-list-empty{
    text-align:center;
    padding:40px!important
}
.student-register [hidden]{
    display:none!important
}
.student-register .list-result-bar select{
    width:80px;
    min-height:34px
}
.student-register .list-result-bar label{
    display:flex;
    align-items:center;
    gap:8px
}
.student-moet-modal{
    width:min(1240px,96vw);
    max-width:1240px
}
.student-moet-modal .modal-shell{
    max-height:94dvh
}
.student-moet-modal .modal-body{
    min-width:0
}
.student-admin-body{
    overflow:auto
}
.student-administrative{
    font-size:14px;
    min-width:0
}
.student-admin-context{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
    border-bottom:1px solid #dce9e4;
    padding:0 0 18px;
    margin-bottom:20px
}
.student-administrative label{
    display:grid;
    gap:8px;
    font-size:13px;
    font-weight:600;
    min-width:0
}
.student-administrative input,.student-administrative select,.student-administrative textarea{
    width:100%;
    min-width:0;
    box-sizing:border-box;
    font-size:14px
}
.student-administrative output{
    display:block;
    min-height:40px;
    padding:10px 12px;
    border-radius:8px;
    background:#f3f7f5;
    font-weight:400;
    overflow-wrap:anywhere
}
.student-admin-common{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:40px
}
.student-admin-primary{
    display:grid;
    gap:20px;
    align-content:start
}
.student-admin-primary>.student-admin-field,.student-admin-primary>label{
    grid-template-columns:minmax(0,1fr);
    align-items:start
}
.student-administrative h3{
    font-size:16px;
    color:#28705e;
    margin:4px 0 16px
}
.student-admin-address{
    display:grid;
    gap:20px;
    align-content:start
}
.student-address-group{
    display:grid;
    gap:20px;
    margin-bottom:12px;
    padding-bottom:24px;
    border-bottom:1px solid #e4ece8
}
.student-admin-tabs{
    display:flex;
    border-bottom:2px solid #dce9e4;
    margin-top:26px;
    overflow-x:auto;
    gap:6px
}
.student-admin-tabs button{
    border:0;
    background:transparent;
    color:#536d64;
    white-space:nowrap;
    padding:14px 15px;
    font-weight:650;
    border-radius:9px 9px 0 0
}
.student-admin-tabs button[aria-selected=true]{
    background:#e2f3ea;
    color:#17664c;
    box-shadow:inset 0 -3px #258463
}
.student-admin-panel{
    padding:22px 0
}
.student-admin-panel[hidden]{
    display:none!important
}
.student-personal-columns,.student-family-columns{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:24px
}
.student-admin-panel>div{
    min-width:0
}
.student-admin-panel label{
    margin-bottom:15px
}
.student-family-note{
    grid-column:1/-1;
    background:#eff7f3;
    color:#3c6d5c;
    padding:12px 16px;
    border-radius:9px;
    font-size:13px
}
.student-admin-legacy{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:24px
}
.student-save-bar{
    position:sticky;
    bottom:0;
    background:#fff;
    z-index:4;
    border-top:1px solid #dce9e4
}
.student-moet-modal .profile-kpis{
    display:none
}
.student-moet-modal .profile-tabs{
    margin-bottom:18px
}
.student-moet-modal .student-daily-quick-action{
    margin-bottom:15px
}
.student-moet-modal .modal-header{
    position:sticky;
    top:0;
    z-index:4;
    background:#fff
}
.student-column-options .check-row{
    display:flex;
    gap:12px;
    margin:12px 0
}
.student-column-options input{
    width:auto
}
.student-admin-field .field-error{
    grid-column:1/-1
}
@media(max-width:1000px){
    .student-register-filters{
        grid-template-columns:repeat(3,minmax(0,1fr))
    }
    .student-admin-common{
        gap:22px
    }
    .student-admin-primary>.student-admin-field,.student-admin-primary>label{
        grid-template-columns:1fr
    }
    .student-personal-columns,.student-family-columns{
        gap:16px
    }
}
@media(max-width:640px){
    .student-register{
        padding:14px
    }
    .student-register-heading h2{
        font-size:18px
    }
    .student-register-actions{
        width:100%
    }
    .student-register-actions .btn{
        flex:1;
        font-size:12px;
        padding:9px
    }
    .student-register-filters{
        grid-template-columns:1fr 1fr;
        gap:10px;
        margin:16px 0
    }
    .student-register-filters label:nth-last-of-type(1){
        grid-column:1/-1
    }
    .student-register-table,.student-register-table tbody{
        display:block
    }
    .student-register-table thead{
        display:none
    }
    .student-register-table tr{
        display:grid;
        grid-template-columns:1fr 1fr;
        padding:12px;
        gap:6px;
        border-bottom:1px solid #dce8e5
    }
    .student-register-table td{
        display:block;
        border:0;
        padding:4px;
        white-space:normal;
        overflow-wrap:anywhere
    }
    .student-register-table td[data-label]::before{
        content:attr(data-label);
        display:block;
        font-size:11px;
        font-weight:500;
        color:#71847d;
        margin-bottom:3px
    }
    .student-register-table td[data-register-primary]{
        grid-column:1/-1;
        font-size:17px;
        grid-row:1
    }
    .student-register-table:not(.student-register-table--actions-end) td:nth-child(3),
    .student-register-table td.register-index{
        display:none
    }
    .student-register-table.student-register-table--actions-end td[data-register-actions]{
        grid-column:1/-1;
        grid-row:auto;
        position:static;
        box-shadow:none;
        background:none
    }
    .student-register .list-result-bar{
        flex-wrap:wrap;
        gap:10px
    }
    .student-moet-modal{
        width:100vw;
        max-width:100vw;
        height:100dvh;
        max-height:100dvh;
        margin:0;
        border-radius:0
    }
    .student-moet-modal .modal-shell{
        height:100%;
        max-height:100dvh;
        border-radius:0
    }
    .student-moet-modal .modal-body{
        padding:16px
    }
    .student-moet-modal .modal-header{
        padding:14px
    }
    .student-moet-modal .modal-header h2{
        font-size:18px
    }
    .student-moet-modal .profile-header-meta{
        font-size:11px
    }
    .student-admin-common,.student-admin-context,.student-personal-columns,.student-family-columns,.student-admin-legacy{
        grid-template-columns:1fr;
        gap:18px
    }
    .student-admin-address{
        margin-top:10px
    }
    .student-admin-tabs{
        margin-top:18px
    }
    .student-admin-tabs button{
        padding:12px 10px;
        font-size:12px
    }
    .student-save-bar{
        gap:8px;
        padding:12px!important;
        flex-wrap:wrap
    }
    .student-save-bar .btn{
        font-size:12px;
        flex:1;
        min-width:85px
    }
    .student-family-columns>div{
        border-bottom:1px solid #e0ebe6;
        padding-bottom:12px
    }
    .student-moet-modal .profile-tabs{
        overflow:auto;
        flex-wrap:nowrap
    }
    .student-moet-modal .profile-tabs button{
        white-space:nowrap
    }
    .student-register .list-result-bar form{
        max-width:100%
    }
}
/* Keep the administrative toolbar in the same position as the reference on desktop. */
.student-moet-modal>.modal-shell>.modal-form{
    display:contents
}
.student-moet-modal>.modal-shell>.modal-header{
    order:-3
}
.student-moet-modal .student-save-bar{
    order:-2;
    position:relative;
    bottom:auto;
    border-top:0;
    border-bottom:1px solid #dce9e4;
    padding:10px 20px
}
.student-moet-modal{
    max-width:1240px;
    width:min(1240px,96vw)
}
.student-moet-modal .student-daily-quick-action{
    display:flex
}
@media(max-width:640px){
    .student-moet-modal{
        width:100vw;
        max-width:100vw
    }
    .student-moet-modal .student-save-bar{
        order:3;
        position:sticky;
        bottom:0
    }
    .student-moet-modal .student-daily-quick-action{
        display:flex
    }
}
/* Large forms need the full workspace;
keep only a small desktop gutter. */
dialog.student-moet-modal{
    width:98vw;
    max-width:98vw;
    height:96dvh;
    max-height:96dvh;
    margin:2dvh auto
}
dialog.student-moet-modal>.modal-shell{
    height:100%;
    max-height:96dvh
}
@media(max-width:640px){
    dialog.student-moet-modal{
        width:100vw;
        max-width:100vw;
        height:100dvh;
        max-height:100dvh;
        margin:0
    }
    dialog.student-moet-modal>.modal-shell{
        height:100%;
        max-height:100dvh
    }
}
dialog.modal.modal-record.student-moet-modal{
    width:98vw;
    max-width:98vw;
    height:96dvh;
    max-height:96dvh
}
@media(max-width:640px){
    dialog.modal.modal-record.student-moet-modal{
        width:100vw;
        max-width:100vw;
        height:100dvh;
        max-height:100dvh
    }
    .student-moet-modal .student-save-bar{
        flex-wrap:nowrap;
        padding:10px!important;
        gap:6px
    }
    .student-moet-modal .student-save-bar .btn{
        min-width:0;
        font-size:11px;
        padding:9px 7px;
        min-height:44px
    }
    .student-moet-modal .student-save-bar .btn:first-child{
        flex:0 0 48px
    }
    .student-moet-modal .student-save-bar [data-modal-open="notification-create-modal"]{
        flex:0 0 38px;
        font-size:0
    }
    .student-moet-modal .student-save-bar [data-modal-open="notification-create-modal"] .icon{
        width:18px;
        height:18px
    }
}
.student-column-options .student-column-choice{
    display:grid;
    grid-template-columns:20px minmax(0,1fr) 30px 30px;
    align-items:center;
    gap:8px
}
.student-column-choice button{
    border:1px solid #dce9e4;
    border-radius:6px;
    background:#f3f8f5;
    height:28px;
    cursor:pointer
}
/* Keep one primary creation action and a compact code-guide entry. */
.student-register-heading h2 { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.student-code-help { display:inline-flex; align-items:center; justify-content:center; flex:0 0 28px; width:28px; height:28px; padding:0; border:1px solid #d7e3de; border-radius:50%; background:transparent; color:#637b70; font-family:inherit; font-size:14px; font-weight:700; line-height:1; cursor:pointer; }
.student-code-help:hover { color:#246b53; border-color:#8bb39f; background:#f0f7f3; }
.student-code-help:focus-visible { outline:2px solid #28705e; outline-offset:3px; }
.student-register-table th .student-code-help { margin-left:6px; vertical-align:middle; }
/* The sticky header must paint above row content (code chips, hover parts) when the table scrolls. */
.student-register-table thead th { z-index:5; }
/* Actions stay visible at the right edge while the wide register scrolls sideways. */
.student-register-table--actions-end th[data-register-actions],
.student-register-table--actions-end td[data-register-actions] { position:sticky; right:0; box-shadow:inset 1px 0 0 #e8efed; }
.student-register-table--actions-end th[data-register-actions] { background:#edf6f3; z-index:2; }
.student-register-table--actions-end td[data-register-actions] { background:#fff; text-align:center; }
.student-register-table--actions-end tbody tr:hover td[data-register-actions] { background:#f5faf8; }
.register-action-group { display:inline-flex; align-items:center; gap:8px; }
/* Row actions: blue for viewing a record, amber for editing it (editing is the step that needs care). */
.register-action { display:inline-grid; place-items:center; width:30px; height:30px; border-radius:9px; transition:background .15s ease, color .15s ease; }
.register-action .icon { width:16px; height:16px; }
.register-action-view { color:#3478d4; background:#eaf3ff; }
.register-action-view:hover { color:#245fae; background:#d7e8fb; }
.register-action-edit { color:#b7791f; background:#fff4d6; }
.register-action-edit:hover { color:#8f5d12; background:#ffe9b0; }
.register-action:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
/* Roles register: row actions are buttons, the name opens the role's view window. */
button.register-action { padding: 0; border: 0; cursor: pointer; font: inherit; }
.role-name-link { padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
.role-name-link:hover, .role-name-link:focus-visible { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.role-view-subtitle { margin: 18px 0 8px; font-size: .9rem; }
.role-permission-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: .84rem; }
.role-permission-list li { display: flex; align-items: center; gap: 6px; }
.role-permission-list .icon { width: 14px; height: 14px; color: #168a82; }
/* Sortable column headers: the label is a link; the arrow marks the active column and direction. */
.register-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; white-space: nowrap; }
.register-sort:hover { color: var(--primary-dark); }
.register-sort:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.register-sort-mark { display: inline-block; width: 10px; font-size: .78rem; color: var(--primary); text-align: center; }
.register-sort.is-sorted { color: var(--primary-dark); }
/* Filter bar: one tinted panel, uniform 40px controls, search with a leading icon, active filters marked. */
.student-register-filters { margin: 18px 0; padding: 14px 16px; border: 1px solid #e1ebe6; border-radius: 14px; background: #f7faf9; align-items: end; gap: 12px 14px; }
.student-register-filters > label { gap: 5px; color: #6f8078; font-size: .66rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.student-register-filters select,
.student-register-filters input[type="search"] { height: 40px; min-height: 40px; padding: 0 12px; border: 1px solid #d5e2dd; border-radius: 10px; background-color: #fff; color: #1f2d3d; font-size: .84rem; font-weight: 600; letter-spacing: 0; text-transform: none; outline: none; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.student-register-filters select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f8078' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.student-register-filters select:focus, .student-register-filters input[type="search"]:focus { border-color: #28705e; box-shadow: 0 0 0 3px rgba(40, 112, 94, .14); }
.student-register-filters > label:has(option:checked:not([value=""])) select { border-color: #9fcdb9; background-color: #eef8f3; color: #145f50; }
/* Status filter on the potential-students page: the selected status takes its badge colour. */
/* Dropdown colours match the status badges in the table and profile (same tokens as .lead-status-*). */
.student-register-filters > label[data-tone="lead-status-lilac"] select { color: #1d4ed8 !important; background-color: #dbeafe !important; border-color: #bfdbfe !important; }
.student-register-filters > label[data-tone="lead-status-coral"] select { color: #a16207 !important; background-color: #fef9c3 !important; border-color: #fde68a !important; }
.student-register-filters > label[data-tone="lead-status-peach"] select { color: #c2410c !important; background-color: #ffedd5 !important; border-color: #fed7aa !important; }
.student-register-filters > label[data-tone="lead-status-violet"] select { color: #6d28d9 !important; background-color: #ede9fe !important; border-color: #ddd6fe !important; }
.student-register-filters > label[data-tone="lead-status-purple"] select { color: #be123c !important; background-color: #ffe4e6 !important; border-color: #fecdd3 !important; }
.student-register-filters > label[data-tone="lead-status-green"] select { color: #166534 !important; background-color: #dcfce7 !important; border-color: #bbf7d0 !important; }
.student-register-filters select option[data-tone="lead-status-lilac"] { color: #1d4ed8; background-color: #dbeafe; }
.student-register-filters select option[data-tone="lead-status-coral"] { color: #a16207; background-color: #fef9c3; }
.student-register-filters select option[data-tone="lead-status-peach"] { color: #c2410c; background-color: #ffedd5; }
.student-register-filters select option[data-tone="lead-status-violet"] { color: #6d28d9; background-color: #ede9fe; }
.student-register-filters select option[data-tone="lead-status-purple"] { color: #be123c; background-color: #ffe4e6; }
.student-register-filters select option[data-tone="lead-status-green"] { color: #166534; background-color: #dcfce7; }
.student-register-filters .filter-search-field { position: relative; display: block; }
.student-register-filters .filter-search-field .icon { position: absolute; top: 50%; left: 12px; width: 16px; height: 16px; color: #8a9a93; pointer-events: none; transform: translateY(-50%); }
.student-register-filters .filter-search-field input[type="search"] { display: block; width: 100%; padding-left: 36px; }
.student-register-filters > .btn { height: 40px; min-height: 40px; padding: 0 18px; align-self: end; white-space: nowrap; }
.filter-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 0 2px 10px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.filter-reset { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; color: #5b6f67; font-size: .76rem; font-weight: 700; text-decoration: none; }
.filter-reset .icon { width: 12px; height: 12px; }
.filter-reset:hover { color: var(--primary-dark); background: #fff; }
/* Compact header buttons: icon plus a short label, full wording kept in title/aria-label. */
.btn.btn-compact { min-height: 34px; padding: 6px 11px; gap: 6px; font-size: .8rem; font-weight: 700; }
.btn.btn-compact .icon { width: 15px; height: 15px; }
/* Export uses Excel's green so it reads as a spreadsheet action, distinct from the neutral column button. */
.btn.btn-export { color: #1d6f42; border: 1px solid #a9d5bb; background: linear-gradient(135deg, #fff, #e8f5ee); box-shadow: 0 4px 12px rgba(29,111,66,.1); }
.btn.btn-export:hover { border-color: #5fae82; background: #dff1e6; color: #155a33; }
.btn.btn-export:focus-visible { outline: 2px solid #1d6f42; outline-offset: 2px; }
@media(max-width:640px) {
    .student-register-table thead { display:block; }
    .student-register-table thead tr { display:block; padding:0; }
    .student-register-table thead th { display:none; }
    .student-register[data-register="student"] .student-register-table thead th[data-register-column="student_code"] { display:block; text-align:left; }
}
/* The two desktop columns share row tracks so fields stay aligned. */
.student-admin-common { column-gap:28px; row-gap:20px; }
.student-admin-common > .student-admin-primary,
.student-admin-common > .student-admin-address { display:grid; grid-row:span 15; grid-template-rows:subgrid; gap:20px; align-content:start; }
.student-admin-common > .student-admin-primary { grid-column:1; }
.student-admin-common > .student-admin-address { grid-column:2; }
.student-admin-common .student-address-group { display:contents; }
.student-admin-common .student-admin-field,
.student-admin-common label { align-content:start; margin:0; }
.student-admin-common label > span:first-child { min-height:20px; line-height:20px; }
.student-admin-common input:not([type=checkbox]):not([type=hidden]),
.student-admin-common select { height:44px; min-height:44px; }
.student-admin-common textarea { min-height:44px; }
.student-code-field { min-width:0; }
.student-code-explanation { margin-top:10px; }
.student-code-explanation summary { cursor:pointer; font-size:12px; font-weight:600; color:#526e61; }
.student-code-explanation .business-code-builder { margin-top:12px; }

.student-administrative .student-profile-active-control input[type=checkbox] { width:18px; height:18px; min-height:18px; accent-color:#2c8664; }
.student-family-contact { grid-column:1/-1; border-bottom:1px solid #e0ebe6; padding-bottom:12px; }
.student-contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
@media(max-width:640px) {
    .student-admin-common > .student-admin-primary,
    .student-admin-common > .student-admin-address { grid-column:auto; grid-row:auto; grid-template-rows:none; }
    .student-admin-common .student-address-group { display:grid; gap:20px; margin:0; padding:0 0 20px; }
    .student-contact-grid { grid-template-columns:1fr; gap:12px; }
}
.student-admin-context { align-items:start; }
.student-admin-context input, .student-admin-context select { height:44px; min-height:44px; }
/* Semantic label icons keep a consistent rhythm across every profile group. */
.student-administrative .student-field-caption { display:flex; align-items:center; gap:9px; min-height:26px; line-height:20px; color:#354b48; }
.student-field-label { min-width:0; }
.student-field-icon { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; flex:0 0 26px; border-radius:8px; }
.student-field-icon > .icon { width:15px; height:15px; stroke-width:1.8; }
.student-icon-blue { color:#386db1; background:#edf3fd; }
.student-icon-indigo { color:#5a60b5; background:#f0f0fc; }
.student-icon-violet { color:#8760ab; background:#f5effa; }
.student-icon-teal { color:#287d78; background:#eaf6f3; }
.student-icon-green { color:#347d56; background:#edf6ee; }
.student-icon-rose { color:#a65e7c; background:#faf0f4; }
.student-icon-sky { color:#397f9c; background:#edf6fa; }
.student-icon-amber { color:#9e752d; background:#fbf5e8; }
.student-icon-slate { color:#637487; background:#f0f3f7; }
.student-administrative .student-section-title { display:flex; align-items:center; gap:10px; min-height:32px; line-height:22px; }
.student-section-icon { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; flex:0 0 32px; border-radius:10px; color:#277c65; background:#eaf5ef; }
.student-section-icon > .icon { width:18px; height:18px; }
/* Compact checks sit immediately before their labels, without a full-width box. */
.student-administrative .student-bool-field { display:block; align-self:start; margin:0; }
.student-bool-control, .student-profile-active-control { display:inline-flex; align-items:flex-start; gap:10px; max-width:100%; min-height:44px; padding:0; border-radius:6px; box-sizing:border-box; cursor:pointer; }
.student-bool-control > input[type=checkbox], .student-profile-active-control > input[type=checkbox] { order:0; margin-top:3px !important; }
.student-bool-control > .student-field-caption, .student-profile-active-control > .student-field-caption { order:1; }
.student-bool-control small { order:2; align-self:flex-start; margin-top:3px; margin-left:2px; color:#708479; font-size:11px; white-space:nowrap; }
.student-bool-control:has(input:checked) small { color:#246b45; font-weight:700; }
.student-bool-control small:empty { display:none; }
.student-personal-columns { row-gap:16px; }
.student-personal-columns > div { display:grid; grid-row:span 8; grid-template-rows:subgrid; row-gap:16px; }
.student-personal-columns > div > label { align-self:start; margin:0; }
@media(max-width:640px) { .student-personal-columns > div { grid-row:auto; grid-template-rows:none; gap:16px; } }
.student-administrative .student-bool-control input[type=checkbox],
.student-administrative .student-profile-active-control input[type=checkbox] { appearance:none; -webkit-appearance:none; display:inline-block; flex:0 0 20px; width:20px; height:20px; min-height:20px; margin:0; padding:0; border:1.5px solid #afc2b8; border-radius:6px; background:#fff; background-position:center; background-repeat:no-repeat; background-size:14px 14px; box-shadow:0 1px 2px rgba(25,53,44,.04); cursor:pointer; vertical-align:middle; }
.student-administrative .student-bool-control input[type=checkbox]:checked,
.student-administrative .student-profile-active-control input[type=checkbox]:checked { border-color:#287a55; background-color:#287a55; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8 3 3 6-6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.student-bool-control:focus-within, .student-profile-active-control:focus-within { outline:2px solid #68a78c; outline-offset:2px; }
.student-administrative input[type=checkbox]:focus-visible { outline:2px solid #3f8968; outline-offset:3px; }

@media(prefers-reduced-motion:reduce) { .student-bool-control, .student-profile-active-control { transition:none; } }
@media(forced-colors:active) { .student-administrative .student-bool-control input[type=checkbox], .student-administrative .student-profile-active-control input[type=checkbox] { appearance:auto; background-image:none; } }

/* The primary student code reveals each selected component immediately. */
.student-code-field { display:grid; align-content:start; gap:8px; }
.student-code-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; min-width:0; }
.student-code-summary-part { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-width:0; min-height:44px; padding:4px 8px; box-sizing:border-box; border:1px solid var(--code-border); border-radius:9px; color:var(--code-color); background:var(--code-soft); }
.student-code-summary-part strong { font-family:"SFMono-Regular",Consolas,monospace; font-size:17px; font-weight:800; line-height:20px; letter-spacing:.09em; }
.student-code-summary-part small { font-size:10px; font-weight:600; line-height:14px; }
.student-code-field .student-code-explanation { margin-top:0; }
.student-code-manual { margin:14px 0; }
@media(max-width:640px) { .student-code-summary { gap:5px; } .student-code-summary-part { padding:5px 3px; } .student-code-summary-part strong { font-size:16px; } }

/* Student administrative form: shared information first, sections I–III below. */
dialog.modal.modal-record.student-moet-modal.student-form-refined { width:min(1180px,calc(100vw - 40px)); max-width:1180px; height:min(92dvh,1080px); max-height:92dvh; margin:auto; border-radius:16px; }
dialog.student-form-refined > .modal-shell { height:100%; max-height:inherit; border:1px solid #e4e9ed; border-radius:inherit; }
.student-form-refined > .modal-shell > .modal-header { order:0; position:static; gap:12px; padding:18px 24px; border-bottom:1px solid #e5ebee; background:#fff; }
.student-form-refined .modal-header .modal-icon { width:38px; height:38px; border-radius:11px; }
.student-form-refined .modal-header h2 { margin:3px 0 4px; color:#2d3c4c; font-size:1.12rem; }
.student-form-refined .modal-header .eyebrow { color:#7b8794; font-size:.6rem; letter-spacing:.1em; }
.student-form-refined .modal-subtitle { color:#7b8794; font-size:.7rem; }
.student-form-refined > .modal-shell > .modal-form { display:flex; order:0; min-height:0; flex:1; flex-direction:column; }
.student-form-refined .modal-body { display:block; min-height:0; min-width:0; flex:1; padding:22px 24px; overflow-y:auto; overflow-x:hidden; background:#f8fafb; scrollbar-gutter:stable; }
.student-form-refined .student-administrative { font-size:13px; }
.student-form-refined .student-field-icon { display:none; }
.student-form-refined .student-field-caption { min-height:20px; gap:0; color:#5b6776; font-size:12px; font-weight:600; line-height:20px; }
.student-form-refined .student-field-label { overflow-wrap:anywhere; }
.student-form-refined .student-administrative label { display:flex; min-width:0; align-self:start; flex-direction:column; align-items:stretch; gap:7px; margin:0; font-size:12px; line-height:20px; }
.student-form-refined .student-administrative input:not([type=checkbox]):not([type=hidden]),
.student-form-refined .student-administrative select { width:100%; height:42px; min-height:42px; flex:0 0 42px; padding:9px 11px; border:1px solid #dde5eb; border-radius:8px; color:#3c4a5b; background:#fff; font-size:13px; font-weight:500; line-height:22px; }
.student-form-refined .student-administrative textarea { min-height:76px; padding:10px 11px; border:1px solid #dde5eb; border-radius:8px; color:#3c4a5b; background:#fff; font-size:13px; font-weight:400; line-height:1.55; resize:vertical; }
.student-form-refined .student-administrative input:focus,
.student-form-refined .student-administrative select:focus,
.student-form-refined .student-administrative textarea:focus { outline:0; border-color:#93b6a7; box-shadow:0 0 0 3px rgba(73,131,103,.09); }
.student-form-refined .student-administrative output { min-height:42px; border:1px solid #e7ecef; border-radius:8px; color:#556171; background:#f8fafb; font-size:13px; line-height:1.55; }
.student-form-refined .student-admin-context { grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); align-items:start; gap:28px; margin:0 0 20px; padding:18px 20px; border:1px solid #e1e8ec; border-radius:12px; background:#fff; }
.student-form-refined .student-code-field { gap:7px; }
.student-form-refined .student-code-summary { gap:5px; }
.student-form-refined .student-code-summary-part { min-height:42px; padding:4px 6px; border-radius:7px; box-shadow:none; }
.student-form-refined .student-code-summary-part strong { font-size:14px; line-height:18px; }
.student-form-refined .student-code-summary-part small { font-size:9px; line-height:12px; }
.student-form-refined .student-code-explanation summary { width:fit-content; color:#7c8794; font-size:11px; font-weight:500; }
.student-form-refined .student-form-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start; }
.student-form-refined .student-admin-common > .student-form-column { display:flex; grid-column:auto; grid-row:auto; grid-template-rows:none; flex-direction:column; gap:20px; margin:0; }
.student-form-card { min-width:0; padding:20px; border:1px solid #e1e8ec; border-radius:12px; background:#fff; }
.student-form-card-heading { display:flex; align-items:flex-start; gap:10px; margin-bottom:20px; }
.student-form-card-heading > span { display:grid; width:30px; height:30px; flex:0 0 30px; place-items:center; border:1px solid #e6eeea; border-radius:9px; color:#648573; background:#f4f8f5; }
.student-form-card-heading > span > .icon { width:16px; height:16px; }
.student-form-refined .student-form-card-heading h3 { margin:0; color:#354657; font-size:14px; font-weight:700; line-height:1.5; }
.student-form-card-heading p { margin:4px 0 0; color:#8a94a1; font-size:11px; line-height:1.5; }
.student-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:16px; min-width:0; }
.student-field-wide { grid-column:1 / -1; }
.student-form-refined .student-form-address-group { margin:0; padding:0; border:0; }
.student-form-address-group + .student-form-address-group { margin-top:19px; padding-top:17px; border-top:1px solid #edf1f3; }
.student-form-address-group h4 { margin:0 0 11px; color:#6d7d72; font-size:11px; font-weight:650; }
.student-form-supplement-heading { margin:30px 0 14px; }
.student-form-refined .student-form-supplement-heading h3 { margin:0; color:#354657; font-size:15px; font-weight:700; }
.student-form-supplement-heading p { margin:5px 0 0; color:#84909d; font-size:12px; }
.student-form-refined .student-admin-tabs { position:sticky; top:-22px; z-index:8; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; overflow:visible; margin:0; padding:5px; border:1px solid #e1e8ec; border-radius:11px; background:#fff; box-shadow:0 3px 10px rgba(35,57,47,.025); }
.student-form-refined .student-admin-tabs button { display:flex; align-items:center; gap:11px; min-width:0; min-height:62px; padding:10px 14px; border:0; border-radius:7px; color:#34404b; background:transparent; text-align:left; white-space:normal; box-shadow:none; }
.student-form-refined .student-admin-tabs button[aria-selected=true] { color:#1f5a43; background:#eef6f1; box-shadow:none; }
.student-tab-number { display:grid; width:29px; height:29px; flex:0 0 29px; place-items:center; border:1px solid #e7ecef; border-radius:8px; color:#45534d; background:#fff; font-size:12px; font-weight:800; }
.student-form-refined .student-admin-tabs button[aria-selected=true] .student-tab-number { color:#fff; border-color:#477b61; background:#477b61; }
.student-tab-copy { min-width:0; }
.student-tab-copy strong { display:block; font-size:12px; font-weight:800; line-height:1.5; }
.student-tab-copy small { display:block; margin-top:3px; color:#56636d; font-size:10px; font-weight:600; line-height:1.45; }
/* Required fields: red label with badge; coloured stripe on the control until it is filled. */
.student-administrative .student-field-caption.is-required, .student-form-refined .student-field-caption.is-required { color:#b23a2b; font-weight:700; }
.student-required-mark { margin-left:3px; color:#c2412d; font-weight:800; }
.student-required-badge { display:inline-flex; align-items:center; height:18px; margin-left:8px; padding:0 8px; border:1px solid #f3c4bc; border-radius:999px; color:#b23a2b; background:#fdeeeb; font-size:10px; font-weight:700; line-height:16px; letter-spacing:.02em; vertical-align:middle; white-space:nowrap; }
.student-required-legend { display:flex; align-items:center; gap:8px; margin:0 0 12px; color:#5b6776; font-size:12px; }
.student-required-legend .student-required-badge { margin-left:0; }
.student-administrative :is(input, select, textarea)[required] { border-color:#eab3aa; background-color:#fffaf8; box-shadow:inset 3px 0 0 #c0392b; }
.student-administrative :is(input, select, textarea)[required]:valid { border-color:#cfe0d7; background-color:#fff; box-shadow:inset 3px 0 0 #477b61; }
.student-administrative :is(input, select, textarea)[required]:focus { border-color:#c0392b; box-shadow:inset 3px 0 0 #c0392b, 0 0 0 3px rgba(192,57,43,.14); }
.student-administrative :is(input, select, textarea)[required]:valid:focus { border-color:#477b61; box-shadow:inset 3px 0 0 #477b61, 0 0 0 3px rgba(71,123,97,.14); }
.student-administrative :is(input, select, textarea)[required]:user-invalid { border-color:#c2412d; background-color:#fff4f2; box-shadow:inset 3px 0 0 #c2412d, 0 0 0 3px rgba(194,65,45,.14); }
.student-form-refined .student-admin-panel { padding:18px 0 0; }
.student-form-personal { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:20px; }
.student-form-checks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0 0 18px; }
.student-form-grid + .student-form-checks { margin:18px 0 0; }
.student-form-refined .student-administrative .student-bool-field { display:block; }
.student-form-refined .student-bool-control, .student-form-refined .student-profile-active-control { display:flex; min-height:40px; align-items:flex-start; gap:9px; padding:9px 10px; border:1px solid #e6ecef; border-radius:8px; background:#fafcfc; }
.student-form-refined .student-bool-control > .student-field-caption, .student-form-refined .student-profile-active-control > .student-field-caption { flex:1; color:#657383; font-size:11px; font-weight:500; line-height:19px; }
.student-form-refined .student-bool-control > input[type=checkbox], .student-form-refined .student-profile-active-control > input[type=checkbox] { flex:0 0 17px; width:17px; height:17px; min-height:17px; margin-top:1px!important; border-radius:5px; }
.student-form-refined .student-bool-control small { margin-top:1px; font-size:10px; }
.student-form-refined .student-bool-control:has(input:checked), .student-form-refined .student-profile-active-control:has(input:checked) { border-color:#c8ddcf; background:#f2f8f4; }
.student-form-refined .student-form-family { grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.student-form-refined .student-family-contact { grid-column:1 / -1; padding:20px; }
.student-form-family-fields { display:grid; gap:16px; }
.student-form-refined .student-contact-grid { gap:16px; }
.student-form-refined .student-family-note, .student-form-notice { display:flex; align-items:flex-start; gap:9px; margin:0; padding:13px 15px; border:1px solid #e2e9eb; border-radius:9px; color:#788591; background:#f3f7f7; font-size:11px; line-height:1.6; }
.student-family-note > .icon, .student-form-notice > .icon { width:16px; height:16px; flex-shrink:0; margin-top:1px; }
.student-form-notice { margin-bottom:18px; }
.student-form-refined .student-admin-legacy { gap:18px; }
.student-form-refined .student-save-bar { order:0; position:static; bottom:auto; display:flex; flex-wrap:nowrap; gap:10px; padding:13px 24px!important; border:0; border-top:1px solid #e2e9ec; background:#fff; }
.student-form-refined .student-save-bar .btn { min-height:40px; border-radius:8px; font-size:12px; box-shadow:none; }
.student-form-refined .student-save-bar .btn:first-child { margin-right:auto; }
@media(max-width:900px) {
    .student-form-refined .student-admin-context { gap:18px; }
    .student-form-refined .student-form-columns { grid-template-columns:minmax(0,1fr); }
    .student-form-refined .student-admin-common > .student-form-column { gap:18px; }
    .student-form-refined .student-form-family { grid-template-columns:minmax(0,1fr); }
    .student-form-refined .student-form-family-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .student-form-refined .student-admin-tabs button { gap:8px; padding:10px; }
    .student-tab-copy small { display:none; }
}
@media(max-width:640px) {
    dialog.modal.modal-record.student-moet-modal.student-form-refined { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; margin:0; border-radius:0; }
    dialog.student-form-refined > .modal-shell { max-height:100dvh; border:0; border-radius:0; }
    .student-form-refined > .modal-shell > .modal-header { padding:14px 16px; }
    .student-form-refined .modal-header h2 { font-size:17px; }
    .student-form-refined .modal-body { padding:16px; }
    .student-form-refined .student-admin-context { grid-template-columns:minmax(0,1fr); gap:17px; padding:16px; margin-bottom:16px; }
    .student-form-refined .student-form-columns, .student-form-personal, .student-form-refined .student-admin-legacy { grid-template-columns:minmax(0,1fr); gap:16px; }
    .student-form-card { padding:16px; }
    .student-form-card-heading { margin-bottom:17px; }
    .student-form-refined .student-admin-common > .student-form-column { gap:16px; }
    .student-form-refined .student-admin-tabs { top:-16px; padding:4px; border-radius:9px; }
    .student-form-refined .student-admin-tabs button { min-height:68px; gap:6px; padding:8px 6px; }
    .student-tab-number { width:23px; height:23px; flex-basis:23px; border-radius:6px; font-size:10px; }
    .student-tab-copy strong { font-size:10px; }
    .student-form-checks { grid-template-columns:minmax(0,1fr); }
    .student-form-refined .student-save-bar { gap:7px; padding:11px 13px!important; }
    .student-form-refined .student-save-bar .btn { flex:1; min-width:0; padding:9px; font-size:11px; }
    .student-form-refined .student-save-bar .btn:first-child { flex:0 0 auto; margin-right:0; }
}
@media(max-width:440px) {
    .student-form-grid, .student-form-refined .student-form-family-fields { grid-template-columns:minmax(0,1fr); }
    .student-form-refined .student-admin-tabs button { flex-direction:column; justify-content:center; gap:5px; min-height:88px; text-align:center; }
    .student-form-refined .student-admin-tabs .student-tab-copy strong { font-size:10px; }
    .student-form-refined .student-save-bar [data-modal-open="notification-create-modal"] { flex:0 0 34px; min-width:34px; padding-inline:7px; font-size:0; }
}

/* The same profile navigation is used when creating, editing and viewing students. */
.student-form-refined .profile-tabs { grid-template-columns:repeat(var(--profile-tab-count,4),minmax(0,1fr)); gap:5px; margin:0 0 20px; padding:5px; border-color:#e1e8ec; background:#fff; box-shadow:none; }
.student-form-refined .profile-tabs button { gap:8px; min-height:44px; border-radius:8px; font-size:12px; }
.student-form-refined .profile-tabs button:not(.active) > .icon { color:var(--tone); }
.student-form-refined .profile-tabs button.active { color:#fff; box-shadow:none; }
.student-form-refined .profile-tabs button:focus-visible { outline:2px solid var(--tone); outline-offset:2px; }
/* Inactive profile tabs: tinted by their own tone so they read as clickable sections, not disabled text. */
.student-form-refined .profile-tabs button:not(.active) { border:1px solid color-mix(in srgb, var(--tone) 28%, #fff); color:color-mix(in srgb, var(--tone) 78%, #1f2a36); background:color-mix(in srgb, var(--tone-soft) 75%, #fff); font-weight:800; transition:background .15s, border-color .15s, transform .15s, box-shadow .15s; }
.student-form-refined .profile-tabs button:not(.active):hover { border-color:color-mix(in srgb, var(--tone) 55%, #fff); background:var(--tone-soft); box-shadow:0 4px 12px color-mix(in srgb, var(--tone) 18%, transparent); transform:translateY(-1px); }
.student-form-refined .profile-tabs button.active { border:1px solid var(--tone); box-shadow:0 6px 14px color-mix(in srgb, var(--tone) 30%, transparent); }
.student-form-refined .student-form-card-heading > span { color:var(--tone,#60758b); border-color:color-mix(in srgb,var(--tone,#60758b) 14%,white); background:var(--tone-soft,#edf2f6); }
.student-form-refined [data-profile-panel=assignments] { --tone:#168a82; --tone-soft:#e7f8f6; }
.student-form-refined [data-profile-panel=assessments] { --tone:#d17a19; --tone-soft:#fff2df; }
.student-form-refined [data-profile-panel=documents] { --tone:#168ca5; --tone-soft:#e7f8fb; }
.student-form-refined .profile-panel > .panel-section-heading { gap:12px; margin:0; padding:17px 18px; border-color:#e1e8ec; background:#fff; }
.student-form-refined .profile-panel > .panel-section-heading > span { color:var(--tone); background:var(--tone-soft); }
.student-profile-panel-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; }
.student-profile-start { display:flex; align-items:center; flex-direction:column; gap:0; padding:42px 28px; border:1px solid #e1e8ec; border-radius:12px; background:#fff; text-align:center; }
.student-profile-start-icon { display:grid; width:62px; height:62px; margin-bottom:20px; place-items:center; border-radius:18px; color:var(--tone); background:var(--tone-soft); }
.student-profile-start-icon > .icon { width:29px; height:29px; }
.student-form-refined .student-profile-start h3 { margin:0 0 10px; color:#354657; font-size:17px; line-height:1.5; }
.student-profile-start p { max-width:480px; margin:0; color:#7b8794; font-size:13px; line-height:1.75; }
.student-profile-steps { display:flex; justify-content:center; flex-wrap:wrap; gap:12px 24px; margin:26px 0; padding:0; list-style:none; }
.student-profile-steps li { display:flex; align-items:center; gap:8px; color:#657383; font-size:11px; }
.student-profile-steps li > span { display:grid; width:23px; height:23px; flex:0 0 23px; place-items:center; border:1px solid #e1e8ec; border-radius:50%; color:var(--tone); font-size:10px; font-weight:700; }
.student-profile-start .btn { max-width:100%; min-height:42px; font-size:12px; white-space:normal; }
.student-profile-back { display:inline-flex; align-items:center; gap:6px; margin-top:17px; padding:5px; border:0; color:#6d7a89; background:transparent; font-size:12px; cursor:pointer; }
.student-profile-back > .icon { width:14px; height:14px; }
/* Pending tabs (new student): infographic guide. Accent colour follows the tab tone. */
.pending-guide { display:grid; gap:22px; padding:30px 32px; border:1px solid #e1e8ec; border-radius:14px; background:linear-gradient(180deg, var(--tone-soft) 0, #fff 150px); }
.pending-guide-head { display:grid; justify-items:center; gap:8px; text-align:center; }
.pending-guide-badge { display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border:1px solid color-mix(in srgb, var(--tone) 30%, #fff); border-radius:999px; color:var(--tone); background:#fff; font-size:11px; font-weight:700; }
.pending-guide-badge .icon { width:13px; height:13px; }
.student-form-refined .pending-guide-head h3 { margin:2px 0 0; color:#24364a; font-size:19px; font-weight:800; line-height:1.4; }
.pending-guide-head p { max-width:520px; margin:0; color:#5f6c7a; font-size:13px; line-height:1.6; }
.pending-flow { position:relative; display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px; margin:0; padding:0; list-style:none; counter-reset:none; }
.pending-flow::before { content:''; position:absolute; top:21px; left:16.66%; right:16.66%; height:2px; background:repeating-linear-gradient(90deg, color-mix(in srgb, var(--tone) 45%, #fff) 0 8px, transparent 8px 14px); }
.pending-flow li { position:relative; display:grid; align-content:start; justify-items:center; gap:10px; text-align:center; }
.pending-flow-dot { position:relative; z-index:1; display:grid; width:44px; height:44px; place-items:center; border:2px solid color-mix(in srgb, var(--tone) 40%, #fff); border-radius:50%; color:var(--tone); background:#fff; font-size:16px; font-weight:800; box-shadow:0 0 0 5px #fff; }
.pending-flow-dot .icon { width:18px; height:18px; }
.pending-flow li.is-current .pending-flow-dot { border-color:var(--tone); color:#fff; background:var(--tone); box-shadow:0 0 0 5px #fff, 0 6px 16px color-mix(in srgb, var(--tone) 35%, transparent); }
.pending-flow li.is-locked .pending-flow-dot { border-style:dashed; color:#8a97a3; }
.pending-flow li > div { display:grid; gap:3px; }
.pending-flow strong { color:#2b3b4c; font-size:13px; font-weight:800; }
.pending-flow small { color:#6b7886; font-size:11.5px; line-height:1.5; }
.pending-flow em { justify-self:center; margin-top:4px; padding:2px 9px; border-radius:999px; color:var(--tone); background:var(--tone-soft); font-size:10.5px; font-style:normal; font-weight:700; }
.pending-features { padding:18px; border:1px solid #e6edf0; border-radius:12px; background:#fff; }
.pending-features-title { margin:0 0 12px; color:#4d5b69; font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.pending-features ul { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px; margin:0; padding:0; list-style:none; }
.pending-features li { display:flex; align-items:flex-start; gap:11px; padding:12px; border-radius:10px; background:#f7fafb; }
.pending-features li > span { display:grid; width:34px; height:34px; flex:0 0 34px; place-items:center; border-radius:10px; color:var(--tone); background:var(--tone-soft); }
.pending-features li > span .icon { width:17px; height:17px; }
.pending-features li strong { display:block; color:#2b3b4c; font-size:12.5px; font-weight:800; }
.pending-features li small { display:block; margin-top:2px; color:#6b7886; font-size:11.5px; line-height:1.5; }
.pending-chips { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.pending-chips span { display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border:1px solid #e1e8ec; border-radius:999px; color:#4d5b69; background:#fff; font-size:11px; font-weight:600; }
.pending-chips .icon { width:13px; height:13px; color:var(--tone); }
.pending-note { display:flex; align-items:flex-start; gap:9px; margin:0; padding:11px 14px; border:1px solid color-mix(in srgb, var(--tone) 25%, #fff); border-radius:10px; color:#2f4a44; background:var(--tone-soft); font-size:12px; line-height:1.6; }
.pending-note .icon { width:16px; height:16px; flex:0 0 16px; margin-top:2px; color:var(--tone); }
.pending-note-muted { border-color:#e1e8ec; color:#5f6c7a; background:#f7fafb; }
.pending-note-muted .icon { color:#8a97a3; }
.pending-actions { display:grid; justify-items:center; gap:4px; }
.pending-actions .btn { max-width:100%; min-height:42px; font-size:12px; white-space:normal; }
.pending-actions .student-profile-back { margin-top:6px; }
@media(max-width:760px) {
    .pending-guide { padding:22px 16px; }
    .pending-flow { grid-template-columns:minmax(0,1fr); gap:16px; }
    .pending-flow::before { top:22px; bottom:22px; left:21px; right:auto; width:2px; height:auto; background:repeating-linear-gradient(180deg, color-mix(in srgb, var(--tone) 45%, #fff) 0 8px, transparent 8px 14px); }
    .pending-flow li { grid-template-columns:44px minmax(0,1fr); justify-items:start; align-items:center; text-align:left; }
    .pending-flow em { justify-self:start; }
    .pending-features ul { grid-template-columns:minmax(0,1fr); }
    .student-form-refined .pending-guide-head h3 { font-size:16px; }
}
.student-form-refined .student-administrative [data-boarding-detail]:disabled { border-color:#e7ecef; color:#8894a2; background:#f4f7f9; cursor:not-allowed; }
.student-boarding-help { margin:14px 0 0; padding:10px 12px; border:1px solid #e0ebe7; border-radius:8px; color:#657d73; background:#f4f9f6; font-size:11px; line-height:1.65; }
.student-boarding-card .student-boarding-period-start { grid-column:1; }
.student-form-refined .student-admin-field { scroll-margin-block:110px 24px; }
/* Record modal tabs always fill the bar, whatever the number of visible tabs. */
.student-form-refined.student-profile-modal .profile-tabs { grid-template-columns:repeat(var(--profile-tab-count,4),minmax(0,1fr)); }
/* File hồ sơ: centred call to action, then the document list. */
.doc-hub { display:grid; justify-items:center; gap:10px; margin:0 0 18px; padding:30px 24px 26px; border:1px dashed color-mix(in srgb, #168a82 40%, #fff); border-radius:16px; background:linear-gradient(180deg, #eef9f7 0, #fff 140px); text-align:center; }
.doc-hub.is-empty { padding-block:40px 34px; }
.doc-hub:not(.is-empty) { gap:8px; padding:20px 24px; }
.doc-hub:not(.is-empty) .doc-hub-icon { display:none; }
.doc-hub-icon { display:grid; width:64px; height:64px; place-items:center; border-radius:18px; color:#168a82; background:#fff; box-shadow:0 8px 22px rgba(22,138,130,.16), inset 0 0 0 1px #d7ece9; }
.doc-hub-icon .icon { width:30px; height:30px; }
.student-form-refined .doc-hub h3 { margin:6px 0 0; color:#203446; font-size:18px; font-weight:800; }
.doc-hub > p { max-width:520px; margin:0; color:#5f6c7a; font-size:13px; line-height:1.6; }
.doc-hub .student-document-add-button { min-height:50px; margin-top:8px; padding-inline:30px; border-radius:12px; font-size:15px; font-weight:800; box-shadow:0 12px 26px rgba(165,47,35,.28); }
.doc-hub .student-document-add-button .icon { width:20px; height:20px; }
.doc-hub .student-document-add-button:hover { transform:translateY(-1px); box-shadow:0 16px 30px rgba(165,47,35,.32); }
.doc-hub-meta { display:inline-flex; align-items:center; gap:6px; margin:4px 0 0; color:#7b8794; font-size:12px; }
.doc-hub-meta li { display:inline-flex; align-items:center; gap:6px; }
.doc-hub-meta .icon { width:15px; height:15px; color:#168a82; }
.doc-hub-chips { display:flex; flex-wrap:wrap; justify-content:center; gap:7px; max-width:720px; margin-top:12px; padding-top:16px; border-top:1px solid #e3eeec; }
.doc-hub-chips span { display:inline-flex; align-items:center; gap:6px; padding:5px 11px; border:1px solid #dbe7e5; border-radius:999px; color:#3f4f5d; background:#fff; font-size:11.5px; font-weight:600; }
.doc-hub-chips .icon { width:14px; height:14px; color:#168a82; }
.doc-list-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:0 0 10px; padding:0 2px; }
.doc-list-head strong { color:#203446; font-size:14px; font-weight:800; }
.doc-list-head small { color:#7b8794; font-size:11.5px; }
@media(max-width:640px) {
    .student-form-refined.student-profile-modal .profile-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .doc-hub { padding:24px 16px; }
    .doc-hub .student-document-add-button { width:100%; justify-content:center; }
    .doc-hub-meta { justify-content:center; text-align:center; }
}
@media(max-width:640px) {
    .student-form-refined .profile-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); margin-bottom:16px; }
    .student-form-refined .profile-tabs button { min-height:40px; font-size:11px; }
    .student-profile-start { padding:28px 17px; }
    .student-profile-steps { align-items:flex-start; flex-direction:column; gap:14px; text-align:left; }
    .student-form-refined .student-profile-start h3 { font-size:15px; }
    .student-profile-start p { font-size:12px; }
}

/* Use case diagram (page=roles&tab=use-cases). Palette mirrors App\Services\UseCaseDiagramSvg::PALETTE. */
.ucd-c0 { --ucd: #2563eb; } .ucd-c1 { --ucd: #b45309; } .ucd-c2 { --ucd: #7c3aed; } .ucd-c3 { --ucd: #0f766e; }
.ucd-c4 { --ucd: #be123c; } .ucd-c5 { --ucd: #4d7c0f; } .ucd-c6 { --ucd: #c2410c; } .ucd-c7 { --ucd: #0369a1; }
.page-action-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.page-action-divider { align-self: stretch; width: 1px; margin: 6px 4px; background: var(--border); }
.ucd-launch { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 7px 18px 7px 7px; color: var(--text); border: 1px solid #f1d5cf; border-radius: 14px; background: linear-gradient(135deg, #fff 0%, #fff7f4 100%); box-shadow: 0 4px 14px rgba(165,47,35,.08); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.ucd-launch:hover { border-color: var(--primary-light); box-shadow: 0 10px 24px rgba(165,47,35,.16); transform: translateY(-1px); }
.ucd-launch:focus-visible { outline: 3px solid rgba(192,57,43,.35); outline-offset: 2px; }
.ucd-launch-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; color: #fff; border-radius: 11px; background: var(--primary-gradient); box-shadow: 0 6px 14px rgba(165,47,35,.25); }
.ucd-launch-icon .icon { width: 26px; height: 26px; stroke-width: 1.7; }
.ucd-launch-text { display: grid; gap: 1px; text-align: left; }
.ucd-launch-text strong { font-size: .9rem; line-height: 1.2; }
.ucd-launch-text small { color: var(--muted); font-size: .73rem; font-weight: 600; }
@media (max-width: 720px) {
    .page-action-buttons { width: 100%; justify-content: stretch; }
    .page-action-buttons > * { flex: 1 1 100%; }
    .page-action-divider { display: none; }
}
.ucd-filters { display: grid; gap: 12px; margin-bottom: 18px; padding: 16px 18px; }
.ucd-filter-row { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: start; gap: 12px; }
.ucd-filter-label { padding-top: 7px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ucd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ucd-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 11px; color: var(--text); border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: .8rem; font-weight: 650; text-decoration: none; transition: border-color .12s ease, background .12s ease; }
.ucd-chip small { color: var(--muted); font-size: .7rem; font-weight: 700; }
.ucd-chip:hover { border-color: var(--tone, var(--primary)); }
.ucd-chip.is-active { color: #fff; border-color: var(--tone-dark, var(--primary-dark)); background: var(--tone-dark, var(--primary-dark)); }
.ucd-chip.is-active small { color: rgba(255,255,255,.8); }
.ucd-dot { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--ucd, var(--muted)); }
.ucd-card { margin-bottom: 18px; overflow: hidden; }
.ucd-stats { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: .8rem; }
.ucd-stats strong { color: var(--text); font-size: 1rem; }
.ucd-canvas { overflow: auto; max-height: 78vh; padding: 12px; background: #f8fafc; border-bottom: 1px solid var(--border); }
.ucd-canvas:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ucd-svg { display: block; max-width: none; height: auto; margin: 0 auto; }
.ucd-svg .ucd-link { transition: opacity .12s ease, stroke-width .12s ease; }
.ucd-svg:has(.ucd-actor-group:hover) .ucd-actor-group:not(:hover) .ucd-link { opacity: .12; }
.ucd-svg .ucd-actor-group:hover .ucd-link { stroke-width: 2.6; }
.ucd-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 12px 18px; color: var(--muted); font-size: .76rem; }
.ucd-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ucd-legend svg { width: 14px; height: 18px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; }
.ucd-legend em { color: var(--text); font-style: italic; }
.ucd-legend em.is-danger { color: var(--danger); }
.ucd-legend-ellipse { display: inline-block; width: 30px; height: 15px; border: 1.3px solid #64748b; border-radius: 50%; background: #fff; }
.ucd-legend-ellipse.is-ungranted { border-style: dashed; border-color: #cbd5e1; background: #f1f5f9; }
.ucd-legend-arrow { position: relative; display: inline-block; width: 30px; height: 2px; background: var(--text); }
.ucd-legend-arrow::after { position: absolute; top: -4px; right: -1px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid var(--text); content: ""; }
.ucd-generated { margin-left: auto; }
.ucd-note { margin-bottom: 18px; padding: 14px 18px; }
.ucd-note summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; }
.ucd-note ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 18px; margin: 12px 0 0; padding-left: 18px; }
.ucd-note small { display: block; color: var(--muted); }
.ucd-matrix th, .ucd-matrix td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.ucd-matrix thead th { background: var(--surface-soft); font-size: .76rem; }
.ucd-matrix th a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 750; text-decoration: none; }
.ucd-matrix th a:hover { color: var(--primary-dark); }
.ucd-matrix th small { display: block; color: var(--muted); font-size: .68rem; font-weight: 500; }
.ucd-matrix tbody th { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; }
.ucd-matrix tr.is-selected th, .ucd-matrix tr.is-selected td { background: #fff7ed; }
.ucd-matrix td a { display: inline-block; min-width: 46px; padding: 3px 8px; border-radius: 999px; font-weight: 750; text-decoration: none; }
.ucd-matrix td.is-full a { color: #166534; background: #dcfce7; }
.ucd-matrix td.is-partial a { color: #92400e; background: #fef3c7; }
.ucd-matrix td.is-none { color: #cbd5e1; }
.ucd-notes { display: grid; gap: 8px; margin-top: 16px; color: var(--muted); font-size: .8rem; }
.ucd-notes p { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
.ucd-notes .icon { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; }
@media (max-width: 720px) {
    .ucd-filter-row { grid-template-columns: 1fr; gap: 6px; }
    .ucd-filter-label { padding-top: 0; }
    .ucd-canvas { max-height: none; }
    .ucd-generated { margin-left: 0; }
}
@media print {
    .ucd-filters, .page-actions { display: none; }
    .ucd-canvas { max-height: none; overflow: visible; }
}

/* ===== Danh mục: menu con theo nhóm + panel bảng dạng hàng ===== */
.catalog-tone-class { --code-color: #6d28d9; --code-soft: #f3efff; --code-border: #ddd0fb; }
.catalog-tone-specialty { --code-color: #b45309; --code-soft: #fff4e5; --code-border: #f6d7a8; }
.catalog-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.catalog-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: .8rem; }
.catalog-table--index { --catalog-cols: 52px minmax(160px, 1.4fr) minmax(130px, 1fr) minmax(100px, .8fr) 52px; }
.catalog-index .catalog-row-usage b { color: var(--text); }
/* Catalog list shown inside its own window: the window provides the frame, so the panel drops its card chrome. */
.catalog-kind-modal .modal-body { padding: 16px 20px 20px; }
.catalog-kind-body > .catalog-panel { margin: 0; border: 0; box-shadow: none; background: transparent; }
.catalog-kind-body > .catalog-panel > .catalog-panel-head { padding: 0 0 14px; border-bottom: 0; }
.catalog-kind-body .catalog-panel-icon { display: none; }
.catalog-main { min-width: 0; }
.catalog-nav { position: sticky; top: 16px; display: grid; gap: 18px; padding: 14px 10px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 24px rgba(57,65,76,.045); }
.catalog-nav-section { position: relative; display: grid; gap: 3px; }
.catalog-nav-group { margin: 0 0 5px; padding: 0 10px; color: #8a94a3; font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.catalog-nav-section.is-hierarchy::before { position: absolute; top: 46px; bottom: 26px; left: 27px; width: 2px; border-radius: 2px; background: linear-gradient(#b9d1fb, #efbdd0, #a9ddd6); content: ""; }
.catalog-nav-item { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; color: var(--text); border-radius: 11px; text-decoration: none; transition: background-color .14s ease; }
.catalog-nav-item:hover { background: #f5f7f9; }
.catalog-nav-item:focus-visible { outline: 2px solid #187b67; outline-offset: 1px; }
.catalog-nav-item.active { background: #ecf8f3; box-shadow: inset 3px 0 #187b67; }
.catalog-nav-icon { position: relative; z-index: 1; display: grid; width: 34px; height: 34px; place-items: center; color: var(--code-color, #187b67); border: 1px solid var(--code-border, #cfe7dd); border-radius: 10px; background: var(--code-soft, #ecf8f3); }
.catalog-nav-icon .icon { width: 16px; height: 16px; }
.catalog-nav-text { display: grid; min-width: 0; gap: 1px; }
.catalog-nav-text strong { overflow: hidden; font-size: .84rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.catalog-nav-text small { overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.catalog-nav-item.active .catalog-nav-text strong { color: #145f50; }
.catalog-nav-count { min-width: 26px; padding: 2px 7px; color: #5d6878; border-radius: 999px; background: #f0f2f5; font-size: .68rem; font-weight: 800; text-align: center; }
.catalog-nav-item.active .catalog-nav-count { color: #fff; background: #187b67; }

.catalog-panel { overflow: hidden; }
.catalog-panel-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 18px 20px 16px; border-bottom: 1px solid var(--border); }
.catalog-panel-icon { display: grid; width: 44px; height: 44px; place-items: center; color: var(--code-color); border: 1px solid var(--code-border); border-radius: 13px; background: var(--code-soft); }
.catalog-panel-icon .icon { width: 20px; height: 20px; }
.catalog-panel-title { min-width: 0; }
.catalog-panel-title h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 1.12rem; }
.catalog-panel-title p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.catalog-count { padding: 2px 8px; color: #5d6878; border-radius: 999px; background: #f0f2f5; font-size: .7rem; font-weight: 800; }
.catalog-panel-actions { display: flex; gap: 8px; }
.catalog-code-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; font-size: .66rem; font-weight: 750; }
.catalog-code-legend > span { color: #8a94a3; text-transform: uppercase; letter-spacing: .06em; }
.catalog-code-legend b { padding: 2px 8px; color: var(--code-color); border: 1px solid var(--code-border); border-radius: 6px; background: var(--code-soft); }
.catalog-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: #fafbfc; }
.catalog-toolbar .search-box { width: min(420px, 100%); }

.catalog-table { --catalog-cols: 52px minmax(140px, 1.4fr) minmax(100px, 1fr) 112px 52px; display: grid; }
.catalog-table--branches { --catalog-cols: 52px minmax(140px, 1.5fr) 140px minmax(120px, 1fr) 112px 52px; }
.catalog-table > .empty-state { margin: 18px; }
.catalog-table-head, .catalog-row { display: grid; grid-template-columns: var(--catalog-cols); align-items: center; gap: 10px; padding: 10px 16px; }
.catalog-table-head > span:last-child { white-space: nowrap; text-align: center; }
.catalog-table-head { padding-top: 11px; padding-bottom: 11px; color: #8a94a3; border-bottom: 1px solid #eef0f3; font-size: .64rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.catalog-row { min-width: 0; color: var(--text); border-bottom: 1px solid #f1f2f5; text-decoration: none; transition: background-color .14s ease; }
.catalog-row:last-child { border-bottom: 0; }
.catalog-row:hover { background: #f8faf9; }
.catalog-row:focus-visible { position: relative; z-index: 1; outline: 2px solid #187b67; outline-offset: -2px; }
.catalog-code { display: grid; width: 42px; height: 42px; overflow: hidden; place-items: center; color: var(--code-color, #187b67); border: 1px solid var(--code-border, #cfe7dd); border-radius: 11px; background: var(--code-soft, #ecf8f3); font-family: "SFMono-Regular", Consolas, monospace; font-size: .9rem; font-weight: 850; letter-spacing: .04em; }
.catalog-code .icon { width: 17px; height: 17px; }
.catalog-thumb img { width: 100%; height: 100%; object-fit: cover; }
.catalog-row-name { display: grid; min-width: 0; gap: 2px; }
.catalog-row-name strong { overflow: hidden; font-size: .88rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.catalog-row-name small { overflow: hidden; color: var(--muted); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.catalog-row-usage { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 2px 6px; color: #4b5563; font-size: .78rem; line-height: 1.45; }
.catalog-row-usage b { color: var(--text); font-weight: 800; }
.catalog-metric { white-space: nowrap; }
.catalog-metric + .catalog-metric::before { margin-right: 5px; color: #c3c9d1; content: "·"; }
.catalog-row-usage .icon { flex: 0 0 auto; width: 14px; height: 14px; color: #8a94a3; }
.catalog-row-usage.is-empty { color: #9aa3ae; }
.catalog-row-usage.is-empty b { color: #9aa3ae; }
.catalog-row-code { min-width: 0; }
.catalog-status { display: inline-flex; width: fit-content; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: .7rem; font-weight: 750; white-space: nowrap; }
.catalog-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.catalog-status.is-active { color: #157347; background: #e8f6ee; }
.catalog-status.is-inactive { color: #6b7280; background: #f0f1f3; }
.catalog-row.is-inactive .catalog-row-name strong, .catalog-row.is-inactive .catalog-code { opacity: .6; }
/* Row action reuses the register icon buttons (blue view, amber edit) so every list reads the same. */
.catalog-row-actions { justify-self: center; }
/* Result bar matches the student register: count on the left, page size on the right. */
.catalog-panel .list-result-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.catalog-panel .list-result-bar form { display: flex; align-items: center; margin: 0; }
.catalog-panel .list-result-bar label { display: flex; align-items: center; gap: 8px; font-size: .75rem; white-space: nowrap; }
.catalog-panel .list-result-bar select { width: auto; min-width: 72px; padding: 4px 8px; }
.catalog-row-name strong a { color: inherit; text-decoration: none; }
.catalog-row-name strong a:hover, .catalog-row-name strong a:focus-visible { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.catalog-row:hover .register-action-edit, .catalog-row:focus-visible .register-action-edit { background: #ffe9b0; }
.catalog-row:hover .register-action-view, .catalog-row:focus-visible .register-action-view { background: #d7e8fb; }

@media (max-width: 1100px) {
    .catalog-workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .catalog-nav { position: static; display: flex; gap: 6px; overflow-x: auto; padding: 8px; scrollbar-width: thin; }
    .catalog-nav-section { display: flex; flex: 0 0 auto; gap: 6px; }
    .catalog-nav-section + .catalog-nav-section { padding-left: 8px; border-left: 1px solid var(--border); }
    .catalog-nav-group, .catalog-nav-text small, .catalog-nav-section.is-hierarchy::before { display: none; }
    .catalog-nav-item { flex: 0 0 auto; grid-template-columns: 28px auto auto; gap: 8px; padding: 6px 10px 6px 6px; }
    .catalog-nav-icon { width: 28px; height: 28px; border-radius: 8px; }
    .catalog-nav-item.active { box-shadow: inset 0 0 0 1px #9dd8c6; }
    .catalog-table--branches { --catalog-cols: 52px minmax(0, 1.6fr) 140px 128px 96px; }
    .catalog-table--branches .catalog-table-head > span:nth-child(4), .catalog-table--branches .catalog-row > .catalog-row-usage { display: none; }
}

@media (max-width: 760px) {
    .catalog-panel-head { grid-template-columns: auto minmax(0, 1fr); padding: 15px; }
    .catalog-panel-actions { grid-column: 1 / -1; }
    .catalog-panel-actions .btn { width: 100%; justify-content: center; }
    .catalog-toolbar { padding: 10px 15px; }
    .catalog-table-head { display: none; }
    .catalog-row, .catalog-table--branches .catalog-row { grid-template-columns: 42px minmax(0, 1fr) auto; grid-template-areas: "code name status" "code usage usage"; gap: 3px 12px; padding: 12px 15px; }
    .catalog-row > .catalog-code { grid-area: code; align-self: start; }
    .catalog-row > .catalog-row-name { grid-area: name; }
    .catalog-row > .catalog-status { grid-area: status; }
    .catalog-row > .catalog-row-usage, .catalog-table--branches .catalog-row > .catalog-row-usage { display: flex; grid-area: usage; font-size: .74rem; }
    .catalog-row > .catalog-row-code { grid-area: usage; }
    .catalog-table--branches .catalog-row { grid-template-areas: "code name status" "code codevis codevis" "code usage usage"; }
    .catalog-table--branches .catalog-row > .catalog-row-code { grid-area: codevis; margin-top: 4px; }
    .catalog-row-actions { display: none; }
}

/* Shared one-row registers: staff by branch, teachers, guardians and periodic assessments reuse the student register. */
.data-register .student-register-filters[data-filter-count="1"] { grid-template-columns: minmax(140px, 1fr) minmax(220px, 2fr) auto; }
.data-register .student-register-filters[data-filter-count="2"] { grid-template-columns: repeat(2, minmax(140px, 1fr)) minmax(200px, 1.6fr) auto; }
.data-register .student-register-filters[data-filter-count="3"] { grid-template-columns: repeat(3, minmax(130px, 1fr)) minmax(200px, 1.4fr) auto; }
.data-register .student-register-table td[data-register-column="students"],
.data-register .student-register-table td[data-register-column="note"],
.data-register .student-register-table td[data-register-column="branches"] { white-space: normal; min-width: 220px; max-width: 360px; }
@media (max-width: 1000px) {
    .data-register .student-register-filters[data-filter-count] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .data-register .student-register-filters[data-filter-count] { grid-template-columns: 1fr 1fr; }
    .data-register .student-register-table td[data-register-column="students"],
    .data-register .student-register-table td[data-register-column="note"],
    .data-register .student-register-table td[data-register-column="branches"] { min-width: 0; max-width: none; }
}
/* Search moved into the shared register filters: status summary + view switch only. */
.assessment-control-deck { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 760px) { .assessment-control-deck { grid-template-columns: 1fr; } }
/* Register main column (person / record name): neutral text colour on every screen, accent only on hover. */
.student-register-table td[data-register-primary] a,
.student-register-table td[data-register-primary] a:visited { color: var(--text); }
.student-register-table td[data-register-primary] a:hover,
.student-register-table td[data-register-primary] a:focus-visible { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
/* Record deletion: danger action sits on the left of the modal footer, away from Save. */
.modal-footer .record-delete-trigger { margin-right: auto; }
.record-delete-modal .modal-body { display: grid; gap: 12px; }
.record-delete-lead { margin: 0; color: var(--text); }
.record-delete-reasons { margin: 0; padding-left: 20px; color: #5b6878; display: grid; gap: 4px; }
.record-delete-confirm { font-weight: 600; }
.record-delete-note { margin: 0; color: var(--muted); font-size: .8rem; }
.modal-icon.tone-danger { color: var(--danger); background: #fff1ef; }
/* Potential-student register: status chips, call action, overdue rows. */
.data-register .register-status-chips { padding: 0; margin: 18px 0 0; }
.data-register .register-phone { display: inline-flex; align-items: center; gap: 10px; }
.data-register .register-phone .lead-call-action { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px; font-size: .75rem; font-weight: 700; text-decoration: none; }
.data-register .register-phone .lead-call-action span { display: inline; }
.data-register .lead-callback-chip.is-upcoming { color: #5b21b6; background: #f5f3ff; }
.data-register .lead-callback-chip.is-today { color: #92400e; background: #fef3c7; }
.data-register .lead-callback-chip.is-overdue { color: #b91c1c; background: #fee2e2; }
.data-register .student-register-table tr.is-overdue > td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
@media (max-width: 640px) {
    .data-register .student-register-table tr.is-overdue { box-shadow: inset 3px 0 0 #dc2626; }
    .data-register .student-register-table tr.is-overdue > td:first-child { box-shadow: none; }
}
.data-register .lead-status { max-width: none; }
.data-register .student-register-table td { vertical-align: middle; }
.data-register .lead-callback-chip > span { flex-wrap: nowrap; }
@media (max-width: 640px) {
    .data-register .register-phone { flex-wrap: wrap; gap: 6px; }
    .data-register .lead-status { white-space: normal; max-width: 100%; }
    .data-register .lead-callback-chip > span { flex-wrap: wrap; white-space: normal; }
}

/* ---------- Quản trị nhắn tin nội bộ ---------- */
.chat-admin-intro { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 18px; }
.chat-admin-stats { display: grid; grid-template-columns: repeat(4, minmax(90px, 1fr)); gap: 10px; }
.chat-admin-stats div { padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-align: center; }
.chat-admin-stats strong { display: block; font-size: 1.35rem; color: var(--brand-logo); }
.chat-admin-stats small { color: var(--muted); font-size: .72rem; }
.chat-admin-stats .text-danger { color: var(--danger, #c0392b); }
.chat-admin-grid { align-items: start; }
.chat-mode-options { display: grid; gap: 10px; }
.chat-mode-option { display: grid; grid-template-columns: auto 44px 1fr; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.chat-mode-option.active { border-color: var(--brand-logo); background: #fdf3f5; }
.chat-mode-option input { accent-color: var(--brand-logo); }
.chat-mode-option strong, .chat-mode-option small { display: block; }
.chat-mode-option small { color: var(--muted); font-size: .78rem; }
.chat-mode-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.chat-mode-icon.tone-success { background: #e8f8ef; color: #1f9d61; }
.chat-mode-icon.tone-warning { background: #fff4e5; color: #d97706; }
.chat-mode-icon.tone-danger { background: #fdecea; color: #c0392b; }
.chat-filter-modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-block; padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px; font-weight: 700; font-size: .82rem; cursor: pointer; }
.chip-radio input:checked + span { background: var(--brand-logo); color: #fff; border-color: var(--brand-logo); }
.chat-filter-summary { margin-top: 10px; font-size: .82rem; }
.chat-filter-summary ul { margin: 8px 0 0; padding-left: 18px; }
.chat-limit-grid { margin-top: 10px; }
.chat-report-list { display: grid; gap: 8px; }
.chat-report { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.chat-report.is-closed { opacity: .7; }
.chat-report summary { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-wrap: wrap; }
.chat-report summary small { color: var(--muted); margin-left: auto; }
.chat-report-messages { margin: 10px 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.chat-report-messages li { padding: 8px 10px; border-radius: 10px; background: var(--surface-soft); }
.chat-report-messages p { margin: 4px 0 0; white-space: pre-wrap; }
.chat-report .inline-actions input { flex: 1; min-width: 160px; }
.chat-admin-savebar { position: sticky; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 10px 30px rgba(16,24,40,.08); }
.chat-admin-savebar [data-save-state] { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .88rem; }
.chat-admin-savebar.has-changes { border-color: var(--brand-logo); }
.chat-admin-savebar.has-changes [data-save-state] { color: var(--brand-logo); font-weight: 700; }
@media (max-width: 720px) { .chat-admin-stats { grid-template-columns: repeat(2, 1fr); } .chat-admin-savebar { flex-direction: column; align-items: stretch; } }
.page-intro { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.page-intro h2 { margin: 4px 0 6px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-stack { display: grid; gap: 6px; margin: 10px 0; }
.field-stack > span { font-size: .82rem; font-weight: 700; }
.field-stack input, .field-stack textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.soft-chip.status-success { color: #176046; background: #e6f6ee; }
.soft-chip.status-warning { color: #7b5415; background: #fff4d8; }
.soft-chip.status-danger { color: #8f3543; background: #fdecef; }
.soft-chip.status-muted { color: var(--muted); background: var(--surface-soft); }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } .page-intro { flex-direction: column; } }
