/* ==========================================================================
   BeliBacklink — kartu "stiker" bergaris tinta, aksen tulisan tangan, palet warna bisa diganti dari admin
   Tata letak marketplace: sidebar kategori, katalog, detail produk, checkout
   ========================================================================== */

/* ---------- Font (self-hosted, lisensi OFL — lihat public/fonts) ---------- */
@font-face { font-family: 'Stack Sans Headline'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../fonts/stack-sans-headline-latin-variable.woff2') format('woff2'); }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/caveat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/caveat-latin-700-normal.woff2') format('woff2'); }

/* ---------- Token dasar (bukan warna) ---------- */
:root {
  --coral: #F06859;
  --coral-soft: #FDE1DD;
  --sky-soft: #DCEFF7;
  --lilac-soft: #E7E3FB;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-lg: 8px 8px 0 var(--ink);

  --font-body: 'Stack Sans Headline', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', 'Segoe Print', cursive;

  --sidebar-w: 256px;
  --topbar-h: 66px;
  --radius: 18px;
  --radius-sm: 12px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --coral-soft: #3A1F1B;
  --shadow: 5px 5px 0 #000;
  --shadow-sm: 3px 3px 0 #000;
  --shadow-lg: 8px 8px 0 #000;
  color-scheme: dark;
}

/* ==========================================================================
   PALET WARNA — dipilih dari Admin › Pengaturan › Warna tema
   (atribut data-palette di <html>). Untuk menambah palet: salin satu blok
   terang + satu blok gelap, ganti nama & warnanya, lalu tambahkan ke
   App\Support\Palette::all().
   ========================================================================== */

/* ---------- Biru (bawaan) ---------- */
:root, :root[data-palette="biru"] {
  --bg: #F4F7FF; --surface: #FFFFFF; --surface-2: #F8FAFF;
  --ink: #0B1020; --ink-2: #2B3654; --muted: #5F6B85; --line: #DDE5F5; --line-strong: #B8C6E6;
  --ink-hard: #0B1020; --cream: #F4F7FF;
  --dark: #0E1A3A; --dark-2: #182A55; --dark-deep: #08112A; --on-dark: #F4F7FF; --on-dark-muted: rgba(244, 247, 255, .68);
  --brand: #4C86FF; --brand-strong: #2F6BFF; --brand-soft: #DCE7FF; --brand-deep: #1D4ED8; --brand-deep-soft: #E3ECFF; --brand-ink: #1D4ED8;
  --hero-bg: var(--brand); --hero-fg: var(--ink-hard); --hero-muted: rgba(11, 16, 32, .75); --hero-grid: rgba(11, 16, 32, .08);
  --hero-accent: var(--ink-hard); --hero-mark: var(--cream); --hero-btn-bg: var(--ink-hard); --hero-btn-fg: var(--cream); --hero-btn-sh: var(--cream);
  --hero-card2: #FFD84D; --hero-note-fg: var(--ink-hard); --hero-note-bg: var(--cream);
}
:root[data-palette="biru"][data-theme="dark"], :root:not([data-palette])[data-theme="dark"] {
  --bg: #070C1C; --surface: #101A33; --surface-2: #15213F;
  --ink: #EEF2FF; --ink-2: #C9D3EE; --muted: #8F9BBB; --line: #1E2C52; --line-strong: #2C3F70;
  --dark: #050914; --dark-2: #111C3A; --dark-deep: #03060F;
  --brand-soft: #172A55; --brand-deep: #8FB2FF; --brand-deep-soft: #15244A;
}

/* ---------- Oranye ---------- */
:root[data-palette="oranye"] {
  --bg: #FFF7EF; --surface: #FFFFFF; --surface-2: #FFFBF6;
  --ink: #1C0F07; --ink-2: #4A3426; --muted: #7A6455; --line: #F1E2D4; --line-strong: #E2C6AE;
  --ink-hard: #1C0F07; --cream: #FFF4EA;
  --dark: #1F120A; --dark-2: #2E1B10; --dark-deep: #170C05; --on-dark: #FFF4EA; --on-dark-muted: rgba(255, 244, 234, .66);
  --brand: #FF6B2C; --brand-strong: #F2541A; --brand-soft: #FFE3D3; --brand-deep: #C2410C; --brand-deep-soft: #FFE9DC; --brand-ink: #C2410C;
  --hero-bg: var(--brand); --hero-fg: var(--ink-hard); --hero-muted: rgba(28, 15, 7, .75); --hero-grid: rgba(28, 15, 7, .08);
  --hero-accent: var(--ink-hard); --hero-mark: var(--cream); --hero-btn-bg: var(--ink-hard); --hero-btn-fg: var(--cream); --hero-btn-sh: var(--cream);
  --hero-card2: #FFD84D; --hero-note-fg: var(--ink-hard); --hero-note-bg: var(--cream);
}
:root[data-palette="oranye"][data-theme="dark"] {
  --bg: #140B06; --surface: #21130B; --surface-2: #2A1910;
  --ink: #FBEFE6; --ink-2: #E2CFC2; --muted: #B39A89; --line: #3A2518; --line-strong: #533523;
  --dark: #0E0703; --dark-2: #22140B; --dark-deep: #0A0502;
  --brand-soft: #3D1E0E; --brand-deep: #FF9A66; --brand-deep-soft: #3A1D0E;
}

