@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Sora:wght@300;400;600;700;800&display=swap');

:root {
    --pr: #6366f1;
    --ac: #10b981;
    --dg: #ef4444;
    --wn: #f59e0b;
    --vi: #8b5cf6;
    --bg: #08090f;
    --card: #111827;
    --bd: #1f2d3d;
    --tx: #cbd5e1;
    --mu: #475569;
    --nav: rgba(8, 9, 15, .93);
    --gc: rgba(99, 102, 241, .04);
    --ib: rgba(255, 255, 255, .03);
    --ch: rgba(255, 255, 255, .02);
    --hd: #fff;
    --sh: none;
}

[data-theme="light"] {
    --pr: #4f46e5;
    --ac: #059669;
    --dg: #dc2626;
    --wn: #d97706;
    --vi: #7c3aed;
    --bg: #f0f4fb;
    --card: #fff;
    --bd: #dce4ef;
    --tx: #334155;
    --mu: #94a3b8;
    --nav: rgba(255, 255, 255, .96);
    --gc: rgba(79, 70, 229, .05);
    --ib: rgba(0, 0, 0, .025);
    --ch: rgba(0, 0, 0, .025);
    --hd: #0f172a;
    --sh: 0 1px 3px rgba(0, 0, 0, .08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: 'Sora', sans-serif;
    background: var(--bg);
    color: var(--tx);
    min-height: 100vh;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: linear-gradient(var(--gc) 1px, transparent 1px), linear-gradient(90deg, var(--gc) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none
}

.z1 {
    position: relative;
    z-index: 1
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    opacity: .16
}

.orb-1 {
    width: 380px;
    height: 380px;
    background: #6366f1;
    top: -100px;
    left: -80px
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: #10b981;
    bottom: -60px;
    right: -50px
}

.orb-3 {
    width: 180px;
    height: 180px;
    background: #8b5cf6;
    top: 45%;
    right: 8%
}

/* inputs */
.inp {
    width: 100%;
    background: var(--ib);
    border: 1px solid var(--bd);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--tx);
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    transition: border-color .2s, box-shadow .2s;
    outline: none
}

.inp:focus {
    border-color: var(--pr);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15)
}

.inp::placeholder {
    color: var(--mu)
}

/* select dropdown popup dark theme */
select.inp {
    background-color: #111827;
    color: var(--tx);
    color-scheme: dark;
}

select.inp option {
    background-color: #111827;
    color: #cbd5e1;
}

select.inp option:checked,
select.inp option:hover {
    background-color: rgba(99, 102, 241, 0.3);
    color: #fff;
}

[data-theme="light"] .inp {
    color: #0f172a
}

[data-theme="light"] select.inp {
    background-color: #fff;
    color: #0f172a;
    color-scheme: light;
}

[data-theme="light"] select.inp option {
    background-color: #fff;
    color: #0f172a;
}

/* buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: all .2s;
    font-family: 'Sora', sans-serif;
    white-space: nowrap
}

.btn-pr {
    background: var(--pr);
    color: #fff
}

.btn-pr:hover {
    background: #818cf8;
    transform: translateY(-1px)
}

.btn-ac {
    background: var(--ac);
    color: #fff
}

.btn-ac:hover {
    background: #34d399
}

.btn-wn {
    background: var(--wn);
    color: #000
}

.btn-wn:hover {
    background: #fbbf24
}

.btn-dg {
    background: #7f1d1d;
    color: #fca5a5;
    border: 1px solid #991b1b
}

.btn-dg:hover {
    background: #991b1b
}

.btn-vi {
    background: #7c3aed;
    color: #fff
}

.btn-vi:hover {
    background: #8b5cf6
}

.btn-tl {
    background: #0d9488;
    color: #fff
}

.btn-tl:hover {
    background: #14b8a6
}

.btn-ol {
    background: transparent;
    color: var(--pr);
    border: 1px solid var(--pr)
}

.btn-ol:hover {
    background: rgba(99, 102, 241, .1)
}

.btn-em {
    background: #065f46;
    color: #6ee7b7;
    border: 1px solid #047857
}

.btn-em:hover {
    background: #047857
}

.btn-gray {
    background: rgba(100, 116, 139, .15);
    color: var(--mu);
    border: 1px solid var(--bd)
}

.btn-gray:hover {
    background: rgba(100, 116, 139, .25)
}

[data-theme="light"] .btn-dg {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5
}

[data-theme="light"] .btn-em {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7
}

/* cards */
.card {
    background: var(--card);
    border: 1px solid var(--bd);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--sh);
    min-width: 0;
}

