:root {
    --bg: #070c16;
    --card: #0f172a;
    --border: #1e2c47;
    --border-soft: #172338;
    --text: #e8eefb;
    --muted: #93a4c3;
    --primary: #4f8cff;
    --primary-2: #7c5cff;
    --accent: #22d3ee;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
    --header-h: 66px;
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Cegah Safari iOS memperbesar font sendiri saat ponsel diputar
       (landscape/portrait) sehingga ukuran tampilan tetap konsisten. */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1100px 520px at 12% -8%, rgba(79, 140, 255, 0.20), transparent 62%),
        radial-gradient(900px 480px at 92% 4%, rgba(124, 92, 255, 0.16), transparent 60%),
        var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

/* Atribut `hidden` harus selalu menyembunyikan elemen. Banyak komponen di sini
   memakai `display: grid/flex` yang mengalahkan aturan bawaan `[hidden]`,
   sehingga bukti transfer/label tetap tampil walau ditandai hidden. */
[hidden] {
    display: none !important;
}

/* Gambar/logo/diagram tidak boleh melebihi lebar layar ponsel. */
img,
svg,
video,
canvas {
    max-width: 100%;
}

img,
video {
    height: auto;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    margin: 0 0 0.55rem;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

h1 {
    font-size: clamp(1.75rem, 2.6vw, 2.35rem);
}

h2 {
    font-size: 1.25rem;
}

h3 {
    font-size: 1.05rem;
}

p {
    margin: 0 0 0.85rem;
}

code,
pre {
    font-family: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

code {
    font-size: 0.86em;
    color: #cfe0ff;
    background: rgba(79, 140, 255, 0.10);
    border: 1px solid rgba(79, 140, 255, 0.16);
    border-radius: 6px;
    padding: 0.12em 0.42em;
}

pre {
    margin: 0;
    padding: 1rem 1.1rem;
    background: #060b15;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 0.83rem;
    line-height: 1.6;
}

pre code {
    background: none;
    border: 0;
    padding: 0;
    color: #c9dcff;
    font-size: inherit;
}

.container {
    width: min(1140px, calc(100% - 2.5rem));
    margin-inline: auto;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.82rem;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(7, 12, 22, 0.82);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 66px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em;
    /* Identitas brand tidak boleh menyusut/melipat dua baris; yang mengalah
       adalah tautan di sebelahnya (nama pengguna dipotong elipsis). */
    flex: 0 0 auto;
    white-space: nowrap;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    font-size: 0.88rem;
    /* Satu baris: jumlah menu sudah banyak, jadi tautan tidak boleh turun
       menjadi baris kedua. Saat ruang menyempit, header beralih ke menu
       lipat (≤1180px) sehingga tetap rapi di laptop kecil & tablet. */
    flex-wrap: nowrap;
    justify-content: flex-end;
    min-width: 0;
}

.nav > a {
    color: var(--muted);
    white-space: nowrap;
}

.nav > a:hover {
    color: var(--text);
    text-decoration: none;
}

.nav-user {
    color: var(--text);
    font-weight: 600;
    padding-left: 0.6rem;
    border-left: 1px solid var(--border);
    /* Nama panjang dipotong elipsis agar tidak mendorong tombol keluar layar.
       `inline-block` dipakai supaya max-width/overflow benar-benar berlaku
       pada elemen <span> ini. */
    display: inline-block;
    vertical-align: middle;
    max-width: 14ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tombol ajakan di header: Login, Daftar, dan Portal Seller memakai satu
   gaya agar seragam — latar gradien warna dominan situs, bingkai putih, dan
   teks putih. Selektor `.site-header .nav > a.btn` sengaja lebih spesifik
   daripada `.nav > a` supaya warna tautan abu-abu tidak menimpa teks putih. */
.site-header .nav > a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.42rem 0.9rem;
    border: 1.5px solid #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 8px 18px rgba(79, 140, 255, 0.26);
    white-space: nowrap;
}

.site-header .nav > a.btn:hover,
.site-header .nav > a.btn:focus-visible {
    color: #ffffff;
    border-color: #ffffff;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    box-shadow: 0 10px 22px rgba(124, 92, 255, 0.32);
    text-decoration: none;
}

/* Laptop 1181–1400px: menu sudah banyak, jadi jarak & ukuran tombol
   dikecilkan sedikit (bukan dibungkus) supaya baris header tetap satu baris
   walau brand memakai logo lebar atau pengunjung sudah login. */
@media (min-width: 1181px) and (max-width: 1400px) {
    .nav {
        gap: 0.68rem;
        font-size: 0.83rem;
    }

    .site-header .nav > a.btn {
        padding: 0.38rem 0.72rem;
        font-size: 0.75rem;
        flex: 0 0 auto;
    }

    .nav-user {
        max-width: 10ch;
    }
}

/* ---------- Navigasi dropdown admin ---------- */

.nav-dropdown {
    position: relative;
}

.nav-dropdown > .nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.nav-dropdown > .nav-trigger:hover,
.nav-dropdown.is-open > .nav-trigger {
    color: var(--text);
}

.nav-dropdown.is-active > .nav-trigger {
    color: var(--text);
    font-weight: 600;
}

.nav-dropdown > .nav-trigger::after {
    content: "";
    width: 0.42em;
    height: 0.42em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.18s ease;
}

.nav-dropdown.is-open > .nav-trigger::after {
    transform: rotate(-135deg) translateY(-1px);
}

.nav-menu {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 40;
    min-width: 230px;
    padding: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(13, 19, 33, 0.98);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    display: none;
    flex-direction: column;
    gap: 0.1rem;
}

.nav-dropdown.is-open > .nav-menu,
.nav-dropdown:focus-within > .nav-menu {
    display: flex;
}

.nav-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.55rem 0.7rem;
    border-radius: 9px;
    color: var(--muted);
    font-size: 0.88rem;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.is-active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    text-decoration: none;
}

.nav-menu .nav-count {
    flex: none;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.inline-form {
    display: inline;
    margin: 0;
}

/* ---------- Layout ---------- */

.page {
    padding: 2.2rem 0 3.5rem;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.page-head h1 {
    margin-bottom: 0.2rem;
}

.page-head p {
    margin: 0;
}

.head-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.section {
    margin-top: 2.6rem;
}

.section-head {
    margin-bottom: 1.1rem;
}

.section-head.row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-head p {
    margin: 0;
}

/* ---------- Cards & grids ---------- */

.card {
    background: linear-gradient(180deg, rgba(19, 31, 54, 0.92), rgba(15, 23, 42, 0.96));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    box-shadow: var(--shadow);
}

.grid {
    display: grid;
    gap: 1rem;
}

/* Jarak antar container/card yang bertumpuk agar tidak menempel. Berlaku untuk
   card bertumpuk langsung di dalam .section, .panel-main, maupun .stack. */
.section > .card + .card,
.section > .card + .stat-card,
.section > .grid + .card,
.section > .card + .grid,
.section > .table-wrap + .card,
.panel-main > .card + .card,
.panel-main > .card + .grid,
.panel-main > .grid + .card,
.panel-main > .section + .section {
    margin-top: 1.25rem;
}

.stack {
    display: grid;
    gap: 1.25rem;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-row {
    margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.62rem 1.05rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 10px 24px rgba(79, 140, 255, 0.28);
}

.btn-outline {
    background: rgba(79, 140, 255, 0.08);
    border-color: rgba(79, 140, 255, 0.45);
    color: #cfe0ff;
}

.btn-outline:hover {
    background: rgba(79, 140, 255, 0.16);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--muted);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: #2c3f60;
}

.btn-danger {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.4);
    color: #fecaca;
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.2);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 0.8rem 1.35rem;
    font-size: 0.98rem;
}

.btn-block {
    width: 100%;
}

/* Tombol "Portal Seller" di ujung kanan header & halaman login seller. */
.btn-portal-seller {
    background: linear-gradient(135deg, #22c55e, #059669);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.24);
}

.btn-portal-seller:hover {
    background: linear-gradient(135deg, #2dd46a, #06a874);
    color: #fff;
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.32);
}

/* ---------- Alerts ---------- */

.alert {
    margin-bottom: 1.1rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(52, 211, 153, 0.10);
    border-color: rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
}

.alert-error {
    background: rgba(248, 113, 113, 0.10);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

.alert-warning {
    background: rgba(251, 191, 36, 0.10);
    border-color: rgba(251, 191, 36, 0.38);
    color: #fde68a;
}

.payout-account {
    margin: 0.4rem 0 0.2rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.06);
}

.payout-account a {
    color: #93c5fd;
}

/* ---------- Hero ---------- */

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: center;
    padding: 1rem 0 0.5rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.8rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.32);
    background: rgba(34, 211, 238, 0.08);
    color: #a5f3fc;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2rem, 3.6vw, 3rem);
    line-height: 1.12;
    margin-bottom: 0.9rem;
}

.lead {
    color: var(--muted);
    font-size: 1.02rem;
    max-width: 56ch;
}

.hero-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin: 1.4rem 0 1rem;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.83rem;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
}

.hero-code {
    padding: 0;
    overflow: hidden;
}

.code-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(6, 11, 21, 0.6);
}

.code-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.code-dot.red { background: #f87171; }
.code-dot.amber { background: #fbbf24; }
.code-dot.green { background: #34d399; }

.code-title {
    margin-left: 0.5rem;
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
}

.hero-code pre {
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0.8rem;
    padding: 1.1rem;
}

/* ---------- Features & pricing ---------- */

.feature h3 {
    margin-bottom: 0.35rem;
}

.feature p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.feature-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 0.85rem;
    border-radius: 10px;
    background: rgba(79, 140, 255, 0.12);
    border: 1px solid rgba(79, 140, 255, 0.28);
    color: #bfd5ff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    overflow: hidden;
}

.price-card.is-highlight {
    border-color: rgba(79, 140, 255, 0.55);
    box-shadow: 0 20px 60px rgba(79, 140, 255, 0.18);
}

.price-card h3 {
    margin: 0;
}

.price-card p {
    margin: 0 0 0.4rem;
}

.ribbon {
    position: absolute;
    top: 14px;
    right: -32px;
    width: 120px;
    padding: 0.25rem 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
    transform: rotate(35deg);
}

.price {
    margin-top: 0.4rem;
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.price-unit {
    margin-bottom: 0.75rem;
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 600;
}

.check-list {
    margin: 0 0 1.1rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.check-list li {
    position: relative;
    padding-left: 1.35rem;
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--success);
    font-weight: 700;
}

/* Deskripsi paket hasil editor admin. Baris baru dipertahankan supaya admin
   bisa memisahkan paragraf tanpa menulis HTML. */
.package-description {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    line-height: 1.55;
    white-space: pre-line;
}

.price-card .btn {
    margin-top: auto;
}

/* ---------- Pemilih nominal produk custom ---------- */

.nominal-picker {
    width: 100%;
    margin-top: auto;
}

/* <summary> dipakai sebagai tombol: sembunyikan penanda bawaan browser. */
.nominal-picker > summary {
    cursor: pointer;
    list-style: none;
}

.nominal-picker > summary::-webkit-details-marker {
    display: none;
}

.nominal-picker[open] > summary {
    box-shadow: inset 0 0 0 1px var(--primary);
}

.nominal-list {
    display: grid;
    gap: 0.35rem;
    max-height: 268px;
    margin-top: 0.7rem;
    padding-right: 0.15rem;
    overflow-y: auto;
}

.nominal-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(79, 140, 255, 0.06);
    color: var(--text);
    font-size: 0.86rem;
}

.nominal-option:hover {
    border-color: var(--primary);
    background: rgba(79, 140, 255, 0.14);
    text-decoration: none;
}

.nominal-option strong {
    color: var(--accent);
    white-space: nowrap;
}

.nominal-hint {
    margin: 0.5rem 0 0;
}

/* Kartu paket yang belum bisa dipenuhi stok kuota toko tetap tampil agar daftar
   paket sepadan dengan katalog pusat; hanya tombolnya yang dinonaktifkan. */
.price-card.is-unavailable {
    border-style: dashed;
}

.btn.is-disabled,
.btn[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
    pointer-events: none;
}

.nominal-option.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
    background: rgba(148, 163, 184, 0.08);
}

.nominal-option.is-disabled:hover {
    border-color: var(--border-soft);
    background: rgba(148, 163, 184, 0.08);
    text-decoration: none;
}

/* ---------- Steps & notes ---------- */

.steps {
    padding: 1.6rem;
}

.step-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 0 0 1.2rem;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step-list li {
    position: relative;
    counter-increment: step;
    padding-top: 2.3rem;
    font-size: 0.88rem;
}

.step-list li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(79, 140, 255, 0.14);
    border: 1px solid rgba(79, 140, 255, 0.3);
    color: #cfe0ff;
    font-size: 0.8rem;
    font-weight: 700;
}

.step-list li strong {
    display: block;
    margin-bottom: 0.15rem;
}

.step-list li span {
    color: var(--muted);
}

.step-list.compact {
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.step-list.compact li {
    padding-top: 0;
    padding-left: 2.7rem;
}

.step-list.compact li::before {
    top: 2px;
}

.note-card {
    margin-top: 1.2rem;
}

.note-card p:last-child {
    margin-bottom: 0;
}

/* ---------- Stats ---------- */

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.1rem 1.25rem;
}

.stat-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-value.small-value {
    font-size: 1.15rem;
}

/* ---------- Forms ---------- */

.form {
    display: grid;
    gap: 1rem;
}

.form label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.86rem;
    font-weight: 600;
}

.form label > span {
    color: #c6d4ec;
}

/* Kontrol teks satu baris. Select dan textarea sengaja TIDAK dimasukkan
   ke grup ini agar tidak mewarisi tinggi/proporsi input satu baris. */
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="search"],
.form input[type="tel"],
.form input[type="url"],
.form input[type="number"],
.form input[type="file"],
.form .form-control-input {
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    padding: 0.62rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(6, 11, 21, 0.65);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
}

.form-inline {
    display: flex;
    align-items: flex-end;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.form-inline label {
    flex: 1 1 200px;
}

.prefix-input {
    text-transform: uppercase;
}

.key-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0.3rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(7, 12, 22, 0.48);
}

