:root {
  --red: #e4002b;
  --red-dark: #b10022;
  --black: #141414;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #ececec;
  --paper: #ffffff;
  --bg: #f3f3f3;
  --ok: #157a3a;
  --ok-bg: #e7f6ec;
  --warn: #8a5a10;
  --warn-bg: #fff3d6;
  --danger: #9d1230;
  --danger-bg: #fde8ea;
  --info-bg: #f6f6f6;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  --display: "Oswald", "Arial Narrow", sans-serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}
body.app-body { overflow-x: clip; }
body.modal-open { overflow: hidden; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--black);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: max(18px, env(safe-area-inset-top, 0px)) 14px 18px max(14px, env(safe-area-inset-left, 0px));
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  margin-bottom: 22px;
  padding: 4px;
}
.brand strong { display: block; font-family: var(--display); font-size: 1.35rem; letter-spacing: 0.04em; text-transform: uppercase; }
.brand small { color: #ffb3c0; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.68rem; }
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-family: var(--display);
  font-size: 1.6rem;
  flex: 0 0 auto;
}
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; overflow: auto; }
.nav a {
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 12px;
  color: #f5f5f5;
  font-weight: 600;
  transition: background .2s ease, transform .2s ease;
}
.nav a:hover { background: #2a2a2a; transform: translateX(4px); }
.nav a.active { background: var(--red); color: white; }
.sidebar-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-foot a { color: #ffb3c0; font-weight: 600; }
.who { color: #ddd; }
.who small { display: block; color: #ffb3c0; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }

.workspace { flex: 1; min-width: 0; }
.topbar {
  padding: max(22px, calc(16px + env(safe-area-inset-top, 0px))) max(28px, env(safe-area-inset-right, 0px)) 16px max(28px, env(safe-area-inset-left, 0px));
  background: white;
  border-bottom: 4px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar h1 { font-size: 2rem; }
.content { padding: 20px 28px 48px; }

.auth {
  background:
    radial-gradient(circle at top right, rgba(228, 0, 43, 0.35), transparent 32%),
    var(--black);
}
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; }
.auth-wrap .alert { width: min(440px, 100%); margin: 0; }
.auth-card, .panel, .card, .modal-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.auth-card { width: min(440px, 100%); padding: 32px; color: var(--ink); }
.auth-card h1 { color: var(--red); font-size: 2.4rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--red);
  font-weight: 700;
  margin: 0 0 8px;
}
.lede, .hint, .meta { color: var(--muted); }
.hint { font-size: 0.92rem; }
.meta { font-size: 0.9rem; }

.grid-stats, .split, .card-grid, .table-grid { display: grid; gap: 16px; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 18px; }
.stat { padding: 18px; border-top: 4px solid var(--red); transition: transform .2s ease, box-shadow .2s ease; }
.stat:hover { transform: translateY(-3px); }
.stat span { display: block; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.stat strong { display: block; margin-top: 6px; font-family: var(--display); font-size: 2rem; color: var(--black); }
.stat strong.stat-text { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; text-transform: none; }
.split { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 16px; }
.card, .panel { padding: 18px; }
.card h2, .panel h2 { font-size: 1.35rem; margin-bottom: 12px; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar h2 { margin: 0; }

.form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 0.92rem; }
label span { color: var(--muted); font-weight: 600; }
input, select, textarea {
  width: 100%;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(228, 0, 43, 0.2); border-color: var(--red); }
.inline { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.inline label { flex: 1; min-width: 140px; }
td .inline { width: 100%; }
td .inline + form { margin-top: 8px; }
.qty { width: 64px; text-align: center; padding-left: 8px; padding-right: 8px; }
.check { display: flex; gap: 8px; align-items: center; }
.check input { width: auto; }
.check span { color: var(--ink); }

.btn, button, .modal-card button[type="submit"] {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--red);
  color: white;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.btn:hover, button:hover { background: var(--red-dark); }
.btn:active, button:active:not(:disabled) { transform: scale(0.98); }
.btn.secondary, button.secondary { background: #fff; color: var(--ink); border: 1px solid #ddd; }
.btn.secondary:hover, button.secondary:hover { background: #f7f7f7; color: var(--ink); }
.btn.danger, button.danger { background: var(--black); }
.btn.danger:hover, button.danger:hover { background: #2b2b2b; }
.btn.small, button.small { padding: 8px 12px; font-size: 0.86rem; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.alert { padding: 12px 14px; border-radius: 12px; margin: 0 0 16px; font-weight: 600; animation: rise .35s ease; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.error { background: var(--danger-bg); color: var(--danger); }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--warn-bg);
  color: var(--warn);
}
.badge.cocina { background: #ffe8d2; color: #9a3d00; }
.badge.servida, .badge.libre, .badge.pagado { background: var(--ok-bg); color: var(--ok); }
.badge.cancelada, .badge.ocupada, .badge.bajo, .badge.debe { background: var(--danger-bg); color: var(--danger); }
.badge.inactivo, .badge.pendiente { background: #f3f3f3; color: #444; }
.badge.servida-debe { background: var(--warn-bg); color: var(--warn); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.table-wrap { overflow-x: auto; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mono { font-variant-numeric: tabular-nums; font-weight: 700; }
.total-hero { font-family: var(--display); font-size: 3rem; margin: 8px 0; color: var(--red); }
.panel ul, .stack ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.setup-steps { padding-left: 18px; color: var(--muted); }

.pos { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.menu-board, .ticket-dock { background: white; border-radius: 18px; border: 1px solid var(--line); }
.menu-board { padding: 16px; }
.menu-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.menu-tools input { flex: 1; }
.cats-scroll {
  position: relative;
  margin-bottom: 14px;
  padding-bottom: 4px;
}
.cats-scroll::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 8px;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(to left, var(--paper), transparent);
}
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.cats button {
  background: white;
  color: var(--ink);
  border: 1px solid #ddd;
  border-radius: 999px;
  white-space: nowrap;
  padding: 8px 14px;
}
.cats button:hover { background: #fff1f3; color: var(--red); border-color: var(--red); }
.cats button.is-on, .cats button.is-on:hover { background: var(--red); color: white; border-color: var(--red); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.menu-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: white;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.menu-card.is-in {
  animation: rise .4s ease both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.menu-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08); }
.menu-card[hidden] { display: none; }
.menu-empty, [data-menu-empty] { margin: 8px 0 0; }
.menu-photo {
  height: 120px;
  background: linear-gradient(160deg, #2a2a2a, #111 60%, var(--red));
  display: grid;
  place-items: center;
  color: white;
  font-family: var(--display);
  font-size: 2.4rem;
}
.menu-photo img { width: 100%; height: 120px; object-fit: cover; }
.menu-card .body { padding: 12px; display: grid; gap: 8px; flex: 1; }
.menu-card strong {
  font-size: 1.02rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price-tag { color: var(--red); font-family: var(--display); font-size: 1.25rem; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.stepper button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.3rem;
  flex: 0 0 auto;
}
.stepper button:active { transform: scale(0.9); }
.stepper .qty {
  width: 48px;
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 700;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper .qty::-webkit-outer-spin-button,
.stepper .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ticket-dock { padding: 16px; position: sticky; top: 92px; display: grid; gap: 10px; align-content: start; max-height: calc(100vh - 110px); }
.ticket-dock > button, .ticket-dock > .btn { width: 100%; }
.ticket-dock h2 { font-size: 1.5rem; }
.cart-line, .ticket-line, .ticket-head { display: flex; justify-content: space-between; gap: 12px; }
.cart-line { animation: rise .25s ease; }
.cart-line span { min-width: 0; }
.cart-lines { display: grid; gap: 8px; max-height: 280px; overflow: auto; }
.orders-board { margin-top: 18px; display: grid; gap: 12px; }
.order-card { display: grid; gap: 10px; border-left: 5px solid var(--red); animation: rise .4s ease both; }
.order-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.order-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }

.table-grid, .card-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.floor-card { min-height: 180px; display: flex; flex-direction: column; gap: 8px; transition: transform .2s ease, box-shadow .2s ease; }
.floor-card:hover { transform: translateY(-3px); }
.floor-card:has(.badge.ocupada) { box-shadow: inset 0 0 0 2px #f3b4be; }
.choice {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.choice:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 3px rgba(228, 0, 43, 0.16); }
.choice input { width: auto; }
.choice.has-checks { border-color: var(--red); box-shadow: inset 0 0 0 1px rgba(228, 0, 43, 0.25); }
.floor-checks { list-style: none; padding: 0; margin: 8px 0; }
.floor-checks li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.choice-inline { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.account-mode-fieldset .choice-inline { margin-top: 6px; }
.product-main { display: flex; gap: 10px; align-items: center; min-width: 0; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; background: #111; }
.thumb.lg { width: 96px; height: 96px; }
.card.inactive { opacity: 0.7; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.filters label { min-width: 140px; flex: 1; }

.floor-card h2 { font-size: 1.6rem; overflow-wrap: anywhere; }
.floor-card .actions { margin-top: auto; display: grid; }
.floor-card .actions form,
.floor-card .actions .btn,
.floor-card .actions button { width: 100%; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: none;
  place-items: center;
  padding: 20px;
  z-index: 30;
}
.modal.is-open { display: grid; animation: fade .2s ease; }
.modal.is-open .modal-card { animation: pop .28s cubic-bezier(.2, .8, .2, 1); }
.modal.is-closing { animation: fade .18s ease reverse forwards; }
.modal.is-closing .modal-card { animation: pop .18s ease reverse forwards; }
.modal-card {
  width: min(560px, 100%);
  max-height: min(92vh, 900px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-card header, .modal-card .modal-body { padding: 18px 18px 0; }
.modal-card .modal-body {
  padding-bottom: 18px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: var(--black);
  color: white;
  border-radius: 18px 18px 0 0;
  padding: 16px 18px;
  flex-shrink: 0;
}
.modal-head h2 { color: white; font-size: 1.4rem; margin: 0; }
.modal-head .secondary {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,.3);
  min-height: 44px;
  min-width: 44px;
}
.modal-wide { width: min(760px, 100%); }

.ticket-body { background: #fff; }
.ticket { width: min(440px, 100%); margin: 24px auto; }
.ticket hr { border: 0; border-top: 1px dashed var(--line); margin: 12px 0; }
.ticket-thermal .ticket-item { display: flex; gap: 8px; align-items: flex-start; font-size: 1.05rem; }
.ticket-thermal .ticket-qty { font-weight: 700; min-width: 2.2em; }
.ticket-thermal .ticket-name { flex: 1; }
.ticket-thermal .ticket-total { font-size: 1.15rem; }
.ticket-thermal .ticket-note { margin: -4px 0 8px 2.2em; font-style: italic; }

@media print {
  .no-print { display: none !important; }
  body.ticket-body { background: white; }
  .ticket { box-shadow: none; border: 0; margin: 0; width: auto; }
  body.ticket-thermal .ticket {
    width: calc(var(--ticket-mm, 80) * 1mm);
    max-width: calc(var(--ticket-mm, 80) * 1mm);
    font-size: 12pt;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes navDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.content { animation: rise .35s ease; }
.auth-card { animation: pop .4s cubic-bezier(.2, .8, .2, 1); }

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}
.sidebar-top .brand { margin-bottom: 0; }
.nav-menu-btn { display: none; }

@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; }
  .pos { grid-template-columns: 1fr; }
  .app { display: block; }
  .sidebar {
    width: auto;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 6;
    padding: 12px 14px;
  }
  .sidebar-top { margin-bottom: 0; }
  .sidebar-top .brand { margin-bottom: 0; flex: 1; min-width: 0; }
  .nav-menu-btn {
    display: inline-flex;
    flex-shrink: 0;
    min-height: 44px;
    min-width: 72px;
  }
  .nav {
    display: none;
    flex-direction: column;
    overflow-x: visible;
    overflow-y: auto;
    max-height: min(55vh, 460px);
    margin-top: 10px;
    padding: 8px;
    background: #1f1f1f;
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
  }
  .nav.is-open {
    display: flex;
    animation: navDrop .22s ease;
  }
  .nav a { white-space: normal; min-height: 44px; display: flex; align-items: center; }
  .nav a:hover { transform: none; }
  .nav-section { width: 100%; }
  .sidebar-foot { margin-top: 10px; flex-wrap: wrap; gap: 8px; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .topbar h1 { font-size: 1.55rem; }
  .ticket-dock { position: static; max-height: none; }
  .cobro-summary { order: -1; }
}

/* Tablet apaisada: menú + carrito y cobro en dos columnas */
@media (min-width: 820px) and (max-width: 980px) {
  .split.cobro-layout { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
  .pos { grid-template-columns: minmax(0, 1fr) minmax(240px, 280px); gap: 12px; }
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .mesas-tab { padding: 11px 18px; min-height: 44px; }
  .cats button { min-height: 44px; padding: 10px 16px; }
  .menu-card .stepper button { min-width: 44px; min-height: 44px; }
  .menu-card .qty { min-height: 44px; }
  .ticket-dock button, .ticket-dock .btn { min-height: 48px; }
  .btn-cobrar, button.btn-cobrar { min-height: 48px; }
  .floor-quick .btn, .floor-quick button { min-height: 44px; }
  .order-actions .btn, .order-actions button { min-height: 44px; }
  .table-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .floor-card .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .floor-card .actions form { margin: 0; }
  .auth-card input, .auth-card button[type="submit"] { min-height: 48px; font-size: 1.05rem; }
  .split.cobro-layout .total-hero { font-size: 2.4rem; }
  .kds-card-head h2 { font-size: 1.45rem; }
  .kds-actions button { min-height: 52px; font-size: 1.05rem; }
  .kds-main { padding: 16px; }
  .modal-card .form button[type="submit"] { min-height: 48px; width: 100%; }
  .choice { min-height: 52px; }
}

.kds-body { background: #0f0f0f; color: #f5f5f5; }
.kds-app { min-height: 100vh; display: flex; flex-direction: column; }
.kds-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: max(18px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) 18px max(24px, env(safe-area-inset-left, 0px));
  border-bottom: 4px solid var(--red);
  background: #111;
}
.kds-top h1 { color: #fff; font-size: 1.8rem; }
.kds-main { flex: 1; padding: 20px 24px 40px; }
.kds-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.kds-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.kds-empty { grid-column: 1 / -1; color: #bbb; padding: 24px; text-align: center; background: #1a1a1a; border-radius: 16px; }
.kds-card {
  background: #1a1a1a;
  border-radius: 16px;
  border: 1px solid #2a2a2a;
  padding: 16px;
  display: grid;
  gap: 12px;
  animation: rise .35s ease;
}
.kds-card.kds-new { border-top: 4px solid #f0b429; }
.kds-card.kds-prep { border-top: 4px solid #3b82f6; }
.kds-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.kds-card-head h2 { color: #fff; font-size: 1.35rem; }
.kds-pill {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #2a2a2a;
  color: #fff;
}
.kds-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.kds-lines li { color: #eee; }
.kds-note { color: #ffb3c0; font-size: 0.92rem; margin: 0; }
.kds-actions button { width: 100%; }

.mesas-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.mesas-tab {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.mesas-tab.is-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.help-callout {
  background: var(--info-bg);
  border-left: 4px solid var(--red);
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  font-size: 0.95rem;
}
.help-callout ul { margin: 8px 0 0; padding-left: 1.2rem; }
.help-callout-compact { font-size: 0.88rem; padding: 10px 14px; }
.nav-section {
  margin: 14px 0 6px;
  padding: 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}
.nav-toggle {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #ccc;
}
.btn-cobrar, button.btn-cobrar {
  background: var(--ok);
  color: #fff;
  border: none;
  font-weight: 700;
  width: auto;
  max-width: 100%;
  padding: 10px 18px;
}
.btn-cobrar:hover, button.btn-cobrar:hover { filter: brightness(1.05); }
.cobro-quick .btn-cobrar,
.cobro-quick button.btn-cobrar {
  width: 100%;
  padding: 12px 16px;
}
.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.order-actions form.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.floor-quick .btn-cobrar { width: auto; }
.shift-checklist .checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shift-checklist .checklist li.pending { color: var(--warn); }
.shift-checklist .checklist li.ok { color: var(--ok); }
.onboarding-steps ol { margin: 0 0 12px; padding-left: 1.25rem; display: grid; gap: 10px; }
.onboarding-steps .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.floor-quick { flex-wrap: wrap; }
.order-card:target { box-shadow: 0 0 0 3px var(--red); }

.inventory-list { display: grid; gap: 14px; }
.inventory-row { display: grid; gap: 12px; }
.inventory-row h3 { margin: 0; font-size: 1.1rem; font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.inventory-row-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; flex-wrap: wrap; }
.inventory-row-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  align-items: end;
}
.inventory-row-form label:last-of-type { grid-column: 1 / -1; }
.inventory-row-form button[type="submit"] { grid-column: 1 / -1; min-height: 44px; }

@media (max-width: 768px) {
  .inventory-row-form { grid-template-columns: 1fr; }
  .inventory-row-form label:last-of-type,
  .inventory-row-form button[type="submit"] { grid-column: auto; }
  .mesas-tab { padding: 12px 18px; font-size: 1rem; }
  .menu-card .stepper button { min-width: 44px; min-height: 44px; font-size: 1.25rem; }
  .menu-card .qty { min-height: 44px; font-size: 1.1rem; }
  .ticket-dock button, .ticket-dock .btn { min-height: 48px; font-size: 1.05rem; }
  .btn-cobrar, button.btn-cobrar { min-height: 48px; font-size: 1.05rem; }
  .modal-card { max-height: 92vh; overflow: auto; }
}

@media (pointer: coarse) {
  .menu-card .stepper button { min-width: 44px; min-height: 44px; }
  .menu-card .qty { min-height: 44px; }
  .cats button { min-height: 44px; padding: 10px 16px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .kds-top h1 { font-size: 1.45rem; }
  .kds-board { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
  .kds-card-head h2 { font-size: 1.55rem; }
  .kds-actions button { min-height: 48px; font-size: 1.05rem; }
  .kds-main { padding: 12px 16px 24px; }
}

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