/* ==========================================================================
   Revisi UI 2026 — CAT Perangkat Desa · Pustakaloka Pedia Indonesia
   Tema biru profesional + aksen sian (selaras logo). Dimuat setelah app.css.
   ========================================================================== */
:root {
  --green: #0b5cad;          /* warna utama (nama variabel lama dipertahankan) */
  --green-dark: #08488a;
  --green-soft: #e6f0fb;
  --blue: #0b5cad;
  --navy: #0a2540;
  --cyan: #14a8d6;
  --cyan-soft: #e0f6fd;
  --ink: #0f1d33;
  --muted: #5b6b82;
  --canvas: #f3f6fa;
  --line: #d7dee8;
  --success: #15803d; --success-soft: #dcfce7;
  --danger: #b42318; --danger-soft: #fee4e2;
  --warning: #b45309; --warning-soft: #fef3c7;
  --font-ui: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(15,29,51,.05), 0 12px 32px rgba(15,29,51,.08);
}
body { font-family: var(--font-ui); background: var(--canvas); color: var(--ink); }
h1, h2, h3 { font-family: var(--font-ui); font-weight: 750; letter-spacing: -.01em; }
.button { border-radius: 10px; text-transform: none; font-size: 14px; letter-spacing: 0; }
.button-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.button-danger:hover { background: #8f1c13; }
a { color: var(--green-dark); }

/* Brand */
.brand-mark, .sidebar-brand .brand-mark { background: linear-gradient(135deg, #1aa6d9, #0b5cad) !important; color: #fff; font: 800 13px/1 var(--font-ui) !important; border-radius: 11px; box-shadow: 0 6px 16px rgba(11,92,173,.32) !important; }
.brand strong { letter-spacing: .02em; }
.site-footer { background: var(--navy) !important; color: #c7d4e6; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { height: 34px; width: auto; display: block; }
.footer-brand small { display: block; color: #8fa6c4; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.footer-brand strong { display: block; color: #fff; font-size: 12px; }
.admin-shell .site-footer { background: transparent !important; }
.admin-shell .footer-brand img { filter: none; background: var(--navy); padding: 6px 10px; border-radius: 8px; height: 32px; }
.admin-shell .footer-brand small { color: var(--muted); }
.admin-shell .footer-brand strong { color: var(--ink); }

/* Status badges (mudah dibedakan, tidak hanya warna: teks selalu tampil) */
.status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; border: 1px solid transparent; }
.badge-pass { background: var(--success-soft); color: var(--success); border-color: #bbf7d0; }
.badge-fail { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.badge-pending { background: var(--warning-soft); color: var(--warning); border-color: #fde68a; }
.badge-info { background: var(--cyan-soft); color: #0b6f8f; border-color: #bae6fd; }
.badge-neutral { background: #eef2f7; color: #475569; border-color: #d7dee8; }
.badge-adjusted { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; font-size: 11px; }
.num-col { text-align: center; white-space: nowrap; }
.results-table th.num-col { font-size: 12px; line-height: 1.25; white-space: normal; min-width: 76px; }

/* Penyesuaian nilai */
.adjust-details summary { cursor: pointer; color: var(--green-dark); font-weight: 700; font-size: 13px; }
.adjust-form { display: grid; gap: 8px; margin-top: 8px; padding: 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; min-width: 260px; }
.adjust-form label { display: grid; gap: 4px; font-size: 13px; }
.adjust-form input[type=number], .adjust-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.adjust-form textarea { min-height: 64px; }
.summary-grid .panel small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* Berita acara admin */
.ba-status-panel { display: grid; gap: 14px; }
.ba-status-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ba-status-head h2 { margin: 0; }
.flow-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.flow-steps li { counter-increment: step; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px; background: #eef2f7; color: #475569; font-size: 13px; font-weight: 600; }
.flow-steps li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #cbd5e1; color: #fff; font-size: 12px; }
.flow-steps li.is-done { background: var(--success-soft); color: var(--success); }
.flow-steps li.is-done::before { content: "✓"; background: var(--success); }
.finalize-form { display: grid; gap: 10px; padding: 14px; border: 1px dashed #93c5fd; border-radius: 12px; background: #f5f9ff; }
.finalize-form textarea { width: 100%; min-height: 60px; }
.member-fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.member-fieldset legend { font-weight: 700; padding: 0 6px; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 8px; }
.member-row { display: grid; grid-template-columns: 28px 1fr 170px; gap: 8px; align-items: center; }
.member-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-weight: 700; font-size: 12px; }
.empty-state { text-align: center; padding: 28px; }
.empty-state strong { display: block; font-size: 17px; }

/* ===== Login (referensi: Ref Visual Dasar.png) ===== */
.login-body .site-header { display: none; }
.login-main { position: relative; min-height: calc(100vh - 72px); background: #eceff3; padding: 0 16px 56px; }
.login-band { position: absolute; inset: 0 0 auto 0; height: 300px; overflow: hidden; background: linear-gradient(120deg, #0a2f5c 0%, #0b5cad 55%, #1592c9 100%); }
.login-band::before, .login-band::after { content: ""; position: absolute; border-radius: 40px; background: rgba(255,255,255,.07); transform: rotate(-24deg); }
.login-band::before { width: 420px; height: 420px; left: -140px; top: -210px; }
.login-band::after { width: 300px; height: 300px; right: -90px; top: 40px; background: rgba(20,168,214,.18); }
.login-inner { position: relative; z-index: 1; max-width: 470px; margin: 0 auto; padding-top: 28px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 14px; color: #fff; text-align: left; margin-bottom: 26px; }
.login-brand .brand-mark { display: grid !important; place-items: center; flex: 0 0 52px; width: 52px; height: 52px; font-size: 16px !important; background: rgba(255,255,255,.16) !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35) !important; }
.login-brand strong { display: block; font-size: 26px; letter-spacing: .02em; line-height: 1.1; }
.login-brand span { display: block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.login-card { background: #fff; border-radius: 16px; box-shadow: 0 18px 50px rgba(10,37,64,.18); overflow: hidden; }
.login-card-body { padding: 34px 40px 30px; }
.login-card h1 { margin: 0 0 6px; font-size: 26px; font-weight: 600; color: #374151; }
.login-card p.login-lead { margin: 0 0 22px; color: #4b5563; }
.login-field { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-field .login-icon { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #c7ccd4; color: #fff; }
.login-field .login-icon svg { width: 17px; height: 17px; fill: currentColor; }
.login-input { position: relative; flex: 1; }
.login-input input { width: 100%; border: 0; border-bottom: 1.5px solid #9ca3af; padding: 10px 34px 8px 0; font-size: 16px; background: transparent; outline: none; color: var(--ink); }
.login-input input:focus { border-bottom-color: var(--green); box-shadow: 0 1px 0 0 var(--green); }
.login-eye { position: absolute; right: 0; top: 6px; border: 0; background: none; color: #6b7280; padding: 4px; }
.login-eye svg { width: 22px; height: 22px; fill: currentColor; }
.login-submit { width: 100%; min-height: 50px; margin-top: 6px; border: 0; border-radius: 999px; background: linear-gradient(90deg, #0b5cad, #1677e0); color: #fff; font-size: 19px; font-weight: 700; box-shadow: 0 8px 20px rgba(11,92,173,.3); }
.login-submit:hover { filter: brightness(1.06); }
.login-submit:focus-visible, .login-eye:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.login-card-foot { padding: 16px 40px; background: #f5f6f8; color: #4b5563; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.login-dev { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 26px; color: #64748b; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.login-dev img { height: 56px; width: auto; background: var(--navy); padding: 8px 14px; border-radius: 10px; }
@media (max-width: 520px) { .login-card-body, .login-card-foot { padding-inline: 22px; } .login-brand strong { font-size: 21px; } .login-band { height: 250px; } }

/* ===== Halaman ujian selesai (referensi: Ujian CAT Selesai Resmi Role Peserta.png) ===== */
.finish-main { max-width: 980px; margin: 0 auto; padding: 44px 16px 56px; text-align: center; }
.finish-icon { position: relative; width: 120px; height: 120px; margin: 0 auto 12px; }
.finish-icon svg { width: 120px; height: 120px; }
.finish-badge { display: inline-block; padding: 6px 26px; border-radius: 999px; background: #d1fae5; color: #047857; font-weight: 800; letter-spacing: .04em; font-size: 15px; }
.finish-main h1 { margin: 14px 0 6px; font-size: clamp(24px, 4vw, 38px); color: var(--ink); }
.finish-sub { margin: 0 0 30px; color: #475569; font-size: clamp(16px, 2vw, 20px); }
.finish-steps { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 820px; margin: 0 auto 30px; position: relative; padding: 0; list-style: none; }
.finish-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; color: #64748b; font-weight: 600; }
.finish-steps li::after { content: ""; position: absolute; top: 22px; left: calc(50% + 28px); width: calc(100% - 56px); height: 4px; border-radius: 4px; background: #cbd5e1; }
.finish-steps li:last-child::after { display: none; }
.finish-steps .dot { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #64748b; color: #fff; font-weight: 800; z-index: 1; }
.finish-steps li.is-done { color: #047857; }
.finish-steps li.is-done .dot { background: #059669; }
.finish-steps li.is-done::after { background: #059669; }
.finish-note { display: flex; align-items: center; gap: 22px; max-width: 860px; margin: 0 auto 28px; padding: 20px 26px; text-align: left; border: 1px solid #cfe0f5; border-radius: 14px; background: #f5f9ff; }
.finish-note .clock { flex: 0 0 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #dbeafe; color: #0b5cad; }
.finish-note .clock svg { width: 36px; height: 36px; }
.finish-note p { margin: 0; color: #334155; font-size: 17px; }
.finish-note strong { color: var(--ink); }
.finish-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.finish-actions .button { min-width: 240px; min-height: 52px; font-size: 16px; }
.finish-actions form { margin: 0; display: flex; }
.finish-scores { max-width: 860px; margin: 34px auto 0; text-align: left; }
.finish-foot { margin-top: 30px; padding: 12px; background: #eaf0f8; color: #475569; font-size: 13px; border-radius: 10px; }
@media (max-width: 640px) { .finish-steps li { font-size: 13px; } .finish-note { flex-direction: column; text-align: center; } .finish-actions .button { width: 100%; } }

@media print {
  .status-pill { border: 1px solid #999; }
}