.key-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.key-tab:hover {
    color: var(--text);
    text-decoration: none;
}

.key-tab.is-active {
    border-color: rgba(79, 140, 255, 0.45);
    background: rgba(79, 140, 255, 0.14);
    color: #dbe8ff;
}

.topup-form {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.topup-select {
    max-width: 150px;
    padding: 0.38rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #0b1324;
    color: var(--text);
    font: inherit;
    font-size: 0.78rem;
}

.inline-form input[type="search"] {
    width: 220px;
    max-width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(6, 11, 21, 0.65);
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
}

.inline-form input[type="search"]:focus {
    outline: none;
    border-color: rgba(79, 140, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14);
}

.form input[type="file"] {
    padding: 0.5rem;
    cursor: pointer;
}

.form input:focus {
    outline: none;
    border-color: rgba(79, 140, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14);
}

.form select:focus {
    outline: none;
    border-color: rgba(79, 140, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14);
}

/* Tema gelap dasar hanya untuk input teks. Select/textarea punya blok
   warnanya sendiri di bawah. */
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="search"],
.form input[type="tel"],
.form input[type="file"],
.form input[type="number"],
.form input[type="url"],
.inline-form input[type="search"] {
    background-color: #08111f;
    color: var(--text);
    caret-color: var(--accent);
}

.form select,
.form .form-control-select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    padding: 0.62rem 2.5rem 0.62rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background-color: #08111f;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2393a4c3' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 12px 8px;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    text-overflow: ellipsis;
}

/* Arrow bawaan IE/Edge lama tidak perlu karena sudah memakai SVG di atas. */
.form select::-ms-expand {
    display: none;
}

.form select option,
.form select optgroup {
    background: #0b1322;
    color: var(--text);
}

/* Fallback tema gelap untuk select & input teks yang berada DI LUAR .form
   (mis. filter tabel admin, form pencarian, panel seller). Menjaga agar semua
   kendali tampil seragam dengan tema dark mode website. */
select:not(.form select),
input[type="text"]:not(.form input),
input[type="email"]:not(.form input),
input[type="password"]:not(.form input),
input[type="search"]:not(.form input),
input[type="tel"]:not(.form input),
input[type="url"]:not(.form input),
input[type="number"]:not(.form input) {
    color-scheme: dark;
    color: var(--text);
    background-color: #0b1324;
    border: 1px solid var(--border);
    border-radius: 9px;
}

select:not(.form select) {
    padding: 0.5rem 2.3rem 0.5rem 0.7rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2393a4c3' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px 8px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

select:not(.form select) option {
    background: #0b1322;
    color: var(--text);
}

select:not(.form select):focus,
input[type="text"]:not(.form input):focus,
input[type="email"]:not(.form input):focus,
input[type="search"]:not(.form input):focus,
input[type="number"]:not(.form input):focus {
    outline: none;
    border-color: rgba(79, 140, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14);
}

.form input::placeholder,
.form textarea::placeholder,
.inline-form input::placeholder {
    color: #6f819f;
    opacity: 1;
}

.form input[type="checkbox"],
.form input[type="radio"] {
    accent-color: var(--primary);
    color-scheme: dark;
}

.form label.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-weight: 500;
    line-height: 1.45;
}

.form label.checkbox-row input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
}

.form label.checkbox-row span {
    color: var(--muted);
    font-weight: 400;
}

.form input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.form input[type="number"]::-webkit-inner-spin-button,
.form input[type="number"]::-webkit-outer-spin-button {
    margin: 0;
    opacity: 0.45;
    filter: invert(0.75);
}

.form input:-webkit-autofill,
.form input:-webkit-autofill:hover,
.form input:-webkit-autofill:focus,
.form textarea:-webkit-autofill,
.form select:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px #08111f inset;
    box-shadow: 0 0 0 1000px #08111f inset;
    transition: background-color 9999s ease-in-out 0s;
}

.form input::file-selector-button {
    margin-right: 0.7rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid rgba(79, 140, 255, 0.4);
    border-radius: 7px;
    background: rgba(79, 140, 255, 0.12);
    color: #dbe8ff;
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* ---------- Admin: pengaturan ---------- */

.settings-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
    margin-top: 1.1rem;
}

/* Section pengaturan adalah grid item; tanpa min-width: 0, select dengan teks
   opsi panjang dapat memperlebar seluruh halaman di ponsel. */
.settings-form > * {
    min-width: 0;
}

.settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.1rem;
    align-items: start;
}

/* Select dengan label opsi panjang tidak boleh menahan lebar grid di ponsel. */
.settings-grid > *,
.form select,
.form textarea,
.form .form-control-select,
.form .form-control-textarea {
    min-width: 0;
}

.field {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    align-content: start;
}

.field > label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: #c6d4ec;
}

.field .req {
    color: var(--danger);
    font-style: normal;
}

.form textarea,
.form .form-control-textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 7.5rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background-color: #08111f;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.55;
    resize: vertical;
    overflow: auto;
}

.form textarea:focus {
    outline: none;
    border-color: rgba(79, 140, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14);
}

.form input:disabled,
.form select:disabled,
.form textarea:disabled {
    opacity: 0.62;
    cursor: not-allowed;
}

.field-hint {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.field-error {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--danger);
}

.lock-note {
    justify-self: start;
    padding: 0.1rem 0.5rem;
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.1);
}

.field-check {
    align-content: start;
}

.check-field,
.clear-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #c6d4ec;
    cursor: pointer;
}

.clear-field {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--muted);
}

.check-field input,
.clear-field input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.settings-note {
    margin: 0 0 0.9rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(79, 140, 255, 0.22);
    border-radius: var(--radius-sm);
    background: rgba(79, 140, 255, 0.07);
}

.settings-subhead {
    margin: 1.4rem 0 0.7rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-soft);
}

.package-block {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(6, 11, 21, 0.35);
}

.package-block h3 {
    margin-bottom: 0.7rem;
}

.settings-submit {
    position: sticky;
    bottom: 0;
    z-index: 5;
    align-items: center;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(9, 15, 27, 0.94);
    backdrop-filter: blur(8px);
}

.settings-inline-action {
    align-items: center;
    margin-top: 1rem;
}

.settings-details {
    margin-top: 1rem;
    font-size: 0.84rem;
}

.settings-details summary {
    cursor: pointer;
    color: var(--accent);
}

.settings-details pre {
    margin: 0.6rem 0;
}

.error-list {
    margin: 0.4rem 0 0;
    padding-left: 1.1rem;
}

/* Checklist kesiapan & progress */

.progress {
    height: 8px;
    margin: 0 0 1rem;
    border-radius: 999px;
    background: rgba(6, 11, 21, 0.7);
    border: 1px solid var(--border-soft);
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(6, 11, 21, 0.35);
}

.checklist-item.is-ok {
    border-color: rgba(52, 211, 153, 0.28);
}

.checklist-item.is-todo {
    border-color: rgba(251, 191, 36, 0.32);
}

.checklist-mark {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 0.1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.checklist-item.is-ok .checklist-mark {
    color: #062a1d;
    background: var(--success);
}

.checklist-item.is-todo .checklist-mark {
    color: #2a1c02;
    background: var(--warning);
}

.checklist-body {
    flex: 1 1 auto;
    min-width: 0;
}

.checklist-body p {
    margin: 0.15rem 0 0;
}

.checklist-item .btn {
    flex: 0 0 auto;
    align-self: center;
}

/* ---------- Tables ---------- */


.table-wrap {
    width: 100%;
    overflow-x: auto;
    /* Gulir mendatar yang halus di layar sentuh (ponsel/tablet). */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    /* Tabel ringkasan 2 kolom (mis. /store-checkout) ikut lebar layar, bukan
       dipaksa 640px. Tabel data lebar memakai .table-wrap + aturan di bawah. */
    min-width: 0;
}

/* Hanya tabel di dalam .table-wrap yang boleh lebih lebar dari layar lalu
   digulir mendatar, supaya kolom tetap terbaca di ponsel. */
.table-wrap > table {
    min-width: 640px;
}

/* Tabel kunci-nilai (tanpa header) selalu menyesuaikan lebar layar. */
.table-plain {
    min-width: 0;
}

.table-plain th {
    white-space: normal;
}

thead th {
    padding: 0.7rem 0.85rem;
    background: rgba(6, 11, 21, 0.55);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 0.8rem 0.85rem;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: rgba(79, 140, 255, 0.04);
}

.th-actions,
.td-actions {
    text-align: right;
}

.td-actions {
    white-space: nowrap;
}

.td-actions .inline-form + .inline-form {
    margin-left: 0.35rem;
}

/* ---------- Admin: antrean pesanan toko seller ---------- */

/* Baris pencarian berdiri sendiri di antara filter dan kartu tabel: ada jarak
   ke kartu di bawahnya dan input/tombol tetap sejajar di desktop. */
.search-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.1rem;
}

.search-toolbar input[type="search"] {
    /* Melebar mengikuti ruang yang ada, tetapi tidak melewati lebar kartu. */
    flex: 1 1 240px;
    width: auto;
    max-width: 340px;
}

/* Tabel pesanan: sel lebih lega, dan isi panjang dibungkus di dalam selnya
   sendiri supaya tabel tidak melebar sampai tombol aksi keluar layar.

   Tanpa lebar minimum, tabel ini bisa menyusut sampai lebar minimum isinya
   (kolom teks hanya selebar beberapa huruf) sehingga satu baris jadi setinggi
   setengah layar. Lebar minimum 56rem di bawah lebar konten admin (lihat
   aturan .container.page di bagian sidebar) sehingga tabel enam kolom ini
   tampil utuh tanpa gulir mendatar di desktop; di layar sempit area tabel
   tetap digulir mendatar dengan kolom Aksi menempel di kanan. */
.table-wrap > table.orders-table {
    min-width: 56rem;
}

.orders-table thead th {
    padding: 0.8rem 1rem;
}

.orders-table tbody td {
    padding: 0.95rem 1rem;
    /* Sel berisi beberapa baris keterangan (seller & pembeli) diratakan atas
       agar baris pertama setiap kolom sejajar. */
    vertical-align: top;
}

.orders-table .cell-order,
.orders-table .cell-amount {
    white-space: nowrap;
}

.orders-table .cell-order .order-no {
    font-weight: 700;
}

/* Kolom "Toko & Pembeli" menampung tiga baris berlabel (toko, seller, pembeli).
   Label sempit tetap sejajar, sedangkan nilainya membungkus di dalam sel
   sendiri sehingga kolom lain tidak terdorong dan tombol aksi tetap utuh. */
.orders-table .cell-party {
    width: 15rem;
    max-width: 17rem;
}

.orders-table .cell-party .party-row {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
}

.orders-table .cell-party .party-label {
    flex: none;
    width: 3.8rem;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.orders-table .cell-party .party-row > strong,
.orders-table .cell-party .party-value {
    min-width: 0;
    overflow-wrap: anywhere;
}

.orders-table .cell-package {
    width: 11rem;
    max-width: 13rem;
}

/* Sel status memuat dua badge bertumpuk: status pesanan + metode pembayaran.
   Label metode buatan admin bisa panjang, jadi dibungkus di dalam sel, bukan
   memaksa tabel melebar atau memecah nominal di kolom sebelah. */
.orders-table .cell-status .status-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.orders-table .cell-status .badge {
    max-width: 9.5rem;
    white-space: normal;
    text-align: left;
    line-height: 1.35;
}

/* Kolom aksi menempel di tepi kanan area gulir tabel, jadi tombol
   Approve/Tolak selalu terlihat walau kolom lain perlu digulir mendatar.
   Latar opak wajib: sel ini menutupi kolom yang lewat di belakangnya. Nilai
   warna mengikuti kartu (#0f172a) + tint hover baris, bukan warna baru. */
.orders-table {
    --orders-cell-bg: #111c30;
    --orders-cell-bg-hover: #142138;
    --orders-head-bg: #0b1321;
}

.orders-table th.td-actions,
.orders-table td.td-actions {
    position: sticky;
    right: 0;
    z-index: 1;
    /* Kolom Aksi dijaga ringkas: hanya satu tombol Detail, sehingga kolom lain
       (nama, nominal, margin) punya ruang maksimal dan tidak menumpuk baris. */
    width: 4.5rem;
    max-width: 4.5rem;
    white-space: normal;
    background: var(--orders-cell-bg);
    box-shadow: -1px 0 0 var(--border-soft), -12px 0 16px -14px rgba(2, 6, 23, 0.95);
}

.orders-table th.td-actions {
    background: var(--orders-head-bg);
}

.orders-table tbody tr:hover td.td-actions {
    background: var(--orders-cell-bg-hover);
}

/* Tombol aksi ditata satu per satu di dalam sel aksi. */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.action-buttons .inline-form {
    display: inline-flex;
    margin: 0;
}

.action-buttons .inline-form + .inline-form {
    margin-left: 0;
}

.action-buttons .btn {
    white-space: nowrap;
}

/* Catatan baris (mis. alasan penolakan) tampil di barisnya sendiri. */
.action-buttons .action-note {
    flex: 1 1 100%;
    max-width: 100%;
    margin: 0 0 0.1rem auto;
    text-align: right;
    line-height: 1.4;
}

/* ---------- Modal detail pesanan (antrean admin) ---------- */

/* Backdrop: klik di area gelap di luar kotak menutup modal (ditangani JS lewat
   data-detail-close). z-index di atas header sticky (z-index 30). */
.order-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 210;
    /* Tertutup secara bawaan; JavaScript menambahkan .is-open saat tombol
       Detail diklik. Tanpa JavaScript pop-up tidak muncul (tabel tetap utuh). */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(3, 7, 15, 0.78);
    backdrop-filter: blur(4px);
}

.order-modal-backdrop.is-open {
    display: flex;
}

.order-modal {
    width: min(560px, 100%);
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    padding: 1.25rem 1.35rem 1.4rem;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(19, 31, 54, 0.98), rgba(15, 23, 42, 0.99));
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

@supports (height: 100dvh) {
    .order-modal {
        max-height: calc(100dvh - 2.5rem);
    }
}

.order-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-soft);
}

.order-modal-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.order-modal-head .muted {
    display: block;
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
}

