@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@600;700&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap");

:root {
  /* Neobrutalism — tema terang saja: ink gelap di atas krem, border tebal gelap */
  --bg-main: #FBF3E1;
  --bg-card: #FFFFFF;
  --bg-field: #FFFFFF;
  --bg-active: #FFEFB8;
  --primary: #2B54E2;
  --primary-dark: #1E3EB8;
  --primary-soft: rgba(43, 84, 226, 0.12);
  --accent: #C98F00;
  --accent-soft: rgba(201, 143, 0, 0.14);
  --text-main: #14110D;
  --text-muted: #514B40;
  --text-faint: #837B6A;
  --border: #14110D;
  --border-strong: #14110D;
  --shadow-color: #14110D;
  --success: #0F9D4F;
  --success-soft: rgba(15, 157, 79, 0.14);
  --warn: #FFD400;
  --warn-soft: rgba(255, 212, 0, 0.18);
  --danger: #D6362A;
  --danger-soft: rgba(214, 54, 42, 0.12);
  --border-w: 2.5px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 3px 3px 0 var(--shadow-color);
  --shadow-md: 5px 5px 0 var(--shadow-color);
  --shadow-lg: 7px 7px 0 var(--shadow-color);
  --font-display: "Space Grotesk", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* per-category identity — flat, saturated, unmistakable */
  --cat-panel: #0092A0;
  --cat-akun: #C98F00;
  --cat-script: #D6237E;
  --cat-bot: var(--primary);
  --cat-default: var(--text-muted);

  --page-bg-image: radial-gradient(circle, rgba(20, 17, 13, 0.08) 1.5px, transparent 1.5px);
  --page-bg-size: 22px 22px;
}

* {
  box-sizing: border-box;
  /* Hilangkan kotak biru bawaan browser mobile saat tombol/link ditekan */
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

html {
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page-bg-image) 0 0 / var(--page-bg-size), var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

/* Pastikan semua elemen yang bisa ditekan bebas dari highlight biru bawaan mobile */
button, .btn, .icon-btn, .music-btn, input, select, textarea,
[role="button"], .product-card, .featured-card, .sort-opt,
.color-swatch-btn, .color-preset, .cal-nav, .cal-act, .back-btn,
.promo-banner, .lp-category {
  -webkit-tap-highlight-color: transparent;
}

/* AOS: bantu browser render animasi scroll-reveal lebih mulus (kurangi patah-patah) */
[data-aos] {
  will-change: transform, opacity;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }

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

/* ---- Navbar ---- */
.navbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 20px;
  padding-top: calc(13px + env(safe-area-inset-top, 0px));
  background: var(--bg-main);
  border-bottom: var(--border-w) solid var(--border);
}
.navbar .logo {
  font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
  color: var(--text-main); display: inline-flex; align-items: center;
}
.navbar .logo::before {
  content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 8px;
  background: var(--primary); border: 2px solid var(--border); transform: rotate(8deg);
}
.navbar .logo span { color: var(--primary); }
/* Nama toko + tombol musik dikelompokkan supaya tombol nempel di samping nama */
.navbar .brand-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.music-btn {
  width: 30px; height: 30px; flex: none; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-field); color: var(--text-muted);
  border: var(--border-w) solid var(--border); border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, color 0.1s ease;
}
.music-btn .music-off { opacity: 1; }
.music-btn.playing { background: var(--accent); color: #14110D; }
.music-btn.playing .music-off { opacity: 0; }
.music-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--shadow-color); }
.music-btn-float { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 12px; z-index: 80; }
.navbar nav { display: flex; gap: 6px; }
.navbar nav a {
  padding: 7px 13px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 13.5px; font-weight: 600;
  border: var(--border-w) solid transparent;
}
.navbar nav a.active { color: var(--text-main); background: var(--accent-soft); border-color: var(--border); }
.navbar nav a:hover { color: var(--text-main); }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-field); border: var(--border-w) solid var(--border); cursor: pointer; color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow-color); } }
.icon-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-color); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px;
  border: var(--border-w) solid var(--border); cursor: pointer; font-family: var(--font-body);
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}
@media (hover: hover) and (pointer: fine) { .btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow-color); } }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-color); }
.btn-primary { background: var(--primary); color: #FFFFFF; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: var(--bg-card); color: var(--text-main); }
.btn-ghost:hover { background: var(--bg-active); }
.btn-danger { background: var(--bg-card); color: var(--danger); border-color: var(--danger); box-shadow: 3px 3px 0 var(--danger); }
.btn-danger:hover { background: var(--danger); color: #14110D; box-shadow: 4px 4px 0 var(--danger); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-block { width: 100%; }
.btn:focus-visible, .icon-btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2.5px solid var(--primary); outline-offset: 2px;
}

/* ---- Cards ---- */
.card { background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-md); }
.card-flat { background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); padding: 16px; }

