/* Kasir Christa SPA — tema SPA: hijau sage + krem + emas lembut. Font sistem (CSP 'self'). */
:root {
  --bg: #f5f1ea; --card: #fffdf9; --ink: #2d3a33; --muted: #7a8279; --line: #e4ddd0;
  --sage: #3f5a4c; --sage-2: #5c7a69; --sage-bg: #e7efe9; --gold: #b8955a; --bad: #b4473b; --bad-bg: #f8e6e3;
  --wa: #1f9d55; --r: 16px; --shadow: 0 6px 20px -12px rgba(45, 58, 51, .35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.45; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
h1 { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; margin: 6px 0 14px; color: var(--sage); }
h2 { font-size: 1.05rem; margin: 0 0 12px; color: var(--sage); }
h3 { font-size: .95rem; margin: 16px 0 8px; }
a { color: var(--sage); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .r { text-align: right; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--sage); color: #fff; box-shadow: var(--shadow); }
.top .logo { width: 36px; height: 36px; border-radius: 10px; }
.brand { display: flex; flex-direction: column; line-height: 1.15; } .brand b { font-family: var(--serif); font-size: 1.1rem; letter-spacing: .3px; }
.brand small { opacity: .8; font-size: .75rem; }
.who { margin-left: auto; font-size: .8rem; opacity: .9; text-align: right; }
main { max-width: 640px; margin: 0 auto; padding: 14px; }
.view { display: none; } .view.on { display: block; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.narrow { max-width: 420px; margin: 24px auto; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px; min-height: 48px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sage-2); box-shadow: 0 0 0 3px var(--sage-bg); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { display: block; width: 100%; text-align: center; text-decoration: none; font: inherit; font-weight: 600; border: 0; border-radius: 14px; padding: 13px 16px;
  min-height: 50px; background: var(--sage); color: #fff; cursor: pointer; margin-top: 8px; }
.btn.big { min-height: 58px; font-size: 1.08rem; }
.btn.ghost { background: transparent; color: var(--sage); border: 1.5px solid var(--sage-2); }
.btn.danger { color: var(--bad); border-color: var(--bad); } .btn.danger:not(.ghost) { background: var(--bad); color: #fff; }
.btn.wa { background: var(--wa); }
.btn.sm { width: auto; min-height: 40px; padding: 8px 12px; font-size: .85rem; margin: 0; display: inline-block; }
.btn:disabled { opacity: .55; }
.msg { color: var(--bad); font-size: .9rem; min-height: 1em; margin: 6px 0; }
.tgroup { margin-bottom: 12px; } .tname { font-weight: 600; margin-bottom: 6px; }
.tbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tbtn { font: inherit; border: 1.5px solid var(--line); background: var(--sage-bg); color: var(--ink); border-radius: 14px; padding: 12px; min-height: 64px; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; }
.tbtn b { color: var(--sage); } .tbtn span { font-size: .9rem; } .tbtn:active { transform: scale(.97); background: #d7e5dc; }
.cart { border-top: 1px dashed var(--line); padding-top: 10px; }
.citem { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.citem small { display: block; color: var(--muted); }
.qty { display: flex; align-items: center; gap: 8px; } .qty span { min-width: 22px; text-align: center; font-weight: 600; }
.qty button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--sage-2); background: #fff; color: var(--sage); font-size: 1.3rem; cursor: pointer; }
.methods { border: 0; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.methods legend { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.methods label, .seg label { margin: 0; }
.methods input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.methods span, .seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 600; font-size: .95rem; padding: 6px; }
.methods input:checked + span, .seg input:checked + span { background: var(--sage); border-color: var(--sage); color: #fff; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.totalbar { display: flex; justify-content: space-between; align-items: center; background: var(--sage-bg); border-radius: 12px; padding: 12px 14px; font-size: 1.1rem; }
.totalbar b { font-size: 1.35rem; color: var(--sage); }
.okbar { background: var(--sage-bg); color: var(--sage); font-weight: 600; border-radius: 12px; padding: 10px 14px; }
.receipt { text-align: left; } .receipt .pt { margin: 0; font-size: .75rem; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); text-align: center; }
.receipt h2 { font-family: var(--serif); text-align: center; font-size: 1.2rem; margin: 2px 0 12px; }
.receipt dl { display: grid; grid-template-columns: 96px 1fr; gap: 4px 8px; margin: 0 0 12px; font-size: .92rem; } .receipt dt { color: var(--muted); } .receipt dd { margin: 0; word-break: break-word; }
.ritems, .rtab { width: 100%; border-collapse: collapse; font-size: .92rem; } .ritems td, .rtab td, .rtab th { padding: 6px 0; border-bottom: 1px solid var(--line); }
.rtab th { font-size: .75rem; color: var(--muted); font-weight: 600; } .rtab td + td, .rtab th + th { padding-left: 8px; }
.ritems .tot td { font-weight: 700; font-size: 1.08rem; border-bottom: 0; padding-top: 10px; }
.voidbar { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 8px 12px; font-weight: 600; text-align: center; }
.isvoid { opacity: .75; }
.actions .btn { margin-top: 10px; }
.kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.kpi div { background: var(--sage-bg); border-radius: 12px; padding: 10px 4px; } .kpi small { display: block; color: var(--muted); font-size: .75rem; } .kpi b { font-size: 1.05rem; color: var(--sage); }
.titem { display: flex; width: 100%; text-align: left; font: inherit; color: inherit; gap: 10px; justify-content: space-between; cursor: pointer; }
.titem small { display: block; color: var(--muted); font-size: .8rem; } .titem .amt { white-space: nowrap; color: var(--sage); }
.tag { font-size: .7rem; padding: 2px 6px; border-radius: 6px; } .tag.bad { background: var(--bad-bg); color: var(--bad); }
.exports .btn { margin-top: 6px; }
.adm { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.adm small { display: block; color: var(--muted); } .adm.off { opacity: .6; } .admbtn { display: flex; gap: 6px; }
.hrow { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; align-items: center; margin-bottom: 8px; font-size: .9rem; }
.hrow input { margin: 0; min-height: 42px; padding: 8px; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 20px -14px rgba(0, 0, 0, .3); }
.nav button { font: inherit; font-size: .8rem; border: 0; background: none; color: var(--muted); padding: 8px 0 10px; min-height: 64px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.nav button span { font-size: 1.35rem; line-height: 1; } .nav button.on { color: var(--sage); font-weight: 700; }
.nav[hidden] { display: none; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 12px; opacity: 0; transition: .25s; pointer-events: none; z-index: 20; max-width: 90vw; }
.toast.on { opacity: 1; transform: translateX(-50%); }
dialog { border: 0; border-radius: var(--r); padding: 18px; width: min(92vw, 420px); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(30, 40, 35, .45); }
.dlg-btns { display: grid; grid-auto-flow: column; gap: 8px; } .dlg-btns .btn { margin: 0; }
.temp { font-family: ui-monospace, Menlo, monospace; font-size: 1.4rem; letter-spacing: 1px; text-align: center; background: var(--sage-bg); padding: 12px; border-radius: 12px; user-select: all; }
@media (min-width: 560px) { .tbtns { grid-template-columns: 1fr 1fr 1fr; } }
