/* =============================================================================
   OSMA TEA POS — gaya aplikasi (mobile first)
   Palet diambil dari logo asli: navy #253546 dan oranye #F0891B di atas krem.
   ============================================================================= */

:root {
  --navy: #253546;
  --navy-deep: #1A2634;
  --navy-soft: #33475C;
  --orange: #F0891B;
  --orange-deep: #B35D06;   /* aksi utama: kontras putih 4,7:1 (AAA untuk teks besar) */
  --orange-ink: #AC5806;    /* oranye untuk TEKS di atas latar terang: ≥4,5:1 */
  --orange-soft: #FFF1DF;
  --cream: #FAF7F2;
  --cream-2: #F1ECE4;
  --white: #FFFFFF;
  --ink: #22303F;
  --muted: #5F6C7C;         /* teks sekunder: ≥4,5:1 di atas putih, krem, dan krem tua */
  --line: rgba(37, 53, 70, .12);
  --success: #136B48;
  --success-soft: #E4F6EE;
  --danger: #B73333;
  --danger-soft: #FDEAEA;
  --warn: #8A5A06;
  --warn-soft: #FDF3E0;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(37, 53, 70, .06);
  --shadow: 0 8px 24px rgba(37, 53, 70, .10);
  --shadow-lg: 0 18px 44px rgba(26, 38, 52, .18);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', var(--font);
  --appbar-h: 60px;
  --tabbar-h: 68px;
  --sheet-h: 74px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Atribut `hidden` harus selalu menang atas gaya `display` di bawah ini —
   tanpa aturan ini, elemen seperti .cashbox (display:flex) tetap tampil
   meski JavaScript menyetel hidden. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body.app {
  background:
    radial-gradient(1100px 460px at 12% -12%, rgba(240, 137, 27, .14), transparent 62%),
    radial-gradient(900px 420px at 96% 4%, rgba(37, 53, 70, .10), transparent 60%),
    var(--cream);
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, .code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: .82em; }

h1, h2, h3, .h2, .h3, .stat__value, .appbar__title {
  font-family: var(--font-display);
  letter-spacing: -.01em;
}

.h2 { font-size: 1.22rem; margin: 2px 0 2px; font-weight: 700; }
.h3 { font-size: 1.02rem; margin: 0 0 10px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 90;
  background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid rgba(240, 137, 27, .55); outline-offset: 2px; }

/* ------------------------------------------------------------------ app bar */
.appbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--appbar-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.appbar__side { display: flex; align-items: center; gap: 6px; min-width: 0; }
.appbar__side--right { justify-content: flex-end; }
.appbar__title {
  font-weight: 700; font-size: 1rem; text-align: center; display: flex; flex-direction: column; line-height: 1.1;
  min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.appbar__sub { font-family: var(--font); font-size: .7rem; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; width: 104px; height: auto; }

.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; cursor: pointer; color: var(--navy); flex: none;
}
.iconbtn:hover { background: rgba(37, 53, 70, .07); }
.iconbtn--sm { width: 34px; height: 34px; border-radius: 10px; }
.iconbtn--danger { color: var(--danger); }

/* ----------------------------------------------------------------- tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid var(--line);
}
.tabbar__inner {
  max-width: 640px; margin: 0 auto; height: var(--tabbar-h);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: .68rem; font-weight: 600; color: var(--muted); padding: 8px 2px; min-height: 48px;
}
.tab__ico { display: grid; place-items: center; width: 38px; height: 28px; border-radius: 10px; transition: background .15s ease; }
.tab.is-active { color: var(--orange-ink); }
.tab.is-active .tab__ico { background: var(--orange-soft); }

/* -------------------------------------------------------------- main layout */
.main {
  max-width: 640px; margin: 0 auto;
  padding: 16px 14px calc(var(--tabbar-h) + 26px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
}
.main--bare { padding-top: 18px; }
.main--noTab { padding-bottom: 32px; }

/* ------------------------------------------------------------------- cards */
.card {
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card--pad { padding: 18px; }
.card--list { padding: 6px 0 0; }
.card__title { font-size: 1rem; font-weight: 700; margin: 14px 18px 10px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 6px; }
.card__head .card__title { margin: 0; }
.card__summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; }
.card__summary::marker { content: ''; }
details.card[open] > .card__summary { margin-bottom: 12px; }
details.card > .card__summary { padding: 2px 0; }
details.card > *:not(summary) { margin-top: 0; }
.link { display: inline-block; padding-block: 4px; color: var(--orange-ink); font-weight: 600; font-size: .86rem; }

.eyebrow { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-ink); }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; min-height: 46px;
  border-radius: 13px; border: 1px solid transparent;
  background: var(--white); color: var(--navy); font-weight: 650; font-size: .94rem;
  cursor: pointer; transition: transform .1s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  /* Gradien ini dipilih supaya teks putih tetap ≥4,5:1 di SELURUH rentangnya
     (#B35D06 → #8F4A00 = 4,68:1 … 6,67:1). Oranye cerah #F0891B tidak lolos AA. */
  background: linear-gradient(135deg, #B35D06 0%, #8F4A00 100%);
  color: #fff; box-shadow: 0 8px 20px rgba(143, 74, 0, .28);
}
.btn--ghost { background: rgba(255, 255, 255, .7); border-color: var(--line); box-shadow: none; color: var(--navy); }
.btn--danger { background: var(--danger); color: #fff; box-shadow: 0 8px 20px rgba(220, 76, 76, .25); }
.btn--block { width: 100%; }
.btn--lg { min-height: 54px; padding: 14px 22px; font-size: 1rem; border-radius: 15px; }
.btn--sm { min-height: 38px; padding: 8px 14px; font-size: .86rem; border-radius: 11px; }
.btn--xs { min-height: 34px; padding: 7px 12px; font-size: .8rem; border-radius: 10px; box-shadow: none; }
.btn[disabled] { opacity: .5; box-shadow: none; cursor: not-allowed; }

.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; align-items: flex-start; }
.row--gap { gap: 10px; }
.row--wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* -------------------------------------------------------------- form fields */
.form { display: flex; flex-direction: column; gap: 14px; }
.form--compact { gap: 10px; margin-top: 10px; }
.form--inline { flex-direction: row; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.form--grow { flex: 1 1 200px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field--grow { flex: 1 1 160px; }
.field__label { font-size: .8rem; font-weight: 600; color: var(--navy-soft); }
.field__input {
  width: 100%; padding: 12px 13px; min-height: 46px;
  font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field__input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240, 137, 27, .16); outline: none; }
.field__input--lg { font-size: 1.3rem; font-weight: 700; font-family: var(--font-display); text-align: right; min-height: 56px; }
.field__input--sm { min-height: 40px; padding: 8px 11px; }
.field__wrap { position: relative; display: block; }
.field__peek {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  background: transparent; border: 0; cursor: pointer; color: var(--muted); border-radius: 10px;
}
select.field__input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.switch { display: flex; align-items: center; gap: 10px; font-size: .86rem; }
.switch input { width: 24px; height: 24px; flex: none; accent-color: var(--orange); }   /* target sentuh WCAG 2.2 */
.switch--inline { white-space: nowrap; }

/* --------------------------------------------------------------- picker/opt */
.picker { display: flex; flex-direction: column; gap: 10px; }
.picker__opt { display: block; position: relative; cursor: pointer; }
.picker__opt input { position: absolute; opacity: 0; pointer-events: none; }
.picker__body {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.picker__opt input:checked + .picker__body {
  border-color: var(--orange); background: var(--orange-soft);
  box-shadow: 0 0 0 3px rgba(240, 137, 27, .14);
}
.picker__opt input:focus-visible + .picker__body { outline: 3px solid rgba(240, 137, 27, .4); outline-offset: 2px; }
.picker__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(37, 53, 70, .07); color: var(--navy); flex: none; }
.picker__text { display: flex; flex-direction: column; min-width: 0; }
.picker__text small { color: var(--muted); font-size: .8rem; }
.picker--pay .picker__body { padding: 11px 13px; }
.picker--pay { display: grid; grid-template-columns: 1fr; gap: 10px; }

/* ------------------------------------------------------------------ chips  */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .85); border: 1px solid var(--line);
  font-size: .8rem; font-weight: 600; color: var(--navy-soft); white-space: nowrap;
}
.chip--active, .chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip--branch { background: var(--orange-soft); border-color: rgba(240, 137, 27, .35); color: var(--orange-ink); }
.chip--warn { background: var(--warn-soft); border-color: rgba(199, 127, 16, .3); color: var(--warn); }
.chip--link:hover { background: #fff; }
.chip--btn { cursor: pointer; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }

.pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.pill--success { background: var(--success-soft); color: var(--success); }
.pill--warn { background: var(--warn-soft); color: var(--warn); }
.pill--danger { background: var(--danger-soft); color: var(--danger); }
.pill--neutral { background: rgba(37, 53, 70, .08); color: var(--muted); }
.dotstat { font-size: .68rem; font-weight: 800; letter-spacing: .1em; padding: 5px 10px; border-radius: 999px; }
.dotstat--ok { background: var(--success-soft); color: var(--success); }
.dotstat--warn { background: var(--warn-soft); color: var(--warn); }
.dotstat--off { background: rgba(37, 53, 70, .08); color: var(--muted); }

/* ------------------------------------------------------------------ alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: var(--r-md); font-size: .88rem; }
.alert__ico { flex: none; margin-top: 1px; }
.alert--info { background: rgba(37, 53, 70, .07); color: var(--navy); }
.alert--success { background: var(--success-soft); color: #0F5B3D; }
.alert--error { background: var(--danger-soft); color: #8F2626; }

/* ------------------------------------------------------------------- stats */
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.statgrid--3 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stat {
  background: rgba(255, 255, 255, .82); border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--r-md); padding: 14px 15px; display: flex; flex-direction: column; gap: 3px;
  box-shadow: var(--shadow-sm);
}
.stat__label { font-size: .74rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.stat__value { font-size: 1.4rem; font-weight: 800; line-height: 1.15; }
.stat__meta { font-size: .74rem; color: var(--muted); }
.stat--primary { background: linear-gradient(150deg, var(--navy) 0%, var(--navy-deep) 100%); border-color: transparent; }
.stat--primary .stat__label, .stat--primary .stat__meta { color: rgba(255, 255, 255, .72); }
.stat--primary .stat__value { color: #fff; }
.stat--success .stat__value { color: var(--success); }
.stat--danger .stat__value { color: var(--danger); }
.stat--warn .stat__value { color: var(--warn); }

/* ----------------------------------------------------------- POS: kategori */
.posbar { display: flex; flex-direction: column; gap: 12px; }
.posbar__top { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.posbar__top::-webkit-scrollbar { display: none; }
.search {
  display: flex; align-items: center; gap: 8px; position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 12px;
  box-shadow: var(--shadow-sm);
}
.search--sm { min-height: 40px; flex: 1 1 160px; }
.search__ico { color: var(--muted); display: grid; place-items: center; }
.search__input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; padding: 13px 0; }
.search__clear { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(37, 53, 70, .07); }
.filters__row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 14px; }
.filters.card { padding: 10px; display: flex; flex-direction: column; gap: 10px; }

/* ------------------------------------------------------- POS: kartu produk */
.prods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.prod { margin: 0; }
.prod__btn {
  width: 100%; display: flex; flex-direction: column; text-align: left; gap: 6px;
  padding: 10px; background: rgba(255, 255, 255, .88); border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--r-md); cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .18s ease;
}
.prod__btn:active { transform: scale(.985); }
.prod__media { position: relative; display: block; border-radius: 12px; background: linear-gradient(170deg, #fff, var(--cream-2)); padding: 4px; }
.prod__media img { display: block; width: 100%; height: 132px; object-fit: contain; border-radius: 10px; }
.prod__badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(37, 53, 70, .84); color: #fff; font-size: .68rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
}
.prod__badge--low { background: rgba(138, 90, 6, .95); }
.prod__badge--out { background: rgba(183, 51, 51, .95); }
.prod__qty {
  position: absolute; top: 8px; right: 8px; min-width: 26px; height: 26px; padding: 0 7px;
  display: grid; place-items: center; background: var(--orange-deep); color: #fff;
  font-size: .82rem; font-weight: 800; border-radius: 999px; box-shadow: 0 4px 10px rgba(216, 112, 10, .35);
}
.prod__name { font-size: .86rem; font-weight: 650; line-height: 1.25; }
.prod__price { font-family: var(--font-display); font-weight: 800; color: var(--navy); }
.prod.is-out { opacity: .62; }
.prod.is-added .prod__btn { border-color: rgba(240, 137, 27, .5); }

/* --------------------------------------------------------- POS: keranjang */
.cartbar { margin-top: 4px; }
.cartbar__btn {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px 16px; border: 0; border-radius: 16px; cursor: pointer;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff; box-shadow: var(--shadow);
}
.cartbar.is-empty .cartbar__btn { opacity: .6; }
.cartbar__ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); flex: none; }
.cartbar__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cartbar__text small { color: rgba(255, 255, 255, .72); font-size: .76rem; }
.cartbar__total { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }

