/* Lakuin · token dari brief §6 (BVI): krem linen, terakota, sage, mentega, cokelat tinta. HP-first. */
:root {
  --krem: #F6F1E9; --krem-2: #EFE7DA; --putih: #FFFFFF;
  --tera: #D9734E; --tera-d: #B95A37; --tera-l: #FBE6DC;
  --sage: #7FA38A; --sage-d: #4F7A5C; --sage-l: #E3EEE6;
  --mentega: #F2C94C; --mentega-l: #FCF1CC;
  --tinta: #3B2F2A; --tinta-2: #6E625B; --garis: #E2D7C7;
  --merah: #B3472E;
  --r: 16px; --r-s: 11px;
  --f-d: 'Fraunces', Georgia, serif; --f-b: 'Plus Jakarta Sans', system-ui, sans-serif; --f-m: 'JetBrains Mono', ui-monospace, monospace;
  --shadow: 0 1px 0 rgba(59, 47, 42, .04), 0 6px 18px -10px rgba(59, 47, 42, .28);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--krem); color: var(--tinta); font-family: var(--f-b); font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { min-height: 100dvh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--tera); outline-offset: 2px; border-radius: 6px; }

.scr { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.scr.noTab { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.main { padding: 8px 16px 20px; display: flex; flex-direction: column; gap: 16px; }

/* header */
.top { display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 16px 8px; position: sticky; top: 0; background: color-mix(in srgb, var(--krem) 92%, transparent); backdrop-filter: blur(8px); z-index: 5; }
.top .tt { flex: 1; min-width: 0; }
.top .t { font-family: var(--f-d); font-weight: 700; font-size: 22px; line-height: 1.15; letter-spacing: -.01em; }
.top .s { font-size: 13.5px; color: var(--tinta-2); }
.ibtn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--putih); border: 1px solid var(--garis); text-decoration: none; flex: none; cursor: pointer; }
.ibtn svg { width: 22px; height: 22px; }
.wm { font-family: var(--f-d); font-weight: 700; font-size: 26px; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 8px; }
.wm i { width: 14px; height: 14px; border-radius: 4px 4px 4px 0; background: var(--tera); transform: rotate(45deg); display: inline-block; }

/* teks */
h1, h2, h3 { margin: 0; }
.headline { font-family: var(--f-d); font-weight: 700; font-size: 29px; line-height: 1.12; letter-spacing: -.015em; }
.h2 { font-family: var(--f-d); font-weight: 700; font-size: 20px; line-height: 1.2; }
.lead { font-size: 16px; color: var(--tinta-2); margin: 0; }
.note { font-size: 13px; color: var(--tinta-2); margin: 0; line-height: 1.45; }
.mono { font-family: var(--f-m); font-variant-numeric: tabular-nums; }
.eb { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tera-d); }

