:root {
  --bg: #F4F3EF;
  --surface: #FFFFFF;
  --surface-2: #F9F8F5;
  --ink: #111111;
  --ink-2: #4A4A46;
  --ink-3: #85847E;
  --line: #E2E0D9;
  --line-2: #EEEDE8;
  --ok: #1D7A4B;
  --ok-bg: #E4F2EA;
  --warn: #9A5A00;
  --warn-bg: #FFF2DC;
  --bad: #BE3328;
  --bad-bg: #FBE9E7;
  --radius: 14px;
  --top-h: 56px;
  --tab-h: 60px;
  --cart-bar-h: 78px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { font-size: 15px; line-height: 1.35; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
input, select, textarea { font: inherit; font-size: 16px; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
.muted { color: var(--ink-3); }
.hint { color: var(--ink-3); font-size: 13px; margin: 0 0 12px; }
.sub { display: block; font-size: 11px; color: var(--ink-3); font-weight: 400; }
.neg { color: var(--bad); font-weight: 700; }
.zero { color: #C4C2BB; }
.grow { flex: 1; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
#app { position: fixed; inset: 0; display: grid; grid-template-rows: calc(var(--top-h) + var(--safe-t)) minmax(0, 1fr) calc(var(--tab-h) + var(--safe-b)); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: var(--safe-t) 14px 0; background: var(--ink); color: #fff; min-width: 0; }
.top-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-title { font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; }
.fair-chip { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; color: #fff; text-align: left; }
.fair-chip b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.fair-chip small { font-size: 12px; color: rgba(255,255,255,.65); white-space: nowrap; }
.top-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; background: rgba(255,255,255,.12); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
@media (max-width: 430px) { .top { gap: 6px; padding-left: 10px; padding-right: 10px; } .top-left { gap: 6px; } .fair-chip b { max-width: 34vw; font-size: 15px; } .top-btn { padding: 0 10px; } }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 17px; background: rgba(255,255,255,.12); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 4px; background: #3DDC84; flex: none; }
.dot.warn { background: #FFB020; }
.dot.busy { background: #8AB4FF; }
@media (max-width: 430px) { .pill.ok { padding: 0 12px; } .pill.ok .pill-txt { display: none; } }
#view { min-height: 0; position: relative; }
.tabs { display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.tab svg { width: 22px; height: 22px; }
.tab.on { color: var(--ink); }

/* ---------- Botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; white-space: nowrap; }
.btn:active { background: var(--surface-2); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:active { background: #333; }
.btn-danger { color: var(--bad); border-color: #EFC9C4; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.link { color: var(--ink-2); text-decoration: underline; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > label, .lbl { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.input, .field input, .field select, .field textarea { height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; width: 100%; }
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 4px 0 12px; }
.check input { width: 22px; height: 22px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { height: 36px; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

/* ---------- TPV ---------- */
.tpv { display: grid; grid-template-columns: minmax(0, 1fr) 330px; height: 100%; }
.tpv-grid { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 7px; align-content: start; }
.grp-label { grid-column: 1 / -1; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 7px 2px -3px; }
.grp-label:first-child { margin-top: 0; }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; min-height: 76px; padding: 8px 9px; border-radius: 11px; background: var(--c); transition: transform .06s ease; user-select: none; -webkit-user-select: none; }
.tile.row-start { grid-column-start: 1; }
.tile:active { transform: scale(.96); }
.tile.is-box { background: var(--cd); }
.tile.flash { animation: flash .25s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(17,17,17,.55); } 100% { box-shadow: 0 0 0 8px rgba(17,17,17,0); } }
.t-name { font-weight: 800; font-size: 12.5px; letter-spacing: .02em; line-height: 1.15; text-transform: uppercase; }
.t-fmt { font-size: 10.5px; color: var(--ink-2); margin-top: 2px; font-weight: 500; }
.is-box .t-fmt { font-weight: 800; color: var(--ink); letter-spacing: .04em; text-transform: uppercase; }
.t-foot { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 4px; width: 100%; }
.t-price { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.t-stock { font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-stock.out { color: var(--bad); font-weight: 800; }
.tile.no-price .t-price { font-size: 12px; color: var(--bad); }
.t-badge { position: absolute; top: -6px; right: -6px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--ink); color: #fff; font-weight: 800; font-size: 15px; display: none; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.t-badge.on { display: flex; }

.cart { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
.cart-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-weight: 800; }
.cart-lines { flex: 1; overflow-y: auto; }
.cart-empty { padding: 36px 20px; color: var(--ink-3); text-align: center; }
.cl { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.cl-name { font-weight: 700; font-size: 14px; text-transform: uppercase; }
.cl-name small { display: block; text-transform: none; color: var(--ink-3); font-weight: 500; font-size: 12px; }
.cl-amt { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.cl-qty { display: flex; align-items: center; gap: 4px; grid-column: 1 / -1; }
.cl-qty button { width: 40px; height: 36px; border-radius: 10px; background: var(--line-2); font-size: 20px; font-weight: 700; }
.cl-qty span { min-width: 34px; text-align: center; font-weight: 800; font-size: 16px; }
.cl-qty .cl-del { margin-left: auto; width: auto; padding: 0 10px; font-size: 13px; color: var(--ink-3); background: none; }
.cart-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.cart-sum { display: none; flex-direction: column; align-items: flex-start; height: 56px; justify-content: center; padding: 0 4px; min-width: 76px; }
.cart-sum b { font-size: 15px; }
.cart-sum small { font-size: 12px; color: var(--ink-3); }
.btn-pay { flex: 1; height: 60px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 19px; font-weight: 800; }
.btn-pay:disabled { background: #D3D1CA; }
.btn-pay:not(:disabled):active { background: #333; }

@media (max-width: 899px) {
  .tpv { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) var(--cart-bar-h); }
  .tpv-grid { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 6px; padding: 10px; }
  .tile { min-height: 72px; padding: 7px 8px; }
  .t-name { font-size: 12px; }
  .t-price { font-size: 14.5px; }
  .cart { border-left: 0; border-top: 1px solid var(--line); }
  .cart-panel { display: none; }
  .cart.expanded .cart-panel { display: flex; position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b) + var(--cart-bar-h)); max-height: 62vh; background: var(--surface); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 30px rgba(0,0,0,.16); z-index: 20; }
  .cart-foot { height: var(--cart-bar-h); padding: 10px 12px; border-top: 0; }
  .cart-sum { display: flex; }
}

/* ---------- Páginas ---------- */
.page { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 16px 32px; }
.page-inner { max-width: 1100px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.card.flush { padding: 0; overflow: hidden; }
.card h3 { margin-bottom: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); text-align: right; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); text-align: right; font-variant-numeric: tabular-nums; vertical-align: top; }
.tbl th:first-child, .tbl td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .pname { font-weight: 700; text-transform: uppercase; font-size: 13px; white-space: nowrap; }
.tbl .strong { font-weight: 800; }
.tbl .grp-row td { background: var(--surface-2); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 7px 10px; }
.tbl tfoot td { font-weight: 800; border-top: 1px solid var(--line); }
.badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.abierta { background: var(--ok-bg); color: var(--ok); }
.badge.planificada { background: var(--warn-bg); color: var(--warn); }
.badge.cerrada { background: var(--line-2); color: var(--ink-3); }
.badge.out { background: var(--bad-bg); color: var(--bad); }

.fair-card .fc-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.fair-card .fc-head .muted { font-size: 13px; margin-top: 2px; }
.fc-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 12px 0; }
.fc-stats div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.fc-stats span { display: block; font-size: 12px; color: var(--ink-3); }
.fc-stats b { font-size: 17px; font-variant-numeric: tabular-nums; }
.fc-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.kpi-l { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.kpi-v { font-size: 24px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kpi-s { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

.meter { display: inline-block; vertical-align: middle; width: 64px; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-left: 8px; }
.meter > i { display: block; height: 100%; border-radius: 3px; background: var(--ink-2); }

.hours-day { margin-bottom: 14px; }
.hours-day .lbl { display: block; margin-bottom: 6px; }
.hours { display: flex; align-items: flex-end; gap: 2px; height: 130px; border-bottom: 1px solid var(--line); position: relative; }
.hbar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.hbar i { display: block; width: 100%; max-width: 34px; background: #2F2F2C; border-radius: 4px 4px 0 0; min-height: 0; }
.hbar.sel i { background: var(--ink); outline: 2px solid var(--surface); }
.hbar em { position: absolute; font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.hlabels { display: flex; gap: 2px; margin-top: 4px; }
.hlabels span { flex: 1; text-align: center; font-size: 10px; color: var(--ink-3); }
.chart-caption { min-height: 20px; font-size: 13px; color: var(--ink-2); margin-top: 4px; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); width: 100%; text-align: left; }
.list-row:last-child { border-bottom: 0; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-main b { display: block; }
.list-row .lr-main small { display: block; color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .lr-amt { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.list-row.void { opacity: .45; }
.list-row.void .lr-amt { text-decoration: line-through; }

/* tabla de cantidades (entradas, traspasos, recuentos) */
.qt-g { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 12px 0 4px; }
.qt-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 84px 64px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.qt-name { font-weight: 700; font-size: 13px; text-transform: uppercase; }
.qt-name .sub { text-transform: none; font-size: 12px; }
.qt-in { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.qt-in input { width: 100%; height: 42px; text-align: center; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; background: #fff; }
.qt-in span { font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.qt-sum { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; }
.qt-sum.diff-neg { color: var(--bad); }
.qt-sum.diff-pos { color: var(--ok); }
@media (max-width: 520px) { .qt-row { grid-template-columns: minmax(0, 1fr) 66px 66px 50px; gap: 6px; } }

.fmt-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 90px 70px 34px 34px; gap: 6px; align-items: center; margin-bottom: 8px; }
.fmt-row input[type=text], .fmt-row input[type=number], .fmt-row select { height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; width: 100%; background: #fff; }
.fmt-row input[type=checkbox] { width: 22px; height: 22px; justify-self: center; }
.fmt-head { display: grid; grid-template-columns: minmax(0, 1.4fr) 90px 70px 34px 34px; gap: 6px; font-size: 11px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; color: var(--ink-3); font-size: 16px; }
.icon-btn:active { background: var(--line-2); }

/* ---------- Modal ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(17,17,17,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fade .12s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { background: var(--surface); width: 100%; max-width: 620px; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; padding-bottom: var(--safe-b); animation: up .16s ease; }
.sheet.wide { max-width: 760px; }
@keyframes up { from { transform: translateY(24px); } to { transform: none; } }
@media (min-width: 700px) {
  .backdrop { align-items: center; padding: 24px; }
  .sheet { border-radius: 20px; padding-bottom: 0; max-height: 88vh; max-height: 88dvh; }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.sheet-head .x { width: 36px; height: 36px; border-radius: 18px; background: var(--line-2); font-size: 15px; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 18px; flex: 1; min-height: 0; }
.sheet-foot { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; align-items: center; }
.sheet-foot .foot-info { font-size: 13px; color: var(--ink-2); font-weight: 600; }

/* cobro */
.pay-total { text-align: center; font-size: 44px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.pay-items { text-align: center; color: var(--ink-3); font-size: 14px; margin-bottom: 16px; }
.pay-main { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pm { height: 104px; border-radius: 18px; font-size: 24px; font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.pm small { font-size: 13px; font-weight: 600; opacity: .7; }
.pm-cash { background: var(--ok-bg); color: var(--ok); border: 2px solid #BFE0CC; }
.pm-card { background: var(--ink); color: #fff; }
.pm:active { transform: scale(.98); }
.pay-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.pay-alt .btn { height: 52px; }
.change { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.change-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.change-row button { height: 40px; min-width: 56px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; }
.change-row button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.change-out { margin-top: 8px; font-size: 18px; font-weight: 800; min-height: 24px; }
.mixed-out { display: flex; justify-content: space-between; padding: 12px 0; font-size: 17px; font-weight: 700; }
.big-input { height: 60px !important; font-size: 26px !important; font-weight: 800; text-align: center; }
pre.receipt { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; font: 13px/1.45 ui-monospace, Menlo, monospace; margin: 0 0 12px; }

/* ---------- Toast y banner ---------- */
#toast-root { position: fixed; top: calc(var(--safe-t) + 7px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 70; pointer-events: none; }
.toast { pointer-events: auto; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 10px; max-width: calc(100% - 24px); background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 12px 10px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 700; animation: up .16s ease; }
.toast .t-actions { display: flex; gap: 6px; }
.toast button { color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; height: 36px; padding: 0 12px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--bad); }
.banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 12px); z-index: 65; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 10px 10px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 600; width: max-content; max-width: calc(100% - 24px); }
.banner button { background: #fff; color: var(--ink); border-radius: 10px; height: 36px; padding: 0 12px; font-weight: 800; }

/* ---------- Login y selector ---------- */
.login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; padding: 24px; }
.login-box { width: 100%; max-width: 360px; text-align: center; }
.logo { width: 72px; height: 72px; border-radius: 18px; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800; margin: 0 auto 18px; }
.logo-img { display: block; width: 110px; height: auto; margin: 0 auto 22px; }
.login-box h1 { letter-spacing: .14em; text-transform: uppercase; font-size: 20px; margin-bottom: 8px; }
.login-box p { color: rgba(255,255,255,.7); margin: 0 0 18px; }
.login-box input { width: 100%; height: 52px; border-radius: 12px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; padding: 0 14px; text-align: center; margin-bottom: 12px; }
.login-box .btn-primary { background: #fff; color: var(--ink); border-color: #fff; height: 52px; }
.login-box .err { color: #FF8A80; min-height: 20px; margin-top: 12px; }
.pick { max-width: 560px; margin: 0 auto; padding: 28px 16px; }
.pick h2 { margin-bottom: 6px; }
.pick-list { display: grid; gap: 10px; margin-top: 14px; }
.pick-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-align: left; width: 100%; }
.pick-item b { display: block; font-size: 16px; }
.pick-item small { color: var(--ink-3); }
.empty { text-align: center; color: var(--ink-3); padding: 40px 16px; }
.empty h2 { color: var(--ink); margin-bottom: 8px; }
.settings-list .list-row { cursor: pointer; }
.price-list { font-size: 12px; color: var(--ink-3); }
.warn-box { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }

/* caja */
.ses-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.ses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.ses-grid > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.ses-grid span { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.ses-grid b { font-size: 20px; font-variant-numeric: tabular-nums; }
.ses-grid small { display: block; font-size: 12px; color: var(--ink-2); }
.ses-grid .hl { background: var(--ink); color: #fff; }
.ses-grid .hl span { color: rgba(255,255,255,.7); }
.diff { font-weight: 800; white-space: nowrap; }
.diff.ok { color: var(--ok); }
.diff.bad { color: var(--bad); }
.diff.warn { color: var(--warn); }
.close-out { display: grid; gap: 8px; margin: 4px 0 12px; font-size: 16px; }
.close-out > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; }
.seg.full { display: flex; width: 100%; }
.seg.full button { flex: 1; padding: 0 6px; }
.seg button:disabled { opacity: .4; }
.list-sum { font-size: 13px; color: var(--ink-2); margin: 12px 0 2px; font-weight: 700; }
.badge.test { background: #ECE6F7; color: #5B3FA0; }