.cartsheet { display: flex; flex-direction: column; gap: 12px; }
.cartsheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cartlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cartitem {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); border-radius: var(--r-md);
}
.cartitem__img { width: 46px; height: 56px; object-fit: contain; border-radius: 8px; background: var(--cream-2); }
.cartitem__body { display: flex; flex-direction: column; min-width: 0; }
.cartitem__body strong { font-size: .88rem; line-height: 1.25; }
.cartitem__body small { color: var(--muted); font-size: .78rem; }
.cartitem__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cartitem__total { font-weight: 700; font-size: .9rem; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper form { display: flex; }
.stepper__btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; color: var(--navy);
}
.stepper__btn--del { color: var(--danger); }
.stepper__val { min-width: 26px; text-align: center; font-weight: 700; font-size: .9rem; }
.cartfoot { display: flex; flex-direction: column; gap: 10px; }
.cartfoot__row { display: flex; justify-content: space-between; align-items: center; font-size: .92rem; }
.cartfoot__row--sub { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.cartfoot__clear { display: flex; justify-content: flex-end; }
.cartlist--static .cartitem { background: #fff; }

/* Panel keranjang: tanpa JS ia tampil menyatu di halaman; dengan JS menjadi
   lembar yang naik dari bawah supaya layar kasir tetap lapang. */
html.js .cartsheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-height: 82vh; overflow-y: auto;
  padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
  background: var(--cream);
  border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(105%); transition: transform .26s cubic-bezier(.2, .7, .3, 1);
  visibility: hidden;
}
html.js .cartsheet > * { max-width: 612px; margin-left: auto; margin-right: auto; width: 100%; }
html.js .cartsheet.is-open { transform: translateY(0); visibility: visible; }
html.js .cartbar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px);
  z-index: 50; padding: 0 14px; pointer-events: none;
}
html.js .cartbar__btn { max-width: 612px; margin: 0 auto; pointer-events: auto; }
html.js .cartscrim {
  position: fixed; inset: 0; z-index: 55; background: rgba(26, 38, 52, .42);
  backdrop-filter: blur(2px);
}
html:not(.js) .cartbar { display: none; }
.cartscrim[hidden] { display: none; }

