/* FOMAXO Store System - staff app. Black and gold, no italics. */
@font-face { font-family: "FOMAXO REAL"; src: url("fomaxo-real.woff2") format("woff2"), url("fomaxo-real.ttf") format("truetype"); font-display: swap; }

:root {
  --bg: #0a0a0b; --bg-2: #111113; --panel: #161619; --panel-2: #1d1d21; --line: #2a2a2f; --line-2: #36363c;
  --gold: #c9a24b; --gold-2: #e8c97c; --gold-dim: rgba(201,162,75,.14);
  --text: #f4f0e7; --muted: #9b968c; --faint: #6c6861;
  --ok: #49b475; --ok-bg: rgba(73,180,117,.14); --low: #e0a336; --low-bg: rgba(224,163,54,.15);
  --out: #e0574f; --out-bg: rgba(224,87,79,.15); --off-bg: rgba(155,150,140,.14);
  --btn-a: #e8c97c; --btn-b: #c9a24b; --err-text: #ffb2ad;
  --shadow: 0 14px 36px rgba(0,0,0,.5); --paper-line: transparent; --backdrop: rgba(0,0,0,.66);
  color-scheme: dark;
  --radius: 14px; --head: "FOMAXO REAL", Georgia, "Times New Roman", serif;
  --nav-h: 60px;
}
/* ---------- Light mode: follows the device unless staff pick Dark or Light ---------- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f2eb; --bg-2: #fbf9f4; --panel: #ffffff; --panel-2: #f2ede3; --line: #e6dfd1; --line-2: #d5cbb8;
    --gold: #b48a2f; --gold-2: #8a6719; --gold-dim: rgba(180,138,47,.13);
    --text: #1b1915; --muted: #6d675c; --faint: #9a9387;
    --ok: #23804a; --ok-bg: rgba(35,128,74,.11); --low: #a8680a; --low-bg: rgba(200,130,20,.14);
    --out: #c0362e; --out-bg: rgba(192,54,46,.1); --off-bg: rgba(110,103,92,.12);
    --btn-a: #dcbc6e; --btn-b: #c09a45; --err-text: #a3261f;
    --shadow: 0 12px 32px rgba(60,45,15,.16); --paper-line: #e6dfd1; --backdrop: rgba(30,25,15,.45);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f2eb; --bg-2: #fbf9f4; --panel: #ffffff; --panel-2: #f2ede3; --line: #e6dfd1; --line-2: #d5cbb8;
  --gold: #b48a2f; --gold-2: #8a6719; --gold-dim: rgba(180,138,47,.13);
  --text: #1b1915; --muted: #6d675c; --faint: #9a9387;
  --ok: #23804a; --ok-bg: rgba(35,128,74,.11); --low: #a8680a; --low-bg: rgba(200,130,20,.14);
  --out: #c0362e; --out-bg: rgba(192,54,46,.1); --off-bg: rgba(110,103,92,.12);
  --btn-a: #dcbc6e; --btn-b: #c09a45; --err-text: #a3261f;
  --shadow: 0 12px 32px rgba(60,45,15,.16); --paper-line: #e6dfd1; --backdrop: rgba(30,25,15,.45);
  color-scheme: light;
}

* { box-sizing: border-box; font-style: normal !important; -webkit-tap-highlight-color: transparent; }
html, body, #root { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.num, .price { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h1, h2, h3 { font-weight: 500; margin: 0; }
.h-brand { font-family: var(--head); letter-spacing: .32em; color: var(--gold); }

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.gold { background: linear-gradient(180deg, var(--btn-a), var(--btn-b)); color: #141108; border-color: transparent; }
.btn.gold:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--err-text); border-color: rgba(224,87,79,.45); background: transparent; }
.btn.block { width: 100%; }
.btn.big { min-height: 56px; font-size: 17px; }
.btn.sm { min-height: 34px; padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.icon-btn { width: 38px; height: 38px; min-height: 0; padding: 0; border-radius: 10px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); outline: none; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: center; margin: 8px 0 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--gold); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); background: var(--ok-bg); }
.badge.low { color: var(--low); background: var(--low-bg); }
.badge.out { color: var(--out); background: var(--out-bg); }
.badge.off { color: var(--muted); background: var(--off-bg); }
.badge.plain::before { display: none; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at top, rgba(201,162,75,.12), transparent 60%), var(--bg); }
.login { width: 100%; max-width: 380px; text-align: center; }
.login .h-brand { font-size: 34px; margin-bottom: 4px; }
.login .tag { color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 28px; }
.login form { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.login .err { margin-bottom: 12px; }

/* ---------- App shell ---------- */
.app { display: flex; flex-direction: column; height: 100%; }
.topbar { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); flex: none; }
.topbar .h-brand { font-size: 19px; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav button { background: none; border: 0; padding: 9px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.nav button svg { width: 18px; height: 18px; }
.nav button.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--gold); }
.nav .count { background: var(--out); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 6px; line-height: 17px; }
.spacer { flex: 1; }
.net { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; padding: 6px 11px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-weight: 600; border: 0; }
.net::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.net.off { background: var(--low-bg); color: var(--low); }
.user-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 600; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-dim); color: var(--gold-2); font-size: 13px; }
.view { flex: 1; overflow: auto; }
.page { max-width: 1240px; margin: 0 auto; padding: 20px 16px 40px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-family: var(--head); font-size: 22px; letter-spacing: .06em; }

