/* COMANDAQO — identidad oficial de la familia RUNEQO (degradado #F59E0B → #F43F5E, neutros #0F172A). Menú lateral, tarjetas, gráficos, animaciones. */
:root {
  --brand: #e11d48; --brand-2: #d97706; --brand-3: #fb7185; --brand-soft: #fff1f2; --brand-ink: #9f1239;
  --grad: linear-gradient(135deg, #d97706 0%, #e11d48 100%);
  --grad-violet: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
  --grad-mint: linear-gradient(135deg, #10b981 0%, #22d3ee 100%);
  --grad-sun: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-sky: linear-gradient(135deg, #3b82f6 0%, #fb7185 100%);
  --ink: #0f172a; --ink-2: #475569; --ink-3: #94a3b8; --line: #e2e8f0; --line-2: #f1f5f9;
  --bg: #f8fafc; --card: #ffffff; --side: #0f172a; --side-2: #111a30;
  --ok: #16a34a; --ok-soft: #e7f8f1; --warn: #d97706; --warn-soft: #fff1e6; --bad: #ef4444; --bad-soft: #fff0f0; --info: #3b82f6; --info-soft: #edf2ff;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(23, 20, 43, .04), 0 8px 24px rgba(23, 20, 43, .06);
  --shadow-lg: 0 20px 50px rgba(23, 20, 43, .14);
  --side-w: 248px;
  font-family: "Inter", system-ui, "Segoe UI Variable Display", "Segoe UI", -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg);
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, select, textarea { font: inherit; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); min-width: 0; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 2px; }
h1 { font-size: 1.65rem; margin: 0; letter-spacing: -.02em; font-weight: 800; } h2 { font-size: 1.08rem; margin: 0 0 14px; letter-spacing: -.01em; font-weight: 750; }
h3 { font-size: .98rem; margin: 10px 0 6px; font-weight: 750; }
.muted { color: var(--ink-2); font-size: .92rem; } .center { text-align: center; } small.block { display: block; }
.boot { padding: 40px; text-align: center; color: var(--ink-2); }
svg.i { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- botones ---------- */
.btn { border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius-sm); padding: 10px 16px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s, box-shadow .15s, background .15s, border-color .15s; }
.btn:hover:not(:disabled) { border-color: #d9d4e6; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(225, 29, 72, .3); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 10px 26px rgba(225, 29, 72, .4); }
.btn.violet { background: var(--grad-violet); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(139, 92, 246, .3); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); } .btn.ghost:hover { background: var(--line-2); box-shadow: none; }
.btn.warn { background: var(--warn-soft); border-color: #ffd8b8; color: var(--warn); }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.big { width: 100%; padding: 16px; font-size: 1.12rem; border-radius: 14px; }
.btn.small { padding: 6px 11px; font-size: .84rem; border-radius: 10px; }
.link { background: none; border: 0; color: var(--brand-ink); font-weight: 700; padding: 4px 0; text-align: left; }
.link:hover { text-decoration: underline; }
.icon-btn { background: none; border: 0; font-size: 1.1rem; padding: 8px; border-radius: 10px; color: var(--ink-2); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; } .row-btns.tight { margin: 0; flex-wrap: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 700; display: inline-flex; flex-direction: column; align-items: center; transition: all .15s; }
.chip:hover:not(:disabled) { border-color: #d9d4e6; }
.chip small { font-weight: 500; color: var(--ink-2); font-size: .74rem; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); } .chip.on small { color: #d8d5e8; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: none; padding: 8px 13px; border-radius: 9px; font-weight: 700; font-size: .88rem; color: var(--ink-2); transition: all .15s; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(23, 20, 43, .1); }
.seg.wide { display: flex; } .seg.wide button { flex: 1; padding: 11px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); } .pill.brand { background: var(--brand-soft); color: var(--brand-ink); } .pill.violet { background: #f1ebff; color: #6d3fe0; }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); margin: 8px 0; background: var(--info-soft); color: #2b47c4; }
.notice.warn { background: var(--warn-soft); color: #a23f06; } .notice.bad { background: var(--bad-soft); color: var(--bad); }
.num-neg { color: var(--bad); font-weight: 700; } .num-pos { color: var(--ok); font-weight: 700; }

/* ---------- entrada ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.login-hero { background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.18) 0, transparent 35%), radial-gradient(circle at 80% 70%, rgba(255,255,255,.12) 0, transparent 40%), linear-gradient(150deg, #0f172a 0%, #111a30 38%, #e11d48 72%, #d97706 100%);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-hero h2 { font-size: 2.6rem; line-height: 1.08; letter-spacing: -.03em; margin: 0 0 14px; font-weight: 800; max-width: 520px; }
.login-hero p { font-size: 1.08rem; opacity: .88; max-width: 470px; line-height: 1.5; margin: 0; }
.login-hero .feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 520px; }
.login-hero .feat { background: rgba(255,255,255,.12); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.18); border-radius: 16px; padding: 14px; display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: .92rem; }
.login-hero .blob { position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.08); right: -120px; top: -120px; animation: float 9s ease-in-out infinite; }
.login-side { display: grid; place-items: center; padding: 24px; }
.login-card { background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); padding: 30px; width: min(460px, 100%); display: flex; flex-direction: column; gap: 12px; animation: rise .4s ease both; }
.login-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; } .login-brand img { width: 52px; height: 52px; } .login-brand p { margin: 2px 0 0; color: var(--ink-2); }
.step-label { font-weight: 800; color: var(--ink-3); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 4px; } .field span { font-size: .84rem; color: var(--ink-2); font-weight: 600; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 4px 0; }
.pin-dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand); transition: all .15s; } .pin-dots span.on { background: var(--brand); transform: scale(1.1); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { padding: 16px 0; font-size: 1.4rem; font-weight: 700; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; transition: all .12s; }
.keypad button:hover { background: var(--line-2); } .keypad button:active { background: var(--brand-soft); transform: scale(.96); }

/* ---------- marco: menú lateral + barra superior ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; transition: grid-template-columns .2s; }
body.compact .shell { grid-template-columns: 76px 1fr; }
.side { background: linear-gradient(180deg, var(--side) 0%, #1c1733 100%); color: #cfcbe3; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 12px; gap: 6px; overflow-y: auto; scrollbar-width: none; z-index: 30; }
.side::-webkit-scrollbar { display: none; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 14px; color: #fff; }
.side-brand .logo { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(225, 29, 72,.4); flex-shrink: 0; }
.side-brand .logo img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.side-brand strong { display: block; font-size: .98rem; line-height: 1.15; } .side-brand span { font-size: .76rem; color: #94a3b8; }
.nav-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.nav-title { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #6f6a8c; font-weight: 800; padding: 10px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; border: 0; background: none; color: #bdb8d6; padding: 10px 12px; border-radius: 12px; font-weight: 650; font-size: .93rem; text-align: left; position: relative; transition: background .15s, color .15s; white-space: nowrap; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.on { background: linear-gradient(90deg, rgba(225, 29, 72,.22), rgba(139,92,246,.12)); color: #fff; }
.nav-item.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad); }
.nav-item.on svg.i { color: #ff8fb3; }
.nav-item .new { margin-left: auto; font-size: .64rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--grad-violet); color: #fff; letter-spacing: .04em; }
.nav-item .badge { margin-left: auto; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 0; background: rgba(255,255,255,.05); color: #fff; text-align: left; }
.side-user:hover { background: rgba(255,255,255,.1); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-violet); display: grid; place-items: center; font-weight: 800; color: #fff; flex-shrink: 0; font-size: .9rem; }
.side-user div { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; } .side-user small { color: #94a3b8; font-size: .74rem; }
.collapse-btn { border: 0; background: none; color: #8f8aad; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; font-size: .85rem; font-weight: 600; }
.collapse-btn:hover { color: #fff; background: rgba(255,255,255,.05); }
body.compact .side .label, body.compact .nav-title, body.compact .side-brand div, body.compact .side-user div, body.compact .nav-item .new { display: none; }
body.compact .nav-item { justify-content: center; padding: 12px; } body.compact .nav-item .badge { position: absolute; top: 4px; right: 4px; margin: 0; }
body.compact .side-brand { justify-content: center; padding-left: 0; padding-right: 0; } body.compact .side-user, body.compact .collapse-btn { justify-content: center; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .title { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.topbar .title strong { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; } .topbar .title span { font-size: .8rem; color: var(--ink-2); }
.topbar .grow { flex: 1; }
.menu-btn { display: none; }
.loc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-weight: 700; font-size: .84rem; color: var(--ink-2); }
.badge { background: var(--bad); color: #fff; border-radius: 999px; font-size: .68rem; padding: 2px 7px; font-weight: 800; }
.status { border: 0; border-radius: 999px; padding: 7px 13px; font-weight: 800; font-size: .8rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); }
.status.ok { background: var(--ok-soft); color: var(--ok); } .status.off { background: var(--warn-soft); color: var(--warn); } .status.sync { background: var(--info-soft); color: var(--info); }
.status.ok::before { animation: pulse 2s infinite; }
main { padding: 22px 24px 40px; max-width: 1480px; width: 100%; margin: 0 auto; }
.view-body > * { animation: rise .35s ease both; }
.view-body > *:nth-child(2) { animation-delay: .04s; } .view-body > *:nth-child(3) { animation-delay: .08s; } .view-body > *:nth-child(4) { animation-delay: .12s; } .view-body > *:nth-child(5) { animation-delay: .16s; } .view-body > *:nth-child(n+6) { animation-delay: .2s; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; justify-content: space-between; margin-bottom: 18px; }
.page-head p.muted { margin: 6px 0 0; max-width: 760px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; border: 1px solid var(--line-2); }
.card.narrow { max-width: 440px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; } .card-head h2 { margin: 0; }
.empty { text-align: center; padding: 48px 16px; color: var(--ink-2); }
.stack { display: flex; flex-direction: column; gap: 10px; } .stack > p { margin: 0; }
.cols { display: grid; grid-template-columns: 3fr 2fr; gap: 18px; } .cols > .stack { gap: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-21 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.grid-2 > .card, .grid-3 > .card, .grid-21 > .card, .cols > .card { margin-bottom: 0; }
.section { margin-bottom: 18px; }

/* ---------- caja ---------- */
.pos { display: grid; grid-template-columns: 1fr 390px; gap: 18px; align-items: start; }
.pos > *, main, .card, .table-wrap { min-width: 0; }
.cats { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 2px; }
.cat { border: 1.5px solid var(--line); background: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 800; white-space: nowrap; transition: all .15s; }
.cat:hover { border-color: #d9d4e6; }
.cat.on { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 6px 16px rgba(23,20,43,.2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 14px; }
.tile { background: #fff; border: 1.5px solid var(--line-2); border-radius: var(--radius); padding: 16px 14px 14px; min-height: 118px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; box-shadow: var(--shadow); transition: transform .12s, box-shadow .15s, border-color .15s; position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); opacity: .85; }
.grid .tile:nth-child(4n+2)::before { background: var(--grad-violet); } .grid .tile:nth-child(4n+3)::before { background: var(--grad-mint); } .grid .tile:nth-child(4n+4)::before { background: var(--grad-sun); }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #e5e0f0; }
.tile:active { transform: scale(.97); background: var(--brand-soft); }
.tile-name { font-weight: 800; font-size: 1.04rem; letter-spacing: -.01em; } .tile-sub { color: var(--ink-2); font-size: .86rem; }
.tile-price { margin-top: auto; font-weight: 800; font-size: 1.12rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ticket { background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; position: sticky; top: 84px; max-height: calc(100vh - 104px); border: 1px solid var(--line-2); overflow: hidden; }
.ticket-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; } .ticket-head h2 { margin: 0; }
.lines { flex: 1; overflow-y: auto; padding: 6px 18px; min-height: 120px; }
.line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--line); animation: rise .2s ease both; }
.line-main { display: flex; flex-direction: column; } .line-main small { color: var(--ink-2); }
.qty { display: flex; align-items: center; gap: 6px; } .qty button { width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; font-weight: 800; }
.line-total { font-weight: 800; min-width: 58px; text-align: right; }
.ticket-foot { padding: 16px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; background: linear-gradient(180deg, #fff, #fbfaff); }
.row { display: flex; justify-content: space-between; align-items: center; } .row.total { font-size: 1.45rem; font-weight: 800; margin: 4px 0 8px; letter-spacing: -.02em; }

/* ---------- ventanas ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(18, 14, 34, .5); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s ease both; }
.modal { background: #fff; border-radius: 24px; width: min(480px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.3); animation: pop .22s cubic-bezier(.2,.9,.3,1.2) both; }
.modal.wide { width: min(800px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 8px; } .modal-head h2 { margin: 0; }
.modal-body { padding: 8px 20px 20px; overflow-y: auto; }
.form { display: flex; flex-direction: column; gap: 12px; } .form label { display: flex; flex-direction: column; gap: 5px; } .form label > span { font-size: .84rem; color: var(--ink-2); font-weight: 600; }
.form small { color: var(--ink-2); } .form .check { flex-direction: row; align-items: center; gap: 10px; } .check input { width: 20px; height: 20px; accent-color: var(--brand); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stepper { display: flex; flex-direction: column; gap: 12px; }
.steps { display: flex; gap: 6px; overflow-x: auto; }
.step { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 12px; text-align: left; display: flex; flex-direction: column; font-weight: 700; font-size: .9rem; min-width: 96px; }
.step small { font-weight: 500; color: var(--ink-2); font-size: .78rem; } .step.on { border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 3px var(--brand-soft); } .step.done:not(.on) { background: var(--ok-soft); }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.opt { border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 18px 12px; font-weight: 800; font-size: 1.02rem; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: all .12s; }
.opt:hover { border-color: #d9d4e6; transform: translateY(-1px); }
.opt small { font-weight: 700; color: var(--brand-ink); } .opt.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(225, 29, 72,.3); } .opt.on small { color: #fff; }
.stepper-foot { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; } .stepper-foot span { flex: 1; font-weight: 800; }
.pay { display: flex; flex-direction: column; gap: 14px; }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; } .pay-total strong { font-size: 2.1rem; letter-spacing: -.03em; }
.change { font-size: 1.5rem; font-weight: 800; color: var(--ok); text-align: center; padding: 10px; background: var(--ok-soft); border-radius: 14px; } .change.bad { color: var(--bad); background: var(--bad-soft); }
.big-check { width: 76px; height: 76px; border-radius: 50%; background: var(--grad-mint); color: #fff; font-size: 2.4rem; display: grid; place-items: center; margin: 0 auto; box-shadow: 0 10px 30px rgba(16,185,129,.35); animation: pop .35s cubic-bezier(.2,.9,.3,1.4) both; }
.receipt-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 8px; }
.recipe-row { display: grid; grid-template-columns: 1fr 100px 36px 40px; gap: 8px; align-items: center; }
.count-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; max-height: 50vh; overflow-y: auto; }
.count-row { display: grid !important; grid-template-columns: 1fr 100px 24px; gap: 8px; align-items: center; } .count-row span { font-size: .95rem !important; color: var(--ink) !important; }

/* ---------- tablas e indicadores ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 800; background: #fcfbfe; }
th:first-child { border-top-left-radius: 10px; } th:last-child { border-top-right-radius: 10px; }
td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; } td small { color: var(--ink-2); }
tbody tr { transition: background .12s; } tbody tr:hover td { background: #fbfaff; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--brand-soft); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; } .kpis.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0; }
.kpi { background: #fff; border-radius: 16px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 5px; border: 1px solid var(--line-2); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line); }
.card .kpi { box-shadow: none; background: #fbfaff; }
.kpi span { font-size: .8rem; color: var(--ink-2); font-weight: 600; } .kpi strong { font-size: 1.32rem; letter-spacing: -.02em; }
.kpi.ok::after { background: var(--ok); } .kpi.warn::after { background: var(--warn); } .kpi.bad::after { background: var(--bad); }
/* tarjeta métrica grande */
.metric { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.metric:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.metric .m-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric .m-label { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.metric .m-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 6px 16px rgba(225, 29, 72,.28); }
.metric.violet .m-icon { background: var(--grad-violet); box-shadow: 0 6px 16px rgba(139,92,246,.3); } .metric.mint .m-icon { background: var(--grad-mint); box-shadow: 0 6px 16px rgba(16,185,129,.3); }
.metric.sun .m-icon { background: var(--grad-sun); box-shadow: 0 6px 16px rgba(245,158,11,.3); } .metric.sky .m-icon { background: var(--grad-sky); box-shadow: 0 6px 16px rgba(59,130,246,.3); }
.metric .m-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.metric .m-foot { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--ink-2); flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: .78rem; padding: 3px 8px; border-radius: 999px; }
.delta.up { background: var(--ok-soft); color: var(--ok); } .delta.down { background: var(--bad-soft); color: var(--bad); } .delta.flat { background: var(--line-2); color: var(--ink-2); }
.metric svg.spark { position: absolute; right: 12px; bottom: 10px; opacity: .9; }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 18px; }

/* ---------- héroe de inicio ---------- */
.hero { border-radius: 24px; padding: 26px 28px; color: #fff; background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.18) 0, transparent 30%), linear-gradient(120deg, #0f172a 0%, #1e2a45 40%, #e11d48 72%, #d97706 100%);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; position: relative; overflow: hidden; box-shadow: 0 18px 40px rgba(124,77,255,.25); }
.hero::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.07); right: -60px; bottom: -120px; animation: float 8s ease-in-out infinite; }
.hero h1 { font-size: 1.9rem; color: #fff; } .hero p { margin: 8px 0 0; opacity: .92; font-size: 1rem; max-width: 640px; line-height: 1.45; }
.hero .hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .btn { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.28); backdrop-filter: blur(6px); }
.hero .btn:hover { background: rgba(255,255,255,.26); }
.hero .btn.solid { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- gráficos ---------- */
.chart { width: 100%; display: block; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .axis { fill: var(--ink-3); font-size: 11px; font-weight: 600; }
.chart .area { opacity: .9; } .chart .line-main { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .line-ghost { fill: none; stroke: #c9c4da; stroke-width: 2; stroke-dasharray: 5 5; }
.chart .dot { transition: r .15s; } .chart .hit { fill: transparent; cursor: crosshair; }
.chart .bar-r { transition: opacity .15s; } .chart .bar-r:hover { opacity: .8; }
.chart-tip { position: fixed; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 11px; border-radius: 10px; font-size: .82rem; font-weight: 600; z-index: 200; box-shadow: var(--shadow-lg); white-space: nowrap; transform: translate(-50%, -115%); }
.legend-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.legend-row i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: .9rem; }
.hbar .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hbar .val { font-weight: 800; font-size: .86rem; }
.hbar .track { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 999px; background: var(--grad); animation: grow .7s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }
.hbars .hbar:nth-child(2) .fill { background: var(--grad-violet); } .hbars .hbar:nth-child(3) .fill { background: var(--grad-sky); } .hbars .hbar:nth-child(4) .fill { background: var(--grad-mint); } .hbars .hbar:nth-child(5) .fill { background: var(--grad-sun); }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.heat { display: grid; grid-template-columns: 38px repeat(var(--cols), minmax(0, 1fr)); gap: 3px; font-size: .72rem; }
.heat .hd { color: var(--ink-3); font-weight: 700; text-align: center; padding-bottom: 2px; } .heat .rl { color: var(--ink-2); font-weight: 700; display: flex; align-items: center; }
.heat .cell { aspect-ratio: 1.6; border-radius: 6px; background: var(--line-2); transition: transform .1s; min-height: 18px; }
.heat .cell:hover { transform: scale(1.15); outline: 2px solid #fff; box-shadow: var(--shadow); }
.bars { display: flex; gap: 8px; align-items: flex-end; height: 200px; padding-top: 18px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.bar { width: 100%; max-width: 54px; background: var(--grad); border-radius: 8px 8px 3px 3px; min-height: 2px; animation: grow-y .6s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.bar-val { font-size: .72rem; color: var(--ink-2); white-space: nowrap; font-weight: 600; } .bar-label { font-size: .74rem; color: var(--ink-2); white-space: nowrap; font-weight: 600; }
.bars.pairs .pair { display: flex; gap: 2px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bars.pairs .bar { max-width: 18px; } .bar.ghost { background: #ddd8ea !important; }
.bars.mini { height: 120px; } .bars.mini .bar { max-width: 28px; }
.legend { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; }
.legend.now { background: var(--brand); } .legend.avg { background: #ddd8ea; }

/* ---------- recomendaciones y marketing ---------- */
.recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.rec { background: #fff; border-radius: var(--radius); border: 1px solid var(--line-2); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.rec:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.rec::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.rec.urgent::before { background: linear-gradient(90deg, #ef4444, #d97706); }
.rec-top { display: flex; align-items: center; gap: 10px; }
.rec-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--grad); flex-shrink: 0; }
.rec.k-clientes .rec-icon, .rec.k-clientes::before { background: var(--grad-violet); } .rec.k-inventario .rec-icon { background: linear-gradient(135deg, #ef4444, #d97706); }
.rec.k-calendario .rec-icon, .rec.k-calendario::before { background: var(--grad-sky); } .rec.k-precio .rec-icon, .rec.k-precio::before { background: var(--grad-sun); }
.rec.k-sabores .rec-icon, .rec.k-sabores::before, .rec.k-venta-en-caja .rec-icon, .rec.k-venta-en-caja::before { background: var(--grad-mint); }
.rec-kind { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.rec h3 { margin: 0; font-size: 1.04rem; line-height: 1.3; letter-spacing: -.01em; }
.rec p { margin: 0; color: var(--ink-2); font-size: .9rem; line-height: 1.45; }
.rec ol { margin: 0; padding-left: 20px; font-size: .9rem; display: flex; flex-direction: column; gap: 4px; } .rec ol li::marker { color: var(--brand); font-weight: 800; }
.impact { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, #f1fbf6, #eefbfd); border: 1px solid #d6f3e6; }
.impact strong { font-size: 1.15rem; color: var(--ok); letter-spacing: -.01em; white-space: nowrap; } .impact span { font-size: .8rem; color: var(--ink-2); line-height: 1.3; }
.msg-box { background: #f7f5ff; border: 1.5px dashed #d8cff9; border-radius: 14px; padding: 12px 14px; font-size: .9rem; line-height: 1.45; display: flex; flex-direction: column; gap: 8px; }
.msg-box .row-btns { margin: 0; }
.rec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.rec-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.opportunity { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.opportunity .big { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; background: var(--grad-mint); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- asistente (chat) ---------- */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.chat { background: #fff; border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--line-2); display: flex; flex-direction: column; height: calc(100vh - 190px); min-height: 480px; overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; background: radial-gradient(circle at 100% 0, #faf5ff 0, transparent 40%), #fff; }
.bubble { max-width: 82%; padding: 13px 16px; border-radius: 18px; line-height: 1.5; font-size: .94rem; animation: rise .25s ease both; }
.bubble.me { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 8px 20px rgba(225, 29, 72,.25); }
.bubble.bot { align-self: flex-start; background: #f6f4fb; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.bot ul { margin: 6px 0; padding-left: 20px; } .bubble.bot p { margin: 6px 0; } .bubble.bot p:first-child { margin-top: 0; }
.bubble .src { display: flex; gap: 6px; align-items: center; margin-top: 10px; font-size: .74rem; color: var(--ink-3); font-weight: 700; }
.bot-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .82rem; color: var(--ink-2); margin-bottom: 4px; }
.bot-head .avatar { width: 26px; height: 26px; font-size: .72rem; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-3); animation: blink 1.2s infinite; } .typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: #fff; }
.chat-input textarea { flex: 1; resize: none; height: 48px; max-height: 140px; border-radius: 14px; }
.suggest { display: flex; flex-direction: column; gap: 8px; }
.suggest button { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 11px 13px; font-weight: 650; font-size: .88rem; display: flex; gap: 10px; align-items: center; transition: all .15s; }
.suggest button:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateX(2px); }
.ai-state { display: flex; gap: 12px; align-items: flex-start; }
.ai-orb { width: 46px; height: 46px; border-radius: 50%; background: var(--grad-violet); display: grid; place-items: center; color: #fff; flex-shrink: 0; box-shadow: 0 0 0 6px #f1ebff; }
.ai-orb.on { animation: glow 2.4s ease-in-out infinite; }
code.path { font-size: .78rem; background: var(--line-2); padding: 3px 6px; border-radius: 6px; word-break: break-all; }

/* ---------- Crecer y otras pantallas ---------- */
.subtabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; padding: 4px; background: #fff; border-radius: 14px; border: 1px solid var(--line-2); box-shadow: var(--shadow); width: fit-content; max-width: 100%; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs .chip { white-space: nowrap; padding: 8px 14px; border: 0; background: none; color: var(--ink-2); flex-direction: row; gap: 6px; }
.subtabs .chip:hover { background: var(--line-2); color: var(--ink); }
.subtabs .chip.on { background: var(--ink); color: #fff; }
.tile.soldout { opacity: .55; background: repeating-linear-gradient(135deg, #fff 0 10px, #f5f3fa 10px 20px); }
.tile.soldout .tile-sub { color: var(--bad); font-weight: 800; }
.opt.soldout { opacity: .45; text-decoration: line-through; }
.soldout-btn { border-style: dashed; } .soldout-btn .badge { margin-left: 6px; }
.chip.soldout-chip { background: var(--bad-soft); border-color: #ffc9c9; color: var(--bad); }
.promo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.chip.promo { padding: 6px 12px; font-size: .84rem; border-color: var(--brand); color: var(--brand-ink); flex-direction: row; }
.chip.promo.on { background: var(--grad); color: #fff; border-color: transparent; }
.quadrants { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 18px; }
.quad { background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); border: 1px solid var(--line-2); border-top: 4px solid var(--line); }
.quad small { display: block; color: var(--ink-2); } .quad p { margin: 6px 0 0; font-size: .9rem; }
.quad.ok { border-top-color: var(--ok); } .quad.warn { border-top-color: var(--warn); } .quad.bad { border-top-color: var(--bad); } .quad.info { border-top-color: var(--info); }
.card.note { border-left: 5px solid var(--info); } .card.note p { margin: 0 0 6px; }
.cal-list { list-style: none; padding: 0; margin: 0; } .cal-list li { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.checklist { list-style: none; padding: 0; margin: 0; } .checklist li { padding: 10px 0; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 2px; }
.checklist li.ok strong { color: var(--ok); } .checklist li.no strong { color: var(--warn); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; max-height: 220px; overflow-y: auto; padding: 6px 0; }
.check-inline { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.form .check-grid .check, .form .check-inline .check, .form .two .check { flex-direction: row; align-items: center; gap: 6px; font-size: .9rem; }
.switch-cal { display: flex; flex-wrap: wrap; gap: 4px; } .sw { font-size: .75rem; padding: 3px 6px; border-radius: 6px; }
.sw.tratamiento { background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; } .sw.control { background: var(--line-2); color: var(--ink-2); border: 1px solid var(--line); }
.alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.alerts li { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; background: #fbfaff; border: 1px solid var(--line-2); font-size: .9rem; }
.alerts li .a-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--line-2); color: var(--ink-2); }
.alerts li.bad .a-ic { background: var(--bad-soft); color: var(--bad); } .alerts li.warn .a-ic { background: var(--warn-soft); color: var(--warn); } .alerts li.info .a-ic { background: var(--info-soft); color: var(--info); } .alerts li.ok .a-ic { background: var(--ok-soft); color: var(--ok); }
.alerts li div { display: flex; flex-direction: column; min-width: 0; } .alerts li small { color: var(--ink-2); }
.flavor-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.flavor-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #fbfaff; border: 1px solid var(--line); font-weight: 700; font-size: .86rem; }
.flavor-chip b { font-weight: 800; } .flavor-chip .up { color: var(--ok); } .flavor-chip .down { color: var(--bad); }
.mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mini-stat { padding: 12px; border-radius: 14px; background: #fbfaff; border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 2px; cursor: pointer; transition: all .15s; }
.mini-stat:hover { border-color: var(--brand); background: var(--brand-soft); }
.mini-stat strong { font-size: 1.4rem; letter-spacing: -.02em; } .mini-stat span { font-size: .8rem; color: var(--ink-2); font-weight: 600; }

/* V3: caja con tickets, cocina TV, administración */
.ticket-tools { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 18px 0; }
.chip.small { padding: 6px 11px; font-size: .82rem; flex-direction: row; gap: 4px; }
.line.sent { background: #fff8f0; } .sent-tag { color: #d9480f; font-weight: 700; }
.two-btns { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0; }
.ticket-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; transition: all .12s; }
.ticket-pick:hover { border-color: var(--brand); background: var(--brand-soft); }
.ticket-pick span { color: var(--ink-2); font-size: .88rem; }
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.kds-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 10px; border-top: 6px solid #fab005; animation: rise .25s ease both; }
.kds-card.ready { border-top-color: var(--ok); } .kds-card.late { border-top-color: var(--bad); }
.kds-head { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; font-size: .85rem; color: var(--ink-2); } .kds-head strong { font-size: 1.45rem; color: var(--ink); }
.kds-card ul { margin: 0; padding-left: 18px; } .kds-card li { margin-bottom: 6px; } .kds-card li small { display: block; color: var(--ink-2); }
.review-head { display: flex; justify-content: space-between; align-items: center; }
.kds-head-bar .chips { flex: 1; }
.kds-card.s-NEW, .kds-card.s-ACKNOWLEDGED { border-top-color: #fab005; } .kds-card.s-IN_PROGRESS { border-top-color: var(--info); } .kds-card.s-READY { border-top-color: var(--ok); opacity: .85; }
.kds-card.late { border-top-color: var(--bad); box-shadow: 0 0 0 2px var(--bad-soft), var(--shadow); } .kds-card.late .kds-time { color: var(--bad); }
.kds-time { font-variant-numeric: tabular-nums; font-weight: 800; } .kds-card .note { color: #a63c06; }
.kds-ready { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--ok-soft); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
body.tv .side, body.tv .topbar { display: none; } body.tv .shell { grid-template-columns: 1fr; } body.tv main { max-width: none; padding: 12px; } body.tv { background: #0f0d1a; }
body.tv .page-head h1, body.tv .page-head .muted { color: #eee; } body.tv .kds-card .muted { color: var(--ink-2); } body.tv .kds { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
body.tv .kds-card { font-size: 1.25rem; } body.tv .kds-head strong { font-size: 2rem; } body.tv .kds-card li small { font-size: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; } .form-grid span { font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.inv-lines input, .inv-lines select { padding: 6px 8px; font-size: .9rem; width: 100%; } .inv-lines td { vertical-align: middle; }
.inv-lines select { min-width: 190px; } .inv-lines td:first-child input { min-width: 230px; }
.modal.wide:has(.inv-lines) { width: min(1180px, 100%); }
input.num { max-width: 90px; text-align: right; } .inline { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sim { display: flex; flex-direction: column; gap: 6px; } .sim > label { display: flex; gap: 10px; align-items: center; }
.sim-row { display: grid; grid-template-columns: 1fr 120px 120px; gap: 8px; align-items: center; font-size: .9rem; }
.sim-row label { display: flex; align-items: center; gap: 4px; } .sim-row input { width: 70px; padding: 6px; }
.sim-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.todo { margin: 0; padding-left: 18px; } .todo li { margin: 6px 0; }
.station-row { display: grid; grid-template-columns: 1fr 120px 2fr auto; gap: 10px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.station-row label { display: flex; flex-direction: column; gap: 4px; } .station-row span { font-size: .8rem; color: var(--ink-2); font-weight: 600; }

/* ---------- clientes y fidelidad ---------- */
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: .73rem; padding: 3px 9px; border-radius: 999px; background: var(--warn-soft); color: #8a4b00; white-space: nowrap; font-weight: 700; }
.tag.seg-frecuente, .tag.seg-vip { background: var(--ok-soft); color: var(--ok); }
.tag.seg-dormido, .tag.seg-en_riesgo { background: var(--bad-soft); color: var(--bad); }
.tag.seg-cumple { background: #fde7f3; color: #9b1c63; } .tag.seg-nuevo { background: var(--info-soft); color: var(--info); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.profile h3 { margin: 12px 0 4px; }
.consent-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.consent { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); }
.consent.on { border-color: var(--ok); background: var(--ok-soft); }
.points-use { padding: 12px; border-radius: 14px; background: var(--ok-soft); border: 1.5px solid var(--ok); }
.crm-search { width: 100%; margin: 12px 0; }

/* ---------- avisos ---------- */
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(560px, calc(100% - 32px)); }
.toast { padding: 13px 18px; border-radius: 14px; color: #fff; font-weight: 700; box-shadow: 0 12px 30px rgba(0,0,0,.22); background: linear-gradient(135deg, #16a34a, #10b981); animation: pop .25s ease both; }
.toast.warn { background: linear-gradient(135deg, #d97706, #f59e0b); } .toast.err { background: linear-gradient(135deg, #ef4444, #e11d48); }

/* ---------- animaciones ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 0%, transparent); } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 6px #f1ebff; } 50% { box-shadow: 0 0 0 10px #e7dcff; } }
@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- ticket impreso ---------- */
#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; }
  .receipt { width: 72mm; font-family: ui-monospace, monospace; font-size: 12px; } .receipt h3 { text-align: center; margin: 0; } .receipt p { margin: 2px 0; text-align: center; }
  .rrow { display: flex; justify-content: space-between; } .rrow.strong { font-weight: 700; font-size: 14px; } .receipt small { display: block; padding-left: 10px; }
}

/* ---------- tableta y teléfono ---------- */
@media (max-width: 1200px) { .grid-3 { grid-template-columns: 1fr 1fr; } .chat-layout { grid-template-columns: 1fr; } .chat { height: 70vh; } }
@media (max-width: 1000px) { .grid-21, .grid-2 { grid-template-columns: 1fr; } .login { grid-template-columns: 1fr; } .login-hero { display: none; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr !important; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  body.nav-open .side { transform: none; } body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(18,14,34,.45); z-index: 25; }
  body.compact .side .label, body.compact .nav-title, body.compact .side-brand div, body.compact .side-user div { display: revert; }
  body.compact .nav-item { justify-content: flex-start; padding: 10px 12px; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 10px 14px; } .topbar .loc-chip { display: none; }
  main { padding: 16px 14px 32px; }
  .pos { grid-template-columns: 1fr; } .ticket { position: static; max-height: none; } .cols, .grid-3 { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .receipt-row { grid-template-columns: 1fr 1fr; } .station-row, .sim-row { grid-template-columns: 1fr; } .sim-out { grid-template-columns: 1fr; }
  .recs { grid-template-columns: 1fr; } .hero { padding: 20px; } .hero h1 { font-size: 1.45rem; }
  h1 { font-size: 1.4rem; }
}

/* ---------- ayudas al pasar el ratón ---------- */
.help-pop { position: fixed; z-index: 300; max-width: 290px; padding: 8px 11px; border-radius: 8px; background: #0f172a; color: #f8fafc; font-size: 13px; line-height: 1.45; font-weight: 500;
  box-shadow: 0 10px 28px rgba(15,23,42,.35); pointer-events: none; display: none; animation: fade .12s ease both; }
h2[data-tip]::after, h3[data-tip]::after, th[data-tip]::after, .kpi[data-tip] > span::after, .metric[data-tip] .m-label::after { content: " ⓘ"; color: var(--ink-3); font-weight: 500; font-size: .85em; }
.side-brand .logo.logo-img { background: #fff; overflow: hidden; padding: 3px; } .side-brand .logo.logo-img img { width: 100%; height: 100%; object-fit: contain; filter: none; }
.login-brand img.brand-logo-img { width: 120px; height: auto; }

/* ---------- tipo de pedido y formas de pago ---------- */
.order-type { display: flex; flex-direction: column; gap: 8px; padding: 10px 18px 0; }
.order-type .seg button { font-size: .86rem; padding: 10px 6px; }
.pay-type { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--brand-soft); border: 1.5px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.pay-type span { font-size: 1.3rem; } .pay-type strong { font-size: 1.02rem; } .pay-type small { color: var(--ink-2); width: 100%; } .pay-type .link { margin-left: auto; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay-methods button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 6px; font-weight: 800; font-size: .9rem; transition: all .12s; }
.pay-methods button:hover { border-color: #d9d4e6; } .pay-methods button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- COMANDAQO: logotipo hexagonal y firma «Un producto de RUNEQO» ---------- */
.side-brand .logo.logo-hex { background: transparent; box-shadow: none; padding: 0; }
.side-brand .logo.logo-hex img { width: 40px; height: 40px; filter: none; }
.maker { display: block; font-size: .74rem; color: var(--ink-3); text-decoration: none; text-align: center; padding: 6px 0 2px; letter-spacing: .01em; }
.maker strong { font-weight: 800; background: linear-gradient(90deg, #2dd4bf, #6366f1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.maker:hover { text-decoration: underline; }
.side .maker { color: #8b87a8; }
.login-brand img { width: 52px; height: 52px; }
.login-stack { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(460px, 100%); }

.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form .field { display: flex; flex-direction: column; gap: 4px; } .login-form .field span { font-weight: 650; font-size: .9rem; } .login-form .field small { color: var(--ink-2); font-size: .8rem; }
.login-links { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 4px; }
button.link { background: none; border: 0; color: var(--brand); font-weight: 650; padding: 4px; font-size: .9rem; } button.link:hover { text-decoration: underline; }
input.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }

.menu-cat { padding: 10px 0; border-top: 1px solid var(--line-2); } .menu-cat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
textarea { font: inherit; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); width: 100%; }

.chips.choice { display: flex; flex-wrap: wrap; gap: 8px; } .chips.choice .chip { flex: 1 1 140px; justify-content: center; }
.check-inline.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; margin: 10px 0 14px; }

/* ---------- identidad oficial ---------- */
.maker { color: #94a3b8; } .maker strong { background: none; color: #94a3b8; -webkit-text-fill-color: #94a3b8; font-weight: 700; }
.maker img { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.login-hero .hero-logo { height: 44px; width: auto; display: block; }
.side-brand .logo.logo-hex img { width: 38px; height: 38px; }
.info { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 5px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #475569; background: #e2e8f0; cursor: help; vertical-align: 1px; font-style: normal; }
.info:focus-visible { outline: 2px solid var(--brand); }
.empty-guide { text-align: center; padding: 26px 16px; color: var(--ink-2); } .empty-guide p { margin: 0 0 12px; } .empty-guide strong { display: block; color: var(--ink); margin-bottom: 4px; }

.legal-links { font-size: .74rem; color: #94a3b8; text-align: center; } .legal-links a { color: #94a3b8; }

/* ---------- dirección propia de cada negocio (<nombre>.comandaqo.com) ---------- */
.biz-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.biz-head img { width: 52px; height: 52px; object-fit: contain; border-radius: 10px; }
.biz-head strong { display: block; font-size: 1.12rem; line-height: 1.2; } .biz-head small { color: var(--ink-3); }
.biz-initials { width: 52px; height: 52px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.2rem; background: linear-gradient(135deg, #f59e0b, #f43f5e); }
.slug-row { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.slug-row:focus-within { border-color: var(--brand); }
.slug-row input { border: 0 !important; flex: 1; min-width: 0; box-shadow: none !important; }
.slug-suffix { display: flex; align-items: center; padding: 0 12px; background: #f1f5f9; color: var(--ink-2); font-size: .9rem; white-space: nowrap; }
.slug-status { display: block; min-height: 1.2em; margin-top: 4px; } .slug-status.ok { color: #047857; } .slug-status.bad { color: #be123c; }
.logo-row { display: flex; gap: 16px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.logo-preview { width: 96px; height: 96px; flex: none; border: 1.5px dashed var(--line); border-radius: 14px; display: grid; place-items: center; background: #fff; overflow: hidden; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
