:root {
    --navy: #0B132B;
    --ink: #0F172A;
    --page: #F8FAFC;
    --line: #E2E8F0;
    --sky: #0369A1;
    --teal: #0F766E;
}
body { font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; color: var(--ink); }
.app-body { background: var(--page); }
h1, h2, h3, h4, h5 { letter-spacing: -0.02em; }
.page-head { margin-bottom: 2rem; }
.page-head h1 { font-weight: 800; font-size: clamp(1.75rem, 3vw, 2.4rem); }
.eyebrow { font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.text-teal { color: var(--teal) !important; }
.text-sky { color: var(--sky) !important; }
.font-mono { font-family: Consolas, 'Courier New', monospace; }

/* Sidebar */
/* !important: Bootstrap .offcanvas-lg membuat latar transparan di layar besar */
.app-sidebar { background-color: var(--navy) !important; color: #F8FAFC; width: 256px; }
@media (min-width: 992px) {
    .app-sidebar { position: fixed; inset: 0 auto 0 0; }
    .app-main { padding-left: 256px; }
}
.app-sidebar.offcanvas-lg { --bs-offcanvas-width: 256px; --bs-offcanvas-bg: var(--navy); }
.sidebar-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; background: rgba(255,255,255,.06); }
.side-link { display: flex; align-items: center; gap: .75rem; padding: .6rem .9rem; border-radius: .6rem; color: #CBD5E1; text-decoration: none; font-size: .9rem; font-weight: 500; transition: background-color .15s ease, color .15s ease; }
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-link.active { background: #1E293B; color: #7DD3FC; box-shadow: inset 2px 0 0 #38BDF8; }
.sidebar-profile { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.app-header { position: sticky; top: 0; z-index: 1020; height: 64px; background: rgba(248,250,252,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }

/* Panels */
.card-panel { background: #fff; border: 1px solid var(--line); border-radius: 1rem; }
.card-panel .table thead th { background: #F8FAFC; font-size: .8rem; color: #64748B; font-weight: 600; }
.stat-value { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; margin-top: .5rem; }
.lift { transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s ease; }
.lift:hover { transform: translateY(-2px); box-shadow: 0 10px 25px -12px rgba(15,23,42,.3); }
.signer-box { border: 1px dashed var(--line); border-radius: .8rem; background: #F8FAFC; }
.level-chip { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 6px; background: #F1F5F9; font-family: Consolas, monospace; font-weight: 600; font-size: .8rem; }
.logo-preview { width: 96px; height: 96px; border: 1px solid var(--line); border-radius: .8rem; background: #F8FAFC; padding: 8px; display: flex; align-items: center; justify-content: center; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Badges */
.status-badge, .role-badge { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .2rem .65rem; font-size: .75rem; font-weight: 600; }
.status-valid { background: #ECFDF5; color: #065F46; box-shadow: inset 0 0 0 1px #A7F3D0; }
.status-revoked { background: #FEF2F2; color: #991B1B; box-shadow: inset 0 0 0 1px #FECACA; }
.role-admin { background: #EFF6FF; color: #1E40AF; box-shadow: inset 0 0 0 1px #BFDBFE; }
.role-manager { background: #FDF4FF; color: #86198F; box-shadow: inset 0 0 0 1px #F5D0FE; }
.role-user { background: #F1F5F9; color: #334155; box-shadow: inset 0 0 0 1px #E2E8F0; }

/* Stamp */
.stamp-frame { width: 100%; max-width: 560px; background: #fff; border-radius: .9rem; overflow: hidden; box-shadow: 0 20px 50px -20px rgba(15,23,42,.35), 0 0 0 1px #E2E8F0; animation: stamp-in .6s cubic-bezier(.16,1,.3,1) both; }
.stamp-canvas { display: block; width: 100%; height: auto; }
.stamp-btn { max-width: 560px; }
.action-badge { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .2rem .65rem; font-size: .75rem; font-weight: 600; }
.action-login { background: #EFF6FF; color: #1E40AF; }
.action-logout { background: #F1F5F9; color: #334155; }
.action-signed { background: #ECFDF5; color: #065F46; }
.action-revoked { background: #FEF2F2; color: #991B1B; }
.stamp-placeholder { position: relative; overflow: hidden; max-width: 560px; aspect-ratio: 1100 / 340; border: 2px dashed var(--line); border-radius: .9rem; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem 2rem; }
.scan-line { position: absolute; left: 2rem; right: 2rem; top: 2.5rem; height: 1px; background: #38BDF8; animation: scan 2.6s ease-in-out infinite; }

/* Login & verify */
.login-hero { background: var(--navy); color: #fff; position: relative; }
.hero-card { border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); border-radius: .8rem; padding: 1rem; height: 100%; }
.guilloche { background-image: repeating-radial-gradient(circle at 20% 30%, rgba(56,189,248,.07) 0 1px, transparent 1px 14px), repeating-radial-gradient(circle at 80% 70%, rgba(45,212,191,.06) 0 1px, transparent 1px 18px); }
.login-hero.guilloche { background-color: var(--navy); }
.dot-grid { background-color: var(--page); background-image: radial-gradient(rgba(15,23,42,.07) 1px, transparent 1px); background-size: 18px 18px; min-height: 100vh; }
.verify-valid { background: linear-gradient(180deg, #ECFDF5 0%, #FFFFFF 60%); min-height: 100vh; }
.verify-revoked { background: linear-gradient(180deg, #FEF2F2 0%, #FFFFFF 60%); min-height: 100vh; }
.verify-banner { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; border-radius: 1rem; }
.verify-banner.is-valid { background: rgba(209,250,229,.75); color: #064E3B; box-shadow: inset 0 0 0 1px #A7F3D0; }
.verify-banner.is-revoked { background: rgba(254,226,226,.75); color: #7F1D1D; box-shadow: inset 0 0 0 1px #FECACA; }

/* Motion */
.fade-up { animation: fade-up .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes stamp-in { from { opacity: 0; transform: scale(.94) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
@keyframes scan { 0%, 100% { transform: translateY(0); opacity: .2; } 50% { transform: translateY(900%); opacity: .9; } }
