/* Ciputra Hospital Learning System — warna korporat: navy #1B3F73, biru #1C8DEA */
:root {
  --navy: #1B3F73; --navy-d: #132E55; --navy-dd: #0F2444; --blue: #1C8DEA;
  --tint: #EEF6FE; --tint2: #DCEBFB; --tint-b: #A9D2F6;
  --ink: #0F172A; --ink2: #334155; --muted: #475569; --line: #E2E8F0; --bg: #F1F5F9;
  --ok: #0F2444; --bad: #991B1B; --bad-bg: #FEF2F2; --warn: #9A3412; --warn-bg: #FFF7ED;
  --r: 12px; --shadow: 0 1px 3px rgba(15, 23, 42, .06);
  --surface: #fff; --surface2: #F8FAFC; --surface3: #F1F5F9; --line-soft: #F1F5F9; --field-b: #CBD5E1; --side: var(--navy-d); --side-cur: #24508F; --side-ink: #DCE7F5;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 15px; }
a { color: var(--navy); } a:hover { color: var(--navy-d); }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
img { max-width: 100%; }
.serif { font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; } .r { text-align: right; } .grow { flex: 1; min-width: 0; } .spacer { flex: 1; }
.full { grid-column: 1 / -1; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .06em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inline { display: inline; }
.ok-text { color: var(--ok); font-weight: 600; } .bad-text { color: var(--bad); font-weight: 600; } .danger { color: #B91C1C !important; }

/* ---------- Tombol & form ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--field-b); background: var(--surface); color: var(--navy); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--navy); }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; } .btn-primary:hover { background: var(--navy-d); color: #fff; }
.btn-lg { min-height: 50px; font-size: 16px; } .btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.linklike { background: none; border: 0; padding: 0; color: var(--navy); font: inherit; font-weight: 600; cursor: pointer; min-height: 32px; }
.icon-btn { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.field-row { display: flex; justify-content: space-between; align-items: baseline; }
input, select, textarea { font: inherit; font-size: 15px; color: var(--ink); border: 1.5px solid var(--field-b); border-radius: 10px; padding: 0 12px; min-height: 44px; background: var(--surface); width: 100%; }
textarea { padding: 10px 12px; resize: vertical; }
select[multiple] { padding: 6px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--tint-b); border-color: var(--navy); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--navy); }
input[type=color] { padding: 2px; width: 46px; min-height: 36px; }
input.num { width: 76px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 36px; cursor: pointer; }
.pw-wrap { display: flex; border: 1.5px solid var(--field-b); border-radius: 10px; background: var(--surface); }
.pw-wrap input { border: 0; outline: none; }
.pw-toggle { border: 0; background: none; color: var(--navy); font-weight: 600; min-width: 64px; cursor: pointer; }
.pw-rules { list-style: none; margin: -4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; font-size: 13px; color: var(--muted); }
.pw-rules li::before { content: "○ "; } .pw-rules li.ok { color: var(--ok); } .pw-rules li.ok::before { content: "✓ "; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.option-edit { flex-direction: row; align-items: flex-end; gap: 12px; }
.option-edit .grow { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Komponen ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.empty { color: var(--muted); text-align: center; padding: 28px; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; border: 1px solid; }
.alert-success { background: var(--tint); border-color: var(--tint-b); color: var(--navy-d); }
.alert-info { background: #EFF6FF; border-color: #BFDBFE; color: #1E3A8A; }
.alert-error { background: var(--bad-bg); border-color: #FECACA; color: var(--bad); }
.alert-warn { background: var(--warn-bg); border-color: #FED7AA; color: var(--warn); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface3); color: var(--ink2); white-space: nowrap; }
.badge-ok { background: var(--tint2); color: var(--navy-dd); } .badge-info { background: #E0F2FE; color: #075985; }
.badge-warn { background: #FEF3C7; color: #78350F; } .badge-bad { background: #FEE2E2; color: var(--bad); }
.badges, .chips-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--tint-b); background: var(--tint); color: var(--navy-d); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-check { border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; }
.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.progress span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.progress.sm { width: 70px; height: 6px; margin: 0; display: inline-block; vertical-align: middle; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.stat span { display: block; font-size: 12px; color: var(--muted); } .stat strong { font-size: 24px; color: var(--navy); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { min-height: 46px; display: inline-flex; align-items: center; padding: 0 14px; text-decoration: none; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs a[aria-current] { color: var(--navy-d); border-color: var(--navy); }
.kv { margin: 0; display: grid; gap: 10px; } .kv.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kv dt { font-size: 12px; color: var(--muted); } .kv dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.callout { background: var(--tint); border: 1px solid var(--tint-b); border-radius: 10px; padding: 12px 14px; }
.table-card { padding: 0; overflow: hidden; } .table-card > h2 { padding: 16px 16px 0; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; background: var(--surface2); color: var(--ink2); font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table.compact td, .table.compact th { padding: 6px 8px; }
.row-bad td { background: #FEF6F6; } .row-warn td { background: #FFFBF5; }
.switch { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; color: var(--warn); cursor: pointer; }
.switch .knob { width: 36px; height: 22px; border-radius: 999px; background: var(--field-b); position: relative; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { color: var(--navy-d); } .switch.on .knob { background: var(--navy); } .switch.on .knob::after { left: 17px; }
.type-badge { display: inline-grid; place-items: center; min-width: 56px; height: 26px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.type-youtube { background: #FEE2E2; color: #991B1B; } .type-video { background: #E0E7FF; color: #3730A3; }
.type-pdf { background: #FCE7F3; color: #9D174D; } .type-ppt { background: #FFEDD5; color: #9A3412; }

/* ---------- Layout peserta ---------- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 10px clamp(14px, 3vw, 24px); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 44px; width: auto; }
.brand span { font-weight: 600; color: var(--navy); padding-left: 12px; border-left: 1px solid var(--field-b); white-space: nowrap; }
.topnav { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.topnav a, .topnav .linklike { min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; text-decoration: none; font-weight: 600; color: var(--ink2); font-size: 14px; }
.topnav a[aria-current] { background: var(--tint); color: var(--navy-d); }
.avatar-link { padding: 0 !important; margin-left: 4px; }
.avatar-link img, .avatar-link span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; object-fit: cover; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px clamp(14px, 3vw, 24px) 56px; }
.narrow-page { max-width: 820px; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.training-card h2 { margin-top: 8px; }
.stepper { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; font-size: 13px; font-weight: 600; }
.stepper li { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.stepper li.current { background: var(--navy); border-color: var(--navy); color: #fff; } .stepper li.done { background: var(--tint2); border-color: var(--tint2); color: var(--navy-dd); }
.stepper li.done::before { content: "✓ "; }
.step-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.step-card.highlight { border-color: var(--tint-b); background: var(--tint); }
.module-title { color: var(--navy); }
.mat-list, .mat-admin { list-style: none; margin: 0 0 8px; padding: 0; }
.mat-list li, .mat-admin li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.mat-state { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.row-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.score-mini { display: flex; gap: 8px; } .score-mini span { padding: 6px 12px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; }
.score-mini span.main { background: var(--tint); border-color: var(--tint-b); }
.score-mini strong { font-size: 16px; color: var(--ink); }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.score-box { padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.score-box span { display: block; font-size: 13px; color: var(--muted); } .score-box strong { font-size: 32px; }
.score-box.main { background: var(--tint); border-color: var(--tint-b); }
.action-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.test-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.timer { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.low { background: var(--bad-bg); color: var(--bad); border-color: #FECACA; }
.questions { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 14px; }
.questions fieldset { border: 0; margin: 0; padding: 0; } .questions legend { font-weight: 600; font-size: 16px; margin-bottom: 12px; padding: 0; }
.qnum { color: var(--navy); }
.option { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; margin-top: 8px; border: 1.5px solid var(--field-b); border-radius: 12px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--navy); background: var(--tint); }
.option input { flex-shrink: 0; }
.opt-letter { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--surface3); font-size: 13px; font-weight: 700; }
.opt-preview { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.profile-card { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.avatar-block { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 160px; text-align: center; }
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--tint2); }
.avatar-lg.initials { display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 32px; font-weight: 700; }
.profile-main { flex: 1 1 240px; } .profile-card .kv { flex: 1 1 300px; }
.narrow-form { max-width: 520px; }

/* ---------- Halaman materi + Asisten AI (responsif) ---------- */
.learn-shell { padding: 0; }
.learn-bar { display: flex; align-items: center; gap: 10px; padding: 8px clamp(14px, 3vw, 24px); background: var(--surface); border-bottom: 1px solid var(--line); }
.learn-bar .only-narrow, .learn-bar .only-mobile { margin-left: 0; } .learn-bar .btn-primary { margin-left: auto; }
.learn-body { display: flex; position: relative; min-height: calc(100vh - 122px); }
.learn-outline { flex: 0 0 270px; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 16px; overflow-y: auto; }
.outline-mod { margin: 14px 0 4px; font-size: 12px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; }
.outline-list { list-style: none; margin: 0; padding: 0; }
.outline-list a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink2); font-size: 14px; }
.outline-list a[aria-current] { background: var(--tint); color: var(--navy-dd); font-weight: 600; }
.learn-content { flex: 1 1 auto; min-width: 0; padding: 28px clamp(16px, 4vw, 44px) 48px; max-width: 900px; margin: 0 auto; }
.viewer { margin: 16px 0; }
.ratio { position: relative; aspect-ratio: 16 / 9; background: #0F172A; border-radius: 14px; overflow: hidden; }
.ratio iframe, .ratio video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pdf-frame { width: 100%; height: 75vh; min-height: 480px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.summary-box summary { cursor: pointer; font-weight: 600; }
.learn-ai { flex: 0 0 380px; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; max-height: calc(100vh - 122px); position: sticky; top: 0; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ai-head .icon-btn { margin-left: auto; }
.ai-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--tint2); color: var(--navy-d); font-weight: 700; font-size: 13px; flex-shrink: 0; }
.ai-disclaimer { margin: 0; padding: 8px 16px; background: #FFFBEB; border-bottom: 1px solid #FDE68A; color: #78350F; font-size: 12px; }
.ai-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.msg { max-width: 92%; padding: 10px 14px; border-radius: 16px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--surface3); border-bottom-left-radius: 4px; }
.msg.err { align-self: stretch; background: var(--bad-bg); color: var(--bad); }
.msg.note { align-self: stretch; background: #E0F2FE; color: #075985; font-size: 12px; }
.ai-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.ai-form textarea { min-height: 44px; }
.backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); z-index: 40; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.only-mobile, .only-narrow { display: none !important; }

@media (max-width: 1179px) { /* tablet: Asisten AI jadi panel geser */
  .only-narrow { display: inline-flex !important; }
  .learn-ai { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 92%); max-height: none; z-index: 50; box-shadow: 0 10px 30px rgba(15,23,42,.25); transform: translateX(105%); transition: transform .2s; }
  .learn-ai.open { transform: none; }
}
@media (max-width: 759px) { /* HP: daftar materi juga panel geser */
  body { font-size: 15px; } h1 { font-size: 22px; }
  .only-mobile { display: inline-flex !important; } .drawer-head.only-mobile { display: flex !important; }
  .learn-outline { position: absolute; top: 0; left: 0; bottom: 0; width: min(340px, 86%); z-index: 50; box-shadow: 0 10px 30px rgba(15,23,42,.25); transform: translateX(-105%); transition: transform .2s; }
  .learn-outline.open { transform: none; }
  .brand span { display: none; }
  .kv.two, .pw-rules { grid-template-columns: 1fr; }
  .pdf-frame { height: 60vh; min-height: 360px; }
}

/* ---------- Auth & halaman sederhana ---------- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-brand { flex: 1 1 420px; background: var(--side); color: #fff; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth-brand h1 { font-size: clamp(36px, 4vw, 52px); margin: 0; }
.auth-brand p { color: var(--side-ink); max-width: 460px; }
.auth-logo { height: 96px; width: auto; align-self: flex-start; }
.auth-form { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: clamp(24px, 5vw, 64px) 18px; }
.auth-form .card { width: 100%; max-width: 420px; padding: 26px; }
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.narrow { width: 100%; max-width: 460px; }
.logo-sm { height: 54px; width: auto; align-self: flex-start; }
.verify-status { font-size: 20px; font-weight: 700; padding: 12px 14px; border-radius: 12px; }
.verify-status.ok { background: var(--tint2); color: var(--navy-dd); } .verify-status.bad { background: #FEE2E2; color: var(--bad); }

/* ---------- Admin ---------- */
.admin-shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.admin-nav { flex: 1 1 230px; max-width: 100%; background: var(--side); padding: 18px 14px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; }
.admin-brand { flex: 1 1 100%; display: flex; align-items: center; gap: 12px; padding: 4px 6px 14px; color: var(--side-ink); font-size: 13px; font-weight: 600; line-height: 1.3; }
.admin-brand img { height: 52px; width: auto; }
.admin-nav a, .admin-nav button { flex: 1 1 170px; min-height: 44px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px; color: var(--side-ink); text-decoration: none; font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; text-align: left; }
.admin-nav form { flex: 1 1 170px; display: flex; } .admin-nav form button { flex: 1; }
.admin-nav a[aria-current] { background: var(--side-cur); color: #fff; font-weight: 600; }
.admin-nav a:hover, .admin-nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-main { flex: 999 1 640px; min-width: 0; padding: 24px clamp(14px, 3vw, 32px) 56px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .field { flex: 1 1 160px; } .filters .grow2 { flex: 2 1 240px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.module-sum { cursor: pointer; min-height: 32px; }
.add-material summary { list-style: none; margin-top: 10px; } .add-material[open] summary { margin-bottom: 12px; }
.cert-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.cert-preview { position: sticky; top: 12px; }
.preview-frame { position: relative; width: 100%; aspect-ratio: 297 / 440; overflow: hidden; border-radius: 10px; background: #E2E8F0; margin: 10px 0; }
.preview-frame iframe { position: absolute; top: 0; left: 0; width: 1180px; height: 1830px; border: 0; transform-origin: 0 0; }
.signer-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface2); }
.sticky-save { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; z-index: 5; }
@media (max-width: 1100px) { .cert-layout { grid-template-columns: 1fr; } .cert-preview { position: static; } }

/* ---------- Pengumuman ---------- */
.section-title { font-size: 18px; margin: 8px 0 12px; }
.ann-box { border-color: var(--tint-b); }
.ann-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.ann-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.ann { border: 1px solid var(--line); border-left-width: 4px; border-radius: 12px; padding: 12px 14px; margin-top: 10px; background: var(--surface); }
.ann-penting { border-left-color: #B91C1C; background: #FFFBFB; } .ann-info { border-left-color: var(--blue); }
.ann.is-read { opacity: .8; } .ann h3 { margin: 6px 0 4px; font-size: 16px; } .ann p { margin: 4px 0; }
.ann-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }

/* ===================== v1.2 ===================== */
[hidden] { display: none !important; }

/* Loader: logo Ciputra berputar */
.page-loader { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: rgba(241, 245, 249, .78);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
.page-loader.is-on, .page-loader.is-initial { opacity: 1; visibility: visible; transition: opacity .15s ease, visibility 0s linear 0s; }
@media (prefers-reduced-motion: reduce) { .loader-orbit::before, .loader-mark { animation-duration: 3s !important; } }
.loader-card { display: grid; justify-items: center; gap: 14px; }
.loader-orbit { position: relative; width: 104px; height: 104px; border-radius: 50%; background: var(--surface); display: grid; place-items: center;
  box-shadow: 0 12px 32px rgba(27, 63, 115, .18); perspective: 420px; }
.loader-orbit::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 3px solid var(--tint2); border-top-color: var(--blue); border-right-color: var(--navy);
  animation: chls-ring 1.1s linear infinite; }
.loader-mark { width: 66px; height: 66px; animation: chls-spin 1.8s cubic-bezier(.45, .05, .55, .95) infinite; }
.loader-text { font-weight: 700; color: var(--navy); font-size: 14px; letter-spacing: .02em; }
.loader-mark-sm { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; background: url(../img/logo-mark.png) center / contain no-repeat;
  animation: chls-spin 1.4s linear infinite; }
@keyframes chls-spin { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(360deg); } }
@keyframes chls-ring { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .loader-mark, .loader-mark-sm { animation: chls-pulse 1.6s ease-in-out infinite; }
  .loader-orbit::before { animation-duration: 3s; }
}
@keyframes chls-pulse { 50% { opacity: .45; } }

/* Alur pelatihan */
.flow-box { border: 1px solid var(--tint-b); background: var(--tint); border-radius: var(--r); padding: 14px 16px; margin: 0; }
.flow-box legend { font-weight: 700; color: var(--navy-d); padding: 0 6px; }
.preset-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.preset { text-align: left; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--tint-b); border-radius: 10px; background: var(--surface); font: inherit; cursor: pointer; color: var(--ink); min-height: 64px; }
.preset span { font-size: 12px; color: var(--muted); }
.preset:hover, .preset.is-on { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(28, 141, 234, .18); }
.flow-box .check { align-items: flex-start; }
.flow-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .flow-opts { grid-template-columns: 1fr; } }
.quiz-box { border: 1px dashed var(--tint-b); border-radius: 10px; padding: 10px 14px; margin: 0; }
.quiz-box legend { padding: 0 4px; font-weight: 600; }
.module-head { display: flex; align-items: center; gap: 6px; }
.quiz-sum { margin: 4px 0 8px; color: var(--ink2); }
.type-quiz { background: #FEF3C7; color: #92400E; }
.bank-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bank-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 600; font-size: 13px; color: var(--ink2); }
.bank-nav a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
.bank-nav a.is-off:not([aria-current]) { color: var(--muted); border-style: dashed; }
.bank-nav .count { background: rgba(15, 23, 42, .08); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.bank-nav a[aria-current] .count { background: rgba(255, 255, 255, .2); }
.next-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-left: 4px solid var(--blue); }
.next-card h2 { margin: 0; }
.mat-list li.is-locked { opacity: .72; }
.mat-list .quiz-row { background: #FFFBEB; border-radius: 10px; padding: 10px 12px; margin-top: 6px; border-bottom: 0; flex-wrap: wrap; }

/* Template & broadcast */
.tpl-layout { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 16px; align-items: start; }
.tpl-list tr.is-current td { background: var(--tint); }
.tpl-extra { margin-top: -6px; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.ph-chips .chip { min-height: 32px; padding: 0 10px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mail-preview { border: 1px solid var(--line); border-radius: var(--r); padding: 10px; background: #EEF2F7; }
.mail-preview iframe { width: 100%; height: 560px; border: 0; border-radius: 8px; background: #EEF2F7; }
.bc-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.4fr); gap: 20px; }
.bc-grid fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.bc-grid legend { font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.recipient-box { background: var(--tint); border: 1px solid var(--tint-b); border-radius: 10px; padding: 10px 12px; }
.recipient-box strong { color: var(--navy-d); font-size: 18px; }
.bc-progress .progress { height: 12px; margin: 10px 0 14px; }
.bc-progress-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bc-status { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; color: var(--navy-d); }
.filter-links { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-links a { padding: 6px 12px; border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--muted); }
.filter-links a[aria-current] { background: var(--tint2); color: var(--navy-d); }
.mail-body { white-space: pre-wrap; font-family: inherit; font-size: 14px; background: var(--surface2); padding: 12px; border-radius: 8px; margin: 10px 0 0; }
@media (max-width: 900px) {
  .tpl-layout, .bc-grid { grid-template-columns: 1fr; }
}

/* ===================== v1.3 · TEMA ===================== */
/* Bawaan (tanpa atribut / data-theme="terang") = tampilan korporat yang sekarang. */

/* Pemilih tema */
.theme-picker { position: relative; }
.theme-picker > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink2); font-size: 13px; font-weight: 600; }
.theme-picker > summary::-webkit-details-marker { display: none; }
.theme-picker[open] > summary { border-color: var(--blue); }
.theme-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 80; width: 250px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18); display: grid; gap: 2px; }
.theme-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.theme-menu button:hover { background: var(--surface3); }
.theme-menu button[aria-checked="true"] { background: var(--tint); font-weight: 700; }
.theme-menu button[aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--blue); }
.swatch { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; border: 1px solid rgba(15, 23, 42, .15); }
.sw-sistem { background: linear-gradient(135deg, #F1F5F9 50%, #0B1220 50%); }
.sw-terang { background: linear-gradient(135deg, #fff 50%, #1B3F73 50%); }
.sw-gelap { background: linear-gradient(135deg, #111A2C 50%, #4AA8F5 50%); }
.sw-glass { background: radial-gradient(circle at 20% 20%, #BFDDFB, transparent 60%), radial-gradient(circle at 80% 30%, #D7C8FF, transparent 60%), radial-gradient(circle at 50% 90%, #B6F0E4, transparent 60%), #EEF4FF; }
.sw-glass-gelap { background: radial-gradient(circle at 20% 20%, #1D4E89, transparent 60%), radial-gradient(circle at 80% 30%, #4B2E83, transparent 60%), radial-gradient(circle at 50% 90%, #0E5E58, transparent 60%), #0A1020; }
.sw-kontras { background: linear-gradient(135deg, #fff 50%, #000 50%); border-color: #000; }
.admin-nav .theme-picker { flex: 1 1 100%; margin-top: 6px; }
.admin-nav .theme-picker > summary { width: 100%; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: var(--side-ink); border-radius: 8px; min-height: 44px; }
.admin-nav .theme-menu { left: 0; right: auto; top: auto; bottom: calc(100% + 6px); }
.plain-theme { position: fixed; top: 12px; right: 12px; z-index: 70; }
@media (max-width: 720px) { .admin-nav .theme-menu { bottom: auto; top: calc(100% + 6px); } }

/* ---------- GELAP & token gelap bersama ---------- */
[data-theme="gelap"], [data-theme="glass-gelap"] {
  color-scheme: dark;
  --navy: #8EC5FF; --navy-d: #B9DBFF; --navy-dd: #CFE6FF; --blue: #4AA8F5;
  --tint: #14304F; --tint2: #1B3D63; --tint-b: #2E5C8C;
  --ink: #E6EDF6; --ink2: #C3CEDC; --muted: #93A3B8; --line: #25324A; --bg: #0B1220;
  --ok: #8EC5FF; --bad: #FCA5A5; --bad-bg: #3B1218; --warn: #FDBA74; --warn-bg: #3A2410;
  --surface: #111A2C; --surface2: #162238; --surface3: #1C2A42; --line-soft: #1C2840; --field-b: #34445E;
  --side: #0A1222; --side-cur: #1B3A66; --side-ink: #C9DAF0; --shadow: 0 1px 3px rgba(0, 0, 0, .45);
  --brand-btn: #1F6FC9;
}
:is([data-theme="gelap"], [data-theme="glass-gelap"]) :is(.btn-primary, .stepper li.current, .bank-nav a[aria-current], .msg.user, .avatar-link span, .avatar-lg.initials) {
  background: var(--brand-btn); border-color: var(--brand-btn); color: #fff; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .btn-primary:hover { background: #2B7FDB; color: #fff; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) :is(.brand img, .logo-sm, .admin-brand-dark) { content: url(../img/logo-white.png); }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .alert-info { background: #12294A; border-color: #1F4473; color: #BFDBFE; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .alert-error { border-color: #7F1D1D; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .alert-warn { border-color: #7C3A10; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .badge-info { background: #0C3A55; color: #9EDCFF; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .badge-warn { background: #3D2A08; color: #FCD58A; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .badge-bad { background: #4A1518; color: #FCA5A5; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .row-bad td { background: #2A1418; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .row-warn td { background: #2A2012; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .type-youtube { background: #4A1518; color: #FCA5A5; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .type-video { background: #24285A; color: #C7CBFF; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .type-pdf { background: #4A1530; color: #F9A8D4; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) :is(.type-ppt, .type-quiz) { background: #3D2A08; color: #FCD58A; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) :is(.ai-disclaimer, .mat-list .quiz-row) { background: #2A230F; border-color: #4A3B10; color: #F3D9A0; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .msg.note { background: #0C3A55; color: #9EDCFF; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .ann-penting { background: #2A1418; border-left-color: #F87171; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .verify-status.bad { background: #4A1518; }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .page-loader { background: rgba(11, 18, 32, .78); }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .loader-orbit { box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .preset span { color: var(--muted); }
:is([data-theme="gelap"], [data-theme="glass-gelap"]) .swatch { border-color: rgba(255, 255, 255, .2); }

/* ---------- LIQUID GLASS (terang & gelap) ---------- */
[data-theme="glass"] {
  --bg: #E9F1FB; --surface: rgba(255, 255, 255, .58); --surface2: rgba(255, 255, 255, .42); --surface3: rgba(255, 255, 255, .55);
  --line: rgba(255, 255, 255, .75); --line-soft: rgba(27, 63, 115, .08); --field-b: rgba(27, 63, 115, .2);
  --side: rgba(19, 46, 85, .72); --side-cur: rgba(255, 255, 255, .18);
  --shadow: 0 8px 32px rgba(27, 63, 115, .12), inset 0 1px 0 rgba(255, 255, 255, .8);
  --glass-bg: radial-gradient(1100px 760px at -5% -10%, #BFDDFB 0, transparent 60%), radial-gradient(900px 700px at 105% 5%, #D9CCFF 0, transparent 55%),
    radial-gradient(900px 700px at 60% 110%, #B9F0E4 0, transparent 55%), linear-gradient(135deg, #EAF3FF, #F4F0FF);
}
[data-theme="glass-gelap"] {
  --surface: rgba(17, 26, 44, .55); --surface2: rgba(22, 34, 56, .5); --surface3: rgba(40, 56, 86, .5);
  --line: rgba(255, 255, 255, .12); --line-soft: rgba(255, 255, 255, .06); --field-b: rgba(255, 255, 255, .18);
  --side: rgba(8, 14, 28, .62); --side-cur: rgba(255, 255, 255, .14);
  --shadow: 0 10px 36px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
  --glass-bg: radial-gradient(1100px 760px at -5% -10%, #1D4E89 0, transparent 60%), radial-gradient(900px 700px at 105% 5%, #4B2E83 0, transparent 55%),
    radial-gradient(900px 700px at 60% 110%, #0E5E58 0, transparent 55%), linear-gradient(135deg, #070D1A, #0D1428);
}
:is([data-theme="glass"], [data-theme="glass-gelap"]) body { background: var(--glass-bg); background-attachment: fixed; }
:is([data-theme="glass"], [data-theme="glass-gelap"]) :is(.card, .stat, .topbar, .admin-nav, .learn-bar, .learn-outline, .learn-ai, .score-box, .ann, .theme-menu, .page-loader, .auth-brand) {
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); }
:is([data-theme="glass"], [data-theme="glass-gelap"]) :is(.card, .stat, .score-box) { border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); }
:is([data-theme="glass"], [data-theme="glass-gelap"]) .topbar { position: sticky; top: 0; z-index: 30; border-bottom-color: var(--line); }
:is([data-theme="glass"], [data-theme="glass-gelap"]) .admin-nav { border-right: 1px solid rgba(255, 255, 255, .14); }
:is([data-theme="glass"], [data-theme="glass-gelap"]) .admin-nav a[aria-current] { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 4px 14px rgba(0, 0, 0, .12); }
:is([data-theme="glass"], [data-theme="glass-gelap"]) :is(.btn, .icon-btn, .bank-nav a, .stepper li, .timer) { border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
:is([data-theme="glass"], [data-theme="glass-gelap"]) .icon-btn { border-radius: 12px; }
[data-theme="glass"] .btn:not(.btn-primary) { background: rgba(255, 255, 255, .6); border-color: rgba(255, 255, 255, .85); }
[data-theme="glass-gelap"] .btn:not(.btn-primary) { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: var(--ink); }
[data-theme="glass"] .btn-primary { background: linear-gradient(180deg, #2A62A8, #1B3F73); border-color: rgba(255, 255, 255, .35); box-shadow: 0 6px 18px rgba(27, 63, 115, .28), inset 0 1px 0 rgba(255, 255, 255, .35); }
[data-theme="glass-gelap"] .btn-primary { background: linear-gradient(180deg, #3B8EE8, #1F6FC9); border-color: rgba(255, 255, 255, .25); box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .3); }
[data-theme="glass"] :is(input, select, textarea, .pw-wrap) { background: rgba(255, 255, 255, .7); }
[data-theme="glass-gelap"] :is(input, select, textarea, .pw-wrap) { background: rgba(255, 255, 255, .06); }
:is([data-theme="glass"], [data-theme="glass-gelap"]) .table th { background: transparent; }
:is([data-theme="glass"], [data-theme="glass-gelap"]) .theme-menu { background: var(--surface); }
[data-theme="glass"] .theme-menu { background: rgba(255, 255, 255, .78); }
[data-theme="glass-gelap"] .theme-menu { background: rgba(17, 26, 44, .85); }
:is([data-theme="glass"], [data-theme="glass-gelap"]) .auth-brand { background: rgba(19, 46, 85, .75); }
[data-theme="glass"] .alert-info { background: rgba(239, 246, 255, .7); }
[data-theme="glass"] :is(.type-youtube, .type-pdf, .type-ppt, .type-video, .type-quiz, .badge) { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
[data-theme="glass"] .mat-list .quiz-row { background: rgba(255, 251, 235, .65); }

/* ---------- KONTRAS TINGGI (aksesibilitas) ---------- */
[data-theme="kontras"] {
  --navy: #002A66; --navy-d: #001A40; --navy-dd: #00122E; --blue: #0047B3;
  --ink: #000; --ink2: #000; --muted: #1F2937; --line: #000; --line-soft: #4B5563; --field-b: #000; --bg: #fff;
  --surface: #fff; --surface2: #fff; --surface3: #F3F4F6; --tint: #E6F0FF; --tint2: #CFE2FF; --tint-b: #002A66;
  --ok: #002A66; --bad: #8B0000; --side: #000; --side-cur: #fff; --side-ink: #fff; --shadow: none;
}
[data-theme="kontras"] body { font-size: 16px; }
[data-theme="kontras"] a { text-decoration: underline; text-underline-offset: 2px; }
[data-theme="kontras"] :is(.card, .stat, .score-box, .ann, .table, .stepper li) { border: 2px solid #000; box-shadow: none; }
[data-theme="kontras"] :is(.btn, input, select, textarea, .pw-wrap, .option, .icon-btn) { border-width: 2px; border-color: #000; }
[data-theme="kontras"] .badge { border: 1px solid #000; }
[data-theme="kontras"] .muted, [data-theme="kontras"] .tiny { color: #111; }
[data-theme="kontras"] .admin-nav a[aria-current] { color: #000; font-weight: 800; }
[data-theme="kontras"] .admin-nav a:hover { color: #fff; text-decoration: underline; }
[data-theme="kontras"] :focus-visible { outline: 3px solid #FFB000 !important; outline-offset: 2px; }

/* ===================== v1.3.1: video YouTube & menu atas di HP ===================== */
.yt-alt { margin: 8px 2px 0; }
.yt-alt a { font-weight: 600; }
@media (max-width: 759px) {
  .topbar { gap: 6px 10px; padding-top: 8px; padding-bottom: 8px; }
  .topnav { gap: 2px; }
  .topnav a, .topnav .linklike { padding: 0 9px; }
  .topnav .theme-picker > summary { padding: 0 10px; }
  .topnav .tp-label { display: none; }
}

/* ===================== v1.3.2 ===================== */
.btn-danger { color: #B91C1C; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.master-add { align-items: flex-end; }
.master-add .field { margin: 0; }
/* Pengaman: bila JavaScript gagal dimuat, loader awal tetap hilang sendiri setelah 4 detik */
.page-loader.is-initial { animation: chls-loader-out 0s linear 4s forwards; }
@keyframes chls-loader-out { to { opacity: 0; visibility: hidden; } }