/* --------------------------------------------------------------- checkout */
.checkout { display: flex; flex-direction: column; gap: 16px; }
.cashbox { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.quickcash { display: flex; gap: 8px; flex-wrap: wrap; }
.changebox {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--success-soft); color: #0F5B3D; padding: 12px 14px; border-radius: var(--r-md); font-weight: 600;
}
.changebox strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; }
.refbox { margin-top: 14px; }
.paybar {
  position: sticky; bottom: calc(env(safe-area-inset-bottom) + 6px);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow);
}
.paybar__total { display: flex; flex-direction: column; }
.paybar__total span { font-size: .74rem; color: var(--muted); font-weight: 600; }
.paybar__total strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }

/* ------------------------------------------------------------------ struk  */
.receipt {
  background: #fff; border-radius: var(--r-lg); padding: 20px 18px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.receipt__head { text-align: center; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.receipt__logo { width: 150px; height: auto; margin: 0 auto 6px; display: block; }
.receipt__branch { font-family: var(--font-display); font-weight: 700; margin: 4px 0 2px; }
.receipt__addr { margin: 0; font-size: .78rem; color: var(--muted); }
.receipt__meta { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.receipt__meta > div { display: flex; justify-content: space-between; gap: 12px; font-size: .84rem; }
.receipt__meta span { color: var(--muted); }
.receipt__items { list-style: none; margin: 0; padding: 14px 0; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px dashed var(--line); }
.receipt__items li { display: flex; justify-content: space-between; gap: 12px; }
.receipt__iname { display: flex; flex-direction: column; }
.receipt__iname small { color: var(--muted); font-size: .78rem; }
.receipt__iline { font-weight: 650; white-space: nowrap; }
.receipt__totals { display: flex; flex-direction: column; gap: 7px; padding: 14px 0 4px; }
.receipt__totals > div { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; }
.receipt__totals span { color: var(--muted); }
.receipt__grand { padding-top: 8px; border-top: 1px solid var(--line); font-size: 1.05rem !important; }
.receipt__grand strong { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.receipt__note { font-size: .82rem; color: var(--muted); margin: 10px 0 0; }
.receipt__foot { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); text-align: center; }
.receipt__foot p { margin: 2px 0; font-size: .82rem; }
.receipt__code { color: var(--muted); letter-spacing: .04em; }
.card--pay { border: 1px solid rgba(240, 137, 27, .4); }

.qrsim { display: flex; gap: 16px; align-items: center; margin: 14px 0; flex-wrap: wrap; }
.qrsim__frame { position: relative; width: 168px; height: 168px; flex: none; border-radius: 16px; background: #fff; border: 1px solid var(--line); padding: 12px; }
.qrsim__grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; width: 100%; height: 100%; }
.qrsim__grid span { border-radius: 2px; background: rgba(37, 53, 70, .07); }
.qrsim__grid span.on { background: var(--navy); }
.qrsim__tag {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: .82rem; letter-spacing: .22em;
  color: rgba(255, 255, 255, .92); text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
  background: rgba(37, 53, 70, .34); border-radius: 16px;
}
.qrsim__info { flex: 1 1 180px; min-width: 0; }
.qrsim__info p { margin: 0 0 2px; font-size: .78rem; color: var(--muted); }
.qrsim__code { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .04em; word-break: break-all; }
.dangerzone { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* --------------------------------------------------------------- daftar    */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rows--plain { gap: 0; }
.rows__item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 18px; border-top: 1px solid var(--line);
}
.rows--plain .rows__item:first-child, .rows .rows__item:first-child { border-top: 0; }
.rows__item--stack { flex-direction: column; align-items: stretch; gap: 10px; }
.rows__main { display: flex; flex-direction: column; min-width: 0; }
.rows__main strong { font-size: .9rem; }
.rows__main small { color: var(--muted); font-size: .78rem; }
.rows__side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rows__side strong { font-size: .92rem; }
.rows__side small { color: var(--muted); font-size: .76rem; }

.txlist { list-style: none; margin: 0; padding: 0; }
.tx { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 13px 18px; border-top: 1px solid var(--line); }
.txlist li:first-child .tx { border-top: 0; }
.tx:hover { background: rgba(255, 255, 255, .6); }
.tx__ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(37, 53, 70, .07); color: var(--navy); flex: none; }
.tx__body { display: flex; flex-direction: column; min-width: 0; }
.tx__body strong { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; }
.tx__body small { color: var(--muted); font-size: .76rem; }
.tx__side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tx__side strong { font-family: var(--font-display); font-weight: 700; }

.stocklist, .menulist, .methodlist, .branchlist, .userlist { list-style: none; margin: 0; padding: 0; }
.stockitem {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 12px 18px; border-top: 1px solid var(--line);
}
.stockitem:first-child, .menurow:first-child, .methodrow:first-child { border-top: 0; }
.stockitem.is-low { background: rgba(253, 243, 224, .55); }
.stockitem__img { width: 40px; height: 50px; object-fit: contain; border-radius: 8px; background: var(--cream-2); }
.stockitem__body { display: flex; flex-direction: column; min-width: 0; }
.stockitem__body small { color: var(--muted); font-size: .76rem; }
.stockitem__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.stockitem__qty { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; }
.stockitem__more, .methodrow__more { grid-column: 1 / -1; }
.stockitem__more > summary, .methodrow__more > summary {
  cursor: pointer; font-size: .8rem; font-weight: 600; color: var(--orange-ink); list-style: none;
  padding: 5px 0; min-height: 26px;   /* target sentuh WCAG 2.2 (≥24 px) */
}
.methodrow__more > summary.iconbtn { color: var(--navy); }
.stockitem__more > summary::marker, .methodrow__more > summary::marker { content: ''; }

.menurow {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 12px 18px; border-top: 1px solid var(--line);
}
.menurow.is-off { opacity: .6; }
.menurow__img { width: 44px; height: 56px; object-fit: contain; border-radius: 8px; background: var(--cream-2); }
.menurow__body { display: flex; flex-direction: column; min-width: 0; }
.menurow__body small { color: var(--muted); font-size: .76rem; }
.menurow__side { text-align: right; display: flex; flex-direction: column; }
.menurow__side strong { font-family: var(--font-display); font-weight: 700; }
.menurow__side small { color: var(--muted); font-size: .74rem; }
.menurow__actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.menurow__actions form { display: flex; }

.methodrow {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 12px 18px; border-top: 1px solid var(--line);
}
.methodrow.is-off { opacity: .6; }
.methodrow__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(37, 53, 70, .07); color: var(--navy); }
.methodrow__body { display: flex; flex-direction: column; min-width: 0; }
.methodrow__body small { color: var(--muted); font-size: .76rem; }
.methodrow__actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; justify-content: flex-end; }