/* ---- Category swatch: the shared product-visual language ----
   A flat, saturated block in each category's own hue with a centered
   glyph — an intentional placeholder, never an empty gray box. */
.cat-visual {
  --cat-c: var(--cat-default);
  background: var(--cat-c);
  color: var(--bg-main);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  position: relative;
  border-bottom: var(--border-w) solid var(--border);
}
.cat-visual.cat-panel { --cat-c: var(--cat-panel); }
.cat-visual.cat-akun { --cat-c: var(--cat-akun); }
.cat-visual.cat-script { --cat-c: var(--cat-script); }
.cat-visual.cat-bot { --cat-c: var(--cat-bot); }
.cat-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-visual svg { width: 32%; height: 32%; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---- Catalog: product card is the unit, on desktop and mobile alike ---- */
.catalog-eyebrow {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-main); margin: 28px 0 12px;
  font-family: var(--font-mono);
}
.catalog-eyebrow:first-child { margin-top: 0; }

.product-card {
  --cat-c: var(--cat-default);
  background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden;
  display: flex; flex-direction: column; cursor: pointer;
  border: var(--border-w) solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
@media (hover: hover) and (pointer: fine) { .product-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--shadow-color); } }
.product-card:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow-color); }
.product-card .cat-visual { height: 104px; }
.product-card .cat-visual svg { width: 38px; height: 38px; }

.product-card .body { padding: 10px 11px 11px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.product-card .cat-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-card .cat {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-main);
  font-family: var(--font-mono); background: var(--cat-c); color: var(--bg-main);
  padding: 1px 6px; border: 1.5px solid var(--border); border-radius: 4px;
}
.product-card .rating { font-size: 10.5px; color: var(--text-muted); font-weight: 600; }
.product-card .name {
  font-family: var(--font-display); font-size: 13.5px; font-weight: 700; line-height: 1.3; color: var(--text-main);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
.product-card .desc {
  font-size: 12.5px; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .price-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: auto; padding-top: 4px; }
.product-card .price { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-main); }
.product-card .avail { font-size: 10.5px; color: var(--text-muted); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.product-card .avail .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); border: 1.5px solid var(--border); flex-shrink: 0; }
.product-card .avail.low .dot { background: var(--warn); }
.product-card .avail.out { color: var(--text-faint); }
.product-card .avail.out .dot { background: var(--text-faint); }
/* Detail vs. Beli must not read as the same weight: Detail is quiet and
   narrow, Beli is the wide, solid, unmistakable action. */
.product-card .actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-top: 12px; }
.product-card .actions .btn-ghost { padding: 10px 6px; font-size: 12px; font-weight: 700; color: var(--text-main); box-shadow: 2px 2px 0 var(--shadow-color); }
.product-card .actions .btn-primary { padding: 10px 6px; font-size: 13px; font-weight: 700; box-shadow: 2px 2px 0 var(--shadow-color); }

.product-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 4px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.product-card { text-decoration: none; color: inherit; min-width: 0; }
.product-card.is-out { opacity: 0.6; }

/* Featured: one product, more room — horizontal on desktop, still a
   vertical card (not a marketing banner) on mobile. */
.featured-card {
  --cat-c: var(--cat-default);
  display: grid; grid-template-columns: 1fr; background: var(--bg-card);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; margin-bottom: 8px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
@media (hover: hover) and (pointer: fine) { .featured-card:hover { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 var(--shadow-color); } }
.featured-card:active { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--shadow-color); }
.featured-card .cat-visual { aspect-ratio: 16 / 9; max-height: 200px; }
.featured-card .cat-visual svg { width: 22%; height: 22%; max-width: 56px; max-height: 56px; }
.featured-card .body { padding: 18px 20px 20px; gap: 7px; }
.featured-card .name { font-size: 21px; min-height: 0; -webkit-line-clamp: 2; }
.featured-card .desc { font-size: 13.5px; -webkit-line-clamp: 2; }
.featured-card .price { font-size: 18px; }
.featured-card .actions { max-width: 260px; }

@media (min-width: 640px) {
  .featured-card { grid-template-columns: 1.1fr 1fr; }
  .featured-card .cat-visual { aspect-ratio: auto; height: 100%; max-height: none; border-bottom: none; border-right: var(--border-w) solid var(--border); }
}

/* Mobile: featured card dikompres supaya tidak mendominasi layar — max-height
   dipakai sebagai batas keras di atas aspect-ratio (bukan menggantikannya),
   supaya tetap terkontrol walau aspect-ratio tidak/telat diterapkan. Breakpoint
   dilebarkan ke 640px supaya mencakup hampir semua ukuran layar ponsel. */