/* ---------- Hijau & lime ---------- */
:root[data-palette="hijau"] {
  --bg: #F3F6F2; --surface: #FFFFFF; --surface-2: #F8FAF6;
  --ink: #0A0F0D; --ink-2: #33403A; --muted: #5E6B64; --line: #DDE5DA; --line-strong: #B9C7B5;
  --ink-hard: #0A0F0D; --cream: #F3F6F2;
  --dark: #122922; --dark-2: #1A3A30; --dark-deep: #062319; --on-dark: #F3F6F2; --on-dark-muted: rgba(243, 246, 242, .66);
  --brand: #D6EE30; --brand-strong: #C4DD1C; --brand-soft: #EEF7B3; --brand-deep: #1D6B48; --brand-deep-soft: #DDF0E3; --brand-ink: #1D6B48;
  --hero-bg: var(--dark); --hero-fg: var(--cream); --hero-muted: rgba(243, 246, 242, .68); --hero-grid: rgba(214, 238, 48, .07);
  --hero-accent: var(--brand); --hero-mark: var(--brand); --hero-btn-bg: var(--brand); --hero-btn-fg: var(--ink-hard); --hero-btn-sh: #000;
  --hero-card2: var(--brand); --hero-note-fg: var(--brand); --hero-note-bg: transparent;
}
:root[data-palette="hijau"][data-theme="dark"] {
  --bg: #0B1612; --surface: #122922; --surface-2: #163229;
  --ink: #E9F0E6; --ink-2: #C9D5CC; --muted: #92A39A; --line: #234238; --line-strong: #2F5446;
  --dark: #08120E; --dark-2: #12271F; --dark-deep: #050D0A;
  --brand-soft: #2D3410; --brand-deep: #8BD3A8; --brand-deep-soft: #173A2C;
}

