:root {
    /* Brand Bill.inc: navy #0B1F44, biru #3B82F6, light gray #E8EEF6, text gray #64748B, font Poppins */
    --brand-navy: #0b1f44;
    --brand-blue: #3b82f6;
    --ink: #0b1f44;
    --navy: #0b1f44;
    --accent: #0e9f6e;
    --muted: #64748b;
    --line: #e8eef6;
    --bg: #f3f6fb;
    --card-shadow: 0 1px 2px rgba(11, 31, 68, .04), 0 6px 20px rgba(11, 31, 68, .05);
    --radius: 14px;
    --chart-line: #3b82f6;
    --bs-body-font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-font-size: .925rem;
    /* Nilai default; ditimpa oleh tema dari Pengaturan (partials/head_assets.php) */
    --primary: #2563eb;
    --primary-rgb: 37, 99, 235;
    --primary-hover: #1f54c8;
    --primary-fg: #fff;
    --primary-soft: #e4ecfd;
    --primary-tint: #8eb0f4;
    --sidebar-fg: #fff;
    --sidebar-fg-rgb: 255, 255, 255;
    --sidebar-accent: #8eb0f4;
    --doc-accent: #0b1f44;
}
:root, [data-bs-theme] {
    --bs-primary: var(--primary);
    --bs-primary-rgb: var(--primary-rgb);
    --bs-link-color: var(--primary);
    --bs-link-color-rgb: var(--primary-rgb);
    --bs-link-hover-color: var(--primary-hover);
    --bs-link-hover-color-rgb: var(--primary-rgb);
}
[data-bs-theme=dark] {
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --line: #273449;
    --bg: #0b1220;
    --chart-line: #4f8ef7;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --bs-body-bg: #111a2c;
    --bs-body-color: #e2e8f0;
    --bs-tertiary-bg: #16213a;
    --bs-border-color: #273449;
    --bs-link-color: var(--primary-tint);
    --bs-link-hover-color: var(--primary-soft);
}
/* Dokumen invoice selalu seperti kertas putih, juga di mode gelap */
.invoice-doc { --ink: #0f172a; --muted: #64748b; --line: #e5e9f0; color: #0f172a; }
body { background: var(--bg); color: var(--ink); }
.btn-primary { --bs-btn-color: var(--primary-fg); --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary);
    --bs-btn-hover-color: var(--primary-fg); --bs-btn-hover-bg: var(--primary-hover); --bs-btn-hover-border-color: var(--primary-hover);
    --bs-btn-active-color: var(--primary-fg); --bs-btn-active-bg: var(--primary-hover); --bs-btn-active-border-color: var(--primary-hover);
    --bs-btn-disabled-bg: var(--primary); --bs-btn-disabled-border-color: var(--primary); }
.btn-outline-primary { --bs-btn-color: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-color: var(--primary-fg);
    --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); --bs-btn-active-color: var(--primary-fg);
    --bs-btn-active-bg: var(--primary); --bs-btn-active-border-color: var(--primary); }
