/* ==========================================================================
   Domino 1.81 — Dashboard Notifikasi Kemenangan
   ========================================================================== */

:root {
    --bg:          #0b0f1a;
    --bg-soft:     #111827;
    --panel:       #151d2e;
    --panel-2:     #1b2438;
    --border:      #263149;
    --text:        #e8edf7;
    --text-dim:    #93a1bd;
    --text-faint:  #5f6d88;
    --gold:        #f0b429;
    --gold-soft:   #f7d070;
    --green:       #34d399;
    --red:         #f87171;
    --blue:        #60a5fa;
    --purple:      #a78bfa;
    --radius:      14px;
    --shadow:      0 10px 30px rgba(0, 0, 0, .35);

    /* Satu ukuran konten untuk SEMUA halaman (user & admin). */
    --wrap:        1120px;
}

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

body {
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(240, 180, 41, .10), transparent 60%),
        radial-gradient(900px 500px at 90% 0%, rgba(96, 165, 250, .08), transparent 55%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: 28px 22px 60px;
    line-height: 1.5;
}

.wrap {
    /* Satu ukuran untuk SEMUA halaman (user & admin): 1120px. */
    width: 100%;
    max-width: 1120px;          /* cadangan bila variabel tidak terbaca */
    max-width: var(--wrap);
    margin: 0 auto;
}

/* ------------------------------------------------ indikator koneksi */
.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 12.5px;
    color: var(--text-dim);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, .7);
    animation: pulse 2s infinite;
}

.dot.off {
    background: var(--red);
    animation: none;
    box-shadow: 0 0 0 3px rgba(248, 81, 73, .18);
}

.status.is-off {
    border-color: rgba(248, 81, 73, .45);
    color: #ff9b95;
}

.status.is-warn {
    border-color: rgba(240, 180, 41, .45);
    color: var(--gold-soft);
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); }
    70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ---------------------------------------------------------------- cards */
.cards {
    /* Lebar wrap 1120px: 4 kartu sejajar. */
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

@media (max-width: 860px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card {
    background: linear-gradient(160deg, var(--panel), var(--bg-soft));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--gold);
    opacity: .8;
}

.card.green::after  { background: var(--green); }
.card.blue::after   { background: var(--blue); }
.card.purple::after { background: var(--purple); }

.card .label {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-faint);
    font-weight: 600;
}

.card .value {
    font-size: 25px;
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: -.4px;
}

.card .value.gold { color: var(--gold-soft); }
.card .note {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* ---------------------------------------------------------------- table */
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--panel-2), transparent);
}

.panel-head h2 {
    font-size: 15px;
    font-weight: 700;
}

.panel-head .count {
    font-size: 12px;
    color: var(--text-dim);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

thead th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-faint);
    font-weight: 700;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, .18);
    white-space: nowrap;
}

tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(38, 49, 73, .55);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr {
    transition: background .15s;
}

tbody tr:hover {
    background: rgba(96, 165, 250, .06);
}

.player {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--panel-2);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.avatar.ph {
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-soft);
    background: linear-gradient(145deg, #2a3450, #1b2438);
}

.pname {
    font-weight: 600;
}

.pid {
    font-size: 11.5px;
    color: var(--text-faint);
}

.game {
    color: var(--text);
}

.amount {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--gold-soft);
    white-space: nowrap;
}

.amount small {
    display: block;
    font-weight: 400;
    font-size: 11px;
    color: var(--text-faint);
}

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge.t2 { color: #86efac; background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .3); }
.badge.t3 { color: #93c5fd; background: rgba(96, 165, 250, .12); border-color: rgba(96, 165, 250, .3); }
.badge.t4 { color: #fcd34d; background: rgba(240, 180, 41, .14); border-color: rgba(240, 180, 41, .35); }
.badge.tx { color: var(--text-dim); background: rgba(147, 161, 189, .1); border-color: rgba(147, 161, 189, .25); }

.mono {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px;
    color: var(--text-dim);
}

.empty {
    padding: 54px 20px;
    text-align: center;
    color: var(--text-dim);
}

.empty .big {
    font-size: 40px;
    margin-bottom: 10px;
    opacity: .5;
}

.empty code {
    display: inline-block;
    margin-top: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--gold-soft);
    font-size: 12.5px;
}

/* --------------------------------------------------------------- footer */
footer {
    margin-top: 22px;
    color: var(--text-faint);
    font-size: 12px;
    text-align: center;
    line-height: 1.7;
}

footer code {
    color: var(--text-dim);
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 860px) {
    .hide-sm { display: none; }
    body { padding: 18px 12px 40px; }
    .card .value { font-size: 21px; }
}

/* ==========================================================================
   Tambahan: menu notifikasi, toolbar, unread, toast
   ========================================================================== */

/* Topbar: logo menempel kiri, sisanya (Live JP · status · Keluar) menempel kanan. */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

/* Pengaman: logo selalu terdorong mentok ke kiri walau layar sempit. */
.topbar > .brand-logo {
    margin-right: auto;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.livejp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--gold-soft);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
}

.livejp::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 10px rgba(240, 180, 41, .8);
}