.card-hd {
    padding: 14px 20px;
    background: var(--ch);
    border-bottom: 1px solid var(--bd);
    display: flex;
    align-items: center;
    gap: 10px
}

/* hash badges */
.hb {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    word-break: break-all;
    background: rgba(99, 102, 241, .08);
    border: 1px solid rgba(99, 102, 241, .25);
    color: #a5b4fc;
    padding: 10px 14px;
    border-radius: 8px;
    line-height: 1.6
}

.sb {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    word-break: break-all;
    background: rgba(16, 185, 129, .06);
    border: 1px solid rgba(16, 185, 129, .2);
    color: #34d399;
    padding: 10px 14px;
    border-radius: 8px;
    line-height: 1.6
}

[data-theme="light"] .hb {
    background: rgba(79, 70, 229, .07);
    border-color: rgba(79, 70, 229, .3);
    color: #4338ca
}

[data-theme="light"] .sb {
    background: rgba(5, 150, 105, .06);
    border-color: rgba(5, 150, 105, .2);
    color: #059669
}

/* status badges */
.bv {
    background: rgba(16, 185, 129, .12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, .3);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em
}

.bw {
    background: rgba(245, 158, 11, .12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, .3);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em
}

.bm {
    background: rgba(99, 102, 241, .12);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, .3);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700
}

.bd2 {
    background: rgba(16, 185, 129, .12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, .3);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700
}

[data-theme="light"] .bv {
    background: rgba(5, 150, 105, .1);
    color: #059669
}

[data-theme="light"] .bw {
    background: rgba(180, 83, 9, .1);
    color: #92400e
}

[data-theme="light"] .bm {
    background: rgba(79, 70, 229, .1);
    color: #4338ca
}

/* alerts */
.a-ok {
    background: rgba(16, 185, 129, .1);
    border: 1px solid rgba(16, 185, 129, .3);
    color: #059669;
    padding: 14px 18px;
    border-radius: 10px
}

.a-er {
    background: rgba(239, 68, 68, .1);
    border: 1px solid rgba(239, 68, 68, .3);
    color: #dc2626;
    padding: 14px 18px;
    border-radius: 10px
}

.a-in {
    background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .3);
    color: #4f46e5;
    padding: 14px 18px;
    border-radius: 10px
}

[data-theme="dark"] .a-ok {
    color: #34d399
}

[data-theme="dark"] .a-er {
    color: #f87171
}

[data-theme="dark"] .a-in {
    color: #a5b4fc
}

/* table */
.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px
}

.tbl th {
    padding: 12px 16px;
    text-align: left;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mu);
    font-weight: 600;
    border-bottom: 1px solid var(--bd)
}

.tbl td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(31, 45, 61, .4);
    vertical-align: middle
}

.tbl tr:hover td {
    background: rgba(255, 255, 255, .015)
}

/* info cell */
.ic {
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--bd);
    border-radius: 10px;
    padding: 10px 12px
}

.ic-full {
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--bd);
    border-radius: 10px;
    padding: 10px 12px;
    grid-column: 1 / -1
}

.ic .lbl {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--mu);
    margin-bottom: 4px;
    display: block
}

[data-theme="light"] .ic {
    background: rgba(79, 70, 229, .04);
    border-color: #dce5ef
}

[data-theme="light"] .ic-full {
    background: rgba(79, 70, 229, .04);
    border-color: #dce5ef
}

