/* ============================================================
   PT Fan Tech Solution — Admin panel (dark tech theme)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #070B15;
    --bg2: #0B1226;
    --sidebar: #0A0F1E;
    --card: rgba(148, 163, 184, 0.055);
    --card-solid: #0D1428;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #E6EAF5;
    --muted: #94A3B8;
    --dim: #64748B;
    --indigo: #6366F1;
    --cyan: #22D3EE;
    --violet: #8B5CF6;
    --pink: #F472B6;
    --green: #34D399;
    --red: #F87171;
    --grad: linear-gradient(120deg, #6366F1, #22D3EE);
    --radius: 14px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
    white-space: nowrap;
}
.btn-sm { padding: 7px 13px; font-size: 0.84rem; }
.btn-xs { padding: 5px 11px; font-size: 0.8rem; border-radius: 8px; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--grad);
    color: #05070F;
    box-shadow: 0 6px 18px -8px rgba(99, 102, 241, .6);
}
.btn-primary:hover { transform: translateY(-1px); }

.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.06); }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255,255,255,.04); }

.btn-danger { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, .35); color: var(--red); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); }

.icon-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    width: 26px; height: 26px;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}
.icon-btn:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }
.icon-btn:disabled { opacity: .3; cursor: default; }

.link { color: var(--cyan); font-size: 0.86rem; font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ============================================================
   Login
   ============================================================ */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse 55% 45% at 20% 10%, rgba(99, 102, 241, .18), transparent 65%),
        radial-gradient(ellipse 55% 45% at 85% 90%, rgba(34, 211, 238, .14), transparent 65%),
        var(--bg);
}
.login-wrap { width: 100%; max-width: 400px; }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-logo {
    width: 62px; height: 62px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: var(--grad);
    color: #05070F;
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 34px -12px rgba(99, 102, 241, .7);
}
.login-brand h1 { font-size: 1.5rem; font-weight: 800; }
.login-brand p { color: var(--muted); font-size: 0.92rem; }

.login-card {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.login-card .btn { margin-top: 4px; }
.login-back { text-align: center; color: var(--dim); font-size: 0.85rem; }
.login-back:hover { color: var(--text); }

/* ============================================================
   Layout admin
   ============================================================ */
.admin-body {
    display: flex;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 40% 30% at 90% 0%, rgba(99, 102, 241, .08), transparent 60%),
        var(--bg);
}

.adm-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 60;
}
.adm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--border);
}
.adm-logo {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--grad);
    color: #05070F;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    box-shadow: 0 6px 18px -6px rgba(99, 102, 241, .6);
}
.adm-brand div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.adm-brand strong { font-size: 0.95rem; }
.adm-brand span { font-size: 0.72rem; color: var(--muted); }

.adm-nav { display: flex; flex-direction: column; gap: 3px; padding: 14px 12px; }
.adm-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background .15s ease, color .15s ease;
}
.adm-nav a svg { width: 18px; height: 18px; flex: none; }
.adm-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.adm-nav a.active {
    color: #fff;
    background: linear-gradient(120deg, rgba(99, 102, 241, .25), rgba(34, 211, 238, .18));
    border: 1px solid rgba(99, 102, 241, .35);
}
.adm-nav-bottom { margin-top: auto; border-top: 1px solid var(--border); }
.adm-nav-bottom .logout { color: var(--red); }
.adm-nav-bottom .logout:hover { background: rgba(248, 113, 113, .1); }

.adm-main {
    margin-left: 250px;
    flex: 1;
    padding: 28px 34px 64px;
    max-width: 1180px;
}

.adm-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}
.adm-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; }
.adm-sub { color: var(--muted); font-size: 0.9rem; margin-top: 3px; }
.adm-sub strong { color: var(--text); }

.adm-toggle {
    display: none;
    position: fixed;
    top: 14px; left: 14px;
    z-index: 80;
    background: var(--card-solid);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: var(--text);
    padding: 8px;
    cursor: pointer;
}
.adm-toggle svg { width: 22px; height: 22px; display: block; }
.adm-overlay { display: none; }

/* ============================================================
   Alerts
   ============================================================ */