/* Logo / gambar memanjang di topbar kanan (bentuk persegi panjang, bukan bundar) */
.brand-logo {
    display: block;
    height: 42px;
    width: auto;
    max-width: 190px;
    object-fit: cover;
/*    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);*/
    flex: 0 0 auto;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, .12);
}

.toolbar input[type="search"] {
    flex: 1 1 240px;
    min-width: 180px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 9px;
    padding: 9px 12px;
    font: inherit;
    font-size: 13px;
    outline: none;
}

.toolbar input[type="search"]:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(240, 180, 41, .12);
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
}

.check input {
    accent-color: var(--gold);
}

.btn {
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    font: inherit;
    font-size: 12.5px;
    padding: 8px 12px;
    border-radius: 9px;
    cursor: pointer;
    transition: .15s;
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--gold);
    color: var(--gold-soft);
}

.btn.ghost {
    background: transparent;
}

.btn.danger:hover {
    border-color: var(--red);
    color: var(--red);
}

.dot.warn {
    background: var(--gold);
    animation: none;
}

tbody tr.is-unread {
    background: rgba(240, 180, 41, .045);
}

.unread-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    margin-right: 6px;
    vertical-align: 1px;
    box-shadow: 0 0 8px rgba(240, 180, 41, .8);
}

.badge.jp {
    color: #1a1206;
    background: linear-gradient(145deg, #f0b429, #c9930f);
    border-color: transparent;
    margin-left: 4px;
    font-size: 10px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    background: var(--panel-2);
    border: 1px solid var(--gold);
    color: var(--text);
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 13px;
    box-shadow: var(--shadow);
    z-index: 50;
}

.toast.bad {
    border-color: var(--red);
}

@media (max-width: 860px) {
    /* Logo tetap di kiri, grup kanan turun ke baris berikutnya (rata kanan). */
    .topbar { justify-content: space-between; }
    .topbar-right { margin-left: auto; justify-content: flex-end; }
}

/* ---------- kotak petunjuk saat store kosong ---------- */
.hintbox {
    margin-top: 14px;
    padding: 10px 14px;
    border: 1px solid #3d2f12;
    border-left: 3px solid #d29922;
    background: #1d1710;
    border-radius: 8px;
    color: #e3c07b;
    font-size: 12.5px;
    line-height: 1.55;
    text-align: left;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- tabel ringkas (3 kolom) + tombol salin nama ---------- */
table.compact th.right,
table.compact td.amount { text-align: right; }
table.compact td.amount small { margin-left: 6px; }

.player .pinfo { min-width: 0; }

button.copy {
    margin-left: auto;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border: 1px solid #3b4859;
    background: #222d3a;
    color: #c6d2e0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.4;
    white-space: nowrap;
    transition: background .12s, color .12s, border-color .12s;
}
button.copy svg { flex: 0 0 auto; opacity: .9; }
button.copy span { display: inline; }
button.copy:hover {
    background: #2b3846;
    color: #ffffff;
    border-color: #4a5a6e;
}
button.copy.done {
    background: #12351f;
    border-color: #1f6f3d;
    color: #3fb950;
}

/* ---------- tombol keluar di topbar ---------- */
form.logout { margin: 0; }

form.logout button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text-dim);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}

/* Ikon keluar dibuat merah supaya jelas terlihat sebagai aksi keluar. */
form.logout button svg {
    color: #ff5b5b;
    filter: drop-shadow(0 0 4px rgba(255, 91, 91, .45));
    transition: color .12s, filter .12s;
}

form.logout button:hover {
    background: #2a1a1d;
    border-color: #6b2b30;
    color: #ffb3ad;
}

form.logout button:hover svg {
    color: #ff8a8a;
    filter: drop-shadow(0 0 6px rgba(255, 91, 91, .7));
}

/* Versi lebih tegas: border & latar ikut memerah saat disentuh. */
form.logout button:focus-visible {
    outline: 2px solid #ff5b5b;
    outline-offset: 2px;
}

/* ==========================================================================
   Halaman login (login.php)
   ========================================================================== */

body.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 100vh;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 26px 20px;
}

/* Logo di tengah atas kartu login/registrasi */
.auth-head {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

.auth-logo-img {
    display: block;
    height: 62px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
}

.auth-title {
    text-align: center;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--text);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    font-size: 22px;
    border-radius: 11px;
    background: linear-gradient(145deg, #f7d070, #d99b12);
    color: #1a1206;
    box-shadow: 0 4px 14px rgba(240, 180, 41, .25);
}

.auth-brand h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--text);
}

