/* =====================================================================
   FurtherEdu — design system
   Palet: jade (pertumbuhan, sekolah Islam) + marigold (rumbai toga)
   di atas permukaan abu-mint yang sejuk. Satu keluarga huruf:
   Plus Jakarta Sans (dirancang di Indonesia), angka tabular.
   ===================================================================== */
:root {
  --ink: #13233a;
  --ink-2: #3c4b61;
  --ink-3: #6b7a90;
  --line: #dde5e2;
  --line-2: #c9d5d1;
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --jade: #0f6b5c;
  --jade-2: #0b5247;
  --jade-3: #0a3d35;
  --jade-tint: #e3f1ed;
  --jade-tint-2: #cfe7e0;
  --gold: #e8a317;
  --gold-2: #b97f05;
  --gold-tint: #fdf3dc;
  --sky: #3b6fd8;
  --sky-tint: #e6eefc;
  --rose: #d9485f;
  --rose-tint: #fde8eb;
  --amber-tint: #fff4dc;
  --violet: #7a5af5;
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-pop: 0 12px 32px -12px rgba(19, 35, 58, .28), 0 2px 6px rgba(19, 35, 58, .06);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar-w: 256px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.55; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--jade); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 .6em; }
small { font-size: 12.5px; }
img { max-width: 100%; }
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.stat-value, .mc-big, .score, td.num, .kv dd, .id-card strong { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout admin ------------------------------------------------ */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--jade-3); color: #cfe2dc;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-text strong { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand-text span { display: block; font-size: 11.5px; color: #9fc3b9; margin-top: -1px; }
.nav { padding: 6px 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav-parent {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: #cfe2dc;
  font-weight: 600; font-size: 14px; border: 0; background: none; width: 100%; text-align: left; cursor: pointer; font-family: inherit;
}
.nav a:hover, .nav-parent:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav a.is-active { background: #fff; color: var(--jade-3); }
.nav a.is-active .icon { color: var(--jade); }
.nav-parent .chev { margin-left: auto; transition: transform .2s; width: 16px; height: 16px; }
.nav-parent[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-sub { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 6px 41px; }
.nav-sub a { padding: 6px 10px; font-size: 13.5px; font-weight: 500; color: #a9cbc1; }
.nav-sub a.is-active { background: rgba(255,255,255,.12); color: #fff; }
.nav-label { font-size: 11.5px; color: #7fa89d; padding: 16px 12px 4px; font-weight: 600; }
.sidebar-foot { margin-top: auto; padding: 14px 16px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #86ab9f; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px;
  background: rgba(243,246,245,.88); backdrop-filter: saturate(1.4) blur(10px); position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--line);
}
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title h1 { font-size: 19px; font-weight: 800; }
.topbar-title p { margin: 1px 0 0; color: var(--ink-3); font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.ta-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.ta-chip .icon { width: 14px; height: 14px; color: var(--jade); }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--jade); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.gold { background: var(--gold); color: var(--ink); }
.who-text { line-height: 1.2; }
.who-text strong { display: block; font-size: 13.5px; }
.who-text span { font-size: 12px; color: var(--ink-3); }
.menu-btn { display: none; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; width: 38px; height: 38px; place-items: center; cursor: pointer; color: var(--ink); }
.content { padding: 24px 28px 48px; max-width: 1360px; width: 100%; }
.content-narrow { max-width: 1080px; margin: 0 auto; }
.sidebar-backdrop { display: none; }

/* ---------- Panel (kartu) --------------------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 18px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { font-size: 16px; font-weight: 750; display: flex; align-items: center; gap: 8px; }
.panel-head h2 .icon { color: var(--jade); }
.panel-head p { margin: 3px 0 0; color: var(--ink-3); font-size: 13px; max-width: 72ch; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-flush > .panel-head { padding: 18px 22px 0; }
.panel.tint { background: var(--jade-tint); border-color: var(--jade-tint-2); }
.section-title { font-size: 15px; font-weight: 750; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.grid > .panel { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: 16px; }

/* ---------- Statistik (KPI) ---------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px 14px; position: relative; }
.stat-label { font-size: 12.5px; color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat-label .icon { width: 15px; height: 15px; color: var(--jade); }
.stat-value { font-size: 27px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-top: 6px; }
.stat-value small { font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.stat-foot { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.stat .bar { height: 5px; border-radius: 9px; background: var(--jade-tint); margin-top: 10px; overflow: hidden; }
.stat .bar > span { display: block; height: 100%; background: var(--jade); border-radius: 9px; }
.stat.accent { background: var(--jade); border-color: var(--jade); color: #fff; }
.stat.accent .stat-label, .stat.accent .stat-foot, .stat.accent .stat-value small { color: #bfe0d6; }
.stat.accent .stat-label .icon { color: var(--gold); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 12px; padding: 1px 7px; border-radius: 99px; }
.delta .icon { width: 13px; height: 13px; }
.delta.up { color: #0b6b3a; background: #dcf5e7; }
.delta.down { color: #a3263a; background: var(--rose-tint); }
.delta.flat { color: var(--ink-3); background: var(--surface-2); }
.stat.accent .delta.up { background: rgba(255,255,255,.16); color: #fff; }

/* ---------- Tombol ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 650; font-size: 14px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; line-height: 1.2; white-space: nowrap;
  background: var(--surface); color: var(--ink); transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--jade); color: #fff; }
.btn-primary:hover { background: var(--jade-2); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #d9950c; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--jade); color: var(--jade); }
.btn-soft { background: var(--jade-tint); color: var(--jade-2); }
.btn-soft:hover { background: var(--jade-tint-2); }
.btn-danger { background: var(--rose); color: #fff; }
.btn-danger:hover { background: #c1394f; }
.btn-danger-ghost { background: var(--surface); color: var(--rose); border-color: #f2c3cb; }
.btn-danger-ghost:hover { background: var(--rose-tint); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--ink-3); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.icon-btn.danger:hover { color: var(--rose); background: var(--rose-tint); border-color: #f2c3cb; }
.icon-btn .icon { width: 16px; height: 16px; }
.btn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Formulir ---------------------------------------------------- */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }
.field .hint, .hint { font-size: 12.5px; color: var(--ink-3); margin: 5px 0 0; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=date], input[type=tel], input[type=email], select, textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 9px; padding: 9px 12px; transition: border-color .15s, box-shadow .15s; min-height: 40px;
}
textarea { min-height: 84px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(15,107,92,.15); }
input[type=file] { font: inherit; font-size: 13px; }
input[type=checkbox], input[type=radio] { accent-color: var(--jade); width: 16px; height: 16px; vertical-align: -3px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; }
.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 14px; }
.check input { margin-top: 3px; }
.req { color: var(--rose); }
.search-input { position: relative; }
.search-input .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 16px; height: 16px; pointer-events: none; }
.search-input input { padding-left: 34px; }

/* ---------- Tabel ------------------------------------------------------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel .table-wrap { border-radius: var(--radius-sm); }
.panel-flush .table-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { background: var(--surface-2); font-size: 12.5px; font-weight: 700; color: var(--ink-2); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
thead tr.group th { background: var(--jade-tint); color: var(--jade-2); text-align: center; border-bottom-color: var(--jade-tint-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfc; }
td.strong, .strong { font-weight: 700; }
.table-empty { padding: 34px 16px !important; text-align: center; color: var(--ink-3); }
.table-compact th, .table-compact td { padding: 7px 10px; }
.cell-sub { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.score { font-weight: 700; font-variant-numeric: tabular-nums; }
.score.hi { color: #0b6b3a; }
.score.lo { color: #b4283e; }
tr.is-me td { background: var(--gold-tint) !important; }
tfoot td { background: var(--surface-2); font-weight: 700; border-top: 1px solid var(--line); }
.sortable th[data-sort] { cursor: pointer; user-select: none; }
.sortable th[data-sort]:hover { color: var(--jade); }
.sortable th.sort-asc::after { content: " ▲"; font-size: 9px; }
.sortable th.sort-desc::after { content: " ▼"; font-size: 9px; }

/* ---------- Badge & chip ------------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge .icon { width: 12px; height: 12px; }
.badge.ok { background: #dcf5e7; color: #0b6b3a; border-color: #bfe9d1; }
.badge.warn { background: var(--amber-tint); color: #8a5a00; border-color: #f6dea3; }
.badge.danger { background: var(--rose-tint); color: #a3263a; border-color: #f6c4cc; }
.badge.info { background: var(--sky-tint); color: #2451ad; border-color: #cbdaf8; }
.badge.jade { background: var(--jade-tint); color: var(--jade-2); border-color: var(--jade-tint-2); }
.badge.gold { background: var(--gold-tint); color: #8a5a00; border-color: #f4dda4; }
.badge.solid { background: var(--jade); color: #fff; border-color: var(--jade); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.pill-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; background: var(--jade-tint); color: var(--jade-2); font-size: 12px; font-weight: 700; }
.jenis-PTN { background: var(--jade-tint); color: var(--jade-2); border-color: var(--jade-tint-2); }
.jenis-PTS { background: var(--sky-tint); color: #2451ad; border-color: #cbdaf8; }
.jenis-PTLN { background: #efe9ff; color: #5534c9; border-color: #ddd2ff; }
.jenis-KEDINASAN { background: var(--gold-tint); color: #8a5a00; border-color: #f4dda4; }

/* ---------- Alert ----------------------------------------------------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: 14px; border: 1px solid; }
.alert .icon { margin-top: 1px; }
.alert-success { background: #e4f6ec; border-color: #bfe9d1; color: #0b5a32; }
.alert-error { background: var(--rose-tint); border-color: #f6c4cc; color: #8f1f31; }
.alert-warn { background: var(--amber-tint); border-color: #f6dea3; color: #6f4800; }
.alert-info { background: var(--sky-tint); border-color: #cbdaf8; color: #1f448f; }
.alert p:last-child { margin: 0; }

/* ---------- Tab / segmen ----------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 10px 14px; font-weight: 650; font-size: 14px; color: var(--ink-3); border: 0; background: none; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 7px; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs .is-active { color: var(--jade); border-bottom-color: var(--jade); }
.tabs .icon { width: 16px; height: 16px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg button { padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 650; color: var(--ink-3); border: 0; background: none; cursor: pointer; font-family: inherit; }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg .is-active { background: var(--surface); color: var(--jade-2); box-shadow: 0 1px 2px rgba(19,35,58,.1); }

/* ---------- Toolbar / filter ---------------------------------------- */
.toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .field { margin: 0; min-width: 150px; }
.toolbar .grow { flex: 1; min-width: 200px; }

/* ---------- Dialog --------------------------------------------------- */
dialog.dlg { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-pop); color: var(--ink); }
dialog.dlg.wide { width: min(860px, calc(100vw - 32px)); }
dialog.dlg::backdrop { background: rgba(10, 30, 26, .45); backdrop-filter: blur(2px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dlg-head h3 { font-size: 16px; font-weight: 750; }
.dlg-body { padding: 18px 20px; max-height: 70vh; overflow: auto; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 16px 16px; }

/* ---------- Menu dropdown (details) ---------------------------------- */
details.dd { position: relative; display: inline-block; }
details.dd > summary { list-style: none; }
details.dd > summary::-webkit-details-marker { display: none; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 40; }
.dd-menu a, .dd-menu button { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 8px; color: var(--ink); font-size: 13.5px; font-weight: 550; width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font-family: inherit; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--jade-tint); text-decoration: none; }
.dd-menu .icon { color: var(--jade); width: 16px; height: 16px; }
.dd-label { font-size: 11.5px; color: var(--ink-3); font-weight: 650; padding: 8px 11px 3px; }

/* ---------- Kosong ---------------------------------------------------- */
.empty { text-align: center; padding: 38px 20px; color: var(--ink-3); }
.empty .icon { width: 36px; height: 36px; color: var(--jade-tint-2); stroke-width: 1.6; margin-bottom: 6px; }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty p { max-width: 46ch; margin: 0 auto 12px; }

/* ---------- Progres --------------------------------------------------- */
.progress { height: 8px; border-radius: 9px; background: var(--jade-tint); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--jade); border-radius: 9px; }
.progress.gold > span { background: var(--gold); }
.hbar-list { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 46%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar .lbl { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 600; line-height: 1.3; }
.hbar .val { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }

/* ---------- Grafik (SVG mini chart) --------------------------------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .val-label { fill: var(--ink-2); font-size: 11px; font-weight: 700; font-family: var(--font); }
.chart .dot { transition: r .12s; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-legend button { font: inherit; border: 0; background: none; padding: 2px 0; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chart-legend button.off { opacity: .35; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12px; line-height: 1.45; white-space: nowrap; z-index: 5; transform: translate(-50%, calc(-100% - 10px)); box-shadow: var(--shadow-pop); }
.chart-tip b { font-weight: 700; }
.chart-tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-wrap .chart { width: 170px; flex: none; }
.donut-wrap .chart-legend { flex-direction: column; margin: 0; gap: 8px; flex: 1; min-width: 160px; }
.donut-wrap .lg-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; }
.donut-wrap .lg-row span { display: inline-flex; align-items: center; gap: 7px; }
.donut-wrap .lg-row b { white-space: nowrap; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.donut-center strong { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.donut-center span { font-size: 11.5px; color: var(--ink-3); }

/* ---------- Login ---------------------------------------------------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); background: var(--surface); }
.login-art { background: var(--jade-3); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art .brand { padding: 0; }
.login-art h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; max-width: 15ch; margin-top: 40px; }
.login-art p.lead { color: #b5d6cc; font-size: 15.5px; max-width: 44ch; margin-top: 14px; }
.login-path { position: relative; margin: 30px 0 10px; max-width: 460px; }
.login-path ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; position: relative; }
.login-path ol::before { content: ""; position: absolute; left: 15px; top: 14px; bottom: 14px; border-left: 2px dashed rgba(232,163,23,.55); }
.login-path li { display: flex; gap: 14px; align-items: center; position: relative; }
.login-path li b { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--jade-2); border: 2px solid var(--gold); color: var(--gold); font-size: 13px; flex: none; }
.login-path li:last-child b { background: var(--gold); color: var(--jade-3); }
.login-path li span { font-weight: 650; font-size: 14.5px; }
.login-path li small { display: block; color: #8fb9ad; font-weight: 500; font-size: 12.5px; }
.login-art .foot { font-size: 12px; color: #7fa89d; }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.login-card .sub { color: var(--ink-3); margin: 6px 0 22px; }
.login-switch { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 4px; margin-bottom: 22px; }
.login-switch a { flex: 1; text-align: center; padding: 8px; border-radius: 8px; font-weight: 650; font-size: 14px; color: var(--ink-3); }
.login-switch a:hover { text-decoration: none; color: var(--ink); }
.login-switch a.is-active { background: var(--surface); color: var(--jade-2); box-shadow: 0 1px 3px rgba(19,35,58,.12); }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.copyright { font-size: 12px; color: var(--ink-3); margin-top: 26px; }

/* ---------- Halaman siswa -------------------------------------------- */
.s-header { background: var(--jade-3); color: #fff; }
.s-header-inner { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.s-header .who-text span { color: #9fc3b9; }
.s-header .btn-ghost { background: transparent; color: #cfe2dc; border-color: rgba(255,255,255,.2); }
.s-header .btn-ghost:hover { color: #fff; border-color: #fff; }
.s-nav { background: var(--jade-3); border-top: 1px solid rgba(255,255,255,.07); position: sticky; top: 0; z-index: 20; }
.s-nav-inner { max-width: 1120px; margin: 0 auto; padding: 0 16px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.s-nav a { display: flex; align-items: center; gap: 8px; padding: 13px 16px; color: #a9cbc1; font-weight: 650; font-size: 14.5px; border-bottom: 3px solid transparent; white-space: nowrap; }
.s-nav a:hover { color: #fff; text-decoration: none; }
.s-nav a.is-active { color: #fff; border-bottom-color: var(--gold); }
.s-content { max-width: 1120px; margin: 0 auto; padding: 26px 24px 60px; }
.page-head { margin-bottom: 20px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.page-head p { color: var(--ink-3); margin: 4px 0 0; max-width: 68ch; }

/* Sapaan beranda siswa */
.hello { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; margin-bottom: 22px; }
.hello h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; }
.hello p { color: var(--ink-3); margin: 6px 0 0; }
.id-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; gap: 18px; font-size: 13px; }
.id-card div span { display: block; color: var(--ink-3); font-size: 11.5px; }
.id-card div strong { font-variant-numeric: tabular-nums; }

/* Jejak studi lanjut: elemen khas aplikasi */
.journey { background: var(--jade-3); color: #fff; border-radius: 18px; padding: 24px 26px; margin-bottom: 20px; position: relative; overflow: hidden; }
.journey-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.journey-title h2 { font-size: 17px; font-weight: 750; }
.journey-title span { color: #9fc3b9; font-size: 13px; }
.journey ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.journey li { position: relative; padding-right: 18px; }
.journey li::before { content: ""; position: absolute; top: 17px; left: 36px; right: 0; border-top: 2px dashed rgba(255,255,255,.18); }
.journey li.done::before { border-top: 2px solid var(--gold); }
.journey li:last-child::before { display: none; }
.journey .node { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.25); color: #cfe2dc; font-weight: 800; font-size: 14px; position: relative; z-index: 1; }
.journey li.done .node { background: var(--gold); border-color: var(--gold); color: var(--jade-3); }
.journey li.now .node { background: var(--jade-3); border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 5px rgba(232,163,23,.18); }
.journey .node .icon { width: 17px; height: 17px; stroke-width: 2.6; }
.journey h3 { font-size: 14.5px; font-weight: 700; margin-top: 12px; }
.journey p { font-size: 12.5px; color: #9fc3b9; margin: 3px 0 0; }
.journey li a { color: var(--gold); font-size: 12.5px; font-weight: 650; display: inline-block; margin-top: 6px; }

.menu-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.menu-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.menu-card:hover { text-decoration: none; border-color: var(--jade); box-shadow: 0 6px 20px -12px rgba(15,107,92,.5); }
.menu-card .mc-head { display: flex; align-items: center; gap: 10px; }
.menu-card .mc-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--jade-tint); color: var(--jade); }
.menu-card h3 { font-size: 15.5px; font-weight: 750; }
.menu-card .mc-big { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.menu-card .mc-big small { font-size: 13px; color: var(--ink-3); font-weight: 600; letter-spacing: 0; }
.menu-card p { font-size: 13px; color: var(--ink-3); margin: 0; }
.menu-card .mc-go { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--jade); display: inline-flex; align-items: center; gap: 4px; }

/* Pilihan mapel (kartu centang) */
.mapel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.mapel-opt { position: relative; }
.mapel-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mapel-opt label { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 11px; cursor: pointer; background: var(--surface); transition: border-color .12s, background .12s; min-height: 64px; }
.mapel-opt label:hover { border-color: var(--jade); }
.mapel-opt strong { font-size: 14px; }
.mapel-opt small { color: var(--ink-3); }
.mapel-opt input:checked + label { border-color: var(--jade); background: var(--jade-tint); box-shadow: inset 0 0 0 1px var(--jade); }
.mapel-opt input:focus-visible + label { outline: 2.5px solid var(--gold); outline-offset: 2px; }
.mapel-opt input:disabled + label { opacity: .45; cursor: not-allowed; }
.mapel-opt .rec { position: absolute; top: -8px; right: 10px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 750; padding: 1px 8px; border-radius: 99px; }
.mapel-opt .order { position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--jade); color: #fff; font-size: 12px; font-weight: 800; display: none; place-items: center; }
.mapel-opt input:checked + label .order { display: grid; }
.kelompok-title { font-size: 13px; font-weight: 700; color: var(--ink-3); margin: 14px 0 8px; }

/* Ringkasan pilihan */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 650; }

/* Peringkat */
.rank-hero { display: flex; align-items: center; gap: 16px; }
.medal { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-tint); border: 3px solid var(--gold); color: var(--gold-2); font-weight: 800; font-size: 22px; flex: none; }
.medal small { font-size: 11px; font-weight: 700; }
.rank-hero strong { font-size: 15px; display: block; }
.rank-hero span { font-size: 13px; color: var(--ink-3); }

/* Typeahead / combobox */
.combo { position: relative; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); max-height: 320px; overflow: auto; z-index: 50; padding: 5px; }
.combo-item { padding: 9px 11px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.combo-item:hover, .combo-item.is-active { background: var(--jade-tint); }
.combo-item strong { font-size: 14px; font-weight: 650; }
.combo-item small { display: block; color: var(--ink-3); font-size: 12px; }
.combo-item .meta { text-align: right; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.combo-empty { padding: 12px; color: var(--ink-3); font-size: 13px; }
.combo-picked { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--jade); background: var(--jade-tint); border-radius: 10px; }
.combo-picked strong { display: block; }
.combo-picked small { color: var(--ink-3); }

/* Upload */
.drop { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 18px; text-align: center; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; display: block; }
.drop:hover, .drop.is-over { border-color: var(--jade); background: var(--jade-tint); }
.drop .icon { width: 28px; height: 28px; color: var(--jade); }
.drop strong { display: block; margin-top: 4px; }
.drop small { color: var(--ink-3); }
.drop input { display: none; }

/* Kartu studi lanjut */
.sl-list { display: grid; gap: 14px; }
.sl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.sl-card.final { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.sl-logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--jade-tint); color: var(--jade); font-weight: 800; font-size: 13px; }
.sl-card h3 { font-size: 16px; font-weight: 750; }
.sl-card .prodi { font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.sl-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* Tabel nilai: highlight kolom rata */
.col-rata { background: var(--jade-tint) !important; font-weight: 800; }
thead th.col-rata { color: var(--jade-2); }

/* Generate */
.gab-table td { vertical-align: top; }
.irisan { font-weight: 650; }
.kode-cell { font-weight: 800; text-align: center; }
.rombel-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rombel-card summary { cursor: pointer; padding: 10px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--surface-2); font-weight: 650; list-style: none; }
.rombel-card summary::-webkit-details-marker { display: none; }
.rombel-card[open] summary { border-bottom: 1px solid var(--line); }
.baris-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: 0; }

.foot-note { font-size: 12px; color: var(--ink-3); text-align: center; padding: 18px 0 0; }

/* ---------- Responsif --------------------------------------------------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-21, .grid-12, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-pop); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(10,30,26,.45); z-index: 55; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 18px 16px 40px; }
  .who-text, .ta-chip { display: none; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { padding: 28px 24px; }
  .login-art h2 { margin-top: 22px; }
  .login-path { display: none; }
  .menu-cards { grid-template-columns: 1fr; }
  .journey ol { grid-template-columns: 1fr; gap: 16px; }
  .journey li { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; padding: 0; }
  .journey li::before { top: 36px; bottom: -16px; left: 17px; right: auto; border-top: 0; border-left: 2px dashed rgba(255,255,255,.18); }
  .journey li.done::before { border-top: 0; border-left: 2px solid var(--gold); }
  .journey li > div { grid-column: 2; }
  .journey h3 { margin-top: 6px; }
  .hello { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-value { font-size: 22px; }
  .panel { padding: 16px; }
  .s-content { padding: 18px 16px 50px; }
  .s-header-inner { padding: 12px 16px; }
  .s-header .who-text { display: none; }
  .sl-card { grid-template-columns: 1fr; }
  .sl-logo { display: none; }
  .id-card { flex-wrap: wrap; gap: 10px 16px; }
  .topbar-title h1 { font-size: 16px; }
  .topbar-title p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .sidebar, .topbar, .s-header, .s-nav, .no-print, .btn, .toolbar { display: none !important; }
  body { background: #fff; }
  .content, .s-content { padding: 0; max-width: none; }
  .panel { border: 0; padding: 0; }
}
.field label.drop, .field label.check { font-size: 14px; font-weight: 500; color: var(--ink); margin: 0; }
.field label.drop small { font-weight: 500; }
.row select, .btn-row select, .row input[type=search] { width: auto; min-width: 150px; }
.sl-status-short { white-space: nowrap; }
.copy-link { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