.branchrow { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.branchrow:first-child { border-top: 0; }
.branchrow.is-off { opacity: .62; }
.branchrow__head { display: flex; gap: 12px; align-items: center; }
.branchrow__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange-ink); flex: none; }
.branchrow__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.branchrow__body small { color: var(--muted); font-size: .76rem; }
.branchrow__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.branchrow__stats span { display: flex; flex-direction: column; background: rgba(37, 53, 70, .05); border-radius: 12px; padding: 8px 10px; }
.branchrow__stats strong { font-family: var(--font-display); font-size: .98rem; }
.branchrow__stats small { font-size: .7rem; color: var(--muted); }
.branchrow__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.branchrow__actions form { display: flex; }

.userrow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.userrow:first-child { border-top: 0; }
.userrow.is-off { opacity: .6; }
.userrow__ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(37, 53, 70, .07); color: var(--navy); }
.userrow__body { display: flex; flex-direction: column; min-width: 0; }
.userrow__body small { color: var(--muted); font-size: .76rem; }
.userrow__actions { display: flex; gap: 6px; align-items: center; }
.userrow__actions form { display: flex; }

.kasgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.kasgrid span { display: flex; flex-direction: column; background: rgba(37, 53, 70, .05); border-radius: 12px; padding: 8px 10px; }
.kasgrid small { font-size: .7rem; color: var(--muted); }
.kasgrid strong { font-size: .95rem; }