.auth-sub {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 2px;
}

.auth-card label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    margin: 12px 0 6px;
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color .12s, box-shadow .12s;
}

.auth-card input[type="text"]:focus,
.auth-card input[type="password"]:focus {
    border-color: #3d6ea8;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .15);
}

.auth-card button[type="submit"] {
    width: 100%;
    margin-top: 18px;
    padding: 11px 14px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(145deg, #f7d070, #e0a51a);
    color: #1a1206;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .12s;
}

.auth-card button[type="submit"]:hover { filter: brightness(1.06); }
.auth-card button[type="submit"]:disabled { opacity: .5; cursor: not-allowed; }

.auth-alert {
    padding: 10px 12px;
    border: 1px solid #6b2b30;
    border-left: 3px solid #f87171;
    background: #2a1417;
    border-radius: 8px;
    color: #ffb3ad;
    font-size: 12.5px;
    line-height: 1.5;
}

.auth-note {
    padding: 12px 14px;
    border: 1px solid #3d2f12;
    border-left: 3px solid #d29922;
    background: #1d1710;
    border-radius: 8px;
    color: #e3c07b;
    font-size: 12.5px;
    line-height: 1.6;
}

.auth-note code {
    display: inline-block;
    margin: 4px 0;
    padding: 2px 7px;
    background: #0b0f1a;
    border: 1px solid #3d2f12;
    border-radius: 5px;
    font-size: 12px;
    color: #f7d070;
}

.auth-foot {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-faint);
    text-align: center;
}


/* ---------- tautan / tombol di bawah form login & registrasi ---------- */
.auth-switch {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12.5px;
    color: var(--text-dim);
}

.auth-alt {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel-2);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .12s, color .12s, background .12s;
}

.auth-alt:hover {
    border-color: var(--gold);
    color: var(--gold-soft);
    background: #202a3f;
}

.auth-ok {
    padding: 10px 12px;
    border: 1px solid #1f6f3d;
    border-left: 3px solid #3fb950;
    background: #10261a;
    border-radius: 8px;
    color: #7ee2a8;
    font-size: 12.5px;
    line-height: 1.5;
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
    margin-bottom: 2px;
}

/* ---------- responsif untuk wrap 720px ---------- */
@media (max-width: 620px) {
    .cards { grid-template-columns: 1fr; }
    .brand-logo { height: 36px; max-width: 150px; }
    .auth-logo-img { height: 52px; max-width: 210px; }
}

/* ---------- bar info setelah registrasi berhasil ---------- */
.welcome-bar {
    margin-bottom: 18px;
    padding: 10px 14px;
    border: 1px solid #1f6f3d;
    border-left: 3px solid #3fb950;
    background: #10261a;
    border-radius: 9px;
    color: #9ff0bf;
    font-size: 12.5px;
    line-height: 1.55;
}

.welcome-bar code {
    color: #d8ffe7;
    background: rgba(0, 0, 0, .25);
    padding: 1px 5px;
    border-radius: 4px;
}

/* ---------- tombol "Masuk"/"Daftar" di bawah form (POST, URL tetap bersih) ---------- */
.auth-alt-form {
    margin: 0;
    padding: 0;
}

.auth-alt-form .auth-alt {
    margin-top: 10px;
}

/* Tombol sekunder (Daftar/Masuk) tidak boleh ikut gaya tombol utama. */
.auth-card button.auth-alt,
.auth-card button.auth-alt:hover {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel-2);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.auth-card button.auth-alt:hover {
    border-color: var(--gold);
    color: var(--gold-soft);
    background: #202a3f;
}

/* ==========================================================================
   Profil akun (strip di dashboard + halaman profile.php)
   Avatar memakai pola .avatar.ph yang sama dengan avatar pemain, hanya
   ukurannya beda dan warnanya diturunkan dari nama pengguna.
   ========================================================================== */

a.navlink {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background .12s, color .12s, border-color .12s;
}

a.navlink:hover {
    background: var(--panel-2);
    border-color: var(--gold);
    color: var(--gold-soft);
}

/* Strip ringkas tepat di bawah topbar pada dashboard. */
.profile-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel), var(--bg-soft));
    text-decoration: none;
    color: inherit;
    transition: border-color .12s, transform .12s;
}

.profile-strip:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}

