/* Pembinaan Numerasi · desain */
:root {
  --brand: var(--brand-custom, #0E5A6B);
  --brand-600: color-mix(in srgb, var(--brand) 88%, #000);
  --brand-700: color-mix(in srgb, var(--brand) 72%, #000);
  --brand-50: color-mix(in srgb, var(--brand) 7%, #fff);
  --brand-100: color-mix(in srgb, var(--brand) 14%, #fff);
  --brand-200: color-mix(in srgb, var(--brand) 28%, #fff);
  --bg: #F4F6F7; --surface: #fff; --surface-2: #F8FAFA; --line: #E3E8EA; --line-2: #D3DADD;
  --text: #14242B; --text-2: #4A5C65; --muted: #6B7C85;
  --ok: #1F8A5B; --ok-bg: #E4F4EC; --warn: #B7791F; --warn-bg: #FBF0DA; --bad: #C23B3B; --bad-bg: #FBE7E7; --info: #2563A8; --info-bg: #E3EEFA;
  --h: #2FA36B; --s: #E5B030; --i: #4A8BD6; --a: #D8514B; --n: #DCE3E6;
  --side: #0D2A33; --side-2: #123642; --side-text: #BCD0D6;
  --r: 12px; --r-sm: 8px; --shadow: 0 1px 2px rgba(16,36,43,.05), 0 4px 14px rgba(16,36,43,.05);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C171C; --surface: #12232A; --surface-2: #162B33; --line: #20373F; --line-2: #2C4750;
    --text: #E6EEF1; --text-2: #A9BDC4; --muted: #8196A0;
    --brand-50: color-mix(in srgb, var(--brand) 16%, #12232A); --brand-100: color-mix(in srgb, var(--brand) 26%, #12232A); --brand-200: color-mix(in srgb, var(--brand) 40%, #12232A);
    --ok-bg: #12352A; --warn-bg: #3A2E12; --bad-bg: #3B1B1D; --info-bg: #12304D; --n: #2A414A;
    --ok: #4CC38A; --warn: #E3B04B; --bad: #EE7A7A; --info: #6FA8E8; --side: #081A20; --side-2: #0F2830;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); background: var(--bg); }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; } h3 { font-size: 1rem; }
a { color: var(--brand-600); text-decoration: none; } a:hover { text-decoration: underline; }
small, .small { font-size: .84rem; } .muted { color: var(--muted); } .center { text-align: center; } .nowrap { white-space: nowrap; }
code { font: .85em ui-monospace, Menlo, monospace; background: var(--surface-2); padding: .1em .4em; border-radius: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 99; } .skip:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.ic { flex: none; vertical-align: -.2em; }
.hp { position: absolute; left: -9999px; }
.print-only { display: none; }

/* Layout */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px; }
.brand { display: flex; gap: 12px; align-items: center; color: #fff; padding: 4px 6px 18px; } .brand:hover { text-decoration: none; }
.brand-text { display: grid; line-height: 1.25; min-width: 0; } .brand-text strong { font-size: .92rem; } .brand-text small { color: var(--side-text); font-size: .76rem; opacity: .85; }
.logo { border-radius: 10px; object-fit: contain; background: #fff; flex: none; }
.logo-fb { display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: .95rem; letter-spacing: .02em; border: 1px solid rgba(255,255,255,.18); }
.nav { display: grid; gap: 3px; align-content: start; flex: 1; }
.nav a, .side-foot a, .side-foot button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-text); font: inherit; font-weight: 500; background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.nav a:hover, .side-foot a:hover, .side-foot button:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav a.on, .side-foot a.on { background: var(--brand); color: #fff; font-weight: 700; }
.nav-sep { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #6F8E98; padding: 16px 12px 6px; }
.pill-n { margin-left: auto; background: var(--s); color: #3a2a00; font-style: normal; font-weight: 800; font-size: .75rem; padding: 1px 8px; border-radius: 99px; }
.side-foot { border-top: 1px solid rgba(255,255,255,.1); margin-top: 12px; padding-top: 10px; display: grid; gap: 2px; } .side-foot form { margin: 0; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); }
.spacer { flex: 1; }
.content { padding: 26px 28px 80px; width: 100%; max-width: 1180px; margin: 0 auto; } .content.narrow { max-width: 760px; }
.menu-btn, .scrim { display: none; }
.icon-btn { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--text); cursor: pointer; }
.userchip { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); } .userchip:hover { text-decoration: none; border-color: var(--line-2); }
.uc-text { display: grid; line-height: 1.2; } .uc-text strong { font-size: .84rem; } .uc-text small { color: var(--muted); font-size: .72rem; }
.seg-tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg-tabs a { padding: 7px 16px; border-radius: 9px; color: var(--text-2); font-weight: 600; display: grid; line-height: 1.15; text-align: center; } .seg-tabs a:hover { text-decoration: none; background: var(--surface-2); }
.seg-tabs a.on { background: var(--brand); color: #fff; } .seg-tabs small { font-size: .66rem; font-weight: 500; opacity: .8; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); display: inline-grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: .72rem; } .avatar.xl { width: 72px; height: 72px; font-size: 1.4rem; }

/* Page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.65rem; font-weight: 800; }
.sub { color: var(--text-2); margin: 4px 0 0; }
.actions, .row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .row-actions form { margin: 0; }
.back { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 12px; color: var(--text-2); font-weight: 600; font-size: .9rem; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel > h2 { margin-bottom: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel:not(.flush) > .panel-head { margin: -20px -20px 14px; }
.pad { padding: 16px 20px; } .pad-x { padding-left: 20px; padding-right: 20px; } .pad-b { padding-bottom: 20px; }
.stack { display: grid; gap: 16px; } .stack > * { margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; } .two-col > .panel { margin-bottom: 0; } .two-col { margin-bottom: 18px; }
.fold { padding: 0; } .fold > summary { padding: 15px 20px; cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 10px; color: var(--brand-700); } .fold > summary::-webkit-details-marker { display: none; }
.fold[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.fold .danger-zone { margin: 0 20px 20px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.kpi { padding: 18px 20px; display: grid; gap: 2px; border-right: 1px solid var(--line); } .kpi:last-child { border-right: 0; }
.k-label { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.k-val { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; } .k-val small { font-size: 1rem; color: var(--muted); font-weight: 600; } .k-val b { font-weight: 800; }
.k-sub { font-size: .82rem; color: var(--text-2); }
.t-ok { color: var(--ok); } .t-warn { color: var(--warn); } .t-bad { color: var(--bad); } .t-none { color: var(--muted); }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2; min-height: 40px; }
.btn:hover { background: var(--surface-2); text-decoration: none; } .btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn-primary:hover { background: var(--brand-600); }
.btn-sm { padding: 6px 12px; min-height: 34px; font-size: .86rem; border-radius: 9px; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; } .btn-danger:hover { background: color-mix(in srgb, var(--bad) 88%, #000); }
.btn-danger-ghost, .btn-ghost-danger { color: var(--bad); border-color: transparent; background: transparent; } .btn-danger-ghost:hover, .btn-ghost-danger:hover { background: var(--bad-bg); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-block { width: 100%; justify-content: flex-start; }
.btn[disabled], .is-busy { opacity: .6; pointer-events: none; }
.field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label, .field > legend { font-weight: 600; font-size: .9rem; padding: 0; } .opt { color: var(--muted); font-weight: 400; font-size: .8rem; margin-left: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .field-row.three { grid-template-columns: repeat(3, 1fr); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]), select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; min-height: 42px; }
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent); border-color: var(--brand); }
input[readonly] { background: var(--surface-2); }
input[type=file] { font: inherit; font-size: .9rem; } .color-in { width: 64px; height: 42px; padding: 3px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.hint { color: var(--muted); font-size: .8rem; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; } .check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.checks { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.inline, .inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; } .inline select { width: auto; min-height: 34px; padding: 5px 10px; }
.inline-form { padding: 14px 20px; width: 100%; } .inline-form input { flex: 1; min-width: 160px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; } .toolbar select { width: auto; min-width: 170px; }
.search { position: relative; flex: 1; min-width: 200px; } .search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); } .search input { padding-left: 40px; }
.pass-wrap { position: relative; } .pass-wrap input { padding-right: 46px; } .pass-toggle { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; }
.score-in { text-align: right; max-width: 120px; margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px dashed color-mix(in srgb, var(--bad) 45%, var(--line)); border-radius: var(--r); padding: 14px 18px; margin: 0 0 18px; background: color-mix(in srgb, var(--bad) 4%, var(--surface)); } .danger-zone p { margin: 2px 0 0; }
.sticky-save { position: sticky; bottom: 0; padding: 12px 20px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line); z-index: 5; display: flex; justify-content: flex-end; }
form > .sticky-save { margin-top: 0; }
.panel.flush .sticky-save { }
.pager { display: flex; gap: 8px; justify-content: center; margin: 14px 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td, .tbl tbody th { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; } .tbl tbody tr:hover { background: var(--surface-2); }
.tbl td small { display: block; color: var(--muted); font-size: .8rem; }
.tbl .num, .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl.compact td { padding: 8px 16px; }
[data-href] { cursor: pointer; }
.row-today { box-shadow: inset 3px 0 0 var(--s); }
.tbl tfoot th, .tbl tfoot td { background: var(--surface-2); border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 12px; color: var(--text); } .who:hover { text-decoration: none; } .who strong { display: block; } .who small { color: var(--muted); }

/* Badges, bars, chips */
.badge { display: inline-block; font-size: .76rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.b-ok { background: var(--ok-bg); color: var(--ok); } .b-warn { background: var(--warn-bg); color: var(--warn); } .b-bad { background: var(--bad-bg); color: var(--bad); } .b-info { background: var(--info-bg); color: var(--info); } .b-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pbar { display: inline-block; width: 74px; height: 8px; background: var(--n); border-radius: 99px; overflow: hidden; vertical-align: middle; margin-right: 8px; } .pbar i { display: block; height: 100%; border-radius: 99px; }
.pbar i.t-ok { background: var(--h); } .pbar i.t-warn { background: var(--s); } .pbar i.t-bad { background: var(--a); }
.pnum { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .88rem; }
.count { background: var(--brand); color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 7px; margin-left: 4px; font-weight: 800; }
.chip { display: inline-block; font-size: .78rem; font-weight: 700; padding: 1px 9px; border-radius: 99px; }
.chip.s-H { background: var(--ok-bg); color: var(--ok); } .chip.s-S { background: var(--warn-bg); color: var(--warn); } .chip.s-I { background: var(--info-bg); color: var(--info); } .chip.s-A { background: var(--bad-bg); color: var(--bad); }
.chips { list-style: none; margin: 0; padding: 0 20px 14px; display: flex; gap: 6px; flex-wrap: wrap; } .chips li { background: var(--surface-2); border: 1px solid var(--line); padding: 3px 10px; border-radius: 99px; font-size: .84rem; }

/* Jejak kehadiran */
.strip { display: inline-flex; gap: 3px; flex-wrap: wrap; vertical-align: middle; }
.sq { width: 12px; height: 12px; border-radius: 3px; background: var(--n); display: inline-block; font-style: normal; }
.strip-sm .sq { width: 8px; height: 8px; border-radius: 2px; } .strip-lg .sq { width: 14px; height: 14px; border-radius: 4px; }
.sq.s-H { background: var(--h); } .sq.s-S { background: var(--s); } .sq.s-I { background: var(--i); } .sq.s-A { background: var(--a); } .sq.s-0 { background: var(--n); }
.legend, .legend-line { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: .82rem; color: var(--text-2); } .legend span { display: inline-flex; gap: 6px; align-items: center; } .legend-line { margin-bottom: 10px; }

/* Alerts & empty */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 16px; border: 1px solid; }
.a-success { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); } .a-error, .a-bad { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.a-warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); } .a-info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.alert a { font-weight: 700; text-decoration: underline; } .alert span { color: var(--text); }
.empty { text-align: center; padding: 48px 20px; } .empty h3 { font-size: 1.1rem; } .empty p { color: var(--text-2); max-width: 420px; margin: 6px auto 16px; } .empty .actions { justify-content: center; }
.empty-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; } .list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); } .list li:last-child { border-bottom: 0; }
.li-main { display: flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; } .li-main:hover { text-decoration: none; } .li-main small { display: block; color: var(--muted); } .li-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.datebox { width: 44px; height: 46px; border-radius: 10px; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; text-align: center; line-height: 1; flex: none; } .datebox b { font-size: 1.1rem; } .datebox i { font-style: normal; font-size: .7rem; text-transform: uppercase; font-weight: 700; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; padding: 4px 20px 20px; }
.group-card { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); color: var(--text); background: var(--surface-2); } .group-card:hover { text-decoration: none; border-color: var(--brand-200); background: var(--brand-50); }
.gc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 0; } .facts dt { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; } .facts dd { margin: 2px 0 0; font-weight: 600; }
.linklist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; } .linklist a { display: inline-flex; gap: 8px; align-items: center; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 16px; color: var(--text-2); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; margin-bottom: -1px; } .tabs a:hover { text-decoration: none; color: var(--text); } .tabs a.on { color: var(--brand-700); border-bottom-color: var(--brand); }
.prose h2 { margin: 22px 0 8px; } .prose h2:first-child { margin-top: 0; } .prose li { margin: 4px 0; } .steps-text { padding-left: 20px; margin: 0; display: grid; gap: 4px; }

/* Siswa */
.student-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; } .student-head h1 { font-size: 1.6rem; } .sh-main { flex: 1; min-width: 200px; } .sh-main p { margin: 4px 0; }
.chart-box { padding: 6px 20px 0; } .chart { width: 100%; height: auto; max-height: 280px; }
.chart .grid { stroke: var(--line); stroke-width: 1; } .chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; } .chart .line.c1 { stroke: var(--brand); } .chart .line.c2 { stroke: var(--muted); } .chart .line.dash { stroke-dasharray: 5 5; stroke-width: 2; }
.chart .dot.c1 { fill: var(--surface); stroke: var(--brand); stroke-width: 2.4; } .chart .dot.c2 { fill: var(--muted); }
.sign-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; text-align: center; } .sign .line, .sign-row .line { display: block; border-bottom: 1px solid #000; height: 70px; margin: 0 20px 4px; }

/* Kehadiran */
.att-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .att-summary { font-size: .84rem; color: var(--text-2); font-weight: 600; }
.att-list { list-style: none; margin: 0; padding: 0; }
.att-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) auto minmax(120px, 1fr); gap: 14px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--line); } .att-row:last-child { border-bottom: 0; }
.att-who { display: flex; gap: 12px; align-items: center; min-width: 0; } .att-who small { display: block; color: var(--muted); }
.att-note { min-height: 36px !important; padding: 6px 10px !important; font-size: .88rem; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg-opt { position: relative; cursor: pointer; } .seg-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-opt span { display: grid; place-items: center; min-width: 44px; padding: 5px 8px; border-radius: 8px; line-height: 1.1; color: var(--text-2); transition: background .12s; }
.seg-opt b { font-size: .92rem; } .seg-opt i { font-style: normal; font-size: .62rem; font-weight: 600; opacity: .8; }
.seg-opt:hover span { background: var(--line); }
.seg-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.seg-opt.s-H input:checked + span { background: var(--h); color: #fff; } .seg-opt.s-S input:checked + span { background: var(--s); color: #3a2a00; } .seg-opt.s-I input:checked + span { background: var(--i); color: #fff; } .seg-opt.s-A input:checked + span { background: var(--a); color: #fff; }
.matrix-wrap { max-height: 72vh; }
.matrix th.mcol { text-align: center; padding: 8px 4px; min-width: 38px; } .matrix .mcol a { display: grid; line-height: 1.1; color: inherit; } .matrix .mcol span { font-size: .95rem; color: var(--text); } .matrix .mcol small { font-size: .62rem; }
.matrix .mcell { text-align: center; padding: 6px 3px; } .matrix .chip { padding: 0; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 6px; } .dot0 { color: var(--line-2); }
.sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 2; min-width: 180px; box-shadow: 1px 0 0 var(--line); } thead .sticky-col { background: var(--surface-2); } .matrix tbody tr:hover .sticky-col { background: var(--surface-2); }

/* Pengguna, berkas */
.users { list-style: none; margin: 0; padding: 0; } .user-row { display: flex; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; } .user-row:last-child { border-bottom: 0; }
.user-main { flex: 1; min-width: 220px; } .user-main small { display: block; color: var(--text-2); } .user-main small.muted { color: var(--muted); }
.user-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pop { position: relative; } .pop > summary { list-style: none; cursor: pointer; } .pop > summary::-webkit-details-marker { display: none; }
.pop-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 260px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 14px; display: grid; gap: 12px; }
.files { list-style: none; margin: 0; padding: 0; } .file-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--line); } .file-row:last-child { border-bottom: 0; }
.file-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.file-name { min-width: 0; color: var(--text); } .file-name strong { display: block; overflow-wrap: anywhere; } .file-name small { color: var(--muted); } a.file-name:hover { text-decoration: none; }
.file-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; } .file-actions form { margin: 0; }
.upload-bar { display: flex; gap: 10px; align-items: center; padding: 12px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.crumbs { display: flex; gap: 8px; align-items: center; padding: 10px 20px; font-size: .88rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; } .crumbs span { color: var(--muted); }
.embed-wrap { padding: 0; } .embed { width: 100%; height: 70vh; min-height: 420px; border: 0; display: block; background: var(--surface-2); }
.logo-now { display: flex; gap: 16px; align-items: center; }
dialog.dialog { border: 0; border-radius: var(--r); padding: 0; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); max-width: 520px; width: calc(100% - 32px); }
dialog.dialog::backdrop { background: rgba(8,20,25,.6); }
.dialog-wide { max-width: 980px; height: 86vh; } .dialog-wide[open] { display: flex; flex-direction: column; } .dialog-wide iframe { flex: 1; width: 100%; border: 0; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); gap: 12px; }

