/* NetraSkor — design system */
:root {
  --bg: #f4f6fb;
  --bg-2: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8f2;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #94a3b8;
  --primary: #4f46e5;
  --primary-2: #6366f1;
  --primary-soft: #eef2ff;
  --accent: #14b8a6;
  --accent-soft: #ccfbf1;
  --ok: #16a34a;
  --ok-soft: #dcfce7;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --bad: #dc2626;
  --bad-soft: #fee2e2;
  --info: #0284c7;
  --info-soft: #e0f2fe;
  --grad: linear-gradient(135deg, #6366f1 0%, #4f46e5 45%, #14b8a6 100%);
  --sidebar: #0b1020;
  --sidebar-2: #131a33;
  --sidebar-text: #c7cde0;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -10px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .35);
  --r: 14px;
  --r-sm: 10px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e1a; --bg-2: #0f1424; --surface: #121829; --surface-2: #171e33; --border: #232c47;
    --text: #e6e9f2; --muted: #98a2bd; --soft: #6b7593;
    --primary: #818cf8; --primary-2: #a5b4fc; --primary-soft: #1e2350; --accent: #2dd4bf; --accent-soft: #0f3a37;
    --ok: #4ade80; --ok-soft: #12321f; --warn: #fbbf24; --warn-soft: #3a2c0c; --bad: #f87171; --bad-soft: #3b1515; --info: #38bdf8; --info-soft: #0c2a3d;
    --sidebar: #070a14; --sidebar-2: #10162b;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0e1a; --bg-2: #0f1424; --surface: #121829; --surface-2: #171e33; --border: #232c47;
  --text: #e6e9f2; --muted: #98a2bd; --soft: #6b7593;
  --primary: #818cf8; --primary-2: #a5b4fc; --primary-soft: #1e2350; --accent: #2dd4bf; --accent-soft: #0f3a37;
  --ok: #4ade80; --ok-soft: #12321f; --warn: #fbbf24; --warn-soft: #3a2c0c; --bad: #f87171; --bad-soft: #3b1515; --info: #38bdf8; --info-soft: #0c2a3d;
  --sidebar: #070a14; --sidebar-2: #10162b;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.hide { display: none !important; }
svg.lucide { width: 18px; height: 18px; stroke-width: 2; flex: none; }

.boot { height: 100vh; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); }
.boot img { width: 64px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; z-index: 40; }
.sidebar::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 300px at -20% -10%, rgba(99,102,241,.35), transparent 60%), radial-gradient(400px 300px at 120% 110%, rgba(20,184,166,.18), transparent 60%); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; position: relative; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 6px 16px rgba(99,102,241,.5)); }
.brand b { display: block; color: #fff; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.brand b span { background: linear-gradient(90deg, #a5b4fc, #5eead4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { font-size: 11px; color: #8e97b5; }
.nav { display: flex; flex-direction: column; gap: 2px; position: relative; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #6b7493; padding: 14px 12px 6px; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--sidebar-text); font-weight: 500; transition: .15s; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(99,102,241,.35), rgba(99,102,241,.08)); color: #fff; box-shadow: inset 3px 0 0 #818cf8; }
.nav a .badge { margin-left: auto; }
.side-foot { margin-top: auto; position: relative; padding-top: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--sidebar-2); border: 1px solid rgba(255,255,255,.06); }
.avatar { width: 36px; height: 36px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.user-chip .u-name { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .u-role { font-size: 11px; color: #8e97b5; text-transform: capitalize; }
.user-chip button { margin-left: auto; background: none; border: 0; color: #8e97b5; cursor: pointer; padding: 6px; border-radius: 8px; }
.user-chip button:hover { background: rgba(255,255,255,.08); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar h1 { font-size: 18px; font-weight: 700; }
.topbar .crumb { font-size: 12px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.content { padding: 24px 28px 60px; max-width: 1480px; width: 100%; margin: 0 auto; }
.scrim { display: none; }

/* ---------- Komponen ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-h h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-h .spacer { flex: 1; }
.card-b { padding: 20px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.mt { margin-top: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 13.5px var(--font); cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--primary-2); color: var(--primary); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 6px 18px -6px rgba(79,70,229,.6); }
.btn.primary:hover { filter: brightness(1.07); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn.block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 500 14px var(--font); outline: none; transition: .15s; width: 100%; }
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--primary-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.input.sm { height: 32px; font-size: 13px; padding: 0 9px; border-radius: 8px; }
.hint { font-size: 12px; color: var(--soft); }
.input-group { position: relative; }
.input-group .input { padding-right: 42px; }
.input-group button { position: absolute; right: 4px; top: 4px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 500; }
.switch input { display: none; }
.switch i { width: 40px; height: 22px; border-radius: 99px; background: var(--border); position: relative; transition: .2s; flex: none; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { left: 21px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--bg-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.pri { background: var(--primary-soft); color: var(--primary); }
.badge svg.lucide { width: 12px; height: 12px; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 12px; width: fit-content; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font: 600 13px var(--font); color: var(--muted); cursor: pointer; display: inline-flex; gap: 7px; align-items: center; }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* Statistik */
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 12px; }
.stat .ico.t { background: var(--accent-soft); color: var(--accent); }
.stat .ico.o { background: var(--warn-soft); color: var(--warn); }
.stat .ico.g { background: var(--ok-soft); color: var(--ok); }
.stat .ico.r { background: var(--bad-soft); color: var(--bad); }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.stat .sub { font-size: 12px; color: var(--soft); margin-top: 6px; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.mini { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.mini .v { font-size: 20px; font-weight: 800; }
.mini .l { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.hero { background: var(--grad); color: #fff; border-radius: 18px; padding: 26px 28px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero::before { content: ''; position: absolute; right: 120px; bottom: -90px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero h2 { font-size: 24px; font-weight: 800; }
.hero p { margin: 6px 0 16px; opacity: .9; max-width: 620px; }
.hero .btn { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.3); backdrop-filter: blur(4px); position: relative; z-index: 1; }
.hero .btn:hover { background: rgba(255,255,255,.28); }

/* Tabel */
.table-wrap { overflow: auto; border-radius: 0 0 var(--r) var(--r); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 700; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding: 11px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl th.sort { cursor: pointer; }
.tbl th.sort:hover { color: var(--primary); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:hover td { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .c { text-align: center; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .big { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.empty .big svg { width: 30px; height: 30px; }

.nilai-pill { display: inline-block; min-width: 52px; text-align: center; font-weight: 800; padding: 3px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.nilai-pill.ok { background: var(--ok-soft); color: var(--ok); }
.nilai-pill.bad { background: var(--bad-soft); color: var(--bad); }

/* Ujian cards */
.exam-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; transition: .2s; position: relative; overflow: hidden; }
.exam-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.exam-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--grad); }
.exam-card h4 { font-size: 15.5px; font-weight: 700; }
.exam-card .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.exam-card .foot { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.sec-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.sec-chip { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }

/* Editor kunci */
.sec-block { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.sec-block.off .sec-body { display: none; }
.sec-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--surface-2); flex-wrap: wrap; }
.sec-head .t { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sec-head .letter { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.sec-head .spacer { flex: 1; }
.sec-body { padding: 16px 18px; border-top: 1px solid var(--border); }
.key-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 8px 14px; }
.key-item { display: flex; align-items: center; gap: 8px; }
.key-item .no { width: 26px; text-align: right; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.bub { display: inline-flex; gap: 4px; }
.bub button { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); font: 700 12px var(--font); cursor: pointer; transition: .12s; display: grid; place-items: center; padding: 0; }
.bub button:hover { border-color: var(--primary-2); color: var(--primary); }
.bub button.on { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 10px -3px var(--primary); }
.bub button.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.bub button.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.bub button.key { box-shadow: 0 0 0 2px var(--ok) inset; color: var(--ok); }
.bub button.wide { width: auto; border-radius: 99px; padding: 0 10px; }
.inline-num { width: 76px; }

/* Dropzone & antrean scan */
.drop { border: 2px dashed color-mix(in srgb, var(--primary) 40%, var(--border)); border-radius: 18px; padding: 34px 20px; text-align: center; background: linear-gradient(180deg, var(--primary-soft), transparent); cursor: pointer; transition: .2s; }
.drop.over, .drop:hover { border-color: var(--primary); background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 18%, transparent), transparent); }
.drop .big { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 10px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px var(--primary); }
.drop .big svg { width: 30px; height: 30px; }
.drop h4 { font-size: 16px; }
.queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.q-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; }
.q-thumb { aspect-ratio: 3/4; max-height: 210px; width: 100%; background: var(--bg-2) center top / cover no-repeat; position: relative; }
.q-thumb .angle { position: absolute; left: 8px; bottom: 8px; }
.q-thumb .nilai-big { position: absolute; right: 10px; top: 10px; background: rgba(255,255,255,.95); color: #0f172a; font-weight: 800; font-size: 18px; padding: 4px 10px; border-radius: 10px; box-shadow: var(--shadow); }
.q-thumb .nilai-big.bad { color: #dc2626; } .q-thumb .nilai-big.ok { color: #16a34a; }
.q-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.q-body .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-body .flags { font-size: 11.5px; color: var(--warn); }
.q-foot { display: flex; gap: 6px; padding: 0 14px 12px; flex-wrap: wrap; }
.progress { height: 6px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .3s; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shimmer { background: linear-gradient(90deg, var(--bg-2) 25%, var(--surface-2) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 11, 22, .55); backdrop-filter: blur(4px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal.lg { width: min(900px, 100%); }
.modal.xl { width: min(1360px, 100%); height: calc(100vh - 40px); }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-h h3 { font-size: 16px; font-weight: 700; flex: 1; display: flex; gap: 8px; align-items: center; }
.modal-b { padding: 20px; overflow: auto; flex: 1; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* Review */
.review { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); height: 100%; min-height: 0; }
.review .img-pane { background: #1b2033; position: relative; overflow: hidden; min-height: 300px; }
.review .img-pane .viewport { position: absolute; inset: 0; overflow: auto; cursor: grab; }
.review .img-pane img { display: block; transform-origin: 0 0; max-width: none; }
.review .img-tools { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 4px; background: rgba(15,18,32,.85); padding: 6px; border-radius: 12px; backdrop-filter: blur(6px); z-index: 2; flex-wrap: wrap; justify-content: center; max-width: 95%; }
.review .img-tools button { background: transparent; border: 0; color: #d5dbee; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; font: 600 12px var(--font); }
.review .img-tools button:hover { background: rgba(255,255,255,.12); color: #fff; }
.review .img-tools .val { color: #fff; font: 600 12px var(--mono); padding: 0 6px; display: grid; place-items: center; }
.review .form-pane { overflow: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.ans-sec h5 { margin: 0 0 8px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.ans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 12px; }
.ans-row { display: flex; align-items: center; gap: 6px; }
.ans-row .no { width: 22px; text-align: right; font-weight: 700; font-size: 12px; color: var(--muted); }
.ans-row .bub button { width: 27px; height: 27px; font-size: 11px; }
.score-bar { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--grad); color: #fff; position: sticky; top: -18px; z-index: 2; box-shadow: var(--shadow); flex-wrap: wrap; }
.score-bar .big { font-size: 26px; font-weight: 800; }
.score-bar .parts { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; opacity: .95; }
.score-bar .parts span { background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 99px; }
.essay { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }

/* Grafik */
.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 230px; }

/* Distribusi opsi */
.dist { display: flex; gap: 3px; align-items: flex-end; height: 34px; }
.dist .col { width: 22px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dist .bar { width: 100%; background: var(--soft); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .55; }
.dist .bar.k { background: var(--ok); opacity: 1; }
.dist .bar.bad { background: var(--bad); opacity: .8; }
.dist small { font-size: 9.5px; font-weight: 700; color: var(--muted); line-height: 1; }

/* AI provider cards */
.prov { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.prov label { border: 2px solid var(--border); border-radius: 14px; padding: 16px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; transition: .15s; background: var(--surface); }
.prov label:hover { border-color: var(--primary-2); }
.prov input { display: none; }
.prov input:checked + .pc { --c: var(--primary); }
.prov label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.prov .logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; font-weight: 800; }
.prov .logo.claude { background: linear-gradient(135deg, #d97757, #b5512f); }
.prov .logo.gemini { background: linear-gradient(135deg, #4285f4, #9b72cb 60%, #d96570); }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: #0b1020; color: #fff; position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art::before { content: ''; position: absolute; inset: 0; background: radial-gradient(700px 500px at 10% 0%, rgba(99,102,241,.55), transparent 60%), radial-gradient(600px 500px at 100% 100%, rgba(20,184,166,.4), transparent 60%); }
.login-art > * { position: relative; }
.login-art .brand b { font-size: 24px; }
.login-art h2 { font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; max-width: 520px; }
.login-art h2 span { background: linear-gradient(90deg, #a5b4fc, #5eead4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-art p { color: #b6bdd6; max-width: 480px; font-size: 15px; }
.feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; margin-top: 26px; }
.feat div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 14px; font-size: 13px; color: #d6dbee; display: flex; gap: 10px; align-items: center; }
.feat svg { color: #5eead4; }
.sheet-art { position: absolute; right: -40px; top: 90px; width: 300px; opacity: .14; transform: rotate(8deg); }
.login-form { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.login-form form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login-form h3 { font-size: 26px; font-weight: 800; }

/* Toast */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-lg); min-width: 260px; max-width: 380px; display: flex; gap: 10px; align-items: flex-start; animation: pop .2s; font-weight: 500; }
.toast.ok { border-left-color: var(--ok); } .toast.bad { border-left-color: var(--bad); } .toast.warn { border-left-color: var(--warn); }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.legend-dots { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend-dots i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Cetak */
.print-only { display: none; }
@media print {
  body { background: #fff; color: #000; font-size: 11px; }
  .sidebar, .topbar, .no-print, #toasts, .btn { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; }
  .print-only { display: block; }
  .tbl th { background: #eee !important; color: #000; position: static; }
  .tbl td, .tbl th { border: 1px solid #999; padding: 4px 6px; }
  .table-wrap { overflow: visible; }
  .kop { display: flex; align-items: center; gap: 14px; border-bottom: 3px double #000; padding-bottom: 8px; margin-bottom: 12px; }
  .kop img { width: 60px; }
  .ttd { margin-top: 30px; display: flex; justify-content: flex-end; text-align: center; }
  .chart-box { height: 220px; page-break-inside: avoid; }
}

/* Responsif */
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .review { grid-template-columns: 1fr; grid-template-rows: 46vh auto; height: auto; } .modal.xl { height: auto; } .review .form-pane { overflow: visible; } }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; }
  .menu-btn { display: inline-flex; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 28px 20px; min-height: auto; }
  .login-art h2 { font-size: 28px; }
  .feat, .sheet-art { display: none; }
}
@media (max-width: 640px) {
  .content { padding: 16px 16px 60px; }
  .topbar { padding: 12px 16px; }
  .topbar > .badge { display: none; }
  .topbar h1 { font-size: 16px; }
  .g4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 14px; } .stat .v { font-size: 21px; }
  .card-b { padding: 16px; }
  .prov { grid-template-columns: 1fr; }
  .modal-bg { padding: 0; }
  .modal, .modal.lg, .modal.xl { width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .key-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 20px; } .hero h2 { font-size: 20px; }
  .kv { grid-template-columns: 110px 1fr; }
}