.profile-strip-id {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.profile-strip-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-strip-sub {
    font-size: 11.5px;
    color: var(--text-faint);
}

.profile-strip-go {
    margin-left: auto;
    font-size: 22px;
    line-height: 1;
    color: var(--text-faint);
}

.profile-strip:hover .profile-strip-go {
    color: var(--gold);
}

/* Ukuran avatar akun. */
.avatar.avatar-md {
    width: 40px;
    height: 40px;
    font-size: 15px;
}

.avatar.avatar-xl {
    width: 64px;
    height: 64px;
    font-size: 24px;
    border-width: 2px;
    border-color: rgba(240, 180, 41, .35);
}

/* Kartu profil di halaman profile.php.
   Susunan: baris atas (avatar + username + saldo | Top Up),
   garis pemisah, lalu baris indikator (pill) di bawah. */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px 20px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        radial-gradient(600px 160px at 0% 0%, rgba(240, 180, 41, .10), transparent 70%),
        linear-gradient(180deg, var(--panel), var(--bg-soft));
    box-shadow: var(--shadow);
}

/* Baris atas: avatar + identitas di kiri, tombol Top Up menempel di kanan. */
.profile-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.profile-id {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.profile-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .2px;
    color: var(--text);
    overflow-wrap: anywhere;
}

/* Baris indikator: dipindah ke bawah, dipisahkan garis border dari profil. */
.profile-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--border);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel-2);
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: .2px;
}

.pill-ok {
    border-color: #1f6f3d;
    background: #12351f;
    color: #6ee7a8;
}

.pill-off {
    border-color: #6b2b30;
    background: #2a1a1d;
    color: #ffb3ad;
}

/* Grid informasi akun. */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.profile-item {
    padding: 12px 14px;
    background: var(--panel);
}

.profile-item .k {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-faint);
    margin-bottom: 3px;
}

.profile-item .v {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    overflow-wrap: anywhere;
}

.profile-note {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: 10px;
    background: var(--panel-2);
    color: var(--text-dim);
    font-size: 12.5px;
    line-height: 1.55;
}

.profile-note strong {
    color: var(--gold-soft);
}

@media (max-width: 640px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-card {
        padding: 16px;
    }

    .profile-name {
        font-size: 17px;
    }
}

/* ==========================================================================
   Menu utama (di bawah strip profil)
   ========================================================================== */
.mainnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.navitem {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: .15s;
}

.navitem:hover {
    color: var(--text);
    background: var(--panel-2);
    border-color: var(--border);
}

.navitem.is-active {
    color: #1a1205;
    background: linear-gradient(180deg, var(--gold-soft), var(--gold));
    border-color: var(--gold);
}

.navitem.is-locked {
    color: var(--text-faint);
}

.navitem.is-locked::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 2px;
    border: 1.5px solid currentColor;
    border-top-width: 3px;
    opacity: .8;
}

.navitem-label {
    line-height: 1;
}

.navbadge {
    min-width: 17px;
    padding: 1px 5px;
    border-radius: 20px;
    background: var(--red);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
}

.navbadge-lock {
    background: rgba(240, 180, 41, .16);
    color: var(--gold-soft);
    border: 1px solid rgba(240, 180, 41, .35);
    font-weight: 600;
}

.navitem.is-active .navbadge {
    background: rgba(0, 0, 0, .22);
    color: #fff;
    border-color: transparent;
}

/* ==========================================================================
   Pil peran & pengumuman
   ========================================================================== */
.pill-admin {
    background: rgba(167, 139, 250, .14);
    border-color: rgba(167, 139, 250, .4);
    color: #cdbcfd;
}

.announce {
    margin-bottom: 18px;
    padding: 12px 15px;
    border: 1px solid rgba(96, 165, 250, .35);
    border-left: 3px solid var(--blue);
    border-radius: 10px;
    background: rgba(96, 165, 250, .09);
    color: #cfe2ff;
    font-size: 12.5px;
    line-height: 1.6;
}

.welcome-bar.is-warn {
    border-color: #6b4a12;
    border-left-color: var(--gold);
    background: #241a08;
    color: #f6d68b;
}

.muted {
    color: var(--text-faint);
    font-size: 12px;
}

.empty-note {
    padding: 14px 16px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: var(--panel-2);
    color: var(--text-dim);
    font-size: 12.5px;
    line-height: 1.65;
}

.empty-note a {
    color: var(--gold-soft);
}

.panel-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

/* ==========================================================================
   Ringkasan paket (mini) di dashboard
   ========================================================================== */
.pkg-mini-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.pkg-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-2);
}

.pkg-mini-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.pkg-mini-sub {
    font-size: 11.5px;
    color: var(--text-dim);
}

.pkg-mini .pill {
    align-self: flex-start;
    margin-top: 4px;
}

/* ==========================================================================
   Halaman Daftar Paket
   ========================================================================== */
.pkg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.pkg-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    overflow: hidden;
    transition: .18s;
}

.pkg-card:hover {
    border-color: rgba(240, 180, 41, .45);
    transform: translateY(-2px);
}

.pkg-card.is-owned {
    border-color: rgba(52, 211, 153, .45);
    box-shadow: 0 0 0 1px rgba(52, 211, 153, .12) inset;
}

