/* Terrazo 2.0 — café, crema y terracota · estilo parrilla de autor con guardas andinas */
@font-face { font-family: 'Poppins'; src: url('assets/fonts/Poppins-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('assets/fonts/Poppins-Medium.ttf'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('assets/fonts/Poppins-SemiBold.ttf'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('assets/fonts/Poppins-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('assets/fonts/Poppins-ExtraBold.ttf'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Adineue'; src: url('assets/fonts/adineue.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Adineue'; src: url('assets/fonts/adineue-bold.ttf'); font-weight: 700; font-display: swap; }

:root {
  --cafe: #6b3415; --cafe-2: #5a2b10; --cafe-3: #3f1e0a; --cafe-4: #2b1407;
  --crema: #e5d7bd; --crema-2: #d9c7a6; --papel: #f4ead9; --papel-2: #ebdec8; --hoja: #fffaf1;
  --terracota: #b36a35; --terracota-2: #9c5726; --rojo: #862a15;
  --verde: #4f7a3a; --verde-bg: #e2ecd6; --ambar: #c48a18; --ambar-bg: #f5e6c2; --rojo-bg: #f3d8cd; --azul: #3f6680; --azul-bg: #dbe6ec;
  --texto: #34200f; --texto-2: #7b5e47; --linea: #dccaab; --linea-2: #e8dcc6;
  --r: 16px; --r-sm: 11px;
  --sombra: 0 10px 30px -12px rgba(43, 20, 7, .35); --sombra-2: 0 2px 0 rgba(107, 52, 21, .06), 0 4px 14px -6px rgba(43, 20, 7, .18);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: 'Poppins', system-ui, sans-serif;
  --zz-crema: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='10' viewBox='0 0 24 10'%3E%3Cpath d='M0 8 L6 2 L12 8 L18 2 L24 8' fill='none' stroke='%23e5d7bd' stroke-width='1.5'/%3E%3C/svg%3E");
  --zz-terra: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='10' viewBox='0 0 24 10'%3E%3Cpath d='M0 8 L6 2 L12 8 L18 2 L24 8' fill='none' stroke='%23b36a35' stroke-width='1.5'/%3E%3C/svg%3E");
  --rombos: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cg fill='none' stroke='%23e5d7bd' stroke-opacity='.07' stroke-width='1.4'%3E%3Cpath d='M22 4 L40 22 L22 40 L4 22Z'/%3E%3Cpath d='M22 13 L31 22 L22 31 L13 22Z'/%3E%3C/g%3E%3C/svg%3E");
  --papel-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .2 0 0 0 0 .08 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --rail: 92px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
#root { min-height: 100%; }
body { font-family: var(--sans); color: var(--texto); background: var(--papel); font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--rojo); }
.hidden { display: none !important; }
h1, h2, h3 { margin: 0; font-family: var(--serif); color: var(--cafe); font-weight: 700; }
h1 { font-size: 1.75rem; letter-spacing: .01em; } h2 { font-size: 1.28rem; } h3 { font-size: 1.06rem; }
.kicker { font-family: 'Adineue', var(--sans); text-transform: uppercase; letter-spacing: .18em; font-size: .68rem; color: var(--terracota); font-weight: 700; }
.muted { color: var(--texto-2); } .small { font-size: .82rem; } .right { text-align: right; } .center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; }
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.ic svg { width: 100%; height: 100%; display: block; }
.guarda { height: 10px; background: var(--zz-terra) repeat-x center; opacity: .55; margin: 14px 0; }

/* =================== LOGIN =================== */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--papel); }
.login-brand { background: var(--cafe-3) var(--rombos); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; color: var(--crema); overflow: hidden; }
.login-brand::before, .login-brand::after { content: ''; position: absolute; left: 0; right: 0; height: 10px; background: var(--zz-crema) repeat-x; opacity: .35; }
.login-brand::before { top: 22px; } .login-brand::after { bottom: 22px; }
.login-brand img { width: min(460px, 82%); }
.login-brand .quote { margin-top: 26px; font-family: var(--serif); font-style: italic; font-size: 1.1rem; opacity: .8; text-align: center; }
.login-brand .clock { position: absolute; top: 46px; left: 0; right: 0; text-align: center; font-family: 'Adineue', var(--sans); letter-spacing: .25em; font-size: .78rem; opacity: .6; text-transform: uppercase; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.login-box { width: min(400px, 100%); }
.login-box h1 { font-size: 2rem; }
.user-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; max-height: 210px; overflow: auto; }
.user-pick button { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--linea); background: var(--hoja); border-radius: 999px; padding: 6px 14px 6px 6px; cursor: pointer; text-align: left; transition: .12s; }
.user-pick button .avatar { width: 30px; height: 30px; font-size: .85rem; }
.user-pick button.sel { border-color: var(--cafe); background: var(--cafe); color: var(--crema); }
.user-pick button.sel .avatar { background: var(--crema); color: var(--cafe); }
.user-pick b { display: block; font-size: .88rem; line-height: 1.1; } .user-pick span { font-size: .68rem; opacity: .7; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0; }
.pin-dots i { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--terracota); transition: .1s; }
.pin-dots i.on { background: var(--terracota); transform: scale(1.1); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { height: 62px; border-radius: 18px; border: 0; background: var(--hoja); box-shadow: var(--sombra-2); font-size: 1.45rem; font-weight: 600; cursor: pointer; color: var(--cafe); transition: .08s; }
.keypad button:active { transform: scale(.96); background: var(--crema); }
.keypad button[data-k='✓'] { background: var(--cafe); color: var(--crema); }
.keypad .ic { width: 28px; height: 28px; }

/* =================== ESTRUCTURA =================== */
.app { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
.rail { background: var(--cafe-3) var(--rombos); color: var(--crema); display: flex; flex-direction: column; align-items: stretch; position: sticky; top: 0; height: 100vh; z-index: 10; }
.rail-logo { padding: 12px 8px 8px; display: flex; justify-content: center; border-bottom: 1px solid rgba(229,215,189,.12); }
.rail-logo img { width: 70px; }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 8px; scrollbar-width: none; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; color: rgba(229,215,189,.72); text-decoration: none; border-radius: 14px; font-size: .64rem; font-weight: 500; text-align: center; line-height: 1.15; margin-bottom: 2px; position: relative; transition: .12s; }
.nav a .ic { width: 22px; height: 22px; }
.nav a:hover { color: var(--crema); background: rgba(229,215,189,.07); }
.nav a.on { color: var(--cafe-3); background: var(--crema); font-weight: 700; }
.nav a.on::before { content: ''; position: absolute; left: -8px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--terracota); }
.rail-foot { padding: 8px 8px 10px; border-top: 1px solid rgba(229,215,189,.12); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rail-foot .avatar { width: 30px; height: 30px; font-size: .9rem; }
.rail-foot button { background: transparent; border: 0; color: rgba(229,215,189,.7); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .62rem; }
.rail-foot button:hover { color: var(--crema); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--terracota); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; font-family: var(--serif); font-size: 1.05rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 26px 12px; position: sticky; top: 0; z-index: 6; background: var(--papel); }
.topbar::after { content: ''; position: absolute; left: 26px; right: 26px; bottom: 0; height: 10px; background: var(--zz-terra) repeat-x; opacity: .35; }
.topbar .ttl { min-width: 0; }
.topbar .ttl .kicker { display: block; margin-bottom: 1px; }
.topbar h1 { font-size: 1.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sp { flex: 1; }
.top-meta { display: flex; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--hoja); border: 1px solid var(--linea); font-size: .8rem; font-weight: 600; color: var(--cafe); white-space: nowrap; text-decoration: none; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 3px rgba(79,122,58,.18); }
.pill.off .dot { background: var(--rojo); box-shadow: 0 0 0 3px rgba(134,42,21,.15); }
.pill.clock { font-variant-numeric: tabular-nums; }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.content { padding: 22px 26px 90px; flex: 1; }
.bottom-nav { display: none; }