/* ------------------------------------------------------------------ rank   */
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rank__item { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.rank__no { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; font-size: .82rem; }
.rank__ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(37, 53, 70, .08); color: var(--navy); }
.rank__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rank__top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.rank__top strong { font-size: .88rem; }
.rank__top span { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.rank__bar { display: block; height: 7px; border-radius: 999px; background: rgba(37, 53, 70, .09); overflow: hidden; }
.rank__bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--orange), var(--orange-deep)); }

/* ------------------------------------------------------------------ chart  */
.chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 5px; height: var(--chart-h, 120px); margin-top: 12px; }
.chart__item { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.chart__bar { width: 100%; max-width: 22px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--orange), var(--orange-deep)); min-height: 3px; }
.chart__x { font-size: .6rem; color: var(--muted); }
.legend { display: flex; gap: 12px; align-items: center; margin-top: 12px; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; margin-right: 5px; }
.dot--primary { background: var(--orange); }

/* ---------------------------------------------------------------- segmented*/
.segmented { display: flex; gap: 6px; padding: 5px; background: rgba(37, 53, 70, .07); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented__item { flex: 1 0 auto; text-align: center; padding: 9px 12px; border-radius: 10px; font-size: .82rem; font-weight: 650; color: var(--navy-soft); white-space: nowrap; }
.segmented__item.is-active { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------------ others */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 32px 20px; color: var(--muted); }
.empty strong { color: var(--navy); font-family: var(--font-display); font-size: 1rem; }
.empty span { font-size: .84rem; }
.empty__action { margin-top: 6px; }

.menulinks { display: flex; flex-direction: column; gap: 10px; }
.menulink {
  display: flex; align-items: center; gap: 13px; padding: 14px 16px;
  background: rgba(255, 255, 255, .82); border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--r-md); box-shadow: var(--shadow-sm);
}
.menulink:hover { background: #fff; }
.menulink__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange-ink); flex: none; }
.menulink__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.menulink__body small { color: var(--muted); font-size: .78rem; }
.menulink__chev { color: var(--muted); flex: none; }