.pkg-head {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, .16);
}

.pkg-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--gold-soft);
}

.pkg-price {
    margin-top: 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.4px;
}

.pkg-days {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--text-faint);
}

.pkg-features {
    flex: 1;
    margin: 0;
    padding: 14px 16px 14px 30px;
    list-style: none;
}

.pkg-features li {
    position: relative;
    margin-bottom: 7px;
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.5;
}

.pkg-features li::before {
    content: "\2713";
    position: absolute;
    left: -16px;
    color: var(--green);
    font-size: 11px;
}

.pkg-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
}

.pkg-form {
    margin: 0;
}

.pkg-note {
    font-size: 11.5px;
    color: var(--text-faint);
}

.pkg-note.is-bad {
    color: var(--red);
}

/* ==========================================================================
   Panel admin — tabel & formulir
   ========================================================================== */
.admin-cards {
    margin-bottom: 18px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.admin-table th {
    padding: 10px 12px;
    background: var(--panel-2);
    border-bottom: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(38, 49, 73, .6);
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, .015);
}

.ta-r { text-align: right; }
.nowrap { white-space: nowrap; }
.mt6 { margin-top: 6px; }

.u-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.u-cell .pill {
    margin-left: 4px;
}

.avatar.avatar-sm {
    width: 30px;
    height: 30px;
    font-size: 12px;
    border-width: 1px;
    flex: 0 0 auto;
}

.u-form {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.u-form-save {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.inp {
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    font: inherit;
    font-size: 12.5px;
    padding: 7px 9px;
    border-radius: 8px;
    outline: none;
    transition: .15s;
}

.inp:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(240, 180, 41, .14);
}

.inp:disabled {
    opacity: .55;
}

.inp-pass {
    width: 128px;
}

.btn.sm {
    padding: 6px 10px;
    font-size: 11.5px;
}

.btn.danger {
    color: #ffb4b4;
}

.inline-form {
    display: inline-flex;
    gap: 6px;
    margin: 0;
}

.pkg-checks {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chk {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-soft);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-faint);
    cursor: pointer;
    user-select: none;
}

.chk input {
    accent-color: var(--gold);
}

.chk.is-on {
    border-color: rgba(52, 211, 153, .5);
    color: var(--green);
    background: rgba(52, 211, 153, .08);
}

.chk-line {
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dim);
    align-self: flex-end;
}

.pkg-exp {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-faint);
    line-height: 1.5;
}

.admin-form .form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.admin-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 11.5px;
    color: var(--text-faint);
}

/* Kotak centang di dalam form admin tetap satu baris (kotak + teks). */
.admin-form label.chk {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dim);
}

.admin-form .form-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 14px;
    font-size: 11.5px;
    color: var(--text-faint);
}

.admin-form textarea.inp {
    resize: vertical;
    min-height: 66px;
    line-height: 1.55;
}

@media (max-width: 640px) {
    .mainnav {
        gap: 6px;
    }

    .navitem {
        padding: 8px 11px;
        font-size: 12px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px;
    }

    .inp-pass {
        width: 100%;
    }
}

/* Perbaikan tata letak panel admin */
.admin-table {
    min-width: 720px;
}

.chk {
    white-space: nowrap;
}

.pkg-checks {
    gap: 4px;
}

.pkg-checks .chk {
    padding: 3px 7px;
}

/* Tombol utama di dalam panel (mis. "Buka Live JP") */
.panel-cta .btn {
    border-color: rgba(240, 180, 41, .45);
    background: rgba(240, 180, 41, .12);
    color: var(--gold-soft);
    font-weight: 600;
}

.panel-cta .btn:hover {
    background: rgba(240, 180, 41, .2);
    border-color: var(--gold);
    color: #fff2cc;
}

/* ==========================================================================
   Jarak antar panel & padding konten panel
   --------------------------------------------------------------------------
   Sebelumnya beberapa kartu/panel saling menempel karena tidak punya margin
   bawah atau padding dalam. Aturan di bawah membuat setiap panel selalu punya
   ruang napas, baik di dashboard, halaman paket, maupun panel admin.
   ========================================================================== */
.panel {
    margin-bottom: 18px;
}

.panel:last-of-type {
    margin-bottom: 0;
}

/* Konten langsung di dalam panel diberi jarak dari tepi panel. */
.panel > .empty-note,
.panel > .profile-grid,
.panel > .profile-note {
    margin: 16px;
}

.panel > .pkg-grid,
.panel > .pkg-mini-list {
    padding: 16px;
}

.panel > .admin-form {
    padding: 16px 20px;
}

.panel > .table-wrap {
    width: auto;
    margin: 14px 16px;
}

.panel > .panel-cta {
    margin-top: 0;
    padding: 0 16px 16px;
}