.order-modal-close {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.order-modal-close:hover {
    color: var(--text);
    border-color: #2c3f60;
}

/* Kisi kunci-nilai dua kolom: label kecil di atas, nilai tebal di bawah, tanpa
   tabel agar konten rapi dan mudah dibaca di ponsel. */
.order-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 1rem;
    margin: 0.9rem 0;
}

.order-modal-grid > div {
    min-width: 0;
}

.order-modal-grid dt,
.order-modal-label {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.order-modal-grid dd {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.order-modal-grid dd .muted {
    font-weight: 400;
    font-size: 0.8rem;
}

.order-modal-section {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-soft);
}

.order-modal-note {
    margin: 0.5rem 0 0;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.08);
    color: #fde68a;
    font-size: 0.85rem;
    line-height: 1.45;
}

.order-modal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

.order-modal-actions .inline-form {
    display: inline-flex;
    margin: 0;
}

/* Halaman di belakang modal tidak ikut menggulir selama detail terbuka. */
body.has-modal-open {
    overflow: hidden;
}

/* Ponsel: modal menempel ke tepi atas, kisi jadi satu kolom. */
@media (max-width: 680px) {
    .order-modal-backdrop {
        align-items: flex-start;
        padding: 0.9rem;
    }

    .order-modal-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .order-modal-actions .btn {
        flex: 1 1 100%;
    }
}

/* ---------- Badges ---------- */

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-success {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
}

.badge-info {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.35);
    color: #bfdbfe;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fde68a;
}

.badge-danger {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

.badge-muted {
    background: rgba(147, 164, 195, 0.10);
    border-color: rgba(147, 164, 195, 0.25);
    color: var(--muted);
}

/* ---------- API keys ---------- */

.key-list {
    display: grid;
    gap: 0.8rem;
}

.key-item {
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(6, 11, 21, 0.4);
}

.key-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.key-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.key-value {
    flex: 1 1 240px;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    background: #060b15;
    border: 1px solid var(--border);
    color: #b7f7e5;
    font-size: 0.82rem;
    overflow-x: auto;
    white-space: nowrap;
}

.key-stats {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 0.55rem;
}

.key-stats strong {
    color: var(--text);
}

.base-url-box {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px dashed rgba(79, 140, 255, 0.35);
    border-radius: 12px;
    background: rgba(79, 140, 255, 0.05);
    font-size: 0.85rem;
}

.base-url-box > span {
    color: var(--muted);
    font-weight: 600;
}

.base-url-box.inline {
    margin: 0.4rem 0 1rem;
}

.base-url-box code {
    flex: 1 1 220px;
    background: #060b15;
    border-color: var(--border);
    padding: 0.4rem 0.6rem;
    overflow-x: auto;
    white-space: nowrap;
}

/* ---------- Empty state ---------- */

.empty-state {
    padding: 1.2rem;
    border: 1px dashed var(--border);
    border-radius: 12px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.empty-state p {
    margin: 0 0 0.8rem;
}

/* ---------- Auth ---------- */

.auth-wrap {
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    max-width: 960px;
    margin: 1rem auto 0;
}

.auth-card h1 {
    margin-bottom: 0.25rem;
}

.auth-aside {
    padding: 0.5rem 0.25rem;
}

.auth-aside .step-list {
    margin-bottom: 0;
}

/* Pembatas "atau" antara form login dan tombol Daftar Seller. */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.15rem 0;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    white-space: nowrap;
}
/* ---------- Login sosial (Google & Discord) ---------- */

.auth-social {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

.auth-social-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-social-divider::before,
.auth-social-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-social-divider span {
    white-space: nowrap;
}

.auth-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-decoration: none;
}

.auth-social-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.85;
}

/* Logo brand resmi dicetak inline (SVG) oleh oauth_provider_icon(). Latar chip
   di atas hanya dipakai provider tanpa markah, sehingga logo tidak tertutup
   blok warna. Ukuran 18px (tombol normal) dan 16px (tombol rapat) tetap tajam
   karena SVG vektor, dan kontras aman di tema gelap maupun terang. */
.auth-social-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}

.auth-social-icon:has(svg) {
    background: transparent;
    opacity: 1;
}

.auth-social-icon-google:not(:has(svg)) {
    background: linear-gradient(135deg, #4285f4 0 50%, #34a853 50% 100%);
}

.auth-social-icon-discord:not(:has(svg)) {
    background: #5865f2;
}

html[data-theme="light"] .auth-social-icon {
    opacity: 1;
}

/* Field yang dikunci pada onboarding OAuth (email & username dari provider). */
.input-locked,
input[readonly].input-locked {
    background: rgba(148, 163, 184, 0.12);
    border-style: dashed;
    color: var(--muted);
    cursor: not-allowed;
}

/* ---------- Checkout ---------- */

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 1.2rem;
    align-items: start;
}

.order-summary h2 {
    margin-bottom: 0.9rem;
}

.summary-list {
    display: grid;
    gap: 0.65rem;
    margin: 0 0 1.1rem;
}

.summary-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px dashed var(--border-soft);
}

.summary-list dt {
    color: var(--muted);
    font-size: 0.85rem;
}

.summary-list dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.summary-list .total dd {
    color: var(--accent);
    font-size: 1.2rem;
}

.payment-box {
    display: grid;
    gap: 0.15rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    background: rgba(34, 211, 238, 0.05);
    font-size: 0.9rem;
}

.payment-box strong {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.payment-box p {
    margin: 0.4rem 0 0;
}

.payment-methods {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    border: 0;
}

.payment-methods legend {
    margin-bottom: 0.15rem;
    padding: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.payment-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.payment-option:hover {
    border-color: #2c3f60;
}

/* Radio tetap ada untuk form, validasi, dan pembaca layar, tetapi tidak
   menampilkan bulatan. Seluruh label kartu menjadi area klik. */
.payment-option > input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    box-shadow: none;
}

.payment-option.is-active,
.payment-option:has(> input:checked) {
    border-color: var(--primary);
    background: rgba(79, 140, 255, 0.14);
    box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.22), 0 10px 24px -18px rgba(79, 140, 255, 0.9);
}

.payment-option:has(> input:focus-visible) {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.payment-option-body {
    display: grid;
    gap: 0.05rem;
}

.token-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1.2rem;
}

.token-option {
    align-items: flex-start;
}

.token-option .payment-option-body {
    flex: 1;
}

.token-price {
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .token-options {
        grid-template-columns: minmax(0, 1fr);
    }
}

.payment-panels {
    margin-top: 0.2rem;
}

.payment-panel[hidden] {
    display: none;
}

.payment-box .btn {
    justify-self: start;
    margin-top: 0.5rem;
}

.qris-image {
    width: 100%;
    max-width: 220px;
    margin-top: 0.65rem;
    padding: 0.4rem;
    background: #fff;
    border-radius: 10px;
}

/* Aksi di bawah kode QRIS checkout toko: satu tombol utama di tengah, tautan
   ke halaman pembayaran resmi ditampilkan sebagai teks kecil di bawahnya
   supaya tidak ada dua tombol besar yang bersaing. */
.qris-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.75rem;
    text-align: center;
}

.qris-actions .btn {
    margin: 0;
}

.qris-alt-link {
    color: var(--muted);
    font-size: 0.8rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.qris-alt-link:hover {
    color: var(--text);
}

/* Varian teks lebih tegas untuk aksi utama QRIS (tanpa bingkai tombol).
   Dipakai halaman QRIS pusat maupun toko seller agar keduanya tampil sama. */
.qris-alt-link-strong {
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
}

.qris-alt-link-strong:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- Pemakaian kuota ---------- */

.stat-foot {
    color: var(--muted);
    font-size: 0.76rem;
}

.usage-hero {
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: center;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

.usage-hero::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}

.usage-kicker {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.usage-big strong {
    display: block;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.usage-hero-copy p {
    margin: 0.6rem 0 0;
    font-size: 0.88rem;
}

.usage-hero-body .progress {
    margin-bottom: 0.7rem;
}

.usage-facts {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    font-size: 0.86rem;
    color: var(--muted);
}

.usage-facts strong {
    color: var(--text);
}

.usage-sync-form {
    margin-top: 0.9rem;
}

.usage-block {
    margin-top: 0.85rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(6, 11, 21, 0.35);
}

.usage-block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.usage-block .progress {
    margin-bottom: 0.65rem;
}

.usage-percent {
    font-weight: 700;
    white-space: nowrap;
}

.usage-synced {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.74rem;
}

.usage-note {
    margin: 0.4rem 0 0;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.45;
}

.usage-note-warning {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.10);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.usage-text-success {
    color: var(--success);
}

.usage-text-warning {
    color: var(--warning);
}

.usage-text-danger {
    color: var(--danger);
}

.usage-text-muted {
    color: var(--muted);
}

.progress-success > span {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.progress-warning > span {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-danger > span {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.usage-tone-success {
    border-color: rgba(52, 211, 153, 0.30);
}

.usage-tone-warning {
    border-color: rgba(251, 191, 36, 0.40);
}

.usage-tone-danger {
    border-color: rgba(248, 113, 113, 0.45);
}

.usage-tone-success .usage-big strong {
    color: var(--success);
}

.usage-tone-warning .usage-big strong {
    color: var(--warning);
}

.usage-tone-danger .usage-big strong {
    color: var(--danger);
}

.usage-hero.usage-tone-success::before {
    background: linear-gradient(180deg, #10b981, #34d399);
}

.usage-hero.usage-tone-warning::before {
    background: linear-gradient(180deg, #f59e0b, #fbbf24);
}

.usage-hero.usage-tone-danger::before {
    background: linear-gradient(180deg, #ef4444, #f87171);
}

.key-item.key-tone-warning {
    border-color: rgba(251, 191, 36, 0.35);
}

.key-item.key-tone-danger {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(248, 113, 113, 0.04);
}

.priority-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.75rem;
}

.priority-card {
    display: grid;
    gap: 0.25rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(6, 11, 21, 0.4);
    color: var(--text);
    transition: transform 0.12s ease, border-color 0.15s ease;
}

.priority-card:hover {
    color: var(--text);
    text-decoration: none;
    transform: translateY(-2px);
    border-color: rgba(79, 140, 255, 0.45);
}

.priority-name {
    font-size: 0.86rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.priority-percent {
    font-size: 1.55rem;
    line-height: 1.2;
}

.priority-card .progress {
    display: block;
    margin: 0.35rem 0 0;
}

.usage-inline {
    display: grid;
    gap: 0.3rem;
    min-width: 130px;
}

.usage-inline .progress {
    margin: 0;
}

.usage-cell {
    min-width: 155px;
}

.is-selected-row {
    background: rgba(79, 140, 255, 0.08);
}

/* ---------- Invoice ---------- */

.invoice-sheet {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(19, 31, 54, 0.96), rgba(10, 18, 34, 0.98));
    box-shadow: var(--shadow);
}

.invoice-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-soft);
}

.invoice-head h2 {
    margin: 0.15rem 0 0.2rem;
    font-size: 1.55rem;
}

.invoice-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-align: right;
}

.invoice-brand div {
    display: grid;
    gap: 0.15rem;
}

.invoice-parties,
.invoice-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.2rem 0;
}

.invoice-parties > div,
.invoice-meta > div {
    display: grid;
    gap: 0.2rem;
    align-content: start;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(6, 11, 21, 0.35);
}

.invoice-table {
    margin-top: 1.1rem;
}

.invoice-table table {
    min-width: 0;
}

.invoice-table tfoot td {
    padding: 0.9rem 0.85rem;
    border-top: 1px solid var(--border);
}

.invoice-amount {
    text-align: right;
    white-space: nowrap;
}

.invoice-total-label {
    color: var(--muted);
    font-weight: 700;
    text-align: right;
}

.invoice-total {
    color: #a7f3d0;
    font-size: 1.05rem;
    font-weight: 800;
}

.invoice-foot {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-soft);
}

.invoice-foot p {
    margin: 0.25rem 0;
}

@media print {
    @page {
        margin: 14mm;
    }

    .invoice-page,
    .invoice-page body {
        background: #ffffff !important;
        color: #0f172a !important;
    }

    .site-header,
    .site-footer,
    .no-print {
        display: none !important;
    }

    .container.page {
        width: 100%;
        padding: 0;
    }

    .invoice-sheet {
        max-width: none;
        padding: 0;
        border: 0;
        background: #ffffff !important;
        box-shadow: none;
        color: #0f172a;
    }

    .invoice-sheet .muted,
    .invoice-sheet .eyebrow,
    .invoice-sheet .small {
        color: #475569 !important;
    }

    .invoice-parties > div,
    .invoice-meta > div,
    .table-wrap {
        border-color: #cbd5e1 !important;
        background: #ffffff !important;
    }

    .invoice-sheet thead th {
        background: #f1f5f9 !important;
        color: #334155 !important;
        border-color: #cbd5e1 !important;
    }

    .invoice-sheet tbody td,
    .invoice-sheet tfoot td {
        border-color: #e2e8f0 !important;
        color: #0f172a !important;
    }

    .invoice-total {
        color: #047857 !important;
    }

    .badge {
        border-color: #cbd5e1 !important;
        color: #0f172a !important;
        background: #f8fafc !important;
    }
}

/* ---------- Filter tabs ---------- */

.filter-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-tab {
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.filter-tab:hover {
    color: var(--text);
    text-decoration: none;
    border-color: #2c3f60;
}

.filter-tab.is-active {
    background: rgba(79, 140, 255, 0.14);
    border-color: rgba(79, 140, 255, 0.45);
    color: #dbe8ff;
}

/* ---------- Pagination ---------- */

.pagination {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--border-soft);
    background: rgba(6, 11, 21, 0.6);
}

/* Footer tiga lapis: identitas di kiri, tiga kolom tautan di kanan, lalu
   baris legal (copyright + tautan legal + sosial) yang dipisah garis tipis.
   Grid (bukan flex-wrap) dipakai agar kolom selalu sejajar dan tidak ada
   tautan yang menggantung di tengah baris. */
.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
    gap: 2rem 2.5rem;
    align-items: start;
    padding: 2.2rem 0 1.2rem;
    font-size: 0.84rem;
    color: var(--muted);
}

.footer-inner p {
    margin: 0;
}

/* ---------- Website & SEO ---------- */

.brand-logo {
    width: auto;
    max-width: 150px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
}

.announcement {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(251, 191, 36, 0.28);
    background: rgba(251, 191, 36, 0.1);
    color: #fde68a;
    font-size: 0.84rem;
    text-align: center;
}

.section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1rem 0 0;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-soft);
}

