/* ═══════════════════════════════════════════════════════════════
   THE ORDO — liturgy theme layer
   Dark Liturgical family untuk halaman non-landing.
   Dimuat PALING AKHIR (setelah geist.css) — menang cascade.
   Phase 1: auth (login/register). Phase 2: app shell (layouts/main).
   Palet: off-black violet + amber lilin; radius 0; hairline purple.
   ═══════════════════════════════════════════════════════════════ */

/* ── remap token Geist → keluarga liturgi ──
   semua komponen lama yang memakai var(--g-*) ikut berubah sendiri */
:root {
    --g-bg:            #0b0a10;
    --g-card:          #0e0c15;
    --g-popover:       #0e0c15;
    --g-secondary:     #110f18;
    --g-muted-bg:      #12101a;
    --g-accent:        #181524;
    --g-primary:       #e8a54b;
    --g-primary-hover: #f0b867;
    --g-ring:          #e8a54b;
    --g-accent-fg:     #e8a54b;
    --g-border:        rgba(32, 24, 51, .95);
    --g-border-hover:  rgba(61, 42, 92, .95);
    --g-sidebar:       #090811;
    --g-radius-sm:     0;
    --g-radius-md:     0;
    --g-radius-lg:     0;
    --g-radius-xl:     0;

    /* token radius custom.css + Bootstrap — siku menyeluruh */
    --ordo-radius-sm:  0;
    --ordo-radius-md:  0;
    --ordo-radius-lg:  0;
    --bs-border-radius: 0rem;
    --bs-border-radius-sm: 0rem;
    --bs-border-radius-lg: 0rem;
    --bs-border-radius-xl: 0rem;
    --bs-border-radius-2xl: 0rem;
    --bs-border-radius-pill: 0rem;

    /* token liturgi — padanan --ol-* di landing-liturgy.css */
    --lt-bg:       #0b0a10;
    --lt-raise:    #0e0c15;
    --lt-purple:   #201833;
    --lt-purple-2: #3d2a5c;
    --lt-haze:     #52407a;
    --lt-candle:   #e8a54b;
    --lt-ember:    #b0562a;
    --lt-text:     #ece6f4;
    --lt-text-2:   #a99dbf;
    --lt-bone:     #d8cfe3;
}

/* ── film grain — nuansa, bukan background (padanan .ol-grain landing) ── */
body { background: var(--lt-bg); }
body::after {
    content: "";
    position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; opacity: .07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ═══ AUTH — kartu liturgi ═══ */
.auth-shell { background: var(--lt-bg); }
.auth-card {
    max-width: 440px; padding: 38px 34px;
    background: var(--lt-raise);
    border: 1px solid var(--lt-purple);
    border-radius: 0;
    box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .85);
}

/* brand block: wordmark Cinzel + label mono ember + heading serif */
.auth-card .brand { text-align: center; margin-bottom: 28px; }
.auth-card .lt-wordmark {
    font-family: "Cinzel", serif; font-weight: 600; font-size: 19px;
    letter-spacing: .42em; padding-left: .42em; color: #d9d0e6;
    margin: 0 0 4px;
}
.auth-card .lt-wordmark::after {
    content: ""; display: block; width: 56px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--lt-purple-2), transparent);
    margin: 16px auto 0;
}
.auth-card .lt-label {
    font-family: "Geist Mono", monospace; font-size: 10px;
    letter-spacing: .38em; text-transform: uppercase;
    color: var(--lt-candle); opacity: .85; margin: 0 0 6px;
}
.auth-card h1 {
    font-family: "EB Garamond", Georgia, serif; font-weight: 500;
    font-size: 22px; letter-spacing: .02em; color: var(--lt-text); margin: 0;
}
.auth-card .brand-sub {
    font-family: "EB Garamond", Georgia, serif; font-style: italic; font-weight: 400;
    font-size: 14px; color: var(--lt-text-2); margin: 8px 0 0;
}

/* label form: mono ember kecil (padanan .ol-label) */
.auth-field .g-label {
    font-family: "Geist Mono", monospace; font-size: 10px;
    letter-spacing: .24em; text-transform: uppercase;
    color: var(--lt-candle); opacity: .8;
}

/* input: tetap sans demi keterbacaan; siku + fokus ember */
.auth-input input, .auth-input select {
    background: #08070f; border: 1px solid var(--lt-purple);
    border-radius: 0; color: var(--lt-text); font-size: 13px;
    transition: border-color .25s ease, box-shadow .25s ease;
}
/* jaga fill gelap saat Chrome autofill (default-nya kuning terang) */
.auth-input input:-webkit-autofill,
.auth-input input:-webkit-autofill:hover,
.auth-input input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #08070f inset;
    -webkit-text-fill-color: var(--lt-text);
    caret-color: var(--lt-text);
}
.auth-input input::placeholder { color: rgba(169, 157, 191, .32); }
.auth-input input:focus, .auth-input select:focus {
    border-color: var(--lt-candle); outline: none;
    box-shadow: 0 0 0 1px rgba(232, 165, 75, .18), 0 0 24px -6px rgba(232, 165, 75, .14);
}
.auth-input .eye:hover { color: var(--lt-candle); }