/* Sisa waktu paket */
.pkg-mini-remain {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--green);
}

.pkg-remain {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border: 1px solid rgba(52, 211, 153, .32);
    border-radius: 999px;
    background: rgba(52, 211, 153, .1);
    color: var(--green);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* ==========================================================================
   Panel admin — pengaturan paket
   ========================================================================== */
.pkg-admin-intro {
    margin: 16px 16px 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: 10px;
    background: var(--panel-2);
    color: var(--text-dim);
    font-size: 12.5px;
    line-height: 1.6;
}

.pkg-admin-intro strong {
    color: var(--gold-soft);
}

.pkg-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    padding: 16px;
}

.pkg-admin-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.pkg-admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pkg-admin-id {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gold-soft);
}

.pkg-admin-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pkg-admin-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 11.5px;
    color: var(--text-faint);
}

.pkg-admin-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pkg-admin-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.pkg-admin-foot .chk-line {
    align-self: center;
    padding: 6px 10px;
}

.pkg-admin-delete {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.pkg-admin-add {
    margin: 0 16px 16px;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: rgba(0, 0, 0, .12);
}

.pkg-admin-add-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.pkg-admin-add-head h3 {
    font-size: 13.5px;
    font-weight: 700;
}

@media (max-width: 640px) {
    .pkg-admin-row {
        grid-template-columns: 1fr;
    }

    .panel > .admin-form {
        padding: 14px;
    }

    .panel > .table-wrap {
        margin: 12px;
    }
}

/* Panel admin memakai ukuran .wrap yang sama dengan halaman user. */
.admin-body .wrap {
    max-width: var(--wrap);
}

.admin-body .admin-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 860px) {
    .admin-body .admin-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.inp-readonly {
    opacity: .7;
    cursor: not-allowed;
}

/* ==========================================================================
   Login: placeholder, ikon mata (show/hide password)
   ========================================================================== */
.auth-card input::placeholder {
    color: #6b7a96;
    opacity: 1;
}

.field {
    position: relative;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="number"] {
    padding-right: 44px;
}

.pass-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-faint);
    cursor: pointer;
    transition: color .12s, background .12s;
}

.pass-toggle:hover {
    color: var(--gold-soft);
    background: rgba(240, 180, 41, .10);
}

.pass-toggle:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

.pass-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ==========================================================================
   Saldo & tombol Top Up pada kartu profil
   ========================================================================== */
.profile-balance {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-faint);
}

.profile-balance .bal-amount {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--gold-soft);
    font-variant-numeric: tabular-nums;
}

.profile-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.btn-topup {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border: 1px solid rgba(240, 180, 41, .55);
    border-radius: 10px;
    background: linear-gradient(145deg, #f7d070, #e0a51a);
    color: #1a1206;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(240, 180, 41, .18);
    transition: filter .12s, transform .12s;
}

.btn-topup:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.btn-topup svg {
    width: 15px;
    height: 15px;
}

@media (max-width: 560px) {
    .profile-main {
        flex-wrap: wrap;
    }

    .profile-actions {
        margin-left: 0;
        width: 100%;
    }

    .btn-topup {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Halaman Top Up QRIS
   ========================================================================== */
.balance-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 20px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        radial-gradient(520px 160px at 0% 0%, rgba(240, 180, 41, .12), transparent 70%),
        linear-gradient(180deg, var(--panel), var(--bg-soft));
    box-shadow: var(--shadow);
}

.balance-hero .bh-label {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-faint);
    font-weight: 700;
}

.balance-hero .bh-value {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.6px;
    color: var(--gold-soft);
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
}

.balance-hero .bh-sub {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

.topup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

@media (max-width: 700px) {
    .topup-grid {
        grid-template-columns: 1fr;
    }
}

.topup-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.topup-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.topup-card .tc-sub {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 14px;
}

.amount-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.amount-preset {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-soft);
    color: var(--text-dim);
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: .12s;
}

.amount-preset:hover,
.amount-preset.is-on {
    border-color: var(--gold);
    color: var(--gold-soft);
    background: rgba(240, 180, 41, .10);
}

.topup-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.topup-form .amount-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-soft);
    padding: 0 12px;
    transition: border-color .12s, box-shadow .12s;
}

.topup-form .amount-wrap:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(240, 180, 41, .12);
}

.topup-form .amount-wrap .rp {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-faint);
}

.topup-form input[type="number"] {
    flex: 1;
    min-width: 0;
    padding: 12px 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    outline: none;
    -moz-appearance: textfield;
}

.topup-form input[type="number"]::-webkit-outer-spin-button,
.topup-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.topup-form .topup-hint {
    margin-top: 8px;
    font-size: 11.5px;
    color: var(--text-faint);
    line-height: 1.55;
}