/* kartu */
.card { background: var(--putih); border: 1px solid var(--garis); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.soft { background: var(--krem-2); border-color: transparent; box-shadow: none; }
.row { display: flex; align-items: center; gap: 10px; }
.sp { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* tombol */
.btn { min-height: 52px; border-radius: 15px; border: 0; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 750; font-size: 16.5px; cursor: pointer; text-decoration: none; transition: transform .12s ease, background .15s ease; }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.pri { background: var(--tera); color: #fff; box-shadow: 0 6px 16px -8px rgba(185, 90, 55, .8); }
.btn.pri:hover { background: var(--tera-d); }
.btn.sage { background: var(--sage-d); color: #fff; }
.btn.sec { background: var(--putih); color: var(--tinta); border: 1.5px solid var(--garis); }
.btn.ghost { background: transparent; color: var(--tera-d); min-height: 44px; padding: 0 8px; }
.btn.sm { min-height: 40px; font-size: 14.5px; padding: 0 14px; border-radius: 12px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

/* form */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl { font-weight: 700; font-size: 14.5px; }
.field small { color: var(--tinta-2); font-size: 13px; }
input[type=email], input[type=text], input[type=number], input[inputmode], textarea, select {
  width: 100%; min-height: 50px; border-radius: 13px; border: 1.5px solid var(--garis); background: var(--putih); padding: 12px 14px; font-size: 16px; outline: none; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--tera); box-shadow: 0 0 0 3px var(--tera-l); }
input.code { font-family: var(--f-m); font-size: 26px; letter-spacing: .4em; text-align: center; }
.rpIn { position: relative; }
.rpIn span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-family: var(--f-m); color: var(--tinta-2); font-size: 15px; }
.rpIn input { padding-left: 44px; font-family: var(--f-m); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--krem-2); padding: 5px; border-radius: 15px; }
.seg button { min-height: 44px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; font-size: 14.5px; cursor: pointer; padding: 0 6px; }
.seg button[aria-pressed=true] { background: var(--putih); box-shadow: var(--shadow); color: var(--tera-d); }

.err { background: #FBE3DC; color: #8A2F17; border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.ok { background: var(--sage-l); color: var(--sage-d); border-radius: 12px; padding: 12px 14px; font-size: 15px; font-weight: 600; }
.info { background: var(--mentega-l); color: #6B5410; border-radius: 12px; padding: 12px 14px; font-size: 15px; }

/* slot foto */
.slots { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: 250px; }
.slot { position: relative; border-radius: 16px; border: 2px dashed #CDBFAA; background: var(--putih); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; cursor: pointer; overflow: hidden; padding: 8px; font-size: 13.5px; color: var(--tinta-2); font-weight: 600; }
.slot:first-child { grid-row: span 2; font-size: 15px; color: var(--tinta); }
.slot svg { width: 30px; height: 30px; color: var(--tera); }
.slot:first-child svg { width: 42px; height: 42px; }
.slot.isi { border-style: solid; border-color: transparent; padding: 0; }
.slot.isi img { width: 100%; height: 100%; object-fit: cover; }
.slot .del { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 10px; background: rgba(59, 47, 42, .72); color: #fff; display: grid; place-items: center; border: 0; cursor: pointer; }
.slot .del svg { width: 18px; height: 18px; color: #fff; }
.slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* kuota pill */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 750; background: var(--putih); border: 1px solid var(--garis); white-space: nowrap; }
.pill.sage { background: var(--sage-l); border-color: transparent; color: var(--sage-d); }
.pill.tera { background: var(--tera-l); border-color: transparent; color: var(--tera-d); }
.pill.mentega { background: var(--mentega-l); border-color: transparent; color: #7A5E0C; }
.pill.abu { background: var(--krem-2); border-color: transparent; color: var(--tinta-2); }

/* label harga (tag) */
.tag { position: relative; background: var(--mentega); border-radius: 16px 16px 16px 16px; padding: 16px 18px 16px 30px; color: var(--tinta); }
.tag::before { content: ''; position: absolute; left: 11px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--krem); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18); }
.tag .k { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.tag .v { font-family: var(--f-m); font-weight: 700; font-size: 28px; letter-spacing: -.02em; line-height: 1.15; margin: 2px 0; }
.tag .s { font-size: 13.5px; }
.dua { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ak { border-radius: 15px; padding: 13px 14px; background: var(--putih); border: 1px solid var(--garis); }
.ak .k { font-size: 13px; font-weight: 750; color: var(--tinta-2); }
.ak .v { font-family: var(--f-m); font-weight: 700; font-size: 21px; margin: 2px 0; }
.ak small { font-size: 12.5px; color: var(--tinta-2); line-height: 1.35; display: block; }
.ak.buka { border-color: var(--tera); background: var(--tera-l); }
.ak.nego { border-color: var(--sage); background: var(--sage-l); }
.ak .v input { font-family: var(--f-m); font-weight: 700; font-size: 19px; min-height: 40px; padding: 4px 8px; background: rgba(255, 255, 255, .7); }

/* listing pembanding */
.lst { display: flex; flex-direction: column; gap: 8px; }
.lst a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; border-radius: 13px; background: var(--putih); border: 1px solid var(--garis); text-decoration: none; }
.lst .j { font-weight: 650; font-size: 14.5px; line-height: 1.35; }
.lst .h { font-family: var(--f-m); font-weight: 700; font-size: 15px; text-align: right; }
.lst .m { font-size: 12.5px; color: var(--tinta-2); }
.lst .o { font-size: 12.5px; font-weight: 750; color: var(--tera-d); text-align: right; white-space: nowrap; }
details.buang { font-size: 14px; color: var(--tinta-2); }
details.buang summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
details.buang ul { margin: 4px 0 0; padding-left: 18px; }

/* chip info barang */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--krem-2); color: var(--tinta); font-weight: 600; }
.chip.minus { background: #FBE3DC; color: #8A2F17; }

/* barang hasil */
.brg { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: start; }
.brg .ph { width: 76px; height: 76px; border-radius: 14px; overflow: hidden; background: var(--krem-2); display: grid; place-items: center; font-family: var(--f-d); font-weight: 700; font-size: 26px; color: var(--tinta-2); }
.brg .ph img { width: 100%; height: 100%; object-fit: cover; }
.nmIn { font-family: var(--f-d) !important; font-weight: 700; font-size: 19px !important; min-height: 46px !important; padding: 8px 12px !important; }

/* tab caption */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; min-height: 42px; border-radius: 12px; border: 1.5px solid var(--garis); background: var(--putih); padding: 0 14px; font-weight: 750; font-size: 14.5px; cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--tinta); color: var(--krem); border-color: var(--tinta); }
.cap { display: flex; flex-direction: column; gap: 8px; }
.cap .hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cap textarea { font-size: 15px; background: #FFFDF9; }
.cap input { font-weight: 700; background: #FFFDF9; }
.salin { min-height: 40px; border-radius: 11px; border: 0; background: var(--tinta); color: var(--krem); font-weight: 750; font-size: 14px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; flex: none; }
.salin svg { width: 17px; height: 17px; }
.salin.done { background: var(--sage-d); }

.nego { display: flex; flex-direction: column; gap: 8px; }
.ng { background: var(--putih); border: 1px solid var(--garis); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ng .q { font-size: 13px; font-weight: 800; color: var(--tera-d); }
.ng .a { font-size: 15px; line-height: 1.5; }
.ng .a mark { background: var(--mentega-l); padding: 0 2px; border-radius: 4px; }
.ng .row { justify-content: flex-end; }

/* daftar jualan */
.sum { background: var(--tinta); color: var(--krem); border-radius: 20px; padding: 18px; }
.sum .k { font-size: 13.5px; opacity: .8; }
.sum .v { font-family: var(--f-m); font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.sum .g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.sum .g div { background: rgba(246, 241, 233, .1); border-radius: 12px; padding: 8px 10px; }
.sum .g b { display: block; font-family: var(--f-m); font-size: 19px; }
.sum .g span { font-size: 12.5px; opacity: .85; }
.filt { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.filt button { flex: none; min-height: 40px; border-radius: 999px; border: 1.5px solid var(--garis); background: var(--putih); padding: 0 14px; font-weight: 700; font-size: 14px; cursor: pointer; }
.filt button[aria-pressed=true] { background: var(--tera); border-color: var(--tera); color: #fff; }
.li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px; background: var(--putih); border: 1px solid var(--garis); border-radius: 15px; text-decoration: none; width: 100%; text-align: left; cursor: pointer; }
.li .th { width: 56px; height: 56px; border-radius: 12px; background: var(--krem-2); overflow: hidden; display: grid; place-items: center; font-family: var(--f-d); font-weight: 700; color: var(--tinta-2); font-size: 20px; }
.li .th img { width: 100%; height: 100%; object-fit: cover; }
.li .nm { font-weight: 700; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.li .mt { font-size: 13px; color: var(--tinta-2); margin-top: 2px; }
.li .rt { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.li .rt b { font-family: var(--f-m); font-size: 14.5px; }
.st-dipasang { background: var(--tera-l); color: var(--tera-d); }
.st-ditawar { background: var(--mentega-l); color: #7A5E0C; }
.st-laku { background: var(--sage-l); color: var(--sage-d); }

/* bottom sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(59, 47, 42, .45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.sheet { width: 100%; max-width: 480px; max-height: 88dvh; overflow: auto; background: var(--krem); border-radius: 22px 22px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; animation: up .22s cubic-bezier(.2, .8, .2, 1); }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--garis); margin: 2px auto 4px; }
@keyframes up { from { transform: translateY(30px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }

/* loading */
.load { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 24px 22px; }
.load .ph { width: 132px; height: 132px; border-radius: 26px; overflow: hidden; margin: 0 auto; position: relative; background: var(--krem-2); }
.load .ph img { width: 100%; height: 100%; object-fit: cover; }
.load .ph::after { content: ''; position: absolute; left: 0; right: 0; height: 36%; background: linear-gradient(180deg, transparent, rgba(242, 201, 76, .55), transparent); animation: scan 1.6s ease-in-out infinite; }
@keyframes scan { 0% { top: -36%; } 100% { top: 100%; } }
.langkah { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.langkah li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; }
.langkah .dot { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--putih); border: 2px solid var(--garis); }
.langkah .dot::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--tera); animation: pulse 1.1s ease-in-out infinite; }
.langkah li.off { color: var(--tinta-2); }
.langkah li.off .dot::after { background: var(--garis); animation: none; }
@keyframes pulse { 50% { transform: scale(.45); opacity: .5; } }

/* tabbar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; background: var(--putih); border-top: 1px solid var(--garis); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tabbar .in { width: 100%; max-width: 480px; display: grid; grid-template-columns: repeat(3, 1fr); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; justify-content: center; text-decoration: none; font-size: 12.5px; font-weight: 700; color: var(--tinta-2); border-radius: 12px; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--tera-d); }
.tab.on svg { stroke-width: 2.4; }

.bar { height: 10px; background: var(--krem-2); border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--sage); border-radius: 6px; }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--tinta); color: var(--krem); padding: 11px 16px; border-radius: 12px; font-size: 14.5px; font-weight: 650; opacity: 0; pointer-events: none; transition: .2s ease; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.disc { font-size: 12.5px; color: var(--tinta-2); line-height: 1.45; text-align: center; padding: 4px 8px 0; }
.sticky { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); padding-top: 8px; background: linear-gradient(180deg, transparent, var(--krem) 30%); }
.scr.noTab .sticky { bottom: env(safe-area-inset-bottom); }
.tips { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tips li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.tips .n { width: 30px; height: 30px; border-radius: 10px; background: var(--mentega); font-family: var(--f-m); font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.tips b { display: block; font-size: 15px; }
.tips span { font-size: 14px; color: var(--tinta-2); }
details.pd summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 750; }
details.pd summary::-webkit-details-marker { display: none; }
details.pd summary svg { width: 20px; height: 20px; color: var(--tera); }
details.pd[open] summary .chev { transform: rotate(90deg); }
.chev { transition: transform .15s ease; margin-left: auto; }
table.adm { width: 100%; border-collapse: collapse; font-size: 13px; }
table.adm td, table.adm th { border-bottom: 1px solid var(--garis); padding: 6px 4px; text-align: left; vertical-align: top; word-break: break-word; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.row > svg, .pill > svg { width: 20px; height: 20px; flex: none; }
.pill > svg { width: 14px; height: 14px; }
.card .row > svg { color: var(--tera); }
.ak .v .rpIn input { padding-left: 36px; }
.ak .v .rpIn span { left: 9px; font-size: 13px; }