@media (max-width: 640px) {
  .featured-card .cat-visual { max-height: 130px; }
  .featured-card .cat-visual svg { width: 34px; height: 34px; }
  .featured-card .body { padding: 14px 16px 16px; gap: 5px; }
  .featured-card .name { font-size: 17px; }
  .featured-card .desc { font-size: 12.5px; }
  .featured-card .price { font-size: 16px; }
  .product-card .cat-visual { height: 92px; }
  .product-card .cat-visual svg { width: 32px; height: 32px; }
}

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; color: var(--text-main); font-weight: 700; }
.field input, .field select, .field textarea {
  background: var(--bg-field); border: var(--border-w) solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; color: var(--text-main); font-size: 14px; outline: none; font-family: var(--font-body);
  box-shadow: var(--shadow-sm);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 4px 4px 0 var(--primary); }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: color-mix(in srgb, var(--shadow-color) 55%, transparent);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
  padding: 20px;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; width: 100%; max-width: 400px;
  transform: translateY(8px); transition: transform 0.15s ease;
  max-height: calc(100vh - 40px); overflow-y: auto;
  box-shadow: 8px 8px 0 var(--shadow-color);
}
.modal-overlay.open .modal { transform: translateY(0); }

/* ---- Bottom nav (mobile) ---- */
.bottom-nav {
  position: fixed; left: 12px; right: 12px; z-index: 40;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: none; justify-content: space-around;
  background: var(--bg-card);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 700; color: var(--text-faint); padding: 6px 8px; border-radius: var(--radius-sm); flex: 1; border: 1.5px solid transparent; }
.bottom-nav a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bottom-nav a.active { color: var(--text-main); background: var(--accent); border-color: var(--border); }

@media (max-width: 720px) {
  .navbar { padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .navbar nav { display: none; }
  .navbar .logo { font-size: 15.5px; }
  /* inline-block (bukan inline-flex) supaya text-overflow: ellipsis benar-benar jalan dan teks tidak kepotong di kiri-kanan */
  .navbar #loginBtn, .navbar .btn-primary { display: inline-block; text-align: center; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #balancePill { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-nav { display: flex; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
}

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-sm); font-size: 11.5px; font-weight: 700; border: 1.5px solid var(--border); font-family: var(--font-mono); }
.badge-user { background: var(--bg-field); color: var(--text-muted); }
.badge-developer { background: var(--accent); color: #14110D; }
.badge-admin { background: var(--danger); color: #14110D; }

.state-message {
  grid-column: 1 / -1; text-align: center; padding: 40px 20px;
  color: var(--text-muted); font-size: 14px; line-height: 1.6;
}
.state-error { color: var(--danger); }

/* Screen-reader-only label: visible search/sort controls already have a
   placeholder or visible text, this just gives assistive tech a name. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Lock background scroll while a modal is open, without layout shift. */
body.modal-open { overflow: hidden; }

/* ---- Skeleton loading state — mirrors the real product card shape ---- */
.skeleton-block, .skeleton-line {
  background: linear-gradient(90deg, var(--bg-field) 25%, var(--bg-active) 50%, var(--bg-field) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card { cursor: default; }
.skeleton-card .skeleton-block { width: 100%; height: 100%; border-radius: 0; }
.skeleton-card:hover { transform: none; box-shadow: var(--shadow-md); }
.skeleton-line { height: 10px; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-block, .skeleton-line { animation: none; }
}

.muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.toast-stack { position: fixed; top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; left: 16px; z-index: 200; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.toast {
  background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 13px; min-width: 220px; max-width: 320px; font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(10px, -4px); } to { opacity: 1; transform: translate(0, 0); } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  color: #14110D; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--accent); border: var(--border-w) solid var(--border);
  border-radius: var(--radius-sm); padding: 5px 12px 5px 9px;
  width: fit-content; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
}
.hero-badge .tag {
  width: 6px; height: 6px; border-radius: 50%; background: var(--success);
  border: 1.5px solid var(--border);
  padding: 0;
}

.page-banner {
  padding: 22px 0 20px;
  margin-bottom: 4px;
}
.page-banner h2 {
  font-family: var(--font-display); font-size: 26px; margin: 0 0 6px; max-width: 20ch;
  color: var(--text-main);
}
.page-banner p { color: var(--text-muted); margin: 0; max-width: 52ch; font-size: 13.5px; line-height: 1.5; font-weight: 500; }

@media (max-width: 640px) {
  .page-banner { padding: 14px 0 14px; }
  .page-banner h2 { font-size: 20px; }
  .page-banner p { font-size: 13px; }
}

/* ---- Banner promo (Kelola Toko > Banner Promo) ---- */
.promo-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--primary); color: #fff; text-decoration: none;
  border: var(--border-w) solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow-md);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
@media (hover: hover) and (pointer: fine) { .promo-banner:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--shadow-color); } }
.promo-banner:active { transform: none; }
.promo-banner-copy { flex: 1 1 240px; min-width: 0; }
.promo-banner-copy .hero-badge { background: #fff; }
.promo-banner-copy h3 { font-family: var(--font-display); font-size: 21px; margin: 0 0 6px; max-width: 22ch; color: #fff; }
.promo-banner-copy p { font-size: 13.5px; margin: 0 0 14px; max-width: 38ch; color: rgba(255, 255, 255, 0.85); }
.promo-banner-copy .btn-primary { background: #fff; color: var(--primary); border-color: #fff; display: inline-flex; }
.promo-banner-img {
  width: 190px; height: 130px; object-fit: cover; flex-shrink: 0;
  border: var(--border-w) solid var(--border); border-radius: var(--radius-md);
}
@media (max-width: 640px) {
  .promo-banner { padding: 16px; }
  .promo-banner-img { width: 100%; height: 140px; order: -1; }
}

/* =======================================================
   Landing page components (index.html)
   ======================================================= */

.lp-hero {
  padding: 40px 20px 44px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: start;
}
.lp-hero-copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.lp-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--text-main); font-family: var(--font-mono);
  border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); padding: 5px 12px 5px 9px;
  background: var(--bg-card); box-shadow: var(--shadow-sm);
}
.lp-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); border: 1.5px solid var(--border); }
.lp-hero h1 { font-size: 34px; line-height: 1.16; margin: 0; max-width: 16ch; }
.lp-hero-sub { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin: 0; max-width: 46ch; font-weight: 500; }
.lp-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* manifest ticket: a deployment record, not a fake browser chrome window */
.lp-panel {
  background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.lp-panel-bar {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 12px 16px; border-bottom: var(--border-w) solid var(--border); background: var(--accent);
}
.lp-panel-bar .label { font-size: 11px; font-weight: 700; color: #14110D; letter-spacing: 0.03em; text-transform: uppercase; font-family: var(--font-mono); }
.lp-panel-bar .id { font-family: var(--font-mono); font-size: 11px; color: #14110D; opacity: 0.7; }
.lp-panel-body { padding: 4px 16px 6px; font-size: 13.5px; }
.lp-panel-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1.5px solid var(--border);
}
.lp-panel-row:last-child { border-bottom: none; }
.lp-panel-row .name { color: var(--text-main); font-weight: 600; }
.lp-panel-row .status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.lp-panel-row .status .dot { width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--border); }
.lp-panel-row .status.up .dot { background: var(--success); }
.lp-panel-row .status.pending .dot { background: var(--warn); }
.lp-panel-row .status.up { color: var(--success); }
.lp-panel-row .status.pending { color: var(--text-main); }
.lp-panel-foot {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 16px;
  border-top: var(--border-w) solid var(--border); background: var(--bg-field);
  font-size: 13px; font-weight: 600;
}
.lp-panel-foot strong { font-weight: 800; color: var(--text-main); font-size: 14.5px; }

.lp-section { padding: 44px 20px; border-top: var(--border-w) solid var(--border); }
.lp-section-head { max-width: 620px; margin: 0 0 24px; }
.lp-section-head h2 { font-size: 22px; margin: 0 0 8px; }
.lp-section-head p { color: var(--text-muted); font-size: 14px; margin: 0; line-height: 1.6; font-weight: 500; }

.lp-categories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-category {
  background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-md);
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
@media (hover: hover) and (pointer: fine) { .lp-category:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow-color); } }
.lp-category:active { transform: none; }
.lp-category svg { width: 19px; height: 19px; color: var(--primary); }
.lp-category h3 { font-size: 14px; margin: 0; font-weight: 700; }
.lp-category p { font-size: 12.5px; color: var(--text-muted); margin: 0; line-height: 1.5; font-weight: 500; }

