/* ==========================================================
   DFStore — Toko Online. Palet & font senada dengan aplikasi kasir.
   ========================================================== */

:root {
  --bg: #f5f6f1;
  --surface: #ffffff;
  --surface-2: #eef0ea;
  --ink: #16211e;
  --ink-dim: #55645d;
  --ink-faint: #8b978f;
  --border: #dde2d8;
  --accent: #0c6e70;
  --accent-ink: #ffffff;
  --accent-soft: #e2f1ef;
  --success: #2f8f5b;
  --success-soft: #e4f3ea;
  --warning: #b8790f;
  --warning-soft: #fbf0dc;
  --danger: #c0442f;
  --danger-soft: #fbe7e2;
  --shadow: 0 1px 2px rgba(22,33,30,.06), 0 6px 20px rgba(22,33,30,.05);
  --radius: 14px;
}
/* Catatan: token khusus panel admin (palet DFT, gradient sidebar, ombak
   dasar layar) TIDAK ditaruh di :root ini — semuanya di-override lewat
   `body.admin-body { ... }` di bawah, supaya storefront publik (yang
   memakai :root ini) tidak pernah ikut berubah. Lihat blok body.admin-body. */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1613;
    --surface: #16211e;
    --surface-2: #1c2925;
    --ink: #e7efea;
    --ink-dim: #a9b8b0;
    --ink-faint: #74847b;
    --border: #29352f;
    --accent: #3fc0b7;
    --accent-ink: #06211f;
    --accent-soft: #17302d;
    --success: #4cbd85;
    --success-soft: #142e22;
    --warning: #e0a941;
    --warning-soft: #34290f;
    --danger: #e5735c;
    --danger-soft: #331b16;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #0e1613;
  --surface: #16211e;
  --surface-2: #1c2925;
  --ink: #e7efea;
  --ink-dim: #a9b8b0;
  --ink-faint: #74847b;
  --border: #29352f;
  --accent: #3fc0b7;
  --accent-ink: #06211f;
  --accent-soft: #17302d;
  --success: #4cbd85;
  --success-soft: #142e22;
  --warning: #e0a941;
  --warning-soft: #34290f;
  --danger: #e5735c;
  --danger-soft: #331b16;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
/* Panel admin (body.admin-body) 14 Sep 2026: dipindah ke PALET & BAHASA
   DESAIN DFT sungguhan (fasttrack.dfishery.com) — flat, radius kecil,
   sidebar/topbar gradient navy gelap, font sistem. SEMUA lewat override
   custom property discoped ke body.admin-body, BUKAN mengubah :root —
   :root tetap milik storefront publik, tidak boleh ikut berubah. Nilai
   sama persis dengan dfstore-kasir-web/assets/style.css, jaga sinkron. */