/* tombol submit = padanan .ol-btn-solid (bone, teks gelap) */
.auth-submit {
    background: #b8adc6; color: #0a0812; border: 1px solid #b8adc6;
    border-radius: 0; height: 46px;
    font-family: "Geist Mono", monospace; font-size: 12px; font-weight: 500;
    letter-spacing: .22em; text-transform: uppercase;
    transition: background .25s ease, box-shadow .25s ease;
}
.auth-submit:hover {
    background: #cfc6da; color: #0a0812;
    box-shadow: 0 0 0 1px rgba(138, 90, 42, .2), 0 10px 36px rgba(138, 90, 42, .08);
}
.auth-submit:disabled { opacity: .55; cursor: not-allowed; }

/* footer auth: mono hairline (padanan footer landing) */
.auth-footer {
    border-top: 1px solid var(--lt-purple);
    font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: .06em;
    color: var(--lt-text-2);
}
.auth-footer a { color: var(--lt-text); font-weight: 400; }
.auth-footer a:hover { color: var(--lt-candle); }
.auth-footer .lt-small { font-size: 11px; color: rgba(169, 157, 191, .62); }
.auth-footer .lt-small a { color: rgba(169, 157, 191, .82); }
.auth-footer .lt-small a:hover { color: var(--lt-candle); }