[data-bs-theme=dark] .btn-outline-primary { --bs-btn-color: var(--primary-tint); --bs-btn-border-color: var(--primary-tint); }
.text-bg-primary { color: var(--primary-fg) !important; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--primary-tint); box-shadow: 0 0 0 .25rem rgba(var(--primary-rgb), .2); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.nav-tabs .nav-link.active { border-top: 2px solid var(--primary); }
.btn-success { --bs-btn-bg: #16a34a; --bs-btn-border-color: #16a34a; }
.btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn-wa:hover { background: #1ebe5a; border-color: #1ebe5a; color: #fff; }

/* ---------- Admin shell ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--navy); color: var(--sidebar-fg); z-index: 1030; }
.sidebar .brand { display: flex; align-items: center; gap: .65rem; padding: 1.4rem 1.4rem 1.2rem; color: var(--sidebar-fg); text-decoration: none;
    font-weight: 600; font-size: 1.05rem; min-width: 0; }
.brand-logo { height: 36px; max-width: 72px; object-fit: contain; background: #fff; border-radius: 9px; padding: 2px; flex-shrink: 0; }
.brand-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0;
    background: rgba(var(--sidebar-fg-rgb), .1); color: var(--sidebar-accent); font-size: 1.1rem; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* "Didukung oleh bill.inc" di bawah sidebar */
.sidebar-powered { margin-top: auto; padding: 1rem 1.4rem 1.25rem; display: flex; flex-direction: column; gap: .35rem;
    font-size: .7rem; color: rgba(var(--sidebar-fg-rgb), .5); border-top: 1px solid rgba(var(--sidebar-fg-rgb), .08); }
.sidebar-powered .billinc-logo { color: rgba(var(--sidebar-fg-rgb), .85); }
.sidebar .btn-close { filter: none; }
.sidebar-dark .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.sidebar .nav { padding: .25rem .85rem; gap: .2rem; }
.sidebar .nav-link { display: flex; align-items: center; gap: .75rem; color: rgba(var(--sidebar-fg-rgb), .72); padding: .65rem .9rem;
    border-radius: 10px; font-weight: 500; font-size: .9rem; transition: background .15s, color .15s; }
.sidebar .nav-link i { font-size: 1.05rem; }
.sidebar .nav-link:hover { color: var(--sidebar-fg); background: rgba(var(--sidebar-fg-rgb), .07); }
.sidebar .nav-link.active { color: var(--primary-fg); background: var(--primary); font-weight: 600;
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), .35); }
.sidebar .nav-link .badge { font-size: .7rem; }
.sidebar .nav-link.active .badge { background: rgba(255,255,255,.25) !important; color: #fff !important; }
/* Menu HP (offcanvas) memakai class .sidebar untuk warna, tapi harus di atas backdrop (1040),
   kalau tidak setiap ketukan mengenai backdrop dan menu hanya tertutup. */
.offcanvas.sidebar { z-index: var(--bs-offcanvas-zindex, 1045); width: min(280px, 85vw); }

/* Logo Bill.inc (partials/brand.php): warna teks mengikuti latar (currentColor), titik selalu biru */
.billinc-logo { display: inline-flex; align-items: center; gap: .55rem; color: inherit; }
.billinc-logo img { width: var(--logo-size); height: var(--logo-size); flex-shrink: 0; }
.billinc-wordmark { display: block; font-weight: 700; font-size: calc(var(--logo-size) * .78); letter-spacing: -.02em; line-height: 1; }
.billinc-wordmark .dot { color: var(--brand-blue); }
.billinc-tagline { display: block; font-size: calc(var(--logo-size) * .22); letter-spacing: .3em; text-transform: uppercase; opacity: .65; margin-top: .35rem; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; justify-content: space-between; align-items: center; gap: .5rem;
    background: var(--bs-body-bg); color: var(--ink); padding: .55rem .9rem; box-shadow: 0 1px 0 var(--line); }
.app-topbar { align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.topbar-search { position: relative; flex: 0 1 360px; }
.topbar-search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.topbar-search input { width: 100%; border: 0; border-radius: 999px; padding: .55rem 1rem .55rem 2.4rem; background: var(--bs-body-bg);
    box-shadow: var(--card-shadow); color: var(--ink); font-size: .875rem; }
.topbar-search input:focus { outline: 2px solid rgba(var(--primary-rgb), .35); }
.btn-icon { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; border: 0; padding: 0;
    background: var(--bs-body-bg); color: var(--ink); box-shadow: var(--card-shadow); font-size: 1.1rem; }
.btn-icon:hover { color: var(--primary); }
.notif-dot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
    background: #ef4444; color: #fff; font-size: .65rem; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--bg); }
.account-btn { display: flex; align-items: center; gap: .6rem; border: 0; background: var(--bs-body-bg); color: var(--ink);
    border-radius: 999px; padding: .3rem .9rem .3rem .3rem; box-shadow: var(--card-shadow); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; border: 0;
    background: var(--brand-navy); color: #fff; font-weight: 600; font-size: .8rem; }
[data-bs-theme=dark] .avatar { background: var(--primary); }

.content { padding: 1.25rem; }
@media (min-width: 992px) { .content { margin-left: 248px; padding: 1.5rem 2.25rem 2.5rem; } }
@media (max-width: 575.98px) { .content { padding: 1rem; } }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.4rem; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.card { border: 0; border-radius: var(--radius); box-shadow: var(--card-shadow); }
.card-header { background: var(--bs-body-bg); border-bottom: 1px solid var(--line); font-weight: 600; padding: .95rem 1.25rem;
    border-radius: var(--radius) var(--radius) 0 0 !important; }
.card-body { padding: 1.15rem 1.25rem; }
.btn { border-radius: 10px; font-weight: 500; }
.btn-sm { border-radius: 8px; }
.form-control, .form-select { border-radius: 10px; border-color: #dbe3ef; }
.form-control-sm, .form-select-sm { border-radius: 8px; }
.alert { border: 0; border-radius: 12px; }
.dropdown-menu { border: 0; border-radius: 12px; padding: .4rem; }
.dropdown-item { border-radius: 8px; padding: .45rem .75rem; font-size: .875rem; }
.table > :not(caption) > * > * { padding: .8rem .9rem; border-color: var(--line); }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600;
    background: transparent; border-bottom-width: 1px; }
.list-group-item { border-color: var(--line); }
.stat { padding: 1.15rem 1.25rem; }
.stat .label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.stat .value { font-size: 1.4rem; font-weight: 600; margin-top: .3rem; letter-spacing: -.01em; }
.stat .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; }
.stat .trend { font-size: .78rem; margin-top: .35rem; color: var(--muted); }
.trend-up { color: #15803d; font-weight: 600; }
.trend-down { color: #b91c1c; font-weight: 600; }
.form-label { font-weight: 500; font-size: .875rem; }
.filter-pills .btn { border-radius: 999px; }
.proof-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: .5rem; border: 1px solid var(--line); }

/* Label status lembut (Lunas, Belum Dibayar, dll.) */
.badge { font-weight: 600; letter-spacing: .01em; padding: .38em .75em; }
.badge.text-bg-success { background: #dcfce7 !important; color: #15803d !important; }
.badge.text-bg-warning { background: #fef3c7 !important; color: #a16207 !important; }
.badge.text-bg-danger { background: #fee2e2 !important; color: #b91c1c !important; }
.badge.text-bg-primary { background: var(--primary-soft) !important; color: var(--primary) !important; }
.badge.text-bg-info { background: #e0f2fe !important; color: #0369a1 !important; }
.badge.text-bg-secondary { background: #eef2f7 !important; color: #475569 !important; }
[data-bs-theme=dark] .badge.text-bg-success { background: rgba(34,197,94,.15) !important; color: #86efac !important; }
[data-bs-theme=dark] .badge.text-bg-warning { background: rgba(234,179,8,.15) !important; color: #fde68a !important; }
[data-bs-theme=dark] .badge.text-bg-danger { background: rgba(239,68,68,.15) !important; color: #fca5a5 !important; }
[data-bs-theme=dark] .badge.text-bg-primary { background: rgba(var(--primary-rgb),.2) !important; color: var(--primary-tint) !important; }
[data-bs-theme=dark] .badge.text-bg-info { background: rgba(14,165,233,.15) !important; color: #7dd3fc !important; }
[data-bs-theme=dark] .badge.text-bg-secondary { background: rgba(148,163,184,.15) !important; color: #cbd5e1 !important; }

/* ---------- Dashboard ---------- */
.greeting h1 { font-size: 1.55rem; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.greeting p { color: var(--muted); margin: .2rem 0 0; }
.chart-wrap { position: relative; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-wrap .grid line { stroke: var(--line); stroke-width: 1; }
.chart-wrap .axis text { fill: var(--muted); font-size: 11px; font-family: var(--bs-body-font-family); }
.chart-wrap .series-line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-wrap .series-area { fill: var(--chart-line); opacity: .1; }
.chart-wrap .pt { fill: var(--chart-line); stroke: var(--bs-body-bg); stroke-width: 2; }
.chart-wrap .hit { fill: transparent; cursor: pointer; }
.chart-wrap .crosshair { stroke: var(--muted); stroke-width: 1; opacity: 0; }
.chart-wrap .hit:hover + .crosshair, .chart-wrap .hit:focus + .crosshair { opacity: .4; }
.chart-tip { position: absolute; pointer-events: none; background: var(--brand-navy); color: #fff; padding: .45rem .65rem; border-radius: 8px;
    font-size: .78rem; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .1s; }
.chart-tip.show { opacity: 1; }
.chart-tip strong { display: block; font-size: .85rem; }

/* ---------- Login ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--bg); }
@media (min-width: 992px) { .auth-page { grid-template-columns: 1.05fr 1fr; } }
.auth-hero { display: none; position: relative; overflow: hidden; color: #fff; padding: 3rem;
    background: radial-gradient(120% 90% at 100% 100%, #1d4ed8 0%, rgba(29,78,216,0) 55%), linear-gradient(160deg, #0b1f44 0%, #0a2a63 100%); }
@media (min-width: 992px) { .auth-hero { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-hero h2 { font-size: 2.1rem; font-weight: 700; line-height: 1.25; margin: 0; letter-spacing: -.02em; }
.auth-hero h2 span { color: #7db3fb; }
.auth-hero .lead { color: rgba(255,255,255,.75); font-size: 1rem; max-width: 30rem; margin-top: 1rem; }
.auth-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 34rem; }
.auth-features div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: .9rem; font-size: .8rem; color: rgba(255,255,255,.75); }
.auth-features i { display: block; font-size: 1.2rem; color: #7db3fb; margin-bottom: .35rem; }
.auth-features strong { display: block; color: #fff; font-weight: 600; font-size: .85rem; }
.auth-form { display: grid; place-items: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .card { padding: 2rem; }

/* ---------- Invoice document ---------- */
.invoice-doc { background: #fff; position: relative; }
/* Cap LUNAS (ikut tertangkap saat invoice disimpan/dikirim sebagai gambar) */
.paid-stamp { position: absolute; top: 50%; left: 50%; z-index: 5; pointer-events: none; text-align: center;
    transform: translate(-50%, -50%) rotate(-16deg); color: rgba(185, 28, 28, .8); border: 6px double rgba(185, 28, 28, .8);
    border-radius: .75rem; padding: .15rem 1.4rem .3rem; line-height: 1; }
.paid-stamp span { display: block; font-size: 3rem; font-weight: 800; letter-spacing: .16em; padding-left: .16em; }
.paid-stamp small { display: block; font-size: .95rem; font-weight: 700; letter-spacing: .12em; margin-top: .2rem; }
/* Posisi: di samping blok "Ditagihkan kepada" */
.doc-billrow { position: relative; }
.doc-billrow .paid-stamp { top: 50%; left: 43%; width: auto; max-width: none; margin-top: 0; padding: .15rem 1.2rem .3rem; white-space: nowrap; }
.doc-billrow .paid-stamp span { font-size: 2.4rem; }
@media (max-width: 575.98px) { .paid-stamp span, .doc-billrow .paid-stamp span { font-size: 1.6rem; } .doc-billrow .paid-stamp small { font-size: .7rem; } .paid-stamp { border-width: 4px; padding: .15rem .8rem .25rem; } .doc-billrow .paid-stamp { top: 20%; left: 80%; padding: .15rem .8rem .25rem; } }
.doc-logo { display: block; max-height: 64px; max-width: 220px; object-fit: contain; margin-bottom: .5rem; }
.logo-preview { width: 72px; height: 72px; flex-shrink: 0; border: 1px dashed #cbd5e1; border-radius: .5rem; display: grid; place-items: center; overflow: hidden; background: #fff; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.theme-swatch { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .4rem .45rem; border: 2px solid var(--line);
    border-radius: .6rem; background: var(--bs-body-bg); color: var(--ink); cursor: pointer; }
.theme-swatch > span { display: block; width: 1.6rem; height: .8rem; }
.theme-swatch > span:first-child { border-radius: .3rem .3rem 0 0; }
.theme-swatch > span:nth-child(2) { border-radius: 0 0 .3rem .3rem; margin-top: -.25rem; }
.theme-swatch small { font-size: .68rem; white-space: nowrap; }
.theme-swatch:hover { border-color: var(--primary-tint); }
.theme-swatch.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(var(--primary-rgb), .2); }
.doc-company { font-size: 1.25rem; font-weight: 700; }
.doc-title { font-size: 1.9rem; font-weight: 700; letter-spacing: .12em; color: var(--doc-accent); line-height: 1; margin-bottom: .35rem; }
.doc-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: .25rem; }
.doc-meta { max-width: 300px; }
.doc-meta td { padding: .2rem 0 !important; }
.doc-meta td:first-child, .doc-totals td:first-child { color: var(--muted); }
.doc-items thead th { background: #f1f5f9; }
.doc-totals { max-width: 340px; }
.doc-totals td { padding: .3rem 0 !important; }
.doc-totals .grand td { border-top: 2px solid var(--ink); padding-top: .6rem !important; font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.stamp { display: inline-block; margin-top: .5rem; padding: .25rem .8rem; border: 2px solid; border-radius: .4rem;
    font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.stamp-success { color: #15803d; border-color: #15803d; }
.stamp-warning { color: #b45309; border-color: #b45309; }
.stamp-danger { color: #b91c1c; border-color: #b91c1c; }
.stamp-primary { color: var(--primary); border-color: var(--primary); }
.stamp-secondary { color: #64748b; border-color: #64748b; }

/* ---------- Public payment page ---------- */
.public-wrap { max-width: 880px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.pay-hero { background: var(--navy); color: var(--sidebar-fg); border-radius: 1rem; padding: 1.5rem; }
.pay-hero .amount { font-size: 2rem; font-weight: 700; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 2.1rem; margin-bottom: .6rem; font-size: .92rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -.05rem; width: 1.5rem; height: 1.5rem; border-radius: 50%;
    background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.dropzone { border: 2px dashed #cbd5e1; border-radius: .8rem; padding: 1.25rem; text-align: center; cursor: pointer; background: var(--bs-tertiary-bg); }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: rgba(var(--primary-rgb), .08); }
.dropzone img { max-height: 180px; max-width: 100%; border-radius: .5rem; }

/* ---------- Print ---------- */
@media print {
    body { background: #fff !important; }
    .no-print { display: none !important; }
    .print-sheet { box-shadow: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
}

/* ---------- Tabel jadi kartu di HP ----------
   <table class="table-stack">: tiap baris jadi kartu, label kolom (data-label, diisi JS di layout) di kiri. */
@media (max-width: 767.98px) {
    .table-stack thead { display: none; }
    .table-stack, .table-stack tbody, .table-stack tr { display: block; width: 100%; }
    .table-stack tr { padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
    .table-stack tbody tr:last-child { border-bottom: 0; }
    .table-stack > :not(caption) > * > * { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
        padding: .2rem 0; border: 0; text-align: right; white-space: normal; background: transparent; box-shadow: none; }
    .table-stack td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-align: left; flex-shrink: 0; }
    .table-stack td[data-label=""]::before { display: none; }
    /* Kolom pertama = judul kartu; kolom aksi tanpa judul = rata kanan */
    .table-stack td:first-child { justify-content: flex-start; text-align: left; font-size: 1rem; padding-bottom: .35rem; }
    .table-stack td:first-child::before { display: none; }
    .table-stack td:not(:first-child)[data-label=""] { justify-content: flex-end; }
    .table-stack td:last-child[data-label=""] { padding-top: .5rem; }
    .table-stack td:first-child { flex-wrap: wrap; column-gap: .6rem; row-gap: 0; }
    .table-stack td[colspan] { justify-content: center; text-align: center; }
    /* Sel berisi beberapa baris (mis. info pengiriman): label di atas, isi rata kiri */
    .table-stack td.stack-block { display: block; text-align: left; }
    .table-stack td.stack-block::before { display: block; margin-bottom: .25rem; }

    /* Item di form invoice: deskripsi penuh, lalu Qty / Satuan / Harga satu baris */
    #itemsTable tr.item-row { display: grid; grid-template-columns: 4.5rem 5rem 1fr 2.25rem; gap: .5rem; align-items: end; }
    #itemsTable tr.item-row > td { display: block; text-align: left; }
    #itemsTable tr.item-row > td::before { display: block; margin-bottom: .2rem; }
    #itemsTable tr.item-row > td:first-child::before { display: block; }
    #itemsTable tr.item-row > td:nth-child(1) { grid-column: 1 / 4; grid-row: 1; padding: 0; font-size: inherit; }
    #itemsTable tr.item-row > td:nth-child(6) { grid-column: 4; grid-row: 1; padding: 0; text-align: right; }
    #itemsTable tr.item-row > td:nth-child(2) { grid-column: 1; grid-row: 2; }
    #itemsTable tr.item-row > td:nth-child(3) { grid-column: 2; grid-row: 2; }
    #itemsTable tr.item-row > td:nth-child(4) { grid-column: 3 / 5; grid-row: 2; }
    #itemsTable tr.item-row > td:nth-child(5) { grid-column: 1 / 5; grid-row: 3; display: flex; justify-content: flex-end; gap: .5rem; text-align: right; }
    #itemsTable tr.item-row > td:nth-child(5)::before { display: inline; margin: 0; }
}

/* Kotak pencarian di kartu filter: selebar layar di HP */
@media (max-width: 767.98px) { .search-form { flex: 1 1 100%; } }
/* Tab (Verifikasi Bayar, Pengiriman): satu baris yang bisa digeser di HP */
@media (max-width: 575.98px) {
    .nav-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .nav-tabs .nav-link { white-space: nowrap; }
}
.min-w-0 { min-width: 0; }
.powered-by { text-align: center; font-size: .78rem; color: var(--muted); margin-top: 1.5rem; }
.powered-by a { color: inherit; text-decoration: none; font-weight: 600; }
.powered-by img { width: 14px; height: 14px; vertical-align: -2px; }
.topbar-brand { display: flex; align-items: center; gap: .5rem; min-width: 0; color: var(--ink); text-decoration: none; font-weight: 600; }
.topbar-brand .brand-logo { height: 30px; max-width: 60px; border: 1px solid var(--line); }
.topbar-brand .brand-icon { width: 30px; height: 30px; background: var(--primary-soft); color: var(--primary); }