.alert {
    padding: 13px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid;
}
.alert-success { background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, .35); color: #A7F3D0; }
.alert-error { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, .35); color: #FECACA; }
.alert-warning { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, .35); color: #FDE68A; }
.alert-info { background: rgba(99, 102, 241, 0.12); border-color: rgba(99, 102, 241, .4); color: #C7D2FE; }

/* ============================================================
   Cards & panels
   ============================================================ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
}
.panel { padding: 24px; margin-bottom: 24px; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.panel-head h3 { font-size: 1.02rem; font-weight: 700; }

.empty { color: var(--dim); font-size: 0.92rem; padding: 12px 0; }

/* ============================================================
   Stat cards
   ============================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    transition: transform .15s ease, border-color .15s ease;
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(99, 102, 241, .45); }
.stat-ico {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.stat-ico svg { width: 23px; height: 23px; }
.ico-indigo { background: rgba(99, 102, 241, .15); border: 1px solid rgba(99, 102, 241, .4); color: #A5B4FC; }
.ico-cyan { background: rgba(34, 211, 238, .12); border: 1px solid rgba(34, 211, 238, .4); color: #67E8F9; }
.ico-violet { background: rgba(139, 92, 246, .15); border: 1px solid rgba(139, 92, 246, .4); color: #C4B5FD; }
.ico-pink { background: rgba(244, 114, 182, .12); border: 1px solid rgba(244, 114, 182, .4); color: #F9A8D4; }
.stat-label { color: var(--muted); font-size: 0.8rem; }
.stat-value { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.stat-value small { font-size: 0.75rem; color: var(--dim); font-weight: 500; }

/* ============================================================
   Charts
   ============================================================ */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: flex; flex-direction: column; gap: 5px; }
.bar-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bar-name { font-size: 0.88rem; font-weight: 600; }
.bar-val { font-size: 0.8rem; color: var(--dim); }
.bar-track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--grad);
    box-shadow: 0 0 12px rgba(99, 102, 241, .5);
}

.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { flex: none; }
.donut-legend { list-style: none; display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 160px; }
.donut-legend li { display: flex; align-items: center; gap: 9px; font-size: 0.86rem; }
.donut-legend .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-legend .lg-name { color: var(--muted); flex: 1; }
.donut-legend .lg-val { font-weight: 700; }

/* ============================================================
   Tables
   ============================================================ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--dim);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 1px solid var(--border-strong);
    white-space: nowrap;
}
.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.table tbody tr:last-child td { border-bottom: none; }
.table-sm td { padding: 8px 10px; }
.td-time { color: var(--dim); font-size: 0.82rem; white-space: nowrap; }
.td-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cell-sub { color: var(--dim); font-size: 0.8rem; margin-top: 2px; }
.rating-chip {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(251, 191, 36, .1);
    border: 1px solid rgba(251, 191, 36, .35);
    color: #FDE68A;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============================================================
   Forms
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field.grow { flex: 1; }
.field label { font-size: 0.84rem; font-weight: 600; color: var(--muted); }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.92rem;
    padding: 10px 13px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: rgba(99, 102, 241, .6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}
.field textarea { resize: vertical; }
.field input[type="file"] { font-size: 0.85rem; color: var(--muted); }
.hint { color: var(--dim); font-size: 0.78rem; }

.form-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-cols-sm { grid-template-columns: 1fr 1fr; gap: 14px; }
.form-narrow { max-width: 560px; }

.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form.wrap { align-items: flex-start; }
.inline { display: inline-flex; gap: 4px; align-items: center; }

.sticky-actions {
    display: flex;
    flex-wrap: wrap;          /* tanpa ini, baris tombol simpan meluber di layar sempit */
    gap: 12px;
    align-items: center;
    padding: 16px 0 4px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.photo-upload-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
    padding: 12px;
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}
.photo-upload-preview img {
    width: 76px; height: 76px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border);
}
.preview-toggle { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 8px; cursor: pointer; }
.preview-toggle input { accent-color: var(--indigo); }