/* ---------- Ungu ---------- */
:root[data-palette="ungu"] {
  --bg: #F7F5FF; --surface: #FFFFFF; --surface-2: #FBFAFF;
  --ink: #140B2E; --ink-2: #3A2E5C; --muted: #6B6385; --line: #E6E1F7; --line-strong: #C9BFEE;
  --ink-hard: #140B2E; --cream: #F7F5FF;
  --dark: #1C1238; --dark-2: #2A1D52; --dark-deep: #120A27; --on-dark: #F7F5FF; --on-dark-muted: rgba(247, 245, 255, .68);
  --brand: #9C7CFF; --brand-strong: #8B5CF6; --brand-soft: #EDE7FF; --brand-deep: #6D28D9; --brand-deep-soft: #EFE8FF; --brand-ink: #6D28D9;
  --hero-bg: var(--brand); --hero-fg: var(--ink-hard); --hero-muted: rgba(20, 11, 46, .75); --hero-grid: rgba(20, 11, 46, .08);
  --hero-accent: var(--ink-hard); --hero-mark: var(--cream); --hero-btn-bg: var(--ink-hard); --hero-btn-fg: var(--cream); --hero-btn-sh: var(--cream);
  --hero-card2: #FFD84D; --hero-note-fg: var(--ink-hard); --hero-note-bg: var(--cream);
}
:root[data-palette="ungu"][data-theme="dark"] {
  --bg: #0D0820; --surface: #1A1236; --surface-2: #221848;
  --ink: #F1EDFF; --ink-2: #D3CBEF; --muted: #9F95C2; --line: #2C2152; --line-strong: #3E3170;
  --dark: #08051A; --dark-2: #1A1238; --dark-deep: #05030F;
  --brand-soft: #2D1F5C; --brand-deep: #C4B1FF; --brand-deep-soft: #2A1C52;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body { margin: 0; font-family: var(--font-body); font-size: 15.5px; line-height: 1.6; color: var(--ink); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--brand-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--dark); outline-offset: 2px; box-shadow: 0 0 0 6px var(--brand); }
::selection { background: var(--brand); color: var(--ink-hard); }
.ic { flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.xs { font-size: .77rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hand { font-family: var(--font-hand); font-weight: 700; color: var(--brand-deep); letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--brand); color: var(--ink-hard); padding: 8px 14px; border: 2px solid var(--ink-hard); border-radius: 999px; }
.skip:focus { left: 8px; }

/* blok sorotan biru (seperti stabilo tebal) */
.mark {
  display: inline-block; padding: 0 .18em; margin: 0 .04em; line-height: 1.12;
  background: var(--brand); color: var(--ink-hard); border: 2.5px solid var(--ink-hard); border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink-hard); transform: rotate(-1.5deg);
}
.mark.flat { border: 0; box-shadow: none; border-radius: 6px; transform: none; }
.squiggle { display: inline; } /* (gaya lama, dibiarkan netral) */

/* hiasan lama: selotip disembunyikan; sticky note → stiker */
.tape { display: none; }
.sticky {
  display: inline-block; position: relative; max-width: 270px;
  font-family: var(--font-hand); font-weight: 700; font-size: 1.15rem; line-height: 1.2; color: var(--ink-hard);
  background: var(--brand); padding: 10px 16px 12px; border: 2px solid var(--ink-hard); border-radius: 14px;
  box-shadow: 4px 4px 0 var(--ink-hard); transform: rotate(-3deg);
}
.sticky.blue { background: #A9DCF0; transform: rotate(2.5deg); }
.sticky.pink { background: #F4C2CC; transform: rotate(-1deg); }
.doodle { display: none; }
.pill-dark { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; background: var(--ink-hard); color: var(--cream); font-size: .72rem; font-weight: 600; white-space: nowrap; }

/* ---------- App shell ---------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60; width: var(--sidebar-w);
  background: var(--dark); color: var(--on-dark);
  display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--dark-2) transparent;
  background-image: linear-gradient(color-mix(in srgb, var(--brand) 5%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--brand) 5%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
}
.sidebar-brand { display: flex; align-items: center; gap: 9px; height: var(--topbar-h); padding: 0 22px; flex: none; color: var(--on-dark); font-weight: 700; font-size: 1.22rem; letter-spacing: -.03em; text-decoration: none; }
.sidebar-brand:hover { color: var(--on-dark); }
.sidebar-brand b { font-weight: 700; color: var(--brand); }
.sidebar-brand span { font-weight: 600; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--brand); color: var(--ink-hard); border: 2px solid var(--ink-hard); box-shadow: 2px 2px 0 #000; transform: rotate(-6deg); }
.side-label { padding: 18px 24px 8px; font-family: var(--font-hand); font-weight: 700; font-size: 1.15rem; color: var(--brand); }
.side-nav { list-style: none; margin: 0; padding: 0 14px; display: grid; gap: 3px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 999px; border: 2px solid transparent;
  color: var(--on-dark-muted); font-weight: 500; font-size: .92rem; text-decoration: none;
}
.side-nav a:hover { color: var(--on-dark); background: color-mix(in srgb, var(--cream) 7%, transparent); }
.side-nav a.active { background: var(--brand); color: var(--ink-hard); border-color: var(--ink-hard); box-shadow: 3px 3px 0 #000; font-weight: 700; }
.side-nav .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--cream) 15%, transparent); }
.side-nav a.active .dot { box-shadow: 0 0 0 2px var(--ink-hard); }
.side-nav .count { margin-left: auto; font-size: .7rem; font-weight: 700; min-width: 26px; text-align: center; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--cream) 10%, transparent); }
.side-nav a.active .count { background: var(--ink-hard); color: var(--brand); }
.sidebar-foot { margin-top: auto; padding: 18px 18px 22px; }

.main { margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand-mobile { display: none; }
.searchbox { flex: 1; max-width: 600px; position: relative; }
.searchbox .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.searchbox input {
  width: 100%; height: 44px; padding: 0 18px 0 44px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font: 500 .93rem var(--font-body);
  transition: box-shadow .15s;
}
.searchbox input::placeholder { color: var(--muted); }
.searchbox input:focus { outline: none; box-shadow: 0 0 0 5px var(--brand); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; flex: none; text-decoration: none;
  border-radius: 50%; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .15s var(--ease, ease), box-shadow .15s;
}
.icon-btn:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.menu-btn { display: none; }
.theme-light-only { display: inline-block; }
.theme-dark-only { display: none; }
:root[data-theme="dark"] .theme-light-only { display: none; }
:root[data-theme="dark"] .theme-dark-only { display: inline-block; }

.promo-bar { display: flex; align-items: center; gap: 10px; padding: 9px 28px; background: var(--dark-deep); color: var(--on-dark); font-size: .86rem; font-weight: 500; }
.promo-bar .ic { color: var(--brand); }
.promo-bar b { font-weight: 700; background: var(--brand); color: var(--ink-hard); padding: 1px 9px; border-radius: 999px; font-size: .78rem; }
.promo-bar button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .75; cursor: pointer; padding: 2px; display: grid; }
.promo-bar button:hover { opacity: 1; }
.promo-bar.hidden { display: none; }

.content { flex: 1; width: 100%; max-width: 1300px; margin: 0 auto; padding: 28px; }
.footer { background: var(--dark-deep); color: rgba(255,255,255,.6); margin-top: 40px; }
.footer-inner { max-width: 1300px; margin: 0 auto; padding: 26px 28px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; font-size: .86rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: #fff; text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--brand); }

.backdrop { display: none; }

@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s cubic-bezier(.16,1,.3,1); box-shadow: 8px 0 0 rgba(0,0,0,.25); }
  .sidebar.open { transform: none; }
  .backdrop.show { display: block; position: fixed; inset: 0; z-index: 55; background: color-mix(in srgb, var(--dark-deep) 60%, transparent); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar .brand-mobile { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
  .topbar .brand-mobile .logo-mark { width: 26px; height: 26px; border-radius: 8px; }
  .content { padding: 18px 16px; }
  .promo-bar { padding: 9px 16px; }
  .footer-inner { padding: 22px 16px; }
}
@media (max-width: 680px) {
  .searchbox { display: none; }
  .searchbox.open { display: block; position: absolute; left: 12px; right: 12px; top: 11px; max-width: none; z-index: 2; }
  .search-toggle { display: inline-grid; }
  .btn-label-sm { display: none; }
  .icon-btn { width: 40px; height: 40px; }
}
@media (min-width: 681px) { .search-toggle { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--ink); --btn-sh: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: 46px; padding: 0 1.35em; border-radius: 999px; border: 2.5px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; cursor: pointer; white-space: nowrap;
  font: 700 .92rem/1 var(--font-body); letter-spacing: -.01em;
  box-shadow: 4px 4px 0 var(--btn-sh); transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--btn-sh); color: var(--btn-fg); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--btn-sh); }
.btn-primary, .btn-accent { --btn-bg: var(--brand); --btn-fg: var(--ink-hard); --btn-bd: var(--ink-hard); --btn-sh: var(--ink-hard); }
.btn-dark { --btn-bg: var(--dark); --btn-fg: var(--brand); --btn-bd: var(--ink-hard); }
.btn-wa { --btn-bg: #25D366; --btn-fg: #06210F; --btn-bd: var(--ink-hard); --btn-sh: var(--ink-hard); }
.btn-soft { --btn-bg: var(--brand-soft); --btn-fg: var(--ink); }
.btn-danger { --btn-bg: var(--coral-soft); --btn-fg: var(--coral); --btn-bd: var(--coral); --btn-sh: var(--coral); }
.btn-white { --btn-bg: #fff; --btn-fg: var(--ink-hard); --btn-bd: var(--ink-hard); --btn-sh: var(--ink-hard); }
.btn-ghost-light { --btn-bg: transparent; --btn-fg: var(--on-dark); --btn-bd: var(--on-dark); --btn-sh: transparent; }
.btn-lg { height: 52px; padding: 0 1.6em; font-size: 1rem; }
.btn-sm { height: 36px; padding: 0 1em; font-size: .8rem; border-width: 2px; box-shadow: 2px 2px 0 var(--btn-sh); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: inherit; text-decoration: none; border-bottom: 3px solid var(--brand); padding-bottom: 2px; }
.link-arrow:hover { color: inherit; gap: 12px; }

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; white-space: nowrap;
  font-size: .72rem; font-weight: 700; border-radius: 999px; border: 1.5px solid var(--ink-hard); color: var(--ink-hard); text-decoration: none;
}
.badge-new { background: #B5E8A5; }
.badge-promo { background: #F4C2CC; }
.badge-hot { background: var(--brand); }
.badge-cat { background: var(--ink-hard); color: var(--cream); }
.badge-off { background: var(--coral); color: #fff; border-color: var(--coral); }
.tone-marker { background: #F6DB5B; color: var(--ink-hard); }
.tone-sky { background: #A9DCF0; color: var(--ink-hard); }
.tone-ink { background: var(--dark); color: var(--brand); border-color: var(--dark); }
.tone-leaf { background: #B5E8A5; color: var(--ink-hard); }
.tone-rose { background: #F4C2CC; color: var(--ink-hard); }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; white-space: nowrap; flex: none;
  border-radius: 999px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); text-decoration: none;
  font-size: .86rem; font-weight: 600;
}
.chip:hover { background: var(--brand-soft); color: var(--ink); }
.chip.active { background: var(--dark); border-color: var(--dark); color: var(--cream); box-shadow: 3px 3px 0 var(--brand); }
:root[data-theme="dark"] .chip.active { background: var(--brand); color: var(--ink-hard); box-shadow: 3px 3px 0 #000; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; }
.chip .live { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 6px 8px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

/* ---------- Cards / panels ---------- */
.panel { position: relative; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-pad { padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; border-bottom: 2px solid var(--line); }
.panel-head h1, .panel-head h2, .panel-head h3 { margin: 0; font-size: 1.08rem; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.panel-head h1 .ic, .panel-head h2 .ic, .panel-head h3 .ic { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--brand); color: var(--ink-hard); border: 2px solid var(--ink-hard); }
.stack { display: grid; gap: 24px; }
.stack > * { min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.section { margin-top: 52px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; letter-spacing: -.035em; }
.section-head h2 .ic { display: none; }
.eyebrow { display: block; font-family: var(--font-hand); font-weight: 700; font-size: 1.35rem; line-height: 1.1; color: var(--brand-deep); margin-bottom: 6px; }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--ink); text-decoration: none; border-bottom: 3px solid var(--brand); padding-bottom: 2px; }
.see-all:hover { color: var(--ink); gap: 10px; }

/* ---------- Hero (blok berwarna bergaris grid; warna dari token --hero-*) ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 26px; border: 2px solid var(--ink-hard); color: var(--hero-fg);
  background-color: var(--hero-bg);
  background-image: radial-gradient(circle at 80% 25%, rgba(255,255,255,.22), transparent 42%), linear-gradient(var(--hero-grid) 1px, transparent 1px), linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  padding: clamp(28px, 5vw, 60px); display: grid; grid-template-columns: 1.15fr .95fr; gap: clamp(28px, 4vw, 56px); align-items: center;
  box-shadow: var(--shadow-lg);
}
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; font-size: .78rem; font-weight: 700; color: var(--hero-accent); }
.hero-meta::after { content: ""; width: 44px; height: 2px; background: var(--hero-accent); }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 700; letter-spacing: -.045em; line-height: 1.02; margin-bottom: 20px; }
.hero h1 .mark { margin-top: .12em; background: var(--hero-mark); }
.hero .lead { font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--hero-muted); max-width: 52ch; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.hero-cta .btn-primary { --btn-bg: var(--hero-btn-bg); --btn-fg: var(--hero-btn-fg); --btn-bd: var(--ink-hard); --btn-sh: var(--hero-btn-sh); }
.hero-cta .link-arrow { color: var(--hero-fg); border-bottom-color: var(--hero-accent); }
.hero-note { margin-top: 26px; font-size: .84rem; color: var(--hero-muted); }
.hero-note b { color: var(--hero-note-fg); font-weight: 700; background: var(--hero-note-bg); padding: 0 6px; border-radius: 4px; }
.hero-board { position: relative; min-height: 340px; }
.sticker-card { position: absolute; background: #fff; color: var(--ink-hard); border: 2px solid var(--ink-hard); border-radius: 16px; box-shadow: 6px 6px 0 #000; padding: 14px 16px; }
.sticker-card h4 { font-size: 1rem; margin: 10px 0 8px; letter-spacing: -.02em; }
.sticker-card.lime { background: var(--hero-card2); }
.sticker-card.a { left: 0; top: 10px; width: 78%; transform: rotate(-3deg); }
.sticker-card.b { right: 0; bottom: 6px; width: 58%; transform: rotate(4deg); }
.serp-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #C7CCD6; }
.serp-line:last-child { border-bottom: 0; }
.serp-rank { font-weight: 700; font-size: 1.05rem; width: 28px; color: #7B8090; }
.serp-line.you .serp-rank { color: var(--brand-ink); }
.serp-bar { flex: 1; height: 10px; border-radius: 6px; background: #ECEEF3; position: relative; overflow: hidden; }
.serp-bar span { position: absolute; inset: 0 auto 0 0; background: #C7CCD6; border-radius: 6px; }
.serp-line.you .serp-bar span { background: var(--brand); box-shadow: inset 0 0 0 1.5px var(--ink-hard); }
.serp-label { font-size: .76rem; font-weight: 600; min-width: 88px; text-align: right; }
.mini-progress { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink-hard) 18%, transparent); overflow: hidden; margin-top: 10px; }
.mini-progress span { display: block; height: 100%; width: 62%; background: var(--ink-hard); border-radius: 999px; }
.hero-board .hand-note { position: absolute; right: 2%; top: -26px; font-family: var(--font-hand); font-weight: 700; font-size: 1.3rem; color: var(--hero-accent); transform: rotate(-4deg); }
@media (max-width: 1100px) { .hero { grid-template-columns: 1fr; } .hero-board { max-width: 520px; width: 100%; } }
@media (max-width: 520px) {
  .hero { border-radius: 20px; padding: 24px 20px; }
  .hero-board { min-height: 300px; }
  .sticker-card.a { width: 92%; } .sticker-card.b { width: 70%; }
}

/* ---------- Product grid & card ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); gap: 24px; }
@media (max-width: 520px) { .pgrid { grid-template-columns: 1fr 1fr; gap: 14px; } }
.pcard {
  display: flex; flex-direction: column; min-width: 0; position: relative;
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
}
.pcard:hover { transform: translate(-3px, -3px) rotate(-.4deg); box-shadow: 9px 9px 0 var(--ink); }
:root[data-theme="dark"] .pcard:hover { box-shadow: 9px 9px 0 #000; }
.pcard-thumb { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 2px solid var(--ink); text-decoration: none; }
.pcard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pcard-body { display: flex; flex-direction: column; gap: 6px; padding: 13px 15px 15px; flex: 1; }
.pcard-badges { display: flex; gap: 6px; flex-wrap: wrap; min-height: 24px; }
.pcard-title { font-size: 1.02rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink); line-height: 1.28; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-title:hover { color: var(--brand-deep); }
.pcard-cat { font-family: var(--font-hand); font-weight: 700; font-size: 1.08rem; line-height: 1; color: var(--brand-deep); }
.pcard-meta { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.pcard-meta .sold { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--ink); font-weight: 600; }
.pcard-price { margin-top: auto; padding-top: 10px; border-top: 2px dashed var(--line); }
.pcard-price s { display: block; font-size: .78rem; color: var(--muted); }
.pcard-price b { font-size: 1.2rem; font-weight: 700; letter-spacing: -.03em; }
.pcard-actions { display: flex; gap: 8px; margin-top: 10px; }
.pcard-actions .btn { flex: 1; height: 40px; padding: 0 .8em; font-size: .86rem; border-width: 2px; box-shadow: 3px 3px 0 var(--btn-sh); }
.pcard-actions .icon-btn { width: 40px; height: 40px; }
@media (max-width: 520px) {
  .pcard-body { padding: 10px; }
  .pcard-title { font-size: .9rem; }
  .pcard-price b { font-size: 1.02rem; }
  .pcard-actions .icon-btn { display: none; }
  .pcard-thumb .ph-cat, .pcard-thumb .ph-brand { display: none; }
  .pcard-thumb .ph-title { font-size: .95rem; }
}

/* Banner otomatis (produk tanpa gambar): kartu pastel warna kategori + stiker */
.ph {
  --c: var(--brand-ink);
  position: absolute; inset: 0; overflow: hidden; color: var(--ink-hard);
  background-color: color-mix(in srgb, var(--c) 24%, #FBFBFD);
  background-image: linear-gradient(color-mix(in srgb, var(--c) 14%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 9% 8% 9%;
}
.ph::before { /* lingkaran dekoratif */
  content: ""; position: absolute; right: -12%; top: -28%; width: 58%; aspect-ratio: 1; border-radius: 50%;
  background: var(--c); opacity: .18; border: 2px solid rgba(10,15,13,.15);
}
.ph::after { /* stiker kecil biru */
  content: "↗"; position: absolute; right: 9%; top: 12%; width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--brand); border: 2px solid var(--ink-hard); border-radius: 50%; box-shadow: 2px 2px 0 var(--ink-hard); font-weight: 700; transform: rotate(-8deg);
}
.ph-cat { position: absolute; left: 8%; top: 12%; padding: 3px 10px; border-radius: 999px; background: var(--ink-hard); color: var(--cream); font-size: .64rem; font-weight: 600; }
.ph-title { position: relative; z-index: 1; font-weight: 700; font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.ph-brand { position: relative; z-index: 1; margin-top: 4px; font-family: var(--font-hand); font-weight: 700; font-size: .95rem; color: color-mix(in srgb, var(--c) 70%, var(--ink-hard)); }
.ph.lg .ph-title { font-size: clamp(1.7rem, 4vw, 2.9rem); }
.ph.lg .ph-cat { font-size: .78rem; padding: 4px 12px; }
.ph.lg .ph-brand { font-size: 1.25rem; }
.ph.lg::after { width: 54px; height: 54px; font-size: 1.4rem; }

/* ---------- Catalog page ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 700; letter-spacing: -.04em; margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--muted); max-width: 60ch; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; margin: 14px 0 24px; }
.toolbar .count { font-size: .9rem; color: var(--muted); }
.select-inline {
  height: 40px; border-radius: 999px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font: 600 .86rem var(--font-body); padding: 0 36px 0 16px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23808799' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.select-inline:focus { outline: none; box-shadow: 0 0 0 5px var(--brand); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span:last-child { color: var(--ink); font-weight: 600; }
.crumbs .ic { opacity: .6; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-state .ic { margin: 0 auto 10px; color: var(--line-strong); }

/* ---------- Product detail ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; padding: 26px; }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; padding: 16px; gap: 22px; } }
.pdp-media { position: relative; aspect-ratio: 16 / 11; border-radius: 16px; overflow: hidden; border: 2px solid var(--ink); background: var(--surface-2); transform: rotate(-1.2deg); box-shadow: var(--shadow); }
.pdp-media img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.04em; margin: 12px 0 8px; }
.pdp-price { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0 6px; }
.pdp-price b { font-size: 2.1rem; font-weight: 700; letter-spacing: -.04em; }
.pdp-price s { color: var(--muted); }
.pdp-summary { color: var(--ink-2); margin: 10px 0 0; }
.pdp-list-title { font-family: var(--font-hand); font-weight: 700; font-size: 1.35rem; color: var(--brand-deep); margin: 18px 0 8px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check-list .ic { flex: none; width: 22px; height: 22px; padding: 3px; margin-top: 1px; border-radius: 50%; background: var(--brand); color: var(--ink-hard); border: 1.5px solid var(--ink-hard); }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 20px 0; border: 2px solid var(--ink); border-radius: 14px; background: var(--surface-2); overflow: hidden; }
.spec-grid > div { padding: 12px 15px; }
.spec-grid > div + div { border-left: 2px solid var(--line); }
.spec-grid span { display: block; font-size: .74rem; color: var(--muted); }
.spec-grid b { font-size: .98rem; }
@media (max-width: 420px) { .spec-grid { grid-template-columns: 1fr; } .spec-grid > div + div { border-left: 0; border-top: 2px solid var(--line); } }
.pdp-actions { display: flex; gap: 12px; }
.pdp-actions .btn-accent { flex: 1; }
.pdp-note { font-family: var(--font-hand); font-weight: 700; font-size: 1.12rem; color: var(--brand-deep); margin-top: 14px; line-height: 1.25; }
.prose { font-size: .98rem; color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 20px; }

/* ---------- Checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 30px; align-items: start; }
@media (max-width: 960px) { .checkout-grid { grid-template-columns: 1fr; } .summary { position: static; } }
.order-card::before { display: none; }
.summary { position: sticky; top: calc(var(--topbar-h) + 20px); background: var(--dark); color: var(--on-dark); border-color: var(--ink-hard); }
:root[data-theme="dark"] .summary { background: var(--surface-2); }
.summary .muted, .summary .hint { color: var(--on-dark-muted); }
.summary .pcard-title { color: var(--on-dark); }
.summary .pcard-cat { color: var(--brand); }
.summary-item { display: flex; gap: 12px; align-items: center; }
.summary-thumb { position: relative; width: 98px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; flex: none; border: 2px solid var(--ink-hard); }
.summary-thumb .ph { padding: 8px; background-size: 12px 12px; }
.summary-thumb .ph-title { font-size: .66rem; }
.summary-thumb .ph-cat, .summary-thumb .ph-brand, .summary-thumb .ph::after { display: none; }
.summary-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sum-lines { display: grid; gap: 8px; margin: 16px 0; padding: 14px 0; border-block: 1px solid color-mix(in srgb, var(--cream) 15%, transparent); font-size: .92rem; }
.sum-lines div { display: flex; justify-content: space-between; gap: 12px; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; }
.sum-total b { font-size: 1.55rem; font-weight: 700; letter-spacing: -.03em; color: var(--brand); }
.steps-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: s; }
.steps-mini li { counter-increment: s; display: flex; gap: 10px; font-size: .88rem; }
.steps-mini li::before { content: counter(s, decimal-leading-zero); flex: none; height: 24px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: var(--brand); color: var(--ink-hard); font-weight: 700; font-size: .72rem; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.label { font-size: .88rem; font-weight: 700; }
.label .opt { font-weight: 400; color: var(--muted); }
.label .req { color: var(--coral); }
.input, .textarea, .select {
  width: 100%; font: 500 .97rem/1.4 var(--font-body); color: var(--ink);
  background: var(--surface); border: 2px solid var(--ink); border-radius: 14px; padding: .8em 1em;
  transition: box-shadow .15s;
}
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23808799' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.textarea { min-height: 112px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.input:focus, .textarea:focus, .select:focus { outline: none; box-shadow: 0 0 0 5px var(--brand); }
.input.is-invalid, .textarea.is-invalid, .select.is-invalid { border-color: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft); }
.hint { font-size: .82rem; color: var(--muted); }
.error { font-size: .84rem; font-weight: 600; color: var(--coral); }
.input-group { display: flex; }
.input-group .addon { display: grid; place-items: center; padding: 0 14px; border: 2px solid var(--ink); border-right: 0; border-radius: 14px 0 0 14px; background: var(--brand); color: var(--ink-hard); }
.input-group .input { border-radius: 0 14px 14px 0; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .93rem; }
.check input { width: 20px; height: 20px; accent-color: var(--brand-deep); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 24px; padding-top: 20px; border-top: 2px solid var(--line); }
.color-input { width: 58px; height: 46px; padding: 3px; border-radius: 14px; border: 2px solid var(--ink); background: var(--surface); cursor: pointer; }
code { font-size: .85em; background: var(--brand-soft); color: var(--ink); padding: 1px 6px; border-radius: 6px; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; margin-bottom: 22px; border: 2px solid var(--ink); border-radius: 14px; background: #B5E8A5; color: var(--ink-hard); box-shadow: var(--shadow-sm); font-size: .93rem; }
.alert.error-box { background: #F4C2CC; }
.alert.info { background: var(--brand); }
.alert a { color: var(--ink-hard); font-weight: 700; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert .ic { margin-top: 2px; }

/* ---------- Cara order & FAQ ---------- */
.howto { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.howto li { padding: 22px; }
.howto li:nth-child(1) { transform: rotate(-1.2deg); }
.howto li:nth-child(2) { transform: rotate(1deg) translateY(10px); background: var(--brand); color: var(--ink-hard); }
.howto li:nth-child(2) p { color: color-mix(in srgb, var(--ink-hard) 75%, transparent); }
.howto li:nth-child(3) { transform: rotate(-.6deg); }
.howto li:nth-child(4) { transform: rotate(1.4deg) translateY(10px); }
.howto .num { display: inline-grid; place-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--ink-hard); color: var(--cream); font-weight: 700; font-size: .82rem; margin-bottom: 14px; }
.howto b { display: block; margin-bottom: 4px; font-size: 1.1rem; letter-spacing: -.02em; }
.howto p { font-size: .9rem; color: var(--muted); margin: 0; }
@media (max-width: 1100px) { .howto { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .howto { grid-template-columns: 1fr; } .howto li { transform: none !important; } }
.faq { display: grid; gap: 14px; max-width: 880px; }
.faq details { background: var(--surface); border: 2px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow-sm); }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 17px 58px 17px 20px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid var(--ink-hard); border-radius: 50%; font-weight: 700; background: var(--brand); color: var(--ink-hard); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 18px; color: var(--muted); }

/* ---------- Invoice ---------- */
.invoice-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 30px; align-items: start; }
@media (max-width: 960px) { .invoice-grid { grid-template-columns: 1fr; } }
.inv-number { font-size: clamp(1.35rem, 3.2vw, 1.9rem); font-weight: 700; letter-spacing: -.02em; }
.kv { width: 100%; border-collapse: collapse; }
.kv th, .kv td { text-align: left; vertical-align: top; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.kv th { width: 34%; color: var(--muted); font-weight: 500; padding-right: 12px; }
.kv td { word-break: break-word; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.kw-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kw { font-size: .8rem; font-weight: 600; padding: 2px 11px; border: 1.5px solid var(--ink-hard); border-radius: 999px; background: var(--brand); color: var(--ink-hard); }
.total-box { margin-top: 18px; padding: 18px 20px; border: 2px solid var(--ink-hard); border-radius: 16px; background: var(--dark); color: var(--on-dark); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.total-box .lbl { font-family: var(--font-hand); font-weight: 700; font-size: 1.25rem; color: var(--brand); line-height: 1; }
.total-box .amount { font-size: clamp(1.7rem, 4.4vw, 2.3rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.2; }
.total-box .amount .code { background: var(--brand); color: var(--ink-hard); padding: 0 .14em; border-radius: 6px; margin-left: 2px; }
.total-box .muted { color: var(--on-dark-muted); }
.total-box .copy-btn { background: var(--brand); color: var(--ink-hard); border-color: var(--ink-hard); }
.bank { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; border: 2px solid var(--ink); border-radius: 14px; background: var(--surface-2); margin-bottom: 10px; }
.bank-name { font-size: .78rem; font-weight: 700; color: var(--brand-deep); }
.bank-number { font-weight: 700; font-size: 1.22rem; letter-spacing: .01em; }
.bank-holder { font-size: .85rem; color: var(--muted); }
.copy-btn { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font: 700 .76rem/1 var(--font-body); cursor: pointer; white-space: nowrap; }
.copy-btn:hover { background: var(--brand); color: var(--ink-hard); }
.copy-btn.copied { background: #B5E8A5; color: var(--ink-hard); }
.timeline { list-style: none; padding: 0; margin: 0 0 12px; }
.timeline li { position: relative; padding: 0 0 18px 34px; font-size: .93rem; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.timeline li::after { content: ""; position: absolute; left: 11px; top: 21px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--brand-deep); border-color: var(--brand-deep); }
.timeline li.done::after { background: var(--brand-deep); }
.timeline li.now { color: var(--ink); font-weight: 700; }
.timeline li.now::before { background: var(--brand); border-color: var(--ink-hard); box-shadow: 0 0 0 4px var(--brand-soft); }
.dropzone { position: relative; display: block; border: 2px dashed var(--ink); border-radius: 16px; padding: 22px; text-align: center; cursor: pointer; background: var(--surface-2); }
.dropzone:hover { background: var(--brand-soft); }
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dropzone .ic { margin: 0 auto 6px; color: var(--brand-deep); }
.dropzone .file-name { display: block; margin-top: 6px; font-family: var(--font-hand); font-weight: 700; font-size: 1.1rem; color: var(--brand-deep); }

/* ---------- Pagination ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }

/* ---------- Floating WA ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px 7px 7px; background: var(--surface); color: var(--ink); text-decoration: none;
  border: 2px solid var(--ink); border-radius: 999px; box-shadow: var(--shadow-sm); font-size: .84rem; font-weight: 600; line-height: 1.15;
}
.wa-float:hover { color: var(--ink); transform: translate(-1px, -1px); }
.wa-float .wa-ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #25D366; border: 2px solid var(--ink-hard); color: #06210F; }
.wa-float small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; }
@media (max-width: 680px) { .wa-float .wa-text { display: none; } .wa-float { padding: 5px; } }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.admin-title h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 700; letter-spacing: -.04em; margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: .86rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
@media (max-width: 1000px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat { padding: 16px 18px; display: flex; gap: 12px; align-items: center; }
.stat .ic-wrap { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--ink); border: 2px solid var(--ink); flex: none; }
.stat.hot { background: var(--brand); color: var(--ink-hard); }
.stat.hot span { color: color-mix(in srgb, var(--ink-hard) 72%, transparent); }
.stat.hot .ic-wrap { background: #fff; color: var(--ink-hard); border-color: var(--ink-hard); }
.stat b { display: block; font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.stat span { font-size: .8rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .91rem; }
.table th { text-align: left; font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 12px 16px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--brand) 14%, transparent); }
.table .num { text-align: right; white-space: nowrap; }
.source-table-wrap { position: relative; }
.source-table { min-width: 1000px; table-layout: fixed; }
.source-table th:nth-child(1) { width: 21%; }
.source-table th:nth-child(2) { width: 26%; }
.source-table th:nth-child(3) { width: 23%; }
.source-table th:nth-child(4) { width: 21%; }
.source-table th:nth-child(5) { width: 9%; }
.source-table td { vertical-align: top; overflow-wrap: anywhere; }
.source-table .rowlink { white-space: normal; }
.source-table .btn-sm, .source-table .copy-btn { min-height: 44px; }
.source-text { white-space: pre-line; }
.reading { max-width: 82ch; overflow-wrap: anywhere; }
.category-reading { max-width: none; }
.category-reading .prose { max-width: 76ch; }
.reading h1 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); }
.reading h2 { margin-top: 1.5em; }
.reading h3 { margin-top: 1.3em; font-size: 1.15rem; }
.reading .prose table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.reading .prose th, .reading .prose td { padding: 12px; border: 1px solid var(--line-strong); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.reading .prose th:first-child, .reading .prose td:first-child { width: 30%; }
.reading-next { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.reading-list { display: grid; gap: 20px; max-width: 82ch; }
.reading-list h2 { font-size: clamp(1.25rem, 2vw, 1.65rem); }
.reading-list .btn { min-height: 44px; }
.hero-board-title { font-size: 1.6rem; font-weight: 700; line-height: 1.15; margin: 14px 0 10px; }
.hero-board { display: grid; gap: 22px; align-content: center; min-height: 0; }
.hero-board .sticker-card { position: relative; top: auto; right: auto; bottom: auto; left: auto; }
.hero-board .sticker-card.a { width: 90%; justify-self: start; }
.hero-board .sticker-card.b { width: 80%; justify-self: end; }
.hero-board .sticker-card p:last-child { margin-bottom: 0; }
@media (max-width: 480px) {
  .reading .prose th, .reading .prose td { padding: 8px; font-size: .87rem; }
}
.rowlink { font-weight: 700; color: var(--ink); white-space: nowrap; text-decoration: none; }
.rowlink:hover { color: var(--brand-deep); }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.thumb-sm { position: relative; width: 68px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; flex: none; border: 1.5px solid var(--ink); }
.thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.thumb-sm .ph { padding: 4px; background-size: 9px 9px; }
.thumb-sm .ph-title { font-size: .46rem; }
.thumb-sm .ph-cat, .thumb-sm .ph-brand, .thumb-sm .ph::after { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.search-row { display: flex; gap: 8px; margin-bottom: 18px; max-width: 560px; }
.search-row .input { height: 46px; padding: 0 16px; border-radius: 999px; }
.admin-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 1000px) { .admin-cols { grid-template-columns: 1fr; } }
.proof-img { border: 2px solid var(--ink); border-radius: 12px; max-height: 440px; width: auto; margin-top: 10px; background: #fff; }
.img-preview { position: relative; width: 240px; max-width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 2px solid var(--ink); }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 20px; background-color: var(--dark);
  background-image: linear-gradient(color-mix(in srgb, var(--brand) 7%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--brand) 7%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
}
.login-wrap .sidebar-brand { color: var(--on-dark); }

/* ---------- Pilihan palet (admin › pengaturan) ---------- */
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.palette-opt { position: relative; cursor: pointer; }
.palette-opt input { position: absolute; opacity: 0; pointer-events: none; }
.palette-opt .box { display: block; padding: 12px; border: 2px solid var(--line-strong); border-radius: 14px; background: var(--surface); transition: transform .15s, box-shadow .15s, border-color .15s; }
.palette-opt:hover .box { border-color: var(--ink); }
.palette-opt input:checked + .box { border-color: var(--ink); box-shadow: var(--shadow-sm); transform: translate(-2px, -2px); }
.palette-opt input:focus-visible + .box { outline: 3px solid var(--brand); outline-offset: 2px; }
.palette-swatch { display: flex; height: 44px; border-radius: 10px; overflow: hidden; border: 2px solid #111; margin-bottom: 10px; }
.palette-swatch span { flex: 1; }
.palette-swatch span:first-child { flex: 2; }
.palette-opt b { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .92rem; }
.palette-opt small { display: block; font-size: .76rem; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.palette-opt .tick { display: none; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: var(--ink-hard); border: 1.5px solid var(--ink-hard); place-items: center; font-size: .7rem; }
.palette-opt input:checked + .box .tick { display: inline-grid; }

/* ---------- Logo ---------- */
.brand-logo { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo .logo-svg { height: 28px; width: auto; display: block; overflow: visible; }
.brand-logo .logo-img { height: 32px; width: auto; max-width: 170px; object-fit: contain; display: block; }
.brand-logo .logo-main { fill: currentColor; }
.brand-logo.on-dark { color: var(--on-dark); }
.brand-logo.on-dark .logo-accent { fill: var(--brand); }
.brand-logo.on-light { color: var(--ink); }
.brand-logo.on-light .logo-accent { fill: var(--brand-ink); }
:root[data-theme="dark"] .brand-logo.on-light .logo-accent { fill: var(--brand); }
.brand-logo.is-full .logo-svg { height: 58px; }
.brand-logo.is-full .logo-img { height: 58px; max-width: 260px; }
.sidebar-brand .brand-logo .logo-svg { height: 28px; }
.topbar .brand-mobile .brand-logo .logo-svg { height: 24px; }
.topbar .brand-mobile .brand-logo .logo-img { height: 26px; max-width: 120px; }
.login-logo { display: flex; justify-content: center; margin-bottom: 22px; text-decoration: none; }
/* contoh logo di halaman pengaturan */
.logo-preview { display: flex; align-items: center; justify-content: center; min-height: 92px; padding: 16px; border-radius: 12px; border: 2px solid var(--line); }
.logo-preview.dark { background: var(--dark); }
.logo-preview.light { background: #fff; }
.logo-preview.light .brand-logo.on-light { color: #111; }
.logo-preview .brand-logo .logo-svg { height: 46px; }
.logo-preview .brand-logo .logo-img { height: 52px; max-width: 240px; }
.favicon-preview { width: 64px; height: 64px; border-radius: 14px; border: 2px solid var(--line); object-fit: contain; background: #fff; }
.brand-downloads { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 680px) {
  .topbar .brand-mobile { min-width: 0; flex: 0 1 auto; }
  .topbar .brand-mobile .brand-logo .logo-svg { height: 20px; }
  .topbar .brand-mobile .brand-logo .logo-img { height: 22px; max-width: 100px; }
}
@media (max-width: 360px) {
  .topbar .brand-mobile .brand-logo .logo-svg { height: 18px; }
}