.section-nav a {
    padding: 0.32rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--muted);
}

.section-nav a:hover {
    border-color: rgba(79, 140, 255, 0.55);
    color: var(--text);
    text-decoration: none;
}

.settings-form .card[id] {
    scroll-margin-top: 1rem;
}

.brand-preview {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.9rem;
    padding: 0.85rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: rgba(6, 11, 21, 0.4);
}

.brand-preview-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-weight: 800;
    overflow: hidden;
}

.brand-preview-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.06);
}

.brand-preview strong {
    display: block;
    font-size: 1rem;
}

.brand-preview p {
    margin: 0.15rem 0 0;
}

.brand-preview-favicon {
    margin-left: auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(6, 11, 21, 0.6);
}

.brand-preview-favicon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.field-image input[type="file"] {
    margin-top: 0.15rem;
}

.upload-preview {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.45rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(6, 11, 21, 0.45);
}

.upload-preview img {
    max-width: 72px;
    max-height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.upload-preview code {
    font-size: 0.7rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    max-width: 360px;
}

.footer-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
    overflow: hidden;
}

.footer-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.06);
}

.footer-brand strong {
    display: block;
    color: var(--text);
    font-size: 0.95rem;
}

.footer-brand p {
    margin: 0.2rem 0 0;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem 1.6rem;
    font-size: 0.84rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 0;
}

.footer-col-title {
    margin: 0 0 0.45rem;
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.footer-links a {
    color: var(--muted);
    padding: 0.2rem 0;
    overflow-wrap: anywhere;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--text);
}

/* Baris legal: copyright di kiri, tautan legal + sosial di kanan. */
.footer-legal {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border-soft);
}

.footer-copy {
    margin: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.footer-legal-links,
.footer-social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1rem;
}

.footer-legal-links a,
.footer-social a {
    color: var(--muted);
}

.footer-legal-links a:hover,
.footer-legal-links a:focus-visible,
.footer-social a:hover,
.footer-social a:focus-visible {
    color: var(--text);
}

/* Footer ringkas storefront seller: satu kolom terpusat. */
.site-footer--simple .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0.45rem;
    padding: 1.5rem 0;
    text-align: center;
}

/* ---------- Flash Sale ---------- */

.flash-sale-stack {
    display: grid;
    gap: 1rem;
    margin: 0 0 1.35rem;
}

.flash-sale-banner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(250px, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(251, 191, 36, 0.34);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(251, 191, 36, 0.13), rgba(124, 92, 255, 0.14) 55%, rgba(15, 23, 42, 0.94));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.flash-sale-glow {
    position: absolute;
    top: -80px;
    right: -40px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.30), transparent 68%);
    pointer-events: none;
}

.flash-sale-copy,
.flash-sale-side {
    position: relative;
    z-index: 1;
}

.flash-sale-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.flash-sale-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.24rem 0.62rem;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.16);
    border: 1px solid rgba(251, 191, 36, 0.38);
    color: #fde68a;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.flash-sale-banner h2 {
    margin: 0 0 0.3rem;
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}

.flash-sale-package {
    margin: 0 0 0.7rem;
    color: var(--muted);
}

.flash-sale-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.55rem 0.8rem;
    margin: 0 0 0.85rem;
}

.flash-price-now {
    font-size: clamp(1.55rem, 2.6vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fde68a;
}

.flash-price-before {
    color: var(--muted);
    text-decoration: line-through;
}

.flash-discount {
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.14);
    color: var(--success);
    font-size: 0.76rem;
    font-weight: 700;
}

.flash-sale-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.flash-sale-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    background: rgba(6, 11, 21, 0.45);
}

.flash-countdown {
    display: grid;
    gap: 0.35rem;
}

.flash-countdown-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flash-countdown-units {
    display: flex;
    gap: 0.35rem;
}

.flash-countdown-units > span {
    display: grid;
    justify-items: center;
    flex: 1 1 0;
    padding: 0.3rem 0.2rem;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(6, 11, 21, 0.55);
}

.flash-countdown-units strong {
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
    line-height: 1.2;
}

.flash-countdown-units small {
    color: var(--muted);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.flash-countdown-large .flash-countdown-units strong {
    font-size: 1.55rem;
}

.flash-countdown-large .flash-countdown-units > span {
    padding: 0.5rem 0.3rem;
}

.flash-stock {
    display: grid;
    gap: 0.35rem;
}

.flash-stock-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.flash-stock-head strong {
    color: var(--warning);
    font-variant-numeric: tabular-nums;
}

.flash-stock-progress span {
    background: linear-gradient(90deg, var(--warning), #f97316);
}

.flash-stock p {
    margin: 0;
}

.flash-stock-mini {
    display: block;
    width: 92px;
    height: 5px;
    margin-top: 0.3rem;
    border-radius: 999px;
    background: rgba(147, 164, 195, 0.16);
    overflow: hidden;
}

.flash-stock-mini > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--warning), #f97316);
}


/* ---------- Flash Sale detail & admin ---------- */

.flash-sale-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.flash-sale-detail-main {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.flash-sale-detail .flash-countdown,
.flash-sale-detail .flash-stock {
    padding: 0.9rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(6, 11, 21, 0.35);
}

.flash-sale-form {
    margin-bottom: 1.5rem;
}

.sale-admin-layout {
    margin-bottom: 1rem;
}

.sale-admin-layout .settings-grid {
    align-items: start;
}

.sale-admin-layout .checkbox-row {
    align-self: center;
}

.sale-form-actions {
    grid-column: 1 / -1;
}

.table-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.table-actions form {
    margin: 0;
}


/* ---------- Admin: form token gratis ---------- */

.free-key-form {
    gap: 1.15rem;
}

/* Petunjuk kecil di bawah input: kontras tapi tetap lembut di dark mode. */
.free-key-form label > .field-hint {
    margin-top: 0.1rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.45;
}

/* Baris akhir: checkbox di kiri, tombol aksi di kanan, sejajar vertikal. */
.free-key-form .form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.9rem 1.2rem;
    margin-top: 0.15rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border-soft);
}

.free-key-form .form-footer .checkbox-row {
    align-items: center;
    margin: 0;
}

.free-key-form .form-footer .checkbox-row input[type="checkbox"] {
    margin-top: 0;
}

.free-key-form .form-footer .form-actions {
    margin-left: auto;
    margin-bottom: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .hero,
    .auth-wrap,
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .flash-sale-banner,
    .flash-sale-detail {
        grid-template-columns: 1fr;
    }

    .step-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .step-list.compact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .usage-hero {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .priority-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .page-head .head-actions,
    .section-head .head-actions {
        width: 100%;
    }

    .invoice-head {
        flex-direction: column;
        gap: 1rem;
    }

    .invoice-brand {
        text-align: left;
    }

    .invoice-parties,
    .invoice-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .container {
        width: calc(100% - 1.6rem);
    }

    /* Header tetap satu baris (brand + tombol Menu); daftar tautan turun
       sebagai panel lipat agar tidak bertumpuk memenuhi layar. */
    .header-inner {
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.6rem;
        min-height: 58px;
        padding: 0.55rem 0;
    }

    .nav {
        gap: 0.8rem;
        font-size: 0.84rem;
    }

    .nav-user {
        border-left: 0;
        padding-left: 0;
    }

    .nav-menu {
        right: auto;
        left: 0;
        min-width: 200px;
    }

    .page {
        padding: 1.5rem 0 2.5rem;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .flash-sale-banner {
        padding: 1.1rem;
    }

    .step-list {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 1.1rem;
    }

    .hero h1 {
        font-size: 1.85rem;
    }

    .price {
        font-size: 1.6rem;
    }
}


/* ---------- Portal klien ---------- */

.alert-info {
    background: rgba(34, 211, 238, 0.08);
    border-color: rgba(34, 211, 238, 0.25);
    color: #bdefff;
}

.mb-0 {
    margin-bottom: 0;
}

.client-portal-gate {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 250px);
    padding: 2rem 0;
}

.client-portal-login {
    width: min(460px, 100%);
    padding: 1.6rem;
}

.client-portal-brandline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.client-portal-login h1 {
    font-size: clamp(1.45rem, 4vw, 1.95rem);
    word-break: break-word;
}

.client-portal-pin {
    text-align: center;
    font-size: 1.35rem;
    letter-spacing: 0.45em;
    font-weight: 700;
}

.client-portal-foot {
    margin: 1.2rem 0 0;
    text-align: center;
    line-height: 1.7;
}

.client-portal-head h1 {
    word-break: break-word;
}

/* ---------- Tab portal klien & panduan API ---------- */

.portal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: fit-content;
    max-width: 100%;
    margin: 1.1rem 0 1.4rem;
    padding: 0.3rem;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: rgba(9, 16, 30, 0.65);
}

.portal-tabs a {
    padding: 0.42rem 1.05rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.portal-tabs a:hover {
    color: var(--text);
    text-decoration: none;
}

.portal-tabs a.is-active {
    border: 1px solid rgba(79, 140, 255, 0.35);
    background: rgba(79, 140, 255, 0.16);
    color: #cfe0ff;
}

.portal-cred-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 0.6rem;
    padding: 0.75rem 0.9rem;
    border: 1px dashed rgba(79, 140, 255, 0.35);
    border-radius: 12px;
    background: rgba(79, 140, 255, 0.05);
}

.portal-cred-label {
    min-width: 82px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.portal-cred-value {
    flex: 1 1 220px;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    background: #060b15;
    font-size: 0.8rem;
    overflow-x: auto;
    white-space: nowrap;
}

.portal-key-reveal {
    margin: 0.2rem 0 0.9rem;
}

.portal-key-reveal > summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.portal-key-reveal > summary:hover {
    color: var(--text);
}

.portal-key-full {
    display: block;
    margin-top: 0.55rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #060b15;
    font-size: 0.8rem;
    overflow-x: auto;
    white-space: nowrap;
}

.portal-cred-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.2rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.doc-anchor-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 1.25rem;
}

.doc-anchor-nav a {
    padding: 0.38rem 0.85rem;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.doc-anchor-nav a:hover {
    border-color: var(--primary);
    color: var(--text);
    text-decoration: none;
}

.client-portal-page pre code {
    font-size: 0.79rem;
}

.client-portal-page .step-list pre {
    margin: 0.6rem 0 0;
}

.client-portal-page .step-list li span + span {
    display: block;
    margin-top: 0.4rem;
}

.client-portal-page .card h3 {
    margin: 1.35rem 0 0.65rem;
    font-size: 0.98rem;
}

.client-portal-page .card > h3:first-child,
.client-portal-page .section-head + h3 {
    margin-top: 0.4rem;
}

.portal-status-box {
    display: grid;
    gap: 0.7rem;
    align-content: start;
}

.portal-copy-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.portal-copy-row input {
    min-width: 0;
    flex: 1;
    font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
    font-size: 0.78rem;
}

.portal-mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    min-height: 150px;
    padding-top: 0.6rem;
}

.portal-mini-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    height: 140px;
}

.portal-mini-bar > span {
    display: block;
    width: 100%;
    max-width: 30px;
    min-height: 3px;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
}

.portal-mini-bar small {
    color: var(--muted);
    font-size: 0.62rem;
    white-space: nowrap;
}

.client-usage-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    min-height: 240px;
    padding: 1rem 0.25rem 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.client-usage-bar-wrap {
    flex: 1 0 32px;
    min-width: 32px;
    display: flex;

/* ---------- Dokumen legal ---------- */

.doc-card {
    max-width: 900px;
}

.doc-body {
    line-height: 1.75;
}

.doc-body h2 {
    margin-top: 1.6rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.2rem;
}

.doc-body h2:first-child {
    margin-top: 0;
}

.doc-body h3 {
    margin-top: 1.2rem;
    font-size: 1.05rem;
}

.doc-body p {
    margin: 0 0 0.9rem;
    color: var(--text);
}

.doc-list {
    margin: 0 0 1rem;
    padding-left: 1.3rem;
}

.doc-list li {
    margin-bottom: 0.35rem;
    color: var(--muted);

/* ---------- Blog ---------- */

.blog-grid {
    align-items: start;
}

.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.blog-card:hover {
    text-decoration: none;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.blog-cover {
    display: block;
    margin: -1.1rem -1.1rem 0.9rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(6, 11, 21, 0.55);
}

.blog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-card-body {
    padding: 0.1rem 0;
}

.blog-title {
    font-size: 1.15rem;
    margin: 0 0 0.35rem;
}

.blog-title a {
    color: var(--text);
}

.blog-title a:hover {
    color: var(--primary);
    text-decoration: none;
}

.blog-article {
    max-width: 900px;
}

.blog-article-head h1 {
    margin-bottom: 0.25rem;
}

.blog-article-cover {
    margin: 0 0 1.2rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.blog-article-cover img {
    width: 100%;
    display: block;
}

.blog-article .doc-card {
    max-width: none;
}

/* ---------- Status layanan ---------- */

.status-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-left: 4px solid var(--border);
}

.status-hero.status-operational {
    border-left-color: var(--success);
}

.status-hero.status-degraded {
    border-left-color: var(--warning);
}

.status-hero.status-outage {
    border-left-color: var(--danger);
}

.status-hero.status-maintenance {
    border-left-color: var(--muted);
}

.status-hero-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.status-hero-main h2 {
    margin: 0 0 0.2rem;
}

.status-hero-main p {
    margin: 0;
}

.status-dot {
    width: 0.75rem;
    height: 0.75rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 0 0 0 4px rgba(147, 164, 195, 0.15);
}

.status-dot-operational {
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

.status-dot-degraded {
    background: var(--warning);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.18);
}

.status-dot-outage {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18);
}

.status-dot-maintenance {
    background: var(--muted);
}

.status-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-soft);
}

.status-item:last-child {
    border-bottom: 0;
}

.status-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1 1 auto;
    min-width: 0;
}


}