.topup-form button[type="submit"] {
    width: 100%;
    margin-top: 14px;
    padding: 12px 14px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(145deg, #f7d070, #e0a51a);
    color: #1a1206;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: filter .12s;
}

.topup-form button[type="submit"]:hover { filter: brightness(1.06); }

.qris-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.qris-frame {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1 / 1;
    padding: 14px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}

.qris-frame canvas,
.qris-frame img,
.qris-frame svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.qris-frame.is-empty {
    background: var(--bg-soft);
    border: 1px dashed var(--border);
    box-shadow: none;
    color: var(--text-faint);
    font-size: 12.5px;
    padding: 20px;
}

.qris-amount {
    font-size: 22px;
    font-weight: 800;
    color: var(--gold-soft);
    font-variant-numeric: tabular-nums;
}

.qris-inv {
    font-size: 11.5px;
    color: var(--text-faint);
    word-break: break-all;
}

.qris-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--text-dim);
    background: var(--panel-2);
}

.qris-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    border: 1px solid transparent;
}

.qris-status.pending {
    color: var(--gold-soft);
    background: rgba(240, 180, 41, .12);
    border-color: rgba(240, 180, 41, .35);
}

.qris-status.paid {
    color: #6ee7a8;
    background: rgba(52, 211, 153, .12);
    border-color: rgba(52, 211, 153, .35);
}

.qris-status.expired,
.qris-status.canceled {
    color: var(--text-faint);
    background: rgba(147, 161, 189, .1);
    border-color: rgba(147, 161, 189, .25);
}

.topup-history {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.topup-history th {
    text-align: left;
    padding: 9px 12px;
    font-size: 10.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-faint);
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, .16);
    white-space: nowrap;
}

.topup-history td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(38, 49, 73, .55);
    vertical-align: middle;
}

.topup-history tr:last-child td { border-bottom: 0; }

.topup-history .amt { font-weight: 700; color: var(--gold-soft); white-space: nowrap; }
.topup-history .amt.in { color: #6ee7a8; }
.topup-history .amt.out { color: #ffb3ad; }

.balance-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border: 1px solid rgba(240, 180, 41, .4);
    border-radius: 999px;
    background: rgba(240, 180, 41, .10);
    color: var(--gold-soft);
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Tombol beli pakai saldo */
.btn.buy {
    border-color: rgba(52, 211, 153, .5);
    background: rgba(52, 211, 153, .12);
    color: #6ee7a8;
    font-weight: 700;
}

.btn.buy:hover {
    background: rgba(52, 211, 153, .2);
    border-color: var(--green);
    color: #b6f7d4;
}

.btn.buy:disabled,
.btn.buy[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
}

.pkg-foot .btn-topup {
    padding: 8px 12px;
    font-size: 12px;
}

/* Ikon mata: tampil/sembunyi bergantian */
.pass-toggle .icon-eye-off { display: none; }
.pass-toggle.is-visible .icon-eye { display: none; }
.pass-toggle.is-visible .icon-eye-off { display: block; }

/* --- Setup QRIS di panel admin ------------------------------------------- */
.qris-setup {
    margin: 4px 0 14px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--panel-2);
}
.qris-setup.is-live {
    border-color: rgba(52, 211, 153, .45);
    background: linear-gradient(180deg, rgba(52, 211, 153, .08), rgba(52, 211, 153, .02));
}
.qris-setup.is-demo {
    border-color: rgba(244, 166, 42, .40);
    background: linear-gradient(180deg, rgba(244, 166, 42, .07), rgba(244, 166, 42, .02));
}
.qs-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.qs-badge {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .09em;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}
.qris-setup.is-live .qs-badge {
    color: #0b2e22;
    background: var(--green);
}
.qris-setup.is-demo .qs-badge {
    color: #3a2600;
    background: var(--gold);
}
.qs-sub {
    font-size: 12.5px;
    color: var(--text-dim);
}
.qs-sub strong { color: var(--text); font-weight: 600; }
.qs-help {
    margin: 8px 0 0;
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--text-faint);
}
.qs-help code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .07);
    color: var(--gold-soft);
}
.inp.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px;
    line-height: 1.6;
    word-break: break-all;
    resize: vertical;
}

/* --- Peringatan mode contoh di halaman top up ---------------------------- */
.qris-warn {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(244, 166, 42, .38);
    background: rgba(244, 166, 42, .07);
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-dim);
}
.qris-warn svg { flex: 0 0 auto; margin-top: 1px; color: var(--gold); }
.qris-warn strong { color: var(--gold-soft); }
.qris-warn a { color: var(--gold-soft); text-decoration: underline; }
.qris-payee {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--text-faint);
    text-align: center;
}
.qris-payee strong { color: var(--text-dim); font-weight: 600; }