/* Favicon preview */
.favicon-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px; height: 62px;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 18px;
    overflow: hidden;
    padding: 7px;
}
.favicon-preview img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.favicon-fallback {
    width: 100%; height: 100%;
    border-radius: 8px;
    background: var(--grad);
    color: #05070F;
    font-weight: 800;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toggle switches */
.toggle-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 20px; }
.toggle {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color .15s ease;
}
.toggle:hover { border-color: var(--border-strong); }
.toggle input { display: none; }
.toggle-track {
    width: 38px; height: 21px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    position: relative;
    flex: none;
    transition: background .2s ease;
}
.toggle-track::after {
    content: '';
    position: absolute;
    top: 2.5px; left: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #CBD5E1;
    transition: transform .2s ease, background .2s ease;
}
.toggle input:checked + .toggle-track { background: var(--grad); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); background: #05070F; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .adm-sidebar {
        transform: translateX(-105%);
        transition: transform .25s ease;
    }
    body.nav-open .adm-sidebar { transform: translateX(0); }
    .adm-toggle { display: inline-flex; }
    .adm-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 55;
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
    }
    body.nav-open .adm-overlay { opacity: 1; pointer-events: auto; }
    .adm-main { margin-left: 0; padding: 76px 20px 48px; }
}

@media (max-width: 640px) {
    .stat-grid { grid-template-columns: 1fr; }
    .form-cols, .form-cols-sm { grid-template-columns: 1fr; }
    .inline-form { flex-direction: column; align-items: stretch; }
    .inline-form .btn { width: 100%; }
    .td-actions { flex-wrap: wrap; }
}

/* ============================================================
   Marketplace & Buku Kas (tambahan)
   ============================================================ */

/* Utilitas */
.grow-end { margin-left: auto; }
.field.full { grid-column: 1 / -1; }
.full { grid-column: 1 / -1; }
.mono { font-family: var(--mono, ui-monospace, monospace); font-size: 0.86em; }
.counts-note { color: var(--dim); }

/* Label kecil pemisah bagian di dalam panel */
.mini-head {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #A5B4FC;
    margin: 22px 0 12px;
}
.mini-head:first-child { margin-top: 0; }

.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Panel bersarang (dipakai di halaman Pengaturan) */
.subpanel {
    padding: 20px;
    background: rgba(255, 255, 255, 0.025);
    margin-bottom: 0;
}
.subpanel h3 { font-size: 0.98rem; }
.form-cols > .subpanel { margin-bottom: 0; }

