/* =====================================================================
   SIMPEG SIT Mutiara Islam — Tema modern
   Warna utama diatur dari panel admin (variabel --primary & --secondary)
   ===================================================================== */
:root {
    --primary: #0f766e;
    --secondary: #f59e0b;
    --bg: #f3f6fa;
    --surface: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e7ecf3;
    --radius: 18px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
    --sidebar-w: 264px;
    --bs-primary: var(--primary);
    --bs-link-color: var(--primary);
    --bs-link-hover-color: var(--primary);
    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
body { font-family: var(--bs-body-font-family); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
.fw-800 { font-weight: 800; }
.min-w-0 { min-width: 0; }
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }

/* ---------- Bootstrap overrides ---------- */
.btn { border-radius: 12px; font-weight: 600; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: color-mix(in srgb, var(--primary) 85%, #000); --bs-btn-hover-border-color: color-mix(in srgb, var(--primary) 85%, #000); --bs-btn-active-bg: color-mix(in srgb, var(--primary) 75%, #000); --bs-btn-active-border-color: transparent; --bs-btn-disabled-bg: var(--primary); --bs-btn-disabled-border-color: var(--primary); box-shadow: 0 6px 16px -8px var(--primary); }
.btn-outline-primary { --bs-btn-color: var(--primary); --bs-btn-border-color: color-mix(in srgb, var(--primary) 45%, #fff); --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); --bs-btn-active-bg: var(--primary); --bs-btn-active-border-color: var(--primary); }
.btn-check:checked + .btn-outline-primary { background: var(--primary); border-color: var(--primary); }
.btn-light { --bs-btn-bg: #f1f5f9; --bs-btn-border-color: #f1f5f9; --bs-btn-hover-bg: #e2e8f0; }
.btn-icon { border: 0; background: transparent; padding: .25rem .5rem; }
.form-control, .form-select { border-radius: 12px; border-color: #dbe3ee; padding: .6rem .85rem; }
.form-control-sm, .form-select-sm { border-radius: 10px; padding: .4rem .65rem; }
.form-control:focus, .form-select:focus { border-color: color-mix(in srgb, var(--primary) 60%, #fff); box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--primary) 15%, transparent); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-label { font-weight: 600; font-size: .86rem; color: #334155; margin-bottom: .35rem; }
.form-floating > .form-control { padding-top: 1.6rem; }
.nav-link { color: var(--muted); }
.page-link { color: var(--primary); }
.active > .page-link, .page-link.active { background: var(--primary); border-color: var(--primary); }
.progress-bar { background-color: var(--primary); }
.badge { font-weight: 600; letter-spacing: .01em; }
.alert { border: 0; border-radius: 14px; }
.modal-content { border: 0; border-radius: 20px; }
.dropdown-menu { border: 0; border-radius: 14px; padding: .4rem; }
.dropdown-item { border-radius: 8px; font-size: .9rem; }
.bg-primary-subtle { background: color-mix(in srgb, var(--primary) 12%, #fff) !important; }
.bg-primary-soft { background: color-mix(in srgb, var(--primary) 14%, #fff); color: var(--primary); }
.bg-success-soft { background: #dcfce7; color: #15803d; }
.bg-warning-soft { background: #fef3c7; color: #b45309; }
.bg-danger-soft { background: #fee2e2; color: #b91c1c; }
.bg-info-soft { background: #e0f2fe; color: #0369a1; }
.bg-secondary-soft { background: #e2e8f0; color: #475569; }

/* ---------- Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 92%, #000) 0%, color-mix(in srgb, var(--primary) 70%, #000) 100%); color: #fff; display: flex; flex-direction: column; z-index: 1040; transition: transform .25s ease; }
.sidebar::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 120% 0%, color-mix(in srgb, var(--secondary) 40%, transparent), transparent 45%); pointer-events: none; }
.sidebar > * { position: relative; z-index: 1; }
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.4rem 1.25rem; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 14px; padding: 5px; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.brand-title { font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.brand-sub { font-size: .75rem; opacity: .75; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .5rem .85rem; }
.nav-heading { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; opacity: .55; margin: 1.1rem .7rem .4rem; font-weight: 700; }
.nav-item-link { display: flex; align-items: center; gap: .8rem; padding: .7rem .85rem; color: rgba(255,255,255,.82); border-radius: 12px; font-weight: 500; font-size: .92rem; margin-bottom: 2px; transition: all .15s; }
.nav-item-link i { font-size: 1.1rem; width: 22px; text-align: center; }
.nav-item-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item-link.active { background: #fff; color: var(--primary); font-weight: 700; box-shadow: 0 8px 18px -8px rgba(0,0,0,.35); }
.sidebar-footer { padding: .85rem; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-footer .nav-item-link { color: rgba(255,255,255,.82); }
.sidebar-backdrop { display: none; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 1rem; padding: .9rem 1.75rem; background: rgba(243, 246, 250, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 1.25rem; font-weight: 800; margin: 0; }
.user-chip { display: flex; align-items: center; gap: .6rem; background: #fff; padding: .3rem .9rem .3rem .3rem; border-radius: 99px; box-shadow: var(--shadow); }
.user-chip img, .user-chip .avatar-initial { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.content { padding: 1.75rem; flex: 1; }
.app-footer { padding: 1rem 1.75rem; color: var(--muted); font-size: .8rem; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: none; }
    .sidebar.show + .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1035; }
    .main { margin-left: 0; }
    .content { padding: 1rem; }
    .topbar { padding: .7rem 1rem; }
}

/* ---------- Components ---------- */
.card-soft { border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.section-title { font-weight: 800; font-size: 1.02rem; display: flex; align-items: center; gap: .55rem; margin-bottom: 1.1rem; }
.section-title i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); font-size: 1rem; }

.hero-card { position: relative; overflow: hidden; border-radius: 24px; padding: 2rem; color: #fff; background: linear-gradient(120deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 65%, #000) 100%); box-shadow: 0 20px 40px -20px var(--primary); }
.hero-card::before { content: ""; position: absolute; width: 340px; height: 340px; right: -80px; top: -140px; border-radius: 50%; background: color-mix(in srgb, var(--secondary) 55%, transparent); filter: blur(6px); opacity: .6; }
.hero-card::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent, #000); }
.hero-card > * { position: relative; z-index: 1; }

.ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; display: inline-grid; place-items: center; background: conic-gradient(var(--secondary) calc(var(--p) * 1%), rgba(255,255,255,.22) 0); }
.ring span { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 75%, #000); font-weight: 800; font-size: 1.2rem; }

.stat-card { display: flex; align-items: center; gap: 1rem; background: #fff; border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); height: 100%; color: inherit; transition: transform .15s; }
.stat-card:hover { transform: translateY(-2px); }
.stat-card.ring-active { outline: 2px solid var(--primary); }
.stat-icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; }
.stat-label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.55rem; font-weight: 800; line-height: 1.15; }
.stat-card.mini .stat-icon { width: 40px; height: 40px; font-size: 1.1rem; }
.stat-card.mini .stat-value { font-size: 1.25rem; }

.list-row { display: flex; align-items: center; gap: .85rem; padding: .8rem .6rem; border-radius: 14px; color: inherit; transition: background .15s; }
.list-row + .list-row { border-top: 1px dashed var(--line); }
a.list-row:hover { background: #f8fafc; }
.list-icon { width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); font-size: 1.1rem; }
.list-icon.lg { width: 56px; height: 56px; font-size: 1.5rem; border-radius: 16px; }
.list-icon.new { background: var(--secondary); color: #fff; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--secondary) 60%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }

.avatar { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.avatar-initial { display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--secondary) 70%, var(--primary))); color: #fff; font-weight: 700; font-size: .85rem; }

.step-row { display: flex; align-items: center; gap: .8rem; padding: .85rem; border-radius: 14px; color: inherit; border: 1px solid var(--line); margin-bottom: .6rem; transition: all .15s; }
.step-row:hover { border-color: var(--primary); }
.step-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #f1f5f9; font-weight: 700; font-size: .85rem; }
.step-row.done .step-dot { background: #22c55e; color: #fff; }
.step-row.done span:not(.step-dot) { text-decoration: line-through; color: var(--muted); }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state > i { font-size: 3rem; opacity: .35; display: block; margin-bottom: .5rem; }

.table-modern thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #f8fafc; border-bottom: 1px solid var(--line); font-weight: 700; padding: .85rem .75rem; white-space: nowrap; }
.table-modern td { padding: .8rem .75rem; border-color: var(--line); }
.pills-soft .nav-link { border-radius: 12px; font-weight: 600; color: #475569; background: #fff; margin-right: .4rem; box-shadow: var(--shadow); }
.pills-soft .nav-link.active { background: var(--primary); color: #fff; }

.sticky-actions { position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: flex-end; gap: .5rem; padding: 1rem; margin: 0 -1rem; background: linear-gradient(transparent, var(--bg) 35%); }

/* Form data pribadi */
.photo-upload { position: relative; width: 150px; height: 200px; border-radius: 20px; overflow: visible; }
.photo-upload img, .photo-placeholder { width: 150px; height: 200px; border-radius: 20px; object-fit: cover; box-shadow: 0 12px 30px -12px rgba(15,23,42,.35); }
.photo-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #f1f5f9, #f1f5f9 10px, #e9eef5 10px, #e9eef5 20px); color: var(--muted); }
.photo-placeholder i { font-size: 2.6rem; }
.photo-btn { position: absolute; right: -10px; bottom: -10px; width: 46px; height: 46px; border-radius: 50%; background: var(--secondary); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 1.2rem; border: 4px solid #fff; box-shadow: var(--shadow); }
.choice-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: 1rem .5rem; border: 2px solid var(--line); border-radius: 16px; cursor: pointer; font-weight: 600; transition: all .15s; text-align: center; height: 100%; font-size: .9rem; }
.choice-card i { font-size: 1.6rem; color: var(--muted); }
.choice-card.sm { padding: .6rem; flex-direction: row; font-size: .85rem; }
.choice-card.sm i { font-size: 1.1rem; }
.btn-check:checked + .choice-card { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, #fff); color: var(--primary); }
.btn-check:checked + .choice-card i { color: var(--primary); }
.pend-row { padding: .75rem; border-radius: 14px; background: #f8fafc; margin-bottom: .6rem !important; }

/* Berkas */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: 1.6rem 1rem; border: 2px dashed #cbd5e1; border-radius: 16px; background: #f8fafc; cursor: pointer; text-align: center; transition: all .15s; width: 100%; }
.dropzone i { font-size: 2rem; color: var(--primary); }
.dropzone small { color: var(--muted); }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, #fff); }
.dropzone.has-file { border-style: solid; border-color: #22c55e; background: #f0fdf4; }
.file-card { display: flex; gap: .85rem; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; height: 100%; transition: box-shadow .15s; }
.file-card:hover { box-shadow: var(--shadow); }
.file-icon { width: 48px; height: 58px; border-radius: 12px; display: grid; place-items: center; font-size: 1.6rem; flex-shrink: 0; }
.file-icon.sm { width: 36px; height: 42px; font-size: 1.15rem; border-radius: 10px; }
.file-icon.pdf { background: #fee2e2; color: #dc2626; }
.file-icon.img { background: #dbeafe; color: #2563eb; }

/* Scanner */
.scan-stage { position: relative; background: #0f172a; border-radius: 18px; overflow: hidden; aspect-ratio: 4/3; }
.scan-stage video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 7% 10%; border: 2px solid rgba(255,255,255,.8); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); pointer-events: none; }
.scan-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #94a3b8; }
.scan-pages { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; max-height: 55vh; overflow-y: auto; }
.scan-page { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.scan-page img { width: 100%; display: block; }
.scan-page .num { position: absolute; left: 6px; top: 6px; background: var(--primary); color: #fff; border-radius: 6px; font-size: .7rem; padding: 0 6px; font-weight: 700; }
.scan-page button { position: absolute; right: 4px; top: 4px; }

/* Berkas online & tanda tangan */
.progress-steps { display: flex; gap: .5rem; flex-wrap: wrap; }
.ps-step { flex: 1; min-width: 120px; display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; border-radius: 12px; background: #f1f5f9; font-weight: 600; font-size: .85rem; color: var(--muted); }
.ps-step span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-size: .8rem; }
.ps-step.done { background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); }
.ps-step.done span { background: var(--primary); color: #fff; }
.doc-frame { width: 100%; height: 78vh; border: 0; border-radius: var(--radius); }
.doc-viewer { background: #e2e8f0; border-radius: var(--radius); padding: 1.25rem; max-height: 85vh; overflow: auto; }
.doc-page { position: relative; margin: 0 auto 1.25rem; background: #fff; box-shadow: 0 10px 30px -10px rgba(15,23,42,.35); touch-action: pan-y; }
.doc-page canvas { display: block; width: 100%; height: auto; }
.doc-page.current { outline: 3px solid color-mix(in srgb, var(--primary) 50%, transparent); }
.doc-page .page-label { position: absolute; top: -10px; left: 10px; background: #0f172a; color: #fff; font-size: .7rem; padding: 1px 8px; border-radius: 6px; z-index: 3; }
.sig-pad { width: 100%; height: 150px; border: 2px dashed #cbd5e1; border-radius: 14px; background: #fff; touch-action: none; cursor: crosshair; }
.sig-item { position: absolute; z-index: 5; cursor: move; border: 2px dashed var(--primary); border-radius: 6px; touch-action: none; user-select: none; background: rgba(255,255,255,.05); }
.sig-item img { width: 100%; height: 100%; display: block; pointer-events: none; }
.sig-item .sig-resize { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; cursor: nwse-resize; touch-action: none; }
.sig-item .sig-del { position: absolute; right: -11px; top: -11px; width: 22px; height: 22px; border-radius: 50%; background: #ef4444; color: #fff; border: 2px solid #fff; font-size: .7rem; display: grid; place-items: center; cursor: pointer; padding: 0; }
.online-item { padding: 1rem; border: 1px solid var(--line); border-radius: 16px; margin-bottom: .75rem; }
.recipient-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: .5rem; }
.recipient-item { display: flex; gap: .5rem; padding: .35rem .5rem; border-radius: 8px; margin: 0; }
.recipient-item:hover { background: #f8fafc; }

/* Detail pegawai */
.profile-head { overflow: hidden; }
.profile-cover { height: 120px; background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--secondary) 75%, var(--primary))); }
.profile-photo { width: 110px; height: 140px; border-radius: 18px; object-fit: cover; border: 5px solid #fff; margin-top: -60px; box-shadow: var(--shadow); background: #fff; display: inline-grid; place-items: center; }
.info-list dt { font-weight: 600; color: var(--muted); font-size: .88rem; }
.info-list dd { font-weight: 500; }
.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 1rem; }
.tl-dot { position: absolute; left: -1.4rem; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.unit-row { padding: 1rem 0; border-bottom: 1px dashed var(--line); }
.unit-row:last-child { border-bottom: 0; }
.progress-stack { background: #eef2f7; }

/* Pengaturan */
.logo-preview { width: 120px; height: 120px; border-radius: 22px; background: repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 50% / 16px 16px; display: grid; place-items: center; border: 1px solid var(--line); flex-shrink: 0; }
.logo-preview img { max-width: 92px; max-height: 92px; }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.preset { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: .5rem .6rem; font-size: .82rem; font-weight: 600; }
.preset span { width: 26px; height: 26px; border-radius: 8px; }
.preset:hover { border-color: var(--primary); }
.theme-preview { display: flex; height: 120px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.tp-side { width: 26%; background: linear-gradient(180deg, var(--tp1, var(--primary)), color-mix(in srgb, var(--tp1, var(--primary)) 70%, #000)); }
.tp-main { flex: 1; padding: 10px; background: var(--bg); }
.tp-hero { height: 44px; border-radius: 10px; background: linear-gradient(120deg, var(--tp1, var(--primary)), color-mix(in srgb, var(--tp1, var(--primary)) 65%, #000)); position: relative; overflow: hidden; }
.tp-hero::after { content: ""; position: absolute; right: -10px; top: -20px; width: 60px; height: 60px; border-radius: 50%; background: var(--tp2, var(--secondary)); opacity: .7; }
.tp-row { display: flex; gap: 8px; margin-top: 10px; }
.tp-row span { flex: 1; height: 36px; border-radius: 8px; background: #fff; }
.theme-swatch { display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; text-align: center; cursor: pointer; padding: .45rem; border-radius: 12px; border: 2px solid transparent; }
.theme-swatch span { width: 100%; height: 42px; border-radius: 10px; }
.btn-check:checked + .theme-swatch { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, #fff); }
.sw-emerald span { background: linear-gradient(135deg, #065f46, #10b981 60%, #fbbf24 60%); }
.sw-navy span { background: linear-gradient(135deg, #0b1d4d, #1e3a8a 60%, #d4a843 60%); }
.sw-maroon span { background: linear-gradient(135deg, #4c0519, #9f1239 60%, #fcd34d 60%); }
.sw-violet span { background: linear-gradient(135deg, #2e1065, #7c3aed 60%, #f472b6 60%); }
.sw-auto span { background: linear-gradient(135deg, var(--primary) 60%, var(--secondary) 60%); }

/* ---------- Halaman tamu (login) ---------- */
body.guest { min-height: 100vh; background: #0b1120; overflow-x: hidden; }
.guest-bg { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(ellipse at top left, color-mix(in srgb, var(--primary) 70%, #000), #0b1120 60%); }
.guest-bg::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: float 14s ease-in-out infinite; }
.blob.b1 { width: 420px; height: 420px; background: var(--primary); top: -120px; left: -80px; }
.blob.b2 { width: 360px; height: 360px; background: var(--secondary); bottom: -120px; right: 10%; animation-delay: -5s; }
.blob.b3 { width: 260px; height: 260px; background: #6366f1; top: 40%; left: 35%; opacity: .3; animation-delay: -9s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-30px) scale(1.08); } }
.guest-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 4rem; padding: 2rem 1rem; max-width: 1180px; margin: 0 auto; }
.guest-side { flex: 1; color: #fff; flex-direction: column; justify-content: space-between; min-height: 520px; padding: 1rem 0; }
.guest-logo { width: 92px; height: 92px; object-fit: contain; background: #fff; border-radius: 26px; padding: 10px; box-shadow: 0 20px 40px -12px rgba(0,0,0,.5); }
.guest-logo.sm { width: 70px; height: 70px; border-radius: 20px; }
.guest-side h2 { font-size: 2.6rem; letter-spacing: -.02em; }
.guest-units { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.guest-units span { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); padding: .45rem .9rem; border-radius: 99px; font-size: .85rem; backdrop-filter: blur(6px); }
.guest-feat { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.guest-feat li { display: flex; gap: .7rem; align-items: center; opacity: .85; }
.guest-feat i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.12); }
.guest-card { width: 100%; max-width: 470px; background: rgba(255,255,255,.97); border-radius: 28px; padding: 2.4rem; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); z-index: 5; }
.verify-icon { width: 90px; height: 90px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 2.8rem; }
.verify-icon.ok { background: #dcfce7; color: #16a34a; }
.verify-icon.warn { background: #fef3c7; color: #d97706; }
.verify-icon.bad { background: #fee2e2; color: #dc2626; }

/* =====================================================================
   ID CARD  v2 — simpel & elegan (CR80 potret 54 × 85,6 mm → 340 × 540 px)
   Catatan: hindari color-mix() di sini agar unduhan PNG (html2canvas) aman.
   ===================================================================== */
.idcard-stage { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: center; padding: 1rem 0; }
.idcard { --c1: #053b30; --c2: #0f766e; --c3: #f5b301;
    position: relative; width: 340px; height: 540px; border-radius: 22px; overflow: hidden; background: #ffffff; color: #0f172a;
    box-shadow: 0 30px 60px -24px rgba(15,23,42,.5), 0 0 0 1px rgba(15,23,42,.06); font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    display: flex; flex-direction: column; align-items: center; }
.idcard.theme-navy   { --c1: #0a1a44; --c2: #1e3a8a; --c3: #d4a843; }
.idcard.theme-maroon { --c1: #3b0414; --c2: #9f1239; --c3: #f6c453; }
.idcard.theme-violet { --c1: #1e0b4b; --c2: #6d28d9; --c3: #f9a8d4; }
.idcard > * { position: relative; z-index: 2; }
.idcard > .ic-top, .idcard > .ic-cut, .idcard > .ic-accent { position: absolute; z-index: 0; }
.ic-top { left: 0; right: 0; top: 0; height: 250px; background: linear-gradient(150deg, var(--c1) 0%, var(--c2) 100%); overflow: hidden; }
.ic-top.full { height: 100%; }
.ic-orb { position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); }
.ic-orb.o1 { width: 260px; height: 260px; right: -110px; top: -120px; }
.ic-orb.o2 { width: 150px; height: 150px; left: -60px; top: 120px; background: rgba(255,255,255,.05); }
.ic-cut { left: -40px; width: 420px; top: 205px; height: 140px; background: #ffffff; transform: rotate(-9deg); z-index: 1 !important; }
.ic-accent { left: -40px; width: 420px; top: 198px; height: 7px; background: var(--c3); transform: rotate(-9deg); z-index: 1 !important; }
.ic-cut.back { top: 408px; height: 200px; transform: rotate(-9deg); }
.ic-accent.back { top: 401px; }
.ic-header { display: flex; align-items: center; gap: 10px; width: 100%; padding: 20px 22px 0; color: #fff; }
.ic-logo { width: 44px; height: 44px; background: #fff center / 80% no-repeat; border-radius: 13px; flex-shrink: 0; box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.ic-logo.lg { width: 84px; height: 84px; border-radius: 24px; }
.ic-org-name { font-weight: 800; font-size: 14.5px; line-height: 1.15; }
.ic-org-unit { font-size: 11px; opacity: .85; font-weight: 500; margin-top: 2px; }
.ic-title { margin-top: 14px; font-size: 9px; letter-spacing: .3em; font-weight: 700; color: #ffffff; opacity: .8; text-transform: uppercase; }
.ic-photo { margin-top: 16px; width: 138px; height: 176px; border-radius: 20px; background: #e2e8f0 center / cover no-repeat; border: 5px solid #ffffff; box-shadow: 0 16px 30px -12px rgba(0,0,0,.45); }
.ic-name { margin-top: 16px; font-weight: 800; font-size: 20px; text-align: center; padding: 0 20px; line-height: 1.2; color: #0f172a; }
.ic-name.long { font-size: 16px; }
.ic-role { margin-top: 5px; color: var(--c2); font-weight: 700; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.ic-bar { width: 44px; height: 4px; border-radius: 4px; background: var(--c3); margin-top: 10px; }
.ic-bar.light { margin: 18px auto 0; }
.ic-info { width: calc(100% - 48px); margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ic-cell { background: #f5f7fa; border-radius: 12px; padding: 8px 10px; text-align: center; }
.ic-cell span { display: block; font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: #64748b; font-weight: 700; }
.ic-cell b { display: block; font-size: 11.5px; font-weight: 800; margin-top: 2px; word-break: break-word; line-height: 1.25; }
.ic-foot { position: absolute !important; left: 0; right: 0; bottom: 0; height: 16px; background: linear-gradient(90deg, var(--c1), var(--c2)); border-top: 3px solid var(--c3); }
/* Belakang */
.ic-back-top { width: 100%; text-align: center; padding: 44px 26px 0; color: #fff; display: flex; flex-direction: column; align-items: center; }
.ic-back-name { font-weight: 800; font-size: 19px; margin-top: 14px; }
.ic-back-units { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.ic-back-units span { font-size: 10px; font-weight: 700; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: 4px 11px; border-radius: 99px; }
.ic-rules { list-style: none; padding: 0; margin: 16px 0 0; font-size: 11px; line-height: 1.55; opacity: .92; }
.ic-rules li { margin-bottom: 4px; }
.ic-back-foot { position: absolute !important; left: 0; right: 0; bottom: 26px; text-align: center; padding: 0 28px; color: #334155; }
.ic-addr-label { font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: #94a3b8; font-weight: 700; margin-bottom: 3px; }
.ic-addr { font-size: 11px; font-weight: 700; line-height: 1.45; }
.ic-contact { font-size: 10px; color: #64748b; margin-top: 4px; }

@media print {
    .sidebar, .topbar, .app-footer, .no-print, .alert, .sticky-actions { display: none !important; }
    .main { margin: 0 !important; }
    .content { padding: 0 !important; }
    body { background: #fff !important; }
    .idcard-stage { gap: 8mm; }
    .idcard { box-shadow: none; border: 1px solid #ddd; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (max-width: 575.98px) {
    .stat-card { flex-direction: column; align-items: flex-start; gap: .6rem; padding: 1rem; }
    .stat-icon { width: 42px; height: 42px; font-size: 1.15rem; }
    .hero-card { padding: 1.4rem; }
    .idcard-stage { transform-origin: top center; }
}

/* ---------- v2: CAPTCHA, pengaturan akun, laporan ---------- */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.captcha-img { border-radius: 12px; border: 1px solid var(--line); background: #fff; user-select: none; }
.captcha-box .form-control { letter-spacing: .3em; font-weight: 700; }
.account-card { overflow: hidden; }
.account-cover { height: 90px; background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--secondary) 70%, var(--primary))); }
.account-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 5px solid #fff; margin-top: -60px; box-shadow: var(--shadow); display: inline-grid; place-items: center; background: #fff; }
.account-meta li { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-top: 1px dashed var(--line); }
.account-meta li i { color: var(--primary); }
.account-meta li span { color: var(--muted); }
.account-meta li b { margin-left: auto; font-weight: 600; text-align: right; word-break: break-all; }
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 220px; }
.report-table th, .report-table td { font-size: .8rem; white-space: nowrap; }
.report-paper { background: #fff; max-width: 900px; margin: 0 auto; padding: 2.2rem; border-radius: 16px; box-shadow: var(--shadow); }
.report-head { display: flex; align-items: center; gap: 1rem; border-bottom: 3px double #0f172a; padding-bottom: 1rem; margin-bottom: 1.4rem; }
.report-head img { width: 64px; height: 64px; object-fit: contain; }
.report-photo { width: 110px; height: 146px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.report-section { font-weight: 800; font-size: .95rem; background: #f1f5f9; padding: .45rem .8rem; border-left: 4px solid var(--primary); margin: 1.4rem 0 .7rem; }
.report-paper table.kv td { padding: .3rem .4rem; font-size: .88rem; vertical-align: top; }
.report-paper table.kv td:first-child { width: 34%; color: #475569; }
@media print {
    .report-paper { box-shadow: none; padding: 0; max-width: none; }
    .chart-box { height: 220px; }
    .card-soft { box-shadow: none; border: 1px solid #e2e8f0; break-inside: avoid; }
}
