/* Smanesa Kantin Digital — gaya tampilan
   Warna diambil dari banner Kantin Smanesa: merah, kuning mentega, krem, biru tua. */
:root {
  --red: #c8202f;
  --red-d: #9e1622;
  --yellow: #f7c331;
  --yellow-l: #fff3c9;
  --navy: #1d2756;
  --cream: #fdf1e6;
  --paper: #ffffff;
  --ink: #1f1d2b;
  --muted: #6d6874;
  --line: #eadfd4;
  --ok: #1f8a4c;
  --ok-bg: #e3f5ea;
  --warn: #a35f00;
  --warn-bg: #fff1d2;
  --bad: #c0262d;
  --bad-bg: #fde6e6;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(60, 30, 10, .06), 0 4px 16px rgba(60, 30, 10, .06);
  --k: var(--red);
  --maxw: 560px;
  --nav-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
body.is-wide { --maxw: 1100px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .6rem; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .02em; }
.big { font-size: 1.25rem; font-weight: 800; }
.center { text-align: center; }
.right { text-align: right; }
.txt-ok { color: var(--ok); }
.txt-bad { color: var(--bad); }
.link { color: var(--red); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.ic { flex: none; }
[hidden] { display: none !important; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 10px rgba(120, 10, 20, .25);
  padding-top: env(safe-area-inset-top);
}
.topbar-in {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
}
.brand-logo { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.brand { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.brand-name { font-weight: 600; font-size: .95rem; letter-spacing: -.01em; }
.brand-name b { color: var(--yellow); font-weight: 800; }
.brand-sub { font-size: .75rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .14); color: #fff; flex: none;
}
.icon-btn:active { background: rgba(255, 255, 255, .25); }
.saldo-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--yellow); color: var(--navy);
  font-weight: 800; font-size: .88rem;
  padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.tabs {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; gap: 4px; overflow-x: auto; padding: 0 12px 8px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 7px 12px; border-radius: 999px;
  font-size: .85rem; font-weight: 600; color: rgba(255, 255, 255, .88);
}
.tabs a.active { background: #fff; color: var(--red); }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw); margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
}
.role-petugas .wrap { padding-bottom: 40px; }
.page-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.sec-title { font-size: 1.02rem; font-weight: 800; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.sec-title .count { background: var(--red); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 8px; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap { gap: 8px; }
.grow { flex: 1; min-width: 0; }
.center-row { justify-content: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.inline { display: inline; }
.two-col { display: grid; gap: 16px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.card.flush { padding: 0; overflow: hidden; }
.card.empty { text-align: center; color: var(--muted); padding: 28px 16px; }
.card.empty p { margin-bottom: 12px; }
.pad { padding: 12px 16px; }
details.card summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; }
details.card[open] summary { margin-bottom: 12px; }

/* ---------- Tombol & form ---------- */
.btn {
  appearance: none; border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  font: inherit; font-weight: 700; font-size: .92rem;
  padding: 10px 16px; border-radius: 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-d); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 1rem; }
.btn-xl { min-height: 64px; font-size: 1.1rem; border-radius: 16px; }
.btn-sm { min-height: 34px; padding: 5px 10px; font-size: .8rem; border-radius: 9px; }
.danger { color: var(--bad); }
.btn-primary.danger { background: var(--bad); color: #fff; }

label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .88rem; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 12px; background: #fff; width: 100%; min-height: 46px;
}
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--red); flex: none; }
input[type=color] { padding: 4px; height: 46px; }
input[type=file] { padding: 9px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(200, 32, 47, .18); border-color: var(--red); }
.input-xl { font-size: 1.6rem; font-weight: 800; text-align: right; }
.grid-form { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-form { grid-template-columns: 1fr 1fr; } .span2 { grid-column: span 2; } }
.sub-fieldset { border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px; margin: 0; }
.sub-fieldset legend { font-weight: 700; font-size: .85rem; padding: 0 6px; }
.hint { font-size: .82rem; color: var(--muted); margin: 0; }
.searchbar, .filterbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #fff; border-radius: 14px; padding: 8px 8px 8px 14px; box-shadow: var(--shadow);
}
.searchbar input { border: 0; min-height: 40px; padding: 6px 4px; flex: 1; min-width: 140px; }
.searchbar input:focus { outline: none; }
.searchbar select { width: auto; min-height: 40px; }
.searchbar .ic { color: var(--muted); }
.filterbar { padding: 12px; align-items: flex-end; }
.filterbar label { flex: 1; min-width: 140px; }

/* ---------- Alert, badge ---------- */
.alert { border-radius: 12px; padding: 12px 14px; font-size: .9rem; margin: 0; }
.alert-ok { background: var(--ok-bg); color: #145c33; }
.alert-err { background: var(--bad-bg); color: #8e1a20; }
.notice { background: var(--yellow-l); border: 1px solid #f3dc8f; border-radius: 12px; padding: 12px 14px; font-size: .9rem; margin: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; border: 0;
  font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; font-family: inherit;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-mute { background: #efebe7; color: #6d6874; }
.as-btn { cursor: pointer; }
.pill { display: inline-block; background: var(--yellow); color: var(--navy); font-weight: 800; font-size: .8rem; padding: 4px 10px; border-radius: 999px; }
.tag-star { color: #b77900; font-size: .72rem; font-weight: 800; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }

/* ---------- Dompet / statistik ---------- */
.wallet {
  --k: var(--red);
  background: linear-gradient(135deg, var(--k), color-mix(in srgb, var(--k) 70%, #000));
  color: #fff; border-radius: 20px; padding: 20px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--k) 35%, transparent);
  position: relative; overflow: hidden;
}
.wallet::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: rgba(247, 195, 49, .28);
}
.wallet > * { position: relative; z-index: 1; }
.wallet-label { display: block; font-size: .82rem; opacity: .9; }
.wallet-amount { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.02em; margin: 2px 0; }
.wallet-sub { font-size: .85rem; opacity: .9; }
.wallet-actions { display: flex; flex-direction: column; gap: 8px; }
.link-card { padding: 14px 16px; border-bottom: 0; }
.wallet-btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .18); padding: 8px 12px; border-radius: 12px; font-weight: 700; font-size: .85rem; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 860px) { .stats-4 { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.stat span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.stat b { font-size: 1.2rem; font-weight: 800; }
.stat small { color: var(--muted); font-size: .74rem; }
.stat-hero { background: var(--navy); color: #fff; }
.stat-hero span, .stat-hero small { color: rgba(255, 255, 255, .75); }
.stat-hero b { color: var(--yellow); font-size: 1.4rem; }

.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 860px) { .quick { grid-template-columns: repeat(4, 1fr); } }
.quick-btn { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; font-weight: 800; color: #fff; box-shadow: var(--shadow); }
.q-red { background: var(--red); }
.q-green { background: #2f7d32; }
.q-yellow { background: var(--yellow); color: var(--navy); }
.q-navy { background: var(--navy); }

/* ---------- Daftar ---------- */
.list { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list:empty { display: none; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item.active { background: var(--yellow-l); }
a.list-item:active { background: #faf5ef; }
.li-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: #f2ede8; }
.li-ic.ok { background: var(--ok-bg); color: var(--ok); }
.li-ic.warn { background: var(--warn-bg); color: var(--warn); }
.li-ic.bad { background: var(--bad-bg); color: var(--bad); }
.li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.li-main small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-end { text-align: right; font-weight: 800; display: flex; flex-direction: column; white-space: nowrap; }
.li-end small { font-weight: 500; color: var(--muted); }

/* ---------- Kantin ---------- */
.kantin-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .kantin-grid { grid-template-columns: 1fr 1fr; } }
.kantin-card { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); border-bottom: 4px solid var(--k); transition: transform .12s; }
.kantin-card:active { transform: scale(.985); }
.kantin-card img { width: 100%; aspect-ratio: 8 / 3; object-fit: cover; }
.kantin-ph { aspect-ratio: 8 / 3; display: grid; place-items: center; background: color-mix(in srgb, var(--k) 15%, #fff); color: var(--k); }
.kantin-info { padding: 10px 14px 12px; display: flex; flex-direction: column; }
.kantin-info b { font-size: 1rem; }
.kantin-info small { color: var(--muted); }

.hero { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); margin: -4px 0 0; }
.hero img { width: 100%; aspect-ratio: 8 / 3; object-fit: cover; }
.hero-body { padding: 14px 16px 16px; border-top: 4px solid var(--k); }
.hero-body h1 { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.hero-body p { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }

.chips, .quick-amounts { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; flex-wrap: wrap; }
.chips { flex-wrap: nowrap; position: sticky; top: 64px; z-index: 5; background: var(--cream); padding: 6px 0; }
.chip { flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: .85rem; font-family: inherit; cursor: pointer; }
.chip:active { background: var(--yellow-l); }
.menu-sec { scroll-margin-top: 120px; }

.menu-list { display: flex; flex-direction: column; gap: 10px; }
.menu-item { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); border: 2px solid transparent; transition: border-color .15s; }
.menu-item.in-cart { border-color: var(--yellow); background: #fffdf5; }
.menu-item.is-off { opacity: .55; }
.menu-thumb { width: 56px; height: 56px; border-radius: 14px; background: var(--yellow-l); display: grid; place-items: center; flex: none; overflow: hidden; font-size: 1.8rem; }
.menu-thumb img { width: 100%; height: 100%; object-fit: cover; }
.menu-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.menu-main b { font-size: .95rem; font-weight: 700; }
.price { color: var(--red); font-weight: 800; }
.qty { display: flex; align-items: center; gap: 4px; flex: none; }
.qty output { min-width: 26px; text-align: center; font-weight: 800; }
.qty-btn {
  width: 36px; height: 36px; border-radius: 11px; border: 1.5px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; font: inherit; font-size: 1.2rem; font-weight: 700; color: var(--ink); padding: 0;
}
.qty-btn.add { background: var(--red); border-color: var(--red); color: #fff; }

.cartbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom));
  width: min(calc(100% - 32px), calc(var(--maxw) - 32px));
  background: var(--navy); color: #fff; border-radius: 16px; padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: .9rem; box-shadow: 0 10px 30px rgba(20, 20, 60, .35); z-index: 15;
}
.cartbar span { display: inline-flex; align-items: center; gap: 8px; }
.cartbar b { color: var(--yellow); }

.cart-group h3 { font-size: 1rem; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-row.is-off { opacity: .7; }
.cart-name { display: flex; flex-direction: column; }
.cart-name small { color: var(--muted); }
.cart-sub { grid-column: 2; text-align: right; }
.cart-foot { padding-top: 10px; }
.summary { display: flex; flex-direction: column; gap: 8px; }
.summary .row-between b { font-size: 1.05rem; }

/* ---------- Struk ---------- */
.struk { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 18px; position: relative; }
.struk::before, .struk::after { content: ''; position: absolute; left: 0; right: 0; height: 10px; background: radial-gradient(circle at 6px 0, transparent 6px, #fff 6.5px) repeat-x; background-size: 12px 10px; }
.struk::after { bottom: -9px; }
.struk::before { display: none; }
.struk-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.struk-head img { width: 38px; }
.struk-head div { display: flex; flex-direction: column; }
.struk-head small { color: var(--muted); }
.qr-box { position: relative; width: 240px; max-width: 100%; margin: 16px auto 8px; padding: 8px; background: #fff; border: 3px solid var(--navy); border-radius: 18px; }
.qr svg { width: 100%; height: auto; display: block; }
.qr-box.is-used .qr { opacity: .18; }
.qr-stamp { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; color: var(--ok); transform: rotate(-14deg); letter-spacing: .1em; }
.kode { text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.35rem; font-weight: 800; letter-spacing: .12em; margin: 0; }
.struk-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; padding: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.struk-meta dt { font-size: .75rem; color: var(--muted); }
.struk-meta dd { margin: 0; font-weight: 700; font-size: .88rem; }
.struk-kantin { border-left: 4px solid var(--k); padding: 6px 0 6px 12px; margin: 12px 0; }
.struk-items { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: .9rem; }
.struk-items td { padding: 4px 0; vertical-align: top; }
.struk-items td:first-child { width: 34px; font-weight: 700; color: var(--muted); }
.struk-items td:last-child { text-align: right; white-space: nowrap; }
.struk-items small { display: block; color: var(--muted); font-size: .75rem; }
.struk-items .sub td { border-top: 1px solid var(--line); font-weight: 800; padding-top: 8px; }
.struk-items.big { font-size: 1.05rem; }
.struk-items.big td:first-child { color: var(--red); font-size: 1.1rem; }
.struk-total { border-top: 2px solid var(--ink); padding-top: 12px; font-size: 1.05rem; }
.struk-total b { font-size: 1.3rem; }

/* ---------- Kantin: hasil scan ---------- */
.result { border-radius: 20px; padding: 24px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.result h1, .result h2 { font-size: 1.4rem; font-weight: 800; margin: 6px 0 2px; }
.result p { margin: 0; }
.result-ok { background: var(--ok); color: #fff; }
.result-bad { background: var(--bad); color: #fff; }
.result.compact { padding: 14px; }
.order { border-left: 5px solid var(--yellow); }
.order-items { margin: 8px 0; padding: 0; list-style: none; font-size: 1rem; }
.order-items li { padding: 2px 0; }

.scanner { background: #000; }
.scan-view { position: relative; aspect-ratio: 1 / 1; max-height: 70vh; width: 100%; overflow: hidden; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 15%; border: 3px solid var(--yellow); border-radius: 22px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
.scan-msg { position: absolute; left: 12px; right: 12px; bottom: 12px; text-align: center; color: #fff; background: rgba(0, 0, 0, .55); padding: 8px 12px; border-radius: 12px; font-size: .88rem; }
.h5qr { width: 100%; background: #000; }
#scan-fallback .hint { color: #fff; padding: 10px; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1.5px solid var(--line); background: #fcf8f4; white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.card:not(.flush) .table td, .card:not(.flush) .table th { padding-left: 0; }
.card:not(.flush) .table td:last-child { padding-right: 0; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .sub td { font-weight: 800; border-top: 1.5px solid var(--ink); }
.table tr.is-off td { color: var(--muted); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.ic-cell { font-size: 1.4rem; width: 44px; }
.thumb-sm { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.thumb-prev { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.banner-prev { margin-top: 8px; border-radius: 12px; aspect-ratio: 8/3; object-fit: cover; max-width: 360px; }

.seg { display: flex; gap: 4px; background: #efe5da; padding: 4px; border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.seg a, .seg label { flex: 1; text-align: center; padding: 9px 12px; border-radius: 10px; font-weight: 700; font-size: .86rem; white-space: nowrap; color: var(--muted); cursor: pointer; }
.seg a.active, .seg label:has(input:checked) { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.seg-form label { flex-direction: row; justify-content: center; gap: 6px; }
.seg-form input { width: 16px; height: 16px; }
.seg-scroll a { flex: none; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pager a { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #fff; font-weight: 700; box-shadow: var(--shadow); }
.pager a.active { background: var(--red); color: #fff; }

.kantin-admin { display: grid; gap: 14px; }
@media (min-width: 720px) { .kantin-admin { grid-template-columns: 1fr 1fr; } }
.kantin-row { border-top: 4px solid var(--k); }
.kantin-row img { width: 100%; aspect-ratio: 8/3; object-fit: cover; }
.kantin-cair { display: grid; gap: 12px; }
@media (min-width: 720px) { .kantin-cair { grid-template-columns: 1fr 1fr; } }
.cair-card { border-top: 5px solid var(--k); display: flex; flex-direction: column; gap: 8px; }
.req-card { display: flex; flex-direction: column; gap: 10px; border-left: 5px solid var(--yellow); }
.req-card.focus { outline: 3px solid var(--yellow); }
.cair-card.focus { outline: 3px solid var(--yellow); }
.topup-card h2 { font-size: 1.2rem; margin: 0; }
.receipt .table td { padding: 8px 0; }

.profile { display: flex; gap: 14px; align-items: center; }
.profile h2 { font-size: 1.15rem; margin: 0; }
.profile p { margin: 0; }
.avatar { width: 56px; height: 56px; border-radius: 18px; background: var(--yellow); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; flex: none; }
.avatar.sm { width: 38px; height: 38px; border-radius: 12px; font-size: 1rem; }
.full-img { width: 100%; }

/* ---------- Navigasi bawah ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: center;
  padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(60, 30, 10, .06);
}
.bottomnav a {
  flex: 1; max-width: 140px; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; border-radius: 12px; font-size: .72rem; font-weight: 700; color: var(--muted);
}
.bottomnav a.active { color: var(--red); }
.bottomnav a.active .ic { stroke-width: 2.5; }
.bottomnav .nav-scan .ic { background: var(--red); color: #fff; width: 44px; height: 44px; padding: 10px; border-radius: 16px; margin-top: -18px; box-shadow: 0 6px 14px rgba(200, 32, 47, .35); }
.cart-count { position: absolute; top: 0; left: calc(50% + 6px); background: var(--red); color: #fff; font-style: normal; font-size: .68rem; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }

/* ---------- Halaman masuk ---------- */
body.auth {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px;
  background:
    radial-gradient(circle at 90% 0%, rgba(247, 195, 49, .55), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(200, 32, 47, .18), transparent 45%),
    var(--cream);
}
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 24px; padding: 24px 20px; box-shadow: 0 20px 50px rgba(120, 40, 10, .15); display: flex; flex-direction: column; gap: 14px; }
.auth-hero { text-align: center; }
.auth-logo { width: 76px; margin: 0 auto 8px; }
.auth-hero h1, .auth-card > h1 { font-size: 1.6rem; font-weight: 800; color: var(--red); letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.auth-hero h1 span { color: var(--navy); }
.tagline { display: inline-block; margin: 10px 0 0; background: var(--red); color: var(--yellow); font-weight: 700; font-size: .78rem; padding: 4px 12px; border-radius: 6px; transform: rotate(-1.5deg); }
.auth-foot { text-align: center; font-size: .8rem; color: var(--muted); margin: 0; }

/* ---------- Cetak ---------- */
@media print {
  .topbar, .bottomnav, .cartbar, .no-print, .btn, form button { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; max-width: none; }
  .card, .struk { box-shadow: none; }
}
