/* Pocket Grid | panel alat: arang panel surya, hijau grid, oranye matahari */
:root {
  --panel: #1f2a2e;
  --lcd: #8fe07f;
  --green: #237a1c;
  --green-strong: #1b6215;
  --green-bright: #3aa72b;
  --green-tint: #e3f1df;
  --sun: #f28c1b;
  --sun-ink: #8a4b00;
  --sun-tint: #fdecd6;
  --ink: #17201f;
  --muted: #56625e;
  --line: #e2e7e2;
  --ground: #f2f4f1;
  --surface: #ffffff;
  --danger: #b42318;
  --danger-tint: #fbe4e1;
  --info: #1d5ea8;
  --info-tint: #e2ecf8;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;

  --r-sheet: 14px;
  --r-ctl: 10px;
  --r-pill: 999px;

  --font: "Barlow", system-ui, sans-serif;
  --font-c: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--ground);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- controls ---------- */
.seg { display: flex; background: #e4e9e3; border-radius: var(--r-ctl); padding: 3px; }
.seg button {
  flex: 1; border: 0; background: none; padding: 9px 4px; border-radius: 8px;
  font-weight: 600; color: var(--muted);
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20,28,27,.12); }
.toolbar { display: flex; gap: var(--s2); align-items: center; margin: var(--s3) 0; min-height: 46px; }
.toolbar input { flex: 1; }

input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c5cec8;
  border-radius: var(--r-ctl);
  background: var(--surface);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(35, 122, 28, .18); }