body.admin-body {
  --bg: #eef7f6; --surface: #ffffff; --surface-2: #f5faf9;
  --ink: #0b2530; --ink-dim: #35525a; --ink-faint: #5b7b82; --border: #d7e4e2;
  --accent: #067884; --accent-ink: #ffffff; --accent-soft: #eef7f6;
  --success: #1a8a5c; --success-soft: #e3f3ec;
  --warning: #C1962F; --warning-soft: #fbf1de;
  --danger: #B84A3A; --danger-soft: #fbe7e2;
  --shadow: 0 1px 3px rgba(11,37,48,.10); --radius: 8px;
  --accent-2: #d9600a; --accent-2-soft: #fbe0d5;
  --nav-grad: linear-gradient(135deg, #1c3d54, #2a5674);
  --sidebar-grad: linear-gradient(180deg, #2a5674, #1c3d54);
  --wave-back: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='200' viewBox='0 0 1600 200'%3E%3Cpath d='M0 120C200 80 400 160 600 120C800 80 1000 160 1200 120C1400 80 1600 120 1600 120L1600 200L0 200Z' fill='%23067884' fill-opacity='0.06'/%3E%3C/svg%3E");
  --wave-front: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='200' viewBox='0 0 1600 200'%3E%3Cpath d='M0 150C220 190 380 110 600 150C820 190 980 110 1200 150C1420 190 1580 110 1600 150L1600 200L0 200Z' fill='%23d9600a' fill-opacity='0.04'/%3E%3C/svg%3E");
  --page-bg-image: var(--wave-back), var(--wave-front);

  background-color: var(--bg);
  background-image: var(--page-bg-image);
  background-repeat: repeat-x, repeat-x;
  background-position: left bottom, left bottom;
  background-size: 1600px 200px, 1600px 200px;
  background-attachment: fixed;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.tnum { font-variant-numeric: tabular-nums; font-family: "IBM Plex Mono", monospace; }
body.admin-body .tnum { font-family: "SF Mono", "Consolas", "Menlo", monospace; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---- Topbar ---- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-height: 64px; padding: 10px 0; }
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-family: "Manrope", sans-serif; font-size: 18px; flex-shrink: 0; }
.topbar .brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0;
}
/* flex-wrap di sini yang mencegah nav memaksa halaman melebar di layar HP —
   tanpa ini topbar meluber ke kanan dan mendorong SELURUH isi halaman di
   bawahnya jadi mepet ke kiri (dilaporkan pengguna, terukur 220px meluber
   di layar 360px lewat Playwright sebelum diperbaiki). */
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; align-items: center; row-gap: 6px; }
.topbar nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-dim); font-weight: 600; font-size: 14px; white-space: nowrap; }
.topbar nav a:hover, .topbar nav a.active { background: var(--surface-2); color: var(--ink); }
@media (max-width: 480px) {
  .topbar nav a { padding: 7px 9px; font-size: 13px; }
  .cart-btn .cart-label { display: none; }
  .cart-btn { padding: 8px 10px; }
}
.cart-btn {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px;
}
.cart-badge {
  position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ---- Hero ---- */
.hero {
  padding: 56px 0 44px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--accent-soft), var(--bg) 90%);
}
.hero h1 { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 34px; margin: 0 0 10px; letter-spacing: -.01em; }
.hero p { color: var(--ink-dim); font-size: 16px; max-width: 560px; margin: 0 0 22px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--ink); }
.btn-outline:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- Section ---- */
/* padding-top/bottom saja (bukan shorthand "44px 0") — ditulis begini
   supaya TIDAK menimpa padding kiri-kanan .wrap saat dipasang bareng di
   elemen yang sama (class="wrap section", dipakai 12 dari 13 halaman toko
   online). Sebelum ini, .section menang atas .wrap (spesifisitas sama,
   ditulis belakangan) dan menghapus padding sisi jadi 0 — itulah kenapa
   nyaris seluruh halaman ISI toko mepet ke tepi layar HP, cuma beranda yang
   tidak (hero-nya pakai .wrap polos, di luar .section). Dilaporkan
   pengguna, terbukti lewat Playwright: 0px di kiri/kanan, seharusnya 20px. */
.section { padding-top: 44px; padding-bottom: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 22px; margin: 0; }
.section-head .sub { color: var(--ink-faint); font-size: 13px; }

