/* ============================================================
   PAJSK - Tema: Putih + Biru + Emas + Colourful
   ============================================================ */
:root {
  --blue: #1e7bff; --blue-d: #0b3a8c; --blue-dd: #072a68; --blue-l: #e8f1ff;
  --gold: #e0a100; --gold-l: #fff4cf; --gold-g: linear-gradient(135deg, #ffe38a, #e0a100);
  --green: #22b455; --pink: #f0457a; --purple: #7e3ff2; --orange: #fb8c2a; --teal: #14b8c4;
  --ink: #17233c; --muted: #6b7a93; --line: #e3e9f3; --bg: #f5f8fd; --white: #fff;
  --radius: 14px; --shadow: 0 4px 18px rgba(16, 52, 120, .09);
  --side: 262px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif; font-size: 13.5px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
code { background: var(--blue-l); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
h1, h2, h3, h4 { margin: 0; }
.muted { color: var(--muted); } .small { font-size: 12px; } .num { text-align: right; } .c { text-align: center; }
.warn-text { color: #c77700; font-weight: 500; }
.gold-text { color: var(--gold); }
[hidden] { display: none !important; }
.boot { padding: 60px; text-align: center; color: var(--blue-d); font-size: 16px; }

/* ---------- Susun atur ---------- */
#app { display: flex; min-height: 100vh; }
#sidebar { width: var(--side); flex: 0 0 var(--side); background: linear-gradient(180deg, #0a3d9f 0%, #1559c9 55%, #0d4aad 100%); color: #fff; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; overflow-y: auto; z-index: 30; }
#sidebar::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(160deg, transparent 40%, rgba(255, 215, 90, .0) 41%, #ffd45a 42%, #e0a100 48%, transparent 49%, transparent 52%, rgba(255, 215, 90, .5) 53%, transparent 56%); opacity: .85; pointer-events: none; }
.main { margin-left: var(--side); flex: 1; min-width: 0; display: flex; flex-direction: column; }
#view { padding: 18px 22px 40px; flex: 1; }
#scrim { display: none; }

.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; }
.brand-text b { font-size: 30px; font-weight: 800; letter-spacing: .5px; line-height: 1; display: block; font-style: italic; }
.brand-text span { font-size: 11px; line-height: 1.2; opacity: .92; display: block; margin-top: 2px; }
.menu { padding: 6px 10px 120px; display: flex; flex-direction: column; gap: 3px; position: relative; z-index: 1; }
.m-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border-radius: 10px; color: #fff; text-decoration: none; background: none; border: 0; font: inherit; font-weight: 500; font-size: 13px; cursor: pointer; text-align: left; }
.m-item i:first-child { font-size: 17px; width: 20px; text-align: center; }
.m-item:hover { background: rgba(255, 255, 255, .13); }
.m-item.active { background: var(--gold-g); color: #3a2b00; font-weight: 700; box-shadow: 0 3px 10px rgba(0, 0, 0, .2); }
.m-item .caret { margin-left: auto; font-size: 11px; transition: transform .2s; }
.m-group.open > .m-toggle .caret { transform: rotate(180deg); }
.m-sub { display: none; padding: 2px 0 4px 18px; }
.m-group.open > .m-sub { display: block; }
.m-subitem { display: flex; align-items: center; gap: 10px; padding: 6px 12px; color: #dce9ff; text-decoration: none; font-size: 12.5px; border-radius: 8px; }
.m-subitem .dot { width: 5px; height: 5px; border-radius: 50%; background: #ffd45a; }
.m-subitem:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.m-subitem.active { color: #ffe38a; font-weight: 600; }
.side-foot { position: relative; z-index: 1; margin-top: auto; padding: 10px 16px 16px; font-size: 10.5px; color: #cfe0ff; display: flex; gap: 6px; align-items: center; }

/* ---------- Bar atas ---------- */
#topbar { display: flex; align-items: center; gap: 14px; padding: 12px 22px 12px 54px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; min-height: 72px; overflow: hidden; }
#topbar::before { content: ''; position: absolute; left: -30px; top: -10px; width: 90px; height: 120px; background: linear-gradient(115deg, #0b3a8c 0 34%, #ffd45a 34% 52%, #fff 52% 58%, #1e7bff 58% 70%, transparent 70%); transform: skewX(-10deg); opacity: .95; }
.tb-title { flex: 1; min-width: 0; position: relative; }
.tb-title h1 { font-size: 19px; font-weight: 700; color: var(--blue-dd); line-height: 1.25; }
.tb-title h1 em { font-style: italic; }
.crumb { font-size: 12.5px; font-weight: 600; color: var(--blue-d); margin-top: 3px; }
.crumb i { color: var(--teal); font-size: 9px; vertical-align: 1px; }
.tb-right { display: flex; align-items: center; gap: 14px; position: relative; }
.tb-field { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12px; color: var(--blue-dd); }
.tb-field select { min-width: 120px; }
.tb-school { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--blue-l); border-radius: 12px; max-width: 280px; }
.tb-school i { font-size: 20px; color: var(--blue); }
.tb-school b { display: block; font-size: 12px; color: var(--blue-dd); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.tb-school small { display: block; font-size: 10.5px; color: var(--muted); }

/* ---------- Butang & input ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .15s, filter .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, #2f8bff, #0b4fc7); color: #fff; box-shadow: 0 3px 10px rgba(30, 123, 255, .35); }
.btn.gold { background: var(--gold-g); color: #3a2b00; box-shadow: 0 3px 10px rgba(224, 161, 0, .35); }
.btn.danger { background: linear-gradient(135deg, #ff6a8e, #e0245e); color: #fff; box-shadow: 0 3px 10px rgba(224, 36, 94, .3); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--blue-d); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--blue-l); color: var(--blue-d); cursor: pointer; font-size: 15px; }
.icon-btn:hover { background: #d3e5ff; }
.icon-btn.danger { background: #ffe6ee; color: #d81b60; } .icon-btn.danger:hover { background: #ffd0de; }
.only-mobile { display: none; position: relative; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.acts { display: flex; gap: 6px; justify-content: flex-end; }

input, select, textarea { font: inherit; color: var(--ink); border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; outline: none; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 123, 255, .15); }
input:disabled, select:disabled { background: #f1f4f9; color: var(--muted); }
input.mini { width: 74px; text-align: center; padding: 5px 6px; font-weight: 600; }
.sel { width: auto; min-width: 190px; }
#sesiSel { width: auto; font-weight: 600; background: #fff; }
label.chk { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
label.chk input { width: auto; margin-top: 3px; }

/* ---------- Kad & tajuk halaman ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h2 { font-size: 21px; color: var(--blue-dd); font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 920px; font-size: 12.5px; line-height: 1.5; }
.head-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; border: 1px solid #edf1f8; }
.card-title { font-size: 14px; color: var(--blue-d); margin-bottom: 8px; }
.card-title i { color: var(--gold); }
.card.controls { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.controls label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 12px; color: var(--blue-dd); min-width: 200px; }
.info-card .formula { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 20px; font-weight: 600; font-size: 12px; }
.chip.blue { background: #e1eeff; color: #0b4fc7; } .chip.purple { background: #efe5ff; color: #5b21c9; } .chip.gold { background: var(--gold-l); color: #8a6200; } .chip.green { background: #dcf7e5; color: #12803a; }
.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-state i { font-size: 46px; color: #b9cdf2; }
.empty-state h3 { color: var(--blue-d); margin: 8px 0 4px; }
.empty-state p { margin: 0 0 14px; }

/* ---------- Statistik ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); border-left: 5px solid var(--c, var(--blue)); }
.stat i { font-size: 28px; color: var(--c, var(--blue)); }
.stat small { display: block; color: var(--muted); font-weight: 500; }
.stat b { font-size: 24px; line-height: 1.1; } .stat b em { font-size: 13px; font-weight: 500; color: var(--muted); font-style: normal; }
.stat.blue { --c: var(--blue); } .stat.green { --c: var(--green); } .stat.gold { --c: var(--gold); } .stat.purple { --c: var(--purple); }

/* ---------- Dashboard ---------- */
.filter-bar { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12.5px; color: var(--blue-dd); }
.filter-bar select { width: auto; min-width: 190px; border-radius: 10px; }
.kpi-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { display: flex; gap: 10px; align-items: center; padding: 14px 12px; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .8); min-width: 0; }
.kpi-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 23px; flex: 0 0 44px; background: rgba(255, 255, 255, .75); color: var(--kc); }
.kpi-tx { min-width: 0; }
.kpi-tx small { display: block; font-size: 11px; font-weight: 600; color: #38486a; line-height: 1.2; }
.kpi-tx b { display: block; font-size: 22px; line-height: 1.2; color: var(--ink); } .kpi-tx b span { font-size: 12px; font-weight: 500; color: var(--muted); }
.kpi-tx em { font-size: 11px; color: var(--muted); font-style: normal; }
.k-blue { --kc: #1e7bff; background: linear-gradient(135deg, #dcecff, #f1f7ff); }
.k-purple { --kc: #7e3ff2; background: linear-gradient(135deg, #e9dcff, #f6f0ff); }
.k-gold { --kc: #e0a100; background: linear-gradient(135deg, #ffecc2, #fff8e4); }
.k-pink { --kc: #f0457a; background: linear-gradient(135deg, #ffd9e5, #fff0f5); }
.k-green { --kc: #1aa34a; background: linear-gradient(135deg, #cdf5dc, #eefbf3); }
.k-violet { --kc: #6a4cf0; background: linear-gradient(135deg, #e0dcff, #f3f1ff); }
.k-amber { --kc: #f08a00; background: linear-gradient(135deg, #ffe3b8, #fff5e2); }

div.grid { display: grid; gap: 14px; margin-bottom: 14px; }
.g-komp { grid-template-columns: 1.05fr 1.2fr 1.25fr; }
.g-four { grid-template-columns: 1.1fr 1.7fr .9fr 1.1fr; }
.g-three { grid-template-columns: 1.2fr 1fr 1.1fr; }
.g-two { grid-template-columns: 1fr 1fr; }
.span2 { grid-column: 1 / -1; }
.panel { background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid #edf1f8; min-width: 0; }
.panel > header { background: linear-gradient(90deg, #0b3a8c, #1559c9); color: #fff; padding: 9px 14px; font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.panel > header small { font-weight: 400; opacity: .9; }
.panel.gold-panel > header { background: linear-gradient(90deg, #b57e00, #e0a100); color: #2f2300; }
.panel-body { padding: 14px; }
.chart-box { position: relative; width: 100%; }
.chart-fail { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; padding: 10px; }
.donut-row { display: flex; align-items: center; gap: 12px; }
.donut-wrap { position: relative; width: 190px; flex: 0 0 190px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; line-height: 1.1; }
.donut-center b { font-size: 22px; color: var(--blue-dd); } .donut-center small { font-size: 10px; color: var(--muted); }
.legend-list { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.lg { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: color-mix(in srgb, var(--c, #888) 10%, #fff); border-radius: 10px; font-size: 12px; }
.lg i { color: var(--c); font-size: 16px; } .lg span { flex: 1; min-width: 0; } .lg b { font-size: 14px; }
.lg.total { background: var(--gold-l); --c: var(--gold); } .lg.total i { color: var(--gold); }
.lg.slim { background: none; padding: 2px 0; border-bottom: 1px dashed var(--line); border-radius: 0; }
.lg.slim::before { content: ''; width: 11px; height: 11px; border-radius: 3px; background: var(--c); }
.lg.slim em { font-style: normal; color: var(--muted); width: 50px; text-align: right; }
.legend-list.tight { gap: 3px; }
.mini-grid { display: grid; gap: 10px; } .mini-grid.two { grid-template-columns: 1fr 1fr; } .mini-grid.three { grid-template-columns: repeat(3, 1fr); }
.mini { border-radius: 12px; padding: 10px 11px; position: relative; background: var(--mb); min-width: 0; }
.mini > i { font-size: 22px; color: var(--mc); }
.mini small { display: block; font-weight: 600; font-size: 11.5px; color: #34456a; line-height: 1.2; margin: 2px 0; }
.mini > b { display: block; font-size: 22px; color: var(--ink); line-height: 1.2; }
.mini em { font-style: normal; font-size: 11px; color: var(--muted); }
.mini .pair { display: flex; justify-content: space-between; font-size: 11.5px; padding: 3px 0; border-top: 1px solid rgba(0, 0, 0, .06); } .mini .pair b { font-size: 13px; }
.mini .tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; margin: 0 4px 0 0; }
.tag.green { background: #cdf5dc; color: #11803a; }
.mini.blue { --mb: #e3f0ff; --mc: #1e7bff; } .mini.teal { --mb: #dcf6f8; --mc: #14a2ad; } .mini.pink { --mb: #ffe3ec; --mc: #f0457a; }
.mini.purple { --mb: #eee4ff; --mc: #7e3ff2; } .mini.green { --mb: #dcf7e5; --mc: #1aa34a; } .mini.gold { --mb: #fff1c9; --mc: #e0a100; }
.medal { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-weight: 700; font-size: 12px; color: #fff; }
.medal.m1 { background: linear-gradient(135deg, #ffd45a, #d99a00); } .medal.m2 { background: linear-gradient(135deg, #cfd6e2, #8793a8); } .medal.m3 { background: linear-gradient(135deg, #e3a36a, #b3652a); }

/* ---------- Jadual ---------- */
.table-wrap { overflow-x: auto; border-radius: 10px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { background: linear-gradient(180deg, #eef4ff, #e4eeff); color: var(--blue-dd); font-weight: 600; text-align: left; padding: 9px 10px; white-space: nowrap; border-bottom: 2px solid #d4e3ff; font-size: 12px; }
.tbl th.num, .tbl td.num { text-align: right; } .tbl th.c, .tbl td.c { text-align: center; }
.tbl th.sortable { cursor: pointer; user-select: none; } .tbl th.sortable:hover { background: #d9e7ff; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid #eef2f9; vertical-align: middle; }
.tbl tbody tr:hover { background: #f8fbff; }
.tbl.compact th, .tbl.compact td { padding: 6px 8px; }
.tbl tr.tot td { background: var(--gold-l); font-weight: 700; }
.tbl tr.sub-row td { background: #f4f7fc; font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.tbl td.small { font-size: 11px; }
.tbl td.empty { text-align: center; color: var(--muted); padding: 10px; }
.act-col { width: 1%; white-space: nowrap; }
.cell-stack b { display: block; font-weight: 600; } .cell-stack small { color: var(--muted); font-size: 11px; }
.two-val b { display: block; } .two-val span { font-size: 11px; color: var(--muted); }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.search { position: relative; flex: 1; max-width: 340px; }
.search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 33px; border-radius: 20px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; color: var(--muted); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 70%, #000); white-space: nowrap; }
.gred { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 7px; border-radius: 8px; font-weight: 700; color: #fff; background: var(--c); font-size: 12px; }
.err-list { max-height: 55vh; overflow: auto; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { border: 1.5px solid var(--line); background: #fff; padding: 8px 16px; border-radius: 22px; font: inherit; font-weight: 600; color: var(--blue-d); cursor: pointer; }
.tab.on { background: var(--gold-g); border-color: transparent; color: #3a2b00; box-shadow: 0 3px 8px rgba(224, 161, 0, .3); }
.seg { display: inline-flex; background: var(--blue-l); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: none; padding: 8px 18px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--blue-d); cursor: pointer; }
.seg button.on { background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); color: var(--blue); }
.calc-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 12px; }
.calc-steps > div { background: var(--blue-l); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; font-size: 11.5px; color: var(--muted); }
.calc-steps b { font-size: 17px; color: var(--ink); } .calc-steps .hl { background: var(--gold-l); } .calc-steps .hl b { color: #8a5d00; }

/* ---------- Borang & modal ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 12px; color: var(--blue-dd); }
.req { color: #e0245e; }
.hint { color: var(--muted); font-size: 11px; }
.form-note { margin-top: 10px; font-size: 12px; color: var(--muted); }
.modal-bg { position: fixed; inset: 0; background: rgba(8, 28, 70, .5); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s; }
.modal { background: #fff; border-radius: 16px; width: min(520px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); overflow: hidden; }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: linear-gradient(90deg, #0b3a8c, #1559c9); color: #fff; }
.modal-head h3 { font-size: 15px; } .modal-head .icon-btn { background: rgba(255, 255, 255, .18); color: #fff; }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: #fafcff; }
.confirm-msg { margin: 0; line-height: 1.6; font-size: 14px; }
body.modal-open { overflow: hidden; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: #0f3b91; color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-weight: 500; max-width: 380px; animation: slide .25s; transition: opacity .4s; }
.toast.ok i { color: #7ff0a6; } .toast.warn { background: #8a5d00; } .toast.err { background: #b00d3c; }
.toast.hide { opacity: 0; }
@keyframes slide { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Tetapan ---------- */
.ei-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ei-box { border: 1.5px dashed #c5d6f5; border-radius: 14px; padding: 16px; background: linear-gradient(135deg, #fff, #f5f9ff); }
.ei-box h4 { color: var(--blue-d); margin-bottom: 6px; font-size: 15px; } .ei-box p { margin: 0 0 12px; color: #43557a; line-height: 1.55; }
.count-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.count { background: linear-gradient(135deg, #eaf3ff, #fff); border-radius: 12px; padding: 10px; text-align: center; border: 1px solid #dbe8fd; }
.count b { display: block; font-size: 21px; color: var(--blue-d); } .count span { font-size: 11.5px; color: var(--muted); }
.err-pre { white-space: pre-wrap; font-size: 11px; background: #fff5f7; padding: 10px; border-radius: 8px; color: #b00d3c; }

/* ---------- Dokumen cetak (slip & laporan) ---------- */
.print-area { margin-top: 4px; }
.slip, .report { background: #fff; color: #000; max-width: 820px; margin: 0 auto 18px; padding: 26px 30px; border-radius: 6px; box-shadow: var(--shadow); font-size: 12px; line-height: 1.45; }
.report { max-width: 1060px; }
.doc-head { text-align: center; border-bottom: 3px double #0b3a8c; padding-bottom: 10px; margin-bottom: 12px; }
.doc-school { font-size: 15px; font-weight: 700; text-transform: uppercase; color: #0b3a8c; }
.doc-title { font-size: 18px; font-weight: 800; letter-spacing: .5px; margin-top: 2px; }
.doc-sub { font-size: 11.5px; color: #444; }
.slip h4 { margin: 12px 0 5px; font-size: 12.5px; color: #0b3a8c; border-left: 4px solid #e0a100; padding-left: 8px; }
table.kv { width: 100%; border-collapse: collapse; }
table.kv th, table.kv td { border: 1px solid #b7c4dc; padding: 5px 8px; text-align: left; }
table.kv th { background: #eef4ff; width: 22%; font-weight: 600; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td { border: 1px solid #9fb2d6; padding: 5px 6px; text-align: center; }
table.grid th { background: #e6efff; font-weight: 600; } table.grid td.l, table.grid th.l { text-align: left; }
table.grid.small { font-size: 11px; } table.grid.small th, table.grid.small td { padding: 3px 5px; }
table.grid.result th { background: #fff0c2; }
.g-big { font-size: 20px; }
.gred-note { margin-top: 10px; padding: 8px 12px; background: #f4f8ff; border-left: 4px solid #1e7bff; border-radius: 4px; }
.tl-box { margin: 10px 0; padding: 10px 12px; background: #fff0f4; border: 1px solid #f3b3c6; border-radius: 6px; }
.gred-sum { margin: 10px 0 0; }
.sign-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 38px; text-align: center; }
.sign-line { border-bottom: 1px solid #000; height: 38px; margin-bottom: 4px; } .sign-row small { display: block; color: #555; }
.doc-foot { margin-top: 14px; text-align: right; font-size: 10px; color: #777; }

/* ---------- Responsif ---------- */
@media (max-width: 1500px) { .kpi-row { grid-template-columns: repeat(4, 1fr); } .g-four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1200px) { .g-komp, .g-three { grid-template-columns: 1fr 1fr; } .tb-school { display: none; } }
@media (max-width: 900px) {
  #sidebar { transform: translateX(-100%); transition: transform .25s; }
  #app.menu-open #sidebar { transform: none; }
  #app.menu-open #scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 25; }
  .main { margin-left: 0; } .only-mobile { display: inline-flex; }
  #topbar { padding-left: 14px; } #topbar::before { display: none; }
  .tb-title h1 { font-size: 14px; } .tb-field span { display: none; }
  .g-komp, .g-three, .g-four, .g-two, .ei-grid, .form-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; } #view { padding: 14px 12px 30px; }
  .donut-row { flex-direction: column; }
}

/* ---------- Cetak ---------- */
@page { size: A4; margin: 12mm; }
@media print {
  body { background: #fff; }
  #sidebar, #topbar, #scrim, .no-print, .page-head, #toasts { display: none !important; }
  #app { display: block; } .main { margin: 0; } #view { padding: 0; }
  .slip, .report { box-shadow: none; max-width: none; margin: 0; padding: 0; border-radius: 0; }
  .slip { page-break-after: always; break-after: page; }
  .slip:last-child, .report:last-child { page-break-after: auto; break-after: auto; }
  .page-break { page-break-after: always; break-after: page; }
  .page-break:last-child { page-break-after: auto; break-after: auto; }
  table.grid { page-break-inside: auto; } tr { page-break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