.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.lp-step { position: relative; padding: 18px; background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.lp-step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; font-size: 12px; font-weight: 800; color: #14110D;
  background: var(--accent); border: 1.5px solid var(--border); border-radius: 6px; margin-bottom: 10px;
  font-family: var(--font-mono);
}
.lp-step h3 { font-size: 14.5px; margin: 0 0 5px; font-weight: 700; }
.lp-step p { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.5; font-weight: 500; }

.lp-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-fact { background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-sm); }
.lp-fact .k { font-size: 22px; font-weight: 800; color: var(--text-main); font-family: var(--font-display); }
.lp-fact .v { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; font-weight: 500; }

.lp-faq { display: flex; flex-direction: column; gap: 12px; }
.lp-faq details { background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-md); padding: 15px 18px; box-shadow: var(--shadow-sm); }
.lp-faq summary { cursor: pointer; font-weight: 700; font-size: 13.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--text-main); font-size: 16px; flex-shrink: 0; font-weight: 800; }
.lp-faq details[open] summary::after { content: "\2212"; }
.lp-faq details p { color: var(--text-muted); font-size: 13px; line-height: 1.6; margin: 10px 0 2px; font-weight: 500; }

.lp-cta {
  margin: 0 20px 44px; padding: 30px 26px; border-radius: var(--radius-md);
  background: var(--accent); border: var(--border-w) solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.lp-cta h2 { margin: 0 0 6px; font-size: 19px; color: #14110D; }
.lp-cta p { margin: 0; color: #14110D; opacity: 0.75; font-size: 13.5px; font-weight: 600; }
.lp-cta .btn-primary { background: #14110D; color: var(--accent); border-color: #14110D; box-shadow: 3px 3px 0 rgba(20,17,13,0.4); }

.lp-footer { border-top: var(--border-w) solid var(--border); padding: 30px 20px 24px; }
.lp-footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 22px; }
.lp-footer-brand .logo { display: block; margin-bottom: 8px; }
.lp-footer-brand p { color: var(--text-muted); font-size: 13px; max-width: 32ch; margin: 0; line-height: 1.6; font-weight: 500; }
.lp-footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.lp-footer-col h4 { font-size: 11.5px; color: var(--text-main); margin: 0 0 10px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; font-family: var(--font-mono); }
.lp-footer-col a { display: block; font-size: 13.5px; padding: 4px 0; color: var(--text-main); font-weight: 600; }
.lp-footer-col a:hover { color: var(--primary); }
.lp-footer-bottom { color: var(--text-faint); font-size: 12px; border-top: 1.5px solid var(--border); padding-top: 16px; font-weight: 500; }

@media (max-width: 860px) {
  .lp-hero { grid-template-columns: 1fr; padding-top: 24px; gap: 22px; }
  .lp-categories { grid-template-columns: repeat(2, 1fr); }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-facts { grid-template-columns: 1fr; }
  .lp-hero h1 { font-size: 26px; max-width: none; }
  .lp-footer-grid { flex-direction: column; }
}

@media (max-width: 640px) {
  .lp-hero { padding: 18px 20px 26px; }
  .lp-hero h1 { font-size: 23px; }
  .lp-hero-sub { font-size: 14px; }
  .lp-panel { display: none; }
  .lp-section { padding: 32px 20px; }
  .lp-section-head { margin-bottom: 18px; }
  .lp-section-head h2 { font-size: 19px; }
  .lp-cta { padding: 22px 20px; margin: 0 16px 32px; }
}

/* Tombol Kembali — disisipkan otomatis oleh initBackButton() di app.js (semua halaman kecuali landing) */
.back-row { max-width: 1120px; margin: 12px auto 0; padding: 0 20px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; font-size: 13px; font-weight: 700; font-family: inherit;
  color: var(--text-main); background: var(--bg-card);
  border: var(--border-w) solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 2px 2px 0 var(--shadow-color); cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}
.back-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .back-btn:hover { background: var(--bg-active); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--shadow-color); } }
.back-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--shadow-color); }
.back-row.in-main { max-width: none; margin: 0 0 12px; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---- Hamburger menu (khusus /manage, tautan cepat: Developer, Keluar) ---- */
.hb-wrap { position: relative; }
.hb-btn { display: flex; }
.hb-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.hb-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; min-width: 190px;
  background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.hb-menu[hidden] { display: none; }
.hb-menu a, .hb-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 700;
  color: var(--text-main); background: none; border: var(--border-w) solid transparent; cursor: pointer;
  font-family: var(--font-body);
}
.hb-menu a svg, .hb-menu button svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.hb-menu a:hover, .hb-menu button:hover { background: var(--bg-active); border-color: var(--border); }
.hb-menu .hb-logout { color: var(--danger); }
.hb-menu .hb-sep { height: var(--border-w); background: var(--border); margin: 4px 2px; border: none; }
.hb-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text-faint); }