/* Label status / kategori */
.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, .05);
    color: var(--muted);
    white-space: nowrap;
}
.badge-soft.ok { color: #A7F3D0; background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .38); }
.badge-soft.bad { color: #FECACA; background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .38); }
.badge-soft.in { color: #A5F3FC; background: rgba(34, 211, 238, .12); border-color: rgba(34, 211, 238, .38); }
.badge-soft.out { color: #F9A8D4; background: rgba(244, 114, 182, .12); border-color: rgba(244, 114, 182, .38); }

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid;
    white-space: nowrap;
}
.status-pill.st-paid { color: #A7F3D0; background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .4); }
.status-pill.st-pending { color: #FDE68A; background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .4); }
.status-pill.st-failed, .status-pill.st-expired { color: #FECACA; background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .4); }
.status-pill.st-refunded { color: #DDD6FE; background: rgba(167, 139, 250, .14); border-color: rgba(167, 139, 250, .4); }

/* Angka uang */
.money-in { color: #67E8F9; }
.money-out { color: #F9A8D4; }
.strong { font-weight: 700; }

/* Baris filter (periode / status / pencarian) */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.chip-filter {
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all .15s ease;
    white-space: nowrap;
}
.chip-filter:hover { color: var(--text); border-color: var(--border-strong); }
.chip-filter.is-active { background: var(--grad); color: #05070F; border-color: transparent; }

/* Daftar kunci-nilai (detail pesanan / pembeli) */
.kv-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.kv-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.88rem;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
}
.kv-list li span { color: var(--dim); }
.kv-list li strong { color: var(--text); text-align: right; word-break: break-word; }

.detail-2col { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; }

/* Chip nama berkas yang tersimpan */
.file-chip {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.85rem;
    min-width: 0;
}
.file-chip strong { word-break: break-all; }
.file-chip span { color: var(--dim); font-size: 0.78rem; }

/* Grafik pemasukan vs pengeluaran per bulan */
.cf-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    height: 190px;
    padding: 10px 4px 0;
}
.cf-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
    min-width: 0;
}
.cf-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 100%;
    width: 100%;
}
.cf-bar {
    flex: 1;
    max-width: 22px;
    min-height: 2px;
    border-radius: 5px 5px 0 0;
    transition: opacity .15s ease;
}
.cf-bar.in { background: linear-gradient(180deg, #22D3EE, rgba(34, 211, 238, .35)); }
.cf-bar.out { background: linear-gradient(180deg, #F472B6, rgba(244, 114, 182, .35)); }
.cf-bar:hover { opacity: .75; }
.cf-label { font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
.cf-val { font-size: 0.72rem; color: var(--dim); white-space: nowrap; }

.cf-legend { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 16px; font-size: 0.8rem; color: var(--muted); }
.cf-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cf-legend .dot-in, .cf-legend .dot-out {
    width: 11px; height: 11px;
    border-radius: 3px;
    display: inline-block;
}
.cf-legend .dot-in { background: #22D3EE; }
.cf-legend .dot-out { background: #F472B6; }

/* Batang grafik berwarna khusus di halaman kas */
.bar-fill.bar-in { background: linear-gradient(90deg, #0E7490, #22D3EE); box-shadow: 0 0 12px rgba(34, 211, 238, .45); }
.bar-fill.bar-out { background: linear-gradient(90deg, #9D174D, #F472B6); box-shadow: 0 0 12px rgba(244, 114, 182, .4); }

/* Tombol radio pada daftar toggle */
.toggle input[type="radio"] { display: none; }
.toggle-track.radio { border-radius: 999px; }
.toggle input:checked + .toggle-track.radio { background: var(--grad); }

/* Input tanggal agar ikon kalendernya terlihat di tema gelap */
.field input[type="date"] { color-scheme: dark; }

/* Tabel di dalam panel dengan padding lebih rapat */
.panel .table-wrap { margin: 0 -4px; }

@media (max-width: 1024px) {
    .detail-2col { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
    .filter-bar { align-items: stretch; }
    .filter-bar .inline-form { width: 100%; flex-direction: column; align-items: stretch; }
    .cf-chart { height: 150px; gap: 6px; }
    .cf-val { display: none; }
}

/* ============================================================
   Combobox (perbaikan keterbacaan)
   ============================================================
   Masalah: <select> memakai teks terang (--text) tetapi DAFTAR pilihannya
   (<option>/<optgroup>) tidak mewarisi gaya itu — browser menggambarnya
   dengan latar bawaan (putih), sehingga teks terang di atas putih = tidak
   terbaca ("blank putih").

   Perbaikan dua lapis:
   1. color-scheme: dark -> browser memakai palet gelap untuk daftar & scrollbar.
   2. warna eksplisit di <option>/<optgroup> sebagai jaring pengaman.
      WAJIB warna SOLID (hex/rgb) — background rgba/transparan TIDAK bekerja
      untuk <option> di sebagian browser.
   Ditulis tanpa pembatas .field supaya combobox di mana pun ikut terperbaiki. */
select { color-scheme: dark; }
select option,
select optgroup {
    background-color: #141B30;
    color: #E6EAF5;
}
select optgroup {
    color: #A5B4FC;
    font-weight: 700;
}
/* Opsi terpilih & saat kursor menyorot: tetap kontras */
select option:checked {
    background-color: #4F46E5;
    color: #FFFFFF;
}
/* Kotak select tertutup: pastikan teks terbaca di atas latar terang */
.field select {
    color: var(--text);
    background-color: #101830;
}
.field select:disabled { opacity: .6; }

/* ============================================================
   Panel Login Google (langkah pemasangan + salin URL)
   ============================================================ */
.setup-list {
    margin: 0 0 22px;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
}
.setup-list li::marker { color: #A5B4FC; font-weight: 700; }
.setup-list strong { color: var(--text); }
.setup-list em { color: #C7D2FE; font-style: normal; }
.setup-list u { text-decoration-color: rgba(165, 180, 252, .6); }

.copy-row {
    display: flex;
    gap: 9px;
    align-items: stretch;
    margin-top: 9px;
}
.copy-row input {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #67E8F9;
    font-family: var(--mono, ui-monospace, monospace);
    font-size: 0.84rem;
    padding: 10px 13px;
    cursor: text;
}
.copy-row .btn { flex: none; }

/* Penanda versi tampilan — kecil, rata kanan, di dasar kolom konten.
   (Sebelumnya diletakkan sebagai saudara <main> sehingga ikut menjadi kolom
   flex dan tampil sebagai teks terjepit di sisi kanan layar.) */
.adm-page-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.build-id {
    font-family: var(--mono, ui-monospace, monospace);
    font-size: 0.72rem;
    color: var(--dim);
    letter-spacing: .04em;
    cursor: help;
}
.login-build {
    text-align: center;
    margin-top: 14px;
    font-size: 0.74rem;
    color: var(--dim);
}
.login-build .build-id { font-size: 0.74rem; }

/* ============================================================
   Perbaikan luapan horizontal di layar kecil
   ============================================================
   `.adm-main` adalah anak flex dari body, dan anak flex punya
   `min-width: auto` sehingga TIDAK mau menyusut di bawah lebar
   min-content isinya. Akibatnya di layar 390px kolom konten melebar
   (terukur 536px) dan seluruh panel bisa digeser ke samping 145px.
   `min-width: 0` mengizinkan penyusutan; ditambah pemotongan teks
   panjang (URL domain di blok Domain Aplikasi / mode mono) agar
   tidak ikut memaksa lebar. */
.admin-body { overflow-x: hidden; }
.adm-main { min-width: 0; }

.mono,
.cell-sub,
.kv-list strong,
.copy-row input,
.setup-list,
.alert {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.table-wrap { max-width: 100%; }

/* Chip pilihan periode di pemberitahuan "ada catatan di periode lain" */
.month-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.month-chips .chip-filter { display: inline-flex; align-items: center; gap: 8px; }
.chip-note {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--dim);
    padding-left: 8px;
    border-left: 1px solid var(--border-strong);
}
.month-chips .chip-filter:hover .chip-note { color: var(--muted); }

/* ============================================================
   Bilah tab halaman Pengaturan
   ============================================================ */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}
.tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}
.tab:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.tab.is-active { background: var(--grad); color: #05070F; }
.tab-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex: none;
}
.tab-dot.ok { background: #34D399; box-shadow: 0 0 8px rgba(52, 211, 153, .8); }
.tab-dot.warn { background: #FBBF24; box-shadow: 0 0 8px rgba(251, 191, 36, .8); }
.tab.is-active .tab-dot.ok { background: #065F46; box-shadow: none; }
.tab.is-active .tab-dot.warn { background: #7C2D12; box-shadow: none; }

@media (max-width: 640px) {
    .tabs { border-radius: 14px; }
    .tab { flex: 1 1 auto; justify-content: center; padding: 9px 12px; font-size: 0.85rem; }
}

/* ============================================================
   Galeri gambar & video produk
   ============================================================ */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.media-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, .03);
    display: flex;
    flex-direction: column;
}
.media-item img { width: 100%; height: 108px; object-fit: cover; display: block; }
.media-cap {
    font-size: 0.76rem;
    color: var(--muted);
    padding: 8px 10px 0;
    word-break: break-word;
}
.media-item form { padding: 8px 10px 10px; margin-top: auto; }
.media-video { margin-bottom: 12px; }
.media-video video {
    width: 100%;
    max-width: 520px;
    border-radius: 12px;
    background: #000;
    display: block;
}

/* Kotak bukti transfer pada detail pesanan */
.proof-box {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 14px;
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
    margin-bottom: 4px;
}
.proof-box img {
    width: 190px;
    max-height: 190px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #0A0F1E;
}
.proof-box > div { flex: 1; min-width: 220px; }