/* ---- Category chips ---- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--ink-dim);
}
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip:hover:not(.active) { background: var(--surface-2); }

/* ---- Product grid ---- */
.grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card-media {
  aspect-ratio: 1/1; background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  font-size: 46px;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
.card-name { font-size: 14px; font-weight: 700; line-height: 1.35; min-height: 38px; }
.card-price { font-weight: 800; font-size: 15px; margin-top: auto; }
.card-stock { font-size: 12px; color: var(--ink-faint); }
.card-stock.out { color: var(--danger); }
.card-foot { padding: 0 14px 14px; }

.pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-warning { background: var(--warning-soft); color: var(--warning); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-muted { background: var(--surface-2); color: var(--ink-faint); }

/* ---- Product detail ---- */
.detail { display: grid; grid-template-columns: 420px 1fr; gap: 36px; }
@media (max-width: 800px) { .detail { grid-template-columns: 1fr; } }
.detail-media {
  aspect-ratio: 1/1; background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 96px; overflow: hidden;
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail h1 { font-family: "Manrope", sans-serif; font-size: 24px; margin: 4px 0 10px; }
.detail .price { font-size: 26px; font-weight: 800; color: var(--accent); margin: 6px 0 14px; }
.detail .desc { color: var(--ink-dim); line-height: 1.7; margin-bottom: 22px; }
.qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.qty-box { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.qty-box button { width: 38px; height: 38px; background: var(--surface-2); border: none; font-size: 18px; cursor: pointer; color: var(--ink); }
.qty-box input { width: 52px; text-align: center; border: none; height: 38px; background: var(--surface); color: var(--ink); font-weight: 700; font-family: inherit; }

/* ---- Cart / table ---- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); font-weight: 700; background: var(--surface-2); }
tr:last-child td { border-bottom: none; }
.row-item { display: flex; align-items: center; gap: 10px; }
.row-item .em { font-size: 22px; width: 36px; height: 36px; border-radius: 8px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 800px) { .cart-layout { grid-template-columns: 1fr; } }
.summary-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: sticky; top: 84px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; color: var(--ink-dim); }
.summary-row.total { font-weight: 800; font-size: 17px; color: var(--ink); border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }

/* ---- Forms ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font-family: inherit; font-size: 14px;
}
.field textarea { resize: vertical; min-height: 80px; }
.field-hint { font-size: 12px; color: var(--ink-faint); margin-top: 5px; }
.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-card { flex: 1; min-width: 140px; border: 1px solid var(--border); border-radius: 10px; padding: 12px; cursor: pointer; }
.radio-card input { width: auto; margin-right: 8px; }
.radio-card.checked { border-color: var(--accent); background: var(--accent-soft); }

/* ---- Empty / alert ---- */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-faint); }
.empty .icon-lg { font-size: 44px; margin-bottom: 12px; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--accent-soft); color: var(--accent); }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--border); padding: 36px 0; margin-top: 40px; color: var(--ink-faint); font-size: 13px; }
footer .cols { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a:hover { color: var(--accent); }

/* ---- Order status timeline ---- */
.timeline { display: flex; gap: 0; }
.tl-step { flex: 1; text-align: center; position: relative; }
.tl-dot { width: 26px; height: 26px; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--border); margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--ink-faint); }
.tl-step.done .tl-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tl-step .tl-line { position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: -1; }
.tl-step.done .tl-line { background: var(--accent); }
.tl-step:first-child .tl-line { display: none; }
.tl-label { font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.tl-step.done .tl-label { color: var(--ink); }

/* ---- Admin ---- */
/* ---- Shell admin — sidebar & topbar gradient navy gelap, PERSIS gaya DFT,
   14 Sep 2026. SALINAN dari dfstore-kasir-web/assets/style.css (nama class
   disamakan sengaja) — jaga sinkron. */
.admin-shell.shell { display: flex; min-height: 100vh; gap: 14px; padding: 14px; align-items: flex-start; }
.admin-shell .sidebar {
  width: 232px; flex-shrink: 0;
  background: var(--sidebar-grad); color: #CBDAD6;
  border-radius: 10px; box-shadow: 2px 0 14px rgba(0,0,0,.15);
  padding: 16px 10px; display: flex; flex-direction: column;
  position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow-y: auto;
}
.admin-shell .brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; }
.admin-shell .brand-mark {
  width: 36px; height: 36px; border-radius: 8px; background: var(--accent-2); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0;
}
.admin-shell .brand-name { font-weight: 700; font-size: 15px; line-height: 1.15; color: #fff; }
.admin-shell .brand-tagline { font-size: 10.5px; color: #9fb8c0; font-weight: 600; }
.admin-shell nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 4px; color: #CBDAD6; font-weight: 600; font-size: 13px; margin-bottom: 1px; border-left: 3px solid transparent; }
.admin-shell nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-shell nav a.active { background: var(--sand, #eef7f6); color: var(--accent); border-left: 3px solid var(--accent-2); border-radius: 0 6px 6px 0; font-weight: 700; }
.admin-shell nav a svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-shell .nav-logout { display: flex !important; align-items: center; gap: 10px; margin-top: 10px !important; padding: 11px 12px !important; border-radius: 4px !important; border-top: 1px solid rgba(255,255,255,.14); color: #F0B4A2 !important; font-weight: 600 !important; font-size: 13px; }
.admin-shell .nav-logout:hover { background: rgba(232,115,74,.18); color: #fff !important; }
.admin-shell .nav-logout svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-shell .content-area { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.admin-shell .app-topbar {
  background: var(--nav-grad); color: #E4E9E7;
  border-radius: 10px;
  padding: 11px 16px; display: flex; align-items: center; gap: 14px;
  position: sticky; top: 14px; z-index: 30;
}
.admin-main { min-width: 0; }
.app-footer-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; margin-top: 4px;
  font-size: 12px; color: var(--ink-faint);
}
.app-footer-status .sep { color: var(--border); }
.app-footer-status .status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; }
@media (max-width: 900px) { .app-footer-status { display: none; } }
@media (max-width: 900px) {
  .admin-shell.shell { flex-direction: column; padding: 10px; gap: 10px; }
  .admin-shell .sidebar { width: 100%; flex-direction: row; align-items: center; gap: 4px; overflow-x: auto; padding: 10px; white-space: nowrap; position: static; max-height: none; }
  .admin-shell .app-topbar { position: static; flex-wrap: wrap; }
  .admin-shell .topbar-weather, .admin-shell .topbar-avatar-name, .admin-shell .topbar-avatar-role { display: none; }
}
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.admin-header h1 { font-size: 21px; margin: 0; font-weight: 700; }

/* ---- Widget topbar admin — SALINAN dari dfstore-kasir-web, jaga sinkron ---- */
.topbar-search { flex: 1; display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: 9px 12px; max-width: 380px; }
.topbar-search input { flex: 1; border: none; background: transparent; color: #fff; font-family: inherit; font-size: 13.5px; outline: none; }
.topbar-search input::placeholder { color: #B7C7CB; }
.topbar-search svg { width: 16px; height: 16px; color: #B7C7CB; flex-shrink: 0; }
.topbar-search kbd { font-size: 10.5px; color: #E4E9E7; border: 1px solid rgba(255,255,255,.25); border-radius: 4px; padding: 1px 6px; font-family: inherit; }
.topbar-weather { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #CBDAD6; white-space: nowrap; }
.topbar-weather .waktu { font-weight: 800; font-size: 15px; color: #fff; }
.topbar-spacer { flex: 1; }
.topbar-icon-btn { position: relative; width: 36px; height: 36px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); cursor: pointer; flex-shrink: 0; }
.topbar-icon-btn:hover { background: rgba(255,255,255,.16); }
.topbar-icon-btn svg { width: 17px; height: 17px; color: #E4E9E7; }
.topbar-icon-btn .cart-badge { top: -5px; right: -5px; }
.topbar-avatar-btn { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 10px 4px 4px; border-radius: 6px; }
.topbar-avatar-btn:hover { background: rgba(255,255,255,.08); }
.topbar-avatar-img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; background: var(--accent-2); flex-shrink: 0; }
.topbar-avatar-fallback { width: 32px; height: 32px; border-radius: 8px; background: var(--accent-2); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.topbar-avatar-name { font-size: 13px; font-weight: 700; line-height: 1.2; color: #fff; }
.topbar-avatar-role { font-size: 11px; color: #B7C7CB; }
.topbar-avatar-btn svg.chev { width: 14px; height: 14px; color: #B7C7CB; }
details.topbar-dd { position: relative; }
details.topbar-dd summary { list-style: none; cursor: pointer; }
details.topbar-dd summary::-webkit-details-marker { display: none; }
details.topbar-dd .dd-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 300px; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(11,37,48,.16);
  overflow: hidden; color: var(--ink);
}
details.topbar-dd .dd-title { padding: 12px 16px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--border); }
details.topbar-dd .dd-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 16px; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--ink); }
details.topbar-dd .dd-item:last-child { border-bottom: none; }
details.topbar-dd .dd-item:hover { background: var(--surface-2); }
details.topbar-dd .dd-empty { padding: 20px 16px; text-align: center; color: var(--ink-faint); font-size: 13px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 17px; box-shadow: var(--shadow); }
.stat-card .icon-badge { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.stat-card .icon-badge svg { width: 18px; height: 18px; }
.stat-card .icon-badge.c1 { background: var(--accent-soft); color: var(--accent); }
.stat-card .icon-badge.c2 { background: var(--accent-2-soft); color: var(--accent-2); }
.stat-card .icon-badge.c3 { background: var(--success-soft); color: var(--success); }
.stat-card .icon-badge.c4 { background: var(--warning-soft); color: var(--warning); }
/* .table-wrap dipakai BERSAMA storefront (keranjang/lacak pesanan) — flat
   putih cuma untuk yang di dalam panel admin, jangan sentuh punya storefront. */
.admin-main .table-wrap { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }

/* ---- Chat pembeli <-> admin ---- */
.chat-thread { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px; }
.chat-bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; }
.chat-bubble-text { font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.chat-bubble-time { font-size: 11px; margin-top: 4px; opacity: .65; }
/* Sisi pembeli: pesan sendiri (buyer) rata kanan warna aksen; pesan admin rata kiri netral. */
.chat-bubble-buyer { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.chat-bubble-admin { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; }
/* Sisi admin: kebalikannya — pesan admin (dia sendiri) rata kanan, pesan pembeli rata kiri. */
.chat-bubble-admin-self { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.chat-bubble-buyer-self { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-form { display: flex; gap: 10px; margin-top: 16px; align-items: flex-end; }
.chat-form textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-family: inherit; font-size: 14px; resize: vertical; }

.chat-admin-layout { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); min-height: 60vh; }
.chat-admin-list { width: 260px; flex-shrink: 0; border-right: 1px solid var(--border); overflow-y: auto; max-height: 75vh; }
.chat-admin-list-item { display: block; padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--ink); }
.chat-admin-list-item:hover { background: var(--surface-2); }
.chat-admin-list-item.active { background: var(--accent-soft); }
.chat-admin-thread { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-admin-thread .chat-form { margin-top: 0; }
@media (max-width: 700px) { .chat-admin-layout { flex-direction: column; } .chat-admin-list { width: 100%; max-height: 200px; border-right: none; border-bottom: 1px solid var(--border); } }
.stat-card .label { font-size: 12px; color: var(--ink-faint); font-weight: 600; margin-bottom: 6px; }
.stat-card .value { font-size: 22px; font-weight: 800; }
.status-select { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; background: var(--surface); color: var(--ink); font-family: inherit; }

/* align-items:flex-start (bukan center) + padding-top proporsional layar —
   supaya kartu login mulai dari sekitar 1/3 atas seperti kebiasaan umum
   halaman login, bukan mengambang tepat di tengah yang menyisakan area
   kosong besar di atas pada layar HP tinggi (dilaporkan pengguna). */
.login-wrap { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 10vh 20px 40px; }
.login-card { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.login-card .brand-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; margin-bottom: 16px; }