/* Auth */
body.auth { background: var(--bg); }
.auth-wrap { display: grid; grid-template-columns: minmax(340px, 5fr) 6fr; min-height: 100vh; }
.auth-brand { background: linear-gradient(160deg, var(--side), color-mix(in srgb, var(--brand) 70%, #000)); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; position: relative; overflow: hidden; }
.ab-top { display: flex; gap: 14px; align-items: center; } .ab-school { font-weight: 800; } .ab-campus { opacity: .8; font-size: .9rem; }
.ab-mid h2 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; } .ab-mid p { color: #CFE0E5; max-width: 420px; }
.ab-strip { display: grid; gap: 6px; margin-top: 28px; opacity: .9; } .ab-foot { font-size: .82rem; opacity: .7; }
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px 20px; }
.auth-main > .alert { width: 100%; max-width: 420px; }
.auth-card { width: 100%; max-width: 420px; display: grid; gap: 16px; } .auth-card.wide { max-width: 560px; } .auth-card h1 { font-size: 1.6rem; font-weight: 800; }
.auth-alt { text-align: center; color: var(--text-2); margin: 0; }

/* Responsif */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: 280px; transform: translateX(-102%); transition: transform .2s; }
  .nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8,20,25,.5); z-index: 30; }
  .menu-btn { display: grid; } .topbar { padding: 10px 16px; } .content { padding: 18px 16px 90px; }
  .kpis { grid-template-columns: 1fr 1fr; } .kpi:nth-child(2) { border-right: 0; } .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .two-col { grid-template-columns: 1fr; } .hide-md { display: none; }
  .auth-wrap { grid-template-columns: 1fr; } .auth-brand { padding: 24px; } .ab-mid { display: none; } .ab-foot { display: none; }
}
@media (max-width: 640px) {
  .uc-text { display: none; } .userchip { padding: 3px; } .hide-sm { display: none; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .att-row { grid-template-columns: 1fr; gap: 8px; } .seg { width: 100%; } .seg-opt { flex: 1; } .seg-opt span { min-width: 0; }
  .page-head h1 { font-size: 1.4rem; } .k-val { font-size: 1.5rem; } .kpi { padding: 14px; }
  .file-row { grid-template-columns: 36px 1fr; } .file-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .danger-zone { flex-direction: column; align-items: flex-start; } .pop-body { right: auto; left: 0; }
  .seg-tabs a { padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Cetak */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .sidebar, .topbar, .scrim, .no-print, .back, .sticky-save, .alert { display: none !important; }
  .app { display: block; } .content { padding: 0; max-width: none; }
  .panel, .kpis { box-shadow: none; border-color: #bbb; break-inside: avoid; } .print-only { display: block; }
  .kop { border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 14px; } .kop-row { display: flex; gap: 14px; align-items: center; } .kop h2 { margin-top: 10px; font-size: 13pt; }
  .sq, .badge, .chip, .pbar i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: #000; }
}