textarea { min-height: 88px; resize: vertical; }
.field { display: block; margin-top: var(--s4); }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.check { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s4); font-weight: 500; }
.check input { width: 22px; min-height: 22px; accent-color: var(--green); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 var(--s4);
  border: 1px solid transparent; border-radius: var(--r-ctl);
  font-weight: 700; text-decoration: none; text-align: center;
  background: var(--green); color: #fff;
}
.btn:hover { background: var(--green-strong); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.quiet { background: var(--surface); color: var(--ink); border-color: #c5cec8; }
.btn.quiet:hover { background: var(--ground); }
.btn.text { background: none; color: var(--green); padding: 0 var(--s2); min-height: 40px; }
.btn.text.danger { color: var(--danger); }
.btn.wa { background: #1c9c4b; }
.btn.wa:hover { background: #157a3a; }
.btn.small { min-height: 42px; padding: 0 14px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }

/* status: teks + bentuk, bukan warna saja */
.status {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 13px; font-weight: 700; padding: 3px 10px 3px 8px; border-radius: var(--r-pill);
  white-space: nowrap;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.status.pending { background: var(--sun-tint); color: var(--sun-ink); }
.status.ok { background: var(--green-tint); color: var(--green-strong); }
.status.info { background: var(--info-tint); color: var(--info); }
.status.done { background: #e7ebe8; color: #44504c; }
.status.off { background: #eceeed; color: #6b7572; }
.status.bad { background: var(--danger-tint); color: var(--danger); }
.code { font-family: var(--font-c); font-weight: 700; letter-spacing: .02em; }

.empty { padding: var(--s6) var(--s4); text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.notice { padding: var(--s3) var(--s4); border-radius: var(--r-ctl); font-size: 15px; margin-bottom: var(--s3); }
.notice.warn { background: var(--sun-tint); color: var(--sun-ink); }
.notice.bad { background: var(--danger-tint); color: var(--danger); }
.hint { font-size: 14px; color: var(--muted); margin-top: var(--s2); }
.hint.bad { color: var(--danger); }
.error { color: var(--danger); font-size: 15px; margin-top: var(--s3); }
.error:empty { display: none; }

/* ---------- meter (indikator baterai) ---------- */
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: var(--s3); }
.meter .cell { height: 10px; border-radius: 3px; background: #e2e7e3; }
.meter .cell.on { background: var(--green-bright); }
.meter .cell.now { background: var(--sun); }
.meter.cancel .cell.on, .meter.cancel .cell.now { background: #b9c2be; }
.meter-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.meter-labels .now { color: var(--ink); font-weight: 700; }

.stockbar { display: flex; height: 8px; border-radius: 3px; overflow: hidden; background: #e2e7e3; margin-top: var(--s3); }
.stockbar .free { background: var(--green-bright); }
.stockbar .used { background: var(--sun); }
.figures { display: flex; flex-wrap: wrap; gap: 4px var(--s4); margin-top: var(--s2); font-size: 14px; color: var(--muted); }
.figures b { color: var(--ink); font-family: var(--font-c); font-size: 17px; font-variant-numeric: tabular-nums; margin-right: 3px; }
.figures .low b { color: var(--danger); }

/* ---------- tabel spesifikasi ---------- */
table.spec { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: var(--s2); }
table.spec th, table.spec td { text-align: left; padding: 7px 0; border-top: 1px solid var(--line); vertical-align: top; }
table.spec th { color: var(--muted); font-weight: 500; width: 44%; padding-right: var(--s3); }
table.spec tr.short td, table.spec tr.short th { color: var(--danger); font-weight: 700; }
details { margin-top: var(--s1); }
details + details { margin-top: 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--green); padding: 6px 0; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+ "; }
details[open] summary::before { content: "\2212  "; }

/* ---------- produk ---------- */
.product-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ground); }
.product-body { padding: var(--s4); }
.product-price { font-family: var(--font-c); font-weight: 700; font-size: 26px; color: var(--green-strong); font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ---------- prioritas ---------- */
.prio > .item { border-left: 4px solid var(--sun); }

/* ---------- dialog (sheet dari bawah) ---------- */
dialog {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px;
  max-height: 92vh; border-radius: 18px 18px 0 0; background: var(--surface); color: var(--ink);
}
dialog::backdrop { background: rgba(17, 26, 29, .55); }
@media (min-width: 640px) { dialog { margin: auto; border-radius: 18px; } }
.dlg { display: flex; flex-direction: column; max-height: 92vh; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s4) var(--s2); }
.dlg-head h2 { margin: 0; font-size: 22px; }
.icon-btn { background: none; border: 0; padding: var(--s2); border-radius: var(--r-ctl); color: var(--muted); }
.icon-btn svg { width: 22px; height: 22px; display: block; }
.dlg-body { padding: 0 var(--s4) var(--s4); overflow-y: auto; }
.dlg-foot {
  display: flex; gap: var(--s2); padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.dlg-foot .btn { flex: 1; }
.recipe-row { display: flex; gap: var(--s2); margin-top: var(--s2); }
.recipe-row select { flex: 1; min-width: 0; }
.recipe-row input { width: 76px; flex: none; }
.move { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.move b { font-family: var(--font-c); font-size: 18px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.move .plus { color: var(--green); }
.move .minus { color: var(--danger); }

/* foto */
.photo-field { display: flex; gap: var(--s3); align-items: center; }
.photo-preview {
  width: 96px; height: 96px; border-radius: var(--r-ctl); flex: none; overflow: hidden;
  background: var(--ground); border: 1px dashed #b7c2bc;
  display: flex; align-items: center; justify-content: center; color: #9aa6a1;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview svg { width: 28px; height: 28px; }
.photo-field .stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

/* ---------- login ---------- */
.login { min-height: 100vh; }
.login .panel { padding-top: calc(var(--s6) + env(safe-area-inset-top)); padding-bottom: var(--s5); }
.login .panel .logo { height: 64px; }
.login .panel p { color: #c7d2cd; margin: 0; }
.login form { padding: var(--s4); max-width: 440px; margin: 0 auto; }
.login .btn { width: 100%; margin-top: var(--s5); }

/* ---------- skeleton ---------- */
.skel { height: 96px; border-radius: 16px; background: linear-gradient(90deg, #e9ede9 25%, #f4f6f4 50%, #e9ede9 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }

@keyframes sk { to { background-position: -200% 0; } }

/* nomor seri */
.serial-line { margin-top: var(--s2); font-size: 14px; color: var(--muted); }
.serial-line .code { color: var(--ink); font-size: 15px; }
.pick-list { margin-top: var(--s3); border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.pick { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); }
.pick + .pick { border-top: 1px solid var(--line); }
.pick > span:first-of-type, .pick > input + span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick input[type=radio] { width: 22px; min-height: 22px; accent-color: var(--green); flex: none; }
label.pick { cursor: pointer; }
label.pick:has(input:checked) { background: var(--green-tint); }
.search-box { margin-bottom: var(--s3); }
.search-results { margin-top: var(--s2); }
.add-row { display: flex; gap: var(--s2); margin-top: var(--s2); }
.add-row input:first-child { width: 88px; flex: none; }
.add-row input:last-child { flex: 1; min-width: 0; }

/* ---------- order: ongkir, resi ---------- */
.total-line { display: flex; justify-content: space-between; align-items: baseline; padding: var(--s2) 0; color: var(--muted); }
.total-line strong { font-family: var(--font-c); font-size: 20px; color: var(--ink); }
.serial-line svg { width: 16px; height: 16px; vertical-align: -3px; }
.warn-text { color: var(--sun-ink); font-weight: 600; }
.row-actions .btn svg { width: 16px; height: 16px; }

/* ---------- kartu laporan dan grafik ---------- */
.card + .card, .card-grid + .card, .card + .card-grid, .card-grid + h2 { margin-top: var(--s3); }
.card-title { font-family: var(--font-c); font-size: 17px; font-weight: 700; margin: 0 0 var(--s2); }
.card-grid { display: grid; gap: var(--s3); margin-top: var(--s3); }
.card-grid .card { margin: 0; }
@media (min-width: 700px) { .card-grid { grid-template-columns: repeat(3, 1fr); } .card-grid.two { grid-template-columns: 1fr 1fr; } }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: #b9c1bd; stroke-width: 1; }
.chart .ax { fill: var(--muted); font: 500 11px var(--font); }
.chart .pie-total { fill: var(--ink); font: 700 20px var(--font-c); }
.legend { display: flex; flex-wrap: wrap; gap: 4px var(--s4); font-size: 13px; color: var(--muted); margin-top: var(--s2); }
.legend i, .pie-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.pie-wrap { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.chart.pie svg { width: 124px; height: 124px; }
.pie-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; display: grid; gap: 6px; font-size: 14px; }
.pie-legend li { display: grid; grid-template-columns: 16px 1fr auto; align-items: baseline; gap: 6px; }
.pie-legend b { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.pie-legend small { color: var(--muted); }
.panel-link[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.chart-empty { color: var(--muted); font-size: 14px; padding: var(--s5) 0; text-align: center; }
.figures .fig { min-width: 90px; }
.figures .fig .v { font: 700 26px var(--font-c); color: var(--ink); }
.figures .fig .l { font-size: 13px; }
table.fin td { text-align: right; font-variant-numeric: tabular-nums; }
table.fin th { width: auto; }
table.fin tr.sum th, table.fin tr.sum td { color: var(--ink); font-weight: 700; }
table.fin tr.pos td { color: var(--green-strong); }
table.fin tr.neg td { color: var(--danger); }
.export-grid { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }


/* =================================================================
   Tata letak aplikasi (riset: ui-ux-pro-max | bottom nav maks 5,
   sidebar di layar lebar, satu aksi utama per kartu, ritme 8px)
   ================================================================= */
main { padding: 0 0 calc(150px + env(safe-area-inset-bottom)); }
h2 { font-family: var(--font-c); font-weight: 700; font-size: 20px; margin: var(--s5) 0 var(--s3); }
main > h2:first-child { margin-top: 0; }
h2 small { font-family: var(--font); font-weight: 500; font-size: 14px; color: var(--muted); margin-left: var(--s2); }

/* login tetap memakai panel gelap */
.panel { background: var(--panel); color: #fff; padding: calc(var(--s6) + env(safe-area-inset-top)) var(--s4) var(--s5); }
.panel h1 { font-family: var(--font-c); font-weight: 700; font-size: 30px; margin: var(--s4) 0 var(--s2); }
.logo { height: 36px; width: auto; display: block; filter: drop-shadow(0 0 2px rgba(4,8,9,.95)) drop-shadow(0 0 6px rgba(4,8,9,.8)); }

/* bilah atas tipis (HP) */
.topbar {
  position: sticky; top: 0; z-index: 7;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--s4) 0;
  background: var(--panel);
}
.avatar-btn { background: none; border: 0; padding: 4px; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--lcd); color: var(--panel); font: 700 16px var(--font-c); flex: none; }

/* isi halaman */
.content { padding: var(--s5) var(--s4) 0; max-width: 1180px; }
.page-head h1 { font-family: var(--font-c); font-weight: 700; font-size: 28px; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin: var(--s4) 0 var(--s5); }
.stats:empty { display: none; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.stat .l { font-size: 13px; color: var(--muted); line-height: 1.25; }
.stat .v { font: 700 24px/1.15 var(--font-c); color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.warn { border-color: #f4c98f; background: #fff8ee; }
.stat.warn .v { color: var(--sun-ink); }
main > .seg { margin-bottom: var(--s3); }

/* bottom nav: maksimal 5 menu, ikon + label */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 4px env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; min-width: 0; min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; font-size: 12px; font-weight: 600; color: var(--muted);
}
.tabbar svg { width: 24px; height: 24px; padding: 2px 14px; box-sizing: content-box; border-radius: 999px; transition: background .15s; }
.tabbar button[aria-current="page"] { color: var(--green-strong); }
.tabbar button[aria-current="page"] svg { background: var(--green-tint); }

.sidebar { display: none; }

/* aksi utama mengambang (HP) */
.fab {
  position: fixed; right: var(--s4); z-index: 6;
  bottom: calc(80px + env(safe-area-inset-bottom));
  min-height: 52px; padding: 0 var(--s5); border-radius: var(--r-pill);
  box-shadow: 0 8px 20px rgba(20, 60, 18, .3);
}

/* daftar: kartu terpisah */
.sheet { display: grid; gap: 12px; }
.sheet + .sheet { margin-top: 12px; }
.item, .card, .sheet > .empty {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20, 28, 27, .04);
}
.item { padding: 14px 16px; }
.card.pad { padding: 16px 18px; }
.card + .card, .card + .card-grid, .card-grid + .card { margin-top: 12px; }
.item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.title { font-weight: 700; font-size: 17px; line-height: 1.3; }
.meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.card-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.card-actions .more { margin-left: auto; }
.icon-btn.more { min-width: 44px; min-height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); }
.icon-btn.more:hover { background: var(--ground); }
.row-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); align-items: center; }
.row-actions .push { margin-left: auto; }

/* kartu order */
.order-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 10px; }
.chip { display: inline-block; background: var(--ground); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; font-size: 14px; }
.amount { font: 700 20px var(--font-c); font-variant-numeric: tabular-nums; }
.addr { margin-top: 6px; color: var(--ink); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.facts svg { width: 16px; height: 16px; vertical-align: -3px; }
.facts b { color: var(--ink); }
.note { margin-top: 10px; padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.note.warn { background: var(--sun-tint); color: var(--sun-ink); }
.btn.wa.ghost-wa { background: #e7f6ec; color: #116a33; }
.btn.wa.ghost-wa:hover { background: #d4efdd; }

/* menu aksi */
.menu { display: grid; }
.menu.sep { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.menu-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 8px; background: none; border: 0; border-radius: 10px; font-weight: 600; text-align: left; }
.menu-item:hover { background: var(--ground); }
.menu-item svg { width: 20px; height: 20px; color: var(--muted); }
.menu-item.danger, .menu-item.danger svg { color: var(--danger); }
.toast { position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; background: var(--panel); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }

/* produk */
.product-grid { display: grid; gap: 12px; }
.product-card { overflow: hidden; }
.search-box { margin-bottom: var(--s3); }

/* ---------- layar lebar: sidebar ---------- */
@media (min-width: 1024px) {
  body { background: var(--ground); }
  .topbar, .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 28px;
    position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 6;
    background: var(--panel); padding: 24px 16px;
  }
  .sidebar .logo { height: 44px; margin: 0 8px; }
  .side-nav { display: grid; gap: 4px; }
  .side-nav button, .side-link {
    display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px;
    background: none; border: 0; border-radius: 12px; color: #b8c5c0; font-weight: 600; font-size: 15px; text-align: left; width: 100%;
  }
  .side-nav svg, .side-link svg { width: 22px; height: 22px; }
  .side-nav button:hover, .side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
  .side-nav button[aria-current="page"], .side-link[aria-current="page"] { background: rgba(143,224,127,.14); color: var(--lcd); }
  .side-foot { margin-top: auto; display: grid; gap: 8px; }
  .me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.1); color: #fff; }
  .me div { flex: 1; min-width: 0; line-height: 1.25; }
  .me small { display: block; color: #9fb0aa; }
  .me .icon-btn { color: #b8c5c0; }
  .content { margin-left: 248px; padding: 32px 40px 0; }
  .page-head { padding-right: 220px; }
  .page-head h1 { font-size: 32px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
  .stat { padding: 16px 18px; }
  .stat .v { font-size: 28px; }
  .fab { top: 32px; bottom: auto; right: max(40px, calc(100vw - 248px - 1180px + 40px)); min-height: 46px; box-shadow: none; }
  main { padding-bottom: 60px; }
  .sheet:not(.search-results):not(.prio) { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); align-items: start; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
  main > .seg, main > div > .seg { max-width: 520px; }
  .toast { bottom: 40px; }
  dialog { margin: auto; border-radius: 18px; }
}

/* PPN, rincian harga, template WhatsApp */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: var(--s4); padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.switch-row small { display: block; color: var(--muted); font-size: 13px; }
.switch-row input { appearance: none; -webkit-appearance: none; width: 48px; min-height: 28px; height: 28px; padding: 0; border-radius: 999px; background: #cfd6d1; border: 0; position: relative; flex: none; transition: background .15s; cursor: pointer; }
.switch-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch-row input:checked { background: var(--green-bright); }
.switch-row input:checked::after { transform: translateX(20px); }
.breakdown { margin-top: var(--s3); padding: 10px 14px; background: var(--ground); border-radius: 12px; font-size: 15px; }
.breakdown div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.breakdown .sum { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; color: var(--ink); }
.breakdown .sum strong { font: 700 20px var(--font-c); }
.wa-text { min-height: 220px; font-size: 15px; line-height: 1.45; }
table.fin tr.muted-row th, table.fin tr.muted-row td { color: var(--muted); font-size: 14px; }
.placeholders { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.placeholders code { background: var(--ground); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; font-size: 13px; }
.tpl { margin-top: 12px; }
.tpl .field:first-child { margin-top: 0; }
.tpl-head { display: grid; gap: 0 12px; }
@media (min-width: 700px) { .tpl-head { grid-template-columns: 1fr 220px; } .tpl-head .field { margin-top: 0; } }

.pdf-box { margin-top: var(--s4); padding: 12px 14px; border: 1px dashed #b9c8bd; border-radius: 12px; background: #f6faf5; }
.pdf-box small { display: block; color: var(--muted); font-size: 13px; }
.pdf-box .row-actions { margin-top: 8px; }
