/* =========================================================
   POS Kasir — layout register tablet
   Bar atas biru · panel pesanan kiri · kolom kategori berwarna · grid produk bergambar
   ========================================================= */
:root {
  /* Brand IAS Hospitality: navy (bar & tombol utama), teal (aksi bayar & aksen), charcoal (teks) */
  --brand-navy: #23306A; --brand-navy-deep: #1A2352; --brand-teal: #12B0BA; --brand-teal-ink: #087E87; --brand-charcoal: #424244;
  --blue: var(--brand-navy);  --blue-deep: var(--brand-navy-deep); --blue-soft: #E3F4F5;
  --pay: var(--brand-teal-ink);   --pay-deep: #066A72;
  --ink: #2A2A2D;   --muted: #6B6B70; --line: #E2E4E8;
  --panel: #FFFFFF; --rail: #D8DBE1; --stage: #EEF0F3; --field: #F4F5F7;
  --ok: #1F9D6B; --warn-bg: #FFF4D6; --warn: #8A5A00; --bad-bg: #FDE5E1; --bad: #B4321C;
  /* warna tab kategori (dipakai berurutan) — nada lembut yang serasi dengan teal/navy */
  --c1: #C9EEF0; --c2: #D6DBF0; --c3: #E4E4E7; --c4: #FFE2B0; --c5: #F8D3DA; --c6: #FFFFFF; --c7: #D5EBD6; --c8: #E4DCF3;
  --r: 6px;
  --shadow: 0 1px 2px rgba(28, 37, 86, .08), 0 6px 18px -8px rgba(28, 37, 86, .28);
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; line-height: 1.4; color: var(--ink);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--stage); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; letter-spacing: .12em; color: #fff; }
.wm-mark { width: 26px; height: 26px; border-radius: 6px; background:
  conic-gradient(from 0deg, var(--c1) 0 25%, var(--c2) 0 50%, var(--c3) 0 75%, var(--c4) 0); box-shadow: 0 0 0 2px rgba(255,255,255,.9); }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: none; animation: spin .7s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-error { color: var(--bad); font-size: .88rem; margin: 6px 0 0; }
.form-error:empty, .login-net:empty { display: none; }