/* ==========================================================================
   Sub-judul di dalam panel pengaturan admin
   ========================================================================== */
.sub-h {
    margin: 22px 0 10px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--gold-soft);
}

.sub-h:first-of-type {
    margin-top: 14px;
}

/* Navigasi cepat antar panel pengaturan di menu admin. */
.set-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.set-jump a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel-2);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .12s, color .12s, background .12s;
}

.set-jump a:hover {
    border-color: rgba(240, 180, 41, .5);
    background: rgba(240, 180, 41, .08);
    color: var(--gold-soft);
}

/* ==========================================================================
   Popup konfirmasi pembelian paket (packages.php)
   ========================================================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 14, .74);
    backdrop-filter: blur(3px);
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 22px 22px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, var(--panel), var(--bg-soft));
    box-shadow: 0 26px 70px rgba(0, 0, 0, .6);
    animation: modal-in .16s ease-out;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.modal-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .2px;
    color: var(--text);
}

.modal-facts {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--panel-2);
    font-size: 12.5px;
}

.modal-facts > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
}

.modal-facts > div + div {
    border-top: 1px solid rgba(38, 49, 73, .55);
}

.modal-facts dt {
    color: var(--text-faint);
    font-size: 11.5px;
    letter-spacing: .2px;
}

.modal-facts dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.modal-facts dd.is-gold {
    color: var(--gold-soft);
    font-weight: 800;
}

.modal-warn {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(240, 180, 41, .42);
    border-radius: 11px;
    background: rgba(240, 180, 41, .09);
    color: var(--gold-soft);
}

.modal-warn svg {
    flex: 0 0 auto;
    margin-top: 2px;
}

.modal-warn p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-dim);
}

.modal-warn strong {
    display: block;
    margin-bottom: 4px;
    color: var(--gold-soft);
    font-weight: 800;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.modal-actions .btn {
    min-width: 92px;
    justify-content: center;
}

html.modal-open,
html.modal-open body {
    overflow: hidden;
}

@media (max-width: 480px) {
    .modal-card {
        padding: 18px 16px 14px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Kelola pengguna: daftar paket, pembatalan + refund, saldo manual
   ========================================================================== */
.u-pkg-cell {
    min-width: 210px;
}

.pkg-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.pkg-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px 6px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel-2);
}

.pkg-chip-main {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    font-size: 11.5px;
    line-height: 1.35;
}

.pkg-chip-main strong {
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pkg-chip-act {
    flex: 0 0 auto;
    margin: 0;
}

.u-bal-cell {
    min-width: 150px;
}

/* Disclosure kecil untuk aksi tambahan, supaya tabel tidak penuh. */
.u-more {
    margin-top: 7px;
}

.u-more > summary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border: 1px dashed var(--border);
    border-radius: 999px;
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    transition: color .12s, border-color .12s;
}

.u-more > summary::-webkit-details-marker {
    display: none;
}

.u-more > summary:hover,
.u-more[open] > summary {
    border-color: rgba(240, 180, 41, .5);
    color: var(--gold-soft);
}

.u-more-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.u-more-form.is-col {
    flex-direction: column;
    flex-wrap: nowrap;
}

.u-more-form .inp {
    min-width: 0;
    flex: 1 1 100px;
    font-size: 12px;
    padding: 6px 9px;
}

.u-more-actions {
    display: flex;
    gap: 6px;
}

.u-more-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
}

.u-more-note {
    margin: 6px 0 0;
    color: var(--text-faint);
    font-size: 10.5px;
    line-height: 1.4;
}

/* ---------------------------------------------------------------------------
   Label sumber akun pemain (Live JP): Facebook vs Pengunjung.
   Ditempel langsung di samping nama pemain, sekecil mungkin supaya tidak
   menggeser kolom Game / Nilai koin.
   --------------------------------------------------------------------------- */
.src {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2px;
    line-height: 1.55;
    vertical-align: 1px;
    white-space: nowrap;
}

/* Facebook: biru khas, cukup redup agar tidak menyaingi badge JP. */
.src-fb {
    color: #9ec5ff;
    background: rgba(59, 130, 246, .14);
    border-color: rgba(59, 130, 246, .38);
}

/* Pengunjung: netral, sengaja lebih tenang dari label Facebook. */
.src-guest {
    color: var(--text-dim);
    background: rgba(147, 161, 189, .1);
    border-color: rgba(147, 161, 189, .26);
}

@media (max-width: 560px) {
    .src {
        margin-left: 4px;
        font-size: 9.5px;
        padding: 1px 6px;
    }
}

/* Keterangan arti label sumber akun di bawah tabel Live JP. */
.src-legend {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    font-size: 11.5px;
    color: var(--text-faint);
    line-height: 1.9;
}

.src-legend .src {
    margin-left: 0;
    margin-right: 4px;
}
