@font-face { font-family: 'PJS'; src: url('/assets/fonts/pjs-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'PJS'; src: url('/assets/fonts/pjs-600.woff2') format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'PJS'; src: url('/assets/fonts/pjs-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'PJS'; src: url('/assets/fonts/pjs-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --bg: #F2F6F1;
  --card: #FFFFFF;
  --ink: #0F3D27;
  --text: #1E2B23;
  --muted: #5F6F65;
  --green: #27734D;
  --green-dark: #1D5C3C;
  --green-50: #EAF4EC;
  --green-100: #D7EBDD;
  --yellow: #F2B200;
  --yellow-50: #FFF6DB;
  --yellow-100: #FDEBB4;
  --sun: #F6A10A;
  --line: #E4ECE5;
  --soft: #F4F7F4;
  --danger: #B42318;
  --danger-50: #FDECEA;
  --blue: #2D7FC1;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 61, 39, .04), 0 6px 18px rgba(15, 61, 39, .05);
  font-size: 15px;
}
html[data-font="normal"] { font-size: 14px; }
html[data-font="extra_large"] { font-size: 17px; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: 'PJS', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.4; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.2; }
p { margin: 0; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Kerangka ---------- */
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding: 0 14px calc(78px + env(safe-area-inset-bottom)); position: relative; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px 4px; padding-top: max(12px, env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.35rem; color: var(--ink); letter-spacing: -.02em; }
.brand svg { width: 1.8rem; height: 1.8rem; }
.bell { position: relative; width: 42px; height: 42px; border-radius: 50%; background: var(--card); border: 0; display: grid; place-items: center; box-shadow: var(--shadow); color: var(--ink); }
.bell .icon { width: 21px; height: 21px; }
.bell .dot { position: absolute; top: 7px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--card); }

.page-head { margin: 8px 2px 14px; }
.page-head h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--muted); font-size: .98rem; margin-top: 4px; }
.page-head.with-back { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.page-head.with-back p { grid-column: 2; }
.back { border: 0; background: none; padding: 4px; color: var(--ink); display: grid; place-items: center; }
.back .icon { width: 24px; height: 24px; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav .inner { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #6B7A71; font-size: .74rem; font-weight: 500; padding: 4px 0; position: relative; }
.bottom-nav a .icon { width: 23px; height: 23px; }
.bottom-nav a.active { color: var(--green); font-weight: 700; }
.bottom-nav a.active .icon { fill: var(--green-100); }
.bottom-nav a.active::after { content: ''; position: absolute; bottom: -6px; width: 36px; height: 3px; border-radius: 4px; background: var(--green); }

/* ---------- Kartu & komponen ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.card.tight { padding: 12px; }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-title h2 { font-size: 1.15rem; font-weight: 800; flex: 1; }
.card-title .sub { color: var(--muted); font-size: .9rem; margin-top: 2px; font-weight: 500; }
.card-title > .icon { width: 24px; height: 24px; }
.card-title .chev { color: var(--muted); }
.sun { color: var(--sun); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.stack > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 12px; display: flex; align-items: center; gap: 10px; }
.stat .bubble { width: 46px; height: 46px; }
.stat b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1; }
.stat span { color: var(--muted); font-size: .88rem; }
.bubble { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--green-50); color: var(--green); }
.bubble .icon { width: 50%; height: 50%; }
.bubble.yellow { background: var(--yellow-50); color: #B07D00; }
.bubble.sq { border-radius: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px;
  background: var(--green); color: #fff; font-weight: 700; font-size: 1rem; padding: 10px 16px; min-height: 46px;
  box-shadow: 0 2px 0 rgba(0,0,0,.08); transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn:hover { background: var(--green-dark); }
.btn.block { display: flex; width: 100%; }
.btn.big { font-size: 1.08rem; min-height: 52px; border-radius: 14px; }
.btn.outline { background: #fff; color: var(--ink); border: 2px solid var(--green); box-shadow: none; }
.btn.outline:hover { background: var(--green-50); }
.btn.soft { background: var(--green-50); color: var(--green-dark); box-shadow: none; }
.btn.yellow { background: var(--yellow); color: #3D2C00; }
.btn.danger { background: var(--danger); }
.btn.ghost { background: transparent; color: var(--green); box-shadow: none; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .88rem; border-radius: 10px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn .chev-end { margin-left: auto; }

.task { display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.task .check { width: 26px; height: 26px; border-radius: 7px; border: 2px solid #5D6B63; background: #fff; flex: none; display: grid; place-items: center; padding: 0; color: #fff; }
.task.done .check { background: var(--green); border-color: var(--green); }
.task.done h4 { text-decoration: line-through; color: var(--muted); }
.task h4 { font-size: 1rem; font-weight: 700; }
.task p { color: var(--muted); font-size: .86rem; display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.task .open { border: 0; background: none; padding: 4px; color: var(--muted); display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-align: left; }
.task .open > div { flex: 1; min-width: 0; }
.task .leaf { color: #3E9A4E; }
.task .drop { color: var(--blue); }
.tag-late { display: inline-block; background: var(--danger-50); color: var(--danger); font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.tag-pending { display: inline-flex; align-items: center; gap: 4px; background: var(--yellow-50); color: #8A6200; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }

.plant { display: grid; grid-template-columns: 40% 1fr; gap: 12px; align-items: center; }
.plant + .plant { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.thumb { border-radius: 12px; overflow: hidden; background: var(--green-50); aspect-ratio: 4 / 3; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.plant h3 { font-size: 1.08rem; font-weight: 800; }
.plant .phase-label { color: var(--muted); font-size: .9rem; margin: 4px 0 8px; }
.progress { height: 10px; border-radius: 99px; background: #E3EBE5; overflow: hidden; flex: 1; }
.progress > i { display: block; height: 100%; background: var(--green); border-radius: 99px; min-width: 10px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.tile { border-radius: var(--radius); padding: 14px; min-height: 140px; display: flex; flex-direction: column; gap: 4px; }
.tile.green { background: var(--green-50); }
.tile.yellow { background: var(--yellow-50); }
.tile .icon.big { width: 40px; height: 40px; margin-bottom: 4px; }
.tile h3 { font-size: 1.02rem; font-weight: 800; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tile p { color: var(--muted); font-size: .86rem; }

.banner { display: flex; align-items: center; gap: 12px; background: var(--yellow-50); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.banner h3 { font-size: 1.02rem; font-weight: 800; }
.banner p { font-size: .88rem; color: #4A4128; }
.banner.green { background: var(--green-50); }
.banner.wrap { flex-wrap: wrap; }
.banner.wrap > .grow { flex: 1 1 60%; }
.banner.wrap > .btn { flex: 1 1 100%; }
.banner .coins { color: var(--yellow); width: 40px; height: 40px; }

.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card); border-radius: 14px; padding: 5px; gap: 4px; box-shadow: var(--shadow); margin-bottom: 12px; }
.tabs button { border: 0; background: none; padding: 9px 4px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .9rem; position: relative; white-space: nowrap; }
.tabs button.active { background: var(--green-50); color: var(--ink); font-weight: 800; }
.tabs button.active::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: 3px; height: 3px; border-radius: 3px; background: var(--green); }

.chips { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 0; padding: 8px 16px; border-radius: 99px; background: var(--green-50); color: var(--ink); font-weight: 600; font-size: .9rem; white-space: nowrap; flex: 1 0 auto; }
.chip.yellow { background: var(--yellow-50); }
.chip.active { background: var(--green); color: #fff; }

.search { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 0 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.search .icon { width: 20px; height: 20px; color: var(--ink); }
.search input { border: 0; outline: 0; background: none; flex: 1; padding: 12px 0; font-size: 16px; min-width: 0; }

.pcard .top { display: grid; grid-template-columns: 38% 1fr; gap: 12px; }
.pcard .thumb { aspect-ratio: auto; height: 100%; min-height: 110px; }
.pcard h3 { font-size: 1.08rem; font-weight: 800; }
.pcard .meta { color: var(--muted); font-size: .9rem; margin: 2px 0 6px; }
.pcard .hint { display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: 12px; padding: 8px 10px; margin-top: 10px; font-size: .88rem; }
.pcard .hint .icon { color: #3E9A4E; }
.pcard .btn { margin-top: 12px; }
.trash-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--danger-50); color: var(--danger); display: grid; place-items: center; padding: 0; }
.trash-btn .icon { width: 18px; height: 18px; }
.trash-btn:active { transform: scale(.94); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 10px; background: var(--green-50); color: var(--ink); font-weight: 600; font-size: .8rem; white-space: nowrap; }
.badge.yellow { background: var(--yellow-50); color: #6E4E00; }
.badge.red { background: var(--danger-50); color: var(--danger); }
.badge.grey { background: #EEF1EF; color: #4D5A52; }
.badge .icon { width: 15px; height: 15px; }

.ccard { display: grid; grid-template-columns: 38% 1fr; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); margin-bottom: 10px; }
.ccard .thumb { aspect-ratio: auto; min-height: 110px; }
.ccard h3 { font-size: 1.1rem; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.ccard .meta { color: var(--muted); font-size: .88rem; margin: 2px 0 6px; }
.ccard .price-label { color: var(--muted); font-size: .8rem; }
.ccard .price { font-size: 1.2rem; font-weight: 800; color: var(--ink); }
.ccard .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* ---------- Katalog komoditas ---------- */
.cat-hero { position: relative; overflow: hidden; margin: 8px 0 12px; padding: 18px 16px 16px; border-radius: var(--radius);
  background: radial-gradient(120% 140% at 100% 0, #3E9A63 0, var(--green) 45%, var(--green-dark) 100%); color: #fff; box-shadow: 0 10px 24px rgba(29, 92, 60, .25); }
.cat-hero-text { position: relative; z-index: 1; max-width: 78%; }
.cat-hero h1 { color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.cat-hero p { color: rgba(255,255,255,.85); font-size: .9rem; margin-top: 2px; }
.cat-hero-art { position: absolute; right: -14px; top: -10px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.cat-hero-art .icon { width: 58px; height: 58px; color: var(--yellow); stroke-width: 1.6; transform: rotate(-12deg); }
.cat-hero .search { position: relative; z-index: 1; margin: 14px 0 0; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.cat-chips { gap: 6px; }
.cat-chips .chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: var(--card); box-shadow: var(--shadow); flex: 1 0 auto; padding: 8px 10px; }
.cat-chips .chip .icon { width: 17px; height: 17px; color: var(--green); }
.cat-chips .chip i { font-style: normal; font-size: .75rem; font-weight: 700; background: var(--green-50); color: var(--green-dark); border-radius: 99px; padding: 1px 7px; }
.cat-chips .chip.active { background: var(--green); color: #fff; }
.cat-chips .chip.active .icon { color: #fff; }
.cat-chips .chip.active i { background: rgba(255,255,255,.22); color: #fff; }
.cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.ctile { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.ctile:active { transform: scale(.98); }
@media (hover: hover) { .ctile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15,61,39,.06), 0 12px 26px rgba(15,61,39,.1); } }
.ctile-img { position: relative; aspect-ratio: 1 / 1; background: var(--green-50); display: grid; place-items: center; color: var(--green); }
.ctile-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ctile-img::after { content: ''; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgba(0,0,0,.35)); }
.ctile-img > .icon { width: 40%; height: 40%; }
.ctile-cat, .ctile-days, .ctile-deal { position: absolute; z-index: 1; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 3px 9px; }
.ctile-cat { top: 8px; left: 8px; background: rgba(255,255,255,.92); color: var(--green-dark); }
.ctile-cat.fruit { color: #8A5A00; }
.ctile-deal { top: 8px; right: 8px; background: var(--yellow); color: #3D2C00; }
.ctile-days { bottom: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; color: #fff; padding-left: 4px; }
.ctile-days .icon { width: 13px; height: 13px; }
.ctile-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.ctile-body h3 { font-size: 1.05rem; font-weight: 800; }
.ctile-meta { color: var(--muted); font-size: .8rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctile-level { display: flex; align-items: center; gap: 3px; margin: 6px 0 10px; }
.ctile-level i { width: 14px; height: 5px; border-radius: 3px; background: #DDE6DF; }
.ctile-level i.on { background: var(--green); }
.ctile-level span { font-size: .74rem; color: var(--muted); margin-left: 4px; font-weight: 600; }
.ctile-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.ctile-foot small { display: block; color: var(--muted); font-size: .7rem; }
.ctile-foot b { color: var(--ink); font-size: 1rem; font-weight: 800; }
.ctile-go { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.ctile-go .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.c-hero { position: relative; aspect-ratio: 16 / 10; }
.c-hero .ctile-cat { top: 12px; left: 12px; font-size: .8rem; }
.c-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: -34px 10px 12px; position: relative; z-index: 2; }
.c-facts > div { background: var(--card); border-radius: 16px; box-shadow: 0 6px 18px rgba(15,61,39,.12); padding: 10px 6px; text-align: center; min-width: 0; }
.c-facts .icon { width: 20px; height: 20px; color: var(--green); margin: 0 auto 4px; display: block; }
.c-facts b { display: block; color: var(--ink); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-facts span { display: block; color: var(--muted); font-size: .7rem; }
/* ---------- Pembayaran langsung (QRIS / VA) ---------- */
.paybox { display: flex; flex-direction: column; gap: 10px; }
.paybox-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; }
.paybox-head img { width: 58px; height: 30px; object-fit: contain; flex: none; }
.paybox-head small, .paybox-total small, .paybox-code small { display: block; color: var(--muted); font-size: .76rem; }
.paybox-head b { color: var(--ink); }
.paybox-total { background: var(--green-50); border-radius: 14px; padding: 12px; }
.paybox-total b { font-size: 1.6rem; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.paybox-total > span { color: var(--muted); font-size: .8rem; }
.paybox-qr { text-align: center; border: 2px dashed var(--green-100); border-radius: 16px; padding: 14px 12px; }
.paybox-qr img { width: 220px; height: 220px; margin: 0 auto 10px; background: #fff; border-radius: 10px; padding: 6px; box-shadow: var(--shadow); image-rendering: pixelated; }
.paybox-qr p { font-size: .88rem; color: var(--text); margin-bottom: 10px; }
.paybox-qr p .small { color: var(--muted); }
.paybox-code { border: 2px dashed var(--green-100); border-radius: 16px; padding: 14px 12px; text-align: center; }
.paybox-code b { display: block; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 1.45rem; letter-spacing: .04em; color: var(--ink); margin: 4px 0 10px; word-break: break-all; }
.paybox-timer { display: flex; align-items: center; gap: 8px; background: var(--yellow-50); color: #5A4300; border-radius: 12px; padding: 9px 12px; font-size: .84rem; }
.paybox-timer > span { flex: 1; }
.paybox-timer [data-countdown] { font-family: ui-monospace, Menlo, monospace; font-size: .95rem; }
.paybox-wait { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; justify-content: center; }
.paybox-wait i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.pay-steps { margin: 0; padding: 10px 14px 12px 32px; font-size: .88rem; }
.pay-steps li + li { margin-top: 4px; }
.pay-group { border: 1px solid var(--line); border-radius: 16px; margin-bottom: 8px; background: #fff; overflow: hidden; }
.pay-group > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 11px 12px; cursor: pointer; }
.pay-group > summary::-webkit-details-marker { display: none; }
.pay-group > summary h4 { font-size: .98rem; display: flex; align-items: center; gap: 6px; }
.pay-group > summary p { color: var(--muted); font-size: .78rem; }
.pay-group > summary .bubble { width: 36px; height: 36px; }
.pay-group > summary .chev { color: var(--muted); transition: transform .15s; }
.pay-group[open] > summary { background: var(--green-50); }
.pay-group[open] > summary .chev { transform: rotate(90deg); }
.pay-group > .list-item, .pay-group > .field { margin: 8px 10px; width: auto; }
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; }
.pay-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-width: 0; padding: 10px 4px 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; text-align: center; transition: border-color .12s, transform .08s; }
.pay-tile:active { transform: scale(.97); }
.pay-tile .pay-logo { height: 28px; width: 100%; display: grid; place-items: center; color: var(--green); }
.pay-tile .pay-logo img { max-width: 78%; max-height: 28px; object-fit: contain; }
.pay-tile .pay-name { font-size: .74rem; font-weight: 600; color: var(--ink); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pay-tile.pick { border: 2px solid var(--green); background: var(--green-50); }
.pay-tile.pick::after { content: '✓'; position: absolute; top: 4px; right: 6px; font-size: .7rem; font-weight: 800; color: var(--green); }
.pay-tile[disabled] { opacity: 1; }
.pay-tile.busy { opacity: .6; }
.pay-tile.busy::before { content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border: 3px solid var(--green-100); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.pay-group > .list-item.channel:last-child { margin-bottom: 10px; }
.list-item.channel.pick { border: 2px solid var(--green); }
.list-item.channel[disabled] { opacity: 1; pointer-events: none; }
#pay-alt:not(:empty) { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.pay-alt-head { margin-bottom: 10px; }
.pay-alt-head h4 { font-size: 1rem; }
.pay-alt-head p { color: var(--muted); font-size: .82rem; }
.paybox-qr .btn.block { max-width: 260px; margin: 0 auto; }
.list-item.locked { opacity: .62; }
.list-item.locked .chev { color: var(--muted); }
/* Tombol aksi menempel tepat di atas menu bawah (mis. "Mulai proyek" di detail komoditas). */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: var(--nav-h, 64px); z-index: 25; padding: 8px 12px; pointer-events: none; }
.sticky-cta .inner { pointer-events: auto; max-width: 496px; margin: 0 auto; display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 18px; padding: 8px 8px 8px 14px; box-shadow: 0 -2px 6px rgba(15,61,39,.04), 0 10px 28px rgba(15,61,39,.16); }
.sticky-cta small { display: block; color: var(--muted); font-size: .74rem; }
.sticky-cta b { color: var(--ink); font-size: 1.15rem; font-weight: 800; }
.sticky-cta .btn { min-height: 48px; padding: 8px 18px; font-size: 1rem; flex: none; }
.sticky-space { height: 76px; }
/* Voucher sebelum checkout */
.voucher-box { margin-bottom: 12px; }
.voucher-input { display: flex; align-items: center; gap: 8px; border: 2px dashed var(--yellow-100); background: var(--yellow-50); border-radius: 14px; padding: 6px 6px 6px 12px; }
.voucher-input .icon { color: #C98A00; flex: none; }
.voucher-input input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 0; }
.voucher-input input::placeholder { text-transform: none; letter-spacing: 0; }
.voucher-ok { display: flex; align-items: flex-start; gap: 10px; background: var(--green-50); color: var(--green-dark); border-radius: 12px; padding: 10px 12px; font-size: .88rem; margin-top: 8px; }
.voucher-ok > .icon { flex: none; margin-top: 2px; }
.voucher-ok > span { flex: 1; }
.voucher-ok .kebab { padding: 0; color: var(--green-dark); }
.voucher-err { display: flex; align-items: center; gap: 6px; color: var(--danger); font-size: .86rem; margin-top: 6px; }
.voucher-err .icon { width: 16px; height: 16px; }
.code-tag { font-family: ui-monospace, Menlo, monospace; font-weight: 800; letter-spacing: .05em; background: var(--yellow-50); color: #6E4E00; border: 1px dashed #E2B43A; border-radius: 8px; padding: 2px 8px; }
.deal-banner { display: flex; align-items: center; gap: 12px; border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
  background: linear-gradient(120deg, #FFF3C9, var(--yellow-50)); border: 1px solid var(--yellow-100); }
.deal-banner > .icon { width: 40px; height: 40px; color: #C98A00; flex: none; }
.deal-banner h3 { font-size: 1rem; font-weight: 800; }
.deal-banner p { font-size: .85rem; color: #5A4A1E; }
@media (max-width: 340px) { .cgrid { grid-template-columns: 1fr; } }

.post { padding: 14px; }
.post .head { display: flex; align-items: center; gap: 10px; }
.avatar { max-width: none; width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--green-100); flex: none; display: grid; place-items: center; font-weight: 800; color: var(--green-dark); overflow: hidden; }
.avatar.lg { width: 76px; height: 76px; font-size: 1.6rem; }
.avatar.sm { width: 32px; height: 32px; font-size: .8rem; }
.post .name { font-weight: 800; color: var(--ink); font-size: 1rem; }
.post .head .grow { min-width: 0; }
.post .head .grow p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post .head .badge { font-size: .74rem; padding: 2px 7px; }
.post .head .badge .icon { width: 13px; height: 13px; }
.post h3 { font-size: 1.05rem; font-weight: 800; margin: 10px 0 8px; }
.post .photo { border-radius: 14px; overflow: hidden; margin-bottom: 10px; max-height: 260px; }
.post .photo img { width: 100%; height: 100%; object-fit: cover; max-height: 260px; }
.post .actions { display: flex; gap: 18px; margin-top: 8px; color: var(--muted); }
.post .actions button, .post .actions a { border: 0; background: none; padding: 4px 0; display: inline-flex; align-items: center; gap: 6px; color: inherit; font-size: .9rem; }
.post .actions .saved { color: var(--green); }
.post .actions .saved .icon { fill: var(--green); }
.reply { display: flex; gap: 10px; background: var(--soft); border-radius: 12px; padding: 10px; margin-top: 10px; align-items: flex-start; }
.kebab { border: 0; background: none; padding: 6px; color: var(--muted); }

.menu { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2px 14px; margin-bottom: 12px; }
.menu a, .menu button.item { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; font-weight: 700; color: var(--ink); font-size: .98rem; }
.menu > :last-child { border-bottom: 0; }
.menu .icon { width: 22px; height: 22px; }
.menu .chev { margin-left: auto; color: var(--muted); }
.menu .value { margin-left: auto; color: var(--muted); font-weight: 500; }
.menu .value ~ .chev, .menu .tag-late ~ .chev { margin-left: 4px; }

.list-item { display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: 14px; padding: 11px 12px; margin-bottom: 8px; width: 100%; border: 0; text-align: left; }
.list-item h4 { font-size: 1rem; font-weight: 800; }
.list-item p { color: var(--muted); font-size: .86rem; }
.list-item .chev { color: var(--muted); margin-left: auto; }
.list-item.channel { background: #fff; border: 1px solid var(--line); }
.list-item.channel img { width: 58px; height: 30px; object-fit: contain; flex: none; }
.banner.green .coins { color: var(--green); }

.setting { display: flex; align-items: center; gap: 12px; background: var(--soft); border-radius: 12px; padding: 12px; margin-bottom: 8px; width: 100%; border: 0; text-align: left; }
.setting h4 { font-size: .98rem; font-weight: 700; }
.setting p { color: var(--muted); font-size: .84rem; }
.setting .icon { width: 22px; height: 22px; color: var(--ink); }
.switch { position: relative; width: 50px; height: 30px; flex: none; margin-left: auto; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: #C9D3CC; border-radius: 99px; transition: .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }

.profile { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.profile h2 { font-size: 1.25rem; font-weight: 800; }
.profile .city { display: flex; align-items: center; gap: 4px; color: var(--muted); margin-top: 2px; font-size: .9rem; }
.profile .city .icon { color: var(--green); }
.profile-stats { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.profile-stats .sep { width: 1px; height: 36px; background: var(--line); }
.profile-stats > div:not(.sep) { display: flex; gap: 10px; align-items: center; }
.profile-stats b { font-size: 1.3rem; color: var(--ink); display: block; line-height: 1; }

.summary2 { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 10px; align-items: center; background: var(--green-50); border-radius: 14px; padding: 10px 12px; }
.summary2 .sep { background: var(--green-100); height: 40px; }
.summary2 > div:not(.sep) { display: flex; align-items: center; gap: 10px; min-width: 0; }
.summary2 .bubble { background: #fff; width: 34px; height: 34px; }
.summary2 b { display: block; font-size: 1rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary2 > div > div { min-width: 0; }
.summary2 span { color: var(--muted); font-size: .82rem; }

.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.kv > div { background: var(--soft); border-radius: 12px; padding: 10px; }
.kv span { display: block; color: var(--muted); font-size: .8rem; }
.kv b { font-size: 1.02rem; color: var(--ink); }
.kv .pos { color: var(--green); }
.kv .neg { color: var(--danger); }

.phase { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; overflow: hidden; }
.phase > summary { list-style: none; padding: 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 800; color: var(--ink); font-size: 1rem; }
.phase > summary::-webkit-details-marker { display: none; }
.phase[open] > summary { background: var(--green-50); }
.phase .num { width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: .85rem; flex: none; }
.step { padding: 10px 12px; border-top: 1px solid var(--line); }
.step h4 { font-size: .98rem; }
.pre { white-space: pre-line; }
.step .when { color: var(--green); font-weight: 700; font-size: .82rem; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--yellow-50); color: #5A4300; font-size: .88rem; margin-bottom: 12px; }
.notice.green { background: var(--green-50); color: var(--green-dark); }
.notice.red { background: var(--danger-50); color: var(--danger); }
.notice .icon { margin-top: 2px; }
.notice > span { min-width: 0; overflow-wrap: anywhere; }
.notice code { display: block; margin-top: 6px; font-size: .8rem; background: rgba(0,0,0,.05); border-radius: 8px; padding: 6px 8px; word-break: break-all; }
.notice .icon { flex: none; }

.empty { text-align: center; padding: 16px 10px; color: var(--muted); }
.empty > .icon { width: 38px; height: 38px; color: var(--green); margin: 0 auto 8px; display: block; }
.empty h3 { margin-bottom: 4px; font-size: 1.02rem; }
.empty .mt > .btn { display: flex; width: 100%; }

.journal .photo { border-radius: 14px; overflow: hidden; margin: 10px 0; }
.journal .photo img { width: 100%; max-height: 240px; object-fit: cover; }
.timeline { border-left: 3px solid var(--green-100); margin: 12px 0 0 6px; padding-left: 14px; }
.timeline > div { margin-bottom: 12px; position: relative; }
.timeline > div::before { content: ''; position: absolute; left: -22px; top: 5px; width: 13px; height: 13px; border-radius: 50%; background: var(--green); }

.guide { background: var(--green-50); border-radius: 12px; padding: 12px; margin-top: 10px; }
.guide dt { font-weight: 800; color: var(--ink); margin-top: 8px; font-size: .9rem; }
.guide dt:first-child { margin-top: 0; }
.guide dd { margin: 2px 0 0; }

.symptoms { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.symptom { border: 2px solid #D5DED8; background: #fff; border-radius: 12px; padding: 10px 8px; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.symptom.active { border-color: var(--green); background: var(--green-50); }
.symptom .icon { width: 26px; height: 26px; color: var(--green-dark); }
.symptom span { text-align: left; line-height: 1.25; }
.symptom .icon { flex: none; }

.article-row { display: grid; grid-template-columns: 34% 1fr auto; gap: 10px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); margin-bottom: 10px; }
.article-row .thumb { aspect-ratio: 16 / 7; }
.article-row h3 { font-size: .98rem; font-weight: 800; }
.article-row p { color: var(--muted); font-size: .82rem; display: flex; align-items: center; gap: 6px; margin-top: 4px; }

.hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; aspect-ratio: 16 / 9; background: var(--green-50); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.prose p { margin-bottom: 10px; font-size: 1rem; line-height: 1.6; }
.prose .lead { font-size: 1.02rem; color: var(--ink); font-weight: 600; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 1.12rem; font-weight: 800; margin: 18px 0 8px; padding-left: 10px; border-left: 4px solid var(--green); }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; line-height: 1.55; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--green); font-weight: 700; }
.prose i { color: var(--muted); }
.prose .tip { display: flex; gap: 10px; background: var(--green-50); border-radius: 14px; padding: 12px; margin: 14px 0; }
.prose .tip .icon { color: var(--green); flex: none; margin-top: 2px; }
.prose .tip p { margin: 0; color: var(--green-dark); font-weight: 600; font-size: .95rem; }
.sym-result { margin-top: 16px; }
.sym-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.sym-head .icon { width: 34px; height: 34px; color: var(--green-dark); flex: none; }
.sym-head h3 { font-size: 1.05rem; }
.sym-head p { color: var(--muted); font-size: .85rem; }
.guide h4 { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--ink); margin: 12px 0 4px; }
.guide h4:first-child { margin-top: 0; }
.guide h4 .icon { width: 16px; height: 16px; color: var(--green); }
.guide p { font-size: .9rem; }
.guide .cause { margin-bottom: 6px; }
.guide .cause .badge { font-size: .72rem; padding: 1px 8px; }
.guide-list { margin: 0; padding-left: 18px; font-size: .9rem; }
.guide-list li + li { margin-top: 3px; }
#sym-comm { margin-bottom: 10px; }

/* ---------- Formulir ---------- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-weight: 700; color: var(--ink); margin-bottom: 4px; font-size: .9rem; }
.field input, .field select, .field textarea {
  width: 100%; border: 2px solid #D5DED8; background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 16px; outline: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); }
.field textarea { min-height: 96px; resize: vertical; }
.field small { color: var(--muted); display: block; margin-top: 4px; font-size: .82rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-pick { display: flex; align-items: center; gap: 12px; border: 2px dashed #C6D3CA; border-radius: 12px; padding: 10px; cursor: pointer; color: var(--muted); font-size: .9rem; }
.field > .photo-pick { display: flex; margin: 0; font-weight: 400; color: var(--muted); font-size: .9rem; }
.photo-pick b { color: var(--ink); }
.photo-pick img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.photo-pick input { display: none; }
.stars { display: flex; gap: 6px; }
.stars label { cursor: pointer; font-size: 1.7rem; color: #CBD5CF; line-height: 1; }
.stars input { display: none; }
.stars label.on { color: var(--yellow); }

.sheet-backdrop { position: fixed; inset: 0; background: rgba(10, 30, 18, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: #C7D1CA; margin: 4px auto 10px; }
.sheet h2 { font-size: 1.15rem; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.sheet .x { border: 0; background: var(--card); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Modal dialog (gaya SweetAlert) ---------- */
.swal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(10, 30, 18, .5); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.swal-backdrop.out { opacity: 0; transition: opacity .15s; }
.swal { background: var(--card); width: 100%; max-width: 360px; border-radius: 22px; padding: 22px 18px 18px; text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,.25); animation: pop .2s cubic-bezier(.2,.9,.3,1.3); }
.swal h2 { font-size: 1.2rem; margin-bottom: 6px; }
.swal p { color: var(--muted); font-size: .95rem; white-space: pre-line; }
.swal-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; border: 3px solid currentColor; }
.swal-icon .icon { width: 30px; height: 30px; stroke-width: 2.6; }
.swal-icon.question, .swal-icon.info { color: var(--green); background: var(--green-50); }
.swal-icon.warning { color: #C98A00; background: var(--yellow-50); }
.swal-icon.success { color: var(--green); background: var(--green-50); }
.swal-icon.error { color: var(--danger); background: var(--danger-50); }
.swal-actions { display: flex; gap: 10px; margin-top: 18px; }
.swal-actions .btn { flex: 1; min-height: 44px; padding: 8px 10px; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Status jaringan & notifikasi ---------- */
.netbar { display: flex; align-items: center; gap: 10px; background: #2F3B34; color: #fff; border-radius: 12px; padding: 8px 12px; font-size: .85rem; margin: 4px 0; }
.netbar.sync { background: var(--yellow-50); color: #5A4300; }
.netbar.fail { background: var(--danger-50); color: var(--danger); }
.netbar button { margin-left: auto; border: 0; background: rgba(255,255,255,.18); color: inherit; border-radius: 10px; padding: 6px 10px; font-weight: 700; font-size: .85rem; }
.netbar.sync button, .netbar.fail button { background: rgba(0,0,0,.07); }
.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #1F2D25; color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 70; max-width: 92vw; font-size: .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: up .2s; }
.toast.err { background: var(--danger); }
.loading { display: grid; place-items: center; padding: 60px 0; color: var(--muted); }
.spinner { width: 36px; height: 36px; border: 4px solid var(--green-100); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth { max-width: 460px; margin: 0 auto; padding: 28px 16px; }
.auth .brand { justify-content: center; font-size: 1.8rem; margin-bottom: 8px; }
.auth .brand svg { width: 2.4rem; height: 2.4rem; }

@media (max-width: 380px) {
  :root { font-size: 14.5px; }
  html[data-font="normal"] { font-size: 13.5px; }
  html[data-font="extra_large"] { font-size: 16px; }
  .app { padding-left: 12px; padding-right: 12px; }
  .stat { padding: 12px 10px; gap: 8px; }
  .stat .bubble { width: 40px; height: 40px; }
}
@media (min-width: 700px) {
  body { background: linear-gradient(180deg, #E7F0E8 0, var(--bg) 380px); }
}
