:root {
  --navy-950: #071f34;
  --navy-900: #0b1f33;
  --navy-800: #12334d;
  --blue-700: #075b76;
  --teal-700: #0f766e;
  --teal-500: #14b8a6;
  --teal-100: #ccfbf1;
  --amber-600: #d8942f;
  --amber-100: #fff4d8;
  --coral-600: #c75a54;
  --coral-100: #fde8e6;
  --canvas: #f6f7f3;
  --surface: #ffffff;
  --border: #d9e1e7;
  --ink: #12212f;
  --muted: #667786;
  --shadow: 0 14px 42px rgba(7, 31, 52, .08);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--teal-700); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .45rem; color: var(--navy-950); font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.12; letter-spacing: -.035em; }
h2 { margin-bottom: .35rem; color: var(--navy-950); font-size: 1.18rem; letter-spacing: -.015em; }
h3 { margin-bottom: .5rem; color: var(--navy-950); font-size: 1rem; }
p { color: var(--muted); }
small { color: var(--muted); }
code { padding: .2rem .42rem; border: 1px solid var(--border); border-radius: 6px; background: #f2f5f7; color: var(--navy-900); font-size: .86rem; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; width: 264px; flex-direction: column; overflow-y: auto; background: var(--navy-950); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: .78rem; color: #fff; }
.brand:hover { color: #fff; }
.sidebar > .brand { min-height: 80px; padding: 0 1.45rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--teal-500), #77e1d5); color: var(--navy-950); font-size: 1.15rem; font-weight: 900; box-shadow: 0 8px 24px rgba(20,184,166,.22); }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { letter-spacing: .12em; }
.brand small { margin-top: .18rem; color: rgba(255,255,255,.62); font-size: .69rem; letter-spacing: .08em; text-transform: uppercase; }
.brand.large .brand-mark { width: 46px; height: 46px; border-radius: 14px; }
.brand.large strong { font-size: 1.15rem; }
.side-nav { flex: 1; padding: 1.15rem .85rem; }
.nav-label { display: block; padding: 1.18rem .85rem .48rem; color: rgba(255,255,255,.42); font-size: .64rem; font-weight: 800; letter-spacing: .13em; }
.side-nav a { display: flex; align-items: center; gap: .78rem; margin: .15rem 0; padding: .72rem .82rem; border-radius: 10px; color: rgba(255,255,255,.72); font-size: .88rem; font-weight: 600; transition: background .15s, color .15s; }
.side-nav a > span { display: inline-grid; width: 22px; place-items: center; color: rgba(255,255,255,.5); font-size: 1rem; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.active { background: var(--blue-700); color: #fff; box-shadow: inset 3px 0 0 var(--teal-500); }
.side-nav a.active > span { color: var(--teal-500); }
.nav-count-badge { display: inline-flex; min-width: 24px; height: 24px; align-items: center; justify-content: center; margin-left: auto; padding: 0 .38rem; border: 2px solid rgba(255,255,255,.88); border-radius: 999px; background: #d92f3d; color: #fff; font-size: .7rem; font-weight: 900; line-height: 1; box-shadow: 0 3px 12px rgba(217,47,61,.38); }
.nav-count-badge[hidden] { display: none; }
.sidebar-footer { display: flex; align-items: center; gap: .7rem; margin: .85rem; padding: .85rem; border-top: 1px solid rgba(255,255,255,.08); }
.user-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: rgba(20,184,166,.2); color: #69e0d2; font-weight: 800; }
.user-meta { display: flex; min-width: 0; flex-direction: column; }
.user-meta strong { overflow: hidden; color: #fff; font-size: .77rem; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: rgba(255,255,255,.48); font-size: .67rem; }
.main-column { min-height: 100vh; margin-left: 264px; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; min-height: 80px; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 2rem; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.topbar-title { display: flex; flex-direction: column; }
.topbar-title span { color: var(--muted); font-size: .69rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.topbar-title strong { color: var(--navy-950); font-size: 1.02rem; }
.topbar-actions { display: flex; align-items: center; gap: .55rem; }
.topbar-actions form { margin: 0; }
.menu-button { display: none !important; }
.page-content { width: min(1480px, 100%); margin: 0 auto; padding: 2rem; }
.sidebar-scrim { display: none; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.6rem; }
.page-heading p { max-width: 740px; margin-bottom: 0; }
.eyebrow { display: inline-block; margin-bottom: .45rem; color: var(--teal-700); font-size: .66rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.light { color: #75dfd2; }
.muted { color: var(--muted); }
.helper { margin: .25rem 0 0; color: var(--muted); font-size: .8rem; }

.button, button.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: .45rem; padding: .66rem 1rem; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 750; line-height: 1; transition: transform .12s, background .12s, border-color .12s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--teal-700); color: #fff; box-shadow: 0 8px 18px rgba(15,118,110,.16); }
.button-primary:hover { background: #0b665f; color: #fff; }
.button-secondary, button.button-secondary { border:1px solid #839aa8; background:#f5f9fb; color:var(--navy-900); }
.button-secondary:hover, button.button-secondary:hover { border-color:#466777; background:#eaf2f6; color:var(--navy-900); }
.button-danger { background: var(--coral-600); color: #fff; box-shadow: 0 8px 18px rgba(199,90,84,.14); }
.button-danger:hover { background: #a84641; color: #fff; }
.dashboard-alert { display: flex; align-items: center; gap: .85rem; margin: 0 0 1rem; padding: .85rem 1rem; border: 1px solid #e8cb89; border-radius: var(--radius); background: #fff9e9; color: var(--navy-900); box-shadow: var(--shadow); }
.dashboard-alert:hover { color: var(--navy-900); border-color: #d9ad4d; transform: translateY(-1px); }
.dashboard-alert > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: .15rem; }
.dashboard-alert small { color: var(--muted); line-height: 1.35; }
.announcement-banner-host:empty { display: none; }
.announcement-banner-stack { display: flex; flex-direction: column; gap: .85rem; margin: 0 0 1.25rem; }
.announcement-banner { position: relative; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: start; gap: 1rem; overflow: hidden; padding: 1.05rem 1.15rem; border: 1px solid #d6a84d; border-radius: var(--radius); background: linear-gradient(105deg,#fff5d9,#fffdf7 65%); box-shadow: 0 14px 38px rgba(130,83,11,.12); }
.announcement-banner::before { position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--amber-600); content: ""; }
.announcement-banner-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; background: var(--amber-600); color: #fff; font-size: 1.3rem; font-weight: 900; }
.announcement-banner-content { min-width: 0; }
.announcement-banner-content .eyebrow { margin-bottom: .25rem; color: #8e5a0a; }
.announcement-banner-content h2 { margin: 0 0 .4rem; font-size: 1.08rem; }
.announcement-copy { margin: 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.announcement-banner-content small { display: block; margin-top: .6rem; }
.announcement-acknowledge-form { display: flex; min-width: 132px; align-items: center; flex-direction: column; gap: .55rem; }
.announcement-acknowledge-form a { font-size: .72rem; font-weight: 750; }
.announcement-admin-columns { grid-template-columns: minmax(340px,.82fr) minmax(0,1.18fr); align-items: start; }
.announcement-compose-panel { position: sticky; top: 98px; }
.announcement-recipient-picker { min-width: 0; margin: .35rem 0; padding: 0; border: 0; }
.announcement-recipient-picker > legend { margin-bottom: .5rem; color: var(--navy-900); font-size: .78rem; font-weight: 800; }
.announcement-all-option, .announcement-recipient { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; }
.announcement-all-option { padding: .8rem; border: 1px solid #9ed8d1; border-radius: 11px; background: #effaf8; }
.announcement-all-option input, .announcement-recipient input { width: 18px; height: 18px; flex: 0 0 auto; margin-top: .1rem; accent-color: var(--teal-700); }
.announcement-all-option span, .announcement-recipient span { display: flex; min-width: 0; flex-direction: column; }
.announcement-all-option strong, .announcement-recipient strong { color: var(--navy-950); font-size: .8rem; }
.announcement-all-option small, .announcement-recipient small { overflow: hidden; margin-top: .1rem; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.announcement-recipient-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin: .75rem 0 .55rem; }
.announcement-recipient-toolbar input { min-width: 0; }
.announcement-recipient-list { max-height: 330px; overflow-y: auto; border: 1px solid var(--border); border-radius: 11px; transition: opacity .15s; }
.announcement-recipient-list.disabled { opacity: .48; }
.announcement-recipient { padding: .68rem .75rem; border-bottom: 1px solid #edf0f2; background: #fff; }
.announcement-recipient:last-child { border-bottom: 0; }
.announcement-recipient:hover { background: #f8fbfa; }
.announcement-audit-list, .announcement-history-list { display: flex; flex-direction: column; gap: .9rem; }
.announcement-audit-card, .announcement-history-card { padding: 1rem; border: 1px solid var(--border); border-radius: 13px; background: #fbfcfc; }
.announcement-audit-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.announcement-audit-heading h3 { margin: 0 0 .2rem; font-size: 1.02rem; }
.announcement-audit-card > .announcement-copy, .announcement-history-card > .announcement-copy { margin-top: .85rem; padding: .8rem .9rem; border-left: 3px solid var(--teal-700); border-radius: 7px; background: #f3f9f8; font-size: .82rem; }
.announcement-delivery-details { margin-top: .85rem; border-top: 1px solid var(--border); }
.announcement-delivery-details summary { padding: .7rem 0 0; color: var(--blue-700); cursor: pointer; font-size: .76rem; font-weight: 800; }
.announcement-delivery-details .table-wrap { margin-top: .7rem; }
.announcement-history-card h2 { margin: 0 0 .2rem; }
.announcement-pager { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.announcement-pager span { color: var(--muted); font-size: .75rem; font-weight: 750; }
.button.compact { min-height: 36px; padding: .52rem .78rem; font-size: .8rem; }
.button.wide { width: 100%; }
.button[disabled] { cursor: not-allowed; opacity: .5; transform: none; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.link-button { padding: .3rem .55rem; border: 1px solid #839aa8; border-radius: 6px; background: #f5f9fb; color: var(--blue-700); cursor: pointer; font-size: .84rem; font-weight: 750; }
.link-button:hover { color: var(--teal-700); text-decoration: underline; }
.link-button.danger { color: var(--coral-600); }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--navy-900); cursor: pointer; }
.icon-button:hover { border-color: #bac8d0; color: var(--teal-700); }

input, select, textarea { width: 100%; border: 1px solid #cdd7dd; border-radius: 9px; background: #fff; color: var(--ink); outline: none; transition: border-color .12s, box-shadow .12s; }
input, select { min-height: 42px; padding: .58rem .72rem; }
textarea { padding: .7rem .75rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal-700); box-shadow: 0 0 0 3px rgba(20,184,166,.13); }
input[type="checkbox"] { width: 17px; min-height: auto; height: 17px; accent-color: var(--teal-700); }
input[type="file"] { padding: .45rem; }
label { color: var(--navy-900); font-size: .8rem; font-weight: 750; }
.form-stack { display: flex; flex-direction: column; gap: .65rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.form-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.field { display: flex; min-width: 0; flex-direction: column; gap: .38rem; }
.full { grid-column: 1 / -1; }
.check-line { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-weight: 550; }
.check-line > span { display: flex; flex-direction: column; gap: .12rem; }
.check-line > span small { color: var(--muted); font-weight: 450; }
.inline-filter, .search-form, .upload-form, .inline-form { display: flex; align-items: center; gap: .6rem; }
.inline-filter input, .inline-filter select { width: auto; min-width: 135px; }
.inline-filter span { color: var(--muted); font-size: .82rem; }
.search-form { width: min(580px,100%); }
.search-form input { flex: 1; }
.upload-form { justify-content: flex-end; }
.upload-form input { max-width: 320px; }
.filter-panel { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(130px,.35fr) auto; align-items: end; gap: 1rem; margin-bottom: 1.25rem; padding: 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.toolbar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.upload-banner { display: grid; grid-template-columns: 1fr minmax(250px,340px) auto; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: 1rem 1.15rem; border: 1px solid #a8ded8; border-radius: var(--radius); background: #f0fcfa; }
.upload-banner p { margin: .15rem 0 0; font-size: .82rem; }
.validation { color: #a83935; font-size: .8rem; }
.validation ul { margin: 0; padding-left: 1.2rem; }

.panel { margin-bottom: 1.25rem; padding: 1.15rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-heading .eyebrow { margin-bottom: .28rem; }
.panel-heading h2 { margin: 0; }
.panel-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.compact-panel { padding: 1rem 1.15rem; }
.narrow-panel { max-width: 780px; }
.two-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.25rem; }
.two-column.uneven { grid-template-columns: minmax(0,1.45fr) minmax(310px,.75fr); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(320px,.7fr); gap: 1.25rem; }
.attention-panel { border-top: 3px solid var(--amber-600); }
.supervision-mapping-panel { border-top: 4px solid var(--amber-600); }
.mapping-list { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; }
.mapping-row { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(320px,1.2fr); align-items: center; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid #e8edf0; background: #fff; }
.mapping-row:last-child { border-bottom: 0; }
.mapping-row > div:first-of-type { display: flex; min-width: 0; flex-direction: column; }
.mapping-row strong { overflow-wrap: anywhere; }

.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.metric-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.metric-card { display: flex; min-height: 126px; align-items: center; gap: 1rem; padding: 1.15rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.metric-card > div { display: flex; flex-direction: column; }
.metric-card small { margin-bottom: .18rem; font-size: .63rem; font-weight: 800; letter-spacing: .1em; }
.metric-card strong { color: var(--navy-950); font-size: 1.95rem; line-height: 1; letter-spacing: -.04em; }
.metric-card span:last-child { margin-top: .25rem; color: var(--muted); font-size: .75rem; }
.metric-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 12px; font-weight: 900; }
.metric-icon.navy { background: #e8eef3; color: var(--navy-900); }
.metric-icon.teal { background: var(--teal-100); color: var(--teal-700); }
.metric-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.metric-icon.coral { background: var(--coral-100); color: var(--coral-600); }
.summary-strip { display: flex; gap: 0; margin-bottom: 1.25rem; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.summary-strip > div { display: flex; min-width: 150px; flex: 1; align-items: baseline; gap: .55rem; padding: .9rem 1.15rem; border-right: 1px solid var(--border); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip strong { color: var(--navy-950); font-size: 1.35rem; }
.summary-strip span { color: var(--muted); font-size: .78rem; }
.large-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: .65rem; }
.large-stats > div { display: flex; flex-direction: column; padding: 1rem .7rem; border-radius: 12px; background: #f5f8f9; text-align: center; }
.large-stats strong { color: var(--navy-950); font-size: 1.65rem; }
.large-stats span { color: var(--muted); font-size: .75rem; }
.table-wrap { width: 100%; overflow-x: auto; }
.table-wrap.tall { max-height: 650px; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th { padding: .65rem .7rem; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .65rem; font-weight: 850; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: .78rem .7rem; border-bottom: 1px solid #edf0f2; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfb; }
td strong, td small { display: block; }
td small { margin-top: .14rem; font-size: .72rem; }
.empty-cell { padding: 1.7rem !important; color: var(--muted); text-align: center; }
.check-column { width: 34px; }
.identity-cell { display: flex; align-items: center; gap: .7rem; }
.identity-cell img, .avatar-placeholder { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; object-fit: cover; }
.avatar-placeholder { display: grid; place-items: center; background: #e8eef2; color: var(--navy-800); font-size: .66rem; font-weight: 800; }
.pill, .status { display: inline-flex; align-items: center; justify-content: center; padding: .25rem .48rem; border-radius: 999px; font-size: .69rem; font-weight: 750; white-space: nowrap; }
.pill { background: #edf3f6; color: var(--navy-800); }
.status-success { background: var(--teal-100); color: #08645d; }
.status-warning { background: var(--amber-100); color: #8e5a0a; }
.status-error { background: var(--coral-100); color: #993e39; }
.status-neutral { background: #edf1f3; color: #546572; }
.period-badge, .demerit-badge, .count-badge { display: grid; flex: 0 0 auto; place-items: center; border-radius: 9px; font-size: .72rem; font-weight: 850; }
.period-badge { min-width: 35px; height: 31px; padding: 0 .4rem; background: #e6f4f3; color: var(--teal-700); }
.demerit-badge { width: 36px; height: 36px; background: var(--amber-100); color: #9a620d; }
.count-badge { min-width: 30px; height: 30px; padding: 0 .5rem; background: var(--amber-100); color: #945c05; }
.count-badge.coral { background: var(--coral-100); color: var(--coral-600); }
.stack-list { display: flex; flex-direction: column; }
.stack-list.tall { max-height: 650px; overflow-y: auto; }
.stack-list.separated { margin-top: 1.2rem; padding-top: .5rem; border-top: 1px solid var(--border); }
.stack-row { display: flex; align-items: center; gap: .75rem; padding: .75rem .25rem; border-bottom: 1px solid #edf0f2; color: var(--ink); }
.stack-row:last-child { border-bottom: 0; }
.stack-row > div { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.stack-row strong { font-size: .84rem; }
.stack-row small { margin-top: .14rem; font-size: .72rem; }
.stack-row.selected { margin: .15rem 0; padding: .7rem; border: 1px solid #a5d8d2; border-radius: 10px; background: #effaf8; }
.success-empty { display: flex; align-items: center; gap: .8rem; padding: 1rem; border-radius: 12px; background: #effaf8; }
.success-empty > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--teal-700); color: #fff; }
.success-empty p { margin: .18rem 0 0; font-size: .77rem; }

.flash { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: .65rem; margin-bottom: 1rem; padding: .75rem .9rem; border: 1px solid; border-radius: 11px; font-size: .84rem; }
.flash > span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; font-weight: 900; }
.flash button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 1.25rem; }
.flash-success { border-color: #a9ddd7; background: #effaf8; color: #075e58; }
.flash-success > span { background: var(--teal-700); color: #fff; }
.flash-error { border-color: #efbbb7; background: #fff3f2; color: #8f3732; }
.flash-error > span { background: var(--coral-600); color: #fff; }
.flash-info { border-color: #bfd2df; background: #f1f6f9; color: var(--navy-800); }
.flash-info > span { background: var(--navy-800); color: #fff; }
.callout { margin-bottom: 1rem; padding: .9rem 1rem; border-left: 4px solid var(--teal-700); border-radius: 8px; background: #effaf8; }
.callout.warning { border-color: var(--amber-600); background: var(--amber-100); }
.callout p { margin: .25rem 0 0; font-size: .83rem; }
.empty-state { display: flex; min-height: 300px; align-items: center; justify-content: center; flex-direction: column; padding: 2rem; text-align: center; }
.empty-state p { max-width: 520px; }
.empty-icon { display: grid; width: 56px; height: 56px; margin-bottom: 1rem; place-items: center; border-radius: 18px; background: #e7f4f2; color: var(--teal-700); font-size: 1.5rem; }
.note-card { padding: .9rem .35rem; border-bottom: 1px solid #edf0f2; }
.note-card > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.note-card p { margin: .45rem 0 0; color: var(--ink); font-size: .84rem; }

.auth-body { display: grid; min-height: 100vh; place-items: center; padding: 2rem; background: radial-gradient(circle at 85% 10%, rgba(20,184,166,.15), transparent 35%), var(--canvas); }
.auth-shell { display: grid; width: min(1040px,100%); min-height: 650px; grid-template-columns: 1.05fr .95fr; overflow: hidden; border-radius: 24px; background: #fff; box-shadow: 0 30px 90px rgba(7,31,52,.18); }
.auth-brand-panel, .setup-intro { display: flex; justify-content: space-between; flex-direction: column; padding: 3rem; background: linear-gradient(145deg, var(--navy-950), #0a3c54); color: #fff; }
.auth-brand-panel h1, .setup-intro h1 { max-width: 540px; color: #fff; font-size: clamp(2.25rem,4vw,3.4rem); }
.auth-brand-panel p, .setup-intro p { max-width: 530px; color: rgba(255,255,255,.7); }
.auth-brand-panel > small { color: rgba(255,255,255,.52); }
.auth-card { align-self: center; padding: clamp(2rem,5vw,4rem); }
.auth-card h2 { font-size: 1.65rem; }
.auth-card .form-stack { margin-top: 1.5rem; }
.setup-shell { display: grid; width: min(1100px,100%); grid-template-columns: .78fr 1.22fr; overflow: hidden; border-radius: 24px; background: #fff; box-shadow: 0 30px 90px rgba(7,31,52,.18); }
.setup-card { padding: 2.5rem; }

.scanner-page { max-width: 1100px; margin: 0 auto; }
.scanner-heading { align-items: center; }
.scan-total { display: flex; align-items: flex-end; flex-direction: column; }
.scan-total strong { color: var(--navy-950); font-size: 2.3rem; line-height: 1; }
.scan-total span { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.scan-console { margin-bottom: 1.25rem; padding: clamp(1.25rem,3vw,2rem); border-radius: 20px; background: var(--navy-950); color: #fff; box-shadow: 0 20px 52px rgba(7,31,52,.18); }
.scan-console label { color: #fff; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.scan-input-row { display: grid; grid-template-columns: 42px 1fr auto; gap: .65rem; margin: .55rem 0 .4rem; }
.scan-symbol { display: grid; place-items: center; color: #63dbcf; font-size: 1.5rem; }
.scan-input-row input { height: 62px; border: 2px solid rgba(255,255,255,.23); background: rgba(255,255,255,.08); color: #fff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 2rem; font-weight: 800; letter-spacing: .35em; text-align: center; }
.scan-input-row input:focus { border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(20,184,166,.15); }
.scan-input-row .button { min-width: 120px; }
.scan-console form > p { color: rgba(255,255,255,.5); font-size: .76rem; }
.scan-console .link-button { color: #8ce7dc; background: transparent; border-color: #8ce7dc; }
.scan-console .link-button[disabled] { cursor: default; opacity: .35; }
.scan-feedback { display: flex; align-items: center; gap: .85rem; margin: 1.25rem 0 .75rem; padding: 1rem; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.06); }
.scan-feedback .feedback-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: rgba(255,255,255,.12); font-weight: 900; }
.scan-feedback strong { color: #fff; }
.scan-feedback p { margin: .15rem 0 0; color: rgba(255,255,255,.65); font-size: .8rem; }
.scan-feedback.success { border-color: rgba(20,184,166,.5); background: rgba(15,118,110,.22); }
.scan-feedback.success .feedback-icon { background: var(--teal-500); color: var(--navy-950); }
.scan-feedback.warning { border-color: rgba(216,148,47,.55); background: rgba(216,148,47,.17); }
.scan-feedback.warning .feedback-icon { background: var(--amber-600); color: #fff; }
.scan-feedback.error { border-color: rgba(199,90,84,.55); background: rgba(199,90,84,.17); }
.scan-feedback.error .feedback-icon { background: var(--coral-600); color: #fff; }

.schedule-list { display: flex; flex-direction: column; gap: .8rem; }
.lesson-card { display: grid; grid-template-columns: 145px 1fr auto; align-items: center; gap: 1.2rem; padding: 1.1rem 1.2rem; border: 1px solid var(--border); border-left: 4px solid var(--teal-700); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.lesson-action-form { margin: 0; }
.lesson-time { display: flex; flex-direction: column; }
.lesson-time strong { color: var(--navy-950); font-size: 1.2rem; }
.lesson-time span { color: var(--muted); font-size: .74rem; }
.lesson-main h2 { margin: 0; font-size: 1.08rem; }
.lesson-main p { margin: .22rem 0 0; font-size: .78rem; }
.register-period-card { margin-bottom: 1rem; border-left-color: var(--amber-600); background: linear-gradient(90deg, #fffaf0, #fff); }
.lesson-card.supervision-card { border-color: #75c9a4; border-left-color: #168651; background: linear-gradient(95deg,#eaf9f0,#fff 58%); box-shadow: 0 10px 28px rgba(22,134,81,.12); }
.supervision-card .eyebrow { color: #0b7845; }
.lesson-card.extra-class-card { border-left-color: var(--blue-700); background: linear-gradient(95deg,#f0f6fb,#fff 60%); }
.reminder-toggle-form { margin: 0; }
.schedule-picker-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(235px,1fr)); gap: .65rem; margin-bottom: 1.5rem; }
.schedule-picker { position: relative; display: flex; min-height: 76px; align-items: center; padding: .8rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; }
.schedule-picker:hover { border-color: #9bcfc9; background: #f7fcfb; }
.schedule-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.schedule-picker span { display: flex; min-width: 0; flex-direction: column; }
.schedule-picker small { margin-top: .2rem; font-weight: 450; }
.schedule-picker:has(input:checked) { border-color: var(--teal-700); background: #eaf8f6; box-shadow: 0 0 0 3px rgba(20,184,166,.12); }
.schedule-picker.clear-picker:has(input:checked) { border-color: var(--coral-600); background: #fff4f3; box-shadow: 0 0 0 3px rgba(199,90,84,.1); }
.schedule-grid-heading { margin-top: .5rem; }
.schedule-scroll { width: 100%; overflow-x: auto; padding-bottom: .4rem; }
.schedule-table { min-width: 980px; table-layout: fixed; border-collapse: separate; border-spacing: .35rem; }
.schedule-table th { border: 0; text-align: center; }
.schedule-table thead th { padding: .45rem; background: #f1f5f6; border-radius: 9px; }
.schedule-table thead th:first-child { width: 92px; background: transparent; }
.schedule-table th small { display: block; margin-top: .14rem; font-size: .62rem; font-weight: 550; letter-spacing: 0; text-transform: none; }
.schedule-table tbody th { color: var(--navy-900); font-size: .78rem; letter-spacing: 0; text-transform: none; }
.schedule-table td { height: 86px; padding: 0; border: 0; }
.schedule-table tbody tr:hover { background: transparent; }
.schedule-cell { width: 100%; height: 100%; padding: .55rem; border: 1px dashed #b8c6ce; border-radius: 10px; background: #fbfcfc; color: var(--muted); cursor: pointer; text-align: left; }
.schedule-cell:hover { border-color: var(--teal-700); background: #f1faf8; }
.schedule-cell strong, .schedule-cell small { display: block; overflow: hidden; text-overflow: ellipsis; }
.schedule-cell strong { color: inherit; font-size: .76rem; white-space: nowrap; }
.schedule-cell small { margin-top: .25rem; font-size: .65rem; line-height: 1.25; }
.schedule-cell.assigned { border-style: solid; border-color: #84c9c1; background: #eaf8f6; color: var(--navy-900); }
.schedule-cell.readonly { cursor: default; }
.schedule-cell.readonly:hover { border-color: #b8c6ce; background: #fbfcfc; }
.schedule-cell.readonly.assigned:hover { border-color: #84c9c1; background: #eaf8f6; }
.register-class-picker { grid-template-columns: minmax(180px,.35fr) minmax(240px,1fr) auto; align-items: end; }
.register-save { justify-content: flex-end; }
.register-grid { display: grid; grid-template-columns: minmax(230px,1.6fr) minmax(130px,.7fr) minmax(180px,.75fr); align-items: center; gap: 1rem; }
.register-grid.header { padding: .55rem .8rem; color: var(--muted); font-size: .65rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.learner-row { padding: .75rem .8rem; border-top: 1px solid #edf0f2; cursor: pointer; }
.learner-row:hover { background: #fafcfb; }
.learner-row > span:first-child { display: flex; flex-direction: column; }
.learner-row small { font-weight: 450; }
.attendance-toggle { position: relative; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: #eef5f4; text-align: center; }
.attendance-toggle input { position: absolute; opacity: 0; }
.attendance-toggle span { padding: .5rem .6rem; color: var(--muted); font-size: .72rem; }
.attendance-toggle .present-label { background: var(--teal-700); color: #fff; }
.attendance-toggle input:checked ~ .present-label { background: transparent; color: var(--muted); }
.attendance-toggle input:checked ~ .absent-label { background: var(--coral-600); color: #fff; }
.attendance-toggle.forced-absent { border-color: #8074bf; background: #f1effb; }
.attendance-toggle.forced-absent .absent-label { background: #6756ad !important; color: #fff !important; }
.status-signed-out { background: #ede9fb; color: #57449b; }
.learner-row.has-attendance-note { border-left: 4px solid var(--amber-600); background: #fffbf1; }
.attendance-notice { margin-top: .38rem !important; padding: .4rem .5rem; border-radius: 7px; background: var(--amber-100); color: #7d500b !important; font-weight: 750 !important; line-height: 1.35; }
.visibility-options { display: grid; gap: .6rem; }
.visibility-options .check-line { align-items: flex-start; padding: .75rem; border: 1px solid var(--border); border-radius: 10px; background: #fafcfc; }
.class-note-stack { margin-bottom: 1rem; }
.class-note-stack .callout { margin-bottom: .6rem; }
.supervision-note { border-color: #168651; background: #eaf9f0; }
.signout-details { margin-top: .65rem; padding-top: .55rem; border-top: 1px solid var(--border); }
.signout-details summary { color: var(--coral-600); cursor: pointer; font-size: .75rem; font-weight: 800; }
.signout-details .form-stack { min-width: 280px; margin-top: .65rem; }

.register-reminder-toast { position: fixed; z-index: 80; right: 1.25rem; bottom: 1.25rem; display: grid; width: min(440px,calc(100vw - 2rem)); grid-template-columns: 42px 1fr auto; align-items: start; gap: .8rem; padding: 1rem; border: 1px solid #d8a54a; border-radius: 14px; background: #fff8e6; color: var(--navy-950); box-shadow: 0 22px 70px rgba(64,42,7,.25); }
.register-reminder-toast > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--amber-600); color: #fff; font-size: 1.3rem; font-weight: 900; }
.register-reminder-toast strong { display: block; margin-bottom: .25rem; }
.register-reminder-toast p { margin: 0; font-size: .8rem; }
.register-reminder-toast button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.4rem; }
.notification-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 1.25rem; background: rgba(7,31,52,.72); backdrop-filter: blur(5px); }
.notification-modal-card { width: min(520px,100%); padding: 2rem; border: 2px solid #f3bd4d; border-radius: 20px; background: #fff; text-align: center; box-shadow: 0 28px 100px rgba(0,0,0,.35); }
.notification-modal-card h2 { margin: .35rem 0 .5rem; font-size: 1.75rem; }
.notification-modal-card p { margin: 0 0 1.25rem; font-size: 1rem; }
.notification-alarm-icon { display: grid; width: 76px; height: 76px; margin: 0 auto 1rem; place-items: center; border-radius: 50%; background: #fff0c8; font-size: 2.25rem; animation: bell-pulse .7s ease-in-out infinite alternate; }
.notification-modal.bell-now { background: rgba(91,8,8,.84); }
.notification-modal.bell-now .bell-modal-card { border-color: #c93f39; box-shadow: 0 28px 110px rgba(96,7,7,.58); }
.notification-modal.bell-now .notification-alarm-icon { background: #ffe1dd; animation-duration: .35s; }
.notification-modal.bell-now .eyebrow, .notification-modal.bell-now h2 { color: #9f201c; }
@keyframes bell-pulse { from { transform: scale(.94) rotate(-5deg); } to { transform: scale(1.06) rotate(5deg); } }

.irregularity-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; }
.irregularity-card { margin: 0; }
.irregularity-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.irregularity-heading h2 { margin: .12rem 0; font-size: 1.12rem; }
.irregularity-heading p { margin: 0; font-size: .76rem; }
.irregularity-heading .avatar-placeholder { width: 44px; height: 44px; font-size: .9rem; }
.irregularity-refresh-notice { align-items: center; justify-content: space-between; gap: 1rem; }
.irregularity-refresh-notice:not([hidden]) { display: flex; }
.irregularity-refresh-notice p { margin-right: 1rem; }
.irregularity-trigger { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: -.2rem 0 1rem; padding: .62rem .75rem; border: 1px solid #d7e2e5; border-radius: 9px; background: #f7fafb; }
.irregularity-trigger span { color: var(--muted); font-size: .69rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.irregularity-trigger strong { color: var(--navy-950); font-size: .78rem; }
.irregularity-resolution-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin-top: 1rem; }
.resolution-option { padding: .9rem; border: 1px solid var(--border); border-radius: 11px; background: #fafcfc; }
.resolution-option.preferred { border-color: #9ed8d1; background: #effaf8; }
.resolution-option h3, .resolution-option summary { margin: 0; color: var(--navy-950); font-size: .86rem; font-weight: 800; }
.resolution-option summary { cursor: pointer; }
.resolution-option p { margin: .35rem 0 .75rem; font-size: .75rem; }
.resolution-option[open] summary { margin-bottom: .25rem; }
.resolution-option .form-stack { margin-top: .75rem; }

.period-grid { display: grid; grid-template-columns: 80px minmax(180px,1fr) minmax(120px,.35fr) minmax(120px,.35fr); align-items: center; gap: .75rem; padding: .55rem 0; border-top: 1px solid #edf0f2; }
.period-grid.header { border: 0; color: var(--muted); font-size: .65rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.daily-time-grid { max-width: 720px; }
.daily-schedule-columns { align-items: start; }
.daily-period-list, .daily-break-list, .daily-register-list { display: flex; flex-direction: column; gap: .65rem; }
.daily-period-row { display: grid; grid-template-columns: 24px minmax(170px,1fr) auto auto; align-items: center; gap: .75rem; min-height: 70px; padding: .65rem .7rem; border: 1px solid var(--border); border-radius: 12px; background: #fbfdfd; transition: border-color .15s, opacity .15s, background .15s; }
.daily-period-row:hover { border-color: #a9cbc7; }
.daily-period-row.disabled { border-style: dashed; background: #f3f5f6; opacity: .62; }
.daily-period-handle { color: #9aa9b2; font-weight: 900; letter-spacing: -.15em; }
.daily-period-identity { display: flex; min-width: 0; align-items: center; gap: .7rem; }
.daily-period-identity > div { display: flex; min-width: 0; flex-direction: column; }
.daily-period-identity strong { overflow: hidden; color: var(--navy-950); font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.daily-period-identity small { margin-top: .12rem; font-size: .68rem; }
.daily-period-toggle { display: flex; align-items: center; gap: .38rem; color: var(--muted); font-size: .72rem; font-weight: 750; cursor: pointer; }
.daily-period-toggle input { width: 18px; height: 18px; accent-color: var(--teal-700); }
.daily-period-buttons { display: flex; gap: .3rem; }
.daily-period-buttons .icon-button { width: 34px; height: 34px; min-height: 34px; border: 1px solid var(--border); background: #fff; color: var(--navy-800); }
.daily-period-buttons .icon-button[disabled] { cursor: default; opacity: .35; }
.daily-break-row { display: grid; grid-template-columns: minmax(130px,.9fr) minmax(150px,1.25fr) 92px 38px; align-items: end; gap: .65rem; padding: .75rem; border: 1px solid var(--border); border-radius: 12px; background: #fbfdfd; }
.daily-break-row .field { gap: .25rem; }
.daily-break-row label { font-size: .68rem; }
.daily-break-remove { width: 38px; height: 42px; min-height: 42px; border: 1px solid #efc1bd; background: #fff5f4; color: var(--coral-600); font-size: 1.2rem; }
.daily-register-panel { border-color: #b9cee4; background: linear-gradient(135deg, #f5f9ff, #fff); }
.daily-register-row { display: grid; grid-template-columns: minmax(120px,.75fr) minmax(180px,1.25fr) 92px 38px; align-items: end; gap: .65rem; padding: .75rem; border: 1px solid #b9cee4; border-radius: 12px; background: #fff; }
.daily-register-row .field { gap: .25rem; }
.daily-register-row label { font-size: .68rem; }
.daily-register-remove { width: 38px; height: 42px; min-height: 42px; border: 1px solid #efc1bd; background: #fff5f4; color: var(--coral-600); font-size: 1.2rem; }
.compact-empty { min-height: 210px; padding: 1.2rem; }
.compact-empty .empty-icon { width: 44px; height: 44px; margin-bottom: .6rem; border-radius: 13px; }
.compact-empty h3 { margin-bottom: .2rem; }
.compact-empty p { margin-bottom: 0; font-size: .76rem; }
.daily-allocation-summary { color: var(--teal-700); font-size: .8rem; }
.daily-allocation-error { margin-bottom: .8rem; padding: .7rem .8rem; border: 1px solid #efbbb7; border-radius: 9px; background: #fff3f2; }
.daily-timeline { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; }
.daily-timeline-row { display: grid; grid-template-columns: 100px minmax(180px,1fr) 135px 62px; align-items: center; gap: .8rem; min-height: 52px; padding: .62rem .8rem; border-bottom: 1px solid #edf0f2; background: #fff; }
.daily-timeline-row:last-child { border-bottom: 0; }
.daily-timeline-row.break { background: #fff9eb; }
.daily-timeline-row.register { background: #f2f7ff; }
.daily-timeline-row strong { color: var(--navy-950); font-size: .82rem; }
.daily-timeline-row > span:not(.daily-timeline-kind), .daily-timeline-row small { color: var(--muted); font-size: .75rem; }
.daily-timeline-kind { display: inline-flex; width: fit-content; padding: .22rem .42rem; border-radius: 999px; background: var(--teal-100); color: var(--teal-700); font-size: .62rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.daily-timeline-row.break .daily-timeline-kind { background: var(--amber-100); color: #8e5a0a; }
.daily-timeline-row.register .daily-timeline-kind { background: #dbeafe; color: #1d4f91; }
.profile-preview { display: block; width: min(240px,100%); aspect-ratio: 4/5; margin: 0 auto 1rem; border-radius: 14px; object-fit: cover; }
.logo-preview { display: block; max-width: 200px; max-height: 160px; margin: .5rem auto 1.2rem; object-fit: contain; }
.photo-placeholder { display: grid; min-height: 180px; margin-bottom: 1rem; place-items: center; border: 1px dashed #becbd3; border-radius: 14px; background: #f7f9fa; color: var(--muted); font-size: .8rem; }

.id-sheet { display: grid; grid-template-columns: repeat(2, 8cm); justify-content: center; gap: .35cm; }
.id-card { position: relative; display: flex; width: 8cm; height: 5cm; flex-direction: column; overflow: hidden; border: .35mm solid #b8c5cc; border-radius: 3mm; background: #fff; color: var(--navy-950); break-inside: avoid; }
.id-card::after { position: absolute; right: -1.3cm; bottom: -1.3cm; width: 3cm; height: 3cm; border-radius: 50%; background: rgba(20,184,166,.1); content: ""; }
.id-card-top { display: flex; height: .9cm; align-items: center; gap: .25cm; padding: .12cm .25cm; background: var(--navy-950); color: #fff; font-size: 8pt; letter-spacing: .03em; }
.id-logo, .id-logo-placeholder { display: grid; width: .58cm; height: .58cm; place-items: center; border-radius: 50%; background: #fff; object-fit: contain; }
.id-logo-placeholder { color: var(--navy-950); font-size: 7pt; font-weight: 900; }
.id-card-body { display: grid; flex: 1; grid-template-columns: 2.1cm 1fr; gap: .25cm; padding: .25cm; }
.id-photo { width: 2.1cm; height: 3.45cm; border-radius: 1.7mm; object-fit: cover; }
.id-photo.missing { display: grid; place-items: center; border: .3mm dashed #b9c4ca; background: #f1f3f4; color: #87949d; font-size: 6pt; }
.id-details { min-width: 0; }
.id-details > span { color: var(--teal-700); font-size: 5.5pt; font-weight: 900; letter-spacing: .12em; }
.id-details h2 { margin: .05cm 0; overflow: hidden; font-size: 11pt; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.id-details p { margin: 0; color: var(--muted); font-size: 7pt; }
.barcode-wrap { width: 100%; margin-top: .14cm; }
.barcode-svg { display: block; width: 100%; height: 1.55cm; }

.heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .7rem; }
.report-launcher { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.2rem; padding: 1.2rem 1.35rem; border: 1px solid #a9d9d3; border-radius: 15px; background: linear-gradient(100deg,#effaf8,#fff); }
.report-launcher h2 { margin: .15rem 0; font-size: 1.08rem; }
.report-launcher p { margin: 0; font-size: .8rem; }
.report-load { align-self: end; }
.report-load .button { width: 100%; }
.report-builder { max-width: 980px; }
.report-section-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; margin: .25rem 0 .5rem; padding: 0; border: 0; }
.report-section-picker legend { margin-bottom: .55rem; color: var(--navy-900); font-size: .78rem; font-weight: 800; }
.report-section-picker label { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem; border: 1px solid var(--border); border-radius: 11px; background: #fbfcfc; cursor: pointer; }
.report-section-picker label:has(input:checked) { border-color: #8acfc6; background: #effaf8; }
.report-section-picker input { width: 18px; height: 18px; margin-top: .08rem; accent-color: var(--teal-700); }
.report-section-picker span { display: flex; flex-direction: column; }
.report-section-picker strong { color: var(--navy-950); font-size: .82rem; }
.report-section-picker small, .form-hint { margin-top: .16rem; color: var(--muted); font-size: .72rem; }

.print-report { max-width: 1180px; margin: 0 auto; padding: clamp(1.2rem,3vw,2.2rem); border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.report-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; padding-bottom: 1.2rem; border-bottom: 2px solid var(--navy-950); }
.report-school { display: flex; align-items: center; gap: .9rem; }
.report-school img { width: 62px; height: 62px; flex: 0 0 auto; object-fit: contain; }
.report-school h1 { margin: .08rem 0; font-size: 1.55rem; }
.report-school p { margin: 0; }
.report-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; }
.report-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: hidden; margin: 1.2rem 0; border: 1px solid var(--border); border-radius: 13px; }
.report-summary-grid > div { display: flex; min-height: 92px; justify-content: center; flex-direction: column; padding: .9rem 1rem; border-right: 1px solid var(--border); background: #fafcfc; }
.report-summary-grid > div:last-child { border-right: 0; }
.report-summary-grid span { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.report-summary-grid strong { margin-top: .15rem; color: var(--navy-950); font-size: 1.65rem; }
.report-summary-grid .accent { background: var(--teal-700); }
.report-summary-grid .accent span, .report-summary-grid .accent strong { color: #fff; }
.report-section { margin-top: 1.4rem; }
.report-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.report-section-heading h2 { margin: .08rem 0 0; font-size: 1.18rem; }
.report-section-heading p { margin: .2rem 0 0; font-size: .76rem; }
.report-table { width: 100%; }
.report-table th { background: #eef3f5; color: var(--navy-900); }
.report-table tr { break-inside: avoid; }
.compact-table td, .compact-table th { padding-top: .48rem; padding-bottom: .48rem; }
.compact-table th:first-child, .compact-table td:first-child { width: 44px; }
.absent-class-block { margin: 1rem 0 1.3rem; break-inside: avoid-page; }
.absent-class-block h3 { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: .65rem .75rem; border-radius: 9px 9px 0 0; background: var(--navy-950); color: #fff; font-size: .88rem; }
.absent-class-block h3 span { color: rgba(255,255,255,.68); font-size: .7rem; font-weight: 550; }
.report-footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; padding-top: .7rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .66rem; }
.learner-report-identity { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .7rem; margin: 1.2rem 0; }
.learner-report-identity > div { display: flex; min-width: 0; flex-direction: column; padding: .85rem; border: 1px solid var(--border); border-radius: 10px; background: #fafcfc; }
.learner-report-identity span { color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.learner-report-identity strong { margin: .22rem 0; color: var(--navy-950); font-size: .82rem; }
.learner-report-identity small { overflow-wrap: anywhere; }
.report-subheading { margin: 1rem 0 .55rem; font-size: .9rem; }
.report-note { margin-bottom: .65rem; padding: .8rem .9rem; border-left: 3px solid var(--teal-700); border-radius: 7px; background: #f5faf9; break-inside: avoid; }
.report-note strong { color: var(--navy-900); font-size: .74rem; }
.report-note p { margin: .25rem 0 0; color: var(--ink); font-size: .8rem; }
.report-empty { border: 1px solid var(--border); border-radius: 9px; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .form-grid.four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid, .two-column.uneven { grid-template-columns: 1fr; }
  .announcement-admin-columns { grid-template-columns: 1fr; }
  .announcement-compose-panel { position: static; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-open .sidebar-scrim { position: fixed; z-index: 25; inset: 0; display: block; background: rgba(7,31,52,.45); }
  .main-column { margin-left: 0; }
  .menu-button { display: grid !important; }
  .topbar { padding: 0 1rem; }
  .page-content { padding: 1.25rem; }
  .two-column, .toolbar-grid { grid-template-columns: 1fr; }
  .upload-form { justify-content: flex-start; }
  .upload-banner { grid-template-columns: 1fr; }
  .lesson-card { grid-template-columns: 105px 1fr; }
  .lesson-card .button { grid-column: 1 / -1; }
  .lesson-card > .lesson-action-form { grid-column: 1 / -1; }
  .lesson-action-form .button { width: 100%; }
  .register-class-picker { grid-template-columns: 1fr 1fr; }
  .register-class-picker .register-save { grid-column: 1 / -1; }
  .auth-shell, .setup-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 330px; padding: 2rem; }
  .setup-intro { min-height: 300px; padding: 2rem; }
  .id-sheet { grid-template-columns: 8cm; }
  .report-launcher { align-items: stretch; flex-direction: column; }
  .learner-report-identity { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .irregularity-resolution-grid { grid-template-columns: 1fr; }
  .daily-schedule-columns { grid-template-columns: 1fr; }
  .mapping-row { grid-template-columns: 1fr; gap: .55rem; }
}

@media (max-width: 650px) {
  .page-heading { align-items: stretch; flex-direction: column; }
  .topbar-title span { display: none; }
  .topbar-actions .button { display: none; }
  .metric-grid, .metric-grid.three { grid-template-columns: 1fr; }
  .metric-card { min-height: 104px; }
  .form-grid, .form-grid.four { grid-template-columns: 1fr; }
  .inline-filter, .search-form, .upload-form { align-items: stretch; flex-direction: column; }
  .inline-filter input, .inline-filter select, .upload-form input { width: 100%; max-width: none; }
  .summary-strip { flex-direction: column; }
  .summary-strip > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .filter-panel { grid-template-columns: 1fr; }
  .scan-input-row { grid-template-columns: 34px 1fr; }
  .scan-input-row .button { grid-column: 1 / -1; }
  .scan-input-row input { font-size: 1.55rem; }
  .register-grid { grid-template-columns: 1fr; gap: .55rem; }
  .register-class-picker { grid-template-columns: 1fr; }
  .register-grid.header { display: none; }
  .learner-row { padding: 1rem .6rem; }
  .period-grid { grid-template-columns: 55px 1fr; }
  .period-grid input[type="time"] { grid-column: span 1; }
  .daily-period-row { grid-template-columns: minmax(150px,1fr) auto; }
  .daily-period-handle { display: none; }
  .daily-period-buttons { grid-column: 1 / -1; }
  .daily-period-buttons .icon-button { flex: 1; }
  .daily-break-row { grid-template-columns: 1fr 1fr; }
  .daily-break-row .field:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .daily-break-remove { align-self: end; width: 100%; }
  .daily-register-row { grid-template-columns: 1fr 1fr; }
  .daily-register-row .field:nth-child(2) { grid-column: 1 / -1; }
  .daily-register-remove { align-self: end; width: 100%; }
  .daily-timeline-row { grid-template-columns: 85px 1fr; gap: .35rem .65rem; }
  .daily-timeline-row > span:not(.daily-timeline-kind), .daily-timeline-row small { grid-column: 2; }
  .auth-body { padding: 0; }
  .auth-shell, .setup-shell { min-height: 100vh; border-radius: 0; }
  .auth-card, .setup-card { padding: 1.5rem; }
  .heading-actions { align-items: stretch; flex-direction: column; }
  .report-section-picker, .learner-report-identity, .report-summary-grid { grid-template-columns: 1fr; }
  .report-summary-grid > div { min-height: 72px; border-right: 0; border-bottom: 1px solid var(--border); }
  .report-summary-grid > div:last-child { border-bottom: 0; }
  .irregularity-heading { align-items: stretch; flex-direction: column; }
  .irregularity-refresh-notice, .irregularity-trigger { align-items: stretch; flex-direction: column; }
  .announcement-banner { grid-template-columns: 42px minmax(0,1fr); }
  .announcement-acknowledge-form { grid-column: 1 / -1; align-items: stretch; }
  .announcement-recipient-toolbar, .announcement-audit-heading { align-items: stretch; flex-direction: column; }
  .supervision-entry-form { grid-template-columns:1fr; }
  .absence-card, .absence-card-meta, .dialog-actions { align-items:stretch; flex-direction:column; }
  .app-dialog { width:calc(100% - 1rem); }
}

@page { size: A4 portrait; margin: 1cm; }
.selection-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:.65rem; margin:1rem 0; }
.selection-card { display:flex; align-items:center; gap:.7rem; padding:.8rem; border:1px solid var(--border); border-radius:12px; background:var(--surface); cursor:pointer; }
.selection-card input { width:1.15rem; height:1.15rem; }
.selection-card span { display:flex; flex-direction:column; }
.checkbox-dropdown { position:relative; margin:1rem 0; }
.checkbox-dropdown > summary { display:flex; align-items:center; justify-content:space-between; gap:1rem; min-height:48px; padding:.7rem .9rem; border:1px solid var(--border); border-radius:12px; background:var(--surface); cursor:pointer; list-style:none; }
.checkbox-dropdown > summary::-webkit-details-marker { display:none; }
.checkbox-dropdown > summary::after { content:"▾"; margin-left:auto; color:var(--muted); }
.checkbox-dropdown[open] > summary::after { content:"▴"; }
.checkbox-dropdown-menu { max-height:290px; overflow:auto; margin-top:.35rem; padding:.45rem; border:1px solid var(--border); border-radius:12px; background:#fff; box-shadow:0 14px 35px rgba(7,31,52,.14); }
.checkbox-option { display:flex; align-items:center; gap:.7rem; padding:.6rem .65rem; border-radius:8px; cursor:pointer; }
.checkbox-option:hover { background:var(--surface); }
.checkbox-option input { width:1.1rem; height:1.1rem; flex:none; }
.checkbox-option span { display:flex; flex-direction:column; }
.checkbox-dropdown.compact { margin:.25rem 0 0; }
.checkbox-dropdown.is-disabled { opacity:.5; pointer-events:none; }
.switch-line { display:flex; align-items:center; gap:.65rem; min-height:46px; }
.switch-line input { width:1.15rem; height:1.15rem; }
.switch-line span { display:flex; flex-direction:column; }
.period-badge { display:inline-flex; width:max-content; margin:.2rem 0; padding:.2rem .55rem; border-radius:999px; background:#e5f3f0; color:#276e67; font-size:.78rem; font-weight:800; }
.supervision-entry-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
.supervision-entry-form .form-submit { align-self:end; }
.supervision-summary-row > div { display:flex; flex-direction:column; align-items:flex-start; }
.absence-list { display:grid; gap:.7rem; }
.absence-card { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.85rem 1rem; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
.absence-card-main, .absence-card-meta { display:flex; align-items:center; gap:.8rem; }
.absence-card-main p { margin:.15rem 0 0; color:var(--muted); }
.avatar-initial { display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:#d8ece8; color:#245f59; font-weight:900; }
.app-dialog { width:min(600px,calc(100% - 2rem)); padding:0; border:0; border-radius:20px; background:transparent; box-shadow:0 28px 100px rgba(0,0,0,.32); }
.app-dialog::backdrop { background:rgba(7,31,52,.68); backdrop-filter:blur(4px); }
.dialog-card { display:grid; gap:1rem; padding:1.4rem; border-radius:20px; background:#fff; }
.dialog-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.dialog-heading h2 { margin:.25rem 0; }
.dialog-heading p { margin:0; color:var(--muted); }
.dialog-close { border:1px solid #839aa8; border-radius:6px; padding:0 .45rem; background:#f5f9fb; color:var(--muted); font-size:1.8rem; cursor:pointer; }
.scope-choice { padding:.7rem .8rem; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.dialog-actions { display:flex; justify-content:flex-end; gap:.65rem; padding-top:.35rem; }

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .no-print, .flash { display: none !important; }
  .main-column { margin: 0; }
  .page-content { width: auto; max-width: none; margin: 0; padding: 0; }
  .print-report { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .report-header { padding-bottom: .7cm; }
  .report-summary-grid { margin: .6cm 0; }
  .report-summary-grid > div { min-height: 1.8cm; }
  .report-section { margin-top: .6cm; }
  .report-page-break { break-before: page; }
  .report-section-heading { break-after: avoid; }
  .absent-class-block, .report-note { break-inside: avoid-page; }
  .report-table thead { display: table-header-group; }
  .report-table tr { break-inside: avoid; }
  .report-footer { break-inside: avoid; }
  .report-summary-grid .accent, .absent-class-block h3 { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .id-sheet { display: grid; grid-template-columns: repeat(2, 8cm); justify-content: center; gap: .35cm; }
  .id-card { box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* v2.8.0 invigilation and expandable traces */
.invigilation-session details { margin: 1rem 0; }
.invigilation-session summary, .attendance-trace summary { cursor: pointer; font-weight: 650; padding: .6rem 0; }
.invigilation-checks { display: flex; flex-wrap: wrap; gap: .75rem; padding: 1rem 0; }
.exception-accept { display: flex; gap: .6rem; padding: .7rem 0; align-items: start; }
.my-invigilation { background: #e1f4ec; }
.text-danger { color: #aa3030; }
.attendance-trace { margin: 1rem 0; }
.attendance-trace td { vertical-align: top; }
@media print { .invigilation-session { break-inside: avoid; } .invigilation-session .table-wrap { overflow: visible; } }