/* rsa badge */
.rsa-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(139, 92, 246, .12);
    border: 1px solid rgba(139, 92, 246, .3);
    color: #a78bfa;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .07em
}

[data-theme="light"] .rsa-badge {
    background: rgba(109, 40, 217, .08);
    color: #6d28d9
}

/* key panel */
.key-panel {
    background: linear-gradient(135deg, rgba(139, 92, 246, .08), rgba(99, 102, 241, .06));
    border: 1px solid rgba(139, 92, 246, .25);
    border-radius: 14px;
    padding: 18px 20px;
    min-width: 0;
}

/* tab */
.tab-btn {
    flex: 1;
    padding: 8px 4px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px
}

.tab-mhs {
    background: rgba(99, 102, 241, .2);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, .3)
}

.tab-mhs.on {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1
}

.tab-dsn {
    background: rgba(16, 185, 129, .15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, .3)
}

.tab-dsn.on {
    background: #10b981;
    color: #fff;
    border-color: #10b981
}

/* delete modal */
.del-bg {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(8, 9, 15, .75);
    backdrop-filter: blur(6px);
    padding: 16px
}

.del-bg.on {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important
}

.del-box {
    background: var(--card);
    border: 1px solid var(--bd);
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: pop .25s cubic-bezier(.34, 1.56, .64, 1)
}

@keyframes pop {
    from {
        opacity: 0;
        transform: scale(.88)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

/* dl overlay */
#dlOv {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 9, 15, .85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px)
}

#dlOv.on {
    display: flex
}

.spin {
    width: 48px;
    height: 48px;
    border: 3px solid var(--bd);
    border-top-color: var(--pr);
    border-radius: 50%;
    animation: sp .7s linear infinite;
    margin: 0 auto 16px
}

@keyframes sp {
    to {
        transform: rotate(360deg)
    }
}

/* theme toggle */
.tt {
    position: relative;
    width: 52px;
    height: 28px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #1f2d3d, #111827);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .4);
    transition: all .35s;
    flex-shrink: 0
}

[data-theme="light"] .tt {
    background: linear-gradient(135deg, #c7d2fe, #a5b4fc)
}

.tt-th {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), background .35s;
    font-size: 12px
}

[data-theme="light"] .tt-th {
    transform: translateX(24px);
    background: #4f46e5
}

.tt-th .im {
    display: block
}

[data-theme="light"] .tt-th .im {
    display: none
}

.tt-th .is {
    display: none
}

[data-theme="light"] .tt-th .is {
    display: block
}

/* nav */
nav {
    background: var(--nav) !important;
    border-color: var(--bd) !important;
    backdrop-filter: blur(12px)
}

/* animations */
@keyframes fi {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.fi {
    animation: fi .35s ease forwards
}

@keyframes pb {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, .5)
    }

    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0)
    }
}

.pb {
    animation: pb 1.5s ease infinite
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px
}

::-webkit-scrollbar-track {
    background: var(--bg)
}

::-webkit-scrollbar-thumb {
    background: var(--bd);
    border-radius: 999px
}

/* del btn */
.del-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, .3);
    background: rgba(239, 68, 68, .08);
    color: #f87171;
    cursor: pointer;
    font-size: 11px;
    transition: all .2s
}

.del-btn:hover {
    background: rgba(239, 68, 68, .22);
    transform: scale(1.1)
}

/* drop zone */
.dz {
    border: 2px dashed var(--bd);
    border-radius: 14px;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .3s
}

.dz:hover {
    border-color: var(--pr);
    background: rgba(99, 102, 241, .04)
}

/* stat card */
.stat {
    background: var(--card);
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--sh);
    min-width: 0;
}

/* light overrides */
[data-theme="light"] .text-white {
    color: #0f172a !important
}

[data-theme="light"] .text-slate-300 {
    color: #475569 !important
}

[data-theme="light"] .text-slate-400 {
    color: #64748b !important
}