/* =================== COMPONENTES =================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--linea); background: var(--hoja); color: var(--cafe);
  padding: 9px 16px; border-radius: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; line-height: 1.2; transition: .1s; font-size: .92rem; }
.btn .ic { width: 18px; height: 18px; }
.btn:hover { border-color: var(--terracota); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.pri { background: var(--cafe); border-color: var(--cafe); color: var(--crema); }
.btn.pri:hover { background: var(--cafe-2); }
.btn.acc { background: var(--terracota); border-color: var(--terracota); color: #fff; }
.btn.acc:hover { background: var(--terracota-2); }
.btn.ok { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn.warn { background: var(--ambar); border-color: var(--ambar); color: #fff; }
.btn.danger { background: var(--hoja); border-color: #dca595; color: var(--rojo); }
.btn.danger.fill { background: var(--rojo); color: #fff; border-color: var(--rojo); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(107,52,21,.06); }
.btn.sm { padding: 6px 11px; font-size: .82rem; border-radius: 10px; }
.btn.sm .ic { width: 15px; height: 15px; }
.btn.lg { padding: 14px 22px; font-size: 1.04rem; border-radius: 14px; }
.btn.block { width: 100%; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.card { background: var(--hoja); border: 1px solid var(--linea-2); border-radius: var(--r); padding: 18px; box-shadow: var(--sombra-2); position: relative; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { flex: 1; }
.card-head h3::after { content: ''; display: block; width: 34px; height: 3px; border-radius: 2px; background: var(--terracota); margin-top: 6px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: var(--hoja); border: 1px solid var(--linea-2); border-radius: var(--r); padding: 16px 18px; position: relative; overflow: hidden; box-shadow: var(--sombra-2); }
.stat .l { font-size: .74rem; color: var(--texto-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stat .v { font-size: 1.75rem; font-weight: 800; color: var(--cafe); font-variant-numeric: tabular-nums; margin: 4px 0 2px; letter-spacing: -.01em; }
.stat .ico { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 12px; background: var(--papel); color: var(--terracota); display: grid; place-items: center; }
.stat .ico .ic { width: 22px; height: 22px; }
.stat.dark { background: var(--cafe-3) var(--rombos); border-color: var(--cafe-3); }
.stat.dark .l { color: rgba(229,215,189,.7); } .stat.dark .v { color: var(--crema); } .stat.dark .small { color: rgba(229,215,189,.65) !important; }
.stat.dark .ico { background: rgba(229,215,189,.1); color: var(--crema); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--papel-2); color: var(--cafe); white-space: nowrap; }
.badge.ok { background: var(--verde-bg); color: var(--verde); } .badge.warn { background: var(--ambar-bg); color: #845800; }
.badge.danger { background: var(--rojo-bg); color: var(--rojo); } .badge.info { background: var(--azul-bg); color: var(--azul); }
.badge.dark { background: var(--cafe); color: var(--crema); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: .74rem; font-weight: 600; color: var(--texto-2); text-transform: uppercase; letter-spacing: .06em; }
.input, select.input, textarea.input { width: 100%; border: 1.5px solid var(--linea); background: #fff; border-radius: 11px; padding: 10px 12px; outline: none; transition: .12s; }
.input:focus { border-color: var(--terracota); box-shadow: 0 0 0 4px rgba(179,106,53,.14); }
textarea.input { resize: vertical; min-height: 66px; }
.search { position: relative; }
.search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--texto-2); width: 18px; height: 18px; }
.search .input { padding-left: 40px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--cafe); }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--texto-2); padding: 9px 10px; border-bottom: 1.5px solid var(--linea); white-space: nowrap; font-weight: 600; }
table.t td { padding: 10px; border-bottom: 1px solid var(--linea-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: #fbf4e8; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; background: var(--papel-2); padding: 4px; border-radius: 14px; }
.tabs button { border: 0; background: transparent; border-radius: 11px; padding: 8px 15px; cursor: pointer; font-weight: 600; color: var(--texto-2); font-size: .88rem; }
.tabs button.on { background: var(--hoja); color: var(--cafe); box-shadow: var(--sombra-2); }
.empty { text-align: center; padding: 38px 10px; color: var(--texto-2); }
.empty .em { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 50%; background: var(--papel); color: var(--terracota); }
.empty .em .ic { width: 28px; height: 28px; }
.bar { height: 9px; background: var(--papel-2); border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--terracota), var(--cafe)); border-radius: 6px; }

/* =================== MESAS =================== */
.floor-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.floor-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: var(--texto-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.zone { margin-bottom: 26px; background: var(--hoja); border: 1px solid var(--linea-2); border-radius: 22px; padding: 18px 20px 22px; box-shadow: var(--sombra-2); }
.zone-title { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.zone-title h2 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: .14em; }
.zone-title .line { flex: 1; height: 10px; background: var(--zz-terra) repeat-x center; opacity: .4; }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 14px; }
.mesa { border: 0; background: transparent; padding: 6px 4px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; border-radius: 18px; transition: .12s; }
.mesa:hover { background: var(--papel); }
.mesa:active { transform: scale(.97); }
.mesa .shape { position: relative; width: 112px; height: 112px; display: grid; place-items: center; }
.mesa .top { position: relative; z-index: 2; width: 82px; height: 82px; border-radius: 50%; background: var(--papel); border: 2.5px solid var(--linea);
  display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 -4px 0 rgba(107,52,21,.06); }
