/* Warung Digital with GIS — gaya "kios enamel": hijau warung, putih enamel, merah cabai, kunyit */
:root {
  --primary: #0F5132;
  --primary-2: #0A3B24;
  --primary-soft: #E2EFE6;
  --bg: #F7F8F3;
  --surface: #FFFFFF;
  --surface-2: #EEF2EA;
  --ink: #14211B;
  --ink-2: #56645B;
  --line: #DDE3D9;
  --red: #D62828;
  --red-soft: #FBE4E1;
  --yellow: #F2B705;
  --yellow-soft: #FDF3CF;
  --blue: #2F6FDB;
  --blue-soft: #E3ECFB;
  --focus: #F2B705;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 33, 27, .06), 0 6px 20px -8px rgba(20, 33, 27, .14);
  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #2E9E63;
    --primary-2: #4CC083;
    --primary-soft: #183526;
    --bg: #0D1411;
    --surface: #151F1A;
    --surface-2: #1B2721;
    --ink: #E7EEE9;
    --ink-2: #9DAAA2;
    --line: #28362F;
    --red: #F0625A;
    --red-soft: #3A1B1A;
    --yellow: #F5C63A;
    --yellow-soft: #3A3113;
    --blue: #74A2F0;
    --blue-soft: #18263D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--font-body);
  min-height: 100vh; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: var(--primary-2); } }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .4em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .75em; }
