/* MerchCash · tema oscuro para el puesto de merch (poca luz, una mano, cualquier tamaño de pantalla) */
:root {
  --bg: #0a0a0c;
  --card: #141418;
  --card-2: #1b1b21;
  --line: #2a2a32;
  --text: #f4f4f5;
  --muted: #8d8d98;
  --accent: #f43f8e;
  --accent-ink: #2a0516;
  --accent-soft: rgba(244, 63, 142, .1);
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --f-head: "Archivo Black", "Arial Black", Impact, "Roboto", system-ui, sans-serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font-family: var(--f-body); }
body { overflow: hidden; touch-action: manipulation; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
img { display: block; }

.h-caps, .tab, .btn, .sec-title, .seg button, .pm-btn b {
  font-family: var(--f-head);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.45; }
.red { color: #f87171; } .green { color: var(--green); } .warn { color: var(--amber); }
.tag { display: inline-block; font: 600 12px var(--f-mono); padding: 2px 7px; border-radius: 8px; background: #23232b; color: #d4d4dc; vertical-align: 2px; letter-spacing: 0; text-transform: none; }

/* ---------- estructura ---------- */
#app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(env(safe-area-inset-top), 8px) max(env(safe-area-inset-right), 12px) max(env(safe-area-inset-bottom), 8px) max(env(safe-area-inset-left), 12px);
  max-width: 1280px;
  margin: 0 auto;
  background: radial-gradient(120% 40% at 50% 0%, rgba(244, 63, 142, .07), transparent 60%), var(--bg);
}
.scr { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 14px; -webkit-overflow-scrolling: touch; }

/* ---------- cabecera ---------- */
.header { display: flex; align-items: center; gap: 10px; padding: 4px 0 10px; flex: none; }
.chip-concert { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; max-width: 34%; height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-align: left; flex: none; }
.chip-concert small { font: 500 11px var(--f-mono); letter-spacing: .08em; color: var(--accent); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chip-concert b { font-size: 16px; font-weight: 800; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-family: var(--f-head); font-size: 17px; letter-spacing: .14em; color: #c9c9d1; }
.logo { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); position: relative; box-shadow: 0 0 28px rgba(244, 63, 142, .28); flex: none; }
.logo::before { content: ""; position: absolute; left: 10px; right: 10px; top: 13px; bottom: 9px; background: #111114; clip-path: polygon(22% 0, 0 18%, 10% 42%, 22% 36%, 22% 100%, 78% 100%, 78% 36%, 90% 42%, 100% 18%, 78% 0, 64% 0, 50% 14%, 36% 0); }
.btn-menu { width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); font-size: 22px; display: grid; place-items: center; flex: none; }
.dot { position: absolute; top: 9px; right: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

.tabs { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.tab { border: 0; background: transparent; padding: 12px 2px; border-radius: 13px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 560px) {
  .header { flex-wrap: wrap; }
  .chip-concert { flex: 1; max-width: none; }
  .tabs { order: 3; flex-basis: 100%; }
}

.seg { flex: none; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin-bottom: 10px; }
.seg button { border: 0; background: transparent; padding: 11px 4px; border-radius: 12px; font-size: 12px; color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--card-2); color: #fff; box-shadow: inset 0 0 0 1px #3a3a45; }

/* ---------- botones y campos ---------- */
.btn { width: 100%; border: 0; border-radius: 16px; padding: 18px 16px; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.btn.slim { padding: 12px 14px; margin-top: 10px; font-size: 13px; }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 30px rgba(244, 63, 142, .22); }
.btn-line { background: var(--card); border: 1px solid var(--line); color: var(--text); }
.btn-danger { background: rgba(239, 68, 68, .1); border: 1px solid #7f1d1d; color: #fca5a5; }
.btn[disabled] { opacity: .45; }
.btn-icon { min-width: 46px; height: 46px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 18px; flex: none; }
.btn-icon.wide { padding: 0 14px; font-size: 13px; }
.btn-icon.danger { border-color: #7f1d1d; }
.link { border: 0; background: none; color: var(--accent); padding: 4px 0; font-size: 15px; font-weight: 600; }
.field { width: 100%; background: #1a1a20; border: 1px solid var(--line); border-radius: 14px; padding: 15px 14px; font-size: 17px; outline: none; }
textarea.field { resize: vertical; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.field:focus, .money:focus-within { border-color: var(--accent); }
.field::placeholder, .money input::placeholder { color: #66666f; }
.field.bad, .money input.bad { color: #fca5a5; }
.lbl { display: block; margin: 14px 2px 7px; font-size: 13px; color: #b4b4be; letter-spacing: .08em; text-transform: uppercase; }
.money { display: flex; align-items: stretch; background: #1a1a20; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.money span { display: grid; place-items: center; padding: 0 14px; border-right: 1px solid var(--line); color: var(--muted); font-family: var(--f-mono); font-size: 14px; }
.money input { flex: 1; border: 0; background: transparent; padding: 15px 14px; font-family: var(--f-mono); font-size: 18px; outline: none; min-width: 0; width: 100%; }
.money.sm input { padding: 12px 10px; font-size: 16px; }
.panel, .card { border: 1px solid var(--line); border-radius: 20px; background: var(--card); padding: 6px 16px 16px; margin-bottom: 12px; }
.panel .btn { margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); column-gap: 12px; }
.empty { border: 1px dashed #34343d; border-radius: 20px; padding: 34px 16px; text-align: center; color: var(--muted); font-size: 16px; line-height: 1.5; }
.empty.wide, .note-box.wide { grid-column: 1 / -1; }
.sec-title { font-size: 13px; color: #9a9aa5; margin: 12px 2px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 14px; font-size: 14px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.chip.big { padding: 13px 16px; font: 600 16px var(--f-mono); }
.chip.ghost { border-style: dashed; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.check-line { display: flex; gap: 10px; align-items: flex-start; margin: 16px 2px 0; font-size: 15px; color: #c9c9d1; line-height: 1.4; }
.check-line input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin-top: 1px; }
.mini-check { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); flex: none; }
.mini-check input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }
.two-btn, .btn-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }

/* ---------- selector de concierto ---------- */
.picker { padding-top: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow-y: auto; max-width: 760px; width: 100%; margin: 0 auto; }
.picker h1 { font-size: 20px; margin: 16px 2px 8px; color: #b9b9c3; }
.cont { display: block; width: 100%; text-align: left; border: 2px solid var(--accent); border-radius: 20px; background: #24141c; padding: 20px; font: 17px var(--f-head); letter-spacing: .05em; margin-bottom: 8px; }
.cont small { display: block; font: 13px var(--f-mono); color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.concert-list { display: flex; flex-direction: column; gap: 10px; }
.concert-row { display: flex; gap: 10px; }
.concert-row .pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; text-align: left; border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 12px 14px; }
.concert-row.on .pick { border-color: var(--accent); }
.concert-row .del { width: 60px; flex: none; border: 1px solid #4a1d22; border-radius: 18px; background: #1d1417; font-size: 20px; }
.datebox { width: 54px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 12px; background: #1f1a1d; }
.datebox small { font: 600 11px var(--f-mono); text-transform: uppercase; color: var(--accent); }
.datebox b { font: 22px var(--f-head); line-height: 1.1; }
.concert-row .mid { flex: 1; min-width: 0; }
.concert-row .mid b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.concert-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.concert-row .right { text-align: right; flex: none; }
.concert-row .right b { font: 700 16px var(--f-mono); }
.ver { text-align: center; color: #5d5d68; font: 12px var(--f-mono); margin: 18px 0 6px; }

/* ---------- vender ---------- */
.sell { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sell-main { min-height: 0; display: flex; flex-direction: column; }
.filters { flex: none; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; }
@media (max-width: 380px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.pcard { position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--card); overflow: hidden; transition: transform .08s, border-color .15s; }
.pcard:active { transform: scale(.97); border-color: var(--accent); }
.pimg { display: block; aspect-ratio: 1; width: 100%; background: #101014; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.noimg { display: grid; place-items: center; }
.noimg svg { width: 52%; height: auto; opacity: .9; }
.pimg.k-textile, .thumb.k-textile { background: #22131a; } .pimg.k-music, .thumb.k-music { background: #19162a; } .pimg.k-other, .thumb.k-other { background: #12201a; }
.pname { padding: 10px 12px 2px; font-weight: 800; font-size: 16px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pmeta { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 4px 12px 12px; margin-top: auto; }
.price { font: 700 15px var(--f-mono); color: #fff; }
.stk { font: 12px var(--f-mono); color: var(--green); white-space: nowrap; }
.stk.low { color: var(--amber); } .stk.out { color: #f87171; }
.incart { position: absolute; top: 8px; right: 8px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; background: var(--accent); color: var(--accent-ink); font: 800 15px var(--f-mono); display: grid; place-items: center; font-style: normal; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }

.cart-side { display: none; }
.cartbar { flex: none; display: flex; align-items: center; gap: 10px; padding-top: 10px; min-height: 60px; }
.cartbar-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 14px; border: 1px solid var(--accent); border-radius: 16px; background: #24141c; }
.cb-n { min-width: 30px; height: 30px; border-radius: 15px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 800 15px var(--f-mono); }
.cb-t { flex: 1; text-align: left; color: #d6d6de; }
.cartbar-btn b { font: 700 18px var(--f-mono); }
.cb-pay { width: auto; padding: 0 22px; height: 58px; }

@media (min-width: 900px) {
  .sell { grid-template-columns: minmax(0, 1fr) 360px; }
  .cart-side { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--card); padding: 14px; }
  .cart-side .cart-lines { flex: 1; min-height: 0; overflow-y: auto; }
  .cart-side .foot { margin-top: 8px; }
  .cartbar { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
.cart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; color: #b9b9c3; }
.cart-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 30px 10px; }
.cline { padding: 10px 0; border-bottom: 1px solid #22222a; }
.cl-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16px; }
.cl-ctl { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cl-price { border: 1px dashed #3a3a45; background: none; border-radius: 10px; padding: 7px 9px; font: 14px var(--f-mono); color: var(--muted); }
.cl-price.changed { color: var(--amber); border-color: #5a3d06; }
.cl-total { margin-left: auto; font: 700 16px var(--f-mono); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 2px; font-size: 17px; }
.cart-total b { font: 700 26px var(--f-mono); }

.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: #1a1a20; overflow: hidden; flex: none; }
.stepper button { width: 50px; height: 50px; border: 0; background: transparent; font-size: 24px; color: #d6d6de; }
.stepper button:active { background: var(--accent-soft); color: var(--accent); }
.stepper input { width: 64px; height: 50px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: transparent; text-align: center; font: 700 20px var(--f-mono); outline: none; }
.stepper input:focus { background: var(--accent-soft); }
.stepper.sm button { width: 40px; height: 40px; font-size: 20px; }
.stepper.sm b { min-width: 34px; text-align: center; font: 700 16px var(--f-mono); }

/* variantes (tallas/formatos) al vender */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; padding-bottom: 6px; }
.vbtn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 8px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.vbtn:active { border-color: var(--accent); transform: scale(.97); }
.vbtn b { font: 24px var(--f-head); }
.vbtn span { font: 15px var(--f-mono); color: #d6d6de; }
.vbtn small { font: 12px var(--f-mono); color: var(--green); }
.vbtn .incart { top: 6px; right: 6px; min-width: 26px; height: 26px; font-size: 13px; }

/* cobrar */
.due { text-align: center; font: 700 clamp(40px, 9dvh, 60px) var(--f-mono); margin: 4px 0 16px; }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.pm-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); font-size: 30px; }
.pm-btn b { font-size: 14px; }
.pm-btn.k-cash { border-color: #14532d; } .pm-btn.k-card { border-color: #1e3a8a; }
.pm-btn:active { transform: scale(.97); border-color: var(--accent); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.change { display: flex; justify-content: space-between; align-items: baseline; min-height: 56px; padding: 14px 4px; font-size: 18px; }
.change b { font: 700 32px var(--f-mono); color: var(--green); }

/* ---------- stock ---------- */
.stock-tools { margin-bottom: 4px; }
.stock-tools .note-box .btn { margin-top: 10px; }
.photos-row { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 6px; }
.pthumb { position: relative; width: 72px; height: 72px; flex: none; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }
.pthumb i { position: absolute; right: 3px; bottom: 2px; font-style: normal; font-size: 13px; }
.pthumb.add { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 24px; border-style: dashed; color: var(--muted); }
.pthumb.add small { font-size: 11px; margin-top: 2px; }
.sblock { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 10px 12px; margin-bottom: 10px; }
.sblock.inactive { opacity: .65; }
.sblock-head { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; font-size: 16px; }
.thumb { width: 44px; height: 44px; flex: none; border-radius: 12px; overflow: hidden; background: #101014; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.noimg svg { width: 70%; }
.thumb.lg { width: 60px; height: 60px; }
.srow { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #1f1f26; flex-wrap: wrap; }
.slabel { flex: 1; min-width: 70px; font: 20px var(--f-head); }
.exp { font: 13px var(--f-mono); color: var(--muted); }
.exp b { color: #d6d6de; }
.diff { display: inline-block; min-width: 38px; text-align: center; font: 700 14px var(--f-mono); padding: 3px 8px; border-radius: 9px; }
.diff.ok { background: rgba(34, 197, 94, .12); color: var(--green); }
.diff.plus { background: rgba(245, 158, 11, .12); color: var(--amber); }
.diff.minus { background: rgba(239, 68, 68, .14); color: #f87171; }
.radio-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio span { display: block; text-align: center; padding: 13px 6px; border: 1px solid var(--line); border-radius: 14px; background: #1a1a20; font-size: 14px; }
.radio input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: #fff; font-weight: 700; }
.radio input:focus-visible + span { outline: 2px solid var(--accent); }

/* ---------- listas ---------- */
.row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--card-2); }
.row .mid { flex: 1; min-width: 0; }
.row .mid b { display: block; font-size: 15px; line-height: 1.3; }
.row .mid small { display: block; font: 13px var(--f-mono); color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.row .amt, .row .qty { font: 700 17px var(--f-mono); white-space: nowrap; }
.row .chev { color: var(--muted); font-size: 24px; }
.mico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: #1f1f26; }
.mico.t-restock { color: var(--green); } .mico.t-damage { color: #f87171; }
.card .row { background: #18181d; }

/* ---------- cierre ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 14px; }
.kpi small { display: block; font: 12px var(--f-head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi b { display: block; margin-top: 8px; font: 700 22px var(--f-mono); }
.kpi.accent { border-color: var(--accent); background: linear-gradient(135deg, rgba(244, 63, 142, .14), rgba(244, 63, 142, .02)); }
.kpi.accent b { color: #ffd1e6; font-size: 26px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.cols .card { margin-bottom: 0; }
.cols + .card { margin-top: 12px; }
.barrow { padding: 8px 0; }
.br-top { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.br-top small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.br-top b { font-family: var(--f-mono); }
.bar { height: 6px; border-radius: 4px; background: #23232b; margin-top: 7px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font: 12px var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 4px; }
.tbl td { padding: 9px 4px; border-top: 1px solid #22222a; }
.tbl .n { text-align: right; font-family: var(--f-mono); white-space: nowrap; }

.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid #1f1f26; font-size: 15px; }
.kv > span:first-child { color: var(--muted); }
.kv small { color: var(--muted); font-size: 12px; }
.kv b { font-family: var(--f-mono); }
.kv.big { font-size: 17px; border-bottom: 0; }
.kv.big b { font-size: 22px; }
.kv code { font-family: var(--f-mono); }

/* ---------- hojas (modales desde abajo; centradas en pantallas grandes) ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .66); display: flex; align-items: flex-end; justify-content: center; animation: fade .12s ease-out; }
.sheet { width: 100%; max-width: 720px; max-height: 94dvh; display: flex; flex-direction: column; background: #101014; border: 1px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0; padding: 14px 16px max(env(safe-area-inset-bottom), 16px); animation: up .16s ease-out; overflow-y: auto; overscroll-behavior: contain; }
.sheet.small { max-width: 520px; }
@media (min-width: 760px) and (min-height: 600px) {
  .sheet-bg { align-items: center; padding: 24px; }
  .sheet { border-radius: 26px; border-bottom: 1px solid var(--line); max-height: 88dvh; }
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex: none; }
.sheet-head h2 { margin: 0; font-size: 19px; flex: 1; min-width: 0; }
.sheet-head h2 small { display: block; font: 12px var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-top: 2px; }
.x { width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 20px; flex: none; }
.confirm-text { font-size: 18px; line-height: 1.45; margin: 8px 4px 6px; }
.photo-sheet { max-width: 960px; }
.photo-big { width: 100%; height: auto; max-height: 75dvh; object-fit: contain; border-radius: 14px; background: #000; }

/* editor de producto */
.ed-top { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 440px) { .ed-top { grid-template-columns: 1fr; } .ed-img { max-width: 180px; } }
.ed-img { position: relative; aspect-ratio: 1; width: 100%; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--card); margin-top: 14px; }
.ed-img img { width: 100%; height: 100%; object-fit: cover; }
.ed-img-btns { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; gap: 6px; justify-content: center; }
.ed-img-btns .chip { padding: 6px 10px; font-size: 12px; background: rgba(10, 10, 12, .8); }
.empty-img { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 34px; border-style: dashed; color: var(--muted); }
.empty-img small { font-size: 13px; margin-top: 4px; }
.vlist { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.vrow { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto auto; gap: 8px; align-items: center; }
.vrow .field { padding: 12px; font-size: 16px; }
.vrow.off .field, .vrow.off .money { opacity: .5; }
.add-var { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.add-var .btn { width: auto; margin: 0; flex: none; }
.add-var .field { padding: 12px; font-size: 16px; }
.pmrow { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.pmrow .field { padding: 12px; font-size: 16px; }
.cat-list { margin-top: 12px; }

.menu-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); font-size: 17px; }
.menu-item .mi { flex: none; width: 30px; text-align: center; font-style: normal; font-size: 22px; }
.menu-item small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.note-box { margin: 10px 0; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; background: var(--accent-soft); border: 1px solid #6b1d42; color: #ffc2dd; }
.note-box.bad { background: rgba(239, 68, 68, .08); border-color: #7f1d1d; color: #fca5a5; }
.note-box.good { background: rgba(34, 197, 94, .08); border-color: #14532d; color: #86efac; }
.fails { margin: 6px 0 0; padding-left: 18px; }
.banner { flex: none; margin: 0 0 8px; padding: 10px 14px; border-radius: 14px; font-size: 14px; background: var(--accent-soft); border: 1px solid #6b1d42; color: #ffc2dd; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.banner button { border: 1px solid currentColor; background: transparent; border-radius: 10px; padding: 6px 12px; color: inherit; }

.foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sync { display: flex; align-items: center; gap: 8px; font: 500 13px var(--f-mono); color: var(--green); background: none; border: 0; padding: 6px 2px; letter-spacing: 0; text-transform: none; }
.sync i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; display: inline-block; }
.sync.pend { color: var(--amber); } .sync.off { color: var(--muted); } .sync.err { color: var(--red); }
.sync.busy i { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.toast { position: fixed; left: 50%; bottom: calc(max(env(safe-area-inset-bottom), 10px) + 76px); transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 14px; background: #26262e; border: 1px solid #3a3a45; color: #fff; padding: 12px 16px 12px 20px; border-radius: 16px; font-size: 16px; max-width: min(92vw, 520px); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: up .15s ease-out; }
.toast.ok { border-color: #14532d; } .toast.bad { border-color: #7f1d1d; }
.toast button { flex: none; border: 1px solid var(--accent); background: transparent; color: var(--accent); border-radius: 10px; padding: 8px 12px; font-weight: 700; }

/* ---------- usuarios ---------- */
.user-row { padding: 12px 2px; border-bottom: 1px solid #1d1d23; }
.user-row.off b { color: var(--muted); text-decoration: line-through; }
.user-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.user-row .user-tags { display: inline; color: var(--accent); }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.user-btn { width: auto; height: 40px; padding: 0 14px; font-size: 13px; }
.user-btn.danger { color: #fca5a5; border-color: #7f1d1d; }
.pw-show { font: 600 17px var(--f-mono); color: #fff; user-select: all; overflow-wrap: anywhere; }

/* ---------- login ---------- */
.login-page { overflow: auto; display: grid; place-items: center; min-height: 100dvh; padding: 20px; background: radial-gradient(120% 40% at 50% 0%, rgba(244, 63, 142, .08), transparent 60%), var(--bg); }
.login { width: 100%; max-width: 380px; }
.brand-lg { margin: 0 0 18px; } .brand-lg .logo { width: 56px; height: 56px; } .brand-lg .brand-name { font-size: 26px; color: #fff; }
.login h1 { font-size: 20px; margin: 10px 0 6px; color: #b9b9c3; }
.login .btn { margin-top: 22px; }
.login-err { background: rgba(239, 68, 68, .1); border: 1px solid #7f1d1d; color: #fca5a5; border-radius: 12px; padding: 12px 14px; margin: 10px 0; }

/* móvil en horizontal: menos altura para cabeceras */
@media (orientation: landscape) and (max-height: 520px) {
  .header { padding: 0 0 6px; flex-wrap: nowrap; }
  .tabs { order: 0; flex-basis: auto; }
  .chip-concert, .btn-menu { height: 44px; }
  .tab { padding: 8px 2px; }
  .seg button { padding: 8px 4px; }
  .cartbar { min-height: 50px; padding-top: 6px; }
  .cartbar-btn, .cb-pay { height: 48px; }
  .sheet { max-height: 100dvh; }
}

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