/* alert di dalam kartu: siku + gelap, makna warna tetap */
.auth-card .alert { border-radius: 0; font-size: 12px; border: 1px solid var(--lt-purple); }
.auth-card .alert-danger  { background: #150d13; border-color: var(--lt-purple-2); color: #e8a0ad; }
.auth-card .alert-success { background: #0f1310; border-color: var(--lt-purple); color: #a8d8bb; }
.auth-card .alert-warning { background: #15120c; border-color: var(--lt-purple-2); color: #e8c48a; }

/* ═══ SweetAlert2 — lanjut liturgi (geist sudah dark via token; siku + teks tombol) ═══ */
.swal2-popup { border-radius: 0 !important; }
.swal2-confirm, .swal2-cancel, .swal2-deny { border-radius: 0 !important; }
.swal2-confirm { color: #0a0812 !important; }
.swal2-toast { border-radius: 0 !important; }

/* ═══ motion ═══ */
@media (prefers-reduced-motion: reduce) {
    body::after { display: none; }
}


/* ═══════════════════════════════════════════════════════════════
   Phase 2 — APP SHELL (layouts/main): sidebar, topbar, dashboard,
   checker deck, topup, api-docs, admin (shared shell).
   Skin murni CSS — struktur Hyper/Bootstrap dan JS tidak disentuh.
   ═══════════════════════════════════════════════════════════════ */

/* ── sidebar ── */
.sidenav-menu { border-right: 1px solid var(--lt-purple) !important; }
.sidenav-menu .logo { border-bottom: 1px solid var(--lt-purple); }
.sidenav-menu .logo .lt-wordmark {
    display: inline-block;
    font-family: "Cinzel", serif; font-weight: 600; font-size: 16px;
    letter-spacing: .42em; padding-left: .42em; color: #d9d0e6;
}
.left-side-menu-condensed .sidenav-menu .logo .lt-wordmark { display: none; }
.side-nav-link { border-radius: 0 !important; }
.side-nav-link:hover .menu-icon { color: var(--lt-candle) !important; }
.side-nav-item.active > .side-nav-link,
.side-nav-link.active {
    background: rgba(232, 165, 75, .10) !important;
    color: var(--lt-text) !important;
}
.side-nav-item.active > .side-nav-link::before,
.side-nav-link.active::before {
    background: var(--lt-candle) !important; border-radius: 0 !important;
}
.side-nav-title { color: var(--lt-candle) !important; opacity: .75; }

/* ── topbar ── */
.app-topbar {
    background: rgba(11, 10, 16, .85) !important;
    border-bottom: 1px solid var(--lt-purple) !important;
}
.g-balance { border-radius: 0; border-color: var(--lt-purple); }
.g-balance:hover { border-color: var(--lt-candle); }
.g-balance .dot {
    background: var(--lt-candle);
    box-shadow: 0 0 10px rgba(232, 165, 75, .5);
}
.g-user-btn { border-radius: 0; border-color: var(--lt-purple); }
.g-user-btn:hover, .g-user-btn.show { border-color: var(--lt-candle); }

/* ── label section global — padanan .ol-label landing ── */
.g-label { color: var(--lt-candle) !important; letter-spacing: .24em; font-size: 10px; opacity: .85; }

/* ── dashboard ── */
.dash-header h1 { font-family: "EB Garamond", Georgia, serif; font-weight: 500; letter-spacing: .01em; }
.wallet-console { border-radius: 0 !important; }
.wallet-balance .unit { color: var(--lt-candle); }
.g-pill { border-radius: 0; }
.g-chip { border-radius: 0; border-color: var(--lt-purple); }
.cat-tab { border-radius: 0; }
.cat-tab.active { color: #0a0812 !important; }
.cat-search input {
    border-radius: 0 !important;
    background: #08070f !important;
    border-color: var(--lt-purple) !important;
}
.cat-search input:focus { border-color: var(--lt-candle) !important; }
.gate-card { border-radius: 0; }
.gate-card:hover { border-color: var(--lt-purple-2); }
.gate-card .icon { border-radius: 0 !important; }

/* ── checker deck ── */
.checker-deck-head { background: #0d0b14; border-bottom: 1px solid var(--lt-purple); }
.line-pill, .pf-btn, .kw-preset, .cookie-btn, .copy-single { border-radius: 0; }
.pf-btn.pf-primary {
    background: rgba(232, 165, 75, .12);
    border-color: rgba(232, 165, 75, .30);
    color: var(--lt-candle);
}
.pf-btn.pf-primary:hover:not(:disabled) { background: rgba(232, 165, 75, .20); }
.checker-textarea { border-radius: 0; background: #060509; border-color: var(--lt-purple); }
.checker-textarea:focus {
    border-color: var(--lt-candle);
    box-shadow: 0 0 0 1px rgba(232, 165, 75, .18);
}
.option-drawer, .opt-input, .drop-overlay, .inspector-tabs, .inspector-tab { border-radius: 0; }
.btn-start { color: #0a0812 !important; }
.btn-start:hover:not(:disabled) { color: #0a0812 !important; }
.progress-track, .progress-fill { border-radius: 0; }
.inspector-tab.active { border-color: rgba(232, 165, 75, .50); background: rgba(232, 165, 75, .10); }
.stream-row { border-radius: 0; }
.stream-row.row-error { background: #0e0c16; border-color: rgba(61, 42, 92, .50); color: #cfc6da; }
.tel-chip { border-radius: 0; }

/* ── Bootstrap global — siku + token ── */
.btn { border-radius: 0 !important; }
.btn-primary, .btn-success {
    --bs-btn-color: #0a0812; --bs-btn-hover-color: #0a0812; --bs-btn-active-color: #0a0812;
}
.form-control, .form-select {
    border-radius: 0 !important;
    background: #08070f !important;
    border-color: var(--lt-purple) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--lt-candle) !important;
    box-shadow: 0 0 0 1px rgba(232, 165, 75, .18) !important;
}
.card { border-radius: 0 !important; }
.modal-content { border-radius: 0 !important; }
.dropdown-menu { border-radius: 0 !important; border-color: var(--lt-purple) !important; }
.dropdown-item { border-radius: 0 !important; }
.badge { border-radius: 0 !important; }
.alert { border-radius: 0 !important; }
.pagination .page-link { border-radius: 0 !important; }
.table thead th {
    font-family: var(--g-font-mono) !important;
    font-size: 10.5px !important; letter-spacing: .14em !important;
}

/* ── label liturgi global (di luar kartu auth) ── */
.lt-label {
    font-family: "Geist Mono", monospace; font-size: 10px;
    letter-spacing: .38em; text-transform: uppercase;
    color: var(--lt-candle); opacity: .85; margin: 0 0 6px;
}

/* ── page header admin — judul serif, breadcrumb mono ember ── */
.page-title-head h4 {
    font-family: "EB Garamond", Georgia, serif !important;
    font-weight: 500 !important; text-transform: none !important;
    letter-spacing: .02em !important;
}
.page-title-head small.text-uppercase {
    font-family: var(--g-font-mono); color: var(--lt-candle) !important;
    letter-spacing: .24em; opacity: .85;
}
.page-title-box .page-title {
    font-family: "EB Garamond", Georgia, serif !important;
    font-weight: 500 !important; letter-spacing: .02em !important;
}

/* ── footer app ── */
.footer { background: var(--lt-bg) !important; border-top: 1px solid var(--lt-purple) !important; }

/* ── gridjs (admin subscriptions/history, grid_card) ── */
.gridjs-wrapper, .gridjs-head, .gridjs-footer, .gridjs-table { border-radius: 0 !important; }
.gridjs-pagination .gridjs-pages button { border-radius: 0 !important; }
.gridjs-pagination .gridjs-pages button.gridjs-currentPage { background: rgba(232, 165, 75, .16) !important; }

/* ── mobile shell (<768px): sidebar off-canvas, konten full-width ──
   Hyper tidak punya mode mobile (sidebar fixed 250px selalu menindih).
   Hamburger di-toggle via kelas body.sidenav-lt-open (script di layouts/main). */
@media (max-width: 767.98px) {
    .app-topbar, .page-content, .footer { margin-left: 0 !important; }
    .sidenav-menu {
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 1001;
        box-shadow: 0 0 60px rgba(0, 0, 0, .7);
    }
    body.sidenav-lt-open .sidenav-menu { transform: none; }
    body.sidenav-lt-open::before {
        content: ""; position: fixed; inset: 0; z-index: 999;
        background: rgba(3, 2, 6, .6);
    }
}
