/* =====================================================================
   Staff surfaces (teacher, centre, admin, QA): dense data views that still
   feel like the student app: KPI strips, matrices, kanban-ish queues.
   ===================================================================== */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { padding: 18px 20px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.kpi .k { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.kpi .v { font: 800 30px/1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12.5px; color: var(--ink-3); }
.kpi .spark { position: absolute; right: 12px; bottom: 10px; opacity: .9; }
.kpi.tile-lilac { background: var(--lilac); color: var(--lilac-ink); border-color: transparent; }
.kpi.tile-lime { background: var(--lime); color: var(--lime-ink); border-color: transparent; }
.kpi.tile-sky { background: var(--sky); color: var(--sky-ink); border-color: transparent; }
.kpi.tile-peach { background: var(--peach); color: var(--peach-ink); border-color: transparent; }
.kpi[class*="tile-"] .k, .kpi[class*="tile-"] .s { color: inherit; opacity: .85; }

.matrix { overflow: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.matrix table { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.matrix th, .matrix td { padding: 8px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; white-space: nowrap; }
.matrix th:first-child, .matrix td:first-child { position: sticky; left: 0; background: var(--surface); text-align: left; z-index: 1; }
.matrix thead th { position: sticky; top: 0; background: var(--surface-2); font-size: 11.5px; font-weight: 700; color: var(--ink-2); z-index: 2; }
.matrix thead th:first-child { z-index: 3; }
.cellv { display: inline-grid; place-items: center; min-width: 38px; height: 28px; border-radius: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.att-present { background: var(--ok-tint); color: var(--ok); }
.att-partial { background: var(--warn-tint); color: var(--warn); }
.att-absent { background: var(--bad-tint); color: var(--bad); }
.att-excused { background: var(--info-tint); color: var(--info); }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item::before { content: ''; position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--ink-3); }
.tl-item.k-login::before, .tl-item.k-logout::before { border-color: var(--ink); background: var(--ink); }
.tl-item.k-quiz_submit::before, .tl-item.k-surprise_submit::before, .tl-item.k-certificate::before { border-color: var(--brand); background: var(--brand); }
.tl-item.k-page_view::before { border-color: var(--info); }
.tl-item .when { font: 600 12px/1 var(--font-ui); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-item .what { margin-top: 4px; font-weight: 550; }
.pagemap { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.pagemap div { aspect-ratio: 3 / 4; border-radius: 6px; display: grid; place-items: center; font: 700 12px/1 var(--font-display); color: var(--ink); }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; max-height: 380px; overflow: auto; padding: 2px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13.5px; }
.pick:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.pick input { width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.pick .code { font: 700 11px/1 var(--font-ui); color: var(--ink-3); letter-spacing: .06em; }
.stepper { display: flex; gap: 8px; margin-bottom: 18px; }
.stepper span { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); }
.stepper span.on { background: var(--ink); }
.qb-q { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.qb-q .opt-row { display: flex; align-items: center; gap: 10px; }
.qb-q .opt-row .input { min-height: 40px; }
.folder-tree { display: flex; flex-direction: column; gap: 2px; }
.folder-tree button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 14px; color: var(--ink-2); }
.folder-tree button:hover { background: var(--surface-2); color: var(--ink); }
.folder-tree button[aria-current="true"] { background: var(--ink); color: var(--bg); }
.folder-tree .kids { padding-left: 18px; }

/* ===== admin ===== */
/* Admin and QA pages (assets/js/pages/admin). Prefix adm- so nothing collides with other areas. */
a.adm-kpi-link { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .2s; }
a.adm-kpi-link:hover { border-color: var(--line-2); box-shadow: var(--sh-1); }
.adm-kpi .v { overflow-wrap: anywhere; }
.kpis.adm-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 680px) { .adm-kpi { padding: 14px; } .adm-kpi .v { font-size: 22px; } .kpis.adm-kpis-3 { grid-template-columns: 1fr; } }

.adm-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.adm-filter { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; min-width: 150px; max-width: 260px; }
.adm-filter > span { font-size: 12px; font-weight: 550; color: var(--ink-3); }
.page-head .actions .adm-filter { min-width: 220px; max-width: 320px; }
@media (max-width: 680px) { .adm-filter, .page-head .actions .adm-filter { max-width: none; min-width: 140px; } }
.adm-search { flex: 0 1 320px; min-width: 200px; }

.adm-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.adm-bad { color: var(--bad); }
.adm-warn { color: var(--warn); }
.adm-ok { color: var(--ok); display: inline-flex; align-items: center; gap: 4px; }
.adm-wrap { overflow-wrap: anywhere; word-break: break-word; }
.adm-li-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.adm-swatch { font-style: normal; }

.adm-dl { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13.5px; }
.adm-dl dt { color: var(--ink-3); }
.adm-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.adm-dl-inline { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); }
@media (max-width: 760px) { .adm-dl-inline { grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); } }
.adm-form-sec { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 2px; }
.adm-form-sec h3 { margin-bottom: 4px; }

.adm-cred { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.adm-cred-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; align-items: center; }
.adm-cred-row + .adm-cred-row { border-top: 1px solid var(--line); }
.adm-cred-row .eyebrow { grid-column: 1 / -1; }
.adm-cred-row code { font: 600 14.5px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.adm-cred-row code.adm-pass { font-size: 18px; letter-spacing: .04em; }

.adm-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.adm-doc { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12.5px; }
.adm-doc b { font-weight: 600; }
.adm-doc .thumb { aspect-ratio: 4 / 3; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--ink-2);
  display: grid; place-items: center; align-content: center; gap: 6px; overflow: hidden; text-decoration: none; font-size: 12px; cursor: pointer; transition: border-color .15s; }
.adm-doc .thumb:hover { border-color: var(--ink-3); }
.adm-doc .thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-doc.missing .thumb { border-style: dashed; color: var(--ink-3); cursor: default; }
.adm-preview { display: grid; place-items: center; background: var(--surface-2); border-radius: var(--r-lg); padding: 8px; }
.adm-preview img { max-width: 100%; max-height: 70dvh; object-fit: contain; }

.adm-review { display: flex; flex-direction: column; gap: 14px; }
.adm-review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.adm-review-head > div { min-width: 0; }
.adm-review-name { font-size: 16px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; }
a.adm-review-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.adm-review-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.adm-review-foot > .small { display: inline-flex; align-items: center; gap: 6px; }
.adm-amount { font-weight: 650; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.adm-res { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .adm-res { grid-template-columns: 1fr; } }
.adm-tree-card { position: sticky; top: calc(var(--topbar) + 8px); max-height: calc(100dvh - var(--topbar) - 24px); overflow: auto; padding: 14px; }
@media (max-width: 900px) { .adm-tree-card { position: static; max-height: 46dvh; } }
.adm-tree-card .card-head h3 { font-size: 13px; font-weight: 550; color: var(--ink-3); }
.folder-tree .adm-tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-tree .adm-tree-count { flex: none; min-width: 22px; padding: 1px 6px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 600; text-align: center; }
.folder-tree button[aria-current="true"] .adm-tree-count { background: color-mix(in srgb, var(--bg) 22%, transparent); color: inherit; }
.folder-tree button svg { flex: none; }
.adm-panel { min-height: 320px; }
.adm-panel-head { align-items: flex-start; }
.adm-crumbs .textlink { font-size: 12px; }
.adm-upload { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, 40%); gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); }

.adm-hue { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.adm-hue input[type="range"] { flex: 1 1 180px; accent-color: var(--ink); }

.adm-ann { display: flex; align-items: flex-start; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.adm-ann:last-child { border-bottom: 0; }
.adm-ann-text { flex: 1; min-width: 0; }
.adm-ann-text b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.adm-ann-text p { margin-top: 3px; color: var(--ink-2); font-size: 13.5px; white-space: pre-line; overflow-wrap: anywhere; }

.adm-inline-form { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.adm-inline-form .field { flex: 0 1 220px; }
.adm-inline-form .btn { margin-top: 25px; }

/* ===== centre ===== */
[data-cls][hidden], [data-hol][hidden], [data-rep][hidden] { display: none !important; }
.cg-scope { display: contents; }
.cg-kpi-link { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.cg-kpi-link:hover { border-color: var(--line-2); box-shadow: var(--sh-1); }
.cg-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cg-quick a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; font-size: 13.5px; font-weight: 550; color: var(--ink); transition: background .15s, border-color .15s; }
.cg-quick a:hover { background: var(--surface-2); border-color: var(--line-2); }
.cg-quick a svg { color: var(--ink-3); flex: none; }
.cg-feed .tl-item { padding-bottom: 12px; }
.cg-feed .what a { color: var(--ink); text-decoration: none; font-weight: 600; }
.cg-feed .what a:hover { text-decoration: underline; }
select.input.cg-filter { width: auto; min-width: 150px; max-width: 100%; }
.cg-nowrap { white-space: nowrap; }
.cg-quickfilter { max-width: 100%; }
.cg-check { width: 18px; height: 18px; accent-color: var(--ink); cursor: pointer; vertical-align: middle; }
.cg-bulkbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--ink); border-radius: var(--r-lg); background: var(--surface); font-size: 13.5px; }
.cg-errs { margin: 0; padding-left: 16px; color: var(--bad); }
.cg-errs li + li { margin-top: 2px; }
.cg-cred { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); }
.cg-cred code { font: 600 15px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; letter-spacing: .02em; }
@media (max-width: 560px) { .cg-cred { grid-template-columns: 1fr auto; } .cg-cred > span { grid-column: 1 / -1; } }
code[data-pw] { font: 600 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* student header + detail */
.cg-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 14px; }
.cg-photo { width: 76px; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; flex: none; }
.cg-photo img { width: 100%; height: 100%; object-fit: cover; }
.cg-hero-main { flex: 1; min-width: 220px; }
.cg-hero-main h1 { margin-top: 4px; overflow-wrap: anywhere; }
.cg-hero-actions { flex: 0 1 auto; max-width: 100%; }
.cg-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 20px; margin: 0; }
.cg-dl > div { min-width: 0; }
.cg-dl dt { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.cg-dl dd { margin: 3px 0 0; font-size: 14px; font-weight: 550; overflow-wrap: anywhere; }
.cg-docic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; border: 1px solid var(--line); }
.cg-docic.missing { background: var(--bad-tint); color: var(--bad); border-color: transparent; }
.cg-days { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; }
.cg-days button { border: 0; cursor: pointer; width: 100%; min-width: 0; height: 48px; display: grid; align-content: center; gap: 1px; line-height: 1.1; }
@media (max-width: 680px) { .cg-days { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

/* ID cards: CR80 size (85.6 x 54 mm) */
.idcards { display: grid; grid-template-columns: repeat(auto-fill, 85.6mm); gap: 6mm; justify-content: start; }
.idcards.single { grid-template-columns: 85.6mm; }
.idcard { width: 85.6mm; height: 54mm; border: 1px solid var(--line-2); border-radius: 3mm; background: #fff; color: #16161C; display: flex; flex-direction: column; overflow: hidden; position: relative; break-inside: avoid; page-break-inside: avoid; }
.idcard::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1.2mm; background: var(--brand-2); }
.idc-top { display: flex; align-items: center; gap: 2.4mm; padding: 3mm 3.4mm 1.6mm; border-bottom: .25mm solid #E7E7E2; }
.idc-cg { width: 8mm; height: 8mm; object-fit: contain; flex: none; }
.idc-logo { height: 7mm; max-width: 16mm; object-fit: contain; margin-left: auto; flex: none; }
.idc-centre { min-width: 0; line-height: 1.15; }
.idc-centre b { display: block; font-size: 2.9mm; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idc-centre span { font-size: 2.2mm; color: #55555C; }
.idc-body { display: flex; gap: 3mm; padding: 2.4mm 3.4mm; flex: 1; min-height: 0; }
.idc-photo { width: 19mm; height: 24mm; border-radius: 1.5mm; overflow: hidden; background: #F3F3F0; border: .25mm solid #D8D8D2; display: grid; place-items: center; flex: none; }
.idc-photo img { width: 100%; height: 100%; object-fit: cover; }
.idc-photo span { font: 700 6mm/1 var(--font-ui); color: #85858C; }
.idc-info { min-width: 0; flex: 1; }
.idc-kicker { display: block; font-size: 1.9mm; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #85858C; }
.idc-name { display: block; font-size: 3.8mm; font-weight: 700; line-height: 1.15; margin-top: .6mm; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.idc-info dl { display: grid; grid-template-columns: auto 1fr; gap: .5mm 2mm; margin: 1.4mm 0 0; font-size: 2.35mm; }
.idc-info dt { color: #85858C; }
.idc-info dd { margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idc-foot { display: flex; justify-content: space-between; gap: 2mm; padding: 1.4mm 3.4mm; background: #F3F3F0; font-size: 2.1mm; color: #55555C; font-weight: 600; }

/* coverage + results matrices */
.cg-cov td.cg-cell { padding: 0; width: 42px; height: 34px; }
.cg-cov td.cg-cell.ok { background: var(--ok-tint); color: var(--ok); }
.cg-cov td.cg-cell.bad { background: var(--bad-tint); color: var(--bad); }
.cg-cov td.cg-cell.none { background: var(--surface-2); }
.cg-cov td.cg-cell svg { margin: 0 auto; }
.cg-cov th.cg-uncov { color: var(--bad); }
.cg-results td { vertical-align: top; }
.cg-results .cg-mark { width: 66px; min-height: 32px; padding: 4px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.cg-results .cg-mark[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-tint); }
.cg-results td.cg-dirty .cg-mark { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cg-grade { display: block; margin-top: 3px; min-height: 15px; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.cg-grade.ok { color: var(--ok); } .cg-grade.info { color: var(--info); } .cg-grade.bad { color: var(--bad); }
.cg-results td.cg-na { color: var(--ink-3); background: var(--surface-2); vertical-align: middle; }
.cg-cohort-card { text-decoration: none; color: inherit; display: block; }

/* printable sheets (result sheet, invoice) */
.cg-sheet { max-width: 210mm; margin: 0 auto; background: #fff; color: #16161C; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 14mm 14mm 10mm; }
.cg-sheet-head { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 2px solid #16161C; }
.cg-sheet-head > img:first-child { width: 48px; height: 48px; object-fit: contain; }
.cg-sheet-head div { line-height: 1.35; min-width: 0; }
.cg-sheet-head b { display: block; font-size: 16px; }
.cg-sheet-head span { display: block; font-size: 12px; color: #55555C; }
.cg-sheet-logo { height: 46px; max-width: 120px; object-fit: contain; margin-left: auto; }
.cg-sheet-title { font-size: 20px; margin: 20px 0 14px; }
.cg-sheet .cg-dl dt { color: #85858C; } .cg-sheet .cg-dl dd { color: #16161C; }
.cg-sheet-group { margin-top: 22px; }
.cg-sheet-group h3 { font-size: 14px; margin-bottom: 8px; }
.cg-sheet-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.cg-sheet-table th { text-align: left; font-size: 11.5px; font-weight: 600; color: #55555C; border-bottom: 1px solid #16161C; padding: 7px 8px; }
.cg-sheet-table td { padding: 7px 8px; border-bottom: 1px solid #E7E7E2; }
.cg-sheet-table tfoot td { border-bottom: 0; border-top: 1px solid #16161C; font-weight: 600; }
.cg-sheet-key { margin-top: 16px; font-size: 11.5px; color: #55555C; }
.cg-sheet-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding-top: 10px; border-top: 1px solid #E7E7E2; font-size: 11px; color: #85858C; }
.cg-billto { display: flex; flex-direction: column; gap: 2px; font-size: 13px; text-align: right; }
.cg-billto b { font-size: 15px; }
.cg-paystate { margin-top: 18px; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 13.5px; background: #F3F3F0; }
.cg-paystate.paid { background: #E6F4EC; color: #157F4F; }
.cg-paystate.overdue { background: #FCECEA; color: #B42318; }
@media (max-width: 680px) { .cg-sheet { padding: 18px 14px; } .cg-billto { text-align: left; } }

/* resources */
.cg-files { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.cg-tree { position: sticky; top: calc(var(--topbar) + 12px); max-height: calc(100dvh - var(--topbar) - 40px); overflow: auto; padding: 14px; }
.cg-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; color: var(--ink-3); }
.cg-crumbs b { color: var(--ink); }
@media (max-width: 860px) { .cg-files { grid-template-columns: 1fr; } .cg-tree { position: static; max-height: 360px; } }
@media (max-width: 560px) { .cg-hide-sm { display: none; } }

/* calendar */
.cg-calbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.cg-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; background: var(--line); gap: 1px; }
.cg-wd { background: var(--surface-2); padding: 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); text-align: center; }
.cg-day { background: var(--surface); min-height: 108px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cg-day.off { background: var(--surface-2); }
.cg-day.weekend { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.cg-dnum { align-self: flex-start; min-width: 28px; height: 28px; border-radius: 7px; border: 0; background: none; font-weight: 600; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cg-dnum:hover { background: var(--surface-2); color: var(--ink); }
.cg-day.today .cg-dnum { background: var(--ink); color: var(--bg); }
.cg-ev { display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 3px 6px; font-size: 11.5px; line-height: 1.3; background: var(--surface-3); color: var(--ink); min-height: 24px; }
.cg-ev span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-ev.holiday { background: var(--warn-tint); color: var(--warn); font-weight: 600; }
.cg-ev:hover { outline: 1px solid var(--ink-3); }
.cg-more { border: 0; background: none; font-size: 11.5px; color: var(--ink-3); text-align: left; padding: 2px 4px; min-height: 24px; }
.cg-dots { display: none; gap: 3px; }
.cg-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.cg-dots i.holiday { background: var(--warn); }
@media (max-width: 680px) {
  .cg-day { min-height: 58px; padding: 4px; align-items: center; }
  .cg-ev, .cg-more { display: none; }
  .cg-dots { display: flex; }
  .cg-wd { padding: 6px 2px; font-size: 11px; }
}

/* profile */
.cg-logo-box { height: 120px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); display: grid; place-items: center; background: #fff; padding: 12px; }
.cg-logo-box img { max-height: 96px; max-width: 100%; object-fit: contain; }

@media print {
  .cg-sheet { border: 0; border-radius: 0; padding: 0; max-width: none; }
  .idcards { gap: 5mm; }
  .idcard { border-color: #BDBDB6; }
  .cg-scope .page { padding: 0 !important; }
}
.adm-drop { display: block; margin-top: 12px; }
.adm-chart-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.adm-chart-stats b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.adm-chart-stats span { font-size: 12px; color: var(--ink-3); }
@media (max-width: 680px) {
  .kpis.adm-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .kpis.adm-kpis-3 .kpi { padding: 12px; gap: 4px; }
  .kpis.adm-kpis-3 .kpi .k { font-size: 12px; }
  .kpis.adm-kpis-3 .kpi .k svg, .kpis.adm-kpis-3 .kpi .s { display: none; }
  .adm-chart-stats b { font-size: 17px; }
}
.adm-table table.t { min-width: 760px; }
.adm-table .adm-mono { white-space: nowrap; }
.cg-cov { position: relative; }
@media (max-width: 560px) { .cg-sheet-table { font-size: 12px; } .cg-sheet-table th, .cg-sheet-table td { padding: 6px 4px; } .cg-sheet { overflow-x: auto; } }