.doc-body blockquote {
    margin: 0 0 1rem;
    padding: 0.6rem 1rem;
    border-left: 3px solid var(--primary);
    background: rgba(79, 140, 255, 0.07);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--muted);
}

    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    height: 220px;
}

.client-usage-value {
    min-height: 1em;
    color: var(--muted);
    font-size: 0.62rem;
    white-space: nowrap;
}

.client-usage-track {
    width: 100%;
    max-width: 30px;
    height: 160px;
    display: flex;
    align-items: flex-end;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
}

.client-usage-bar {
    display: block;
    width: 100%;
    min-height: 3px;
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
}

.client-usage-bar.usage-tone-success {
    background: linear-gradient(180deg, #34d399, #0f9f74);
}

.client-usage-bar.usage-tone-warning {
    background: linear-gradient(180deg, #fbbf24, #d97706);
}

.client-usage-bar.usage-tone-danger {
    background: linear-gradient(180deg, #f87171, #dc2626);
}

.client-usage-bar.is-empty {
    background: rgba(148, 163, 184, 0.18);
}

.client-usage-date {
    min-height: 1em;
    color: var(--muted);
    font-size: 0.62rem;
    white-space: nowrap;
}

.client-usage-details {
    margin-top: 1rem;
    border-top: 1px solid var(--border-soft);
    padding-top: 0.8rem;
}

.client-usage-details summary {
    color: var(--muted);
    cursor: pointer;
    font-size: 0.85rem;
}

.client-usage-details summary:hover {
    color: var(--text);
}

.client-usage-details .table-wrap {
    margin-top: 0.8rem;
}

.server-note {
    color: var(--muted);
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .client-portal-login {
        padding: 1.2rem;
    }

    .portal-copy-row {
        align-items: stretch;
        flex-direction: column;
    }

    .client-usage-chart {
        gap: 0.3rem;
    }

    .client-usage-bar-wrap {
        flex-basis: 28px;
        min-width: 28px;
    }
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    justify-content: flex-end;
}

.filter-form input,
.filter-form select {
    min-height: 2.35rem;
    padding: .45rem .7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: inherit;
}

.filter-form input[type="search"] {
    min-width: 13rem;
}

.block-form input[type="text"] {
    min-width: 16rem;
    padding: .45rem .7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.verification-actions {
    margin-top: 1rem;
    justify-content: space-between;
}

@media (max-width: 760px) {
    .filter-form {
        justify-content: flex-start;
    }

    .block-form input[type="text"] {
        min-width: 0;
        width: 100%;
    }
}


/* ---------------------------------------------------------
   Halaman token AI gratis (/free)
   --------------------------------------------------------- */
.free-key-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.free-key-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}

.free-key-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.free-key-value .key-value {
    overflow-x: auto;
}

.free-key-masked {
    letter-spacing: 0.08em;
    color: #8ea3c6;
    user-select: none;
}

/* ---------- Panel shell + sidebar (Panel Seller) ---------- */

.panel-shell {
    display: grid;
    /* Sidebar dikeluarkan dari alur grid (position: fixed) supaya bisa
       menempel di tepi kiri perangkat, bukan di dalam kontainer terpusat. */
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.panel-sidebar {
    position: fixed;
    /* Rel penuh seperti sidebar admin: menempel tepat di bawah header sticky
       sampai dasar viewport dan menyatu dengan tepi kiri layar (tanpa sudut
       membulat maupun border penuh) sehingga tidak lagi tampak mengambang. */
    top: var(--header-h);
    bottom: 0;
    left: 0;
    z-index: 25;
    width: 220px;
    max-height: none;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Daftar menu yang lebih tinggi dari layar menggulir di dalam rel, bukan
       memanjangkan panel sampai menutupi footer halaman. */
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 1rem;
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    background: var(--card);
}

@supports (height: 100dvh) {
    .panel-sidebar {
        max-height: calc(100dvh - var(--header-h));
    }
}

.panel-sidebar-head {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border-soft);
}

.panel-sidebar-head strong {
    font-size: 1.02rem;
}

.panel-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.panel-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.panel-sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    text-decoration: none;
}

.panel-sidebar-nav a.is-active {
    background: rgba(79, 140, 255, 0.16);
    color: var(--text);
    font-weight: 600;
}

.panel-nav-icon {
    display: inline-flex;
    width: 1.3rem;
    justify-content: center;
    font-size: 0.95rem;
}

.panel-sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-soft);
}

.panel-main {
    min-width: 0;
    /* Rel sidebar menempel di tepi kiri viewport, jadi konten tidak lagi
       diberi padding di dalam kontainer terpusat (lihat body.panel-has-sidebar
       yang menggeser konten & footer seperti panel admin). */
    padding-left: 0;
}

/* ---------- Pop-up status pengajuan seller (non-dismissible) ---------- */

.pending-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(3, 7, 15, 0.78);
    backdrop-filter: blur(4px);
}

.pending-modal {
    width: min(520px, 100%);
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    text-align: left;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.pending-modal h2 {
    margin: 0.3rem 0 0.4rem;
}

.pending-modal-spinner {
    width: 34px;
    height: 34px;
    margin-bottom: 0.4rem;
    border: 3px solid rgba(79, 140, 255, 0.25);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: pending-spin 0.9s linear infinite;
}

@keyframes pending-spin {
    to {
        transform: rotate(360deg);
    }
}

.pending-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.pending-modal-actions .inline-form {
    display: inline-flex;
    margin: 0;
}

/* ---------- Pop-up pengingat tenggat top up 24 jam (dapat ditutup) ---------- */

.topup-modal-backdrop {
    position: fixed;
    inset: 0;
    /* Selalu DI BAWAH pop-up status pengajuan (z-index 200) agar pop-up
       pemblokir tetap di depan bila keduanya aktif pada saat yang sama. */
    z-index: 190;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(3, 7, 15, 0.62);
    backdrop-filter: blur(3px);
}

.topup-modal {
    width: min(500px, 100%);
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    text-align: left;
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.topup-modal h2 {
    margin: 0.3rem 0 0.4rem;
}

.topup-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

@media (max-width: 520px) {
    .topup-modal-actions {
        flex-direction: column;
    }

    .topup-modal-actions .btn {
        width: 100%;
    }
}


/* ---------- Admin sidebar (fixed, Panel Pusat) ---------- */

.admin-sidebar {
    position: fixed;
    /* Rel penuh: menempel tepat di bawah header sticky dan mencapai dasar
       viewport, jadi tidak ada celah kosong di atas maupun di bawah panel. */
    top: var(--header-h);
    bottom: 0;
    /* Menempel penuh ke tepi kiri perangkat, bukan di dalam kontainer terpusat. */
    left: 0;
    z-index: 25;
    width: 220px;
    max-height: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    /* Tanpa border/sudut membulat: panel menyatu dengan tepi layar sehingga
       tidak lagi tampak mengambang. Garis kanan jadi pemisah dengan konten. */
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    background: var(--card);
    /* Daftar menu yang lebih tinggi dari layar menggulir di dalam rel, bukan
       memanjangkan panel sampai menutupi footer. */
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.admin-sidebar-head {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-soft);
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.admin-sidebar-group {
    margin: 0.7rem 0 0.2rem;
    padding-left: 0.7rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.admin-sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    text-decoration: none;
}

.admin-sidebar-nav a.is-active {
    background: rgba(79, 140, 255, 0.16);
    color: var(--text);
    font-weight: 600;
}

.admin-nav-icon {
    display: inline-flex;
    width: 1.25rem;
    justify-content: center;
    font-size: 0.92rem;
}

/* Konten & footer panel (admin, seller, support) mengisi ruang di kanan rel
   sidebar: tidak ada celah mati antara panel dan isi halaman, dan tabel
   pesanan memakai ruang itu untuk memuat seluruh kolomnya tanpa gulir
   mendatar. Lebarnya dibatasi agar tetap nyaman dibaca di monitor lebar. */
@media (min-width: 1001px) {
    body.admin-has-sidebar .container.page,
    body.admin-has-sidebar .site-footer .footer-inner,
    body.panel-has-sidebar .container.page,
    body.panel-has-sidebar .site-footer .footer-inner {
        width: calc(100% - 244px - 2.5rem);
        max-width: 1440px;
        margin-left: 244px;
        margin-right: auto;
    }
}

@media (max-width: 1000px) {
    .panel-shell {
        grid-template-columns: 1fr;
    }

    .panel-sidebar {
        position: static;
        top: auto;
        bottom: auto;
        width: auto;
        max-height: none;
        overflow: visible;
        overscroll-behavior: auto;
        border: 1px solid var(--border);
        border-radius: var(--radius);
    }

    /* Konten kembali memakai lebar penuh kontainer. */
    .panel-main {
        padding-left: 0;
    }

    .panel-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-sidebar {
        position: static;
        top: auto;
        bottom: auto;
        width: min(1140px, calc(100% - 2.5rem));
        max-height: none;
        margin: 1rem auto 0;
        /* Di layar sempit rel berhenti menjadi kolom tetap: kembali jadi kartu
           normal (border + sudut) karena tidak lagi menempel tepi layar. */
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: visible;
        overscroll-behavior: auto;
    }

    .admin-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-sidebar-group {
        flex-basis: 100%;
    }
}


/* ---------- Seller: grafik batang & pemisah kartu ---------- */
.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.35rem;
    min-height: 160px;
    padding-top: 0.6rem;
}

.bar-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    height: 150px;
}

.bar-chart-bar {
    display: block;
    width: 100%;
    max-width: 26px;
    min-height: 3px;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
}

.bar-chart-label {
    color: var(--muted);
    font-size: 0.6rem;
    white-space: nowrap;
}

.divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1rem 0 0.75rem;
}

.h-sm {
    font-size: 0.95rem;
    margin: 0 0 0.35rem;
}

.h-sm {
    font-size: 0.95rem;
    margin: 0 0 0.35rem;
}

/* ---------- Pusat bantuan: kontak & FAQ ---------- */

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.card-head h2 {
    margin: 0;
}

.link-more {
    font-size: 0.85rem;
    white-space: nowrap;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.contact-card:hover {
    text-decoration: none;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    flex: 0 0 auto;
    border-radius: var(--radius-sm);
    background: rgba(79, 140, 255, 0.12);
    font-size: 1.25rem;
}

.contact-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1 1 auto;
}

.contact-body strong {
    font-size: 1rem;
}

.contact-body .small {
    overflow-wrap: anywhere;
}

.contact-arrow {
    color: var(--muted);
    font-size: 1.1rem;
    flex: 0 0 auto;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.45);
    padding: 0.35rem 0.9rem;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    padding: 0.6rem 0;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    float: right;
    color: var(--muted);
    font-weight: 400;
}

.faq-item[open] summary::after {
    content: "\2212";
}

.faq-item p {
    margin: 0 0 0.75rem;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(79, 140, 255, 0.08);
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--text);
}

.chip:hover {
    text-decoration: none;
    border-color: var(--primary);
}

/* ------------------------------------------------------------------
   Live chat & tiket dukungan
   ------------------------------------------------------------------ */
.support-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 80;
    font-size: 0.95rem;
    /* Palet khusus widget live chat.
       Tema terang: panel putih dengan kolom formulir putih (senada kolom
       `.form input` pada halaman terang) dan teks gelap. Tema gelap: seluruh
       palet diganti di blok `html[data-theme="dark"] .support-widget` di bawah
       supaya panel & kolom ikut permukaan gelap halaman dengan teks putih.
       Semua variabel di sini hanya berlaku di dalam `.support-widget` sehingga
       tema halaman induk tidak terpengaruh. */
    --support-widget-bg: #ffffff;
    --support-widget-surface: #f1f5f9;
    /* Kolom formulir (Nama, Email, Seller/Client, Keterangan) memakai latar
       putih yang sama, termasuk kolom pesan pada panel chat. */
    --support-widget-field: #ffffff;
    --support-widget-text: #0f172a;
    --support-widget-text-soft: #1e293b;
    --support-widget-muted: #475569;
    --support-widget-border: #cbd5e1;
    --support-widget-placeholder: #64748b;
    --support-widget-requester-bg: #e6efff;
    --support-widget-requester-border: #93c5fd;
    color-scheme: light;
}

/* Tema gelap: widget mengikuti kolom formulir halaman lain (latar gelap,
   teks putih) agar seragam dan tetap kontras. */
html[data-theme="dark"] .support-widget,
html:not([data-theme]) .support-widget {
    --support-widget-bg: #0f172a;
    --support-widget-surface: #16233c;
    --support-widget-field: #0b1324;
    --support-widget-text: #f1f5f9;
    --support-widget-text-soft: #e2e8f0;
    --support-widget-muted: #9db0cc;
    --support-widget-border: #24365a;
    --support-widget-placeholder: #8497b6;
    --support-widget-requester-bg: #14294b;
    --support-widget-requester-border: #2f5da8;
    color-scheme: dark;
}

.support-widget-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    border-radius: 999px;
    background: var(--primary, #4f8cff);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.support-widget-toggle:hover {
    filter: brightness(1.05);
}

.support-widget-icon {
    font-size: 1.15rem;
}

