/* SBNC admin UI — shared styles
   Extracted verbatim from the original application's stylesheets
   (css/global.css, layout.css, components.css, pages.css, animations.css, responsive.css). */

/* ═══ Design tokens & global defaults (global.css) ═══ */
/* Orbit design system — foundational tokens and global element defaults */
:root {
  --color-bg: #fbf8f3;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #ebe3d8;
  --color-hover: #f5efe8;
  --color-primary: #0b78a0;
  --color-primary-strong: #086483;
  --color-primary-soft: #effbfe;
  --color-success: #059669;
  --color-success-soft: #ecfdf5;
  --color-warning: #d97706;
  --color-warning-soft: #fffbeb;
  --color-danger: #f76e3c;
  --color-danger-soft: #fff1ea;
  --color-violet: #7c3aed;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 40px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-xs: 0 1px 2px rgb(17 24 39 / 4%);
  --shadow-sm: 0 3px 10px rgb(17 24 39 / 5%);
  --shadow-md: 0 14px 30px rgb(17 24 39 / 10%);
  --font: "Inter Tight", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --transition: 200ms ease;
}


* { box-sizing: border-box; }
html { background: var(--color-bg); }
body { min-width: 320px; margin: 0; color: var(--color-text); background: var(--color-bg); font: 400 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; line-height: 1.25; letter-spacing: -0.8px; }
h2 { font-size: 24px; line-height: 1.3; letter-spacing: -0.4px; }
h3 { font-size: 18px; line-height: 1.35; letter-spacing: -0.2px; }
::selection { color: #fff; background: var(--color-primary); }
:focus-visible { outline: 3px solid rgb(11 120 160 / 28%); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 1000; top: -60px; left: 16px; padding: 10px 14px; color: #fff; background: var(--color-text); border-radius: var(--radius-sm); transition: top var(--transition); }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.muted { color: var(--color-text-muted); }
.eyebrow { color: var(--color-text-muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.u-mobile-only { display: none; }

/* ═══ App shell: sidebar, topbar, content (layout.css) ═══ */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 240px; padding: 20px 12px 16px; background: var(--color-surface); border-right: 1px solid var(--color-border); transition: width var(--transition), transform var(--transition); }
.sidebar__header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 24px; }
.sidebar__brand { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 10px; }
.brand-mark { display: grid; flex: 0 0 30px; width: 30px; height: 30px; color: white; background: var(--color-primary); border-radius: 9px; place-items: center; box-shadow: 0 4px 10px rgb(11 120 160 / 20%); }
.brand-mark svg { width: 17px; height: 17px; stroke-width: 2.3; }
.brand-name { overflow: hidden; font-weight: 700; font-size: 17px; letter-spacing: -0.45px; white-space: nowrap; }
.sidebar__toggle { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; background: none; border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text-muted); cursor: pointer; transition: color var(--transition), background var(--transition), border-color var(--transition); }
.sidebar__toggle:hover { color: var(--color-text); background: var(--color-hover); border-color: transparent; }
.sidebar__toggle svg { width: 18px; height: 18px; }
.sidebar__nav { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; min-height: 0; padding-right: 4px; }
.sidebar__nav .nav-item:first-child { margin-bottom: 6px; }
.sidebar__nav::-webkit-scrollbar { width: 4px; }
.sidebar__nav::-webkit-scrollbar-track { background: transparent; }
.sidebar__nav::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
.sidebar__label { padding: 0 10px 8px; margin-top: 8px; color: #9ca3af; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 10px; color: var(--color-text-muted); border-radius: var(--radius-sm); font-weight: 600; transition: color var(--transition), background var(--transition); }
.nav-item:hover { color: var(--color-text); background: var(--color-hover); }
.nav-item--active { color: var(--color-primary); background: var(--color-primary-soft); }
.nav-item svg { flex: 0 0 20px; width: 20px; height: 20px; }
.nav-item__text { overflow: hidden; white-space: nowrap; }
.sidebar__foot { display: grid; gap: 8px; margin-top: auto; }
.sidebar__foot .nav-item { color: var(--color-text-muted); }
.workspace-user { display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--color-border); min-width: 0; }
.workspace-user__avatar { display: grid; flex: 0 0 29px; width: 29px; height: 29px; color: #086483; background: #d4f5fc; border-radius: 50%; font-size: 11px; font-weight: 700; place-items: center; }
.workspace-user__copy { display: flex; flex-direction: column; min-width: 0; }
.workspace-user__name { overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.workspace-user__role { color: var(--color-text-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.app-main { min-height: 100vh; margin-left: 240px; transition: margin var(--transition); }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; height: 72px; padding: 0 40px; background: rgb(251 248 243 / 90%); border-bottom: 1px solid rgb(229 231 235 / 75%); backdrop-filter: blur(10px); }
.topbar__crumbs { min-width: 180px; color: var(--color-text-muted); font-size: 13px; }
.topbar__crumbs b { color: var(--color-text); font-weight: 700; }
.topbar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-search { position: relative; width: min(360px, 31vw); margin-left: auto; }
.topbar-search svg { position: absolute; top: 11px; left: 12px; width: 17px; color: var(--color-text-muted); }
.topbar-search input { width: 100%; height: 40px; padding: 0 70px 0 38px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; color: var(--color-text); outline: 0; transition: border var(--transition), box-shadow var(--transition); }
.topbar-search input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgb(11 120 160 / 10%); }
.topbar-search kbd { position: absolute; top: 9px; right: 10px; padding: 2px 5px; color: var(--color-text-muted); background: var(--color-hover); border: 1px solid var(--color-border); border-radius: 4px; font-size: 10px; }
.topbar-profile { position: relative; }
.topbar-profile__trigger { display: flex; align-items: center; gap: 8px; padding: 4px; color: var(--color-text); background: none; border: 0; border-radius: 8px; }
.avatar { display: grid; width: 32px; height: 32px; color: #086483; background: #d4f5fc; border-radius: 50%; font-size: 11px; font-weight: 700; place-items: center; }
.content { width: min(100%, 1480px); margin: 0 auto; padding: 40px; }
.page-heading { display: flex; align-items: flex-start; gap: 24px; justify-content: space-between; margin-bottom: 32px; }
.page-heading__copy { max-width: 630px; }
.page-heading__copy p { margin-top: 6px; color: var(--color-text-muted); }
.page-heading__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sidebar-collapsed .sidebar { width: 72px; }
.sidebar-collapsed .app-main { margin-left: 72px; }
.sidebar-collapsed .brand-name, .sidebar-collapsed .nav-item__text, .sidebar-collapsed .sidebar__label, .sidebar-collapsed .workspace-user__copy { display: none; }
.sidebar-collapsed .sidebar__header { justify-content: center; }
.sidebar-collapsed .sidebar__brand { display: none; }
.sidebar-collapsed .sidebar__toggle { display: grid; }
.sidebar-collapsed .nav-item, .sidebar-collapsed .workspace-user { justify-content: center; padding-right: 0; padding-left: 0; }
.sidebar-collapsed .workspace-user { border-top: 0; }
.mobile-backdrop { display: none; }

/* ═══ UI primitives (components.css) ═══ */
/* Reusable UI primitives */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-xs); font-size: 14px; font-weight: 700; white-space: nowrap; transition: transform var(--transition), background var(--transition), border var(--transition), box-shadow var(--transition); }
.button svg { flex: 0 0 16px; width: 16px; height: 16px; }
.button:hover { background: var(--color-hover); border-color: #d1d5db; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.button:active { transform: translateY(0); box-shadow: var(--shadow-xs); }
.button--primary { color: #fff; background: linear-gradient(180deg, #1596bf 0%, var(--color-primary) 100%); border-color: var(--color-primary-strong); box-shadow: 0 1px 2px rgb(11 120 160 / 30%), 0 6px 16px -4px rgb(11 120 160 / 45%), inset 0 1px 0 rgb(255 255 255 / 18%); }
.button--primary:hover { color: #fff; background: linear-gradient(180deg, #0a6d91 0%, var(--color-primary-strong) 100%); border-color: var(--color-primary-strong); box-shadow: 0 2px 4px rgb(11 120 160 / 30%), 0 10px 22px -6px rgb(11 120 160 / 55%), inset 0 1px 0 rgb(255 255 255 / 18%); }
.button--soft { color: var(--color-primary-strong); background: var(--color-primary-soft); border-color: #cff3fc; box-shadow: none; }
.button--soft:hover { color: var(--color-primary-strong); background: #dcf7fd; border-color: #bff0fb; box-shadow: none; }
.button--lg { min-height: 48px; padding: 0 22px; border-radius: var(--radius-md); font-size: 15px; }
.button--lg svg { flex-basis: 18px; width: 18px; height: 18px; }
.button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.button--danger { color: #fff; background: var(--color-danger); border-color: var(--color-danger); }
.button--danger:hover { background: #b83e12; border-color: #b83e12; }
.button--ghost { background: transparent; border-color: transparent; box-shadow: none; }
.button--ghost:hover { background: var(--color-hover); box-shadow: none; }
.button--icon { width: 40px; padding: 0; }
.button--sm { min-height: 34px; padding: 0 10px; font-size: 12px; }
.icon-button { display: inline-grid; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; color: var(--color-text-muted); background: transparent; border: 0; border-radius: 8px; place-items: center; transition: color var(--transition), background var(--transition); }
.icon-button:hover { color: var(--color-text); background: var(--color-hover); }
.icon-button svg { width: 20px; height: 20px; }
.icon-button--small { width: 32px; height: 32px; }
.icon-button--small svg { width: 18px; height: 18px; }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card--interactive { transition: box-shadow var(--transition), transform var(--transition), border var(--transition); }
.card--interactive:hover { border-color: #d1d5db; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.card__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--color-border); }
.card__title { font-size: 16px; font-weight: 700; letter-spacing: -.15px; }
.card__caption { margin-top: 3px; color: var(--color-text-muted); font-size: 12px; }
.card__body { padding: 24px; }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1; white-space: nowrap; }
.badge--success { color: #047857; background: var(--color-success-soft); }
.badge--warning { color: #b45309; background: var(--color-warning-soft); }
.badge--danger { color: #b83e12; background: var(--color-danger-soft); }
.badge--blue { color: #086483; background: var(--color-primary-soft); }
.badge--neutral { color: #4b5563; background: var(--color-hover); }
.badge__dot { width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.field { display: grid; align-content: start; gap: 7px; }
.field__label { color: #374151; font-size: 12px; font-weight: 700; }
.field__hint { color: var(--color-text-muted); font-size: 11px; }
.input, select.input, .select, .textarea {
  width: 100%;
  color: var(--color-text);
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: 0;
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select.input, .select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: 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='%230b78a0' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.input, select.input, .select { height: 44px; padding-left: 14px; }
.textarea { min-height: 104px; padding: 12px 14px; resize: vertical; }
.input:hover, select.input:hover, .select:hover, .textarea:hover { border-color: #9ca3af; }
.input:focus, select.input:focus, .select:focus, .textarea:focus { border-color: #0b78a0; box-shadow: 0 0 0 3.5px rgba(11, 120, 160, 0.12); }
.input::placeholder, .textarea::placeholder { color: #9ca3af; }
.input-group { position: relative; }
.input-group svg { position: absolute; top: 11px; left: 12px; width: 18px; color: var(--color-text-muted); }
.input-group .input { padding-left: 39px; }
.checkbox, .radio { display: inline-flex; align-items: center; gap: 8px; color: #374151; font-size: 13px; font-weight: 600; cursor: pointer; }
.checkbox input, .radio input { width: 16px; height: 16px; margin: 0; accent-color: var(--color-primary); }
.switch { display: inline-flex; align-items: center; gap: 10px; color: #374151; font-size: 13px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch__track { position: relative; width: 36px; height: 20px; background: #d1d5db; border-radius: 999px; transition: background var(--transition); }
.switch__track::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgb(0 0 0 / 18%); content: ""; transition: transform var(--transition); }
.switch input:checked + .switch__track { background: var(--color-primary); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.data-table-wrap { overflow: auto; max-width: 100%; }
.data-table { width: 100%; min-width: 710px; border-collapse: separate; border-spacing: 0; text-align: left; }
.data-table th { position: sticky; z-index: 1; top: 0; height: 48px; padding: 0 16px; color: var(--color-text-muted); background: #fcfcfc; border-bottom: 1px solid var(--color-border); font-size: 11px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.data-table th[data-resizable] { position: sticky; }
.column-resizer { position: absolute; top: 10px; right: -2px; bottom: 10px; z-index: 3; width: 5px; padding: 0; cursor: col-resize; background: transparent; border: 0; border-radius: 3px; }
.column-resizer:hover, .column-resizer:focus { background: var(--color-primary); }
.data-table td { height: 66px; padding: 10px 16px; border-bottom: 1px solid #f1f2f4; font-size: 13px; vertical-align: middle; }
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: #fafafa; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table th:first-child, .data-table td:first-child { padding-left: 24px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 24px; }
.sort-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; color: inherit; background: none; border: 0; font: inherit; text-transform: inherit; }
.sort-button svg { width: 14px; height: 14px; }
.table-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; color: #086483; background: #d4f5fc; border-radius: 50%; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.table-person__info { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.table-person__name { display: block; font-size: 13px; font-weight: 600; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-person__id { display: block; margin-top: 2px; color: var(--color-text-muted); font-size: 11px; }
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--color-border); }
.table-toolbar__search { flex: 1 1 220px; max-width: 320px; }
.table-toolbar__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.table-toolbar__actions .select { max-width: 100%; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 12px; }
.pagination__buttons { display: flex; gap: 5px; }
.progress { height: 7px; overflow: hidden; background: var(--color-hover); border-radius: 999px; }
.progress__bar { height: 100%; background: var(--color-primary); border-radius: inherit; }
.empty-state { display: grid; justify-items: center; padding: 60px 24px; text-align: center; }
.empty-state__icon { display: grid; width: 42px; height: 42px; margin-bottom: 14px; color: var(--color-text-muted); background: var(--color-hover); border-radius: 50%; place-items: center; }
.empty-state p { max-width: 300px; margin: 5px 0 16px; color: var(--color-text-muted); font-size: 13px; }
.dropdown { position: absolute; z-index: 50; top: calc(100% + 8px); right: 0; min-width: 192px; padding: 6px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); animation: pop 160ms ease both; }
.dropdown[hidden] { display: none; }
.dropdown__item { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 0 9px; color: #374151; background: none; border: 0; border-radius: 6px; font-size: 12px; font-weight: 600; text-align: left; }
.dropdown__item:hover { background: var(--color-hover); }
.dropdown__item svg { flex: 0 0 16px; width: 16px; height: 16px; }
.dropdown__item--danger { color: var(--color-danger); }
.divider { height: 1px; margin: 6px 0; background: var(--color-border); }
.badge--info { color: #086483; background: var(--color-primary-soft); }

/* Notification bell dropdown */
.topbar-notif { position: relative; }
.topbar-notif .icon-button { position: relative; }
.notif-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; background: var(--color-danger); border: 1.5px solid var(--color-surface); border-radius: 50%; }
.dropdown--notif { width: 320px; max-width: calc(100vw - 32px); padding: 0; }
.dropdown__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--color-border); }
.dropdown__head b { font-size: 13px; }
.notif-list { max-height: 360px; overflow-y: auto; padding: 6px; }
.notif-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 10px 8px; border-radius: var(--radius-sm); }
.notif-item:hover { background: var(--color-hover); }
.notif-item__icon { display: grid; width: 30px; height: 30px; color: var(--color-primary); background: var(--color-primary-soft); border-radius: 50%; place-items: center; }
.notif-item__icon svg { width: 15px; height: 15px; }
.notif-item__copy { font-size: 12px; line-height: 1.4; }
.notif-item__copy b { font-weight: 700; }
.notif-item__copy time { display: block; margin-top: 2px; color: var(--color-text-muted); font-size: 11px; }
.notif-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; color: var(--color-text-muted); font-size: 12px; text-align: center; }
.notif-empty svg { width: 22px; height: 22px; color: var(--color-success); }
.tooltip { position: relative; }
.tooltip::after { position: absolute; z-index: 60; bottom: calc(100% + 7px); left: 50%; padding: 5px 7px; color: #fff; background: #111827; border-radius: 4px; content: attr(data-tooltip); font-size: 10px; opacity: 0; pointer-events: none; transform: translate(-50%, 3px); transition: opacity var(--transition), transform var(--transition); white-space: nowrap; }
.tooltip:hover::after { opacity: 1; transform: translate(-50%, 0); }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; padding: 20px; background: rgb(17 24 39 / 38%); place-items: center; }
.modal { width: min(100%, 510px); background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: 0 22px 60px rgb(17 24 39 / 24%); }
.modal__header { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 24px 16px; }
.modal__title { font-size: 20px; }
.modal__body { padding: 0 24px 24px; color: var(--color-text-muted); }
.modal__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--color-border); }
.toast-stack { position: fixed; z-index: 120; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 14px; color: #374151; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); animation: enter 200ms ease; }
.toast__icon { display: grid; flex: 0 0 22px; width: 22px; height: 22px; color: var(--color-success); background: var(--color-success-soft); border-radius: 50%; place-items: center; }
.toast__icon svg { width: 14px; }
.toast__title { font-size: 12px; font-weight: 700; }
.toast__message { margin-top: 1px; color: var(--color-text-muted); font-size: 11px; }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--color-border); }
.tab { position: relative; padding: 0 0 12px; color: var(--color-text-muted); background: none; border: 0; font-size: 13px; font-weight: 700; white-space: nowrap; }
.tab--active { color: var(--color-primary); }
.tab--active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--color-primary); border-radius: 2px 2px 0 0; content: ""; }
.accordion__item { border-bottom: 1px solid var(--color-border); }
.accordion__trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 17px 0; color: var(--color-text); background: none; border: 0; font-weight: 700; text-align: left; }
.accordion__content { max-height: 0; overflow: hidden; color: var(--color-text-muted); transition: max-height 250ms ease, padding var(--transition); }
.accordion__item.is-open .accordion__content { max-height: 200px; padding: 0 0 17px; }
.global-search { width: min(100%, 620px); overflow: hidden; }
.global-search__input { position: relative; display: flex; align-items: center; border-bottom: 1px solid var(--color-border); }
.global-search__input > svg { position: absolute; left: 18px; color: var(--color-text-muted); }
.global-search__input .input { height: 58px; padding: 0 64px 0 50px; border: 0; border-radius: 0; box-shadow: none; font-size: 14px; }
.global-search__input kbd { position: absolute; right: 16px; padding: 2px 5px; color: var(--color-text-muted); background: var(--color-hover); border: 1px solid var(--color-border); border-radius: 4px; font-size: 10px; }
.global-search__results { max-height: min(410px, 60vh); overflow-y: auto; padding: 8px; }
.global-search__hint { padding: 8px 10px 6px; color: var(--color-text-muted); font-size: 11px; font-weight: 700; }
.global-search__result { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 7px; transition: background var(--transition); }
.global-search__result:hover { background: var(--color-hover); }
.global-search__result b, .global-search__result small { display: block; }
.global-search__result b { font-size: 12px; }.global-search__result small { margin-top: 2px; color: var(--color-text-muted); font-size: 10px; }
.global-search__go { margin-left: auto; color: var(--color-text-muted); }.global-search__go svg { width: 16px; }

/* Status dots */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.status-dot--good { background: var(--color-success); box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15); }
.status-dot--warning { background: var(--color-warning); box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.15); }
.status-dot--critical { background: var(--color-danger); box-shadow: 0 0 0 2px rgba(247, 110, 60, 0.15); animation: pulse-dot 1.5s ease infinite; }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 2px rgba(247, 110, 60, 0.15); } 50% { box-shadow: 0 0 0 5px rgba(247, 110, 60, 0.08); } }

/* Document grid for cards */
.document-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* Stat card amber variant */
.stat-card__icon--amber { color: #d97706; background: var(--color-warning-soft); }

/* ─── Custom Combobox Dropdown ─── */
.combobox {
  position: relative;
  width: 100%;
}
.combobox__input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 42px;
  color: var(--color-text);
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  outline: 0;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: text;
}
.combobox__input:hover { border-color: #9ca3af; }
.combobox__input:focus,
.combobox--open .combobox__input {
  border-color: #0b78a0;
  box-shadow: 0 0 0 3.5px rgba(11, 120, 160, 0.12);
}
.combobox__input::placeholder { color: #9ca3af; font-weight: 400; }
.combobox__icon-left {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
  display: flex;
  transition: color 0.2s;
}
.combobox--open .combobox__icon-left,
.combobox__input:focus ~ .combobox__icon-left { color: #0b78a0; }
.combobox__chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  color: #9ca3af;
  pointer-events: none;
  display: flex;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), color 0.2s;
}
.combobox--open .combobox__chevron {
  transform: translateY(-50%) rotate(180deg);
  color: #0b78a0;
}
.combobox__panel {
  position: absolute;
  z-index: 100;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(.4,0,.2,1), transform 0.2s cubic-bezier(.4,0,.2,1);
}
.combobox--open .combobox__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.combobox__panel::-webkit-scrollbar { width: 6px; }
.combobox__panel::-webkit-scrollbar-track { background: transparent; }
.combobox__panel::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.combobox__panel::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
.combobox__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}
.combobox__option:hover,
.combobox__option--focused {
  background: #effbfe;
  color: #086483;
}
.combobox__option--selected {
  background: #dcf7fd;
  color: #086483;
  font-weight: 600;
}
.combobox__option-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  background: #f4fcfe;
}
.combobox__option--selected .combobox__option-icon { background: #bff0fb; }
.combobox__option-check {
  margin-left: auto;
  color: #0b78a0;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.15s, transform 0.15s;
}
.combobox__option--selected .combobox__option-check {
  opacity: 1;
  transform: scale(1);
}
.combobox__empty {
  padding: 20px 12px;
  text-align: center;
  color: #9ca3af;
  font-size: 12.5px;
}
.combobox__empty b { display: block; color: #6b7280; font-size: 13px; margin-bottom: 2px; }
.combobox__divider {
  height: 1px;
  background: #f3f4f6;
  margin: 4px 8px;
}
.combobox__hint {
  padding: 8px 12px 6px;
  color: #9ca3af;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ═══ Page compositions (pages.css) ═══ */
/* Page compositions built solely from design-system primitives */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { padding: 14px 16px; }
.stat-card__top { display: flex; align-items: center; justify-content: space-between; }
.stat-card__label { color: var(--color-text-muted); font-size: 12px; font-weight: 700; }
.stat-card__icon { display: grid; width: 30px; height: 30px; border-radius: 9px; place-items: center; }
.stat-card__icon--blue { color: #0b78a0; background: #effbfe; }
.stat-card__icon--green { color: #059669; background: #ecfdf5; }
.stat-card__icon--amber { color: #d97706; background: #fffbeb; }
.stat-card__icon--violet { color: #7c3aed; background: #f5f3ff; }
.stat-card__number { margin-top: 10px; font-size: 25px; font-weight: 700; letter-spacing: 0; line-height: 1; }
.stat-card__footer { display: flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--color-text-muted); font-size: 11px; }
.trend--up { display: inline-flex; align-items: center; gap: 4px; color: var(--color-success); font-weight: 700; }
.trend--up svg { display: inline-block; width: 14px; height: 14px; margin: 0; }
.trend--down { display: inline-flex; align-items: center; gap: 4px; color: var(--color-danger); font-weight: 700; }
.trend--down svg { display: inline-block; width: 14px; height: 14px; margin: 0; }
.dashboard-grid { display: grid; gap: 20px; margin-top: 20px; }
.dashboard-grid--primary { grid-template-columns: minmax(0, 1.75fr) minmax(280px, .9fr); }
.dashboard-grid--lower { grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); }
.chart-card__body { padding: 16px 24px 22px; }
.chart-summary { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.chart-summary b { font-size: 22px; letter-spacing: -.4px; }
.chart-summary span { color: var(--color-success); font-size: 11px; font-weight: 700; }
.chart-interactive { position: relative; width: 100%; margin-top: 10px; }
.chart-canvas { width: 100%; height: 180px; overflow: visible; display: block; }
/* Override aggressive global svg settings specifically for chart components */
.chart-canvas * { stroke: none; fill: none; width: auto; height: auto; }
.chart-grid-line { stroke: #f1f5f9; stroke-width: 1.5; }
.chart-line-path { stroke: #1596bf; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart-area-path { fill: url(#chartAreaGradient); stroke: none; }
.chart-hover-line { stroke: #cbd5e1; stroke-width: 1.5; stroke-dasharray: 4 4; display: none; }
.chart-hover-circle { fill: #ffffff; stroke: #1596bf; stroke-width: 3; display: none; }
.chart-tooltip-html {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  transform: translate(-50%, -100%);
  margin-top: -12px;
  white-space: nowrap;
  z-index: 10;
  transition: opacity 0.15s ease, left 0.1s ease, top 0.1s ease;
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.chart-tooltip-month {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.chart-tooltip-value {
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
}
.chart-labels { display: flex; justify-content: space-between; margin-top: 10px; padding: 0 30px; color: var(--color-text-muted); font-size: 11px; font-weight: 600; }
.chart-labels span { transition: color 0.15s ease; cursor: default; }
.chart-labels span.is-active { color: #1596bf; }
.activity-list { display: grid; gap: 0; }
.activity-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid #f1f2f4; }
.activity-item:last-child { padding-bottom: 0; border-bottom: 0; }
.activity-icon { display: grid; width: 28px; height: 28px; color: var(--color-primary); background: var(--color-primary-soft); border-radius: 50%; place-items: center; }
.activity-icon svg { width: 14px; }
.activity-copy { color: var(--color-text-muted); font-size: 12px; }
.activity-copy b { color: var(--color-text); font-weight: 700; }
.activity-copy time { display: block; margin-top: 2px; color: #9ca3af; font-size: 10px; }
.quick-actions { display: flex; flex-direction: column; gap: 6px; }
.quick-action { display: flex; align-items: center; gap: 12px; padding: 11px 12px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); font-size: 13px; font-weight: 700; text-align: left; transition: background var(--transition), border var(--transition); }
.quick-action:hover { background: #fafafa; border-color: #d1d5db; }
.quick-action__icon { display: grid; flex: 0 0 29px; width: 29px; height: 29px; color: var(--color-primary); background: var(--color-primary-soft); border-radius: 7px; place-items: center; }
.quick-action__icon svg { width: 15px; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f1f2f4; }
.list-row:last-child { border: 0; padding-bottom: 0; }
.list-row__avatar { display: grid; width: 30px; height: 30px; color: #6d28d9; background: #f5f3ff; border-radius: 50%; font-size: 10px; font-weight: 700; place-items: center; }
.list-row__copy { min-width: 0; }
.list-row__copy b { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.list-row__copy span { display: block; color: var(--color-text-muted); font-size: 10px; }
.list-row__meta { margin-left: auto; color: var(--color-text-muted); font-size: 10px; text-align: right; }
.filter-row { display: flex; align-items: flex-end; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--color-border); background: #fcfcfc; }
.filter-row[hidden] { display: none !important; }
.filter-row .field { width: 170px; }
.table-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.nowrap { white-space: nowrap; }
@media (max-width: 1280px) { .hide-laptop { display: none !important; } }
@media (max-width: 1180px) { .hide-small-laptop { display: none !important; } }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.form-section { padding: 24px; }
.form-section + .form-section { border-top: 1px solid var(--color-border); }
.form-section__heading { margin-bottom: 20px; }
.form-section__heading p { margin-top: 4px; color: var(--color-text-muted); font-size: 12px; }
.form-grid--two { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 16px; }
.form-grid--three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 16px; }
.form-span-all { grid-column: 1 / -1; }
.form-aside { position: sticky; top: 94px; }
.stepper { display: grid; gap: 0; padding: 16px; }
.stepper__item { display: flex; align-items: center; gap: 10px; min-height: 42px; color: var(--color-text-muted); font-size: 12px; font-weight: 700; }
.stepper__dot { display: grid; flex: 0 0 22px; width: 22px; height: 22px; color: var(--color-text-muted); background: var(--color-hover); border-radius: 50%; font-size: 10px; place-items: center; }
.stepper__item--active { color: var(--color-primary); }
.stepper__item--active .stepper__dot { color: #fff; background: var(--color-primary); }
.stepper__item--complete { color: var(--color-success); }
.stepper__item--complete .stepper__dot { color: #fff; background: var(--color-success); }
.upload-zone { display: grid; min-height: 240px; padding: 32px; border: 1.5px dashed #bff0fb; border-radius: var(--radius-lg); background: #fbfdff; justify-items: center; place-content: center; text-align: center; transition: border var(--transition), background var(--transition); }
.upload-zone:hover, .upload-zone.is-dragging { background: var(--color-primary-soft); border-color: var(--color-primary); }
.upload-zone__icon { display: grid; width: 46px; height: 46px; margin-bottom: 12px; color: var(--color-primary); background: #dcf7fd; border-radius: 50%; place-items: center; }
.upload-zone__icon svg { width: 21px; }
.upload-zone p { margin: 5px 0 15px; color: var(--color-text-muted); font-size: 12px; }
.upload-zone__formats { color: #9ca3af; font-size: 10px; }
.method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.method-card { display: grid; gap: 12px; padding: 24px; text-align: left; }
.method-card__icon { display: grid; width: 38px; height: 38px; color: var(--color-primary); background: var(--color-primary-soft); border-radius: 10px; place-items: center; }
.method-card p { color: var(--color-text-muted); font-size: 12px; }
.method-card .button { width: max-content; margin-top: 3px; }
.document-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.document-card { overflow: hidden; }
.document-card__preview { display: grid; height: 132px; color: #6b7280; background: #f8fafc; border-bottom: 1px solid var(--color-border); place-items: center; }
.document-card__preview svg { width: 32px; height: 32px; color: #94a3b8; }
.document-card__body { padding: 14px; }.document-card__title { overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.document-card__meta { display: flex; justify-content: space-between; margin-top: 4px; color: var(--color-text-muted); font-size: 10px; }
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }.report-card { padding: 20px; }.report-card__value { margin-top: 15px; font-size: 24px; font-weight: 700; letter-spacing: -.6px; }.report-card__caption { margin-top: 5px; color: var(--color-text-muted); font-size: 11px; }
.section-gap { margin-top: 20px; }
.form-gap { margin-top: 24px; }
.detail-list--single { grid-template-columns: 1fr; }
.document-card__title-line { display: flex; justify-content: space-between; gap: 8px; }
.switch + .switch { margin-top: 14px; }
.card__caption--spaced { margin-top: 18px; }
.distribution { display: grid; gap: 14px; }.distribution__row { display: grid; grid-template-columns: 78px 1fr 30px; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; }.distribution__label { color: #374151; }.distribution__value { color: var(--color-text-muted); font-size: 11px; text-align: right; }
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; }.settings-nav { padding: 10px; }.settings-nav button { display: flex; align-items: center; width: 100%; min-height: 38px; padding: 0 10px; color: var(--color-text-muted); background: none; border: 0; border-radius: 6px; font-size: 12px; font-weight: 700; text-align: left; }.settings-nav button:hover { background: var(--color-hover); }.settings-nav button.active { color: var(--color-primary); background: var(--color-primary-soft); }.settings-panel { padding: 28px; }.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid #f1f2f4; }.settings-row:first-of-type { margin-top: 16px; }.settings-row b { display: block; font-size: 13px; }.settings-row p { margin-top: 2px; color: var(--color-text-muted); font-size: 11px; }

/* Upload zone — native file input overlay (click or drop, no JavaScript) */
.upload-zone { position: relative; }
.upload-zone__input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-zone:focus-within { background: var(--color-primary-soft); border-color: var(--color-primary); outline: 3px solid rgb(11 120 160 / 28%); outline-offset: 2px; }
.upload-zone:hover .button--primary { background: var(--color-primary-strong); border-color: var(--color-primary-strong); }

/* ═══ Animations (animations.css) ═══ */
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .45; } }
.page-enter { animation: enter 280ms ease both; }
.modal { animation: pop 180ms ease both; }
.spinner { width: 18px; height: 18px; border: 2px solid #dcf7fd; border-top-color: var(--color-primary); border-radius: 50%; animation: spin 650ms linear infinite; }
.skeleton { background: linear-gradient(90deg, #f3f4f6 25%, #f9fafb 38%, #f3f4f6 63%); background-size: 400% 100%; border-radius: 5px; animation: pulse 1.3s ease infinite; }

/* ═══ Responsive breakpoints (responsive.css) ═══ */
@media (max-width: 1100px) { .content { padding: 32px 28px; } .topbar { padding: 0 28px; } .dashboard-grid--lower { grid-template-columns: 1fr !important; } }
@media (max-width: 820px) { .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-md); } .sidebar-open .sidebar { transform: translateX(0); } .mobile-backdrop { position: fixed; z-index: 25; inset: 0; display: block; background: rgb(17 24 39 / 22%); } .app-main, .sidebar-collapsed .app-main { margin-left: 0; } .topbar { padding: 0 20px; } .topbar__crumbs { display: none; } .topbar-search { width: min(380px, 55vw); margin-left: 8px; } .u-mobile-only { display: inline-flex; } .content { padding: 28px 20px; } .stat-grid { grid-template-columns: repeat(2, 1fr) !important; } .form-grid--three, .form-grid--two { grid-template-columns: 1fr !important; } .document-grid { grid-template-columns: repeat(2, 1fr) !important; } .hide-tablet { display: none !important; } }
@media (max-width: 560px) { h1 { font-size: 27px; } h2 { font-size: 21px; } .topbar { height: 64px; padding: 0 14px; } .topbar-search { width: auto; flex: 1; } .topbar-search kbd, .topbar-profile__name { display: none; } .topbar__actions .icon-button:nth-child(2) { display: none; } .content { padding: 24px 16px; } .page-heading { flex-direction: column; gap: 18px; margin-bottom: 24px; } .page-heading__actions { width: 100%; } .page-heading__actions .button { flex: 1; } .stat-grid { grid-template-columns: 1fr !important; } .card { border-radius: 12px; } .table-toolbar { align-items: stretch !important; flex-direction: column; } .table-toolbar__actions { margin-left: 0 !important; } .filter-row { align-items: stretch; flex-direction: column; } .filter-row .field { width: 100%; } .document-grid { grid-template-columns: 1fr !important; } .stepper__label { display: none; } }

/* Mobile navigation (CSS-only replacement for the original JavaScript toggle) */
.nav-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mobile-backdrop { display: none; }
label.icon-button { cursor: pointer; }
.topbar .nav-open-button { display: none; }
@media (max-width: 820px) {
  .topbar .nav-open-button { display: inline-grid; margin-right: 4px; }
  .mobile-backdrop { display: none; }
  .nav-toggle:checked ~ .sidebar { transform: translateX(0); }
  .nav-toggle:checked ~ .mobile-backdrop { display: block; }
}

/* ═══ Excel import preview (built from existing tokens) ═══ */
.import-preview { display: grid; gap: 20px; margin-top: 24px; }
.import-preview[hidden] { display: none; }
.import-preview__head .card__caption { margin-top: 4px; }
.import-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.import-summary__item { padding: 14px 16px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.import-summary__item b { display: block; margin-top: 6px; font-size: 22px; font-weight: 700; letter-spacing: -.4px; line-height: 1; }
.import-summary__item--error b { color: var(--color-danger); }
.import-preview__table { max-height: 440px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.import-preview__table td { white-space: nowrap; }
.import-preview__table td.import-notes { min-width: 260px; white-space: normal; }
.import-notes span { display: block; color: var(--color-text-muted); font-size: 12px; line-height: 1.45; }
.import-notes .import-issue--error { color: #b83e12; font-weight: 600; }
.import-notes .import-issue--warning { color: #b45309; }
.import-note { margin-top: 4px; color: var(--color-text-muted); font-size: 11px; }
.import-footnote { color: var(--color-text-muted); font-size: 12px; }
.import-footnote b { color: var(--color-text); }
.import-preview__actions { display: flex; justify-content: flex-end; gap: 8px; }
.import-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 14px 16px; border-radius: var(--radius-md); font-size: 13px; }
.import-alert b { font-weight: 700; }
.import-alert .button { margin-left: auto; }
.import-alert--danger { color: #b83e12; background: var(--color-danger-soft); }
.import-alert--success { color: #047857; background: var(--color-success-soft); }
.button:disabled, .button:disabled:hover { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
@media (max-width: 820px) { .import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Pages stay hidden until sign-in is confirmed and data is loaded (see js/auth.js → showPage) */
html.auth-pending .app-shell { visibility: hidden; }
.import-notes .import-issue--info { color: #086483; }

/* ═══ Fee ledger dialogs (built from existing tokens) ═══ */
.modal--wide { width: min(100%, 820px); }
.modal__body { max-height: min(70vh, 640px); overflow-y: auto; }
.pay-dialog { display: grid; gap: 14px; }
.pay-dialog__summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 14px 16px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.pay-dialog__summary span { display: block; color: var(--color-text-muted); font-size: 11px; }
.pay-dialog__summary b { display: block; margin-top: 2px; color: var(--color-text); font-size: 13px; }
.pay-dialog__after { display: flex; align-items: center; gap: 8px; min-height: 23px; margin: 0; color: var(--color-text); font-size: 12px; }
.pay-dialog__error { margin: 0; color: var(--color-danger); font-size: 12px; font-weight: 600; }
.pay-dialog__error[hidden] { display: none; }
.pay-dialog__lead { margin-bottom: 14px; color: var(--color-text); font-size: 13px; }
.pay-history { border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.pay-history .data-table { min-width: 640px; }
.pay-correction { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.pay-correction summary { color: var(--color-text); font-size: 13px; font-weight: 700; cursor: pointer; }
.pay-correction[open] { display: grid; gap: 12px; }
.pay-correction .button { justify-self: start; }
[data-tab-panel][hidden] { display: none; }
.month-banner { margin: 0; border-radius: 0; color: #b45309; background: var(--color-warning-soft); border-bottom: 1px solid var(--color-border); }
.month-banner[hidden] { display: none; }

/* ═══ Dashboard: fee collection panel (the page's main action) ═══ */
.collect-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); align-items: center; gap: 32px; margin-bottom: 24px; padding: 28px 28px 26px 32px; overflow: hidden; background: radial-gradient(120% 140% at 100% 0%, #e9f9fd 0%, #f4fcfe 38%, #ffffff 70%); border: 1px solid #d6f2f9; border-radius: var(--radius-xl); box-shadow: 0 1px 2px rgb(17 24 39 / 4%), 0 12px 32px -18px rgb(11 120 160 / 35%); }
.collect-panel::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, #47d6f4, var(--color-primary)); content: ""; }
.collect-panel__main { min-width: 0; }
.collect-panel__eyebrow { display: block; color: var(--color-text-muted); font-size: 13px; font-weight: 600; }
.collect-panel__eyebrow i { display: none; }
.collect-panel__title { margin-top: 6px; font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.collect-panel__title { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
.collect-panel__title b { color: #b45309; font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: 0; }
.collect-panel--done .collect-panel__title b { color: var(--color-success); }
.collect-panel__sub { margin-top: 8px; color: var(--color-text-muted); font-size: 14px; }
.collect-panel__sub b { color: var(--color-text); font-weight: 700; }
.collect-panel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.collect-panel__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed #d6f2f9; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 11px; color: #374151; background: rgb(255 255 255 / 85%); border: 1px solid var(--color-border); border-radius: 999px; font-size: 12px; font-weight: 600; }
.status-pill i { width: 7px; height: 7px; background: #9ca3af; border-radius: 50%; }
.status-pill--on i { background: var(--color-success); }
.status-pill--warn i { background: var(--color-warning); }
a.status-pill:hover { background: #fff; border-color: #cbd5e1; }

/* Collection progress meter — collected (green) vs pending (amber track); always labelled */
.collect-meter { display: grid; gap: 10px; padding: 20px 22px; background: rgb(255 255 255 / 90%); border: 1px solid #e2f1f5; border-radius: var(--radius-lg); box-shadow: 0 8px 24px -16px rgb(17 24 39 / 25%); }
.collect-meter__head { display: flex; align-items: baseline; justify-content: space-between; color: var(--color-text-muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.collect-meter__head b { color: var(--color-text); font-size: 13px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.collect-meter__amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.collect-meter__amount b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.collect-meter__amount span { color: var(--color-text-muted); font-size: 13px; font-weight: 600; }
.collect-meter__bar { height: 10px; overflow: hidden; background: var(--color-warning); border-radius: 999px; }
.collect-meter__bar i { display: block; width: 0; height: 100%; background: var(--color-success); border-radius: 999px; box-shadow: 2px 0 0 #fff; transition: width 600ms ease; }
.collect-meter__legend { display: grid; gap: 6px; margin: 4px 0 0; }
.collect-meter__legend div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.collect-meter__legend dt { display: inline-flex; align-items: center; gap: 8px; color: var(--color-text-muted); font-weight: 600; }
.collect-meter__legend dd { margin: 0; color: var(--color-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot--paid { background: var(--color-success); }
.dot--pending { background: var(--color-warning); }
.dot--none { background: #d1d5db; }
@media (max-width: 1100px) { .collect-panel { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .collect-panel { padding: 22px 20px 22px 24px; } .collect-panel__title b { font-size: 36px; } }
@media (max-width: 560px) { .collect-panel__actions, .collect-panel__actions .button { width: 100%; } }

/* ═══ Settings page ═══ */
.settings-tabs { margin-bottom: 24px; }
.settings-tabs .tab { display: inline-flex; align-items: center; gap: 8px; }
.settings-tabs .tab svg { width: 16px; height: 16px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--color-border); }
.settings-row__copy h3 { font-size: 15px; font-weight: 700; }
.settings-row__copy p { margin-top: 3px; color: var(--color-text-muted); font-size: 13px; }
.switch--lg .switch__track { width: 46px; height: 26px; }
.switch--lg .switch__track::after { width: 20px; height: 20px; }
.switch--lg input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.reminder-settings { display: grid; gap: 20px; }
.reminder-settings__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.reminder-settings__grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .reminder-settings__grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.checkbox { display: inline-flex; align-items: center; gap: 10px; color: #374151; font-size: 13px; font-weight: 600; cursor: pointer; }
.schedule-day--overdue { color: #b45309; background: var(--color-warning-soft); border-color: #fde68a; }
.schedule-day--overdue span { color: #b45309; }
.reminder-settings.is-off .reminder-settings__grid, .reminder-settings.is-off .schedule-preview, .reminder-settings.is-off .checkbox { opacity: .55; }
.schedule-preview { padding: 16px 18px; background: var(--color-bg); border: 1px dashed #d1d5db; border-radius: var(--radius-md); }
.schedule-preview__title { color: #374151; font-size: 12px; font-weight: 700; }
.schedule-preview__days { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.schedule-day { display: grid; min-width: 64px; padding: 8px 10px; text-align: center; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.schedule-day b { font-size: 16px; line-height: 1.1; }
.schedule-day span { color: var(--color-text-muted); font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.schedule-day--due { color: var(--color-danger); background: var(--color-danger-soft); border-color: #fdd3c1; }
.schedule-day--due span { color: #b83e12; }
.schedule-preview p { margin-top: 10px; color: var(--color-text-muted); font-size: 12px; }
.save-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 24px; background: #fcfcfd; border-top: 1px solid var(--color-border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.save-bar__note { margin-right: auto; color: var(--color-text-muted); font-size: 12px; }
.save-bar__note--dirty { color: var(--color-warning); font-weight: 600; }
@media (max-width: 820px) { .reminder-settings__grid { grid-template-columns: 1fr; } .settings-row { align-items: flex-start; } }

/* Course fee tiles */
.fee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; padding: 24px; }
.fee-tile { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition); }
.fee-tile:hover { border-color: #cbd5e1; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.fee-tile--unset { background: linear-gradient(180deg, #fffdf6 0%, #fff 55%); border-color: #fde7b0; }
.fee-tile__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fee-tile__name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.fee-tile__meta { margin-top: 2px; color: var(--color-text-muted); font-size: 12px; }
.fee-tile__code { flex: none; padding: 3px 8px; color: #4b5563; background: var(--color-hover); border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.fee-tile__amount { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.fee-tile__amount b { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.fee-tile__amount span { color: var(--color-text-muted); font-size: 13px; font-weight: 600; }
.fee-tile--unset .fee-tile__amount b { color: #9ca3af; }
.fee-tile__overrides { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fee-tile__overrides li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px 10px; background: var(--color-bg); border-radius: var(--radius-sm); font-size: 12px; }
.fee-tile__overrides .icon-button { flex-basis: 28px; width: 28px; height: 28px; }
.fee-tile__overrides .icon-button svg { width: 14px; height: 14px; }
.fee-tile__foot { display: flex; gap: 8px; margin-top: auto; }
.fee-tile__foot .button { flex: 1; }

/* Courses page */
.batch-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.batch-chip { transition: background var(--transition), color var(--transition), box-shadow var(--transition); }
a.batch-chip:hover { color: var(--color-primary-strong); background: var(--color-primary-soft); box-shadow: inset 0 0 0 1px #bff0fb; }
.course-link { color: var(--color-text); font-weight: 700; }
.course-link:hover { color: var(--color-primary); text-decoration: underline; }
.batch-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; color: #374151; background: var(--color-hover); border-radius: 999px; font-size: 12px; font-weight: 600; }
.batch-chip b { color: var(--color-text-muted); font-weight: 600; }

/* ═══ Import dialog ═══ */
.modal--xl { width: min(100%, 1080px); }
.modal--xl .modal__body { max-height: min(78vh, 760px); }
.import-dialog__lead { margin-bottom: 16px; font-size: 13px; }
.import-preview__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal .import-preview { margin-top: 0; }

/* ═══ Dashboard: students at a glance ═══ */
.highlights { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.highlights__col { padding: 20px 24px 24px; }
.highlights__col + .highlights__col { border-left: 1px solid var(--color-border); }
.highlights__title { margin-bottom: 12px; color: var(--color-text-muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.course-bars { display: grid; gap: 4px; }
.course-bar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 44px; align-items: center; gap: 12px; padding: 6px 8px; margin: 0 -8px; border-radius: var(--radius-sm); transition: background var(--transition); }
.course-bar:hover { background: var(--color-hover); }
.course-bar__name { overflow: hidden; color: var(--color-text); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.course-bar__track { height: 8px; overflow: hidden; background: #eef2f7; border-radius: 999px; }
.course-bar__track i { display: block; height: 100%; background: linear-gradient(90deg, #47d6f4, var(--color-primary)); border-radius: 999px; }
.course-bar__count { font-size: 13px; text-align: right; }
.attention-list { display: grid; gap: 8px; }
.attention-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin: 0 -10px; border-radius: var(--radius-md); transition: background var(--transition); }
.attention-item:hover { background: var(--color-hover); }
.attention-item__copy { display: grid; min-width: 0; flex: 1; }
.attention-item__copy b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.attention-item__copy span { overflow: hidden; color: var(--color-text-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.attention-item__amount { color: #b45309; font-size: 13px; font-weight: 700; }
.attention-more { margin-top: 4px; color: var(--color-primary); font-size: 12px; font-weight: 700; }
.attention-fact { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--color-border); border-left-width: 3px; border-radius: var(--radius-md); }
.attention-fact div { display: grid; gap: 2px; }
.attention-fact b { font-size: 13px; }
.attention-fact span { color: var(--color-text-muted); font-size: 12px; }
.attention-fact--blue { border-left-color: var(--color-primary); background: #fafeff; }
.attention-fact--amber { border-left-color: var(--color-warning); background: #fffdf7; }
@media (max-width: 820px) { .highlights { grid-template-columns: 1fr; } .highlights__col + .highlights__col { border-left: 0; border-top: 1px solid var(--color-border); } }

/* Email reminder icon states (Students list) */
.icon-button--alert { color: #f76e3c; background: #fff1ea; box-shadow: inset 0 0 0 1px #fdd3c1; }
.icon-button--alert:hover { color: #fff; background: #f76e3c; box-shadow: 0 4px 10px -2px rgb(247 110 60 / 45%); }
.icon-button--alert-off { opacity: .45; }
.icon-button--muted { color: #cbd5e1; }
.icon-button:disabled { cursor: not-allowed; }
.icon-button:disabled:hover { background: transparent; }
.icon-button--alert:disabled:hover { color: #f76e3c; background: #fff1ea; box-shadow: inset 0 0 0 1px #fdd3c1; }
/* Active filter */
.select.is-active { color: var(--color-primary-strong); background-color: var(--color-primary-soft); border-color: #8de6f9; font-weight: 600; }

/* ═══ Faculty ═══ */
.table-person--button { padding: 0; background: none; border: 0; text-align: left; cursor: pointer; }
.table-person--button:hover .table-person__name { color: var(--color-primary); }
.table-avatar--faculty { color: #6d28d9; background: #f3e8ff; }
tr.is-inactive td { opacity: .55; }
.faculty-form { display: grid; gap: 22px; }
.form-section { display: grid; gap: 14px; margin: 0; padding: 0; border: 0; min-width: 0; }
.form-section legend { margin-bottom: 12px; padding: 0; color: var(--color-text); font-size: 13px; font-weight: 700; }
.form-section + .form-section { padding-top: 20px; border-top: 1px solid var(--color-border); }
.qual-list { display: grid; gap: 8px; }
.qual-row { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr 78px 32px; gap: 8px; align-items: center; }
.qual-row .input { height: 40px; }
.form-section > .button { justify-self: start; }
.batch-picker { display: grid; gap: 10px; max-height: 240px; overflow-y: auto; padding: 12px 14px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.batch-picker__group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.batch-picker__course { min-width: 140px; color: #374151; font-size: 12px; font-weight: 700; }
.batch-toggle { position: relative; cursor: pointer; }
.batch-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.batch-toggle span { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; color: #374151; background: #fff; border: 1px solid var(--color-border); border-radius: 999px; font-size: 12px; font-weight: 600; transition: all var(--transition); }
.batch-toggle:hover span { border-color: #8de6f9; }
.batch-toggle input:checked + span { color: #fff; background: var(--color-primary); border-color: var(--color-primary); }
.batch-toggle input:focus-visible + span { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.link-button { padding: 0; color: var(--color-primary); background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
@media (max-width: 820px) { .qual-row { grid-template-columns: 1fr 1fr; } .qual-row [data-q="year"] { grid-column: 1; } .batch-picker__course { min-width: 100%; } }

/* Dashboard greeting: quieter than the page's main panel */
.page-heading--compact { align-items: center; margin-bottom: 20px; }
.page-heading--compact h1 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.page-heading--compact .page-heading__copy p { margin-top: 2px; font-size: 13px; }
/* Red action button (same red as badges / alerts) and blue outline button */
.button--danger { box-shadow: 0 1px 2px rgb(247 110 60 / 25%), 0 6px 16px -6px rgb(247 110 60 / 45%); }
.button--danger:hover { color: #fff; box-shadow: 0 2px 4px rgb(247 110 60 / 30%), 0 10px 22px -8px rgb(247 110 60 / 55%); }
.button--outline { color: var(--color-primary-strong); border-color: #8de6f9; }
.button--outline:hover { color: var(--color-primary-strong); background: var(--color-primary-soft); border-color: var(--color-primary); }

/* College logo in place of the old icon */
.brand-mark { flex-basis: 36px; width: 36px; height: 36px; overflow: hidden; background: #fff; border: 1px solid var(--color-border); border-radius: 50%; box-shadow: none; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }

.notif-item__icon--alert { color: var(--color-danger); background: var(--color-danger-soft); }
a.notif-item { color: inherit; }

/* By course — ranked by fees billed */
.course-bar { grid-template-columns: minmax(120px, 34%) 1fr auto; }
.course-bar__name small { display: block; margin-top: 1px; color: var(--color-text-muted); font-size: 11px; font-weight: 500; }
.revenue-pill { min-width: 84px; padding: 4px 10px; color: #047857; background: var(--color-success-soft); border: 1px solid #a7f3d0; border-radius: 999px; font-size: 12px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Collapsed sidebar: keep the college logo, stacked above the ☰ button */
.sidebar-collapsed .sidebar__header { flex-direction: column; gap: 10px; }
.sidebar-collapsed .sidebar__brand { display: flex; justify-content: center; }

/* Students: selection, email column, bulk actions */
.col-check { width: 44px; padding-right: 0 !important; }
.row-check { width: 16px; height: 16px; margin: 0; accent-color: var(--color-primary); cursor: pointer; vertical-align: middle; }
tr.is-selected td { background: #f4fcfe; }
.email-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.email-cell a { color: var(--color-text); }
.email-cell a:hover { color: var(--color-primary); text-decoration: underline; }
.bulk-bar { display: flex; align-items: center; gap: 12px; padding: 10px 20px; color: #053f53; background: var(--color-primary-soft); border-bottom: 1px solid #bff0fb; font-size: 13px; }
.bulk-bar > span { margin-right: auto; }
.delete-list { margin: 12px 0 0; padding-left: 18px; color: var(--color-text); font-size: 13px; line-height: 1.7; }

/* ═══ Custom dropdown list (js/select-menu.js) ═══ */
.select-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden; clip: rect(0 0 0 0); border: 0 !important; opacity: 0; pointer-events: none; }
.select-button { display: inline-flex; align-items: center; min-width: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; font: inherit; font-size: 14px; }
.select-button[aria-expanded="true"] { border-color: var(--color-primary); box-shadow: 0 0 0 3.5px rgba(11, 120, 160, 0.12); }
.select-menu { position: fixed; z-index: 200; max-height: 320px; max-width: min(360px, calc(100vw - 16px)); overflow-y: auto; padding: 6px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: 0 16px 40px -12px rgb(17 24 39 / 25%), 0 2px 6px rgb(17 24 39 / 6%); animation: select-pop 120ms ease-out both; }
.select-menu--up { animation-name: select-pop-up; }
@keyframes select-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes select-pop-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.select-menu__item { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 8px; color: #374151; border-radius: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.select-menu__item svg { flex: 0 0 16px; width: 16px; height: 16px; color: var(--color-primary); stroke-width: 2.5; visibility: hidden; }
.select-menu__item.is-active { background: var(--color-hover); }
.select-menu__item.is-selected { color: var(--color-primary-strong); font-weight: 700; }
.select-menu__item.is-selected svg { visibility: visible; }
.select-menu__item.is-disabled { opacity: .45; cursor: not-allowed; }

.button--outline-danger { color: #b83e12; border-color: #fdd3c1; }
.button--outline-danger:hover { color: #fff; background: var(--color-danger); border-color: var(--color-danger); }

.button--success { color: #fff; background: var(--color-success); border-color: var(--color-success); box-shadow: 0 1px 2px rgb(5 150 105 / 25%), 0 6px 16px -6px rgb(5 150 105 / 45%); }
.button--success:hover { color: #fff; background: #047857; border-color: #047857; }

/* Add/Edit faculty: section titles sit right above their fields (not inside the fieldset border line) */
.faculty-form { gap: 18px; }
.form-section { gap: 12px; }
.form-section legend { float: left; width: 100%; margin: 0; padding: 0; color: var(--color-text); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.form-section legend + * { clear: both; }
.form-section + .form-section { padding-top: 16px; }
.form-section .field { gap: 6px; }
.form-section > .field + .field { margin-top: 2px; }
.batch-picker { margin-top: 0; }

/* Offline / sync banner (js/offline.js) */
.net-banner { position: fixed; z-index: 300; left: 50%; bottom: 18px; max-width: min(640px, calc(100vw - 32px)); padding: 10px 16px; color: #fff; background: #374151; border-radius: 999px; box-shadow: 0 10px 30px -8px rgb(17 24 39 / 45%); font-size: 13px; font-weight: 600; text-align: center; transform: translateX(-50%); }
.net-banner--offline { background: #92400e; }
.net-banner--syncing { background: var(--color-primary); }
.net-banner--synced { background: var(--color-success); }


/* ═══ College colours: yellow sidebar, sky blue, dark-orange accents ═══ */
:root { --color-brand: #47d6f4; --color-brand-ink: #053f53; --color-accent: #f76e3c; }
body::before { position: fixed; z-index: 40; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--color-brand), var(--color-accent)); content: ""; pointer-events: none; }
.topbar { top: 0; }
.sidebar { background: #f8d747; border-right-color: #e3c13a; }
.sidebar .nav-item { position: relative; color: #374151; }
.sidebar .nav-item:hover { background: rgb(0 0 0 / 5%); }
.sidebar .nav-item--active { color: var(--color-brand-ink); background: rgb(255 255 255 / 75%); font-weight: 700; }
.sidebar .nav-item--active::before { position: absolute; top: 9px; bottom: 9px; left: 0; width: 3px; background: var(--color-accent); border-radius: 0 3px 3px 0; content: ""; }
.sidebar .workspace-user__role { color: #4b5563; }
.workspace-user__avatar { color: var(--color-brand-ink); background: var(--color-brand); }
.tab--active { color: var(--color-primary-strong); }
.tab--active::after { background: var(--color-primary-strong); }   /* solid, no gradient */
/* The sky blue is too light for white text, so main buttons use dark ink on it */
.button--primary { color: var(--color-brand-ink); background: linear-gradient(180deg, #6fe0f7 0%, var(--color-brand) 100%); border-color: #2cc3e6; box-shadow: 0 1px 2px rgb(11 120 160 / 25%), 0 6px 16px -4px rgb(71 214 244 / 55%); }
.button--primary:hover { color: var(--color-brand-ink); background: linear-gradient(180deg, var(--color-brand) 0%, #2cc3e6 100%); border-color: #1fb3d6; }
.upload-zone:hover .button--primary { color: var(--color-brand-ink); background: #2cc3e6; border-color: #1fb3d6; }
/* The orange is too light for white text, so filled orange buttons use dark ink like the blue ones */
:root { --color-accent-ink: #3b1306; }
.button--danger, .button--danger:hover { color: var(--color-accent-ink); }
.button--danger:hover { background: #e85a28; border-color: #e85a28; }
.icon-button--alert:hover { color: var(--color-accent-ink); }

/* ═══ Course fee dialog & reset ═══ */
.card__header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.field__label i { color: var(--color-danger); font-style: normal; }
.plan-form { display: grid; gap: 18px; color: var(--color-text); }
.plan-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan-form__note { margin: -10px 0 0; }
.field--muted { opacity: .55; }
.money-input { position: relative; display: block; }
.money-input__sign { position: absolute; top: 50%; left: 14px; color: var(--color-text-muted); font-size: 15px; font-weight: 700; transform: translateY(-50%); pointer-events: none; }
.money-input .input { width: 100%; padding-left: 32px; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.money-input .input::-webkit-outer-spin-button, .money-input .input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.plan-summary { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--color-primary-soft); border: 1px solid #bff0fb; border-radius: var(--radius-md); }
.plan-summary__icon { display: grid; flex: none; width: 34px; height: 34px; color: var(--color-primary); background: #fff; border-radius: 9px; place-items: center; box-shadow: var(--shadow-xs); }
.plan-summary__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.plan-summary b { display: block; color: var(--color-text); font-size: 15px; }
.plan-summary span:not(.plan-summary__icon) { display: block; margin-top: 3px; color: var(--color-text-muted); font-size: 12px; line-height: 1.5; }
.reset-fees { display: grid; gap: 14px; color: var(--color-text); font-size: 13px; line-height: 1.55; }
.reset-fees p { margin: 0; }
@media (max-width: 560px) { .plan-form__row { grid-template-columns: 1fr; } .card__header { flex-wrap: wrap; } .card__header-actions { justify-content: flex-start; } }
.reset-fees__list { display: grid; gap: 6px; margin: 0; padding-left: 18px; color: var(--color-text-muted); font-size: 12px; }
.reset-fees__list b { color: var(--color-text); }

/* ═══ Unpaid from any month & reminder frequency ═══ */
.owed-note { margin-top: 3px; color: #b83e12; font-size: 11px; white-space: nowrap; }
.owed-note b { font-weight: 700; }
.reminder-tag { display: inline-block; margin-top: 4px; padding: 1px 7px; color: var(--color-primary-strong); background: var(--color-primary-soft); border-radius: 999px; font-size: 10.5px; font-weight: 700; }
.reminder-tag--off { color: #6b7280; background: var(--color-hover); }
.attention-item__amount { text-align: right; }
.attention-item__amount small { display: block; margin-top: 1px; color: var(--color-text-muted); font-size: 11px; font-weight: 600; }
.freq-dialog { display: grid; gap: 14px; color: var(--color-text); font-size: 13px; line-height: 1.5; }
.freq-dialog p { margin: 0; }
.freq-options { display: grid; gap: 8px; }
.freq-option { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; transition: border-color var(--transition), background var(--transition); }
.freq-option:hover { border-color: #8de6f9; }
.freq-option:has(input:checked) { background: var(--color-primary-soft); border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary) inset; }
.freq-option input { margin: 3px 0 0; accent-color: var(--color-primary); }
.freq-option b { display: block; font-size: 13px; }
.freq-option small { display: block; margin-top: 2px; color: var(--color-text-muted); font-size: 11px; line-height: 1.4; }
.reminder-freq { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--color-text-muted); font-size: 12px; font-weight: 600; }
.reminder-freq .select { width: auto; min-width: 170px; height: 36px; }
@media (max-width: 560px) { .freq-options { grid-template-columns: 1fr; } .reminder-freq { flex-direction: column; align-items: stretch; } }

/* Top line = page-loading bar: slides in while a page opens, then fades away; shows again while leaving */
body::before { transform-origin: left; animation: load-bar 900ms ease-out forwards; }
html.is-leaving body::before { animation: leave-bar 2.5s cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes load-bar { 0% { opacity: 1; transform: scaleX(0); } 70% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1); } }
@keyframes leave-bar { from { opacity: 1; transform: scaleX(0); } to { opacity: 1; transform: scaleX(.85); } }
@media (prefers-reduced-motion: reduce) { body::before { animation: none; opacity: 0; } }

/* ═══ Record payment & issue receipt ═══ */
.modal--receipt { width: min(100%, 1180px); }
.modal--receipt .modal__body { max-height: min(78vh, 860px); padding-bottom: 20px; }
.receipt-dialog { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; color: var(--color-text); }
.receipt-form { display: grid; gap: 16px; min-width: 0; }
.receipt-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.receipt-form__grid[hidden] { display: none; }
.receipt-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px 14px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.receipt-strip span { display: block; color: var(--color-text-muted); font-size: 11px; }
.receipt-strip b { display: block; margin-top: 2px; font-size: 13px; }

.receipt-book, .receipt-modes { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; background: var(--color-hover); border-radius: 11px; }
.receipt-book__option, .receipt-modes__option { flex: 1; cursor: pointer; }
.receipt-book__option input, .receipt-modes__option input { position: absolute; opacity: 0; pointer-events: none; }
.receipt-book__option span, .receipt-modes__option span { display: block; padding: 8px 10px; color: var(--color-text-muted); border-radius: 8px; font-size: 13px; font-weight: 700; text-align: center; white-space: nowrap; transition: background var(--transition), color var(--transition); }
.receipt-book__option input:checked + span, .receipt-modes__option input:checked + span { color: var(--color-text); background: #fff; box-shadow: var(--shadow-xs); }
.receipt-book__option input:focus-visible + span, .receipt-modes__option input:focus-visible + span { outline: 2px solid var(--color-primary); outline-offset: 1px; }

.receipt-section { border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.receipt-section summary { display: flex; align-items: baseline; gap: 8px; padding: 11px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.receipt-section summary small { overflow: hidden; color: var(--color-text-muted); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.receipt-section[open] summary { border-bottom: 1px solid var(--color-border); }
.receipt-section .receipt-form__grid { padding: 14px; }

.receipt-items { display: grid; gap: 8px; }
.receipt-items__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; }
.receipt-items__head span { color: var(--color-text-muted); font-size: 11px; }
.receipt-line { display: grid; grid-template-columns: 22px minmax(0, 1fr) 128px 32px; align-items: center; gap: 8px; }
.receipt-line .input { height: 40px; }
.receipt-line .money-input .input { padding-left: 26px; font-size: 14px; }
.receipt-line .money-input__sign { left: 11px; font-size: 13px; }
.receipt-line__no { color: var(--color-text-muted); font-size: 12px; font-weight: 700; text-align: center; }
.receipt-line__tag { grid-column: 2 / -1; margin-top: -3px; color: var(--color-primary-strong); font-size: 11px; font-weight: 700; }
.receipt-line--fee .input { border-color: #8de6f9; background: var(--color-primary-soft); }
.receipt-items__add { justify-self: start; }
/* Discount card — lines up with "Total received"; off until the accountant switches it on */
.discount-box { margin-top: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; }
.discount-box__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; cursor: pointer; }
.discount-box__title { font-size: 13px; font-weight: 700; color: var(--color-text); }
.discount-box__title small { margin-left: 6px; color: var(--color-text-muted); font-size: 12px; font-weight: 600; }
.discount-box.is-on { border-color: #a6e9c2; background: #f6fef9; }
.discount-box.is-on .discount-box__title small { color: #067647; }
.discount-box__body { display: grid; gap: 10px; padding: 0 14px 14px; }
.discount-box .money-input .input { height: 40px; font-size: 14px; }
.discount-box .money-input .input { padding-left: 26px; }
.discount-box__amount { max-width: 220px; }
.discount-box .money-input__sign { left: 11px; font-size: 13px; }
.discount-box__note { margin: 0; color: #067647; font-size: 12px; font-weight: 600; line-height: 1.45; }
.discount-box textarea { min-height: 56px; padding: 8px 10px; resize: vertical; }
.receipt-total__amount { display: inline-flex; align-items: baseline; gap: 10px; }
.receipt-total__amount s { color: var(--color-text-muted); font-size: 15px; font-weight: 600; }
.receipt-total { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; margin-top: 4px; padding: 12px 14px; background: var(--color-primary-soft); border: 1px solid #bff0fb; border-radius: var(--radius-md); }
.receipt-total span { font-size: 13px; font-weight: 700; }
.receipt-total b { font-size: 20px; font-variant-numeric: tabular-nums; }
.receipt-total small { grid-column: 1 / -1; color: var(--color-text-muted); font-size: 11.5px; }
.receipt-email { align-items: flex-start; font-size: 13px; line-height: 1.45; }
.receipt-email.is-disabled { color: var(--color-text-muted); }

.receipt-preview { position: sticky; top: 0; display: grid; gap: 10px; padding: 14px; background: #eef1f4; border-radius: var(--radius-lg); }
.receipt-preview__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.receipt-preview__bar > span { display: inline-flex; align-items: center; gap: 7px; color: #4b5563; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.receipt-preview__bar i { width: 7px; height: 7px; background: #10b981; border-radius: 50%; box-shadow: 0 0 0 3px rgb(16 185 129 / 20%); }
.receipt-preview__stage { position: relative; overflow: hidden; }
.receipt-preview__paper { width: 560px; transform-origin: top left; box-shadow: 0 1px 2px rgb(0 0 0 / 8%), 0 8px 24px -6px rgb(0 0 0 / 18%); }

@media (max-width: 900px) {
  .receipt-dialog { grid-template-columns: 1fr; }
  .receipt-preview { position: static; order: -1; }
}
@media (max-width: 560px) {
  .receipt-form__grid, .receipt-strip { grid-template-columns: 1fr; }
  .receipt-line { grid-template-columns: minmax(0, 1fr) 104px 32px; }
  .receipt-line__no { display: none; }
  .receipt-line__tag { grid-column: 1 / -1; }
}
[data-lines] { display: grid; gap: 12px; }
.receipt-items { gap: 12px; }
.receipt-line__tag { margin-top: 0; }
.receipt-preview__bar { justify-content: flex-end; }
.receipt-form [name="number"] { color: #b91c1c; background: var(--color-bg); font-weight: 700; letter-spacing: .04em; }
.receipt-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; }
.receipt-total span { line-height: 1.2; }
.receipt-total b { line-height: 1.2; }
.receipt-total small { flex-basis: 100%; }

/* ═══ Activity logs ═══ */
.log-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr); gap: 16px; }
.log-stat { display: grid; align-content: start; gap: 4px; padding: 18px 20px; }
.log-stat > span { color: var(--color-text-muted); font-size: 12px; font-weight: 700; }
.log-stat > b { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.log-stat > small { color: var(--color-text-muted); font-size: 12px; }
.log-bad { color: var(--color-danger); font-weight: 700; }
.log-spark { display: flex; align-items: flex-end; gap: 5px; height: 64px; margin-top: 6px; }
.log-spark__bar { flex: 1; height: var(--h); min-height: 3px; background: #bff0fb; border-radius: 4px 4px 2px 2px; transition: height .5s ease, background var(--transition); }
.log-spark__bar:hover { background: var(--color-brand, #47d6f4); }
.log-spark__bar.is-today { background: var(--color-primary); }

.log-toolbar { display: grid; gap: 14px; padding: 18px 24px; border-bottom: 1px solid var(--color-border); }
.log-search .input { height: 44px; }
.log-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.log-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px 6px 12px; color: #374151; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all var(--transition); }
.log-chip span { min-width: 22px; padding: 1px 7px; color: var(--color-text-muted); background: var(--color-hover); border-radius: 999px; font-size: 11px; text-align: center; }
.log-chip:hover { border-color: #9ca3af; }
.log-chip.is-on { color: #fff; background: var(--tone, #111827); border-color: var(--tone, #111827); }
.log-chip.is-on span { color: var(--tone, #111827); background: #fff; }

.log-chip--all, .log-entry--gray { --tone: #4b5563; --tone-soft: #f3f4f6; }
.log-chip--green, .log-entry--green { --tone: #059669; --tone-soft: #ecfdf5; }
.log-chip--blue, .log-entry--blue { --tone: #0b78a0; --tone-soft: #e6f8fd; }
.log-chip--violet, .log-entry--violet { --tone: #7c3aed; --tone-soft: #f3efff; }
.log-chip--amber, .log-entry--amber { --tone: #b45309; --tone-soft: #fff6e5; }
.log-chip--sky, .log-entry--sky { --tone: #0369a1; --tone-soft: #eaf4fb; }
.log-chip--teal, .log-entry--teal { --tone: #0f766e; --tone-soft: #e8f7f5; }
.log-chip--gray { --tone: #4b5563; }
.log-entry--red { --tone: #dc2626; --tone-soft: #fef2f2; }

.log-timeline { padding: 8px 24px 4px; }
.log-day + .log-day { margin-top: 6px; }
.log-day__title { position: sticky; top: 64px; z-index: 2; display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 14px 0 10px; background: var(--color-surface); font-size: 14px; font-weight: 800; }
.log-day__title small { color: var(--color-text-muted); font-size: 12px; font-weight: 600; }
.log-day__list { position: relative; margin: 0; padding: 0; list-style: none; }
.log-day__list::before { position: absolute; top: 8px; bottom: 8px; left: 17px; width: 2px; background: var(--color-border); content: ""; }
.log-entry { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 8px 0 14px; }
.log-entry__icon { position: relative; z-index: 1; display: grid; width: 36px; height: 36px; color: var(--tone); background: var(--tone-soft); border: 2px solid var(--color-surface); border-radius: 50%; box-shadow: 0 0 0 1px color-mix(in srgb, var(--tone) 22%, transparent); place-items: center; }
.log-entry__icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.log-entry__body { min-width: 0; padding: 10px 14px 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); transition: box-shadow var(--transition), transform var(--transition); }
.log-entry__body:hover { box-shadow: var(--shadow-sm); transform: translateX(2px); }
.log-entry__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.log-entry__top b { font-size: 13.5px; }
.log-entry__top time { margin-left: auto; color: var(--color-text-muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.log-amount { padding: 1px 8px; color: var(--tone); background: var(--tone-soft); border-radius: 999px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.log-entry__body p { margin: 4px 0 0; color: #374151; font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.log-entry__body mark { padding: 0 2px; background: #fde68a; border-radius: 3px; }
.log-entry__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 9px; }
.log-student { display: inline-flex; align-items: baseline; gap: 6px; color: var(--color-primary); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.log-student:hover { text-decoration: underline; }
.log-student small { color: var(--color-text-muted); font-size: 11px; font-weight: 600; }
.log-who { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text-muted); font-size: 12px; font-weight: 600; }
.log-who i { display: grid; width: 20px; height: 20px; color: var(--color-primary-strong); background: var(--color-primary-soft); border-radius: 50%; font-size: 9px; font-style: normal; font-weight: 800; place-items: center; }
.log-who svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.log-who--bot { color: #6d28d9; }
.log-tag { padding: 1px 8px; color: #4b5563; background: var(--color-hover); border-radius: 999px; font-size: 11px; font-weight: 700; }
.log-empty { display: grid; gap: 4px; padding: 48px 16px; color: var(--color-text-muted); text-align: center; place-items: center; }
.log-empty b { color: var(--color-text); }
.log-empty p { margin: 0; }
.log-empty span svg { width: 28px; height: 28px; fill: var(--color-border); stroke: none; }
.log-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; color: var(--color-text-muted); border-top: 1px solid var(--color-border); font-size: 12.5px; }
.log-entry { animation: log-in .35s ease both; }
@keyframes log-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) { .log-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .log-stats { grid-template-columns: 1fr; }
  .log-toolbar, .log-timeline, .log-foot { padding-left: 14px; padding-right: 14px; }
  .log-entry__top time { width: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .log-entry { animation: none; } }
.faculty-address { grid-column: 1 / -1; }

/* ═══ Add / edit student ═══ */
.modal--form { width: min(100%, 760px); }
.modal--form .modal__body { max-height: min(76vh, 820px); }
.student-form { display: grid; gap: 18px; color: var(--color-text); }
.student-form__section { margin: 0; padding: 0; border: 0; }
.student-form__section legend { margin-bottom: 10px; padding: 0; color: var(--color-text-muted); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.student-form__section + .student-form__section { padding-top: 18px; border-top: 1px solid var(--color-border); }
.student-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.student-form__wide { grid-column: 1 / -1; }
.student-form .textarea { min-height: 64px; }
.extra-fields { display: grid; gap: 10px; margin: 10px 0; }
.extra-fields:empty { margin: 4px 0; }
.extra-field { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) 32px; align-items: center; gap: 10px; }
@media (max-width: 560px) { .student-form__grid { grid-template-columns: 1fr; } .extra-field { grid-template-columns: 1fr 32px; } .extra-field [data-extra-value] { grid-column: 1; } }
.receipt-line__tag--fine { color: #b45309; }
.fee-tile__fine { margin-top: 4px; color: #b45309; font-size: 12px; font-weight: 700; }

/* ═══ Settings → Fee data ═══ */
.feedata { display: grid; gap: 0; padding: 8px 24px 24px; }
.feedata__step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px; padding: 18px 0; }
.feedata__step + .feedata__step { border-top: 1px dashed var(--color-border); }
.feedata__num { display: grid; width: 34px; height: 34px; color: var(--color-primary-strong); background: var(--color-primary-soft); border: 1px solid #bff0fb; border-radius: 50%; font-weight: 800; place-items: center; }
.feedata__body { display: grid; gap: 10px; min-width: 0; color: var(--color-text); }
.feedata__body h3 { margin: 4px 0 0; font-size: 15px; }
.feedata__body > p { margin: 0; font-size: 13px; }
.feedata__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.feedata__info { margin: 0; color: var(--color-text-muted); font-size: 12.5px; }
.feedata__body > .button { justify-self: start; }
.feedata__drop { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 18px 20px; color: var(--color-text-muted); background: var(--color-bg); border: 1.5px dashed #c9d2da; border-radius: var(--radius-md); cursor: pointer; transition: border-color var(--transition), background var(--transition); }
.feedata__drop:hover, .feedata__drop.is-over { border-color: var(--color-primary); background: var(--color-primary-soft); }
.feedata__drop svg { width: 22px; height: 22px; fill: none; stroke: var(--color-primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feedata__drop span { color: var(--color-text); font-size: 13px; }
.feedata__drop small { flex-basis: 100%; padding-left: 34px; font-size: 11.5px; }
.feedata__review { display: grid; gap: 14px; margin-top: 4px; }
.feedata__file { display: grid; gap: 2px; font-size: 13px; }
.feedata__file span { color: var(--color-text-muted); font-size: 12px; }
.feedata__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.feedata__stats div { display: grid; gap: 2px; padding: 12px 14px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.feedata__stats b { font-size: 20px; font-variant-numeric: tabular-nums; }
.feedata__stats span { color: var(--color-text-muted); font-size: 11.5px; }
.feedata__errors { padding: 12px 14px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-md); font-size: 12.5px; }
.feedata__errors ul { margin: 6px 0 0; padding-left: 18px; }
.feedata__table { max-height: 360px; overflow: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.feedata__table s { color: var(--color-text-muted); font-size: 11.5px; }
.feedata__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.feedata__error { margin: 0; color: var(--color-danger); font-size: 13px; font-weight: 600; }
.feedata__ok { margin: 0; color: #047857; font-size: 13px; font-weight: 600; }
.feedata__progress { height: 6px; margin-top: 14px; overflow: hidden; background: var(--color-hover); border-radius: 999px; }
.feedata__progress i { display: block; width: 0; height: 100%; background: var(--color-primary); transition: width .3s ease; }
@media (max-width: 900px) { .feedata__grid, .feedata__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feedata { padding: 4px 14px 16px; } .feedata__grid, .feedata__stats { grid-template-columns: 1fr; } }
.feedata__grid { grid-template-columns: repeat(2, minmax(0, 260px)); }
.feedata__hint { color: var(--color-text-muted); font-size: 12px; }
.feedata__link { color: var(--color-primary); font-weight: 700; }
.feedata__clear { align-items: flex-start; padding: 12px 14px; background: #fff8f1; border: 1px solid #fdd3c1; border-radius: var(--radius-md); font-size: 12.5px; line-height: 1.5; }
.import-footnote--fee a { color: var(--color-primary); font-weight: 700; }
@media (max-width: 560px) { .feedata__grid { grid-template-columns: 1fr; } }

/* ═══ Scholarship fee ═══ */
.fee-tile__scholarship { margin-top: 4px; color: #047857; font-size: 12px; font-weight: 600; }
.fee-tile__scholarship b { font-weight: 800; }
.plan-form__note--top { margin-top: -10px; }
.sch-tag { display: inline-block; width: fit-content; margin-top: 3px; padding: 1px 7px; color: #047857; background: #ecfdf5; border-radius: 999px; font-size: 10.5px; font-weight: 700; }
.sch-tag--off { color: #6b7280; background: var(--color-hover); }

/* ═══ Segmented toggles (Students filters) ═══ */
.seg { display: inline-flex; flex: none; gap: 2px; height: 40px; padding: 3px; background: var(--color-hover); border: 1px solid var(--color-border); border-radius: 10px; }
.seg button { padding: 0 12px; color: var(--color-text-muted); background: transparent; border: 0; border-radius: 7px; font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background var(--transition), color var(--transition), box-shadow var(--transition); }
.seg button:hover { color: var(--color-text); }
.seg button[aria-pressed="true"] { color: var(--color-text); background: var(--color-surface); box-shadow: 0 1px 2px rgb(17 24 39 / 10%); }
.seg button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.seg.is-active button[aria-pressed="true"] { color: var(--color-primary-strong); }

/* ═══ Top-bar search results ═══ */
.gsearch { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: max(100%, 440px); max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: var(--shadow-md); }
.gsearch[hidden] { display: none; }
.gsearch__group { padding: 10px 10px 4px; color: var(--color-text-muted); font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.gsearch__item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; color: var(--color-text); border-radius: 8px; text-decoration: none; }
.gsearch__item.is-active { background: var(--color-primary-soft); }
.gsearch__icon { display: grid; flex: none; width: 30px; height: 30px; color: var(--color-primary); background: var(--color-hover); border-radius: 8px; place-items: center; }
.gsearch__item.is-active .gsearch__icon { background: var(--color-surface); }
.gsearch__icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gsearch__text { display: grid; flex: 1; min-width: 0; gap: 1px; }
.gsearch__text b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.gsearch__text small { overflow: hidden; color: var(--color-text-muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.gsearch mark { padding: 0 1px; color: inherit; background: #fde68a; border-radius: 3px; }
.gsearch__tag { flex: none; padding: 1px 7px; color: #6b7280; background: var(--color-hover); border-radius: 999px; font-size: 10.5px; font-weight: 700; }
.gsearch__tag--sch { color: #047857; background: #ecfdf5; }
.gsearch__note { padding: 14px 12px; color: var(--color-text-muted); font-size: 12.5px; }
.gsearch__foot { display: flex; gap: 14px; margin-top: 4px; padding: 8px 10px 4px; color: var(--color-text-muted); border-top: 1px solid var(--color-border); font-size: 11px; }
.gsearch__foot kbd { margin-right: 2px; padding: 0 4px; background: var(--color-hover); border: 1px solid var(--color-border); border-radius: 4px; font: inherit; font-size: 10.5px; }
@media (max-width: 560px) { .gsearch { position: fixed; top: 64px; left: 8px; right: 8px; width: auto; } .gsearch__foot { display: none; } }
/* The search box's own icon / shortcut styles must not reach into the results panel */
.topbar-search .gsearch svg { position: static; top: auto; left: auto; width: 16px; height: 16px; color: inherit; }
.topbar-search .gsearch kbd { position: static; top: auto; right: auto; }
/* Students: compact search box */
.table-toolbar__search { flex: 0 1 230px; max-width: 230px; }
.table-toolbar__search .input { height: 38px; font-size: 13px; }
.table-toolbar__search svg { top: 50%; left: 12px; width: 16px; height: 16px; transform: translateY(-50%); pointer-events: none; }
.faculty-other { grid-column: 1 / -1; }
.faculty-other[hidden] { display: none; }

/* ═══ Reports ═══ */
.report-fy { min-width: 170px; }
.report-fy .select { height: 40px; }
.report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.report-kpi { display: grid; align-content: start; gap: 4px; padding: 18px 20px; }
.report-kpi > span { color: var(--color-text-muted); font-size: 12px; font-weight: 700; }
.report-kpi > b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.report-kpi > small { color: var(--color-text-muted); font-size: 12px; }
.report-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-table tfoot td { background: var(--color-bg); border-top: 1px solid var(--color-border); }
.report-progress-cell { min-width: 150px; white-space: nowrap; }
.report-progress { display: inline-block; width: 90px; height: 8px; overflow: hidden; vertical-align: middle; background: var(--color-hover); border-radius: 4px; }
.report-progress i { display: block; height: 100%; background: var(--color-primary); border-radius: 4px; }
.report-progress__pct { margin-left: 8px; color: var(--color-text-muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.report-chart { display: flex; flex-direction: column; }
.report-bars { padding: 18px 24px 22px; }
.report-bars__plot { display: flex; align-items: flex-end; gap: 2px; height: 200px; border-bottom: 1px solid var(--color-border); }
.report-bars__col { display: flex; flex: 1; align-items: flex-end; height: 100%; padding: 0 4px; cursor: default; }
.report-bars__col:hover { background: var(--color-hover); border-radius: 4px 4px 0 0; }
.report-bars__bar { width: 100%; background: var(--color-primary); border-radius: 4px 4px 0 0; transition: height .4s ease; }
.report-bars__axis { display: flex; gap: 2px; margin-top: 6px; }
.report-bars__axis span { flex: 1; color: var(--color-text-muted); font-size: 11px; text-align: center; }
.report-hbars { display: grid; gap: 8px; padding: 6px 24px 16px; }
.report-hbar { display: grid; grid-template-columns: minmax(90px, 0.9fr) minmax(0, 1.4fr) auto; align-items: center; gap: 10px; font-size: 12.5px; }
.report-hbar__label { overflow: hidden; color: var(--color-text); text-overflow: ellipsis; white-space: nowrap; }
.report-hbar__track { height: 10px; overflow: hidden; background: var(--color-hover); border-radius: 4px; }
.report-hbar__track i { display: block; height: 100%; background: var(--color-primary); border-radius: 4px; }
.report-hbar__value { color: var(--color-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.report-sub { margin: 4px 24px 6px; padding-top: 14px; color: var(--color-text-muted); border-top: 1px solid var(--color-border); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.report-empty { margin: 10px 0 0; color: var(--color-text-muted); font-size: 12.5px; }
.report-note { margin: 16px 2px 0; color: var(--color-text-muted); font-size: 12px; line-height: 1.6; }
.report-tip { position: fixed; z-index: 90; padding: 6px 10px; color: #fff; background: #111827; border-radius: 6px; font-size: 12px; font-weight: 600; pointer-events: none; white-space: nowrap; }
.report-tip[hidden] { display: none; }
@media (max-width: 1100px) { .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .report-kpis { grid-template-columns: 1fr; } .report-bars, .report-hbars { padding-left: 14px; padding-right: 14px; } }
.report-share { margin-left: 5px; color: var(--color-text-muted); font-size: 10.5px; font-weight: 600; }
.report-count { color: inherit; text-decoration: none; }
.report-count:hover { color: var(--color-primary); text-decoration: underline; }

/* ═══ Course fee card: Management + Govt ═══ */
.fee-tile__fees { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fee-tile__fee { display: grid; gap: 1px; padding: 10px 12px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.fee-tile__fee span { color: var(--color-text-muted); font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.fee-tile__fee b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.fee-tile__fee small { color: var(--color-text-muted); font-size: 11.5px; }
.fee-tile__fee--govt { background: #f0fdf7; border-color: #c9f0dd; }
.fee-tile__fee--govt span { color: #047857; }
.fee-tile__same { color: var(--color-text-muted); font-size: 15px !important; }
.fee-tile--unset .fee-tile__fee b { color: #9ca3af; }
.fee-tile__unset { justify-self: start; }

/* ═══ Fee dialog (v2) ═══ */
.plan-form--v2 { gap: 18px; }
.plan-block { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--color-border); }
.plan-block__title { display: flex; align-items: baseline; gap: 8px; margin: 0; color: var(--color-text); font-size: 13px; font-weight: 800; }
.plan-block__title small { color: var(--color-text-muted); font-size: 11.5px; font-weight: 600; }
.plan-fees { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan-fee { display: grid; gap: 8px; padding: 12px 14px 12px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: text; transition: border-color var(--transition), box-shadow var(--transition); }
.plan-fee:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgb(11 120 160 / 10%); }
.plan-fee__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-fee__label { color: var(--color-text); font-size: 12.5px; font-weight: 700; }
.plan-fee__label i { color: var(--color-danger); font-style: normal; }
.plan-fee__tag { padding: 1px 8px; color: var(--color-primary-strong); background: var(--color-primary-soft); border-radius: 999px; font-size: 10.5px; font-weight: 800; }
.plan-fee--govt { background: #f6fdf9; border-color: #d3f1e2; }
.plan-fee--govt .plan-fee__tag { color: #047857; background: #dcf7ea; }
.plan-fee .money-input .input { height: 44px; background: var(--color-surface); font-size: 18px; }
.plan-fee__hint { color: var(--color-text-muted); font-size: 11.5px; line-height: 1.35; }
.plan-billing { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px 16px; align-items: start; }
.plan-billing [data-start-field][hidden] { display: none; }
.plan-period { display: flex; gap: 4px; height: 44px; padding: 4px; background: var(--color-hover); border: 1px solid var(--color-border); border-radius: 10px; }
.plan-period label { flex: 1; cursor: pointer; }
.plan-period input { position: absolute; opacity: 0; pointer-events: none; }
.plan-period span { display: grid; height: 100%; color: var(--color-text-muted); border-radius: 7px; font-size: 13px; font-weight: 700; place-items: center; transition: background var(--transition), color var(--transition); }
.plan-period input:checked + span { color: var(--color-text); background: var(--color-surface); box-shadow: 0 1px 2px rgb(17 24 39 / 10%); }
.plan-period input:focus-visible + span { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.plan-fine { display: grid; grid-template-columns: auto 140px minmax(0, 1fr); align-items: center; gap: 12px; }
.plan-fine__label { color: #374151; font-size: 12px; font-weight: 700; }
.plan-fine .input { height: 40px; }
.plan-fine__hint { color: var(--color-text-muted); font-size: 11.5px; }
.plan-summary--v2 { padding: 12px 14px; }
@media (max-width: 560px) { .plan-fees, .plan-billing, .fee-tile__fees { grid-template-columns: 1fr; } .plan-fine { grid-template-columns: 1fr; gap: 6px; } }

/* ═══ Students filter bar ═══ */
.filters { display: grid; gap: 12px; padding: 16px 20px; }
.filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filters__row--sub { justify-content: space-between; padding-top: 12px; border-top: 1px dashed var(--color-border); }
.filters__search { position: relative; flex: 1 1 320px; max-width: 520px; }
.filters__search svg { position: absolute; top: 50%; left: 12px; width: 16px; height: 16px; color: var(--color-text-muted); transform: translateY(-50%); pointer-events: none; }
.filters__search .input { width: 100%; height: 38px; padding-left: 38px; font-size: 13.5px; }
.filters__month { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--color-text-muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.filters__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters__group--end { margin-left: auto; }
.filters .select, .filters .select-button { width: auto; min-width: 132px; height: 38px; font-size: 13px; }
.filters__month .select, .filters__month .select-button { min-width: 160px; }
.filters .seg { height: 38px; }
.filters .seg button { padding: 0 11px; font-size: 12.5px; }
.filters__clear { height: 38px; gap: 4px; color: var(--color-text-muted); }
.filters__clear svg { width: 14px; height: 14px; }
.filters__clear:hover { color: var(--color-danger); }
@media (max-width: 900px) { .filters__month { margin-left: 0; } .filters__group--end { margin-left: 0; } }
@media (max-width: 560px) { .filters { padding: 12px 14px; } .filters__search { flex-basis: 100%; max-width: none; } .filters__group { width: 100%; } .filters .select, .filters .select-button { flex: 1 1 140px; } }

/* ═══ Fee dialog (v3): plain, compact form ═══ */
.plan-v3 { gap: 16px; }
.plan-v3__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-items: start; padding-top: 16px; border-top: 1px solid var(--color-border); }
.plan-v3 .field { gap: 6px; }
.plan-v3 .field__label { display: flex; align-items: center; gap: 6px; }
.plan-v3 .req { color: var(--color-danger); font-weight: 700; }
.plan-v3__dot { flex: none; width: 8px; height: 8px; background: var(--color-primary); border-radius: 50%; }
.plan-v3__dot--govt { background: #10b981; }
.plan-v3 .money-input .input { height: 42px; font-size: 16px; }
.plan-v3 .plan-period { height: 42px; }
.plan-v3__start[hidden] { display: none; }
.plan-v3__start { max-width: calc(50% - 8px); }
.plan-v3__summary { display: grid; gap: 2px; padding: 12px 14px; background: var(--color-primary-soft); border: 1px solid #bff0fb; border-radius: var(--radius-md); }
.plan-v3__summary b { font-size: 14px; }
.plan-v3__summary span { color: var(--color-text-muted); font-size: 12px; line-height: 1.45; }
@media (max-width: 560px) { .plan-v3__row { grid-template-columns: 1fr; } .plan-v3__start { max-width: none; } }

/* ═══ Students table: name pinned left, actions pinned right ═══
   The middle columns scroll sideways underneath, so the buttons are always in view. */
.data-table--pinned td, .data-table--pinned th { background-clip: padding-box; }
.data-table--pinned td { background: var(--color-surface); }
.data-table--pinned tbody tr:hover > td { background: #fafafa; }
.data-table--pinned tbody tr.is-selected > td { background: #f4fcfe; }
.data-table--pinned .col-check { position: sticky; left: 0; z-index: 2; width: 52px; min-width: 52px; max-width: 52px; }
.data-table--pinned th:nth-child(2), .data-table--pinned td:nth-child(2) { position: sticky; left: 52px; z-index: 2; min-width: 200px; }
.data-table--pinned th:last-child, .data-table--pinned td:last-child { position: sticky; right: 0; z-index: 2; }
.data-table--pinned th.col-check, .data-table--pinned th:nth-child(2), .data-table--pinned th:last-child { z-index: 3; }
.data-table--pinned td:nth-child(2), .data-table--pinned th:nth-child(2), .data-table--pinned td:last-child, .data-table--pinned th:last-child { transition: box-shadow .2s ease; }
.data-table-wrap--pinned.is-scrolled .data-table--pinned td:nth-child(2), .data-table-wrap--pinned.is-scrolled .data-table--pinned th:nth-child(2) { box-shadow: 8px 0 10px -8px rgb(17 24 39 / 18%); }
.data-table-wrap--pinned.has-more .data-table--pinned td:last-child, .data-table-wrap--pinned.has-more .data-table--pinned th:last-child { box-shadow: -8px 0 10px -8px rgb(17 24 39 / 18%); }
/* Shift + mouse wheel, trackpad swipe or the thin bar below scroll the middle columns */
.data-table-wrap--pinned { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.data-table-wrap--pinned::-webkit-scrollbar { height: 8px; }
.data-table-wrap--pinned::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }

/* Tighter filter area */
.filters { gap: 10px; padding: 12px 16px; }
.filters__row--sub { padding-top: 10px; }

/* ═══ Sync status (top bar) ═══ */
.net-pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; color: #374151; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 999px; font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background var(--transition), border-color var(--transition); }
.net-pill[hidden] { display: none; }
.net-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.net-pill[data-state="offline"] { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.net-pill[data-state="syncing"] { color: var(--color-primary-strong); background: var(--color-primary-soft); border-color: #bff0fb; }
.net-pill[data-state="syncing"] i { animation: net-pulse 1s ease-in-out infinite; }
.net-pill[data-state="synced"] { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.net-pill[data-state="error"] { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.net-pill[data-state="signin"] { color: #9a3412; background: #fff7ed; border-color: #fed7aa; }
@keyframes net-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .net-pill[data-state="syncing"] i { animation: none; } }
.net-failures { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.net-failures li { display: grid; gap: 2px; padding: 10px 12px; background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius-md); font-size: 13px; }
.net-failures span { color: var(--color-text-muted); font-size: 12px; }
@media (max-width: 560px) { .net-pill { padding: 0 9px; font-size: 11px; } }

/* ═══ Roles (html[data-role], set by js/auth.js) — the database rules are the real lock; this only hides
   buttons a role can't use. Accountant: no admin-only actions. Viewer: nothing that changes data. ═══ */
html[data-role="accountant"] :is(
  [data-add-student], [data-import], [data-bulk-status], [data-edit-profile], [data-toggle-status],
  [data-add-faculty], [data-import-faculty], [data-template], .table-actions [data-edit],
  [data-tab="reminders"], [data-tab="staff"], [data-admin-only]
),
html[data-role="viewer"] :is(
  [data-add-student], [data-import], [data-bulk-status], [data-edit-profile], [data-toggle-status],
  [data-add-faculty], [data-import-faculty], [data-template], .table-actions [data-edit],
  [data-tab="reminders"], [data-tab="staff"], [data-admin-only],
  [data-send-all], [data-bulk-frequency], [data-bulk-paid], [data-bulk-unpaid], [data-remind], [data-pay],
  [data-undo-paid], [data-toggle-pause], [data-reminder-every], [data-edit-plan], [data-delete-plan],
  [data-reset-fees], [data-start-month], [data-tab="feedata"], [data-save-correction], [data-fees-only]
) { display: none !important; }
/* Faculty names open the edit form — not for accountants / viewers. */
html:is([data-role="accountant"], [data-role="viewer"]) .table-person--button[data-edit] { pointer-events: none; }
/* Viewers: no row checkboxes (they only feed the bulk actions). */
html[data-role="viewer"] :is(.data-table input[type="checkbox"]) { display: none !important; }
/* Settings → Staff */
.staff-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.staff-roles > div { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fafafa; font-size: 12.5px; }
.staff-roles span { color: var(--color-text-muted); line-height: 1.45; }
.staff-form { display: grid; gap: 14px; }
@media (max-width: 760px) { .staff-roles { grid-template-columns: 1fr; } }

/* Courses & Batches: + / pencil / expand per course, and the batch dates panel */
.course-actions-head { width: 1%; }
.course-actions { width: 1%; white-space: nowrap; text-align: right; }
.course-actions .icon-button { color: var(--color-text-muted); }
.course-actions .icon-button:hover:not(:disabled) { color: var(--color-primary-strong); }
.course-actions .icon-button:disabled { opacity: .35; cursor: not-allowed; }
.course-toggle svg { transition: transform var(--transition); }
.course-row.is-open .course-toggle svg { transform: rotate(180deg); }
.course-row.is-open > td { border-bottom-color: transparent; }
.course-detail > td { padding: 0 20px 18px !important; background: #fcfbf9; }
.batch-table { width: 100%; border-collapse: collapse; font-size: 13px; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.batch-table th { padding: 9px 14px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-muted); background: #f9fafb; border-bottom: 1px solid var(--color-border); }
.batch-table td { padding: 10px 14px; border-bottom: 1px solid var(--color-border); }
.batch-table tr:last-child td { border-bottom: 0; }
.batch-empty { margin: 0; padding: 12px 0 0; font-size: 13px; }
.batch-form { display: grid; gap: 14px; }
.batch-form__dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.batch-edit { display: grid; gap: 8px; }
.batch-edit__head, .batch-edit__row { display: grid; grid-template-columns: 150px 1fr 1fr; gap: 10px; align-items: center; }
.batch-edit__head { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-muted); }
.batch-edit__row b small { display: block; font-weight: 500; font-size: 11.5px; }
@media (max-width: 640px) { .batch-form__dates, .batch-edit__head, .batch-edit__row { grid-template-columns: 1fr; } .batch-edit__head { display: none; } }