.profilecard { display: flex; gap: 14px; align-items: center; }
.profilecard__ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(140deg, var(--navy), var(--navy-deep)); color: #fff; flex: none; }
.profilecard__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.profilecard__body small { color: var(--muted); font-size: .78rem; }
.profilecard__body .chip { align-self: flex-start; margin-top: 5px; }

.imgpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 10px; }
.imgpick__opt { cursor: pointer; position: relative; }
.imgpick__opt input { position: absolute; opacity: 0; pointer-events: none; }
.imgpick__body {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; min-height: 84px;
}
.imgpick__body img { width: 100%; height: 68px; object-fit: contain; }
.imgpick__body small { font-size: .68rem; color: var(--muted); }
.imgpick__opt input:checked + .imgpick__body { border-color: var(--orange); background: var(--orange-soft); box-shadow: 0 0 0 3px rgba(240, 137, 27, .13); }

.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; font-size: .88rem; color: var(--navy-soft); }
.copyrow { display: flex; gap: 8px; margin-top: 6px; }
.copyrow .field__input { font-size: .8rem; }

.demo { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.demo__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .78rem; color: var(--muted); margin-bottom: 10px; }
.demo__badge { display: inline-flex; align-items: center; gap: 5px; background: var(--orange-soft); color: var(--orange-ink); font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.demo__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo__form { display: flex; }
.demo__card {
  width: 100%; display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff;
  box-shadow: var(--shadow-sm);
}
.demo__card:hover { border-color: var(--orange); }
.demo__role { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--orange-ink); }
.demo__name { font-size: .84rem; font-weight: 600; word-break: break-all; }
.demo__pass { font-size: .74rem; color: var(--muted); }