/* ---- Mode Maintenance: halaman penuh untuk pengunjung biasa ---- */
.maintenance-block {
  position: fixed; inset: 0; z-index: 999; background: var(--bg-main);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.maintenance-card {
  max-width: 380px; width: 100%; text-align: center; background: var(--bg-card);
  border: var(--border-w) solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 32px 26px;
}
.maintenance-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: var(--radius-md);
  background: var(--accent); border: var(--border-w) solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
}
.maintenance-icon svg { width: 28px; height: 28px; fill: #14110D; }
.maintenance-card h1 { font-family: var(--font-display); font-size: 21px; margin: 0 0 10px; color: var(--text-main); }
.maintenance-card p { color: var(--text-muted); font-size: 14px; line-height: 1.55; margin: 0 0 22px; }
.maintenance-card .btn { width: 100%; }

/* =======================================================
   Landing page — polesan premium (override, hanya .lp-*)
   Ritme lega, tipografi lebih tegas, satu momen animasi masuk.
   ======================================================= */
.lp-hero, .lp-section, .lp-cta, .lp-footer { max-width: 1120px; margin-left: auto; margin-right: auto; }

.lp-hero { padding: 64px 20px 72px; gap: 56px; align-items: center; }
.lp-hero-copy { gap: 22px; }
.lp-hero h1 {
  font-size: clamp(30px, 5.2vw, 52px); line-height: 1.06; letter-spacing: -0.035em; max-width: 14ch; text-wrap: balance;
}
.lp-hero-sub { font-size: 16.5px; line-height: 1.65; max-width: 44ch; color: var(--text-muted); }
.lp-hero-actions { gap: 14px; margin-top: 4px; }
.lp-hero-actions .btn { padding: 13px 24px; font-size: 15px; }
.lp-status { box-shadow: none; background: transparent; border-width: 1.5px; font-weight: 600; }

.lp-panel { border-radius: var(--radius-lg); transform: rotate(1.2deg); }
.lp-panel-bar { padding: 14px 18px; }
.lp-panel-body { padding: 6px 18px 8px; font-size: 14px; }
.lp-panel-row { padding: 14px 0; border-bottom: 1.5px dashed rgba(20, 17, 13, 0.35); }
.lp-panel-foot { padding: 14px 18px; }

.lp-section { padding: 72px 20px; border-top: 1.5px solid rgba(20, 17, 13, 0.22); }
.lp-section-head { max-width: 560px; margin-bottom: 34px; }
.lp-section-head h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.025em; line-height: 1.12; margin-bottom: 12px; text-wrap: balance; }
.lp-section-head p { font-size: 15.5px; line-height: 1.65; }