.support-widget-panel {
    position: absolute;
    right: 0;
    bottom: 64px;
    width: min(360px, calc(100vw - 32px));
    max-height: min(70vh, 560px);
    display: flex;
    flex-direction: column;
    background: var(--support-widget-bg, #ffffff);
    color: var(--support-widget-text, #0f172a);
    border: 1px solid var(--support-widget-border, #cbd5e1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.support-widget-panel[hidden] {
    display: none;
}

/* Formulir pra-chat: live chat tidak dibuat sebelum pengunjung mengisi nama,
   email, tipe Seller/Client, dan keterangan. Chat wrapper baru ditampilkan
   setelah API menjawab bahwa percakapan sudah aktif. */
.support-widget-start[hidden],
.support-widget-chat[hidden] {
    display: none;
}

.support-widget-start {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--support-widget-bg, #ffffff);
    color: var(--support-widget-text, #0f172a);
}

.support-start-note {
    margin: 0;
    color: var(--support-widget-muted, #475569);
    line-height: 1.45;
}

.support-start-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-start-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--support-widget-muted, #475569);
}

.support-start-field input,
.support-start-field select,
.support-start-field textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--support-widget-border, #cbd5e1);
    background: var(--support-widget-field, #ffffff);
    color: var(--support-widget-text, #0f172a);
    padding: 8px 10px;
    font: inherit;
}

.support-start-field textarea {
    resize: vertical;
}

.support-start-field input::placeholder,
.support-start-field textarea::placeholder {
    color: var(--support-widget-placeholder, #64748b);
    opacity: 1;
}

.support-widget-chat {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.support-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--primary, #4f8cff);
    color: #fff;
}

.support-widget-sub {
    display: block;
    font-size: 0.78rem;
    opacity: 0.9;
}

.support-widget-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.support-thread-log {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 220px;
}

.support-bubble {
    max-width: 88%;
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--surface-muted, rgba(127, 127, 127, 0.1));
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}

.support-bubble.is-requester {
    align-self: flex-end;
    background: rgba(79, 140, 255, 0.12);
    border-color: rgba(79, 140, 255, 0.35);
}

.support-bubble.is-note {
    border-style: dashed;
    opacity: 0.85;
}

.support-bubble-head {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.support-bubble-body {
    word-break: break-word;
    white-space: normal;
}

/* Kontras teks bubble di widget live chat pengunjung.
   Bubble widget berlatar terang, jadi teks isi wajib gelap. Aturan ini
   dicakup `.support-widget` + `!important` pada elemen teks agar tidak
   tertimpa style global/dark theme halaman induk. Bubble panel admin &
   halaman tiket gelap tidak terpengaruh karena berada di luar cakupan. */
.support-widget .support-bubble {
    background: var(--support-widget-surface, #f1f5f9);
    border-color: var(--support-widget-border, #cbd5e1);
    color: var(--support-widget-text, #0f172a);
}

.support-widget .support-bubble.is-requester {
    background: var(--support-widget-requester-bg, #e6efff);
    border-color: var(--support-widget-requester-border, #93c5fd);
    color: var(--support-widget-text, #0f172a);
}

.support-widget .support-bubble-body,
.support-widget .support-bubble-body * {
    color: var(--support-widget-text, #0f172a) !important;
}

.support-widget .support-bubble-head,
.support-widget .support-bubble-head span {
    color: var(--support-widget-muted, #475569) !important;
}

.support-widget .support-bubble-head strong {
    color: var(--support-widget-text-soft, #1e293b) !important;
}

/* Halaman tiket pengunjung (/support-ticket) memakai kartu gelap, sehingga
   bubble di sana justru butuh teks terang. Dikunci per-ID agar kontrasnya
   tidak bergantung pada tema halaman. */
#support-ticket-page .support-bubble-body,
#support-ticket-page .support-bubble-body * {
    color: #f8fafc !important;
}

#support-ticket-page .support-bubble-head,
#support-ticket-page .support-bubble-head span {
    color: #cbd5e1;
}

#support-ticket-page .support-bubble-head strong {
    color: #ffffff;
}

.support-widget-form,
.support-reply-form {
    border-top: 1px solid var(--border, rgba(0, 0, 0, 0.1));
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-widget-form textarea,
.support-reply-form textarea {
    width: 100%;
    resize: vertical;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.2));
    padding: 8px 10px;
    font: inherit;
}

/* Kontrol & teks pendukung widget memakai palet terang yang sama, supaya
   teks yang diketik, placeholder, petunjuk status, dan banner penutup tidak
   ikut mewarisi warna terang tema gelap halaman induk. */
.support-widget-form {
    border-top-color: var(--support-widget-border, #cbd5e1);
}

.support-widget-form textarea {
    background: var(--support-widget-field, #ffffff);
    color: var(--support-widget-text, #0f172a);
    border-color: var(--support-widget-border, #cbd5e1);
}

.support-widget-form textarea::placeholder {
    color: var(--support-widget-placeholder, #64748b);
    opacity: 1;
}

.support-widget .support-thread-log .muted,
.support-widget .support-widget-actions .muted {
    color: var(--support-widget-muted, #475569);
}

.support-widget .alert-info {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #155e75;
}

/* Opsi <select> ikut palet widget supaya terbaca di kedua tema. */
.support-widget select option,
.support-widget select optgroup {
    background: var(--support-widget-bg, #ffffff);
    color: var(--support-widget-text, #0f172a);
}

/* Banner info widget di mode gelap: latar gelap dengan teks terang. */
html[data-theme="dark"] .support-widget .alert-info,
html:not([data-theme]) .support-widget .alert-info {
    background: rgba(34, 211, 238, 0.12);
    border-color: rgba(34, 211, 238, 0.35);
    color: #a5f3fc;
}

html[data-theme="dark"] .support-widget .alert-warning,
html:not([data-theme]) .support-widget .alert-warning {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fde68a;
}

html[data-theme="dark"] .support-widget .alert-error,
html:not([data-theme]) .support-widget .alert-error {
    background: rgba(248, 113, 113, 0.14);
    border-color: rgba(248, 113, 113, 0.4);
    color: #fecaca;
}

.support-widget-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.support-reply-form {
    border-top: 1px solid var(--border, rgba(0, 0, 0, 0.1));
    margin-top: 12px;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

/* ---------- Kotak masuk percakapan (gaya WhatsApp) ---------- */

.conv-section + .conv-section {
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border-soft);
}

.conv-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.conv-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px;
}

.conv-row-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.conv-row-link:hover,
.conv-row-link:focus-visible {
    background: rgba(127, 127, 127, 0.08);
    border-color: var(--border-soft);
    text-decoration: none;
}

.conv-row.is-unread .conv-row-link {
    background: rgba(79, 140, 255, 0.07);
}

.conv-avatar {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(79, 140, 255, 0.16);
    color: #cfe0ff;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.conv-list-archive .conv-avatar {
    background: rgba(147, 164, 195, 0.14);
    color: var(--muted);
}

.conv-main {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.conv-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.conv-name {
    font-size: 0.94rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conv-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.conv-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #22c55e;
    color: #04140a;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.conv-row:not(.is-unread) .conv-badge {
    background: rgba(147, 164, 195, 0.3);
    color: var(--text);
}

.conv-subject,
.conv-preview {
    font-size: 0.84rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conv-subject {
    color: var(--text);
    opacity: 0.9;
}

.conv-preview {
    color: var(--muted);
}

.conv-foot {
    font-size: 0.75rem;
}

.conv-list-archive .conv-name {
    font-weight: 600;
    opacity: 0.85;
}

/* Ponsel: jarak dan avatar dirapatkan supaya nama, subjek, dan cuplikan pesan
   tetap muat dalam satu baris dan daftar percakapan tidak terasa sempit. */
@media (max-width: 480px) {
    .conv-row-link {
        padding: 9px 8px;
        gap: 10px;
    }

    .conv-avatar {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .conv-section-title {
        font-size: 0.72rem;
    }
}

/* ---------- Popup percakapan (panel agen) ---------- */

body.support-modal-open {
    overflow: hidden;
}

.support-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.support-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 18, 0.72);
    backdrop-filter: blur(2px);
}

.support-modal-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(920px, 100%);
    max-height: calc(100vh - 2.5rem);
    background: var(--card, #0f172a);
    border: 1px solid var(--border, #1e2c47);
    border-radius: var(--radius, 16px);
    box-shadow: var(--shadow, 0 24px 60px rgba(2, 6, 23, 0.55));
    overflow: hidden;
}

.support-modal-card:focus {
    outline: none;
}

.support-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border-soft, #172338);
    background: linear-gradient(180deg, rgba(79, 140, 255, 0.1), transparent);
}

.support-modal-head h2 {
    margin: 0.15rem 0 0.35rem;
    font-size: 1.15rem;
    line-height: 1.35;
}

.support-modal-head p {
    margin: 0.15rem 0;
}

.support-modal-tools {
    flex: 0 0 auto;
    display: flex;
    gap: 0.5rem;
}

.support-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.25rem 1.25rem;
}

.support-modal-panel {
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.support-modal-panel .section-head {
    margin-bottom: 0.5rem;
}

/* Riwayat percakapan mengisi ruang popup dan bergulir sendiri, sehingga kotak
   balasan selalu terlihat tanpa perlu menggulir halaman. */
.support-modal-panel .support-thread-log {
    max-height: min(48vh, 460px);
    min-height: 200px;
    overflow-y: auto;
    padding: 0.25rem 0 0.5rem;
    overscroll-behavior: contain;
}

@media (max-width: 700px) {
    .support-modal {
        padding: 0;
    }

    .support-modal-card {
        width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        border: 0;
    }

    .support-modal-head {
        padding: 0.9rem 1rem;
    }

    .support-modal-body {
        padding: 0.75rem 1rem 1rem;
    }

    .support-modal-panel .support-thread-log {
        max-height: calc(100vh - 26rem);
    }
}

/* ---------- Panel: terima / akhiri percakapan ---------- */

.support-closed-banner {
    margin: 0 0 0.9rem;
}

.support-locked-note {
    margin-top: 12px;
}

.support-end-zone {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-soft);
}

.support-end-form {
    margin-top: 10px;
    display: grid;
    gap: 8px;
    max-width: 460px;
}

.support-end-form[hidden] {
    display: none;
}

.support-end-form input[type="text"] {
    width: 100%;
}

/* ---------- Panel seller: aksi baris pesanan (setujui/tolak) ---------- */

/* Tombol "Tolak" membuka form catatan tanpa memuat ulang halaman. */
.order-reject {
    margin: 0;
}

.order-reject > summary {
    cursor: pointer;
    list-style: none;
}

.order-reject > summary::-webkit-details-marker {
    display: none;
}

.order-reject[open] {
    flex-basis: 100%;
}

.order-reject[open] > summary {
    margin-bottom: 8px;
}

.order-reject form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-reject input[type="text"] {
    flex: 1 1 200px;
    min-width: 150px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(6, 11, 21, 0.65);
    color: var(--text);
    font-size: 0.85rem;
}

.order-reject input[type="text"]::placeholder {
    color: #6f819f;
}

.order-reject input[type="text"]:focus {
    outline: none;
    border-color: rgba(79, 140, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14);
}

/* Aksi baris tetap terbaca di layar sempit (tabel bisa digulir mendatar). */
@media (max-width: 680px) {
    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .table-actions .order-reject > summary,
    .table-actions .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .support-widget {
        right: 12px;
        bottom: 12px;
    }

    .support-widget-label {
        display: none;
    }
}


/* =====================================================================
   Responsif lintas perangkat (ponsel, tablet, desktop)
   ---------------------------------------------------------------------
   Lapisan ini ditulis paling akhir agar menjadi acuan tampilan layar
   sempit: header memakai menu lipat CSS-only, sidebar panel (seller & admin)
   ikut dilipat, tabel data digulir mendatar dengan rapi, dan formulir/tombol
   menumpuk penuh lebar tanpa bertumpuk atau keluar dari layar.

   Catatan: tombol menu memakai pola "checkbox tersembunyi + label"
   (bukan <details>) supaya tampilan desktop tidak terpengaruh sama sekali
   dan menunya tetap berfungsi walau JavaScript dimatikan.
   ===================================================================== */

/* ---------- Kontrol state menu (checkbox tersembunyi) ---------- */

.nav-state,
.panel-sidebar-state,
.admin-sidebar-state {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Di desktop tombol menu & checkbox tidak dipakai sama sekali. */
.nav-toggle,
.panel-sidebar-toggle,
.admin-sidebar-toggle {
    display: none;
}

/* Isi panjang (email, API key, URL) dipenggal agar tidak menembus kartu. */
td,
th,
.alert,
.badge,
.brand-text,
.key-value,
.free-key-value .key-value,
.panel-sidebar-head strong,
.panel-sidebar-nav a span,
.admin-sidebar-nav a span {
    overflow-wrap: anywhere;
}

/* Anak grid/flex tidak boleh melebar hanya karena isi yang panjang. */
.grid > *,
.stack > *,
.panel-shell > *,
.panel-main > *,
.header-inner > *,
.section-head.row > *,
.card-head > * {
    min-width: 0;
}

pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Garis tepi tabel dapat digulir mendatar; beri petunjuk visual di tepi. */
.table-wrap {
    position: relative;
}

/* ---------- Tombol "Menu" (hamburger) ---------- */

.nav-toggle {
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.92);
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.nav-toggle-bars {
    position: relative;
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.nav-toggle-bars::before {
    top: -6px;
}

.nav-toggle-bars::after {
    top: 6px;
}

.nav-collapse {
    margin-left: auto;
}

/* ---------- Ponsel, tablet & laptop kecil: ≤1180px ---------- */

@media (max-width: 1180px) {
    :root {
        /* Header lebih pendek di layar sempit (dipakai offset elemen sticky). */
        --header-h: 58px;
    }

    /* Header tetap satu baris: brand di kiri, tombol Menu di kanan. */
    .header-inner {
        position: relative;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.6rem;
        min-height: 58px;
        padding: 0.55rem 0;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-state:focus-visible + .nav-toggle {
        outline: 2px solid rgba(79, 140, 255, 0.75);
        outline-offset: 2px;
    }

    /* Daftar tautan header jadi panel turun penuh lebar. */
    .nav-collapse > .nav {
        display: none;
    }

    .nav-state:checked ~ .nav {
        position: absolute;
        top: calc(100% + 0.45rem);
        left: 0;
        right: 0;
        z-index: 45;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
        padding: 0.55rem;
        max-height: min(72vh, 26rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        background: linear-gradient(180deg, #131f36, #0f172a);
        border: 1px solid var(--border);
        border-radius: 14px;
        box-shadow: var(--shadow);
    }

    @supports (height: 100dvh) {
        .nav-state:checked ~ .nav {
            max-height: min(72dvh, 26rem);
        }
    }

    /* Tautan/tombol jadi baris penuh dengan area sentuh ≥44px. */
    .nav-state:checked ~ .nav > a,
    .nav-state:checked ~ .nav > .nav-user,
    .nav-state:checked ~ .nav > .inline-form,
    .nav-state:checked ~ .nav > .btn {
        width: 100%;
    }

    .nav-state:checked ~ .nav > a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0.35rem 0.75rem;
        border-radius: 9px;
        color: var(--text);
    }

    .nav-state:checked ~ .nav > a:hover {
        background: rgba(255, 255, 255, 0.06);
        text-decoration: none;
    }

    .nav-state:checked ~ .nav > .nav-user {
        padding: 0.45rem 0.75rem;
        border-left: 0;
        border-top: 1px solid var(--border-soft);
    }

    .nav-state:checked ~ .nav > .inline-form {
        margin: 0;
    }

    .nav-state:checked ~ .nav .btn {
        width: 100%;
        justify-content: center;
        white-space: normal;
    }

    }

/* ---------- Footer responsif ---------- */

@media (max-width: 680px) {
    /* Footer: identitas menumpuk di atas, lalu tautan disusun dua kolom rata.
       Sebelumnya tautan hanya flex-wrap sehingga membungkus di tengah frasa
       ("Syarat & / Ketentuan") dan tampak tidak rapi di ponsel. */
    .site-footer {
        /* Ruang bawah agar teks legal tidak tertutup tombol dukungan mengambang
           dan tetap aman dari home indicator perangkat iOS. */
        padding-bottom: calc(3.6rem + env(safe-area-inset-bottom, 0px));
    }

    .footer-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 1.25rem;
        padding: 1.4rem 0 1rem;
        font-size: 0.85rem;
    }

    .footer-brand {
        max-width: none;
        width: 100%;
        gap: 0.75rem;
    }

    /* Kolom teks brand boleh menyusut; alamat/tagline panjang dipenggal rapi. */
    .footer-brand > div {
        min-width: 0;
    }

    .footer-brand strong {
        display: block;
        font-size: 0.98rem;
    }

    .footer-brand p {
        margin-top: 0.2rem;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .footer-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem 1.1rem;
        width: 100%;
        font-size: 0.84rem;
    }

    /* Kolom terakhir memakai lebar penuh supaya tidak menggantung di separuh baris. */
    .footer-links > .footer-col:last-child {
        grid-column: 1 / -1;
    }

    .footer-col-title {
        margin-bottom: 0.35rem;
        font-size: 0.74rem;
    }

    /* Setiap tautan jadi baris penuh: rata kiri, tidak terpotong, dan area
       sentuh cukup besar (≥40px) untuk jari. */
    .footer-links a {
        display: flex;
        align-items: center;
        min-height: 40px;
        padding: 0.4rem 0.7rem;
        border: 1px solid var(--border-soft);
        border-radius: 10px;
        background: rgba(15, 23, 42, 0.55);
        color: var(--text);
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .footer-links a:hover,
    .footer-links a:focus-visible {
        border-color: rgba(79, 140, 255, 0.55);
        background: rgba(79, 140, 255, 0.08);
        text-decoration: none;
    }

    .footer-legal {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
        padding-top: 0.9rem;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .footer-legal-links,
    .footer-social {
        gap: 0.35rem 0.9rem;
    }

    .footer-legal-links a,
    .footer-social a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
    }

    /* Baris copyright & WhatsApp pada footer storefront seller. */
    .footer-inner > .muted.small {
        margin: 0;
        line-height: 1.5;
    }

    .footer-inner > .muted.small a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
    }
}

/* Sidebar panel (seller & admin) jadi satu tombol ringkas di ≥1024px ke bawah. */
@media (max-width: 1024px) {
    .panel-sidebar-toggle,
    .admin-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.6rem 0.8rem;
        min-height: 44px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: rgba(15, 23, 42, 0.92);
        color: var(--text);
        font-size: 0.86rem;
        font-weight: 600;
        cursor: pointer;
        user-select: none;
    }

    .panel-sidebar-toggle::after,
    .admin-sidebar-toggle::after {
        content: "";
        width: 0.45em;
        height: 0.45em;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(45deg);
        transition: transform 0.18s ease;
    }

    .panel-sidebar-state:checked ~ .panel-sidebar-toggle::after,
    .admin-sidebar-state:checked ~ .admin-sidebar-toggle::after {
        transform: rotate(-135deg);
    }

    .panel-sidebar-state:focus-visible ~ .panel-sidebar-toggle,
    .admin-sidebar-state:focus-visible ~ .admin-sidebar-toggle {
        outline: 2px solid rgba(79, 140, 255, 0.75);
        outline-offset: 2px;
    }

    /* Tertutup = daftar menu disembunyikan agar tidak menumpuk di atas konten. */
    .panel-sidebar-state:not(:checked) ~ .panel-sidebar-nav,
    .admin-sidebar-state:not(:checked) ~ .admin-sidebar-nav {
        display: none;
    }

    .panel-sidebar-state:checked ~ .panel-sidebar-nav,
    .admin-sidebar-state:checked ~ .admin-sidebar-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    /* Tabel data: gulir mendatar + bayangan sebagai petunjuk arah. */
    .table-wrap {
        box-shadow: inset -14px 0 14px -14px rgba(0, 0, 0, 0.75);
    }

    /* Panel mengambang (chat & modal) tidak melebihi tinggi layar. */
    .support-widget-panel {
        max-height: min(65vh, 480px);
    }

    .topup-modal {
        max-height: calc(100vh - 2rem);
    }

    @supports (height: 100dvh) {
        .topup-modal {
            max-height: calc(100dvh - 2rem);
        }
    }
}

/* ---------- Ponsel: ≤680px ---------- */

@media (max-width: 680px) {
    .container {
        width: calc(100% - 1.5rem);
    }

    /* Judul halaman menumpuk rapi di atas tombol aksinya. */
    .page-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .page-head h1 {
        font-size: 1.55rem;
    }

    /* Nama brand panjang dipotong dengan elipsis, bukan mendorong tombol Menu. */
    .brand-text {
        max-width: 52vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand-logo {
        max-width: 110px;
        height: 30px;
    }

    /* Tabel lebih rapat; isi sel boleh membungkus agar kolom tidak melebar. */
    table {
        font-size: 0.84rem;
    }

    thead th,
    tbody td {
        padding: 0.55rem 0.6rem;
    }

    tbody td {
        white-space: normal;
    }

    /* Tabel pesanan admin tetap lega tetapi tidak boros ruang di ponsel. */
    .orders-table thead th,
    .orders-table tbody td {
        padding: 0.6rem 0.7rem;
    }

    /* Tombol aksi menumpuk satu kolom: kolom aksi yang menempel di kanan
       tidak memakan hampir seluruh lebar layar. */
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    /* Kolom aksi dipersempit karena hanya berisi satu tombol Detail. */
    .orders-table th.td-actions,
    .orders-table td.td-actions {
        width: 5rem;
        max-width: 5.5rem;
    }

    .action-buttons .btn {
        width: 100%;
    }

    /* Daftar menu sidebar dua tautan per baris supaya tidak terlalu panjang. */
    .panel-sidebar-state:checked ~ .panel-sidebar-nav a,
    .admin-sidebar-state:checked ~ .admin-sidebar-nav a {
        flex: 1 1 calc(50% - 0.35rem);
        min-height: 42px;
    }

    /* Tombol aksi di dalam kartu/form jadi penuh lebar (mudah disentuh). */
    .form-actions,
    .head-actions,
    .verification-actions,
    .pending-modal-actions,
    .hero-actions {
        width: 100%;
    }

    .form-actions .btn,
    .head-actions .btn,
    .verification-actions .btn,
    .pending-modal-actions .btn,
    .hero-actions .btn {
        flex: 1 1 100%;
        width: 100%;
        white-space: normal;
    }

    /* Filter/pencarian menumpuk penuh lebar. */
    .filter-form {
        width: 100%;
        justify-content: flex-start;
    }

    .filter-form input,
    .filter-form select,
    .filter-form .btn {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }

    .inline-form input[type="search"] {
        width: 100%;
    }

    /* Toolbar pencarian admin: input dan tombol masing-masing satu baris agar
       mudah disentuh dan tidak berdesakan. */
    .search-toolbar input[type="search"],
    .search-toolbar .btn {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }

    /* Minimal 16px agar Safari iOS tidak memperbesar halaman saat input fokus.
       `!important` perlu karena aturan dasar `.form input[type="..."]`
       (spesifisitas 0,2,1) lebih kuat daripada selektor tipe di bawah, sehingga
       tanpa itu input tetap 0.9rem (14.4px) dan iOS melakukan auto-zoom. */
    .form input,
    .form select,
    .form textarea,
    .form .form-control-input,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="date"],
    input[type="datetime-local"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    input[type="file"],
    select,
    textarea {
        font-size: 1rem !important;
    }

    /* Blok kode & kunci panjang dibungkus, bukan menggeser seluruh halaman. */
    pre,
    .hero-code pre {
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

    /* Invoice & modal tetap rapi di layar kecil. */
    .invoice-sheet {
        padding: 1.1rem;
    }

    .invoice-head h2 {
        font-size: 1.3rem;
    }

    .invoice-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .invoice-total {
        font-size: 1rem;
    }

    .topup-modal-backdrop {
        align-items: flex-start;
        padding: 0.9rem;
    }

    .support-widget-panel {
        width: calc(100vw - 24px);
    }

    /* Footer ponsel: tautan tetap dua kolom, jarak antar kolom grup dirapatkan
       agar tinggi footer tidak memanjang. Setiap kotak tautan dibuat selebar
       kolomnya (align-items: stretch) supaya deretan kotak rata, tidak
       bergerigi mengikuti panjang teks. */
    .footer-links {
        gap: 0.85rem 0.6rem;
        font-size: 0.82rem;
    }

    .footer-links > .footer-col {
        align-items: stretch;
    }

    .footer-links a {
        min-height: 42px;
        padding: 0.4rem 0.55rem;
    }

    /* Jarak antar blok di ponsel sedikit lebih rapat (token irama vertikal). */
    :root {
        --space-block: 1rem;
        --space-grid: 0.85rem;
    }

    /* Katalog paket 4×2 menyusut jadi satu kolom agar kartu tidak terpotong. */
    .grid-packages {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Pop-up pesanan memakai lebar layar penuh minus margin tepi. */
    .order-toast-stack {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
}

/* ---------- Ponsel kecil: ≤480px ---------- */

@media (max-width: 480px) {
    .container {
        width: calc(100% - 1.2rem);
    }

    .page {
        padding: 1.2rem 0 2.2rem;
    }

    .section {
        margin-top: 1.8rem;
    }

    .card {
        padding: 0.95rem;
    }

    .nav-toggle {
        padding: 0.5rem 0.65rem;
        font-size: 0.8rem;
    }

    .nav-state:checked ~ .nav {
        max-height: min(78vh, 24rem);
    }

    .nav-state:checked ~ .nav > a {
        font-size: 0.9rem;
    }

    /* Menu sidebar satu kolom penuh agar label panjang tetap terbaca. */
    .panel-sidebar-state:checked ~ .panel-sidebar-nav a,
    .admin-sidebar-state:checked ~ .admin-sidebar-nav a {
        flex: 1 1 100%;
    }

    .topup-modal-actions .btn,
    .pending-modal-actions .btn {
        width: 100%;
    }
}

/* ---------- Layar sentuh: area sentuh minimal 44px ---------- */

@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }

    .btn-sm {
        min-height: 40px;
    }

    .filter-tab,
    .key-tab {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    /* Tautan footer ikut aturan area sentuh 44px di perangkat sentuh. */
    .footer-links a {
        min-height: 44px;
    }
}

/* ---------- Tablet: 681–1024px ---------- */

@media (min-width: 681px) and (max-width: 1024px) {
    .card {
        padding: 1.25rem;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .settings-grid {
        gap: 0.9rem;
    }

    .page-head h1 {
        font-size: 1.9rem;
    }

    /* Tabel data tetap nyaman dibaca tanpa gulir berlebihan. */
    .table-wrap > table {
        font-size: 0.85rem;
    }

    /* Footer tablet: identitas menumpuk di atas tautan, tautan tiga kolom agar
       tidak memanjang ke bawah. */
    .footer-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.4rem;
        padding: 1.6rem 0 1rem;
    }

    .footer-brand {
        max-width: none;
    }

    .footer-links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}



/* ---------- Detail log email admin ---------- */

.email-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem 1.25rem;
    margin: 1.1rem 0 1.25rem;
    padding: 1rem;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: rgba(10, 18, 34, 0.55);
}

.email-detail-grid dt {
    margin: 0 0 .22rem;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.email-detail-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: .88rem;
}

.email-preview-frame {
    display: block;
    width: 100%;
    min-height: 640px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #070c16;
}

.email-source-wrap {
    margin-top: .85rem;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: rgba(10, 18, 34, 0.55);
}

.email-source-wrap summary {
    padding: .75rem .9rem;
    cursor: pointer;
    font-size: .84rem;
    font-weight: 600;
}

.email-source {
    max-height: 420px;
    margin: 0;
    padding: 0 .9rem .9rem;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.55;
}

.email-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}

@media (max-width: 760px) {
    .email-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .email-preview-frame {
        min-height: 520px;
    }
}

@media (max-width: 480px) {
    .email-detail-grid {
        grid-template-columns: 1fr;
    }
}
/* ==================================================================
   Mode terang & tombol tema
   ------------------------------------------------------------------
   Tema gelap tetap menjadi bawaan :root. Palet terang di bawah hanya
   aktif saat <html data-theme="light"> sehingga server, admin, dan
   widget live chat tidak terpengaruh tanpa sengaja.
   ================================================================== */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0.42rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.theme-toggle-icon {
    display: none;
    line-height: 0;
}

html[data-theme="dark"] .theme-toggle-sun,
html:not([data-theme]) .theme-toggle-sun,
html[data-theme="light"] .theme-toggle-moon {
    display: inline-flex;
}

html[data-theme="light"] {
    --bg: #f4f7fc;
    --card: #ffffff;
    --border: #d8e2f0;
    --border-soft: #e8eef7;
    --text: #0f172a;
    --muted: #5a6b86;
    --primary: #2563eb;
    --primary-2: #6d4aff;
    --accent: #0e7490;
    --success: #059669;
    --warning: #b45309;
    --danger: #dc2626;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --surface: #ffffff;
    --surface-muted: #f1f5f9;
    color-scheme: light;
}

html[data-theme="light"] body {
    background:
        radial-gradient(1100px 520px at 12% -8%, rgba(37, 99, 235, 0.10), transparent 62%),
        radial-gradient(900px 480px at 92% 4%, rgba(109, 74, 255, 0.08), transparent 60%),
        var(--bg);
    color: var(--text);
}

@media screen and (max-width: 680px) {
    .theme-toggle-text {
        display: none;
    }

    .theme-toggle {
        width: 40px;
        padding: 0.5rem;
        flex: 0 0 40px;
    }
}

html[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.88);
}

html[data-theme="light"] .card,
html[data-theme="light"] .order-modal {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: var(--shadow);
}

html[data-theme="light"] .invoice-sheet {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

html[data-theme="light"] .nav-menu {
    background: #ffffff;
    border-color: var(--border);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

html[data-theme="light"] .nav-menu a:hover,
html[data-theme="light"] .nav-menu a.is-active {
    background: rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .site-footer {
    background: #eef3fa;
}

html[data-theme="light"] pre {
    background: #f1f5f9;
    border-color: var(--border);
}

html[data-theme="light"] code {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.07);
    border-color: rgba(37, 99, 235, 0.16);
}

html[data-theme="light"] pre code {
    color: #0f172a;
}

html[data-theme="light"] .code-head {
    background: #f1f5f9;
    border-bottom-color: var(--border);
}

html[data-theme="light"] .hero-code pre {
    background: transparent;
}

html[data-theme="light"] .key-value,
html[data-theme="light"] .base-url-box code,
html[data-theme="light"] .portal-cred-value,
html[data-theme="light"] .portal-key-full {
    background: #f8fafc;
    border-color: var(--border);
    color: #0f172a;
}

html[data-theme="light"] .key-tabs {
    background: #f8fafc;
}

html[data-theme="light"] .payment-option,
html[data-theme="light"] .faq-item {
    background: #f8fafc;
}

html[data-theme="light"] .payment-option:hover {
    border-color: var(--primary);
}

html[data-theme="light"] thead th {
    background: #f1f5f9;
}

html[data-theme="light"] .brand-preview,
html[data-theme="light"] .upload-preview,
html[data-theme="light"] .brand-preview-favicon,
html[data-theme="light"] .package-block,
html[data-theme="light"] .checklist-item,
html[data-theme="light"] .key-item,
html[data-theme="light"] .invoice-parties > div,
html[data-theme="light"] .invoice-meta > div,
html[data-theme="light"] .email-detail-grid,
html[data-theme="light"] .email-source-wrap {
    background: #f8fafc;
}

html[data-theme="light"] .email-preview-frame {
    background: #ffffff;
}

html[data-theme="light"] .progress {
    background: #e2e8f0;
}

html[data-theme="light"] .settings-submit {
    background: rgba(255, 255, 255, 0.94);
}

html[data-theme="light"] .portal-tabs {
    background: #f1f5f9;
}

html[data-theme="light"] .nav-toggle,
html[data-theme="light"] .panel-sidebar-toggle,
html[data-theme="light"] .admin-sidebar-toggle {
    background: #ffffff;
}

html[data-theme="light"] .announcement {
    background: rgba(180, 83, 9, 0.10);
    border-bottom-color: rgba(180, 83, 9, 0.25);
    color: #92400e;
}

html[data-theme="light"] .form input[type="text"],
html[data-theme="light"] .form input[type="email"],
html[data-theme="light"] .form input[type="password"],
html[data-theme="light"] .form input[type="search"],
html[data-theme="light"] .form input[type="tel"],
html[data-theme="light"] .form input[type="url"],
html[data-theme="light"] .form input[type="number"],
html[data-theme="light"] .form input[type="file"],
html[data-theme="light"] .form .form-control-input,
html[data-theme="light"] .form select,
html[data-theme="light"] .form .form-control-select,
html[data-theme="light"] .form textarea,
html[data-theme="light"] .form .form-control-textarea,
html[data-theme="light"] .inline-form input[type="search"],
html[data-theme="light"] .topup-select,
html[data-theme="light"] select:not(.form select),
html[data-theme="light"] input[type="text"]:not(.form input),
html[data-theme="light"] input[type="email"]:not(.form input),
html[data-theme="light"] input[type="password"]:not(.form input),
html[data-theme="light"] input[type="search"]:not(.form input),
html[data-theme="light"] input[type="tel"]:not(.form input),
html[data-theme="light"] input[type="url"]:not(.form input),
html[data-theme="light"] input[type="number"]:not(.form input) {
    background-color: #ffffff;
    color: #0f172a;
    border-color: var(--border);
    color-scheme: light;
}

html[data-theme="light"] .form select option,
html[data-theme="light"] .form select optgroup,
html[data-theme="light"] select:not(.form select) option {
    background: #ffffff;
    color: #0f172a;
}

html[data-theme="light"] .form input:-webkit-autofill,
html[data-theme="light"] .form input:-webkit-autofill:hover,
html[data-theme="light"] .form input:-webkit-autofill:focus,
html[data-theme="light"] .form textarea:-webkit-autofill,
html[data-theme="light"] .form select:-webkit-autofill {
    -webkit-text-fill-color: #0f172a;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    box-shadow: 0 0 0 1000px #ffffff inset;
}

html[data-theme="light"] .form input::placeholder,
html[data-theme="light"] .form textarea::placeholder,
html[data-theme="light"] .inline-form input::placeholder {
    color: #64748b;
}

html[data-theme="light"] .form input[type="checkbox"],
html[data-theme="light"] .form input[type="radio"] {
    color-scheme: light;
}

html[data-theme="light"] .form input::file-selector-button {
    color: #1d4ed8;
}

html[data-theme="light"] .form label > span,
html[data-theme="light"] .field > label,
html[data-theme="light"] .check-field,
html[data-theme="light"] .clear-field {
    color: #334155;
}

html[data-theme="light"] .btn-outline {
    color: #1d4ed8;
}

html[data-theme="light"] .btn-outline:hover {
    background: rgba(37, 99, 235, 0.12);
}

html[data-theme="light"] .btn-ghost {
    border-color: var(--border);
    color: #475569;
}

html[data-theme="light"] .btn-ghost:hover {
    border-color: var(--primary);
    color: var(--text);
}

html[data-theme="light"] .btn-danger {
    color: #b91c1c;
}

html[data-theme="light"] .alert-success,
html[data-theme="light"] .badge-success {
    color: #047857;
}

html[data-theme="light"] .alert-error,
html[data-theme="light"] .badge-danger {
    color: #b91c1c;
}

html[data-theme="light"] .alert-warning,
html[data-theme="light"] .badge-warning {
    color: #92400e;
}

html[data-theme="light"] .alert-info,
html[data-theme="light"] .badge-info {
    color: #0e7490;
}

html[data-theme="light"] .eyebrow {
    color: #0e7490;
    background: rgba(14, 116, 144, 0.08);
    border-color: rgba(14, 116, 144, 0.22);
}

html[data-theme="light"] .step-list li::before,
html[data-theme="light"] .feature-icon,
html[data-theme="light"] .conv-avatar {
    color: #1d4ed8;
}

html[data-theme="light"] .key-tab.is-active,
html[data-theme="light"] .filter-tab.is-active,
html[data-theme="light"] .portal-tabs a.is-active {
    color: #1d4ed8;
}

html[data-theme="light"] .invoice-total {
    color: #047857;
}

html[data-theme="light"] .free-key-masked {
    color: #64748b;
}

html[data-theme="light"] .lock-note,
html[data-theme="light"] .order-modal-note {
    color: #92400e;
}

html[data-theme="light"] .announcement,
html[data-theme="light"] .flash-sale-kicker,
html[data-theme="light"] .flash-price-now,
html[data-theme="light"] .flash-stock-head strong {
    color: #92400e;
}

html[data-theme="light"] .payout-account a {
    color: #1d4ed8;
}

html[data-theme="light"] .usage-block,
html[data-theme="light"] .priority-card,
html[data-theme="light"] .blog-cover {
    background: #f8fafc;
}

html[data-theme="light"] .usage-note-warning {
    color: #92400e;
}

html[data-theme="light"] .flash-sale-banner {
    background: linear-gradient(135deg, #fff7ed, #f5f3ff 55%, #f8fafc);
}

html[data-theme="light"] .flash-sale-side,
html[data-theme="light"] .flash-countdown-units > span,
html[data-theme="light"] .flash-sale-detail .flash-countdown,
html[data-theme="light"] .flash-sale-detail .flash-stock {
    background: #f8fafc;
}

html[data-theme="light"] .flash-sale-side {
    border-color: var(--border);
}

html[data-theme="light"] .support-modal-head {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent);
}

@media (max-width: 1180px) {
    html[data-theme="light"] .nav-state:checked ~ .nav {
        background: #ffffff;
        border-color: var(--border);
    }

    html[data-theme="light"] .nav-state:checked ~ .nav > a:hover {
        background: rgba(15, 23, 42, 0.05);
    }

    html[data-theme="light"] .footer-links a {
        background: #ffffff;
        color: #0f172a;
    }

    html[data-theme="light"] .footer-links a:hover,
    html[data-theme="light"] .footer-links a:focus-visible {
        background: rgba(37, 99, 235, 0.08);
        border-color: rgba(37, 99, 235, 0.45);
    }

    html[data-theme="light"] .table-wrap {
        box-shadow: inset -14px 0 14px -14px rgba(15, 23, 42, 0.18);
    }
}

/* Kartu tiket pengunjung juga menjadi terang di mode terang. Teks bubble
   harus kembali gelap; aturan sebelumnya mengunci teks terang untuk tema gelap. */
html[data-theme="light"] #support-ticket-page .support-bubble-body,
html[data-theme="light"] #support-ticket-page .support-bubble-body * {
    color: #0f172a !important;
}

html[data-theme="light"] #support-ticket-page .support-bubble-head,
html[data-theme="light"] #support-ticket-page .support-bubble-head span {
    color: #475569;
}

html[data-theme="light"] #support-ticket-page .support-bubble-head strong {
    color: #1e293b;
}

html[data-theme="light"] .theme-toggle {
    background: #f8fafc;
    color: #334155;
}

/* ==================================================================
   Katalog 4 x 2
   ------------------------------------------------------------------
   Delapan paket disusun empat kolom pada desktop sehingga membentuk
   dua baris penuh. Tablet turun ke dua kolom, ponsel satu kolom.
   ================================================================== */

.grid-packages {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.grid-packages > .price-card {
    height: 100%;
}

@media (max-width: 1024px) {
    .grid-packages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Harga diskon: harga normal dicoret + badge persen ---------- */

.price.is-discounted {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.price-strike,
.price .price-strike {
    color: var(--muted);
    font-size: 0.78em;
    font-weight: 500;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    opacity: 0.85;
}

.price-final {
    color: var(--text);
    font-weight: 800;
}

.price-off {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.16);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #16a34a;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.35;
    white-space: nowrap;
}

html[data-theme="light"] .price-off {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.45);
    color: #15803d;
}

.token-price .price-strike {
    display: block;
    margin-bottom: 0.1rem;
}

.summary-list .price-strike {
    font-size: 0.82em;
}

/* ---------- Tombol tema: ikon saja ---------- */

.theme-toggle {
    gap: 0;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    flex: 0 0 40px;
}

.theme-toggle-icon svg {
    width: 18px;
    height: 18px;
}

/* ---------- Pop-up pesanan (social proof) ---------- */

.order-toast-stack {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(340px, calc(100vw - 36px));
    pointer-events: none;
}

.order-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.42);
    color: #e2e8f0;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.order-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.order-toast-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-top: 1px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #22c55e;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.order-toast-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.8rem;
    line-height: 1.4;
    min-width: 0;
}

.order-toast-lead {
    color: #94a3b8;
}

.order-toast-package {
    color: #f8fafc;
    font-size: 0.86rem;
    font-weight: 700;
}

.order-toast-meta {
    color: #64748b;
    font-size: 0.72rem;
}

.order-toast-close {
    margin-left: auto;
    padding: 0 0.2rem;
    background: none;
    border: 0;
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
}

.order-toast-close:hover {
    color: #e2e8f0;
}

html[data-theme="light"] .order-toast {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.4);
    color: #1e293b;
}

html[data-theme="light"] .order-toast-lead {
    color: #475569;
}

html[data-theme="light"] .order-toast-package {
    color: #0f172a;
}

@media (prefers-reduced-motion: reduce) {
    .order-toast {
        transition: opacity 0.2s ease;
        transform: none;
    }

    .order-toast.is-visible {
        transform: none;
    }
}

/* ==================================================================
   Irama vertikal antar blok (semua halaman & semua perangkat)
   ------------------------------------------------------------------
   Satu set token jarak dipakai bersama supaya celah antar kartu, bagian,
   dan kisi selalu sama di halaman publik, panel admin/seller, portal klien,
   maupun storefront seller. Margin vertikal blok normal saling menciut
   (margin collapsing), jadi aturan `> * + *` hanya menetapkan jarak minimum
   — jarak yang memang lebih besar (mis. `.section` 2.6rem) tetap menang.
   ================================================================== */

:root {
    --space-block: 1.25rem; /* jarak antar kartu/bagian bertumpuk */
    --space-grid: 1rem; /* jarak antar kolom kisi */
}

/* Wadah halaman & panel: setiap blok setelah blok pertama diberi celah. */
.page > * + *,
.panel-main > * + * {
    margin-top: var(--space-block);
}

/* Kartu bertumpuk di dalam kartu lain (ringkasan + rincian, tabel + kartu). */
.card > .card + .card,
.card > .grid + .grid,
.card > .grid + .card,
.card > .card + .grid,
.card > .table-wrap + .card,
.card > .card + .table-wrap,
.card > .alert + .card,
.card > .alert + .grid,
.card > .section + .section {
    margin-top: var(--space-block);
}

/* Kisi & tumpukan memakai token yang sama di seluruh halaman. */
.grid {
    gap: var(--space-grid);
}

.stack {
    gap: var(--space-block);
}

/* Header bagian (judul + keterangan) punya jarak bawah yang konsisten. */
.section-head {
    margin-bottom: var(--space-grid);
}

/* Tablet: sedikit lebih rapat daripada desktop. */
@media (min-width: 681px) and (max-width: 1024px) {
    :root {
        --space-block: 1.1rem;
        --space-grid: 0.9rem;
    }
}

