/* ============================================================
   Soro Dokumen — design system
   ============================================================ */
:root {
  --brand: #0b6bde;
  --brand-600: #0a5cc0;
  --brand-700: #084a9c;
  --brand-50: #eef5ff;
  --brand-100: #dbe9ff;
  --accent: #f2a900;
  --accent-50: #fff7e0;
  --navy: #0a1a36;
  --navy-2: #11264a;
  --ink: #0f1b2d;
  --ink-2: #3b4a60;
  --muted: #6b7a90;
  --line: #e4e9f1;
  --line-2: #eef2f7;
  --bg: #f4f7fb;
  --card: #ffffff;
  --ok: #0f9d6b;
  --ok-50: #e7f7f0;
  --warn: #c77700;
  --warn-50: #fff4e0;
  --bad: #d93a3a;
  --bad-50: #fdeeee;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06);
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 8px 24px -12px rgba(15, 27, 45, .14);
  --shadow-lg: 0 30px 60px -30px rgba(8, 40, 100, .45);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 14.5px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--ink); }
p { margin: 0; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .02em; }
.serif { font-family: var(--serif); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hide { display: none !important; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font: 600 14px/1 var(--sans); cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(11, 107, 222, .7); }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { background: var(--bg); color: var(--ink); border-color: #d5dde9; }
.btn-soft { background: var(--brand-50); color: var(--brand-700); }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-700); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #0b8a5d; color: #fff; }
.btn-danger { background: var(--bad-50); color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); color: var(--ink); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; padding: 0; height: 34px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .label { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--bad); font-weight: 500; }
.input, select.input, textarea.input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcfe; font: 500 14.5px var(--sans); color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s; }
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(11, 107, 222, .12); }
.input.is-invalid { border-color: var(--bad); background: #fffafa; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233b4a60' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input-sm { height: 36px; font-size: 13.5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.date-3 { display: grid; grid-template-columns: .8fr 1.4fr 1fr; gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; flex-wrap: wrap; }
.input-group { position: relative; }
.input-group .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-group .input { padding-left: 40px; }
.toggle-pass { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; border: 1px solid transparent; }
.alert .ic { margin-top: 1px; }
.alert-success { background: var(--ok-50); color: #0b6e4b; border-color: #c4ecd9; }
.alert-error { background: var(--bad-50); color: #a52626; border-color: #f6cfcf; }
.alert-info { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.alert-warn { background: var(--warn-50); color: #8a5300; border-color: #f7ddb0; }
.alert .close { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 0; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-ok { background: var(--ok-50); color: var(--ok); }
.b-warn { background: var(--warn-50); color: var(--warn); }
.b-bad { background: var(--bad-50); color: var(--bad); }
.b-info { background: var(--brand-50); color: var(--brand-700); }
.b-mute { background: var(--line-2); color: var(--muted); }
.b-gold { background: var(--accent-50); color: #9a6a00; }

/* ============================================================
   PORTAL (publik)
   ============================================================ */
.portal-body { min-height: 100vh; display: flex; flex-direction: column; background:
  radial-gradient(1200px 600px at 110% -10%, #dbe9ff 0, transparent 60%),
  radial-gradient(900px 500px at -10% 110%, #e8f1ff 0, transparent 60%), #f3f6fb; }
.portal-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.split { width: 100%; max-width: 1180px; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); min-height: 620px; }
.split-hero { position: relative; overflow: hidden; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; background: linear-gradient(160deg, #0d74ec 0%, #0b63d0 55%, #0a55b6 100%); }
.split-hero::before { content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 60px; background: rgba(255, 255, 255, .09); transform: rotate(18deg); }
.split-hero::after { content: ""; position: absolute; left: -80px; bottom: -140px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .12), transparent 70%); }
.split-hero > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { width: 58px; height: 58px; border-radius: 16px; background: #fff; padding: 5px; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45); display: grid; place-items: center; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-weight: 800; letter-spacing: .14em; font-size: 22px; text-transform: uppercase; line-height: 1.1; }
.brand-sub { font-size: 12px; opacity: .8; letter-spacing: .04em; font-weight: 500; }
.hero-body { margin-top: auto; margin-bottom: auto; padding: 48px 0 24px; }
.eyebrow { font-family: var(--serif); font-weight: 700; letter-spacing: .18em; font-size: 13px; text-transform: uppercase; opacity: .9; }
.hero-title { font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.15; color: #fff; margin: 14px 0 16px; letter-spacing: -.01em; }
.hero-text { font-family: var(--serif); font-size: 17px; opacity: .95; max-width: 470px; }
.hero-points { display: grid; gap: 12px; margin-top: 30px; }
.hero-point { display: flex; gap: 10px; align-items: center; font-family: var(--serif); font-weight: 600; font-size: 15px; }
.hero-point .ic { width: 20px; height: 20px; opacity: .95; }
.soro-meaning { margin-top: 26px; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(6px); max-width: 480px; }
.soro-meaning b { font-family: var(--serif); font-size: 15px; }
.soro-meaning p { font-size: 13px; opacity: .92; margin-top: 4px; }
.soro-meaning em { font-style: normal; opacity: .75; }
.hero-foot { display: flex; align-items: center; gap: 12px; font-size: 12.5px; opacity: .9; }
.hero-foot img { width: 34px; height: 34px; background: #fff; border-radius: 50%; padding: 3px; }

.split-form { padding: 40px 56px; display: flex; flex-direction: column; background: linear-gradient(180deg, #fbfcff, #fff); }
.split-top { display: flex; justify-content: flex-end; gap: 10px; }
.split-top .btn-light { border-color: #cfdcef; color: var(--brand-700); font-family: var(--serif); font-weight: 700; }
.form-box { margin: auto 0; padding: 28px 0; max-width: 480px; width: 100%; align-self: center; }
.form-title { font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.form-lead { font-family: var(--serif); color: var(--ink-2); margin: 8px 0 26px; font-size: 15.5px; }
.split-form .field > label { font-family: var(--serif); font-size: 15px; }
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-img { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #eff5ff; flex: none; width: 138px; object-fit: cover; }
.captcha-row .input { text-transform: uppercase; letter-spacing: .25em; font-weight: 700; }
.split-credit { text-align: center; font-family: var(--serif); font-size: 13px; color: var(--muted); }
.split-credit b { color: var(--ink-2); }
.split-credit .logos { display: flex; justify-content: center; gap: 10px; margin-bottom: 8px; }
.split-credit .logos img { height: 30px; width: auto; opacity: .9; }

/* Hasil & verifikasi */
.page-portal { width: 100%; max-width: 980px; margin: 0 auto; padding: 28px 16px 48px; }
.portal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.portal-head .brand-logo { width: 46px; height: 46px; border-radius: 12px; }
.portal-head .brand-name { color: var(--ink); font-size: 18px; }
.portal-head .brand-sub { color: var(--muted); opacity: 1; }
.session-pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; color: var(--ink-2); }
.hero-card { border-radius: 24px; background: linear-gradient(135deg, #0d74ec, #0a55b6); color: #fff; padding: 28px 30px; display: flex; gap: 22px; align-items: center; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-card::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50px; background: rgba(255, 255, 255, .08); transform: rotate(20deg); }
.hero-card .avatar { width: 64px; height: 64px; font-size: 22px; background: rgba(255, 255, 255, .16); color: #fff; border: 2px solid rgba(255, 255, 255, .35); }
.hero-card h1 { color: #fff; font-family: var(--serif); font-size: 26px; }
.hero-card .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; font-size: 14px; opacity: .92; }
.hero-card .meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-card .meta .ic { width: 15px; height: 15px; }
.school-block { margin-top: 22px; }
.school-title { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.school-title img, .school-title .avatar { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.school-title h2 { font-family: var(--serif); font-size: 19px; }
.doc-list { display: grid; gap: 12px; }
.doc-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.doc-card:hover { border-color: #cfdcef; box-shadow: var(--shadow); }
.doc-card.utama { border-color: #bcd5fb; background: linear-gradient(90deg, #f5f9ff, #fff 45%); }
.doc-icon { width: 52px; height: 60px; border-radius: 10px; background: #fff0f0; color: #d93a3a; display: grid; place-items: center; font-weight: 800; font-size: 11px; letter-spacing: .06em; flex: none; position: relative; border: 1px solid #f8d6d6; }
.doc-icon .ic { width: 24px; height: 24px; margin-bottom: 12px; }
.doc-icon span { position: absolute; bottom: 7px; }
.doc-info { flex: 1; min-width: 0; }
.doc-info h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-info .sub { color: var(--muted); font-size: 13px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.doc-actions { display: flex; gap: 8px; flex: none; }
.empty-doc { background: #fff; border: 1px dashed #cfdcef; border-radius: 18px; padding: 22px; display: flex; gap: 14px; align-items: flex-start; color: var(--ink-2); }
.empty-doc .ic { color: var(--warn); width: 22px; height: 22px; }
.qr-box { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-top: 12px; }
.qr-box canvas, .qr-box img { width: 96px !important; height: 96px !important; }
.portal-note { margin-top: 26px; font-size: 13px; color: var(--muted); text-align: center; }

.verify-card { max-width: 620px; margin: 0 auto; background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; }
.verify-head { padding: 26px 28px; display: flex; gap: 16px; align-items: center; color: #fff; }
.verify-head.ok { background: linear-gradient(135deg, #10a673, #0b8a5d); }
.verify-head.bad { background: linear-gradient(135deg, #e04b4b, #b72f2f); }
.verify-head.neutral { background: linear-gradient(135deg, #0d74ec, #0a55b6); }
.verify-head .seal { width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex: none; }
.verify-head .seal .ic { width: 30px; height: 30px; }
.verify-head h1 { color: #fff; font-family: var(--serif); font-size: 22px; }
.verify-head p { opacity: .92; font-size: 14px; margin-top: 2px; }
.verify-body { padding: 24px 28px 28px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #c7d2e5; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40; background-image: radial-gradient(500px 300px at 0 0, rgba(13, 116, 236, .22), transparent 70%); }
.sb-brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; }
.sb-brand .brand-logo { width: 42px; height: 42px; border-radius: 11px; padding: 3px; }
.sb-brand .brand-name { color: #fff; font-size: 15px; letter-spacing: .14em; }
.sb-brand .brand-sub { color: #8ea0bf; opacity: 1; font-size: 11.5px; }
.sb-context { margin: 4px 14px 10px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .07); }
.sb-context .lbl { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #8ea0bf; font-weight: 700; }
.sb-context .nm { color: #fff; font-weight: 700; font-size: 13.5px; margin-top: 3px; line-height: 1.3; }
.sb-context form { margin-top: 8px; }
.sb-context .btn { height: 28px; font-size: 12px; background: rgba(255, 255, 255, .1); color: #fff; width: 100%; }
.sb-context .btn:hover { background: rgba(255, 255, 255, .18); }
.sb-nav { padding: 6px 12px 16px; flex: 1; }
.sb-sec { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #6f82a3; font-weight: 700; padding: 16px 10px 8px; }
.sb-link { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: #c7d2e5; font-weight: 500; font-size: 14px; transition: background .12s, color .12s; margin-bottom: 2px; }
.sb-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sb-link.active { background: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px rgba(13, 116, 236, .9); }
.sb-link .ic { width: 19px; height: 19px; opacity: .9; }
.sb-link .count { margin-left: auto; background: var(--accent); color: #3a2800; font-size: 11px; font-weight: 800; border-radius: 99px; padding: 1px 7px; }
.sb-foot { padding: 14px 16px 18px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 11.5px; color: #6f82a3; }
.sb-foot .logos { display: flex; gap: 8px; margin-bottom: 8px; }
.sb-foot .logos img { width: 26px; height: 26px; border-radius: 50%; background: #fff; padding: 2px; object-fit: contain; }

.sb-backdrop { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: rgba(244, 247, 251, .85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); }
.topbar .menu-btn { display: none; }
.topbar h1 { font-size: 18px; font-weight: 700; }
.crumb { font-size: 12.5px; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 5px; border-radius: 99px; background: #fff; border: 1px solid var(--line); cursor: pointer; position: relative; }
.user-chip .nm { font-weight: 700; font-size: 13px; line-height: 1.1; }
.user-chip .rl { font-size: 11.5px; color: var(--muted); }
.user-chip .txt { padding-right: 8px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 210px; padding: 6px; display: none; }
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font: 500 14px var(--sans); color: var(--ink); background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg); }
.dropdown .danger { color: var(--bad); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-700); font-weight: 800; font-size: 12.5px; flex: none; letter-spacing: .02em; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.content { padding: 26px 28px 48px; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-head h3 { font-size: 15.5px; font-weight: 700; }
.card-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 20px; }
.card + .card { margin-top: 18px; }

.welcome { position: relative; overflow: hidden; border-radius: 20px; padding: 24px 26px; color: #fff; background: linear-gradient(120deg, #0a1a36 0%, #0d3e86 55%, #0b6bde 100%); display: flex; align-items: center; gap: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.welcome::after { content: ""; position: absolute; right: -40px; top: -70px; width: 240px; height: 240px; border-radius: 48px; background: rgba(255, 255, 255, .07); transform: rotate(20deg); }
.welcome h2 { color: #fff; font-family: var(--serif); font-size: 24px; font-weight: 700; }
.welcome p { opacity: .85; margin-top: 4px; font-size: 14px; }
.welcome .actions { margin-left: auto; display: flex; gap: 8px; position: relative; z-index: 1; flex-wrap: wrap; }
.welcome .btn-light { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); color: #fff; }
.welcome .btn-light:hover { background: rgba(255, 255, 255, .2); }
.welcome .btn-primary { background: #fff; color: var(--brand-700); box-shadow: none; }
.welcome .logo { width: 58px; height: 58px; border-radius: 14px; background: #fff; padding: 4px; flex: none; object-fit: contain; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat .top { display: flex; align-items: center; justify-content: space-between; }
.stat .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat .val { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.stat .foot { font-size: 12.5px; color: var(--muted); }
.stat .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.stat .ico .ic { width: 20px; height: 20px; }
.ico-blue { background: var(--brand-50); color: var(--brand); }
.ico-green { background: var(--ok-50); color: var(--ok); }
.ico-gold { background: var(--accent-50); color: #b27c00; }
.ico-rose { background: #fdeef3; color: #cf3f73; }
.ico-violet { background: #f1edff; color: #6b4ee6; }

.dash-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; margin-bottom: 18px; }
.dash-grid .card + .card { margin-top: 0; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.s0 { stroke: var(--brand); }
.chart .line.s1 { stroke: var(--accent); }
.chart .dot { stroke-width: 2; fill: #fff; }
.chart .dot.s0 { stroke: var(--brand); }
.chart .dot.s1 { stroke: var(--accent); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.donut { width: 150px; height: 150px; }
.donut .track { fill: none; stroke: var(--line-2); stroke-width: 14; }
.donut .value { fill: none; stroke: var(--brand); stroke-width: 14; stroke-linecap: round; transition: stroke-dasharray .6s; }
.donut .pct { font-size: 26px; font-weight: 800; fill: var(--ink); font-family: var(--sans); }
.donut .cap { font-size: 10.5px; fill: var(--muted); font-family: var(--sans); }
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-legend { display: grid; gap: 10px; font-size: 13.5px; flex: 1; }
.donut-legend div { display: flex; justify-content: space-between; gap: 10px; }
.donut-legend b { font-weight: 800; }

.progress { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #3d8ff0); }
.progress.ok > i { background: linear-gradient(90deg, var(--ok), #34c08e); }
.year-row { display: grid; grid-template-columns: 56px 1fr 90px; gap: 12px; align-items: center; padding: 9px 0; font-size: 13.5px; }
.year-row + .year-row { border-top: 1px dashed var(--line-2); }
.year-row .y { font-weight: 800; }
.year-row .n { text-align: right; color: var(--muted); font-size: 12.5px; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line-2); align-items: flex-start; }
.feed li:first-child { border-top: 0; }
.feed .dot-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.feed .dot-ic .ic { width: 16px; height: 16px; }
.feed .t { font-size: 13.5px; }
.feed .m { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* Tables */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.toolbar .search { flex: 1; min-width: 220px; max-width: 360px; }
.toolbar .input { height: 38px; font-size: 13.5px; }
.toolbar select.input { width: auto; min-width: 140px; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 11px 16px; background: #fafbfd; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }
.table .person { display: flex; align-items: center; gap: 11px; }
.table .person > div { min-width: 150px; }
.table .person .nm { font-weight: 700; color: var(--ink); }
.table .person .sub { font-size: 12px; color: var(--muted); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager { display: flex; gap: 4px; }
.pager a, .pager span { min-width: 34px; height: 34px; padding: 0 10px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .cur { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .gap { border: 0; background: none; }
.bulkbar { display: none; align-items: center; gap: 10px; padding: 10px 16px; background: var(--brand-50); border-bottom: 1px solid var(--brand-100); font-size: 13.5px; font-weight: 600; color: var(--brand-700); flex-wrap: wrap; }
.bulkbar.show { display: flex; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { width: 44px; height: 44px; color: #b7c4d8; margin: 0 auto 12px; }
.empty h4 { color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

.tabs { display: flex; gap: 4px; padding: 5px; background: var(--line-2); border-radius: 12px; width: max-content; margin-bottom: 16px; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.tabs a.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.layout-2 { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.layout-2 .card + .card { margin-top: 18px; }
.info-list { display: grid; gap: 0; }
.info-list div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); font-size: 13.5px; }
.info-list div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 600; text-align: right; }

.doc-row { display: grid; grid-template-columns: 48px 1fr; gap: 10px 14px; align-items: start; padding: 16px 20px; border-top: 1px solid var(--line-2); }
.doc-row .acts { grid-column: 2; justify-content: flex-start !important; }
.doc-row:first-child { border-top: 0; }
.doc-row .doc-icon { width: 44px; height: 52px; }
.doc-row .doc-icon.none { background: var(--line-2); color: #a4b1c4; border-color: var(--line); }
.doc-row h4 { font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doc-row .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.doc-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.doc-form { grid-column: 1 / -1; background: #fafcff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 4px; }

.dropzone { border: 2px dashed #c6d6ee; border-radius: 16px; background: #f8fbff; padding: 34px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-50); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .ic { width: 40px; height: 40px; color: var(--brand); margin: 0 auto 10px; }
.dropzone h4 { font-size: 16px; }
.dropzone p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.file-list { margin-top: 12px; display: grid; gap: 6px; font-size: 13px; text-align: left; }
.file-list div { display: flex; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }

.steps { counter-reset: s; display: grid; gap: 14px; }
.steps li { list-style: none; position: relative; padding-left: 40px; font-size: 13.5px; color: var(--ink-2); }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-50); color: var(--brand-700); font-weight: 800; display: grid; place-items: center; font-size: 12.5px; }
.steps { padding: 0; margin: 0; }
.steps b { color: var(--ink); }
code.k { background: var(--line-2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: var(--ink); }

.result-list { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.result-list div { display: flex; gap: 10px; justify-content: space-between; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.result-list div:last-child { border-bottom: 0; }

dialog.modal { border: 0; border-radius: 18px; padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10, 26, 54, .45); backdrop-filter: blur(2px); }
.modal-head { padding: 18px 20px 0; display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 16px 20px 20px; }

.auth-foot { text-align: center; font-size: 12.5px; color: var(--muted); padding: 18px; }

/* Error */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.error-box { text-align: center; max-width: 440px; }
.error-box .code { font-family: var(--serif); font-size: 84px; font-weight: 700; color: var(--brand); line-height: 1; }
.error-box h1 { font-size: 22px; margin: 10px 0 8px; }
.error-box p { color: var(--muted); margin-bottom: 20px; }

/* Install */
.install { max-width: 760px; margin: 32px auto; padding: 0 16px 48px; }
.check-list { display: grid; gap: 8px; }
.check-list div { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.check-list .ok { color: var(--ok); }
.check-list .no { color: var(--bad); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .layout-2 { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; border-radius: 22px; min-height: 0; }
  .split-hero { padding: 28px 26px; }
  .hero-body { padding: 26px 0 8px; }
  .hero-title { font-size: 28px; }
  .soro-meaning, .hero-foot { display: none; }
  .split-form { padding: 26px; }
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sb-backdrop { position: fixed; inset: 0; background: rgba(10, 26, 54, .45); z-index: 35; display: none; }
  .sb-backdrop.show { display: block; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px 40px; }
  .user-chip .txt { display: none; }
  .user-chip { padding: 3px; }
}
@media (max-width: 640px) {
  .portal-wrap { padding: 12px; }
  .split-hero { padding: 22px 20px; }
  .hero-points { display: none; }
  .hero-text { font-size: 15px; }
  .brand-name { font-size: 18px; }
  .split-form { padding: 22px 20px; }
  .form-title { font-size: 25px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat .val { font-size: 22px; }
  .stat .ico { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .welcome { flex-wrap: wrap; padding: 20px; }
  .welcome .actions { margin-left: 0; }
  .welcome .logo { display: none; }
  .doc-card { flex-wrap: wrap; }
  .doc-actions { width: 100%; }
  .doc-actions .btn { flex: 1; }
  .hero-card { flex-direction: column; align-items: flex-start; padding: 22px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .doc-row { grid-template-columns: 40px 1fr; }
  .doc-row .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .page-head h2 { font-size: 21px; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut { margin: 0 auto; }
  .toolbar .search { max-width: none; }
  .hide-sm { display: none; }
}
@media print {
  .sidebar, .topbar, .doc-actions, .btn { display: none !important; }
}
.hero-foot .tagline { font-weight: 700; letter-spacing: .02em; }

/* ============================================================
   SPLASH SCREEN (halaman depan, sekali per sesi)
   ============================================================ */
html.splash-on, html.splash-on body { overflow: hidden; }
.splash { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: radial-gradient(900px 600px at 50% 42%, #142b52 0%, #0d1a33 55%, #091224 100%); color: #e8eefb;
  transition: opacity .45s ease, visibility .45s; }
.splash.out { opacity: 0; visibility: hidden; }
.splash-glow { position: absolute; width: 520px; height: 520px; left: 50%; top: 42%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(11, 107, 222, .35), rgba(242, 194, 48, .08) 45%, transparent 70%); filter: blur(10px);
  animation: splashGlow 2s ease-in-out both; }
.splash-inner { position: relative; text-align: center; padding: 24px; }
.splash-logo { position: relative; width: 150px; height: 150px; margin: 0 auto 26px; }
.splash-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: splashSpin 1.4s linear infinite; }
.splash-ring .track { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 4; }
.splash-ring .arc { fill: none; stroke: url(#ringGrad); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 300 465; }
.splash-badge { position: absolute; inset: 16px; border-radius: 50%; background: #fff; display: grid; place-items: center; padding: 18px; overflow: hidden;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .06), 0 18px 50px -10px rgba(11, 107, 222, .7);
  animation: splashPop .7s cubic-bezier(.2, 1.4, .4, 1) both, splashBreath 2s ease-in-out .7s infinite; }
.splash-badge img { width: 100%; height: 100%; min-height: 0; max-height: 100%; object-fit: contain; }
.splash-title { margin: 0; color: #fff; font-family: var(--sans); font-weight: 800; font-size: 30px; letter-spacing: .22em; }
.splash-title span { display: inline-block; opacity: 0; animation: splashLetter .45s ease-out both; animation-delay: calc(.35s + var(--i) * 45ms); }
.splash-sub { margin-top: 8px; font-size: 13.5px; color: #9fb3d6; letter-spacing: .04em; opacity: 0; animation: splashFade .5s ease .9s both; }
.splash-bar { width: 220px; height: 3px; margin: 24px auto 12px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #5fa8ff, #0b6bde, #f2c230);
  transform-origin: left; animation: splashBar 1.8s cubic-bezier(.4, 0, .2, 1) .1s both; }
.splash-msg { position: relative; height: 20px; font-size: 13px; color: #c6d4ee; }
.splash-msg span { position: absolute; left: 0; right: 0; opacity: 0; }
.splash-msg span:nth-child(1) { animation: splashMsg1 2s ease both; }
.splash-msg span:nth-child(2) { animation: splashMsg2 2s ease both; }
.splash-tag { margin-top: 18px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: #f2c230; opacity: 0; animation: splashFade .5s ease 1.1s both; }
@keyframes splashSpin { to { transform: rotate(360deg); } }
@keyframes splashPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes splashBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes splashGlow { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes splashLetter { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes splashFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes splashBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes splashMsg1 { 0%, 10% { opacity: 0; } 20%, 48% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes splashMsg2 { 0%, 55% { opacity: 0; } 65%, 100% { opacity: 1; } }
@media (max-width: 640px) {
  .splash-logo { width: 124px; height: 124px; }
  .splash-title { font-size: 23px; letter-spacing: .18em; }
}
@media (prefers-reduced-motion: reduce) {
  .splash *, .splash { animation: none !important; }
  .splash-title span, .splash-sub, .splash-tag, .splash-msg span:nth-child(1) { opacity: 1; }
  .splash-bar i { transform: none; }
}