[data-theme="light"] .text-slate-500 {
    color: #64748b !important
}

[data-theme="light"] .text-indigo-400 {
    color: #4338ca !important
}

[data-theme="light"] .text-emerald-400 {
    color: #059669 !important
}

[data-theme="light"] .text-violet-400 {
    color: #6d28d9 !important
}

[data-theme="light"] .text-amber-400 {
    color: #b45309 !important
}

[data-theme="light"] .text-red-400 {
    color: #dc2626 !important
}

[data-theme="light"] .text-purple-400 {
    color: #6d28d9 !important
}

[data-theme="light"] .stat {
    background: #fff
}

[data-theme="light"] .tbl td {
    color: #334155
}

[data-theme="light"] .tbl th {
    color: #64748b;
    border-color: #d1dce8
}

[data-theme="light"] .bg-slate-900\/40 {
    background: rgba(241, 245, 249, .9) !important
}

[data-theme="light"] .border-slate-800 {
    border-color: #d1dce8 !important
}

body,
.card,
.stat,
.inp,
.tbl td,
.tbl th {
    transition-property: background, color, border-color;
    transition-duration: .3s
}

/* ═══════════════════════════════════════════
   BREATHING ANIMATION — Tampilan Valid Publik
   ═══════════════════════════════════════════ */

/* 1. Breathing glow pada container a-ok (bernafas) */
@keyframes breathe-ok {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0),
            0 0 16px 2px rgba(16, 185, 129, 0.08);
        border-color: rgba(16, 185, 129, 0.3);
        background: rgba(16, 185, 129, 0.08);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0),
            0 0 40px 8px rgba(16, 185, 129, 0.22);
        border-color: rgba(16, 185, 129, 0.65);
        background: rgba(16, 185, 129, 0.15);
    }
}

.a-ok-breathe {
    animation: breathe-ok 3s ease-in-out infinite;
}

/* 2. Pulse scale pada ikon centang */
@keyframes icon-breathe {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px rgba(16, 185, 129, 0));
    }

    50% {
        transform: scale(1.18);
        filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.9));
    }
}

.icon-breathe {
    animation: icon-breathe 3s ease-in-out infinite;
    display: inline-block;
}

/* 3. Ripple ring di sekitar ikon header */
@keyframes ripple-ring {
    0% {
        transform: scale(0.85);
        opacity: 0.6;
    }

    70% {
        transform: scale(1.35);
        opacity: 0;
    }

    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.valid-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.valid-icon-wrap::before,
.valid-icon-wrap::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid rgba(16, 185, 129, 0.5);
    animation: ripple-ring 3s ease-out infinite;
}

.valid-icon-wrap::after {
    animation-delay: 1.5s;
}

/* 4. Shimmer text pada judul DOKUMEN VALID */
@keyframes shimmer-text {

    0%,
    100% {
        text-shadow: 0 0 0px rgba(52, 211, 153, 0),
            0 0 0px rgba(52, 211, 153, 0);
        opacity: 1;
    }

    50% {
        text-shadow: 0 0 20px rgba(52, 211, 153, 0.7),
            0 0 40px rgba(16, 185, 129, 0.4);
        opacity: 0.92;
    }
}

.valid-title-breathe {
    animation: shimmer-text 3s ease-in-out infinite;
}

/* 5. Breathing border pada card detail dokumen saat valid */
@keyframes card-breathe {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }

    50% {
        box-shadow: 0 0 18px 3px rgba(16, 185, 129, 0.14);
    }
}

.card-breathe {
    animation: card-breathe 4s ease-in-out infinite;
}

/* 6. Fade-in entri tampilan valid */
@keyframes valid-enter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.valid-enter {
    animation: valid-enter 0.6s cubic-bezier(.34, 1.56, .64, 1) forwards;
}

/* 7. Floating dot indicator */
@keyframes float-dot {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.float-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    animation: float-dot 2s ease-in-out infinite, breathe-ok 2s ease-in-out infinite;
    flex-shrink: 0;
}