/* ---------- tombol ---------- */
.btn-pay {
  border: 0; background: var(--pay); color: #fff; font-weight: 700; letter-spacing: .06em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, transform .1s;
}
.btn-pay:hover:not(:disabled) { background: var(--pay-deep); }
.btn-pay:active:not(:disabled) { transform: scale(.98); }
.btn-pay:disabled { background: #C9CCD3; color: #F4F5F7; cursor: not-allowed; }
.btn-blue, .btn-plain { border-radius: var(--r); padding: .75rem 1rem; font-weight: 600; border: 1px solid transparent; }
.btn-blue { background: var(--blue); color: #fff; } .btn-blue:hover { background: var(--blue-deep); }
.btn-plain { background: #fff; border-color: var(--line); }

/* ================= LOGIN ================= */
.login { min-height: 100dvh; display: flex; flex-direction: column; background: var(--stage); }
.login-band { height: 56px; background: var(--blue); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; color: #fff; }
.band-clock { font-variant-numeric: tabular-nums; opacity: .9; }
.login-card {
  width: min(420px, calc(100% - 32px)); margin: 56px auto; background: var(--panel); border-radius: 10px;
  box-shadow: var(--shadow); padding: 0 28px 24px; display: grid; gap: 14px; overflow: hidden;
}
.login-cats { display: grid; grid-template-columns: repeat(5, 1fr); height: 8px; margin: 0 -28px 10px; }
.login-cats i:nth-child(1) { background: var(--c1); } .login-cats i:nth-child(2) { background: var(--c2); }
.login-cats i:nth-child(3) { background: var(--c3); } .login-cats i:nth-child(4) { background: var(--c4); }
.login-cats i:nth-child(5) { background: var(--c5); }
.login-card h1 { margin: 0; font-size: 1.5rem; }
.login-card > p { margin: 0; }
.field { display: grid; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.field input { padding: .75rem .85rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--field); font-size: .95rem; font-weight: 400; color: var(--ink); }
.field input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-soft); }
.owner summary { cursor: pointer; color: var(--blue); font-size: .88rem; font-weight: 600; }
.owner[open] summary { margin-bottom: 10px; }
.btn-login { height: 52px; border-radius: var(--r); background: var(--blue); font-size: 1rem; }
.btn-login:hover:not(:disabled) { background: var(--blue-deep); }
.login-net { margin: 0; text-align: center; font-size: .85rem; color: var(--warn); background: var(--warn-bg); border-radius: var(--r); padding: 8px; }

/* ================= APP ================= */
.app { height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  height: 56px; flex: none; background: var(--blue); color: #fff; display: grid;
  grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px; padding: 0 16px 0 20px;
}
.tools { display: flex; justify-content: center; gap: 6px; }
.tool { position: relative; width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: #fff; display: grid; place-items: center; transition: background .15s; }
.tool:hover { background: rgba(255,255,255,.14); }
.tool svg { width: 22px; height: 22px; }
.tool.spinning svg { animation: spin .9s linear infinite; }
.tool-badge { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pay); font-size: .7rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--blue); }

.status { display: flex; align-items: center; gap: 14px; }
.net-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: .8rem; font-weight: 600; }
.net-pill i { width: 8px; height: 8px; border-radius: 50%; background: #7CF0BC; }
.net-pill[data-state="online"] i { animation: pulse 2.2s ease-in-out infinite; }
.net-pill[data-state="offline"] { background: #FFD66B; color: #5A3E00; } .net-pill[data-state="offline"] i { background: #B07800; }
.net-pill[data-state="expired"] { background: #FFD0C7; color: var(--bad); } .net-pill[data-state="expired"] i { background: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }
.where { display: flex; flex-direction: column; line-height: 1.15; border-left: 1px solid rgba(255,255,255,.3); padding-left: 14px; font-weight: 600; }
.where small { font-weight: 400; opacity: .8; font-size: .75rem; }
.who { border: 0; background: transparent; color: #fff; text-align: right; display: flex; flex-direction: column; line-height: 1.15; padding: 4px 6px; border-radius: var(--r); }
.who:hover { background: rgba(255,255,255,.12); }
.who strong { font-size: .95rem; } .who small { font-size: .75rem; opacity: .85; }

.notice { flex: none; padding: 8px 20px; font-size: .88rem; background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid #F1DFA9; }
.notice[data-tone="bad"] { background: var(--bad-bg); color: var(--bad); border-bottom-color: #F4C2B8; }

.register { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 30%) 128px 1fr; }

/* ---------- panel pesanan ---------- */
.order { background: var(--panel); display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.order-head { display: grid; grid-template-columns: auto minmax(0, 1fr) 56px; gap: 8px; padding: 8px; background: var(--field); border-bottom: 1px solid var(--line); align-items: stretch; }
.order-no { display: grid; place-items: center; background: #DCDFE5; border-radius: 4px; padding: 2px 10px; line-height: 1.1; white-space: nowrap; }
.order-no small { font-size: .7rem; color: var(--muted); } .order-no strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.order-search { min-width: 0; display: flex; align-items: center; gap: 6px; border-bottom: 2px solid #9AA0AC; padding: 0 4px; color: var(--muted); }
.order-search:focus-within { border-bottom-color: var(--blue); color: var(--blue); }
.order-search svg { width: 17px; height: 17px; }
.order-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 0; color: var(--ink); }
.order-search input:focus { outline: none; }
.order-qty input { width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 4px; text-align: center; background: #fff; font-weight: 600; }
.order-close { display: none; }

.lines { list-style: none; margin: 0; padding: 0; flex: 1; overflow: auto; min-height: 0; }
.line { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 24px; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); animation: lineIn .22s var(--ease); }
.line.fresh { background: var(--blue-soft); }
.line .q { width: 44px; height: 32px; border: 1px solid var(--line); border-radius: 4px; text-align: center; font-weight: 600; background: #fff; -moz-appearance: textfield; }
.line .q::-webkit-inner-spin-button { display: none; }
.line .nm { min-width: 0; } .line .nm b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line .nm small { color: var(--muted); font-variant-numeric: tabular-nums; }
.line .amt { border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; font-variant-numeric: tabular-nums; font-weight: 600; background: #fff; text-align: right; white-space: nowrap; }
.line .rm { width: 24px; height: 24px; border-radius: 50%; border: 0; background: #E2574C; color: #fff; display: grid; place-items: center; padding: 0; }
.line .rm svg { width: 14px; height: 14px; stroke-width: 2.6; }
@keyframes lineIn { from { opacity: 0; transform: translateX(-6px); } }
.empty { flex: 1; display: grid; place-content: center; text-align: center; padding: 24px; }
.empty p { margin: 0; } .empty .muted { font-size: .85rem; margin-top: 4px; }

/* segmen + pelanggan (baris "customer" di panel pesanan) */
.cust-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; border-top: 1px solid var(--line); background: var(--field); }
.seg { display: flex; flex-direction: column; justify-content: center; padding: 4px 10px; border-right: 1px solid var(--line); min-width: 0; }
.seg span, .seg-ref span { font-size: .66rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.seg select { border: 0; background: transparent; font-weight: 600; font-size: .88rem; padding: 2px 0; min-width: 0; width: 100%; cursor: pointer; }
.seg select:focus { outline: none; color: var(--blue); }
.cust-btn { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 8px 10px; text-align: left; min-width: 0; color: var(--blue); font-weight: 600; font-size: .88rem; }
.cust-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-btn.has { color: var(--ink); }
.cust-btn svg { width: 18px; height: 18px; }
.cust-x { border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; padding: 0 12px; }
.seg-ref { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-top: 1px dashed var(--line); }
.seg-ref input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; font-size: .88rem; }
.seg-ref input:focus { outline: none; border-color: var(--blue); }
.seg-warn { margin: 0; padding: 6px 12px; font-size: .8rem; background: var(--warn-bg); color: var(--warn); }
.pay-summary { margin: -4px 0 0; font-size: .85rem; color: var(--muted); }
.pay-summary b { color: var(--ink); }

.cust-search svg { color: var(--muted); }
.amount.cust-search input { font-size: 1rem; text-align: left; font-weight: 500; }
.cust-results { display: grid; gap: 6px; max-height: 240px; overflow: auto; }
.cust-results:empty { display: none; }
.cust-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 8px 10px; text-align: left; }
.cust-item:hover, .cust-item:focus-visible { border-color: var(--blue); background: var(--blue-soft); }
.cust-item .av { width: 32px; height: 32px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: .78rem; font-weight: 700; flex: none; }
.cust-item b { display: block; font-weight: 600; } .cust-item small { color: var(--muted); font-variant-numeric: tabular-nums; }
.cust-item .tag { margin-left: auto; font-size: .7rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--field); color: var(--muted); white-space: nowrap; }
.cust-item .tag.pending { background: var(--warn-bg); color: var(--warn); }
.cust-new { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin: 0; display: grid; gap: 10px; }
.cust-new legend { font-weight: 700; font-size: .85rem; padding: 0 4px; }
.seg-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.seg-choice label { position: relative; cursor: pointer; }
.seg-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-choice span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 6px; text-align: center; border: 1px solid var(--line); border-radius: var(--r); background: #fff; font-size: .84rem; font-weight: 600; line-height: 1.2; }
.seg-choice input:checked + span { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); }
.seg-choice input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; line-height: 1.35; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--blue); }

.line .nm { cursor: pointer; }
.line .nm .tag-nodisc { color: var(--muted); font-style: italic; }
.line .nm .tag-disc { color: var(--ok); font-weight: 600; }
.line .amt s { color: var(--muted); font-weight: 400; font-size: .78rem; margin-right: 4px; }
.disc-kind { margin: 0; }
.note-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); color: var(--muted); }
.note-row svg { width: 16px; height: 16px; }
.note-row input { flex: 1; border: 0; background: none; padding: 4px 0; font-size: .88rem; color: var(--ink); }
.note-row input:focus { outline: none; }

.totals { display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--line); }
.totals dl { margin: 0; padding: 8px 12px; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: .75rem; color: var(--muted); font-weight: 600; }
.totals dd { margin: 0; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 500; }
.grand { border-left: 1px solid var(--line); padding: 8px 14px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; min-width: 46%; }
.grand small { font-size: .72rem; color: var(--muted); font-weight: 700; letter-spacing: .05em; }
.grand output { font-size: 1.75rem; font-weight: 700; color: var(--pay); font-variant-numeric: tabular-nums; line-height: 1.1; }
.grand output.flash { animation: flash .45s var(--ease); }
@keyframes flash { 40% { transform: scale(1.06); } }

.order-actions { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); height: 64px; flex: none; }
.order-actions button { border: 0; border-right: 1px solid var(--line); background: var(--field); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .68rem; font-weight: 700; letter-spacing: .03em; line-height: 1.15; text-align: center; padding: 0 4px; }
.order-actions button:last-child { border-right: 0; }
.order-actions button:hover { background: #E8EAEE; }
.order-actions svg { width: 18px; height: 18px; }

/* ---------- kolom kategori ---------- */
.cats { background: var(--rail); display: flex; flex-direction: column; min-height: 0; }
#categories { flex: 1; overflow: auto; display: flex; flex-direction: column; }
.cat {
  position: relative; text-align: left; border: 0; border-bottom: 1px solid rgba(0,0,0,.06); background: var(--cc, #fff);
  padding: 0 12px; min-height: 52px; font-weight: 600; font-size: .88rem; transition: filter .15s, box-shadow .15s;
}
.cat:hover { filter: brightness(.97); }
.cat[aria-pressed="true"] { box-shadow: inset 4px 0 0 var(--blue); }
.cat[aria-pressed="true"]::after {
  content: ""; position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat;
  animation: pop .25s var(--ease);
}
.cat .n { display: block; font-size: .72rem; font-weight: 500; opacity: .6; }
.cat .nm { display: block; }
.cat.has-sub .nm::after { content: " ›"; opacity: .55; }
.cat.back { background: var(--rail); min-height: 42px; color: var(--blue); font-size: .82rem; }
.cat.back[aria-pressed]::after { display: none; }
.cat.grp { font-weight: 700; }
.cat.sub { padding-left: 22px; background: var(--cc); background: color-mix(in srgb, var(--cc) 55%, #fff); font-weight: 600; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 2px 10px; font-size: .84rem; color: var(--muted); }
.crumb button { border: 0; background: none; padding: 2px 4px; border-radius: 6px; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; }
.crumb button[aria-current="page"] { color: var(--ink, #1b1f3b); cursor: default; }
.crumb button:not([aria-current]):hover { background: var(--blue-soft, #eef1fb); }
@keyframes pop { from { transform: scale(0); } }
.pay-tile { height: 64px; flex: none; flex-direction: column; gap: 2px; font-size: .9rem; border-radius: 0; }
.pay-tile svg { width: 22px; height: 22px; }

/* ---------- grid produk ---------- */
.menu { background: var(--stage); overflow: auto; min-height: 0; padding: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 4px; align-content: start; }
.tile {
  position: relative; border: 0; padding: 0; background: #fff; border-radius: 2px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 1px 0 rgba(0,0,0,.06); transition: transform .12s var(--ease), box-shadow .15s;
}
.tile:hover { box-shadow: var(--shadow); z-index: 1; }
.tile:active { transform: scale(.96); }
.tile .ph { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; display: grid; place-items: center; background: color-mix(in srgb, var(--cc, #EEF0F4) 42%, #fff); font-size: 1.6rem; font-weight: 800; color: rgba(31,36,48,.45); letter-spacing: .02em; }
.tile .nm { padding: 6px 6px 2px; font-size: .82rem; font-weight: 600; line-height: 1.2; text-align: center; min-height: 2.6em; display: grid; place-items: center; }
.tile .pr { padding: 0 6px 6px; font-size: .78rem; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.tile .pr.upd { color: var(--blue); font-weight: 700; } .tile .pr.upd s { color: var(--muted); font-weight: 400; margin-right: 2px; }
.tile .stk { position: absolute; left: 6px; top: 6px; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: rgba(255,255,255,.92); }
.tile .stk.low { color: var(--warn); } .tile .stk.neg { background: var(--bad); color: #fff; }
.tile.out { opacity: .55; filter: grayscale(.6); cursor: not-allowed; }
.tile .badge { position: absolute; right: 6px; top: 6px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--blue); color: #fff; font-size: .78rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.tile.bump .badge { animation: bump .35s var(--ease); }
@keyframes bump { 45% { transform: scale(1.35); } }
.grid-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 48px 16px; }

/* ================= DIALOG ================= */
dialog.sheet { border: 0; border-radius: 10px; padding: 20px; width: min(420px, calc(100vw - 24px)); box-shadow: var(--shadow); color: var(--ink); }
dialog.sheet[open] { animation: rise .25s var(--ease); }
dialog::backdrop { background: rgba(20, 26, 50, .45); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.sheet form { display: grid; gap: 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; font-size: 1.15rem; }
.x { border: 0; background: var(--field); width: 32px; height: 32px; border-radius: 50%; font-size: 1.3rem; line-height: 1; color: var(--muted); }
.sheet-actions { display: flex; gap: 10px; margin-top: 4px; } .sheet-actions > * { flex: 1; }

.pay-total { background: var(--field); border-radius: var(--r); padding: 12px 14px; display: flex; justify-content: space-between; align-items: baseline; }
.pay-total small { color: var(--muted); font-weight: 600; }
.pay-total output { font-size: 1.9rem; font-weight: 800; color: var(--pay); font-variant-numeric: tabular-nums; }
.disc-mode { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; }
.methods button, .disc-mode button { border: 1px solid var(--line); background: #fff; border-radius: var(--r); padding: .6rem .2rem; font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.methods button[aria-checked="true"], .disc-mode button[aria-checked="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.amount { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 12px; background: #fff; }
.amount:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.amount span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.amount input { flex: 1; min-width: 0; border: 0; background: none; padding: .75rem 0; text-align: right; font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.amount input:focus { outline: none; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.quick:empty { display: none; }
.quick button { border: 1px solid var(--line); background: var(--field); border-radius: var(--r); padding: .55rem .2rem; font-weight: 600; font-size: .82rem; font-variant-numeric: tabular-nums; }
.quick button:hover { border-color: var(--blue); color: var(--blue); }
.ref { border: 1px solid var(--line); border-radius: var(--r); padding: .7rem .8rem; }
.hint-warn { margin: 0; font-size: .82rem; color: var(--warn); background: var(--warn-bg); border-radius: var(--r); padding: 8px 10px; }
.change { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; border-radius: var(--r); background: #E3F6EE; color: var(--ok); font-weight: 600; }
.change strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.change.short { background: var(--bad-bg); color: var(--bad); }
.btn-confirm { height: 56px; border-radius: var(--r); font-size: 1.05rem; }

.cashier-list { display: grid; gap: 6px; max-height: 190px; overflow: auto; }
.cashier-list button { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 8px 10px; }
.cashier-list button[aria-checked="true"] { border-color: var(--blue); background: var(--blue-soft); }
.cashier-list .av { width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: .78rem; font-weight: 700; }
.cashier-list .role { margin-left: auto; font-size: .75rem; color: var(--muted); }
.pin { position: relative; display: grid; place-items: center; padding: 6px 0; }
.pin input { position: absolute; inset: 0; opacity: 0; }
.pin-dots { display: flex; gap: 12px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #C5CAD3; transition: all .12s; }
.pin-dots i.on { background: var(--blue); border-color: var(--blue); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.keypad button { border: 1px solid var(--line); background: var(--field); border-radius: var(--r); padding: .85rem 0; font-size: 1.15rem; font-weight: 600; }
.keypad button:active { background: var(--blue-soft); }
.keypad .k-soft { font-size: .85rem; color: var(--muted); }

.receipt-status { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 600; }
.receipt-status .ok { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #E3F6EE; color: var(--ok); }
.receipt-status .ok svg { stroke-width: 2.6; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .45s .1s var(--ease) forwards; }
.receipt-status[data-offline] .ok { background: var(--warn-bg); color: var(--warn); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.receipt { max-height: min(62vh, 640px); overflow: auto; padding: 4px 2px; margin: 0 -4px; }
#dlgReceipt { background: var(--stage); }
#dlgReceipt .receipt-status { background: #fff; border-radius: var(--r); padding: 8px 12px; }

/* ---------- struk kertas ---------- */
.rc-paper {
  --zz: 14px;
  background: #fff; color: #222; padding: 26px 20px 30px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.06));
  /* tepi zig-zag atas & bawah */
  -webkit-mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--zz) 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zz) 51% repeat-x;
          mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--zz) 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zz) 51% repeat-x;
}
.rc-logo { width: 92px; height: 92px; margin: 4px auto 12px; border-radius: 50%; background: #E9ECEA; display: grid; place-items: center; overflow: hidden; }
.rc-logo svg { width: 58px; height: 58px; }
.rc-logo img { width: 100%; height: 100%; object-fit: cover; }
.rc-store { text-align: center; font-weight: 700; font-size: 1.12rem; margin-bottom: 2px; }
.rc-center { text-align: center; }
.rc-cut { border-top: 2px dashed #9A9A9A; margin: 10px 0; }
.rc-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rc-meta > div:first-child { min-width: 0; white-space: nowrap; }
.rc-right { text-align: right; max-width: 42%; overflow-wrap: anywhere; }
.rc-extra { margin-top: 6px; font-size: .86em; }
.rc-item { margin-bottom: 8px; }
.rc-item:last-of-type { margin-bottom: 0; }
.rc-name { margin-bottom: 4px; }
.rc-line, .rc-row { display: flex; justify-content: space-between; gap: 14px; }
.rc-line > span:first-child, .rc-row > span:first-child { min-width: 0; }
.rc-line > span:last-child, .rc-row > span:last-child { white-space: nowrap; }
.rc-row { margin: 3px 0; }
.rc-strong { font-weight: 700; }
.rc-dim { color: #6F6F6F; font-size: .88em; }
.rc-qr { width: 128px; margin: 18px auto 6px; }
.rc-qrtext { margin: 16px 0 -8px; font-size: .92em; line-height: 1.35; overflow-wrap: anywhere; }
.rc-qr svg { display: block; width: 100%; height: auto; }
.rc-footer { margin-top: 8px; font-size: .9em; }

/* ---------- shift & closing ---------- */
.tool-shift { position: relative; }
.shift-dot { position: absolute; bottom: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #7CF0BC; box-shadow: 0 0 0 2px var(--blue); }
.shift-dot.off { background: #FFD66B; }
.shift-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; padding: 12px 14px; background: var(--field); border-radius: var(--r); font-size: .88rem; }
.shift-info dt { color: var(--muted); } .shift-info dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.shift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.shift-grid button { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff; border-radius: var(--r); padding: 14px 12px; font-weight: 600; font-size: .9rem; text-align: left; }
.shift-grid button:hover { border-color: var(--blue); color: var(--blue); }
.shift-links { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; }
.shift-links .link { border: 0; background: none; color: var(--blue); font-weight: 600; font-size: .88rem; padding: 4px 0; }
.btn-close-shift { width: 100%; height: 52px; border-radius: var(--r); font-size: .95rem; }
.select { padding: .75rem .85rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--field); font-size: .95rem; color: var(--ink); }

.close-sheet { width: min(460px, calc(100vw - 24px)); }
.denoms { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.denom { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.denom label { font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; }
.denom label small { display: block; color: var(--muted); font-weight: 500; font-size: .72rem; }
.denom .stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.denom .stepper button { border: 0; background: var(--field); width: 30px; height: 32px; font-size: 1rem; }
.denom .stepper input { width: 44px; height: 32px; border: 0; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.denom .stepper input::-webkit-inner-spin-button { display: none; }
@media (max-width: 480px) { .denoms { grid-template-columns: 1fr; gap: 2px; } .denom { padding: 2px 0; } }
.counted { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; background: var(--blue-soft); border-radius: var(--r); font-weight: 600; }
.counted output { font-size: 1.4rem; font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums; }

.z-problems { border: 1px solid #F4C2B8; background: var(--bad-bg); color: var(--bad); border-radius: var(--r); padding: 10px 12px; font-size: .85rem; }
.z-problems ul { margin: 6px 0 0; padding-left: 18px; }

.report-sheet { width: min(480px, calc(100vw - 24px)); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--field); padding: 4px; border-radius: var(--r); margin: 12px 0; }
.tabs button { border: 0; background: transparent; border-radius: 4px; padding: .55rem; font-weight: 600; font-size: .85rem; color: var(--muted); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.report-items { display: grid; gap: 6px; max-height: 55vh; overflow: auto; }
.report-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 10px 12px; }
.report-item:hover { border-color: var(--blue); }
.report-item b { font-weight: 600; } .report-item small { color: var(--muted); grid-column: 1; }
.report-item .st { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; background: #E3F6EE; color: var(--ok); }
.report-item .st.open { background: var(--warn-bg); color: var(--warn); }
.report-item .st.prov { background: var(--blue-soft); color: var(--blue); }
.report-empty { color: var(--muted); text-align: center; padding: 24px 8px; font-size: .9rem; }

.report { background: var(--field); border-radius: var(--r); padding: 14px; font-size: .84rem; font-variant-numeric: tabular-nums; max-height: 60vh; overflow: auto; margin: 12px 0 4px; }
.report h3 { margin: 12px 0 4px; font-size: .78rem; letter-spacing: .04em; color: var(--muted); }
.report .r-head { text-align: center; } .report .r-head strong { display: block; font-size: 1.05rem; }
.report .r-row { display: flex; justify-content: space-between; gap: 12px; }
.report .r-row.big { font-weight: 800; font-size: 1rem; }
.report .r-sub { color: var(--muted); font-size: .76rem; }
.report hr { border: 0; border-top: 1px dashed #C5CAD3; margin: 8px 0; }
.report .neg { color: var(--bad); } .report .pos { color: var(--ok); }
.report .flag { margin: 8px 0; padding: 8px 10px; border-radius: 4px; background: var(--warn-bg); color: var(--warn); font-size: .8rem; }

/* ---------- toast ---------- */
.toasts { position: fixed; right: 16px; top: 68px; display: grid; gap: 8px; z-index: 50; width: min(340px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: #fff; border-radius: var(--r); padding: 11px 14px; font-size: .88rem; box-shadow: var(--shadow); border-left: 4px solid var(--ok); animation: toastIn .28s var(--ease); }
.toast[data-tone="warn"] { border-left-color: #F2B33D; }
.toast[data-tone="bad"] { border-left-color: var(--pay); }
.toast.out { animation: toastOut .22s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }

/* ================= LAYAR KECIL ================= */
.mobile-bar { display: none; }
@media (max-width: 1024px) {
  .register { grid-template-columns: minmax(320px, 37%) 104px 1fr; } .where { display: none; }
  .grand output { font-size: 1.45rem; } .line { padding: 8px; gap: 6px; }
}
@media (max-width: 760px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 8px; padding: 0 10px 0 14px; }
  .tools { justify-content: flex-end; gap: 0; } #btnScan, #btnReprint { display: none; }
  .status { display: none; }
  .wordmark { font-size: 1.1rem; }
  .register { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cats { flex-direction: row; overflow: hidden; }
  #categories { flex-direction: row; overflow-x: auto; }
  .cat { min-height: 46px; min-width: 104px; border-bottom: 0; border-right: 1px solid rgba(0,0,0,.06); }
  .cat[aria-pressed="true"] { box-shadow: inset 0 -4px 0 var(--blue); }
  .pay-tile { display: none; }
  .menu { padding-bottom: 88px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .order { position: fixed; inset: 0; z-index: 30; transform: translateY(100%); transition: transform .3s var(--ease); }
  .order.open { transform: none; }
  .order-head { grid-template-columns: auto minmax(0, 1fr) 48px 40px; }
  .order-close { display: block; border: 0; background: #DCDFE5; border-radius: 4px; font-size: 1.4rem; }
  .order-actions button { font-size: .66rem; flex-direction: column; gap: 2px; }
  .order .pay-inline { display: flex; }
  .mobile-bar {
    display: flex; align-items: center; gap: 12px; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20;
    border: 0; border-radius: 10px; padding: 14px 16px; background: var(--pay); color: #fff; box-shadow: var(--shadow);
  }
  .mobile-bar strong { font-size: 1.05rem; } .mobile-bar .mb-cta { margin-left: auto; font-weight: 700; font-size: .85rem; }
  .toasts { top: auto; bottom: 84px; right: 10px; }
}
.pay-inline { display: none; height: 56px; flex: none; font-size: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media print {
  body * { visibility: hidden; }
  dialog[open] .print-area, dialog[open] .print-area * { visibility: visible; }
  dialog[open] .print-area { position: fixed; inset: 0 auto auto 0; width: 72mm; max-height: none; overflow: visible; background: #fff; color: #000; font-size: 11px; padding: 0; margin: 0; }
  .rc-paper { -webkit-mask: none; mask: none; filter: none; padding: 0; font-size: 11px; color: #000; }
  .rc-logo { width: 56px; height: 56px; margin-bottom: 6px; } .rc-logo svg { width: 38px; height: 38px; }
  .rc-cut { border-top-color: #000; } .rc-dim { color: #000; }
  .rc-qr { width: 30mm; }
}

/* ---- v9: skema diskon, void, refund ---- */
.disc-sec { display: grid; gap: 8px; }
.disc-sec h3 { margin: 6px 0 0; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.disc-sec[hidden] { display: none; }
.scheme-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.scheme { display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--r); padding: .65rem .75rem; }
.scheme b { font-size: .9rem; } .scheme small { color: var(--muted); font-size: .76rem; }
.scheme:hover:not(:disabled) { border-color: var(--blue); }
.scheme[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.scheme:disabled { opacity: .45; cursor: not-allowed; }
.scheme .sched { font-style: normal; font-size: .72rem; color: var(--blue); } .scheme .sched.off { color: #b45309; }
.scheme.off:disabled { opacity: .6; }
.link-btn { justify-self: start; border: 0; background: none; color: var(--bad); font-weight: 600; font-size: .82rem; padding: 2px 0; }
.link-btn[hidden] { display: none; }
.reason-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.reason-chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .4rem .8rem; font-size: .82rem; font-weight: 600; }
.reason-chips button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-danger { background: var(--bad) !important; }
.btn-red { border-radius: var(--r); padding: .75rem 1rem; font-weight: 700; border: 0; background: var(--bad); color: #fff; }
.btn-red:disabled { opacity: .5; }
.refund-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.refund-search .btn-blue { height: 46px; }
.refund-card { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 4px; font-size: .86rem; margin-bottom: 10px; }
.refund-card .rc-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; flex-wrap: wrap; }
.refund-card .rc-line { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.refund-card .rc-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1rem; border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 4px; }
.refund-card .rc-done { color: var(--bad); font-weight: 700; }
#refundForm { display: grid; gap: 10px; } #refundForm[hidden] { display: none; }
.report .r-row > span:last-child { white-space: nowrap; flex-shrink: 0; }

/* tombol yang dibatasi hak akses: masih bisa ditekan (minta PIN manager) */
.locked { position: relative; opacity: .55; }
.locked::after { content: ""; position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 2px;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---- keranjang ---- */
.order-actions button { position: relative; }
.held-badge { position: absolute; top: 8px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: .68rem; line-height: 18px; text-align: center; }
.held-badge[hidden] { display: none; }
.held-save { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 6px; }
.held-save[hidden] { display: none; }
.held-save p { margin: 0; }
.held-save-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.held-save-row .btn-blue { height: 46px; white-space: nowrap; }
.held-h { margin: 6px 0 0; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.held-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 46vh; overflow: auto; }
.held-list li { min-width: 0; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.held-list li.empty { border-style: dashed; color: var(--muted); text-align: center; display: block; font-size: .86rem; }
.held-list .h-name { font-weight: 700; } .held-list .h-total { font-weight: 800; text-align: right; }
.held-list .h-meta { color: var(--muted); font-size: .78rem; }
.held-list .h-items { color: var(--muted); font-size: .8rem; grid-column: 1 / -1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.held-list .h-old { color: var(--warn); font-weight: 700; }
.held-list .h-act { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.held-list .h-act button { border: 1px solid var(--line); background: #fff; border-radius: var(--r); padding: .45rem .9rem; font-weight: 700; font-size: .82rem; }
.held-list .h-act .go { background: var(--blue); border-color: var(--blue); color: #fff; }
.held-list .h-act .del { color: var(--bad); }
.held-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-size: .7rem; font-weight: 700; vertical-align: middle; }
@media (max-width: 760px) { .held-badge { top: 4px; right: 6px; } .held-save-row { grid-template-columns: 1fr; } }
#formHeld { min-width: 0; } #formHeld > * { min-width: 0; }
.mb-held { font-size: .78rem; font-weight: 700; background: rgba(255,255,255,.22); border-radius: 99px; padding: 2px 8px; }
.mb-held[hidden] { display: none; }
.held-save-row .field { min-width: 0; } .held-save-row .field input { width: 100%; min-width: 0; box-sizing: border-box; }

/* ---- split & voucher ---- */
.pay-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pay-lines[hidden] { display: none; }
.pay-lines li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r); background: var(--field); font-size: .88rem; }
.pay-lines li span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-lines li small { color: var(--muted); margin-left: 6px; }
.pay-lines li b { font-variant-numeric: tabular-nums; }
.pay-lines li button { border: 0; background: none; color: var(--bad); font-size: 1.1rem; line-height: 1; padding: 0 2px; }
.pay-remain { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 2px 0; font-weight: 700; }
.pay-remain[hidden] { display: none; }
.pay-remain strong { color: var(--bad); font-size: 1.15rem; }
.voucher-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.voucher-row[hidden] { display: none; }
.voucher-row .amount input { text-transform: uppercase; letter-spacing: .04em; }
.voucher-info { margin: 0; font-size: .84rem; padding: 8px 10px; border-radius: var(--r); background: var(--blue-soft); }
.voucher-info.bad { background: var(--bad-bg); color: var(--bad); }
.voucher-info.warn { background: var(--warn-bg); color: var(--warn); }
.voucher-info[hidden] { display: none; }
.amount input[readonly] { color: var(--muted); }
.pay-sheet form > * { min-width: 0; } #formPay { min-width: 0; }
.sheet form > * { min-width: 0; }   /* isi panjang tidak boleh melebarkan dialog di layar HP */

/* ---- promosi ---- */
.promo-bar { border-top: 1px solid var(--line); padding: 6px 12px; display: grid; gap: 4px; font-size: .78rem; background: #F2FBF6; }
.promo-bar[hidden] { display: none; }
.promo-bar .pb-on { color: var(--ok); font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.promo-bar .pb-hint { color: var(--warn); }
.promo-bar .pb-hint b, .promo-bar .pb-on b { font-weight: 800; }
.tag-promo { color: var(--ok); font-weight: 700; }
.pay-promo { margin: 0; font-size: .84rem; padding: 8px 10px; border-radius: var(--r); background: #E6F6EE; color: var(--ok); font-weight: 600; }
.pay-promo.hint { background: var(--warn-bg); color: var(--warn); font-weight: 500; }
.pay-promo[hidden] { display: none; }
.pay-promo .pp-hint { color: var(--warn); font-weight: 500; }

/* ================= Brand IAS Hospitality ================= */
body { font-variant-numeric: tabular-nums; }
h1, h2, .wordmark, .btn-pay, .grand output { font-family: "Montserrat", sans-serif; letter-spacing: .01em; }
.brand-chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 8px; padding: 3px 8px 3px 4px; }
.brand-chip img { height: 26px; width: auto; display: block; }
.brand-chip span { color: var(--brand-navy); font-weight: 800; font-size: .8rem; letter-spacing: .14em; }
.login-logo { display: block; width: 150px; height: auto; margin: 6px auto 8px; }
.topbar, .login-band { background: var(--brand-navy); box-shadow: inset 0 -3px 0 var(--brand-teal); }
:focus-visible { outline-color: var(--brand-teal); }
.field input:focus { border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(18, 176, 186, .22); }
.tool-badge { box-shadow: 0 0 0 2px var(--brand-navy); }
.methods button[aria-checked="true"], .disc-mode button[aria-checked="true"] { background: var(--brand-navy); border-color: var(--brand-navy); }
.line.fresh { background: #E3F4F5; }
.order-search:focus-within { border-bottom-color: var(--brand-teal); color: var(--brand-teal-ink); }
.grand output { color: var(--brand-navy); }
.btn-pay { background: var(--pay); } .btn-pay:hover:not(:disabled) { background: var(--pay-deep); }
.t-charges { display: contents; }

/* ---------- Denah meja ---------- */
.table-chip { display: grid; justify-items: start; align-content: center; gap: 1px; border: 0; border-left: 1px solid var(--line); background: transparent; padding: 4px 14px; font: inherit; cursor: pointer; min-width: 72px; line-height: 1.15; }
.table-chip[hidden] { display: none; }
.table-chip small { font-size: .62rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.table-chip strong { font-size: 1rem; color: var(--muted); }
.table-chip.set { background: rgba(18,176,186,.1); } .table-chip.set strong { color: var(--ink); }
dialog.tables-sheet { width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 16px 18px; }
.tables-wrap { display: grid; gap: 10px; }
.tbl-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tbl-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.tbl-tabs button[aria-selected="true"] { background: var(--navy, #23306A); border-color: var(--navy, #23306A); color: #fff; }
.tbl-stage { display: grid; place-items: center; }
.tbl-canvas { position: relative; width: min(100%, calc((100vh - 200px) * 1.6)); max-height: calc(100vh - 200px); border-radius: 10px; border: 1px solid var(--line);
  background-color: #F7F8FB; background-image: linear-gradient(#E6E9F0 1px, transparent 1px), linear-gradient(90deg, #E6E9F0 1px, transparent 1px); background-size: 5% 8%; }
.tbl-canvas.img { background-color: #fff; background-size: 100% 100%; background-repeat: no-repeat; }
.tbl { position: absolute; display: grid; place-content: center; text-align: center; border: 2px solid #1F9D6B; background: rgba(227,246,238,.95); color: #135E41; border-radius: 8px; font: inherit; cursor: pointer; line-height: 1.1; padding: 0; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tbl.round { border-radius: 50%; }
.tbl b { font-size: clamp(.7rem, 1.5vw, 1.1rem); } .tbl small { font-size: clamp(.5rem, .9vw, .72rem); opacity: .85; }
.tbl.held { border-color: #C77700; background: rgba(255,244,214,.97); color: #7A4A00; }
.tbl.sel { border-color: var(--navy, #23306A); background: var(--navy, #23306A); color: #fff; box-shadow: 0 0 0 3px rgba(35,48,106,.3); }
.tbl:focus-visible { outline: 3px solid var(--teal, #12B0BA); outline-offset: 2px; }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tbl-legend { display: inline-flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.tbl-legend .lg { width: 14px; height: 14px; border-radius: 4px; border: 2px solid; display: inline-block; vertical-align: -2px; }
.lg.free { border-color: #1F9D6B; background: #E3F6EE; } .lg.held { border-color: #C77700; background: #FFF4D6; } .lg.sel { border-color: #23306A; background: #23306A; }
.tbl-skip { border: 1px solid var(--line); background: #fff; border-radius: var(--r); padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.tbl-skip:hover { background: #F4F6FA; }
.tbl-legend > span { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Dialog konfirmasi (SweetAlert2) — warna & tone IAS ---------- */
.ias-swal-wrap { z-index: 2147483000; background: rgba(15, 22, 52, .45) !important; backdrop-filter: blur(2px); }
.ias-swal { width: min(440px, calc(100vw - 32px)) !important; padding: 26px 24px 20px !important; border-radius: 16px !important;
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif !important; color: #1E2433 !important; background: #fff !important;
  box-shadow: 0 24px 60px rgba(15, 22, 52, .28) !important; border-top: 4px solid #12B0BA; }
.ias-swal.tone-warning, .ias-swal.tone-danger { border-top-color: #E59A1A; }
.ias-swal.tone-danger { border-top-color: #C8372D; }
.ias-swal-title { font-size: 1.12rem !important; font-weight: 700 !important; color: #23306A !important; padding: 0 !important; margin: 4px 0 0 !important; line-height: 1.35 !important; }
.ias-swal-text { font-size: .93rem !important; line-height: 1.55 !important; color: #4A5168 !important; margin: 10px 0 0 !important; padding: 0 !important; }
.ias-swal-text b { color: #1E2433; }
.ias-swal-icon { margin: 0 auto 12px !important; transform: scale(.78); }
.ias-swal-icon.swal2-question { border-color: #12B0BA !important; color: #087E87 !important; }
.ias-swal-icon.swal2-info { border-color: #23306A !important; color: #23306A !important; }
.ias-swal-icon.swal2-warning { border-color: #E59A1A !important; color: #B36F00 !important; }
.tone-danger .ias-swal-icon.swal2-warning { border-color: #C8372D !important; color: #C8372D !important; }
.ias-swal-actions { gap: 10px; margin: 22px 0 0 !important; width: 100%; flex-wrap: nowrap !important; }
.ias-swal-btn { flex: 1 1 0; min-height: 46px; border-radius: 10px; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; padding: 10px 16px; transition: background .15s, box-shadow .15s; }
.ias-swal-btn.ok { background: #23306A; color: #fff; border: 1px solid #23306A; }
.ias-swal-btn.ok:hover { background: #1A2454; }
.ias-swal-btn.ok.danger { background: #C8372D; border-color: #C8372D; } .ias-swal-btn.ok.danger:hover { background: #A92B22; }
.ias-swal-btn.cancel { background: #fff; color: #23306A; border: 1px solid #CDD3E0; }
.ias-swal-btn.cancel:hover { background: #F2F4F9; }
.ias-swal-btn:focus-visible { outline: 3px solid rgba(18, 176, 186, .55); outline-offset: 2px; }
@keyframes ias-swal-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ias-swal-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.ias-swal-in { animation: ias-swal-in .18s cubic-bezier(.2, .8, .2, 1); }
.ias-swal-out { animation: ias-swal-out .12s ease-in forwards; }
@media (prefers-reduced-motion: reduce) { .ias-swal-in, .ias-swal-out { animation: none; } }
