/* MaklonGo — minimal, clean, mobile-first */
:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --muted: #6b6b70;
  --line: #e8e4dc;
  --primary: #0a8a86;
  --primary-ink: #ffffff;
  --primary-soft: #e3f7f6;
  --brand: #11bab5;
  --accent: #f4c24f;
  --accent-soft: #fff4d6;
  --danger: #c2410c;
  --danger-soft: #fdeee6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
.hidden { display: none !important; }
.container { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wide { max-width: 1180px; }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(250,248,244,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.logo img { height: 32px; width: auto; display: block; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; text-decoration: none; color: var(--ink); }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.logo span em { font-style: normal; color: var(--primary); }
.topbar .cart-pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.cart-pill .count { background: var(--primary); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; font-size: 12px; padding: 0 6px; }

/* ---------- hero ---------- */
.hero { padding: 36px 0 28px; text-align: center; }
.highlight { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: #7a5600; border: 1px solid #f3dc9a; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; letter-spacing: .01em; }
.hero h1 { font-size: clamp(28px, 7vw, 44px); line-height: 1.12; letter-spacing: -.03em; margin: 18px 0 12px; font-weight: 800; }
.hero h1 mark { background: linear-gradient(transparent 58%, var(--accent) 58%); color: inherit; padding: 0 2px; }
.hero p.lead { color: var(--muted); font-size: 16px; max-width: 520px; margin: 0 auto 22px; }
.hero-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 26px 0 8px; text-align: left; }
.hero-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; font-size: 13px; }
.hero-step b { display: block; font-size: 14px; margin-bottom: 2px; }
.hero-step .n { width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-grid; place-items: center; font-weight: 800; font-size: 12px; margin-bottom: 6px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; color: var(--muted); font-size: 12.5px; }
.trust span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
@media (min-width: 640px) { .hero-steps { grid-template-columns: repeat(4, 1fr); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 12px 18px; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .05s ease, background .15s; min-height: 46px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: #087571; }
.btn-primary[disabled] { background: #a7d6d4; cursor: not-allowed; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #cfc8bb; }
.btn-wa { background: #25d366; color: #073b1d; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: #f6cdb8; }
.btn-sm { padding: 7px 12px; min-height: 36px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 22px; font-size: 16px; }
.link-btn { background: none; border: 0; color: var(--primary); font-weight: 700; cursor: pointer; padding: 4px; }

/* ---------- wizard ---------- */
.progress { padding: 14px 0 6px; }
.progress-track { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); width: 0; transition: width .3s ease; border-radius: 99px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.progress-meta b { color: var(--ink); }
.step-head { margin: 10px 0 16px; }
.step-head h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 4px; }
.step-head p { margin: 0; color: var(--muted); }
.page { padding-bottom: 120px; }

.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
.actionbar .container { display: flex; gap: 10px; align-items: center; }
.actionbar .summary { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actionbar .summary b { color: var(--ink); display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- chips & search ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .c { opacity: .6; font-weight: 500; margin-left: 4px; }
.search { position: relative; margin-bottom: 10px; }
.search input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px 12px 40px; outline: none; }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.list { display: grid; gap: 10px; }
.option { position: relative; display: block; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 14px 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; text-align: left; width: 100%; }
.option:hover { border-color: #cfc8bb; }
.option.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.option .title { font-weight: 700; font-size: 15.5px; margin-right: 28px; }
.option .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.option .check { position: absolute; right: 14px; top: 14px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #cfc8bb; display: grid; place-items: center; background: #fff; }
.option.selected .check { background: var(--primary); border-color: var(--primary); color: #fff; }
.option.multi .check { border-radius: 7px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag { font-size: 11.5px; font-weight: 600; background: #f3f0ea; color: #514e47; padding: 3px 8px; border-radius: 999px; }
.tag.green { background: var(--primary-soft); color: var(--primary); }
.tag.yellow { background: var(--accent-soft); color: #7a5600; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); vertical-align: middle; }

.detail { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); cursor: default; }
.detail h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.notice { background: var(--accent-soft); border: 1px solid #f3dc9a; color: #6b4c00; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; }
.notice.green { background: var(--primary-soft); border-color: #bfe8e6; color: #0b5a57; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------- form ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.field label .req { color: var(--danger); }
.input, .field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; outline: none; }
.field textarea { min-height: 84px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .err { font-size: 12px; color: var(--danger); margin-top: 4px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.grid-2 { display: grid; gap: 0 12px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.vol-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (min-width: 560px) { .vol-grid { grid-template-columns: repeat(6, 1fr); } }
.vol-btn { border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 4px; font-weight: 700; cursor: pointer; text-align: center; }
.vol-btn small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.vol-btn.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.stepper button { width: 52px; height: 50px; border: 0; background: #f6f3ee; font-size: 22px; font-weight: 700; cursor: pointer; }
.stepper input { flex: 1; text-align: center; border: 0; font-size: 18px; font-weight: 700; height: 50px; outline: none; min-width: 0; }

/* ---------- packaging grid ---------- */
.pack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .pack-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .pack-grid { grid-template-columns: repeat(4, 1fr); } }
.pack { position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; display: flex; flex-direction: column; }
.pack.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.pack .img { aspect-ratio: 1; background: #f4f2ee; }
.pack .img img { width: 100%; height: 100%; object-fit: cover; }
.pack .body { padding: 9px 10px 11px; }
.pack .code { font-size: 11px; color: var(--muted); font-weight: 600; }
.pack .name { font-size: 13px; font-weight: 700; line-height: 1.3; margin: 2px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pack .meta { font-size: 11.5px; color: var(--muted); }
.pack .vol { position: absolute; left: 8px; top: 8px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 2px 8px; font-size: 11.5px; font-weight: 700; }
.pack .check { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.9); border: 1.5px solid #cfc8bb; display: grid; place-items: center; }
.pack.selected .check { background: var(--primary); border-color: var(--primary); color: #fff; }
.pack-none { border-style: dashed; }
.load-more { margin: 16px auto 0; display: flex; }

/* ---------- checklist ---------- */
.checkrow { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; margin-bottom: 10px; }
.checkrow input { width: 22px; height: 22px; accent-color: var(--primary); margin-top: 1px; flex: none; }
.checkrow.on { border-color: var(--primary); background: #fbfefd; }
.checkrow b { display: block; }
.checkrow .fee { color: var(--primary); font-weight: 700; }

/* ---------- summary / cart ---------- */
.sku { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.sku-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.sku-head h3 { margin: 0; font-size: 16px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 13.5px; margin-top: 10px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.sku-actions { display: flex; gap: 8px; margin-top: 12px; }

.success { text-align: center; padding: 40px 0; }
.success .icon { width: 72px; height: 72px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin: 0 auto 16px; font-size: 34px; }
.order-no { font-size: 26px; font-weight: 800; letter-spacing: .02em; background: var(--surface); border: 1px dashed var(--primary); border-radius: 12px; padding: 10px 16px; display: inline-block; margin: 10px 0; }

.footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 30px 0 40px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; z-index: 100; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* ---------- admin ---------- */
.admin body, body.admin { background: #f6f5f2; }
.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.login { max-width: 380px; margin: 12vh auto; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: #faf9f6; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; }
.tbl input.inp { width: 120px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; text-align: right; background: #fff; }
.tbl input.inp.changed { border-color: var(--accent); background: var(--accent-soft); }
.tbl tfoot td { font-weight: 800; background: #faf9f6; }
.order-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.order-row:hover { border-color: #cfc8bb; }
.order-row .id { font-weight: 800; }
.order-row .meta { font-size: 12.5px; color: var(--muted); }
.order-row .amt { font-weight: 800; text-align: right; }
.status { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eee; display: inline-block; }
.status.baru { background: #e0ecff; color: #1d4ed8; }
.status.invoice { background: var(--accent-soft); color: #7a5600; }
.status.dp, .status.produksi { background: #f3e8ff; color: #7e22ce; }
.status.selesai { background: var(--primary-soft); color: var(--primary); }
.status.batal { background: var(--danger-soft); color: var(--danger); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat .v { font-size: 22px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.section-title { font-size: 18px; margin: 20px 0 10px; letter-spacing: -.01em; }
.modal-bg { position: fixed; inset: 0; background: rgba(20,20,20,.45); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--bg); width: 100%; max-width: 900px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 18px 16px 30px; }
@media (min-width: 760px) { .modal-bg { align-items: center; } .modal { border-radius: 20px; } }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #f2efe9; }
.flag { color: var(--danger); font-weight: 700; }

.tag.new { background: var(--brand); color: #fff; }
.pack .new { position: absolute; left: 8px; bottom: auto; top: 34px; background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 700; }
.hero-logo { height: 54px; width: auto; margin: 0 auto 16px; }

/* Tombol WhatsApp melayang — selalu tampil di web customer */
.wa-float { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 8px;
  background: #25d366; color: #fff; text-decoration: none; border-radius: 999px; padding: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.18); transition: bottom .2s ease, transform .1s; }
.wa-float:hover { transform: translateY(-1px); }
.wa-float .wa-label { font-weight: 700; font-size: 14px; padding-right: 6px; }
.wa-float.raised { bottom: calc(88px + env(safe-area-inset-bottom)); }
.wa-float.raised .wa-label { display: none; }
@media (max-width: 420px) { .wa-float .wa-label { display: none; } }