.mesa.rect .shape { width: 136px; }
.mesa.rect .top { width: 112px; height: 74px; border-radius: 16px; }
.mesa .n { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; color: var(--cafe); line-height: 1; }
.mesa .sub { font-size: .66rem; color: var(--texto-2); margin-top: 3px; font-weight: 600; }
.mesa .chair { position: absolute; width: 22px; height: 12px; border-radius: 8px; background: var(--crema-2); z-index: 1; }
.mesa .info { text-align: center; min-height: 34px; }
.mesa .tot { font-weight: 800; color: var(--cafe); font-size: .98rem; font-variant-numeric: tabular-nums; }
.mesa .meta { font-size: .72rem; color: var(--texto-2); }
.mesa .flags { position: absolute; top: 4px; right: 4px; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; z-index: 3; }
.mesa .flags .badge { box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.mesa.busy .top { background: var(--terracota); border-color: var(--terracota-2); }
.mesa.busy .n, .mesa.busy .sub { color: #fff; }
.mesa.busy .chair { background: #d7a37b; }
.mesa.bill .top { background: var(--rojo); border-color: #6a1f0e; }
.mesa.bill .chair { background: #c98a74; }
.mesa.ready .top { box-shadow: 0 0 0 5px rgba(79,122,58,.45); }
.mesa.ready .top::after { content: ''; position: absolute; inset: -11px; border-radius: inherit; border: 3px solid var(--verde); opacity: .5; animation: ring 1.6s infinite; }
.mesa.res .top { border-style: dashed; border-color: var(--azul); background: var(--azul-bg); }
.mesa.res .n { color: var(--azul); }
@keyframes ring { 50% { opacity: 0; } }
.takeaway { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tk-card { border: 1.5px solid var(--linea); background: var(--papel); border-radius: 16px; padding: 12px 14px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.tk-card:hover { border-color: var(--terracota); }
.tk-card .n { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--cafe); }

/* =================== PEDIDO =================== */
.order { display: grid; grid-template-columns: 190px minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.order > * { min-width: 0; }
.cat-col { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 4px; background: var(--cafe-3) var(--rombos); border-radius: 20px; padding: 10px; }
.cat-col button { border: 0; background: transparent; color: rgba(229,215,189,.78); text-align: left; padding: 12px 14px; border-radius: 13px; cursor: pointer; font-weight: 600; font-size: .92rem; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.cat-col button small { opacity: .55; font-weight: 500; }
.cat-col button:hover { background: rgba(229,215,189,.08); color: var(--crema); }
.cat-col button.on { background: var(--crema); color: var(--cafe-3); }
.cats { display: none; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: none; }
.cats button { flex: none; border: 1.5px solid var(--linea); background: var(--hoja); border-radius: 999px; padding: 8px 16px; font-weight: 600; cursor: pointer; color: var(--cafe); }
.cats button.on { background: var(--cafe); color: var(--crema); border-color: var(--cafe); }
.cat-banner { display: flex; align-items: flex-end; gap: 14px; margin: 14px 0 14px; }
.cat-banner h2 { font-size: 1.5rem; text-transform: uppercase; letter-spacing: .12em; }
.cat-banner p { margin: 0; font-size: .82rem; color: var(--texto-2); font-style: italic; flex: 1; }
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.prod { border: 1px solid var(--linea-2); background: var(--hoja); border-radius: 18px; padding: 0; cursor: pointer; text-align: left; overflow: hidden; display: flex; flex-direction: column; min-height: 118px; box-shadow: var(--sombra-2); transition: .12s; position: relative; }
.prod:hover { transform: translateY(-2px); box-shadow: var(--sombra); border-color: var(--crema-2); }
.prod:active { transform: scale(.98); }
.prod .img { height: 96px; background: var(--crema) center/cover no-repeat; }
.prod .pb { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.prod .pn { font-weight: 700; font-size: .93rem; line-height: 1.25; color: var(--texto); }
.prod .pd { font-size: .72rem; color: var(--texto-2); line-height: 1.3; }
.prod .pf { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }
.prod .pp { font-weight: 800; color: var(--terracota); font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.prod .plus { width: 30px; height: 30px; border-radius: 10px; background: var(--cafe); color: var(--crema); display: grid; place-items: center; }
.prod .plus .ic { width: 16px; height: 16px; }
.prod .opt { font-size: .68rem; font-weight: 600; color: var(--terracota); text-transform: uppercase; letter-spacing: .05em; line-height: 1.3; }
.prod.off { opacity: .45; cursor: not-allowed; }
.prod.off .plus { background: var(--texto-2); }
/* ticket tipo recibo */
.ticket { position: sticky; top: 92px; display: flex; flex-direction: column; max-height: calc(100vh - 112px); }
.ticket-paper { box-shadow: 0 8px 22px -10px rgba(43,20,7,.3); }
.ticket-paper { background: var(--hoja); border-radius: 18px 18px 0 0; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ticket-edge { height: 14px; flex: none; background: radial-gradient(circle at 7px 14px, transparent 7px, var(--hoja) 7.5px) 0 0 / 14px 14px repeat-x; }
.ticket-head { padding: 16px 18px 12px; border-bottom: 1.5px dashed var(--linea); }
.ticket-head h2 { font-size: 1.45rem; }
.ticket-head .meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .78rem; color: var(--texto-2); margin-top: 6px; }
.ticket-head .meta span { display: inline-flex; align-items: center; gap: 4px; }
.ticket-head .meta .ic { width: 14px; height: 14px; }
.ticket-items { overflow: auto; padding: 4px 12px; flex: 1; min-height: 110px; }
.ti { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; padding: 11px 6px; border-bottom: 1px dotted var(--linea); align-items: start; }
.ti:last-child { border-bottom: 0; }
.ti .q { font-weight: 800; color: var(--hoja); background: var(--cafe); border-radius: 9px; text-align: center; font-size: .85rem; padding: 3px 0; }
.ti .nm { font-weight: 700; font-size: .92rem; }
.ti .md { font-size: .77rem; color: var(--texto-2); }
.ti .nt { font-size: .77rem; color: var(--rojo); font-style: italic; }
.ti .pr { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.ti.void { opacity: .55; } .ti.void .nm, .ti.void .pr { text-decoration: line-through; }
.ti.void .q { background: var(--texto-2); }
.ti .acts { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
.qbtn { width: 28px; height: 28px; border-radius: 9px; border: 1.5px solid var(--linea); background: #fff; cursor: pointer; font-weight: 700; color: var(--cafe); display: grid; place-items: center; padding: 0; }
.qbtn .ic { width: 14px; height: 14px; }
.ticket-tot { padding: 12px 18px; border-top: 1.5px dashed var(--linea); font-size: .88rem; }
.ticket-tot .l { display: flex; justify-content: space-between; padding: 2px 0; }
.ticket-tot .big { font-size: 1.5rem; font-weight: 800; color: var(--cafe); padding-top: 6px; font-family: var(--serif); }
.ticket-acts { padding: 12px 14px 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-pendiente { background: #ece6dc; color: #6d5a49; } .st-enviado { background: var(--azul-bg); color: var(--azul); }
.st-preparando { background: var(--ambar-bg); color: #845800; } .st-listo { background: var(--verde-bg); color: var(--verde); }
.st-entregado { background: var(--papel-2); color: var(--texto-2); } .st-anulado { background: var(--rojo-bg); color: var(--rojo); }

/* =================== MODAL =================== */
.modal-bg { position: fixed; inset: 0; background: rgba(43, 20, 7, .62); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .14s; }
.modal { background: var(--papel); border-radius: 22px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; animation: rise .16s; }
.modal.wide { width: min(920px, 100%); }
.modal-h { padding: 18px 22px 16px; display: flex; align-items: center; gap: 10px; background: var(--cafe-3) var(--rombos); position: relative; }
.modal-h::after { content: ''; position: absolute; left: 0; right: 0; bottom: 3px; height: 10px; background: var(--zz-crema) repeat-x; opacity: .22; }
.modal-h h2 { flex: 1; color: var(--crema); }
.modal-b { padding: 18px 22px; overflow: auto; }
.modal-f { padding: 12px 22px 18px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--linea); flex-wrap: wrap; }
.x { border: 0; background: rgba(229,215,189,.12); width: 34px; height: 34px; border-radius: 10px; font-size: 1.3rem; cursor: pointer; color: var(--crema); line-height: 1; }
.modal-f .x, .modal-b .x { background: var(--papel-2); color: var(--cafe); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: .5; } }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1.5px solid var(--linea); background: #fff; border-radius: 12px; padding: 9px 15px; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--texto); transition: .1s; }
.chip:hover { border-color: var(--terracota); }
.chip.on { background: var(--terracota); border-color: var(--terracota); color: #fff; }
.qty { display: inline-flex; align-items: center; gap: 8px; background: var(--hoja); border: 1.5px solid var(--linea); border-radius: 14px; padding: 4px; }
.qty button { width: 40px; height: 40px; border-radius: 11px; border: 0; background: var(--papel); font-size: 1.3rem; font-weight: 700; cursor: pointer; color: var(--cafe); }
.qty b { min-width: 34px; text-align: center; font-size: 1.2rem; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
@media (max-width: 860px) { .toasts { left: 12px; right: 12px; top: 64px; bottom: auto; align-items: center; } }
.app-mesero .toasts { left: 12px; right: 12px; top: 64px; bottom: auto; align-items: center; }
.toast { background: var(--cafe-3); color: var(--crema); padding: 13px 18px; border-radius: 14px; box-shadow: var(--sombra); max-width: 380px; animation: rise .16s; font-weight: 500; border-left: 4px solid var(--terracota); }
.toast.err { border-left-color: #e0715a; } .toast.ok { border-left-color: #8fbf6e; }

/* =================== COCINA =================== */
.kitchen-mode .main { background: var(--cafe-4) var(--rombos); }
.kitchen-mode .topbar { background: rgba(43,20,7,.92); }
.kitchen-mode .topbar h1 { color: var(--crema); }
.kitchen-mode .topbar::after { background-image: var(--zz-crema); opacity: .2; }
.kitchen-mode .pill { background: rgba(229,215,189,.08); border-color: rgba(229,215,189,.15); color: var(--crema); }
.kitchen-mode .tabs { background: rgba(229,215,189,.08); margin: 0; }
.kitchen-mode .tabs button { color: rgba(229,215,189,.7); }
.kitchen-mode .tabs button.on { background: var(--crema); color: var(--cafe-3); }
.kitchen-mode .empty { color: var(--crema); } .kitchen-mode .empty .em { background: rgba(229,215,189,.08); color: var(--crema); }
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px 18px; align-items: start; }
.kcard { background: #fffaf0; border-radius: 6px 6px 0 0; position: relative; box-shadow: 0 12px 26px rgba(0,0,0,.4); margin-bottom: 10px; }
.kcard::after { content: ''; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: linear-gradient(-45deg, transparent 6px, #fffaf0 0) 0 0 / 12px 10px repeat-x, linear-gradient(45deg, transparent 6px, #fffaf0 0) 0 0 / 12px 10px repeat-x; }
.kcard .kh { padding: 12px 16px; display: flex; align-items: center; gap: 8px; border-bottom: 2px dashed #d7c4a4; border-top: 8px solid var(--verde); border-radius: 6px 6px 0 0; }
.kcard .kh b { font-family: var(--serif); font-size: 1.4rem; color: var(--cafe-3); }
.kcard .kh .num { font-size: .8rem; color: var(--texto-2); }
.kcard .kh .tm { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--verde-bg); color: var(--verde); font-size: .9rem; }
.kcard .kh .tm .ic { width: 15px; height: 15px; }
.kcard.mid .kh { border-top-color: var(--ambar); } .kcard.mid .tm { background: var(--ambar-bg); color: #845800; }
.kcard.late .kh { border-top-color: var(--rojo); } .kcard.late .tm { background: var(--rojo); color: #fff; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .65; } }
.kcard .kw { padding: 8px 16px 0; font-size: .78rem; color: var(--texto-2); }
.kcard .ki { padding: 11px 16px; border-bottom: 1px dotted #d7c4a4; cursor: pointer; transition: .1s; }
.kcard .ki:hover { background: #fbf2e1; }
.kcard .ki .kq { font-weight: 800; font-size: 1.2rem; color: var(--terracota); margin-right: 6px; }
.kcard .ki .kn { font-weight: 700; font-size: 1.08rem; color: var(--texto); }
.kcard .ki .ks { font-size: .72rem; color: var(--texto-2); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.kcard .ki.preparando { background: var(--ambar-bg); } .kcard .ki.listo { background: var(--verde-bg); }
.kcard .ki.listo .kn { text-decoration: line-through; opacity: .6; }
.kcard .kf { padding: 12px 12px 8px; display: flex; gap: 8px; }
.kcard.done { opacity: .55; }

/* =================== IMPRESIÓN =================== */
#print-area { display: none; }
@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { display: block; position: absolute; left: 0; top: 0; width: 72mm; font-family: 'Courier New', monospace; font-size: 11.5px; color: #000; }
  @page { size: 80mm auto; margin: 3mm; }
}
.tk h3 { font-family: inherit; color: #000; font-size: 15px; text-align: center; margin: 2px 0; }
.tk .c { text-align: center; } .tk .hr { border-top: 1px dashed #000; margin: 5px 0; }
.tk table { width: 100%; border-collapse: collapse; } .tk td { vertical-align: top; padding: 1px 0; } .tk td.r { text-align: right; white-space: nowrap; }
.tk .big { font-size: 15px; font-weight: bold; } .tk img { width: 46mm; display: block; margin: 0 auto 4px; filter: grayscale(1) contrast(1.4); }
.tk .cm-item { font-size: 15px; font-weight: bold; margin-top: 5px; } .tk .cm-mod { padding-left: 12px; font-size: 13px; }

/* =================== RESPONSIVE =================== */
.order-cart-fab { display: none; }
@media (max-width: 1280px) { .order { grid-template-columns: 170px minmax(0, 1fr) 350px; } }
@media (max-width: 1100px) {
  .order { grid-template-columns: minmax(0, 1fr) 340px; }
  .cat-col { display: none; } .cats { display: flex; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { padding: 46px 20px 30px; }
  .login-brand img { width: 220px; } .login-brand .quote { display: none; } .login-brand .clock { top: 14px; }
  .app { grid-template-columns: 1fr; }
  .rail { display: none; }
  .content { padding: 14px 12px 100px; }
  .topbar { padding: 10px 12px; }
  .topbar::after { left: 12px; right: 12px; }
  .topbar h1 { font-size: 1.25rem; }
  .topbar .ttl .kicker, .top-meta { display: none; }
  .cat-banner { flex-direction: column; align-items: flex-start; gap: 2px; margin: 10px 0; }
  .cat-banner h2 { font-size: 1.2rem; }
  .keypad button { height: 56px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--cafe-3); z-index: 20; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; box-shadow: 0 -8px 20px rgba(0,0,0,.18); }
  .bottom-nav a { flex: 1; color: rgba(229,215,189,.7); text-decoration: none; font-size: .64rem; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; position: relative; font-weight: 500; }
  .bottom-nav a .ic { width: 22px; height: 22px; }
  .bottom-nav a.on { background: var(--crema); color: var(--cafe-3); font-weight: 700; }
  .order { grid-template-columns: 1fr; }
  .ticket { position: static; max-height: none; }
  .g2, .g3, .g4 { grid-template-columns: 1fr 1fr; }
  .zone { padding: 14px 10px 16px; border-radius: 18px; }
  .tables { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px 6px; }
  .mesa .shape { width: 86px; height: 86px; } .mesa.rect .shape { width: 98px; }
  .mesa .top { width: 62px; height: 62px; } .mesa.rect .top { width: 82px; height: 56px; }
  .mesa .n { font-size: 1.15rem; }
  .mesa .flags { position: static; flex-direction: row; flex-wrap: wrap; justify-content: center; order: 9; }
  .mesa .flags .badge { font-size: .62rem; padding: 1px 6px; }
  .prods { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .order-cart-fab { display: flex; position: fixed; bottom: 78px; left: 12px; right: 12px; z-index: 15; background: var(--terracota); color: #fff; border-radius: 16px; padding: 14px 18px; font-weight: 700; box-shadow: var(--sombra); justify-content: space-between; border: 0; }
  .floor-head .legend { display: none; }
}
@media (max-width: 520px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .stat .v { font-size: 1.45rem; } }

/* respuesta inmediata al tocar */
body.busy::before { content: ''; position: fixed; top: 0; left: 0; height: 3px; width: 40%; background: var(--terracota); z-index: 100; animation: load 1s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.is-busy { opacity: .6; pointer-events: none; }
.btn.is-busy::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hint { font-size: .78rem; color: var(--texto-2); text-align: center; padding: 4px 0 2px; }
.pill.help { cursor: pointer; width: 34px; justify-content: center; font-size: 1rem; font-family: var(--serif); }
.prod, .btn, .mesa, .chip, .nav a { transition: none; }

/* Órdenes (tema claro) */
.kcard { box-shadow: 0 10px 22px -8px rgba(43,20,7,.28); border: 1px solid var(--linea-2); }
.kcard.ready-card .kh { border-top-color: var(--verde); background: var(--verde-bg); }

/* ===== App de meseros (APK): siempre en formato celular, con barra inferior ===== */
:is(.app-mesero, .app-dueno) .app { grid-template-columns: 1fr; }
:is(.app-mesero, .app-dueno) .rail, :is(.app-mesero, .app-dueno) .top-meta .clock { display: none; }
:is(.app-mesero, .app-dueno) .content { padding: 14px 12px 100px; }
:is(.app-mesero, .app-dueno) .topbar { padding: 10px 12px; }
:is(.app-mesero, .app-dueno) .topbar::after { left: 12px; right: 12px; }
:is(.app-mesero, .app-dueno) .topbar h1 { font-size: 1.3rem; }
:is(.app-mesero, .app-dueno) .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--cafe-3); z-index: 20; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; box-shadow: 0 -8px 20px rgba(0,0,0,.18); }
:is(.app-mesero, .app-dueno) .bottom-nav a { flex: 1; color: rgba(229,215,189,.7); text-decoration: none; font-size: .66rem; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border-radius: 12px; font-weight: 500; }
:is(.app-mesero, .app-dueno) .bottom-nav a .ic { width: 23px; height: 23px; }
:is(.app-mesero, .app-dueno) .bottom-nav a.on { background: var(--crema); color: var(--cafe-3); font-weight: 700; }
:is(.app-mesero, .app-dueno) body { user-select: none; -webkit-user-select: none; overscroll-behavior-y: contain; }
:is(.app-mesero, .app-dueno) input, :is(.app-mesero, .app-dueno) textarea { user-select: text; -webkit-user-select: text; }
:is(.app-mesero, .app-dueno) .login-brand::after { display: none; }

/* ===== Celular y app de meseros: todo accesible sin deslizar de lado ===== */
@media (max-width: 860px) {
  .cats { flex-wrap: wrap; overflow: visible; gap: 6px; padding-bottom: 0; }
  .cats button { padding: 7px 13px; font-size: .86rem; }
  .cat-banner { margin: 8px 0; }
  .cat-banner h2 { font-size: 1.05rem; }
  .cat-banner p { font-size: .74rem; }
  .order { padding-bottom: 16px; }
  .prods { gap: 10px; }
  .prod { min-height: 104px; }
  .prod .pb { padding: 10px 12px; }
  .toast { font-size: .84rem; padding: 9px 13px; max-width: 100%; }
  .modal-bg { padding: 8px; align-items: end; }
  .modal { max-height: calc(100dvh - 16px); border-radius: 20px; }
  .modal-b { padding: 14px 16px; }
  .modal-f { padding: 10px 16px 14px; }
  .modal-f .btn { flex: 1; }
  .topbar .top-actions .btn { padding: 8px 12px; }
  .floor-stats .pill { font-size: .74rem; padding: 5px 10px; }
}
.app-mesero .cats { display: flex; }

/* aviso de actualización de la app de meseros */
.app-upd { position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 10px;
  background: var(--cafe); color: var(--crema); border-radius: 14px; padding: 10px 12px; font-size: .82rem; box-shadow: var(--sombra); border-left: 4px solid var(--terracota); }
.app-upd .btn.sm { flex: none; }

/* Pedido en celular: pestañas Carta / Pedido (sin recuadro flotante que tape) */
.order-tabs { display: none; }
@media (max-width: 860px) {
  .order-tabs { display: flex; gap: 6px; position: sticky; top: 58px; z-index: 5; background: var(--papel); padding: 6px 0 10px; margin: -6px 0 6px; }
  .order-tabs button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--linea); background: var(--hoja); color: var(--cafe);
    border-radius: 13px; padding: 10px 8px; font-weight: 600; font-size: .9rem; position: relative; }
  .order-tabs button .ic { width: 18px; height: 18px; }
  .order-tabs button.on { background: var(--cafe); border-color: var(--cafe); color: var(--crema); }
  .order-tabs .ot-tot { font-weight: 800; margin-left: 2px; opacity: .9; }
  .order-tabs .dot-n { position: absolute; top: -7px; right: -4px; background: var(--terracota); color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 700; padding: 1px 7px; }
  .order[data-tab="carta"] .ticket { display: none; }
  .order[data-tab="pedido"] > :not(.ticket) { display: none; }
  .order[data-tab="pedido"] .ticket { margin-top: 0; }
}
@media (max-width: 860px) {
  /* Botones del pedido (Enviar orden / Cobrar / Pidió la cuenta) siempre visibles sobre el menú inferior */
  .order[data-tab="pedido"] .ticket-acts { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 4; background: var(--hoja);
    box-shadow: 0 -8px 16px -8px rgba(43,20,7,.25); border-top: 1px dashed var(--linea); padding-bottom: 10px; }
  .order[data-tab="pedido"] .ticket-acts .hint { display: none; }
  .ti .acts { gap: 5px; }
  .ti .acts .badge { font-size: .66rem; padding: 2px 7px; }
}

.lp-upd { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px; border-radius: 14px; background: var(--cafe); color: var(--crema); font-size: .8rem; line-height: 1.35; text-align: left; }
.lp-upd .ic { width: 22px; height: 22px; flex: none; }

/* Aviso fijo dentro de la pantalla (no emergente) */
.aviso { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; margin-bottom: 14px; border: 1.5px solid var(--linea); background: var(--hoja); }
.aviso.warn { background: var(--ambar-bg); border-color: var(--ambar); color: #6b4700; }
.aviso .aviso-ic { font-size: 1.4rem; line-height: 1; }
.aviso.pulse { animation: avisoPulse .9s ease 2; }
@keyframes avisoPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(196,138,24,0); } 50% { box-shadow: 0 0 0 6px rgba(196,138,24,.35); } }

/* Cambio de módulo: la pantalla anterior se atenúa mientras llega la nueva */
#view.nav-loading { opacity: .55; transition: opacity .15s; pointer-events: none; }

/* ===== Menú "Más" del celular (módulos que no caben en la barra inferior) ===== */
.mas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mas-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 6px; border-radius: 16px; background: var(--hoja); border: 1.5px solid var(--linea);
  color: var(--cafe); text-decoration: none; font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; }
.mas-item .ic { width: 26px; height: 26px; }
.mas-item.on { background: var(--cafe-3); color: var(--crema); border-color: var(--cafe-3); }
.bottom-nav a#nav-mas { cursor: pointer; }

/* ===== iPhone / Safari (pantalla de inicio y navegador) ===== */
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
@supports (height: 100dvh) {
  .login, .app { min-height: 100dvh; }
  .rail { height: 100dvh; }
  .modal { max-height: calc(100dvh - 32px); }
}
/* Safari agranda la página al tocar un campo con letra menor a 16 px: se evita en iPhone. */
@supports (-webkit-touch-callout: none) {
  input, select, textarea, .input { font-size: 16px !important; }
}
.modal-bg { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }

/* ===== Pantalla completa "sin fin" (apps Android de borde a borde y iPhone): ===== */
/* el contenido llega a los bordes y solo se deja el espacio justo de la barra de estado y la de navegación. */
.topbar { padding-top: calc(14px + env(safe-area-inset-top)); }
.login-brand { padding-top: calc(40px + env(safe-area-inset-top)); }
.login-brand .clock { top: calc(46px + env(safe-area-inset-top)); }
.login-brand::before { top: calc(22px + env(safe-area-inset-top)); }
.login-panel { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.rail { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.app, .login { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
@media (max-width: 860px) {
  .topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
  .content { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .toasts { top: calc(64px + env(safe-area-inset-top)); }
}
:is(.app-mesero, .app-dueno) .topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
:is(.app-mesero, .app-dueno) .content { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
:is(.app-mesero, .app-dueno) .toasts { top: calc(64px + env(safe-area-inset-top)); }
.order-cart-fab { bottom: calc(78px + env(safe-area-inset-bottom)); }

/* ===== iPhone desde la pantalla de inicio: barra de título oscura bajo el reloj (pantalla completa) ===== */
.ios-app body { background: var(--papel); }
.ios-app .topbar { background: var(--cafe-3) var(--rombos); color: var(--crema); }
.ios-app .topbar h1 { color: var(--crema); }
.ios-app .topbar .kicker { color: var(--crema-2); opacity: .75; }
.ios-app .topbar::after { background: var(--zz-crema) repeat-x; opacity: .3; }
.ios-app .topbar .pill { background: rgba(229,215,189,.12); border-color: rgba(229,215,189,.25); color: var(--crema); }
.ios-app .topbar .btn:not(.pri):not(.acc):not(.ok):not(.danger):not(.warn) { background: rgba(229,215,189,.12); border-color: rgba(229,215,189,.28); color: var(--crema); }
.ios-app .topbar .input { background: rgba(255,250,241,.95); }

/* Trabajando con el servidor del local (sin nube) */
#aviso-local { position: fixed; top: env(safe-area-inset-top); left: 50%; transform: translateX(-50%); z-index: 60; max-width: min(720px, calc(100% - 16px));
  margin-top: 6px; background: #1d3b52; color: #fff; padding: 8px 14px; border-radius: 12px; font-size: .82rem; box-shadow: 0 8px 22px rgba(0,0,0,.3); text-align: center; }

/* Aviso pequeño y cerrable (inventario bajo en Inicio) */
.alerta-mini { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; margin: 0 0 12px; padding: 4px 4px 4px 12px; border-radius: 999px;
  background: var(--ambar-bg); border: 1px solid rgba(196,138,24,.45); font-size: .8rem; color: #6b4700; }
.alerta-mini a { color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alerta-mini button { border: 0; background: transparent; color: #6b4700; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: .8rem; flex: none; }
.alerta-mini button:hover { background: rgba(196,138,24,.18); }