/* ---------- Sell ---------- */
.sell { display: grid; grid-template-columns: 1fr 380px; height: 100%; }
.catalog { overflow: auto; padding: 16px; }
.catalog-tools { display: flex; gap: 10px; margin-bottom: 12px; position: sticky; top: -16px; background: var(--bg); padding: 16px 0 8px; margin-top: -16px; z-index: 2; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 180px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); }
.search .input { padding-left: 38px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; }
.chip.active { background: var(--gold-dim); color: var(--gold-2); border-color: rgba(201,162,75,.5); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.tile { position: relative; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-height: 128px; display: flex; flex-direction: column; gap: 6px; transition: border-color .12s, transform .08s; }
.tile:hover { border-color: rgba(201,162,75,.55); }
.tile:active { transform: scale(.98); }
.tile .t-name { font-weight: 700; line-height: 1.25; }
.tile .t-var { font-size: 13px; color: var(--muted); }
.tile .t-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; flex-wrap: wrap; }
.tile .price { color: var(--gold-2); font-weight: 700; font-size: 16px; }
.tile.is-out { opacity: .55; }
.tile .in-cart { position: absolute; top: 10px; right: 10px; background: var(--gold); color: #111; font-weight: 800; font-size: 12px; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty .big { font-family: var(--head); color: var(--text); font-size: 18px; margin-bottom: 6px; }

.cart { border-left: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; min-height: 0; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-family: var(--head); font-size: 17px; letter-spacing: .08em; }
.cart-lines { flex: 1; overflow: auto; padding: 6px 16px; min-height: 80px; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line .l-name { font-weight: 600; }
.line .l-sub { font-size: 13px; color: var(--muted); }
.line .l-total { text-align: right; font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.qty button { width: 34px; height: 32px; border: 0; background: var(--panel-2); font-size: 18px; }
.qty span { min-width: 34px; text-align: center; font-weight: 700; }
.line .l-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 13px; padding: 4px; text-decoration: underline; text-underline-offset: 3px; }
.cart-extra { padding: 10px 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.extra-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-align: left; }
.extra-btn .val { color: var(--gold-2); font-weight: 600; font-size: 13px; }
.cart-totals { padding: 10px 16px 0; }
.cart-totals .t-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); padding: 2px 0; }
.cart-totals .t-grand { color: var(--text); font-size: 24px; font-weight: 800; padding: 8px 0 4px; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px 16px; }
.pay-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 12px; min-height: 62px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); text-align: left; }
.pay-btn b { font-size: 15px; }
.pay-btn small { color: var(--muted); font-size: 12px; }
.pay-btn.primary { background: linear-gradient(180deg, var(--btn-a), var(--btn-b)); color: #141108; border-color: transparent; }
.pay-btn.primary small { color: rgba(20,17,8,.7); }
.pay-btn:disabled { opacity: .4; cursor: not-allowed; }
.cart-fab { display: none; }

/* ---------- Stock ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-align: left; }
button.kpi:hover { border-color: var(--line-2); }
.kpi .k-label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.kpi .k-val { font-size: 26px; font-weight: 800; margin-top: 4px; }
.kpi.low .k-val { color: var(--low); } .kpi.out .k-val { color: var(--out); } .kpi.gold .k-val { color: var(--gold-2); }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--panel-2); }
.tbl .r { text-align: right; }
.tbl .p-name { font-weight: 600; }
.stock-num { font-weight: 800; font-size: 17px; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- Reports ---------- */
.cards2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { font-family: var(--head); font-size: 15px; letter-spacing: .08em; margin-bottom: 12px; color: var(--gold-2); }
.bar-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 5px; }
.list-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list-row:last-child { border-bottom: 0; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: var(--backdrop); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s; }
.modal { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 20px; animation: rise .18s; }
.modal.wide { max-width: 620px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.modal-head h2 { font-family: var(--head); font-size: 19px; letter-spacing: .06em; }
.modal-foot { display: flex; gap: 10px; margin-top: 16px; }
.modal-foot .btn { flex: 1; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.amount-big { text-align: center; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 14px; }
.amount-big .lbl { color: var(--muted); font-size: 13px; }
.amount-big .val { font-size: 36px; font-weight: 800; color: var(--gold-2); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.change-box { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: 18px; }
.change-box.short { background: var(--out-bg); color: var(--out); }
.steps { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; padding: 8px 0; }
.steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-dim); color: var(--gold-2); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.qr-box { background: #fff; border-radius: 16px; padding: 14px; width: 260px; max-width: 100%; margin: 0 auto 12px; }
.qr-box svg { display: block; width: 100%; height: auto; }
.status-line { text-align: center; font-weight: 600; margin: 8px 0 4px; display: flex; gap: 8px; justify-content: center; align-items: center; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.err { color: var(--err-text); background: var(--out-bg); border: 1px solid rgba(224,87,79,.35); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.note { color: var(--gold-2); background: var(--gold-dim); border: 1px solid rgba(201,162,75,.3); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.seg { display: flex; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 11px; padding: 3px; gap: 3px; }
.seg button { flex: 1; white-space: nowrap; border: 0; background: transparent; padding: 8px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.seg button.active { background: var(--panel-2); color: var(--text); }
.tier-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--gold-dim); color: var(--gold-2); font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.menu { position: fixed; z-index: 40; min-width: 210px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px; }
.menu button:hover { background: var(--panel-2); }
.menu .m-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }

/* ---------- Receipt (paper look, prints on 80mm) ---------- */
.paper { border: 1px solid var(--paper-line); background: #fbf8f1; color: #161616; border-radius: 12px; padding: 20px 18px; font-size: 14px; }
.paper .p-brand { font-family: var(--head); letter-spacing: .35em; text-align: center; font-size: 24px; color: #111; }
.paper .p-tag { text-align: center; font-size: 10.5px; color: #8a6d2b; letter-spacing: .06em; margin: 3px 0 6px; }
.paper .p-small { font-size: 12px; color: #555; text-align: center; }
.paper .p-title { text-align: center; font-weight: 800; letter-spacing: .2em; font-size: 12px; margin: 10px 0; }
.paper .p-meta div { display: flex; justify-content: space-between; font-size: 12.5px; }
.paper .p-meta span:first-child { color: #666; }
.paper hr { border: 0; border-top: 1px dashed #bbb; margin: 10px 0; }
.paper .p-line { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }
.paper .p-line .s { color: #666; font-size: 12px; }
.paper .p-tot { display: flex; justify-content: space-between; padding: 2px 0; }
.paper .p-grand { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; border-top: 2px solid #111; border-bottom: 2px solid #111; padding: 7px 0; margin: 6px 0; }
.paper .p-foot { text-align: center; margin-top: 12px; font-size: 12.5px; color: #444; }
.paper .p-tier { text-align: center; color: #8a6d2b; font-weight: 800; letter-spacing: .1em; margin-top: 10px; }
.receipt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.receipt-actions .wide { grid-column: span 2; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line-2); padding: 12px 18px; border-radius: 12px; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); animation: rise .2s; }
.toast.bad { border-color: rgba(224,87,79,.6); }

#print-area { display: none; }
@media print {
  @page { margin: 4mm; }
  body * { visibility: hidden !important; }
  #print-area, #print-area * { visibility: visible !important; }
  #print-area { display: block; position: absolute; left: 0; top: 0; width: 72mm; }
  #print-area .paper { border-radius: 0; padding: 0; background: #fff; }
}

/* ---------- Phone & small tablet ---------- */
@media (max-width: 900px) {
  .topbar { height: 54px; gap: 8px; padding: 0 12px; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; margin: 0; height: var(--nav-h); background: var(--bg-2); border-top: 1px solid var(--line); justify-content: space-around; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); height: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .nav button { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; flex: 1; }
  .nav button.active { box-shadow: inset 0 2px 0 var(--gold); background: transparent; }
  .nav .count { position: absolute; transform: translate(14px, -4px); }
  .view { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .user-btn .u-name { display: none; }
  .user-btn { padding: 4px; }
  .sell { grid-template-columns: 1fr; }
  .cart { position: fixed; inset: 0 0 calc(var(--nav-h) + env(safe-area-inset-bottom)) 0; z-index: 35; border-left: 0; transform: translateY(105%); transition: transform .22s ease; }
  .cart.open { transform: none; }
  .cart-fab { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 31; justify-content: space-between; align-items: center; padding: 0 18px; min-height: 54px; border-radius: 14px; border: 0; background: linear-gradient(180deg, var(--btn-a), var(--btn-b)); color: #141108; font-weight: 800; font-size: 16px; box-shadow: var(--shadow); }
  .catalog { padding-bottom: 90px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .hide-sm { display: none !important; }
  .tbl td, .tbl th { padding: 10px; }
  .modal-back { align-items: end; padding: 0; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
@media (min-width: 901px) { .show-sm { display: none !important; } }

.theme-btn svg { width: 18px; height: 18px; }
.menu .seg { margin: 4px 6px 8px; }
.menu .m-label { font-size: 12px; color: var(--muted); padding: 6px 12px 0; }
