/* ═══════════════════════════════════════════════════════════════════════════
 *  ORDO — Geist Dark Theme Layer (Phase 6)
 *  Token system + component overrides on top of Bootstrap/Hyper.
 *  Design contract (ordo-next parity):
 *    bg #060508 · card #0B0A10 · popover #0E0C14 · primary violet #8B5CF6
 *    (primary ONLY on buttons/focus/active/live) · hairline borders
 *    rgba(255,255,255,0.065) · Geist Sans / Geist Mono · radius 8/12/16/20
 *  BANNED by spec: grain, laser borders, glows, blobs, gradients.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted) ────────────────────────────────────────────────── */
@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist-Medium.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist-SemiBold.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist-Bold.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Geist Mono';
    src: url('../fonts/GeistMono-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Geist Mono';
    src: url('../fonts/GeistMono-Medium.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Geist Mono';
    src: url('../fonts/GeistMono-SemiBold.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
    --g-bg:            #060508;
    --g-card:         #0B0A10;
    --g-popover:      #0E0C14;
    --g-secondary:    #110F18;
    --g-muted-bg:     #12101A;
    --g-accent:       #181524;
    --g-fg:           #F3F4F6;
    --g-fg-muted:     #6B7280;
    --g-fg-secondary: #9CA3AF;
    --g-primary:      #8B5CF6;
    --g-primary-hover:#7C3AED;
    --g-ring:         #A855F7;
    --g-accent-fg:    #C4B5FD;
    --g-destructive:  #F43F5E;
    --g-success:      #10B981;
    --g-warning:      #F59E0B;
    --g-border:       rgba(255, 255, 255, 0.065);
    --g-border-hover: rgba(255, 255, 255, 0.12);
    --g-input:        rgba(255, 255, 255, 0.04);
    --g-sidebar:      #07060A;
    --g-radius-sm:    8px;
    --g-radius-md:    12px;
    --g-radius-lg:    16px;
    --g-radius-xl:    20px;
    --g-font-sans:    'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --g-font-mono:    'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    --g-shadow-card:  0 4px 20px -2px rgba(0, 0, 0, 0.55);
    --g-hairline:     1px solid var(--g-border);
}

/* ── Base ───────────────────────────────────────────────────────────────── */
html, body {
    background-color: var(--g-bg) !important;
    color: var(--g-fg) !important;
    font-family: var(--g-font-sans) !important;
    font-feature-settings: 'rlig' 1, 'calt' 1, 'ss01' 1;
    -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(139, 92, 246, 0.30); color: #fff; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.20); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168, 85, 247, 0.35); }

h1, h2, h3, h4, h5, h6 { color: #fff; letter-spacing: -0.01em; }
a { color: var(--g-accent-fg); }
a:hover { color: #fff; }
code, pre, .font-monospace { font-family: var(--g-font-mono) !important; }

/* ── Utility classes ────────────────────────────────────────────────────── */
.g-mono   { font-family: var(--g-font-mono) !important; }
.g-label  { font-family: var(--g-font-mono); font-size: 11px; text-transform: uppercase;
            letter-spacing: 0.06em; color: rgba(255,255,255,0.50); }
.g-muted  { color: var(--g-fg-muted) !important; }
.g-fg-2   { color: var(--g-fg-secondary) !important; }

.matte-card, .g-card {
    background: var(--g-card) !important;
    border: var(--g-hairline) !important;
    border-radius: var(--g-radius-xl) !important;
    box-shadow: var(--g-shadow-card) !important;
    transition: border-color 0.15s ease;
}
.matte-card:hover, .g-card:hover { border-color: var(--g-border-hover) !important; }

.g-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 9999px;
    font-family: var(--g-font-mono); font-size: 11px;
    background: rgba(16, 185, 129, 0.10); color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.20);
}
.g-pill .dot { width: 6px; height: 6px; border-radius: 9999px; background: #34D399; }

.g-chip {
    display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
    border-radius: 8px; border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.70); font-size: 12px;
}

/* ── Bootstrap: buttons ─────────────────────────────────────────────────── */
.btn-primary, .btn-success {
    --bs-btn-bg: var(--g-primary);
    --bs-btn-border-color: var(--g-primary);
    --bs-btn-hover-bg: var(--g-primary-hover);
    --bs-btn-hover-border-color: var(--g-primary-hover);
    --bs-btn-active-bg: var(--g-primary-hover);
    --bs-btn-active-border-color: var(--g-primary-hover);
    --bs-btn-disabled-bg: var(--g-primary);
    --bs-btn-disabled-border-color: var(--g-primary);
    color: #fff;
    font-weight: 500;
    border-radius: var(--g-radius-md);
    box-shadow: none !important;
}
.btn { box-shadow: none !important; }
.btn:focus, .btn:focus-visible { box-shadow: 0 0 0 1px var(--g-ring) !important; outline: none; }

.btn-secondary, .btn-outline-secondary, .btn-outline-primary, .btn-light {
    --bs-btn-bg: rgba(255,255,255,0.03);
    --bs-btn-border-color: rgba(255,255,255,0.09);
    --bs-btn-color: rgba(255,255,255,0.65);
    --bs-btn-hover-bg: rgba(255,255,255,0.06);
    --bs-btn-hover-border-color: rgba(255,255,255,0.14);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: rgba(255,255,255,0.08);
    --bs-btn-active-border-color: rgba(255,255,255,0.16);
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: rgba(255,255,255,0.03);
    --bs-btn-disabled-border-color: rgba(255,255,255,0.09);
    --bs-btn-disabled-color: rgba(255,255,255,0.35);
    border-radius: var(--g-radius-md);
}

.btn-danger, .btn-outline-danger {
    --bs-btn-bg: rgba(244, 63, 94, 0.12);
    --bs-btn-border-color: rgba(244, 63, 94, 0.30);
    --bs-btn-color: #FDA4AF;
    --bs-btn-hover-bg: rgba(244, 63, 94, 0.20);
    --bs-btn-hover-border-color: rgba(244, 63, 94, 0.45);
    --bs-btn-hover-color: #fff;
    border-radius: var(--g-radius-md);
}
.btn-warning {
    --bs-btn-bg: rgba(245, 158, 11, 0.12);
    --bs-btn-border-color: rgba(245, 158, 11, 0.30);
    --bs-btn-color: #FCD34D;
    --bs-btn-hover-bg: rgba(245, 158, 11, 0.20);
    --bs-btn-hover-color: #fff;
    border-radius: var(--g-radius-md);
}
.btn-info {
    --bs-btn-bg: rgba(139, 92, 246, 0.12);
    --bs-btn-border-color: rgba(139, 92, 246, 0.30);
    --bs-btn-color: #C4B5FD;
    --bs-btn-hover-bg: rgba(139, 92, 246, 0.20);
    --bs-btn-hover-color: #fff;
    border-radius: var(--g-radius-md);
}

/* ── Bootstrap: cards & surfaces ────────────────────────────────────────── */
.card {
    background-color: var(--g-card) !important;
    border: var(--g-hairline) !important;
    border-radius: var(--g-radius-lg) !important;
    box-shadow: var(--g-shadow-card) !important;
    color: var(--g-fg);
}
.card-header {
    background: transparent !important;
    border-bottom: var(--g-hairline) !important;
    color: #fff; font-weight: 600;
}
.card-footer { background: transparent !important; border-top: var(--g-hairline) !important; }
.modal-content {
    background-color: var(--g-popover) !important;
    border: var(--g-hairline) !important;
    border-radius: var(--g-radius-lg) !important;
    color: var(--g-fg);
}
.modal-header, .modal-footer { border-color: var(--g-border) !important; }
.dropdown-menu {
    background-color: var(--g-popover) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    border-radius: var(--g-radius-md) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.60) !important;
}
.dropdown-item { color: rgba(255,255,255,0.70) !important; border-radius: 8px; }
.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(255,255,255,0.06) !important; color: #fff !important;
}
.dropdown-divider { border-color: var(--g-border) !important; }

/* ── Bootstrap: forms ────────────────────────────────────────────────────── */
.form-control, .form-select {
    background-color: #060509 !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    color: var(--g-fg) !important;
    border-radius: 12px !important;
    font-family: var(--g-font-sans);
    transition: border-color 0.15s ease;
}
.form-control::placeholder { color: rgba(255,255,255,0.15) !important; }
.form-control:focus, .form-select:focus {
    background-color: #060509 !important;
    border-color: rgba(139,92,246,0.60) !important;
    color: #fff !important;
    box-shadow: 0 0 0 1px rgba(139,92,246,0.40) !important;
}
.form-control:disabled, .form-control[readonly] { background-color: var(--g-muted-bg) !important; }
.form-label, .form-check-label { color: rgba(255,255,255,0.70); }
.form-text { color: var(--g-fg-muted) !important; }
.input-group-text {
    background-color: var(--g-secondary) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    color: var(--g-fg-muted) !important;
}

/* ── Bootstrap: tables, badges, alerts ──────────────────────────────────── */
.table { --bs-table-bg: transparent; --bs-table-color: var(--g-fg);
         border-color: var(--g-border) !important; }
.table > :not(caption) > * > * { background-color: transparent; color: inherit;
                                 border-color: var(--g-border); }
.table thead th { color: rgba(255,255,255,0.45); font-weight: 500; font-size: 12px;
                  text-transform: uppercase; letter-spacing: 0.04em; }
.badge { border-radius: 6px; font-weight: 500; }
.alert { border-radius: var(--g-radius-md); border: var(--g-hairline); }

/* ── SweetAlert2 (dark polish) ──────────────────────────────────────────── */
.swal2-popup {
    background: var(--g-popover) !important;
    color: var(--g-fg) !important;
    border: var(--g-hairline);
    border-radius: var(--g-radius-lg) !important;
}
.swal2-title { color: #fff !important; }
.swal2-html-container { color: rgba(255,255,255,0.60) !important; }
.swal2-confirm { background-color: var(--g-primary) !important;
                 border-radius: 10px !important; box-shadow: none !important; }
.swal2-cancel { background-color: rgba(255,255,255,0.06) !important;
                color: rgba(255,255,255,0.70) !important; border-radius: 10px !important; }
.swal2-validation-message { background: rgba(244,63,94,0.10) !important; color: #FDA4AF !important; }

/* ═══════════════════════════════════════════════════════════════════════
 *  App shell — sidebar + topbar (Hyper structural classes, Geist skin)
 * ═══════════════════════════════════════════════════════════════════════ */

/* Sidebar surface */
.sidenav-menu {
    background: var(--g-sidebar) !important;
    border-right: 1px solid rgba(255,255,255,0.05) !important;
    box-shadow: none !important;
}
.left-side-menu-condensed .sidenav-menu { box-shadow: 0 0 40px rgba(0,0,0,0.5) !important; }

/* Brand */
.sidenav-menu .logo { padding: 18px 20px 14px !important; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sidenav-menu .logo img.logo-lg { height: 26px !important; }

/* Nav items */
.side-nav { margin-top: 8px; padding: 0 10px 24px; }
.side-nav-item { position: relative; }
.side-nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px !important; margin: 1px 0;
    border-radius: 10px;
    color: rgba(255,255,255,0.55) !important;
    font-size: 13.5px; font-weight: 500;
    transition: background 0.12s ease, color 0.12s ease;
}
.side-nav-link:hover {
    background: rgba(255,255,255,0.04);
    color: #fff !important;
}
.side-nav-link .menu-icon {
    width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 18px; font-size: 17px; color: rgba(255,255,255,0.45);
}
.side-nav-link:hover .menu-icon { color: #fff; }
.side-nav-link .menu-text { flex: 1 1 auto; min-width: 0; }

/* Active state — violet accent bar + white text (Geist) */
.side-nav-item.active > .side-nav-link,
.side-nav-link.active {
    background: rgba(139, 92, 246, 0.12) !important;
    color: #fff !important;
}
.side-nav-item.active > .side-nav-link .menu-icon,
.side-nav-link.active .menu-icon { color: #fff !important; }
.side-nav-item.active > .side-nav-link::before,
.side-nav-link.active::before {
    content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px;
    width: 2px; border-radius: 9999px; background: var(--g-primary);
}

/* Section titles */
.side-nav-title {
    padding: 14px 10px 6px !important;
    font-family: var(--g-font-mono); font-size: 10px !important;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: rgba(255,255,255,0.30) !important;
}

/* Sub menus */
.sub-menu { padding-left: 14px !important; }
.sub-menu .side-nav-link { font-size: 12.5px; padding: 6px 10px !important; }

/* Collapse arrows */
.side-nav-link .menu-arrow {
    width: auto !important; height: auto !important;
    border: none !important;
    margin-left: auto;
    transition: transform 0.15s ease;
}
.side-nav-link .menu-arrow::before,
.side-nav-link .menu-arrow::after {
    content: ''; display: block; width: 5px; height: 5px;
    border-right: 1.5px solid rgba(255,255,255,0.35);
    border-bottom: 1.5px solid rgba(255,255,255,0.35);
    transform: rotate(45deg); margin-left: auto;
}
a[aria-expanded="true"] .menu-arrow { transform: rotate(90deg); }

/* Simplebar */
.simplebar-track .simplebar-scrollbar { background: rgba(139,92,246,0.20) !important; }

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.app-topbar {
    background: rgba(6, 5, 8, 0.85) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    box-shadow: none !important;
}
.topbar-menu { height: 56px; }
.app-topbar .logo img.logo-lg { height: 22px !important; }
.sidenav-toggle-button { color: rgba(255,255,255,0.55) !important; }

/* CR balance chip */
.g-balance {
    display: inline-flex; align-items: center; gap: 7px;
    height: 32px; padding: 0 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    font-family: var(--g-font-mono); font-size: 12.5px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
}
.g-balance:hover { border-color: rgba(255,255,255,0.14); color: #fff; }
.g-balance .cr { color: var(--g-accent-fg); font-weight: 600; }
.g-balance .dot { width: 6px; height: 6px; border-radius: 9999px; background: var(--g-success); }

/* User dropdown trigger */
.g-user-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    color: rgba(255,255,255,0.75); font-size: 13px;
    text-decoration: none; cursor: pointer;
}
.g-user-btn:hover, .g-user-btn.show { border-color: rgba(255,255,255,0.14); color: #fff; }

/* ── Page content + footer ──────────────────────────────────────────────── */
.page-content { background: var(--g-bg) !important; }
/* Results deck panes: only the .active pane renders. Views must NOT put
   d-none on the active pane — that collapses the results card to a stub. */
.deck-pane { display: none !important; }
.deck-pane.active { display: flex !important; flex-direction: column; flex: 1 1 auto; }
.deck-pane.active textarea.output-area { flex: 1 1 auto; min-height: 260px; }

.footer {
    background: #060508 !important;
    border-top: 1px solid rgba(255,255,255,0.05) !important;
    color: rgba(255,255,255,0.35) !important;
    /* Match .app-topbar: keep the footer right of the fixed sidenav and
       bleed-free — without this it spans from x=0 and the (c) line renders
       UNDER the sidebar (invisible) and 32px past the viewport edge. */
    margin-left: var(--bs-sidenav-width) !important;
    margin-right: 0 !important;
    transition: margin-left .25s ease-in-out;
}
.footer a:hover { color: rgba(255,255,255,0.65) !important; }

/* ═══════════════════════════════════════════════════════════════════════
 *  Dashboard — wallet console + gate catalog (Phase 6.4)
 * ═══════════════════════════════════════════════════════════════════════ */
.dash-header { display: flex; flex-direction: column; gap: 12px; padding-bottom: 10px;
               border-bottom: 1px solid rgba(255,255,255,0.06); }
@media (min-width: 640px) { .dash-header { flex-direction: row; align-items: center; justify-content: space-between; } }
.dash-header h1 { font-size: 22px; font-weight: 700; color: #fff; margin: 0; letter-spacing: -0.02em; }
.dash-header .sub { font-size: 13px; color: rgba(255,255,255,0.45); margin: 4px 0 0; }

.wallet-console { display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 992px) { .wallet-console { flex-direction: row; } }
.wallet-left { flex: 1 1 auto; padding: 26px; }
.wallet-right { flex: 0 0 280px; padding: 26px; border-top: 1px solid rgba(255,255,255,0.06);
                background: rgba(255,255,255,0.015);
                display: flex; flex-direction: column; justify-content: center; gap: 10px; }
@media (min-width: 992px) {
    .wallet-right { border-top: none; border-left: 1px solid rgba(255,255,255,0.06); }
}
.wallet-balance { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.wallet-balance .amount { font-family: var(--g-font-mono); font-size: 34px;
                          font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.wallet-balance .unit { font-family: var(--g-font-mono); font-size: 14px;
                        font-weight: 600; color: #C4B5FD; }
.wallet-meta { margin-top: 16px; padding-top: 16px;
               border-top: 1px solid rgba(255,255,255,0.06);
               display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
               justify-content: space-between; }
.wallet-meta .note { font-size: 11px; color: rgba(255,255,255,0.30); }

/* Category chips */
.cat-tabs { display: flex; align-items: center; gap: 6px; padding: 4px;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 14px; overflow-x: auto; }
.cat-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: none; border-radius: 10px;
    background: transparent; color: rgba(255,255,255,0.50);
    font-size: 12px; font-weight: 500; font-family: var(--g-font-sans);
    cursor: pointer; white-space: nowrap; transition: all 0.12s ease;
}
.cat-tab:hover { color: #fff; background: rgba(255,255,255,0.04); }
.cat-tab.active { background: var(--g-primary); color: #fff; }
.cat-tab .n { font-family: var(--g-font-mono); font-size: 10px; padding: 1px 6px;
              border-radius: 4px; background: rgba(255,255,255,0.06);
              color: rgba(255,255,255,0.40); }
.cat-tab.active .n { background: rgba(255,255,255,0.20); color: #fff; }

/* Catalog search */
.cat-search { position: relative; }
.cat-search .ph { position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
                  color: rgba(255,255,255,0.30); font-size: 14px; pointer-events: none; }
.cat-search input {
    height: 38px; width: 250px; max-width: 100%;
    padding: 0 12px 0 34px;
    background: #060509; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; color: #fff; font-size: 13px;
    outline: none; transition: border-color 0.15s ease;
}
.cat-search input:focus { border-color: rgba(139,92,246,0.60); }
.cat-search input::placeholder { color: rgba(255,255,255,0.15); }

/* Gate cards */
.gate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.gate-card {
    display: flex; flex-direction: column; gap: 10px; padding: 18px;
    background: var(--g-card);
    border: var(--g-hairline); border-radius: var(--g-radius-xl);
    box-shadow: var(--g-shadow-card);
    text-decoration: none; color: var(--g-fg);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.gate-card:hover { border-color: var(--g-border-hover); transform: translateY(-1px); color: var(--g-fg); }
.gate-card .top { display: flex; align-items: center; gap: 10px; }
.gate-card .icon { width: 34px; height: 34px; border-radius: 10px;
                   display: inline-flex; align-items: center; justify-content: center;
                   background: rgba(139,92,246,0.10); color: #C4B5FD; font-size: 18px; }
.gate-card .name { font-size: 14px; font-weight: 600; color: #fff; }
.gate-card .desc { font-size: 12px; color: rgba(255,255,255,0.40);
                   min-height: 32px; line-height: 1.45; }
.gate-card .foot { display: flex; align-items: center; justify-content: space-between;
                   border-top: 1px solid rgba(255,255,255,0.05); padding-top: 10px; }
.gate-card .format { font-family: var(--g-font-mono); font-size: 10px;
                     padding: 2px 7px; border-radius: 5px;
                     background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.40);
                     border: 1px solid rgba(255,255,255,0.06); }
.gate-card .free { font-family: var(--g-font-mono); font-size: 10px; color: #34D399; }
.gate-card .arrow { color: rgba(255,255,255,0.30); font-size: 14px; transition: color 0.12s ease; }
.gate-card:hover .arrow { color: #C4B5FD; }

/* ═══════════════════════════════════════════════════════════════════════
 *  Checker deck (Phase 7) — console split 5:7, pre-flight, inspector
 * ═══════════════════════════════════════════════════════════════════════ */
.checker-split { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 992px) { .checker-split { grid-template-columns: 5fr 7fr; } }

.checker-left, .checker-right { display: flex; flex-direction: column; overflow: hidden; }
.checker-right { min-height: 560px; }

.checker-deck-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.05);
    background: #0A0910;
}
.line-pill {
    padding: 2px 8px; border-radius: 5px;
    font-family: var(--g-font-mono); font-size: 11px;
    background: rgba(139,92,246,0.15); color: #C4B5FD;
    border: 1px solid rgba(139,92,246,0.25);
}

/* Pre-flight toolbar */
.pf-toolbar {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    padding: 8px 14px; border-bottom: 1px solid rgba(255,255,255,0.04);
    background: #08070D;
}
.pf-btn {
    display: inline-flex; align-items: center; gap: 5px;
    height: 26px; padding: 0 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 7px;
    color: rgba(255,255,255,0.70); font-size: 11px; font-weight: 500;
    font-family: var(--g-font-sans);
    cursor: pointer; transition: all 0.12s ease;
    white-space: nowrap;
}
.pf-btn:hover:not(:disabled) { color: #fff; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.10); }
.pf-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pf-btn.pf-primary {
    background: rgba(139,92,246,0.15); border-color: rgba(139,92,246,0.30);
    color: #C4B5FD; font-weight: 600;
}
.pf-btn.pf-primary:hover:not(:disabled) { background: rgba(139,92,246,0.25); color: #E9D5FF; }
.pf-btn.pf-cookie {
    background: rgba(16,185,129,0.10); border-color: rgba(16,185,129,0.25); color: #6EE7B7;
}

.checker-input-body { padding: 16px; background: #08070D; display: flex; flex-direction: column; gap: 12px; }
.checker-textarea {
    width: 100%; min-height: 280px; max-height: 350px; resize: vertical;
    padding: 12px;
    background: #050408; border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    font-family: var(--g-font-mono); font-size: 12px; line-height: 1.6;
    color: rgba(255,255,255,0.90); outline: none;
    transition: border-color 0.15s ease;
}
.checker-textarea:focus { border-color: rgba(139,92,246,0.50); }
.checker-textarea::placeholder { color: rgba(255,255,255,0.20); }
.checker-textarea[readonly] { opacity: 0.75; }
.drop-overlay {
    position: absolute; inset: 0; z-index: 10;
    background: rgba(10,7,20,0.90);
    border: 2px dashed var(--g-primary); border-radius: 12px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--g-font-mono); font-size: 12px; color: #C4B5FD;
    pointer-events: none;
}

/* Telemetry strip */
.telemetry-box {
    padding: 10px; border-radius: 12px;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04);
}
.tel-chip { padding: 2px 8px; border-radius: 5px; font-size: 11px; }
.tel-green { background: rgba(16,185,129,0.10); color: #34D399; border: 1px solid rgba(16,185,129,0.20); }
.tel-red   { background: rgba(244,63,94,0.10);  color: #FB7185; border: 1px solid rgba(244,63,94,0.20); }
.tel-amber { background: rgba(245,158,11,0.10); color: #FBBF24; border: 1px solid rgba(245,158,11,0.20); }
.gen-warning {
    display: flex; align-items: center; gap: 8px; margin-top: 8px;
    padding: 8px 10px; border-radius: 8px;
    background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.25);
    color: #FCD34D; font-size: 11px;
}

/* Option drawers */
.option-drawer {
    padding: 12px; border-radius: 12px;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04);
}
.opt-label { font-size: 12px; color: rgba(255,255,255,0.70); cursor: pointer; margin: 0; }
.opt-check { accent-color: var(--g-primary); }
.opt-input {
    height: 30px; width: 100%; padding: 0 10px;
    background: rgba(0,0,0,0.40); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; color: #fff; font-size: 12px; outline: none;
}
.opt-input:focus { border-color: rgba(139,92,246,0.50); }
.kw-preset {
    padding: 1px 6px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.60);
    font-family: var(--g-font-mono); font-size: 10px; cursor: pointer;
}
.kw-preset:hover { background: rgba(139,92,246,0.20); color: #C4B5FD; border-color: rgba(139,92,246,0.30); }

/* Action bar */
.checker-action-bar {
    padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.05);
    background: #0A0910;
}
.btn-start, .btn-pause, .btn-stop {
    display: inline-flex; align-items: center; gap: 7px;
    height: 36px; padding: 0 16px; border-radius: 10px; border: none;
    font-size: 12px; font-weight: 600; font-family: var(--g-font-sans);
    cursor: pointer; transition: background 0.15s ease;
}
.btn-start { background: var(--g-primary); color: #fff; }
.btn-start:hover:not(:disabled) { background: var(--g-primary-hover); }
.btn-start:disabled, .btn-pause:disabled, .btn-stop:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-pause {
    background: rgba(245,158,11,0.15); color: #FCD34D;
    border: 1px solid rgba(245,158,11,0.30);
}
.btn-stop {
    background: rgba(244,63,94,0.20); color: #FDA4AF;
    border: 1px solid rgba(244,63,94,0.30);
}
.kbd-hint {
    font-family: var(--g-font-mono); font-size: 10px; opacity: 0.65;
    background: rgba(0,0,0,0.25); padding: 1px 5px; border-radius: 4px;
}
.processing-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 10px; border-radius: 8px;
    background: rgba(139,92,246,0.10); border: 1px solid rgba(139,92,246,0.20);
    font-family: var(--g-font-mono); font-size: 11px; color: #C4B5FD;
}
.pulse-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--g-primary); animation: g-pulse 1.2s infinite; }
@keyframes g-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.progress-track { width: 100%; height: 6px; border-radius: 99px; background: rgba(255,255,255,0.05); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: var(--g-primary); transition: width 0.3s ease; }

/* Result inspector */
.inspector-tabs {
    display: flex; gap: 6px; padding: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: #09080E; overflow-x: auto;
}
.inspector-tab {
    flex: 1; min-width: 100px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 12px; border-radius: 12px;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.40); font-size: 12px; font-weight: 600;
    font-family: var(--g-font-sans); cursor: pointer; white-space: nowrap;
    transition: all 0.12s ease;
}
.inspector-tab:hover { color: rgba(255,255,255,0.80); background: rgba(255,255,255,0.04); }
.inspector-tab.active { color: #fff; border-color: rgba(139,92,246,0.50); background: rgba(88,28,135,0.25); }
.inspector-tab.tab-approved.active { background: rgba(6,78,59,0.40); border-color: rgba(16,185,129,0.50); color: #6EE7B7; }
.inspector-tab.tab-declined.active { background: rgba(76,5,25,0.40); border-color: rgba(244,63,94,0.50); color: #FDA4AF; }
.inspector-tab.tab-unknown.active { background: rgba(69,39,3,0.40); border-color: rgba(245,158,11,0.50); color: #FCD34D; }
.tab-badge {
    min-width: 22px; text-align: center;
    padding: 1px 6px; border-radius: 99px;
    font-family: var(--g-font-mono); font-size: 10px; font-weight: 700;
    background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.30);
}
.inspector-tab.active .tab-badge { background: rgba(255,255,255,0.12); color: #fff; }

.inspector-toolbar {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.04);
    background: #07060B;
}
.inspector-stream {
    flex: 1; overflow-y: auto; padding: 12px;
    background: #050408; min-height: 380px; max-height: 640px;
    display: flex; flex-direction: column; gap: 12px;
}
.stream-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; height: 260px; text-align: center;
}
.stream-empty-icon {
    width: 48px; height: 48px; border-radius: 16px;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04);
    display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.25);
}
.stream-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 13px 14px; border-radius: 12px;
    font-family: var(--g-font-mono); font-size: 12px;
    border: 1px solid; transition: border-color 0.12s ease;
    flex-wrap: wrap;
}
.stream-row.row-approved  { background: #0A1710; border-color: rgba(16,185,129,0.30); color: #D1FAE5; }
.stream-row.row-declined  { background: #140A0F; border-color: rgba(244,63,94,0.30);  color: #FFE4E6; }
.stream-row.row-unknown   { background: #17120A; border-color: rgba(245,158,11,0.30); color: #FEF3C7; }
.stream-row.row-error     { background: #0E0C16; border-color: rgba(139,92,246,0.30); color: #EDE9FE; }
.stream-row:hover { border-color: rgba(255,255,255,0.20); }
.stream-row-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 0; }
/* Overflow guard: flex items harus bisa menyusut; verdict panjang wrap DI DALAM baris,
   tidak pernah keluar dari border. */
.stream-row { overflow: hidden; }
.stream-row-main > * { min-width: 0; }
.stream-row .msg-tag { max-width: 100%; overflow-wrap: break-word; word-break: normal; padding: 3px 8px; white-space: normal; }
/* Detail expandable per baris (captures apihot): chevron + grid key-value */
.stream-row .row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.stream-row .detail-toggle { background: transparent; border: 1px solid rgba(255,255,255,0.10); border-radius: 6px;
    color: rgba(255,255,255,0.45); cursor: pointer; padding: 3px 6px; font-size: 11px; line-height: 1; }
.stream-row .detail-toggle:hover { border-color: rgba(255,255,255,0.25); color: rgba(255,255,255,0.8); }
.row-detail { flex-basis: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px; background: rgba(0,0,0,0.35); display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; }
.row-detail-kv { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.05); font-size: 11px; }
.row-detail-kv:last-child { border-bottom: none; }
.row-detail-key { color: rgba(255,255,255,0.40); text-transform: uppercase; letter-spacing: 0.04em; flex-shrink: 0; }
.row-detail-val { color: rgba(255,255,255,0.85); text-align: right; word-break: break-word; }

/* Kolom stream adalah flex column: tanpa flex-shrink:0, baris-baris
   TERGENCET saat total melebihi tinggi panel (verdict band terpotong,
   baris jadi 28px satu-baris). Kunci tinggi baris, biarkan panel scroll. */
.inspector-stream > * { flex-shrink: 0; }
.checker-textarea:disabled { opacity: .55; cursor: not-allowed; }
.stream-input { overflow-wrap: anywhere; }
.stream-input { font-weight: 600; color: rgba(255,255,255,0.95); word-break: break-all; }
.brand-tag, .bin-tag, .msg-tag, .cookie-btn {
    padding: 1px 7px; border-radius: 5px; font-size: 10px;
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.brand-tag { text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; }
.brand-visa       { background: rgba(59,130,246,0.15); color: #93C5FD; border: 1px solid rgba(59,130,246,0.30); }
.brand-mastercard { background: rgba(249,115,22,0.15); color: #FDBA74; border: 1px solid rgba(249,115,22,0.30); }
.brand-amex       { background: rgba(6,182,212,0.15); color: #67E8F9; border: 1px solid rgba(6,182,212,0.30); }
.brand-discover   { background: rgba(245,158,11,0.15); color: #FCD34D; border: 1px solid rgba(245,158,11,0.30); }
.brand-jcb        { background: rgba(16,185,129,0.15); color: #6EE7B7; border: 1px solid rgba(16,185,129,0.30); }
.brand-generic    { background: rgba(139,92,246,0.15); color: #C4B5FD; border: 1px solid rgba(139,92,246,0.30); }
.bin-tag { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.70); }
.bin-bank { color: rgba(255,255,255,0.90); font-weight: 500; }
.bin-type { color: rgba(255,255,255,0.40); }
.msg-tag { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.60); word-break: break-all; }
.cookie-btn {
    background: rgba(139,92,246,0.20); border: 1px solid rgba(139,92,246,0.30);
    color: #DDD6FE; cursor: pointer; font-family: var(--g-font-mono);
}
.cookie-btn:hover { background: rgba(139,92,246,0.30); }
.copy-single {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 8px; border-radius: 8px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.50); font-size: 11px; font-family: var(--g-font-mono);
    cursor: pointer; transition: all 0.12s ease; flex-shrink: 0;
}
.copy-single:hover { color: #fff; background: rgba(255,255,255,0.08); }
.auth-shell {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--g-bg); padding: 24px;
}
.auth-card {
    width: 100%; max-width: 420px; padding: 30px;
    background: var(--g-card);
    border: var(--g-hairline); border-radius: var(--g-radius-lg);
    box-shadow: var(--g-shadow-card);
}
.auth-card .brand { text-align: center; margin-bottom: 24px; }
.auth-card .brand img { height: 30px; margin-bottom: 14px; }
.auth-card h1 { font-size: 21px; font-weight: 700; color: #fff; text-align: center; margin: 0; }
.auth-card .brand-sub { font-size: 13px; color: rgba(255,255,255,0.45);
                        text-align: center; margin: 6px 0 0; }
.auth-field { margin-bottom: 14px; text-align: left; }
.auth-field label { display: block; margin-bottom: 6px; }
.auth-input { position: relative; }
.auth-input .ph { position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
                  color: rgba(255,255,255,0.30); font-size: 16px; pointer-events: none; }
.auth-input input, .auth-input select {
    width: 100%; height: 44px; padding: 0 40px 0 40px;
    background: #060509; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; color: #fff; font-size: 13px; outline: none;
    transition: border-color 0.15s ease;
}
.auth-input input:focus, .auth-input select:focus { border-color: rgba(139,92,246,0.60); }
.auth-input .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
                   width: 28px; height: 28px; display: inline-flex;
                   align-items: center; justify-content: center;
                   background: none; border: none; color: rgba(255,255,255,0.30);
                   cursor: pointer; padding: 0; font-size: 16px; z-index: 2; }
.auth-input .eye i { display: block; width: 16px; height: 16px; line-height: 1;
                    position: static; transform: none; }
.auth-input .eye:hover { color: rgba(255,255,255,0.80); }
.auth-submit {
    width: 100%; height: 44px; margin-top: 6px;
    background: var(--g-primary); color: #fff;
    border: none; border-radius: 12px;
    font-size: 13px; font-weight: 600; font-family: var(--g-font-sans);
    cursor: pointer; transition: background 0.15s ease;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.auth-submit:hover { background: var(--g-primary-hover); color: #fff; }
.auth-submit:disabled { opacity: 0.55; cursor: not-allowed; }
.auth-footer { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.05);
               text-align: center; font-size: 12px; color: rgba(255,255,255,0.40); }
.auth-footer a { color: #C4B5FD; font-weight: 500; text-decoration: none; }
.auth-footer a:hover { color: #fff; }

/* Landing */
.landing-shell {
    min-height: 100vh; display: flex; flex-direction: column;
    background: var(--g-bg); color: var(--g-fg);
    font-family: var(--g-font-sans);
}
.landing-nav {
    width: 100%; max-width: 1000px; margin: 0 auto; padding: 22px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.landing-nav .wordmark { font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
                         color: #fff; text-decoration: none; }
.landing-nav .links { display: flex; align-items: center; gap: 20px; font-size: 13px; }
.landing-nav .links a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.12s ease; }
.landing-nav .links a:hover { color: #fff; }
.landing-nav .cta {
    padding: 8px 18px; border-radius: 9999px;
    background: var(--g-primary); color: #fff !important; font-weight: 600;
}
.landing-nav .cta:hover { background: var(--g-primary-hover); }
.landing-main {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; text-align: center; padding: 48px 24px;
    max-width: 760px; margin: 0 auto; width: 100%;
}
.landing-main h1 { font-size: 58px; font-weight: 600; letter-spacing: -0.03em;
                   line-height: 1.08; color: #fff; margin: 0; }
@media (max-width: 640px) { .landing-main h1 { font-size: 34px; } }
.landing-main .sub { font-size: 17px; color: rgba(255,255,255,0.50);
                     max-width: 470px; line-height: 1.6; margin: 24px auto 0; }
.landing-main .ctas { display: flex; align-items: center; justify-content: center;
                      gap: 12px; margin-top: 40px; }
.landing-main .cta-primary {
    height: 46px; padding: 0 24px; display: inline-flex; align-items: center;
    border-radius: 9999px; background: var(--g-primary); color: #fff;
    font-size: 14px; font-weight: 600; text-decoration: none; transition: background 0.15s ease;
}
.landing-main .cta-primary:hover { background: var(--g-primary-hover); color: #fff; }
.landing-main .cta-ghost {
    height: 46px; padding: 0 24px; display: inline-flex; align-items: center;
    border-radius: 9999px; border: 1px solid rgba(255,255,255,0.20);
    color: rgba(255,255,255,0.85); font-size: 14px; font-weight: 500;
    text-decoration: none; transition: all 0.15s ease;
}
.landing-main .cta-ghost:hover { color: #fff; background: rgba(255,255,255,0.04); }
.landing-footer {
    width: 100%; max-width: 1000px; margin: 0 auto; padding: 22px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; color: rgba(255,255,255,0.35);
}