small { font-size: .82em; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.danger { color: var(--red); }
.nowrap { white-space: nowrap; }
.pad { padding: 1rem; margin: 0; }
.grow { flex: 1; min-width: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--ink-2); margin: 0 0 .2rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Awning (tenda warung) ---------- */
.awning {
  height: 14px;
  background:
    linear-gradient(135deg, var(--bg) 25%, transparent 25%) 0 7px / 28px 14px repeat-x,
    linear-gradient(225deg, var(--bg) 25%, transparent 25%) 0 7px / 28px 14px repeat-x,
    repeating-linear-gradient(90deg, #0F5132 0 28px, #F7F8F3 28px 56px);
}
@media (prefers-color-scheme: dark) {
  .awning { background:
    linear-gradient(135deg, var(--bg) 25%, transparent 25%) 0 7px / 28px 14px repeat-x,
    linear-gradient(225deg, var(--bg) 25%, transparent 25%) 0 7px / 28px 14px repeat-x,
    repeating-linear-gradient(90deg, #1F7A4C 0 28px, #DDE3D9 28px 56px); }
}

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: .6rem 1rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; white-space: nowrap; }
.brand img { border-radius: 9px; }
.brand b { color: var(--red); font-weight: 800; }
.mainnav { display: flex; gap: .25rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { padding: .45rem .75rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.mainnav a:hover { color: var(--ink); background: var(--surface-2); }
.mainnav a[aria-current="page"] { color: #fff; background: var(--primary); }
.top-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; gap: .5rem; }
  .mainnav { order: 3; flex-basis: 100%; margin: 0 -1rem; padding: 0 1rem .15rem; }
}

.icon-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .count { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }

/* notifikasi */
.notif { position: relative; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(370px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; z-index: 60; }
@media (max-width: 480px) { .notif-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }
.notif-head, .notif-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.notif-foot { border-bottom: 0; border-top: 1px solid var(--line); font-size: .85rem; flex-wrap: wrap; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { display: grid; gap: .1rem; padding: .75rem 1rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); position: relative; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--surface-2); }
.notif-item span { font-size: .88rem; color: var(--ink-2); }
.notif-item time { font-size: .75rem; color: var(--ink-2); }
.notif-item.unread { background: color-mix(in srgb, var(--primary-soft) 60%, var(--surface)); }
.notif-item.unread::before { content: ""; position: absolute; left: 6px; top: 1.05rem; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.linkish { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }

/* menu pengguna */
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; border-radius: 999px; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; display: grid; gap: .3rem; z-index: 60; }
.usermenu-panel strong { overflow-wrap: anywhere; }
.usermenu-panel .muted { overflow-wrap: anywhere; }
.usermenu-panel form { margin-top: .5rem; }
.role-tag { justify-self: start; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .15rem .5rem; border-radius: 6px; background: var(--yellow-soft); color: var(--ink); }

.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); flex: none; }
.avatar-initial { display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 700; font-family: var(--font-display); }
.avatar-xs { width: 22px; height: 22px; font-size: .7rem; display: inline-grid; vertical-align: middle; }
.avatar-sm { width: 32px; height: 32px; font-size: .85rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.8rem; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.4rem 1rem 3rem; flex: 1; }
.narrow { max-width: 760px; margin-inline: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .2rem 0 0; }
.head-badges { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.back { display: inline-block; font-size: .85rem; font-weight: 600; text-decoration: none; margin-bottom: .3rem; }
.back::before { content: "‹ "; }
.profile-head { display: flex; align-items: center; gap: 1rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.gap-lg { gap: 1.2rem; margin-bottom: 1.2rem; }
.gap-lg > .panel { margin-bottom: 0; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.split.reverse { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
.sticky { position: sticky; top: 84px; }
@media (max-width: 900px) { .split, .split.reverse { grid-template-columns: 1fr; } .sticky { position: static; } }
.detail-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 820px) { .detail-layout { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.panel.flush { padding: 0; overflow: hidden; }
.panel-title { font-size: 1.05rem; margin-bottom: .75rem; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.panel-head a { font-size: .85rem; font-weight: 600; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 42px; padding: .55rem 1.05rem; border-radius: 10px; border: 1.5px solid transparent;
  font: 600 .92rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary:hover { background: #247F50; } }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
@media (prefers-color-scheme: dark) { .btn-soft { color: var(--primary-2); } }
.btn-soft:hover { background: color-mix(in srgb, var(--primary-soft) 70%, var(--primary)); }
.btn-danger-ghost { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn-danger-ghost:hover { background: var(--red-soft); }
.btn-sm { min-height: 34px; padding: .35rem .8rem; font-size: .85rem; border-radius: 8px; }
.btn-xs { min-height: 28px; padding: .2rem .6rem; font-size: .78rem; border-radius: 7px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-google svg { flex: none; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.btn.pop { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.12); } }

/* ---------- Badge ---------- */
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .18rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.badge-success { background: var(--primary-soft); color: var(--primary); }
@media (prefers-color-scheme: dark) { .badge-success { color: var(--primary-2); } }
.badge-warn { background: var(--yellow-soft); color: #7A5A00; }
@media (prefers-color-scheme: dark) { .badge-warn { color: var(--yellow); } }
.badge-info { background: var(--blue-soft); color: var(--blue); }
.badge-danger { background: var(--red-soft); color: var(--red); }
.badge-muted { background: var(--surface-2); color: var(--ink-2); }
.badge-neutral { background: var(--surface); color: var(--ink); border-color: var(--line); }
.count-pill { display: inline-grid; place-items: center; min-width: 28px; height: 26px; padding: 0 .5rem; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700; font-size: .85rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--primary)); margin-right: .45rem; vertical-align: middle; }
.cat-icon { font-size: 1.2rem; }

/* ---------- Alert & toast ---------- */
.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; font-size: .92rem; }
.alert-info { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 30%, transparent); }
.alert-success { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.alert-warn { background: var(--yellow-soft); border-color: color-mix(in srgb, var(--yellow) 50%, transparent); }
.alert-error { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.alert-link { display: block; text-decoration: none; color: var(--ink); font-weight: 600; }
.alert-link:hover { filter: brightness(.97); }
.toast-root { position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: .5rem; z-index: 200; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: .75rem 1rem; border-radius: 12px; box-shadow: var(--shadow); font-size: .9rem; font-weight: 500; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: auto; border-left: 5px solid var(--blue); }
.toast.show { opacity: 1; transform: none; }
.toast-success { border-left-color: #3FB57A; }
.toast-error { border-left-color: var(--red); }
body[data-page="catalog"] .toast-root { bottom: calc(5rem + env(safe-area-inset-bottom)); }

/* ---------- Form ---------- */
.form-stack { display: grid; gap: 1rem; }
.form-stack > .panel { margin: 0; }
.form-stack.tight { gap: .75rem; }
.field { display: grid; gap: .3rem; font-size: .88rem; font-weight: 600; min-width: 0; }
.field > span:first-child { color: var(--ink); }
.field.inline { display: flex; align-items: center; gap: .4rem; }
.field.inline input { width: 9.5rem; }
input, select, textarea {
  width: 100%; font: 400 .95rem/1.4 var(--font-body); color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: .6rem .75rem; min-height: 42px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
input[type="color"] { padding: .2rem; height: 42px; cursor: pointer; }
input[type="range"] { padding: 0; border: 0; min-height: 28px; accent-color: var(--primary); box-shadow: none; }
input[type="file"] { padding: .45rem; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--primary); }
.field-error { color: var(--red); font-size: .82rem; font-weight: 600; margin: 0; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.check { display: flex; gap: .5rem; align-items: center; font-size: .88rem; margin-top: .5rem; }
.switch { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; font-size: .92rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
details.subtle { margin-top: .75rem; border-top: 1px dashed var(--line); padding-top: .75rem; }
details.subtle summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.brand-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.logo-preview { width: 96px; height: 96px; border-radius: 20px; border: 3px solid var(--brand, var(--primary)); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-ph { color: var(--ink-2); font-size: .8rem; font-weight: 600; }
.picker-tools { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .75rem 0; }
.img-preview { max-height: 160px; border-radius: 10px; border: 1px solid var(--line); object-fit: cover; }
.copy-row { display: flex; gap: .4rem; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar input[type="search"] { flex: 1; min-width: 200px; }
.toolbar select { width: auto; }
.panel .toolbar { margin-bottom: .75rem; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.filters .field { flex: 1 1 150px; }
.filters .field.grow { flex: 2 1 220px; }
.filter-actions { display: flex; gap: .4rem; }
.inline-form { display: inline-flex; gap: .4rem; }
.stock-form { display: flex; gap: .35rem; align-items: center; }
.stock-form input { width: 5.2rem; min-height: 32px; padding: .3rem .5rem; }
.stock-form input.low { border-color: var(--red); color: var(--red); font-weight: 700; }
.note { background: var(--yellow-soft); border-radius: 8px; padding: .5rem .7rem; }

/* ---------- Tabs & pager ---------- */
.tabs { display: flex; gap: .3rem; overflow-x: auto; margin-bottom: 1rem; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tabs a { padding: .6rem .85rem; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; border-bottom: 3px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a small { background: var(--surface-2); border-radius: 999px; padding: .05rem .45rem; margin-left: .2rem; }
.tabs a[aria-current="page"] { color: var(--primary); border-color: var(--primary); }
.tabs.compact { border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin: 0; background: var(--surface); }
.tabs.compact a { border: 0; border-radius: 999px; padding: .35rem .8rem; margin: 0; }
.tabs.compact a[aria-current="page"] { background: var(--primary); color: #fff; }
.pager { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; margin: 1rem 0; }
.pager a, .pager .current { min-width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0 .7rem; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 600; font-size: .88rem; color: var(--ink); }
.pager .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager .muted { margin-left: auto; }

/* ---------- Statistik ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; display: grid; gap: .15rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--primary); opacity: .8; }
.stat span { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.stat b { font-family: var(--font-display); font-size: 1.55rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat small { color: var(--ink-2); }
a.stat:hover { border-color: var(--primary); }
.stat.is-alert::before { background: var(--red); }
.stat.is-alert b { color: var(--red); }
.chart-box { position: relative; height: 260px; }

.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.funnel li { display: grid; grid-template-columns: minmax(130px, 1fr) 2fr auto; gap: .75rem; align-items: center; font-size: .9rem; }
.funnel .bar { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.funnel .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #3FB57A); border-radius: inherit; min-width: 2px; }
.funnel b { font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: right; }
@media (max-width: 520px) { .funnel li { grid-template-columns: 1fr auto; } .funnel .bar { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 700; padding: .6rem .75rem; border-bottom: 1.5px solid var(--line); white-space: nowrap; background: var(--surface); }
.table td { padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.table td small { display: block; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { display: flex; gap: .3rem; justify-content: flex-end; flex-wrap: wrap; }
.table .actions form { margin: 0; }
.table tr.is-muted td { opacity: .55; }
.table a { font-weight: 600; text-decoration: none; }
.cell-media { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.cell-media img:not(.avatar) { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.meta-cell { font-size: .8rem; max-width: 280px; }
.kv { display: inline-block; margin: 0 .5rem .15rem 0; color: var(--ink-2); }
.kv b { color: var(--ink); font-weight: 600; }
.row-details summary { cursor: pointer; font-weight: 700; color: var(--primary); white-space: nowrap; }
.row-details[open] { min-width: 280px; }
.row-details .sum-items { margin: .5rem 0; }

.activity-feed { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.activity-feed li { padding: .55rem 0 .55rem 1rem; border-bottom: 1px solid var(--line); position: relative; }
.activity-feed li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.activity-feed li:last-child { border-bottom: 0; }
.activity-feed time { display: block; font-size: .76rem; color: var(--ink-2); }

/* ---------- Peta ---------- */
.map { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); z-index: 0; overflow: hidden; }
.map-xs { height: 150px; }
.map-sm { height: 220px; margin-bottom: .8rem; }
.map-md { height: 340px; }
.map-lg { height: min(560px, 65vh); }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content { font-size: .88rem; }
.wd-pin, .wd-you { background: none; border: 0; }
.pin { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c); border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.35); transition: transform .15s; }
.pin i { transform: rotate(45deg); font-style: normal; font-size: 13px; line-height: 1; }
.is-hot .pin { transform: rotate(-45deg) scale(1.25); }
.you-dot { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); border: 4px solid #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--blue) 30%, transparent), 0 2px 6px rgba(0,0,0,.3); }
@media (prefers-reduced-motion: no-preference) { .you-dot { animation: pulse 2s infinite; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px color-mix(in srgb, #2F6FDB 8%, transparent), 0 2px 6px rgba(0,0,0,.3); } }
@media (prefers-color-scheme: dark) { .leaflet-tile-pane { filter: brightness(.78) contrast(1.1) saturate(.8); } }

/* ---------- Beranda ---------- */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; align-items: end; padding: 1.2rem 0 1.4rem; }
.hero h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.3rem); max-width: 16ch; }
.hero-copy > p { font-size: 1.05rem; color: var(--ink-2); max-width: 58ch; }
.hero-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hero-facts { display: grid; gap: .6rem; margin: 0; }
.hero-facts div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; display: flex; align-items: baseline; gap: .7rem; }
.hero-facts dt { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; color: var(--red); }
.hero-facts dd { margin: 0; color: var(--ink-2); font-size: .9rem; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero-facts { grid-template-columns: 1fr 1fr; } .hero-facts div { flex-direction: column; gap: 0; } }
.geo-status { margin: 0; font-size: .88rem; color: var(--ink-2); display: flex; align-items: center; gap: .45rem; }
.geo-status::before, #geo-info::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.geo-status[data-tone="ok"]::before, #geo-info[data-tone="ok"]::before { background: #3FB57A; }
.geo-status[data-tone="error"], #geo-info[data-tone="error"] { color: var(--red); }
.geo-status[data-tone="error"]::before, #geo-info[data-tone="error"]::before { background: var(--red); }
.geo-status[data-tone="busy"]::before, #geo-info[data-tone="busy"]::before { background: var(--yellow); animation: blink 1s infinite; }
#geo-info { display: flex; gap: .45rem; align-items: center; margin: 0; }
@keyframes blink { 50% { opacity: .3; } }

.chips { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: 1rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.static { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .88rem var(--font-body); cursor: pointer; text-decoration: none; }
.chip:hover { border-color: var(--primary); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip small { opacity: .7; }

.nearby-layout { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.2rem; align-items: start; }
.nearby-layout .map-wrap { position: sticky; top: 84px; }
.nearby-layout .map-wrap p { margin-top: .4rem; }
@media (max-width: 900px) { .nearby-layout { grid-template-columns: 1fr; } .nearby-layout .map-wrap { position: static; } .map-lg { height: 48vh; } }
.list-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.list-head h2 { margin: 0; }
.warung-list { display: grid; gap: .75rem; }
.warung-card { display: grid; grid-template-columns: 64px 1fr; gap: .9rem; padding: .95rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); position: relative; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; border-left: 5px solid var(--brand); }
.warung-card:hover, .warung-card:focus-visible { border-color: var(--brand); transform: translateY(-1px); }
.warung-card.is-closed { opacity: .7; }
.wc-logo { width: 64px; height: 64px; border-radius: 14px; background: color-mix(in srgb, var(--brand) 14%, var(--surface)); display: grid; place-items: center; overflow: hidden; font-size: 1.8rem; }
.wc-logo img { width: 100%; height: 100%; object-fit: cover; }
.wc-body h3 { margin: 0 0 .15rem; font-size: 1.1rem; }
.wc-meta { font-size: .85rem; color: var(--ink-2); margin: 0 0 .45rem; }
.wc-tags { display: flex; gap: .3rem; flex-wrap: wrap; }
.wc-cta { grid-column: 2; justify-self: start; font-size: .85rem; font-weight: 700; color: var(--brand); }
@media (prefers-color-scheme: dark) { .wc-cta { color: var(--ink); } }
.skeleton { height: 118px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; }
@media (prefers-reduced-motion: no-preference) { .skeleton { animation: shimmer 1.3s infinite linear; } }
@keyframes shimmer { to { background-position: -200% 0; } }
.login-hint { margin-top: 1rem; }

.empty { text-align: center; padding: 2.2rem 1rem; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.empty h3 { margin-bottom: .3rem; }
.empty-page { max-width: 560px; margin: 3rem auto; }
.empty-code { font-family: var(--font-display); font-size: 5rem; font-weight: 800; color: var(--red); line-height: 1; }

/* ---------- Login ---------- */
.login { max-width: 820px; margin: 1.5rem auto; text-align: center; }
.login > p { max-width: 56ch; margin-inline: auto; }
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; text-align: left; }
@media (max-width: 640px) { .role-cards { grid-template-columns: 1fr; } }
.role-card { display: grid; gap: .5rem; align-content: start; padding: 1.4rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.role-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.role-card p { color: var(--ink-2); font-size: .92rem; }
.role-card .btn { justify-self: start; margin-top: .3rem; }
.role-emoji { font-size: 2.2rem; }

/* ---------- Katalog warung ---------- */
.warung-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; padding: 1.3rem; border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 16%, var(--surface)), var(--surface) 70%); border: 1px solid var(--line); border-top: 6px solid var(--brand); margin-bottom: 1.2rem; }
.wh-logo { width: 96px; height: 96px; border-radius: 22px; overflow: hidden; background: var(--surface); display: grid; place-items: center; font-size: 2.6rem; border: 3px solid var(--brand, var(--primary)); flex: none; }
.wh-logo img { width: 100%; height: 100%; object-fit: cover; }
.wh-logo.sm { width: 60px; height: 60px; border-radius: 14px; font-size: 1.7rem; border-width: 2px; }
.wh-cat { margin: 0; font-weight: 700; font-size: .85rem; color: var(--ink-2); }
.wh-body h1 { margin: .1rem 0 .3rem; }
.wh-desc { max-width: 70ch; }
.wh-badges { display: flex; gap: .35rem; flex-wrap: wrap; }
.wh-actions { display: grid; gap: .5rem; }
@media (max-width: 760px) { .warung-hero { grid-template-columns: auto 1fr; } .wh-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; } .wh-logo { width: 72px; height: 72px; } }

.catalog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }
.catalog-layout.no-cart { grid-template-columns: 1fr; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.catalog-toolbar h2 { margin: 0; }
.catalog-toolbar input { max-width: 320px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .9rem; }
.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.product-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.product-card.is-out { opacity: .6; }
.thumb { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { font-size: 2.6rem; }
.pc-body { padding: .7rem .8rem .3rem; flex: 1; }
.pc-body h3 { font-size: .98rem; margin: 0 0 .25rem; }
.price { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--red); margin: 0; }
.price small { font-family: var(--font-body); font-weight: 500; color: var(--ink-2); font-size: .78rem; }
.stock { font-size: .78rem; color: var(--ink-2); margin: .1rem 0 0; }
.product-card .btn-add { margin: .5rem .8rem .8rem; }

.cart-panel { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cart-bar { display: none; }
.cart-body { padding: 1.1rem; }
.cart-items { display: grid; gap: .6rem; margin-bottom: .8rem; max-height: 46vh; overflow-y: auto; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: .3rem .6rem; padding-bottom: .6rem; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.cart-item small { display: block; color: var(--ink-2); }
.cart-item > b { grid-column: 2; text-align: right; font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 9px; overflow: hidden; grid-row: span 2; align-self: center; }
.cart-item .qty { grid-row: auto; grid-column: 1; justify-self: start; }
.cart-item > b { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.qty button { width: 32px; height: 32px; border: 0; background: var(--surface-2); color: var(--ink); font-size: 1.05rem; cursor: pointer; }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty span { min-width: 34px; text-align: center; font-weight: 700; }
.cart-sum { margin: 0 0 1rem; display: grid; gap: .3rem; }
.cart-sum div { display: flex; justify-content: space-between; font-size: .92rem; }
.cart-sum dt { color: var(--ink-2); }
.cart-sum dd { margin: 0; font-variant-numeric: tabular-nums; }
.cart-sum .total { border-top: 1.5px solid var(--line); padding-top: .45rem; margin-top: .2rem; font-weight: 800; font-size: 1.05rem; }
.cart-sum .total dt { color: var(--ink); }
@media (max-width: 900px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .cart-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; border-radius: 18px 18px 0 0; z-index: 70; max-height: 80vh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
  .cart-bar { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: .95rem 1.1rem; border: 0; background: var(--primary); color: #fff; font: 600 1rem var(--font-body); cursor: pointer; }
  .cart-bar::after { content: "▴"; margin-left: .5rem; }
  .cart-panel.open .cart-bar::after { content: "▾"; }
  .cart-body { display: none; overflow-y: auto; }
  .cart-panel.open .cart-body { display: block; }
  body[data-page="catalog"] .container { padding-bottom: 6rem; }
}

.modal { border: 0; padding: 0; border-radius: 20px; width: min(520px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal::backdrop { background: rgba(10, 20, 15, .55); }
.modal-inner { position: relative; }
.modal-close { position: absolute; right: .7rem; top: .7rem; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); font-size: 1.4rem; cursor: pointer; box-shadow: var(--shadow); z-index: 1; }
.pm-img { aspect-ratio: 16 / 10; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.pm-img img { width: 100%; height: 100%; object-fit: cover; }
.pm-body { padding: 1.2rem; }
.pm-body .btn { width: 100%; margin-top: .5rem; }

/* ---------- Checkout & pesanan ---------- */
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.2rem; align-items: start; }
.checkout-layout .summary { position: sticky; top: 84px; }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } .checkout-layout .summary { position: static; } }
.sum-items { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .45rem; }
.sum-items li { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; }
.sum-items small { color: var(--ink-2); }
.sum-items b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-options { display: grid; gap: .6rem; }
.pay-option { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.pay-option:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); }
.pay-option input { margin-top: .25rem; }
.pay-option small { display: block; color: var(--ink-2); font-size: .84rem; }

.order-list { display: grid; gap: .6rem; }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: var(--radius); text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.order-row:hover { border-color: var(--brand); }
.order-row > div:first-child { display: grid; }
.order-row-end { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.order-row-end b { margin-right: .3rem; font-variant-numeric: tabular-nums; }
.timeline { list-style: none; display: flex; gap: 0; margin: 0 0 1.3rem; padding: 0; counter-reset: s; overflow-x: auto; }
.timeline li { flex: 1; min-width: 110px; position: relative; padding-top: 2.1rem; text-align: center; font-size: .82rem; color: var(--ink-2); font-weight: 600; counter-increment: s; }
.timeline li::before { content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--line); z-index: 1; font-size: .78rem; }
.timeline li::after { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.timeline li:first-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { content: "✓"; background: var(--primary); border-color: var(--primary); color: #fff; }
.timeline li.done::after { background: var(--primary); }
.timeline li.now::before { box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 25%, transparent); }
.status-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; align-items: center; }
.cancel-form { display: flex; gap: .4rem; flex: 1 1 260px; }
.cancel-form input { min-height: 42px; }
.inline-form + .inline-form, .btn + .inline-form { margin-left: .3rem; }

/* ---------- Penjual ---------- */
.status-card { text-align: left; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--yellow); border-radius: 18px; padding: 1.5rem; box-shadow: var(--shadow); }
.status-card.is-rejected { border-top-color: var(--red); }
.status-summary { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1rem; align-items: center; margin: 1rem 0; }
@media (max-width: 640px) { .status-summary { grid-template-columns: 1fr; } }
.qr-panel { text-align: left; }
.qr-box { display: grid; place-items: center; padding: 1rem; background: #fff; border-radius: 14px; border: 1px solid var(--line); margin-bottom: .8rem; min-height: 252px; }
.qr-box img, .qr-box canvas { max-width: 100%; height: auto; }
.qr-panel .field { margin-top: 1rem; }

/* ---------- Admin ---------- */
.seller-list { display: grid; gap: .9rem; }
.seller-card { margin: 0; border-left: 5px solid var(--brand); }
.seller-main { display: grid; grid-template-columns: auto 1fr 240px; gap: 1rem; align-items: start; }
.seller-main p { margin-bottom: .3rem; }
.seller-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.seller-title h2 { margin: 0; font-size: 1.15rem; }
.owner { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.seller-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.review-form { display: flex; gap: .4rem; flex: 1; flex-wrap: wrap; justify-content: flex-end; }
.review-form input { flex: 1 1 240px; min-height: 34px; padding: .35rem .7rem; }
@media (max-width: 900px) { .seller-main { grid-template-columns: auto 1fr; } .seller-main .map { grid-column: 1 / -1; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.1rem 1rem; font-size: .88rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .awning, .site-footer, .cart-panel, .btn { display: none !important; }
  body { background: #fff; }
}