.lp-categories, .lp-steps, .lp-facts { gap: 20px; }
.lp-category, .lp-step, .lp-fact, .lp-faq details { border-radius: var(--radius-lg); }
.lp-category { padding: 22px; gap: 12px; }
.lp-category h3 { font-size: 16px; letter-spacing: -0.01em; }
.lp-category p { font-size: 13.5px; line-height: 1.6; }
.lp-step { padding: 24px; }
.lp-step::before { width: 34px; height: 34px; font-size: 13px; border-radius: 10px; margin-bottom: 16px; }
.lp-step h3 { font-size: 16.5px; letter-spacing: -0.01em; margin-bottom: 8px; }
.lp-step p { font-size: 14px; line-height: 1.6; }
.lp-fact { padding: 26px 24px; }
.lp-fact .k { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.03em; line-height: 1.05; }
.lp-fact .v { font-size: 13.5px; margin-top: 8px; }

.lp-faq { gap: 14px; max-width: 760px; }
.lp-faq details { padding: 18px 22px; box-shadow: none; border-width: 2px; transition: background .15s ease; }
.lp-faq details[open] { background: var(--bg-active); }
.lp-faq summary { font-size: 15px; }
.lp-faq details p { font-size: 14px; line-height: 1.7; }

.lp-cta {
  margin-top: 8px; margin-bottom: 72px; padding: 44px 40px; border-radius: 20px;
  background: var(--text-main); border-color: var(--text-main); box-shadow: 8px 8px 0 var(--accent);
  width: calc(100% - 40px);
}
.lp-cta h2 { color: #FBF3E1; font-size: clamp(22px, 3.2vw, 30px); letter-spacing: -0.025em; }
.lp-cta p { color: #FBF3E1; opacity: 0.7; font-size: 15px; }
.lp-cta .btn-primary { background: var(--accent); color: #14110D; border-color: var(--accent); box-shadow: none; padding: 13px 26px; }
.lp-cta .btn-ghost { background: transparent; color: #FBF3E1; border-color: rgba(251, 243, 225, 0.55); box-shadow: none; }

.lp-footer { border-top: 1.5px solid rgba(20, 17, 13, 0.22); padding: 44px 20px 28px; }
.lp-footer-bottom { border-top-width: 1px; }

@media (prefers-reduced-motion: no-preference) {
  .lp-hero-copy > * { animation: lp-rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .lp-hero-copy > *:nth-child(2) { animation-delay: .08s; }
  .lp-hero-copy > *:nth-child(3) { animation-delay: .16s; }
  .lp-hero-copy > *:nth-child(4) { animation-delay: .24s; }
  .lp-panel { animation: lp-rise .8s .2s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes lp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; } }

@media (max-width: 860px) {
  .lp-hero { padding: 36px 20px 44px; gap: 32px; }
  .lp-panel { transform: none; }
  .lp-section { padding: 52px 20px; }
}
@media (max-width: 640px) {
  .lp-hero h1 { font-size: 31px; }
  .lp-hero-sub { font-size: 15px; }
  .lp-section { padding: 44px 20px; }
  .lp-section-head { margin-bottom: 24px; }
  .lp-cta { padding: 28px 22px; margin-bottom: 44px; width: calc(100% - 32px); box-shadow: 5px 5px 0 var(--accent); }
}

/* system.log — kartu log di landing page. Mengikuti bahasa visual yang sama dengan
   .lp-panel (krem, border tebal, bayangan keras); warna bar bisa dipilih dari admin. */
.lp-log-section { border-top: none; padding-top: 0; padding-bottom: 44px; }
.lp-log {
  --log-bar: var(--accent); --log-ink: #14110D;
  max-width: 660px; overflow: hidden; color: var(--text-main); font-family: var(--font-mono);
  background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.lp-log[data-bar="primary"] { --log-bar: var(--primary); --log-ink: #FFFFFF; }
.lp-log[data-bar="success"] { --log-bar: var(--success); --log-ink: #FFFFFF; }
.lp-log[data-bar="pink"] { --log-bar: var(--cat-script); --log-ink: #FFFFFF; }
.lp-log[data-bar="cyan"] { --log-bar: var(--cat-panel); --log-ink: #FFFFFF; }
.lp-log[data-bar="dark"] { --log-bar: #14110D; --log-ink: #FBF3E1; }

.lp-log-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--log-bar); border-bottom: var(--border-w) solid var(--border); }
.lp-log-bar .d { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #14110D; }
.lp-log-bar .r { background: #FF5F57; } .lp-log-bar .y { background: #FEBC2E; } .lp-log-bar .g { background: #28C840; }
.lp-log-title { margin-left: 10px; font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--log-ink); }
.lp-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  color: var(--success); background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 99px; padding: 2px 9px 2px 7px;
}
.lp-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(15, 157, 79, .55); }

.lp-log-body { padding: 18px 18px 14px; min-height: 176px; font-size: 12.5px; line-height: 1.55; display: grid; gap: 9px; align-content: start; }
.lp-log .ln { display: grid; grid-template-columns: 62px 42px 1fr; gap: 10px; align-items: baseline; opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s ease; }
.lp-log .ln.in { opacity: 1; transform: none; }
.lp-log .ln.cmd span { grid-column: 2 / -1; color: var(--text-main); font-weight: 700; }
.lp-log .ln.prompt { grid-template-columns: auto auto 1fr; gap: 8px; align-items: center; }
.lp-log .ln span { overflow-wrap: anywhere; }
.lp-log time { color: var(--text-faint); font-variant-numeric: tabular-nums; }
.lp-log .tag { font-weight: 800; }
.lp-log .tag.ok { color: var(--success); }
.lp-log .tag.warn { color: var(--accent); }
.lp-log .tag.bad, .lp-log .pill.down { color: var(--danger); }
.lp-log .pr { color: var(--text-faint); }
.lp-log .cur { width: 8px; height: 15px; background: var(--text-main); }

.lp-log-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: var(--border-w) solid var(--border); background: var(--bg-field); }
.lp-log .st { padding: 14px 16px 15px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lp-log .st + .st { border-left: 1.5px solid var(--border); }
.lp-log .lb { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.lp-log .val { font-size: 17px; font-weight: 800; color: var(--text-main); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.lp-log .pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; padding: 3px 10px 3px 8px; border-radius: 99px; border: 1.5px solid var(--border); background: var(--bg-card); color: var(--text-muted); }
.lp-log .pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lp-log .pill.up { color: var(--success); background: var(--success-soft); }
.lp-log .pill.down { background: var(--danger-soft); }
.lp-log .spark { width: 100%; height: 22px; margin-top: -2px; overflow: visible; }
.lp-log .spark polyline { fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

@media (prefers-reduced-motion: no-preference) {
  .lp-log .cur { animation: lp-blink 1.1s steps(1) infinite; }
  .lp-live i { animation: lp-pulse 2s ease-out infinite; }
}
@keyframes lp-blink { 50% { opacity: 0; } }
@keyframes lp-pulse { 70% { box-shadow: 0 0 0 7px rgba(15, 157, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(15, 157, 79, 0); } }
@media (max-width: 640px) {
  .lp-log { box-shadow: var(--shadow-md); }
  .lp-log-body { padding: 16px 14px 12px; font-size: 11.5px; min-height: 160px; }
  .lp-log .ln { grid-template-columns: 56px 38px 1fr; gap: 8px; }
  .lp-log .st { padding: 12px 12px 13px; }
  .lp-log .val { font-size: 15px; }
}


/* ---- Bottom sheet pilihan: dipakai tombol Urutkan (store) dan SEMUA <select> lewat app.js ---- */
.sort-overlay { position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-end; justify-content: center; background: color-mix(in srgb, var(--shadow-color) 55%, transparent); animation: sortFade .15s ease; }
.sort-sheet { width: 100%; max-width: 420px; background: var(--bg-card); border: var(--border-w) solid var(--border); border-bottom: none; border-radius: 20px 20px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 0 var(--shadow-color); animation: sortUp .22s cubic-bezier(.2,.9,.3,1); }
.sort-grip { width: 44px; height: 5px; border-radius: 99px; background: var(--border); opacity: .35; margin: 0 auto 12px; }
.sort-sheet h3 { font-family: var(--font-display); font-size: 18px; margin: 0 4px 10px; color: var(--text-main); }
.sort-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: var(--bg-card); border: var(--border-w) solid transparent; border-radius: var(--radius-sm);
  padding: 11px 12px; margin-bottom: 6px; font-family: var(--font-body); color: var(--text-main);
  transition: background .1s ease, transform .1s ease;
}
.sort-opt:hover { background: var(--bg-field); }
.sort-opt:active { transform: scale(.985); }
.sort-opt .ico { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: var(--border-w) solid var(--border); border-radius: 10px; background: var(--bg-field); }
.sort-opt .ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sort-opt .txt { flex: 1; min-width: 0; }
.sort-opt .txt b { display: block; font-size: 14px; }
.sort-opt .txt small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.sort-opt .tick { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: var(--border-w) solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: transparent; }
.sort-opt.sel { background: var(--bg-field); border-color: var(--border); box-shadow: var(--shadow-sm); }
.sort-opt.sel .ico { background: var(--accent); color: #14110D; }
.sort-opt.sel .tick { background: var(--accent); color: #14110D; }
@media (min-width: 640px) { .sort-overlay { align-items: center; } .sort-sheet { border-radius: 20px; border-bottom: var(--border-w) solid var(--border); box-shadow: var(--shadow-lg); padding-top: 20px; } .sort-grip { display: none; } }
@keyframes sortUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes sortFade { from { opacity: 0; } to { opacity: 1; } }

.sort-overlay { z-index: 400; }
.sort-sheet.pick { display: flex; flex-direction: column; max-height: min(78vh, 560px); }
.sort-sheet.pick .pick-list { overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px 4px; }
.pick-search {
  width: 100%; margin: 0 0 10px; padding: 10px 12px; background: var(--bg-field); color: var(--text-main);
  border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); font: 600 14px var(--font-body);
}
.sort-opt.no-ico { padding: 13px 12px; }
.sort-opt.no-ico .txt b { font-size: 15px; }
.sort-opt:disabled { opacity: .45; cursor: not-allowed; }

/* ---- Color picker kustom (ganti native <input type="color">) ---- */
.color-picker { position: relative; }
.color-swatch-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: var(--bg-field); border: var(--border-w) solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 12px; cursor: pointer; box-shadow: var(--shadow-sm); font-family: var(--font-mono);
}
.color-swatch-btn:focus-visible { outline: none; border-color: var(--primary); box-shadow: 4px 4px 0 var(--primary); }
.color-swatch-dot {
  width: 26px; height: 26px; border-radius: 6px; border: var(--border-w) solid var(--border);
  flex-shrink: 0; background: var(--picked, #2B54E2);
}
.color-swatch-hex { font-size: 13.5px; color: var(--text-main); font-weight: 600; letter-spacing: 0.3px; }
.color-popover {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; width: 232px;
  background: var(--bg-card); border: var(--border-w) solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 12px;
}
.color-popover[hidden] { display: none; }
.color-popover-preview { height: 34px; border-radius: var(--radius-sm); border: var(--border-w) solid var(--border); margin-bottom: 10px; }
.color-popover-hex {
  width: 100%; background: var(--bg-field); border: var(--border-w) solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; color: var(--text-main); font-size: 13.5px; font-family: var(--font-mono); outline: none;
  box-shadow: var(--shadow-sm); margin-bottom: 10px; text-transform: uppercase;
}
.color-popover-hex:focus { border-color: var(--primary); box-shadow: 4px 4px 0 var(--primary); }
.color-popover-presets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 12px; }
.color-preset {
  width: 100%; aspect-ratio: 1; border-radius: 6px; border: var(--border-w) solid var(--border);
  background: var(--c); cursor: pointer; padding: 0;
}
.color-preset:active { transform: translate(1px, 1px); }
.color-popover-actions { display: flex; gap: 8px; }
.color-popover-actions .btn { flex: 1; padding: 8px 10px; font-size: 13px; }

/* Kalender (input tanggal) — memakai sheet yang sama */
.sort-sheet.cal { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.cal-title { font-family: var(--font-display); font-size: 16px; color: var(--text-main); }
.cal-nav {
  width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; font-size: 22px; line-height: 1; font-weight: 800;
  background: var(--bg-field); color: var(--text-main); border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.cal-nav:active { transform: translate(2px, 2px); box-shadow: none; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { text-align: center; font: 700 11px var(--font-mono); color: var(--text-muted); padding: 4px 0; text-transform: uppercase; }
.cal-day {
  aspect-ratio: 1; display: grid; place-items: center; cursor: pointer; font: 700 14px var(--font-body); color: var(--text-main);
  background: var(--bg-card); border: var(--border-w) solid transparent; border-radius: 10px; padding: 0;
}
.cal-day:hover { background: var(--bg-field); }
.cal-day.today { border-color: var(--border); }
.cal-day.sel { background: var(--accent); color: #14110D; border-color: var(--border); box-shadow: var(--shadow-sm); }
.cal-day:disabled { opacity: .3; cursor: not-allowed; }
.cal-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.cal-act {
  flex: 1; padding: 11px 12px; cursor: pointer; font: 700 14px var(--font-body); color: var(--text-main);
  background: var(--bg-field); border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.cal-act:active { transform: translate(2px, 2px); box-shadow: none; }