.demoflag { display: none; }

/* ------------------------------------------------------------------- login */
body.body--login { background: var(--cream); }
.login { max-width: 480px; margin: 0 auto; padding: 0 18px 40px; }
.login__hero {
  position: relative; margin: 0 -18px 0; padding: 46px 24px 34px;
  text-align: center; color: #fff; overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius: 0 0 30px 30px;
}
.login__glow {
  position: absolute; inset: -40% -10% auto -10%; height: 320px;
  background: radial-gradient(closest-side, rgba(240, 137, 27, .55), transparent);
  filter: blur(10px);
}
.login__logo { position: relative; width: 132px; height: auto; margin: 0 auto 14px; display: block; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .3)); }
.login__hero h1 { position: relative; font-size: 1.5rem; margin: 0 0 6px; font-weight: 800; }
.login__hero h1 span { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .7); margin-top: 4px; }
.login__hero p { position: relative; margin: 0 auto; max-width: 320px; font-size: .86rem; color: rgba(255, 255, 255, .78); }
.login__card { margin-top: -22px; position: relative; padding: 20px 18px; }
.login__card .card__title { margin: 0 0 14px; font-size: 1.05rem; }

@media (max-width: 420px) {
  .demo__grid { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .statgrid { grid-template-columns: 1fr 1fr; }
  .prod__media img { height: 118px; }
}

@media (min-width: 760px) {
  .prods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tabbar { border-radius: 20px 20px 0 0; }
  .main { padding-top: 22px; }
  .login { padding-top: 26px; }
}

@media (min-width: 1024px) {
  .prods { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .statgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .statgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .picker--pay { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------------- cetak */
@media print {
  .appbar, .tabbar, .cartbar, .cartsheet, .cartscrim, .paybar, .filters, .dangerzone, .demoflag,
  .alert, .btn, .iconbtn, body::after { display: none !important; }
  body, body.app { background: #fff; }
  .main { padding: 0; max-width: none; gap: 0; }
  .receipt { box-shadow: none; border: 0; padding: 0; }
  .receipt__empty { display: none; }
  .card { box-shadow: none; border: 0; }
  .card--pay { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
