/* VentaPro — "rótulo de tiendita": colores de mercado, letra geométrica de cartel (TeX Gyre Adventor)
   para títulos y cifras, Inter para leer. Un solo adorno: la tira de papel picado.
   Fuentes incluidas en /fonts (funciona sin internet). */
@font-face { font-family: "Inter VP"; src: url("/fonts/inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter VP"; src: url("/fonts/inter-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter VP"; src: url("/fonts/inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter VP"; src: url("/fonts/inter-Bold.woff") format("woff"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "Cartel"; src: url("/fonts/adventor-bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --ink: #1d1b3f;        /* tinta */
  --ink-2: #4d4a73;
  --ink-3: #8a87ab;
  --bg: #f3f3f8;
  --paper: #ffffff;
  --sunk: #ebeaf4;
  --line: #e3e2ee;
  --line-2: #cfcde0;
  --rosa: #d61f69;       /* rosa mexicano: acciones */
  --rosa-ink: #ffffff;
  --rosa-soft: #fde6ef;
  --maiz: #f5b300;       /* amarillo maiz */
  --maiz-soft: #fff3cc;
  --maiz-ink: #6b4b00;
  --nopal: #0a8f5a;      /* dinero, listo */
  --nopal-soft: #dcf4e8;
  --talavera: #2c5bd6;   /* informacion */
  --talavera-soft: #e4ebfc;
  --naranja: #ee6c1b;
  --naranja-soft: #fdebdc;
  --chile: #cf3427;      /* peligro */
  --chile-soft: #fbe4e1;
  --side: #1d1b3f;
  --side-2: #2a2856;
  --side-ink: #ecebf7;
  --side-mute: #a9a6cc;
  --shadow: 0 1px 2px rgba(29, 27, 63, .06), 0 6px 18px rgba(29, 27, 63, .06);
  --shadow-lg: 0 24px 60px rgba(29, 27, 63, .28);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --font: "Inter VP", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display: "Cartel", "Avenir Next", "Century Gothic", "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", ui-monospace, monospace;
  /* compatibilidad con estilos en linea anteriores */
  --agave: var(--rosa); --agave-soft: var(--rosa-soft); --mango: var(--maiz); --mango-soft: var(--maiz-soft); --sky: var(--talavera); --sky-soft: var(--talavera-soft);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ecebf7; --ink-2: #b6b3d4; --ink-3: #807da3; --bg: #121027; --paper: #1b1935; --sunk: #232046; --line: #2c2953; --line-2: #3b386a;
    --rosa: #f04d8c; --rosa-soft: #3d1630; --maiz: #ffc634; --maiz-soft: #3a2d0a; --maiz-ink: #ffd76a; --nopal: #2fc283; --nopal-soft: #0e3325;
    --talavera: #7d9dff; --talavera-soft: #1a2550; --naranja: #ff8c46; --naranja-soft: #3b2212; --chile: #ff6b5c; --chile-soft: #3c1714;
    --side: #0d0b20; --side-2: #1f1c40; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #ecebf7; --ink-2: #b6b3d4; --ink-3: #807da3; --bg: #121027; --paper: #1b1935; --sunk: #232046; --line: #2c2953; --line-2: #3b386a;
  --rosa: #f04d8c; --rosa-soft: #3d1630; --maiz: #ffc634; --maiz-soft: #3a2d0a; --maiz-ink: #ffd76a; --nopal: #2fc283; --nopal-soft: #0e3325;
  --talavera: #7d9dff; --talavera-soft: #1a2550; --naranja: #ff8c46; --naranja-soft: #3b2212; --chile: #ff6b5c; --chile-soft: #3c1714;
  --side: #0d0b20; --side-2: #1f1c40; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--rosa); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-family: var(--display); font-size: 1.85rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.005em; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
.neg { color: var(--chile); }
.txt-ok { color: var(--nopal); }
.danger-text { color: var(--chile) !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--rosa) 55%, transparent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- papel picado: la tira de colores (unico adorno) ---------- */
.picado, .auth-card .panel::before, .public::before, .kiosk-welcome::before { content: ""; display: block; height: 22px; position: relative; flex: none; background: linear-gradient(90deg, var(--rosa) 0 20%, var(--maiz) 20% 40%, var(--nopal) 40% 60%, var(--talavera) 60% 80%, var(--naranja) 80% 100%) 0 0 / 260px 100%;
  -webkit-mask: radial-gradient(circle at 50% 100%, #0000 5.5px, #000 6px) 0 0 / 13px 100% repeat-x; mask: radial-gradient(circle at 50% 100%, #0000 5.5px, #000 6px) 0 0 / 13px 100% repeat-x; }
.picado::after { content: ""; position: absolute; inset: 6px 0 auto; height: 4px; background: radial-gradient(circle, var(--bg) 1.4px, transparent 1.8px) 0 0 / 13px 4px repeat-x; opacity: .55; }
.side .picado::after { background-image: radial-gradient(circle, var(--side) 1.4px, transparent 1.8px); }
.picado::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(0,0,0,.12); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--side-2) transparent; }
.brand { display: flex; align-items: center; gap: 11px; padding: 16px 16px 12px; font-weight: 700; font-size: 1rem; line-height: 1.2; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--rosa); color: #fff; display: grid; place-items: center; font: 700 1.15rem var(--display); flex: none; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.brand small { display: block; font-weight: 500; color: var(--side-mute); font-size: .78rem; margin-top: 2px; }
.ctx { padding: 2px 14px 10px; }
.ctx select { width: 100%; background: var(--side-2); color: var(--side-ink); border-color: transparent; }
.nav { padding: 4px 10px 16px; display: grid; gap: 2px; }
.nav-group { margin: 14px 8px 6px; font-size: .76rem; color: var(--side-mute); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.nav-group::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--g, var(--rosa)); transform: rotate(45deg); }
.nav a { --g: var(--rosa); display: flex; align-items: center; gap: 11px; padding: 7px 9px; border-radius: 10px; color: var(--side-ink); text-decoration: none; font-weight: 500; font-size: .93rem; }
.nav a svg { width: 18px; height: 18px; flex: none; padding: 5px; box-sizing: content-box; border-radius: 8px; background: color-mix(in srgb, var(--g) 22%, transparent); color: color-mix(in srgb, var(--g) 70%, #fff); }
.nav a:hover { background: var(--side-2); }
.nav a.on { background: var(--paper); color: var(--ink); font-weight: 600; }
.nav a.on svg { background: var(--g); color: #fff; }
.nav .g-vender { --g: var(--rosa); } .nav .g-admin { --g: #6f8cff; } .nav .g-pantallas { --g: var(--naranja); } .nav .g-plataforma { --g: var(--maiz); } .nav .g-cuenta { --g: #2fc283; }
.side-foot { margin-top: auto; padding: 12px 14px 14px; border-top: 1px solid var(--side-2); font-size: .85rem; }
.side-foot a { color: var(--side-ink); }
.side-foot .btn-ghost { color: var(--side-mute); }
.side-foot .btn-ghost:hover { background: var(--side-2); color: #fff; }
.main { min-width: 0; }
.topbar { display: none; }
.page { padding: 26px 30px 70px; max-width: 1320px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head > div > a.small { display: inline-block; margin-bottom: 4px; font-weight: 600; text-decoration: none; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--nopal-soft); color: var(--nopal); white-space: nowrap; }
.status-pill.off { background: var(--maiz-soft); color: var(--maiz-ink); }
.side .status-pill { background: color-mix(in srgb, var(--nopal) 25%, transparent); color: #9ff0c9; }
.side .status-pill.off { background: color-mix(in srgb, var(--maiz) 25%, transparent); color: var(--maiz); }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat .v { font-size: 1.3rem; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--side); color: var(--side-ink); position: sticky; top: 0; z-index: 20; }
  .topbar .btn-ghost { color: var(--side-ink); }
  .page { padding: 18px 16px 90px; }
  h1 { font-size: 1.5rem; }
}

/* ---------- controles ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font: 600 .92rem var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 40px; transition: background-color .12s, border-color .12s, transform .06s; }
.btn:hover { border-color: var(--ink-3); background: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--rosa); border-color: var(--rosa); color: var(--rosa-ink); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.btn-primary:hover { background: color-mix(in srgb, var(--rosa) 88%, #000); border-color: transparent; }
.btn-danger { background: var(--chile); border-color: var(--chile); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.btn-danger:hover { background: color-mix(in srgb, var(--chile) 88%, #000); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--sunk); border-color: transparent; }
.btn-sm { padding: 5px 11px; min-height: 32px; font-size: .84rem; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 1.05rem; min-height: 54px; border-radius: 14px; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; text-align: left; }
.link:hover { color: var(--rosa); }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 12px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 11px; min-height: 40px; width: 100%; transition: border-color .12s, box-shadow .12s; }
textarea { min-height: 74px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rosa); box-shadow: 0 0 0 4px var(--rosa-soft); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--rosa); flex: none; margin: 0; }
input[type="color"] { padding: 3px; height: 40px; }
::placeholder { color: var(--ink-3); opacity: .8; }
.field { display: grid; gap: 5px; align-content: start; }
.field > label, .label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: .8rem; color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 9px; align-items: center; font-size: .92rem; cursor: pointer; }
/* interruptor */
.switch { display: flex; gap: 12px; align-items: center; cursor: pointer; font-weight: 500; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked { background: var(--nopal); }
.switch input:checked::after { transform: translateX(18px); }
/* opciones grandes */
.choices { border: 0; padding: 0; margin: 4px 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.choices legend { font-size: .84rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; background: var(--paper); }
.choice input { margin-top: 2px; }
.choice b { display: block; font-size: .94rem; }
.choice small { color: var(--ink-2); font-size: .8rem; }
.choice:has(input:checked) { border-color: var(--rosa); background: var(--rosa-soft); }
.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; background: var(--sunk); padding: 3px; border-radius: 12px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 13px; font: 600 .86rem var(--font); color: var(--ink-2); cursor: pointer; border-radius: 9px; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--paper); }
.stepper button { width: 34px; height: 36px; border: 0; background: var(--sunk); font: 700 1.1rem var(--font); color: var(--ink); cursor: pointer; }
.stepper input { width: 56px; border: 0; border-radius: 0; text-align: center; min-height: 36px; padding: 4px; }
.stepper input:focus { box-shadow: none; }

/* ---------- superficies ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
:is(.grid-2, .grid-3, .stack, .cards) > .panel + .panel { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head h2, .panel-head h3 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.grid-2 > *, .split > *, .form-grid > * { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 16px; align-items: start; }
.split > :last-child { position: sticky; top: 14px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split > :last-child { position: static; } }
.notice { padding: 10px 12px; border-radius: 10px; background: var(--talavera-soft); color: var(--ink); font-size: .9rem; margin: 8px 0; }
.notice.warn { background: var(--maiz-soft); color: var(--maiz-ink); }
:root[data-theme="dark"] .notice.warn { color: var(--maiz); }
.summary { background: var(--sunk); border-radius: 12px; padding: 12px; margin: 6px 0; display: grid; gap: 4px; }

/* cifras: cada una con su color */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { --t: var(--rosa); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px 14px 18px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.stat::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 5px; border-radius: 0 4px 4px 0; background: var(--t); }
.stats .stat:nth-child(5n+2) { --t: var(--nopal); } .stats .stat:nth-child(5n+3) { --t: var(--talavera); } .stats .stat:nth-child(5n+4) { --t: var(--maiz); } .stats .stat:nth-child(5n+5) { --t: var(--naranja); }
.stat.tone-rosa { --t: var(--rosa); } .stat.tone-nopal { --t: var(--nopal); } .stat.tone-maiz { --t: var(--maiz); } .stat.tone-chile { --t: var(--chile); } .stat.tone-talavera { --t: var(--talavera); }
.stat .v { font: 700 1.6rem/1.15 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; word-break: break-word; }
.stat .k { color: var(--ink-2); font-size: .84rem; margin-top: 4px; }

.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .8rem; padding: 8px 10px; border-bottom: 1.5px solid var(--line-2); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bg); }
tr.miss td { background: var(--maiz-soft); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 30px 16px; text-align: center; color: var(--ink-3); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: .76rem; font-weight: 700; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--nopal-soft); color: var(--nopal); }
.badge.warn { background: var(--maiz-soft); color: var(--maiz-ink); }
.badge.bad { background: var(--chile-soft); color: var(--chile); }
.badge.info { background: var(--talavera-soft); color: var(--talavera); }
:root[data-theme="dark"] .badge.warn { color: var(--maiz); }
.tabs { display: flex; flex-wrap: wrap; gap: 3px; background: var(--sunk); padding: 4px; border-radius: 14px; margin-bottom: 18px; width: fit-content; max-width: 100%; }
.tabs button, .tabs a { background: none; border: 0; padding: 8px 14px; font: 600 .9rem var(--font); color: var(--ink-2); cursor: pointer; white-space: nowrap; border-radius: 10px; text-decoration: none; }
.tabs button:hover, .tabs a:hover { color: var(--ink); }
.tabs button.on, .tabs a.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
pre.code { background: var(--side); color: #e9e7ff; padding: 14px 16px; border-radius: 12px; overflow-x: auto; font: .82rem/1.55 var(--mono); white-space: pre; }
code { font-family: var(--mono); font-size: .88em; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line-2); background: var(--paper); border-radius: 99px; padding: 6px 14px; font: 600 .86rem var(--font); cursor: pointer; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.on, .chip:has(input:checked) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input { width: 14px; height: 14px; }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; background: var(--ink); color: var(--paper); border-radius: 12px; margin-bottom: 10px; }
.bulkbar select { background: var(--paper); }
.bulkbar .btn-ghost { color: var(--paper); }

/* listas de tarjetas (vendedor, repartidor) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.card-link { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; color: inherit; text-decoration: none; box-shadow: var(--shadow); cursor: pointer; transition: border-color .12s, transform .08s; }
.card-link:hover { border-color: var(--rosa); }
.card-link:active { transform: scale(.995); }
.person { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.person:last-of-type { border-bottom: 0; }
.avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--maiz); color: var(--ink); display: grid; place-items: center; font: 700 .95rem var(--display); flex: none; }
.oline { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.oline.warn .l-name::after { content: " ⚑"; color: var(--naranja); }
.oline .l-name { font-weight: 600; }

/* tablero de pedidos */
.board { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(190px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.board-col { --t: var(--rosa); background: var(--sunk); border-radius: var(--r-lg); padding: 12px; min-height: 180px; }
.board-col h3 { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin: 2px 4px 12px; }
.board-col h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--t); }
.board-col .count { margin-left: auto; background: var(--paper); border-radius: 99px; padding: 0 9px; font-size: .8rem; color: var(--ink-2); }
.tone-maiz { --t: var(--maiz); } .tone-rosa { --t: var(--rosa); } .tone-talavera { --t: var(--talavera); } .tone-nopal { --t: var(--nopal); } .tone-tinta { --t: var(--ink); } .tone-chile { --t: var(--chile); }
.order-card { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--t); border-radius: 12px; padding: 11px 12px; cursor: pointer; box-shadow: var(--shadow); }
.order-card:hover { border-color: var(--t); }
@media (max-width: 900px) { .board { grid-template-columns: repeat(var(--cols, 4), 82vw); } }

/* ---------- modal, confirmacion, toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 18, 45, .52); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .12s ease-out; }
.modal { background: var(--paper); border-radius: 20px; box-shadow: var(--shadow-lg); width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; animation: rise .16s ease-out; }
.modal.wide { width: min(880px, 100%); }
.modal h2 { font-size: 1.25rem; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.confirm.danger h2 { color: var(--chile); }
.confirm-mark { width: 44px; height: 44px; border-radius: 14px; background: var(--chile-soft); color: var(--chile); display: grid; place-items: center; font: 700 1.5rem var(--display); margin-bottom: 12px; }
.confirm ul { margin: 6px 0 0; padding-left: 18px; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; justify-items: center; }
.toast { background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 600; max-width: 90vw; animation: rise .16s ease-out; }
.toast.error { background: var(--chile); color: #fff; }
.toast.success { background: var(--nopal); color: #fff; }
.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; color: var(--rosa); }
.btn .spinner { color: inherit; width: 15px; height: 15px; }
@keyframes spin { to { transform: rotate(360deg); } }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pinpad button { font: 700 1.35rem var(--display); padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); cursor: pointer; }
.pinpad button:active { background: var(--sunk); }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin: 12px 0; }
.pin-dots span { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--ink-3); }
.pin-dots span.f { background: var(--rosa); border-color: var(--rosa); }

/* ---------- entrar / primera vez ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--rosa) 12%, transparent), transparent), var(--bg); }
.auth-card { width: min(420px, 100%); }
.auth-card .brand { padding: 0 0 18px; font-size: 1.25rem; }
.auth-card .brand small { color: var(--ink-3); }
.auth-card .panel { padding: 0 22px 22px; overflow: hidden; }
.auth-card .panel::before { margin: 0 -22px 6px; }
.auth-card h1 { font-size: 1.6rem; }
/* entrada: marca del negocio a la izquierda, formulario a la derecha */
.auth-split { width: min(880px, 100%); display: grid; grid-template-columns: 1fr 1.1fr; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-brand { background: var(--side); color: var(--side-ink); padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; gap: 10px; position: relative; min-height: 420px; }
.auth-brand::after { content: ""; position: absolute; left: 40px; right: 40px; bottom: 34px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--rosa) 0 34%, var(--maiz) 34% 67%, var(--side-mute) 67%); opacity: .9; }
.auth-mark { width: 76px; height: 76px; border-radius: 20px; background: var(--rosa); color: var(--rosa-ink, #fff); display: grid; place-items: center; }
.auth-mark svg { width: 46px; height: 46px; }
.auth-logo { max-width: 200px; max-height: 110px; object-fit: contain; align-self: flex-start; background: #fff; border-radius: 14px; padding: 10px; }
.auth-name { font: var(--display-weight, 700) clamp(1.6rem, 3vw, 2.2rem)/1.15 var(--display); margin-top: 8px; overflow-wrap: anywhere; }
.auth-tag { color: var(--side-mute); font-size: 1rem; }
.auth-form { padding: 40px 38px; align-content: center; }
.auth-form h1 { font-size: 1.7rem; margin: 0 0 4px; }
.pw { display: flex; gap: 6px; }
.pw input { flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .auth { padding: 0; place-items: stretch; }
  .auth-split { grid-template-columns: 1fr; border-radius: 0; box-shadow: none; min-height: 100vh; align-content: start; }
  .auth-brand { min-height: 0; padding: 28px 22px 34px; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
  .auth-brand::after { left: 22px; right: 22px; bottom: 14px; }
  .auth-mark { width: 54px; height: 54px; border-radius: 15px; } .auth-mark svg { width: 32px; height: 32px; }
  .auth-logo { max-height: 64px; max-width: 140px; padding: 6px; }
  .auth-name { margin: 0; font-size: 1.4rem; flex: 1; } .auth-tag { width: 100%; }
  .auth-form { padding: 26px 22px; }
}
.brand-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: #fff; padding: 3px; flex: none; }


/* ---------- caja (POS) ---------- */
.pos { display: grid; grid-template-columns: 1fr 410px; height: 100vh; }
.pos-left { display: flex; flex-direction: column; min-width: 0; }
.pos-top { display: flex; gap: 10px; padding: 12px 14px; background: var(--paper); border-bottom: 1px solid var(--line); align-items: center; }
.pos-search { flex: 1; position: relative; }
.pos-search input { height: 50px; font-size: 1.08rem; padding-left: 44px; border-radius: 14px; border-width: 1.5px; }
.pos-search svg { position: absolute; left: 14px; top: 15px; width: 20px; color: var(--ink-3); }
.pos-cats { display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto; background: var(--paper); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.pos-cats .chip { flex: none; }
.pos-grid { flex: 1; overflow-y: auto; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; align-content: start; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 12px 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 108px; font: inherit; color: var(--ink); position: relative; overflow: hidden; box-shadow: var(--shadow); transition: border-color .1s, transform .06s; }
.tile:hover { border-color: var(--rosa); }
.tile:active { transform: scale(.97); }
.tile .t-name { font-weight: 600; font-size: .92rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile .t-price { margin-top: auto; font: 700 1.05rem var(--display); font-variant-numeric: tabular-nums; }
.tile .t-price small, .tile .t-price span { font: 500 .78rem var(--font); color: var(--ink-3); }
.tile .t-stock { font-size: .75rem; color: var(--ink-3); }
.tile .t-band { position: absolute; left: 0; right: 0; top: 0; height: 5px; width: auto !important; bottom: auto !important; }
.tile:not(:has(.t-band))::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--line-2); }
.tile img { width: 100%; height: 66px; object-fit: cover; border-radius: 10px; }
.results { padding: 6px 14px; overflow-y: auto; flex: 1; }
.result { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 11px 10px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.result:hover, .result.sel { background: var(--rosa-soft); }

/* la cuenta: tira de ticket */
.tape { background: var(--sunk); display: flex; flex-direction: column; min-height: 0; padding: 14px 14px 16px; }
.tape-paper { background: var(--paper); flex: 1; display: flex; flex-direction: column; min-height: 0; box-shadow: var(--shadow); position: relative; border-radius: 6px 6px 0 0; }
.tape-paper::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: radial-gradient(circle at 7px -2px, transparent 7px, var(--paper) 7.5px) repeat-x; background-size: 14px 10px; }
.tape-head { padding: 12px 14px 10px; border-bottom: 1px dashed var(--line-2); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tape-lines { flex: 1; overflow-y: auto; padding: 4px 0; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 14px; cursor: pointer; border-left: 3px solid transparent; }
.line:hover { background: var(--bg); }
.line.sel { background: var(--rosa-soft); border-left-color: var(--rosa); }
.line .l-name { font-weight: 600; font-size: .93rem; }
.line .l-meta { font-size: .8rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.line .l-total { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.line .l-promo { font-size: .78rem; color: var(--nopal); font-weight: 600; grid-column: 1 / -1; }
.tape-foot { border-top: 1px dashed var(--line-2); padding: 12px 14px 18px; }
.tape-row { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: .9rem; }
.tape-total { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 12px; }
.tape-total .v { font: 700 2.8rem/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pos-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.pos-actions .btn { padding: 6px 4px; min-height: 46px; font-size: .76rem; flex-direction: column; gap: 3px; border-radius: 12px; }
.pay-btn { width: 100%; font-size: 1.25rem; min-height: 62px; border-radius: 16px; }
.pay-btn.btn-primary { background: var(--nopal); border-color: var(--nopal); }
.pay-btn.btn-primary:hover { background: color-mix(in srgb, var(--nopal) 88%, #000); }
.kbd { font: 600 .7rem var(--mono); padding: 1px 5px; border: 1px solid currentColor; border-radius: 5px; opacity: .7; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.pay-methods button { padding: 13px 8px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--paper); font: 600 .9rem var(--font); cursor: pointer; color: var(--ink); }
.pay-methods button svg { width: 22px; height: 22px; margin-bottom: 2px; }
.pay-methods button:hover { border-color: var(--ink-3); }
.pay-methods button.on { border-color: var(--rosa); background: var(--rosa-soft); color: var(--rosa); }
.cash-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.big-input { font: 700 2rem var(--display); text-align: right; font-variant-numeric: tabular-nums; height: 62px; border-radius: 14px; }
.due { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.08rem; padding: 12px 0; border-bottom: 1px solid var(--line); }
.due b { font: 700 1.35rem var(--display); font-variant-numeric: tabular-nums; }
.change { font: 700 2.6rem var(--display); color: var(--nopal); text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) {
  .pos { grid-template-columns: 1fr; height: auto; }
  .tape { position: sticky; bottom: 0; }
  .tape-lines { max-height: 35vh; }
}

/* ticket impreso / vista previa */
.ticket-preview { background: #fff; display: inline-block; padding: 10px; box-shadow: var(--shadow); color: #000; border-radius: 4px; }
@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { position: absolute; left: 0; top: 0; }
  @page { margin: 0; }
}

/* ---------- restaurante ---------- */
.floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 14px; }
.table-tile { aspect-ratio: 1.12; border-radius: 18px; border: 2px solid var(--line-2); background: var(--paper); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; cursor: pointer; font: inherit; color: var(--ink); position: relative; box-shadow: var(--shadow); transition: transform .06s; }
.table-tile:active { transform: scale(.97); }
.table-tile.round { border-radius: 50%; aspect-ratio: 1; }
.table-tile .tn { font: 700 1.7rem var(--display); }
.table-tile .ts { font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: center; }
.table-tile.busy { border-color: var(--talavera); background: var(--talavera-soft); }
.table-tile.ready { border-color: var(--nopal); background: var(--nopal-soft); }
.table-tile.attention { border-color: var(--maiz); background: var(--maiz-soft); }
.table-tile.reserved { border-style: dashed; border-color: var(--ink-3); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; border: 2px solid; }

/* KDS y turnos: pantallas para ver de lejos */
.screen-dark { --paper: #201e40; --line: #2f2c58; --ink: #f1f0fb; --ink-2: #b9b6d8; background: #14122b; color: #f1f0fb; min-height: 100vh; }
.kds-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #1b193a; border-bottom: 1px solid #2f2c58; gap: 10px; flex-wrap: wrap; }
.kds-head h1, .kds-head b { font-family: var(--display); }
.kds-head .chip { background: #262352; color: #c9c6ea; border-color: #34316a; }
.kds-head .chip.on { background: var(--maiz); color: #1d1b3f; border-color: var(--maiz); }
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; padding: 16px; align-items: start; }
.kds-card { background: #201e40; border-radius: 16px; overflow: hidden; border: 1px solid #2f2c58; }
.kds-card .kh { padding: 11px 14px; display: flex; justify-content: space-between; align-items: center; background: #2c2960; border-top: 5px solid var(--nopal); }
.kds-card .kh b { font: 700 1.45rem var(--display); }
.kds-card.late .kh { border-top-color: var(--maiz); background: #4a3a12; }
.kds-card.very-late .kh { border-top-color: var(--chile); background: #5a1d1a; }
.kds-card .kt { font: 700 1.1rem var(--display); font-variant-numeric: tabular-nums; }
.kds-item { padding: 10px 14px; border-top: 1px solid #2f2c58; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; cursor: pointer; }
.kds-item .q { font: 700 1.35rem var(--display); color: var(--maiz); }
.kds-item .n { font-size: 1.06rem; font-weight: 600; }
.kds-item .m { grid-column: 2; color: #ffb4d0; font-size: .92rem; }
.kds-item .nt { grid-column: 2; color: #ff9d8f; font-weight: 700; }
.kds-item.preparing { background: rgba(125, 157, 255, .12); }
.kds-item.ready { opacity: .45; text-decoration: line-through; }
.kds-card .kf { padding: 10px; display: flex; gap: 8px; }
.kds-card .kf button { flex: 1; padding: 12px; border-radius: 12px; border: 0; font: 700 1rem var(--font); cursor: pointer; }
.turns { display: grid; grid-template-columns: 1fr 1.35fr; min-height: 100vh; }
.turns section { padding: 4vh 3vw; }
.turns h2 { font: 700 4.2vh var(--display); color: #a9a6cc; margin-bottom: 3vh; }
.turns .ready-col { background: var(--nopal); background: linear-gradient(160deg, #0a8f5a, #066b43); }
.turns .ready-col h2 { color: #d9ffec; }
.turn-nums { display: flex; flex-wrap: wrap; gap: 2.5vh 3vw; align-content: flex-start; }
.turn-num { font: 700 9vh/1 var(--display); font-variant-numeric: tabular-nums; }
.turn-num small { display: block; font: 500 2.2vh var(--font); color: #a9a6cc; text-align: center; margin-top: 4px; }
.ready-col .turn-num { font-size: 15vh; color: #fff; }
.ready-col .turn-num small { color: #c8f5df; }
.turn-num.fresh { animation: pop 1.2s ease-out 2; }
@keyframes pop { 0% { transform: scale(1); } 30% { transform: scale(1.14); color: var(--maiz); } 100% { transform: scale(1); } }

/* ---------- pantallas publicas (menu QR, kiosco, autofactura, portal) ---------- */
.public { max-width: 780px; margin: 0 auto; padding: 0 16px 130px; }
.public::before { margin: 0 -16px 18px; }
.public-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-top: 6px; }
.public-head img { height: 52px; border-radius: 12px; }
.public-head h1 { font-size: 1.8rem; }
.menu-cats { display: flex; gap: 6px; overflow-x: auto; position: sticky; top: 0; background: var(--bg); padding: 10px 0; z-index: 5; scrollbar-width: none; }
.menu-cats .chip { flex: none; }
.menu-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.menu-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 14px; }
.menu-item .mi-name { font-weight: 700; }
.menu-item .mi-desc { color: var(--ink-2); font-size: .88rem; }
.menu-item b { font-family: var(--display); }
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(29,27,63,.08); z-index: 30; }
.cart-bar .inner { max-width: 780px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.kiosk { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; background: var(--bg); }
.kiosk .k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; padding: 20px; align-content: start; overflow-y: auto; }
.kiosk .tile { min-height: 190px; font-size: 1.1rem; border-radius: 20px; padding: 18px 16px 16px; }
.kiosk .tile .t-name { font-size: 1.12rem; }
.kiosk .tile .t-price { font-size: 1.4rem; }
.kiosk .tile img { height: 116px; border-radius: 14px; }
.kiosk .tile::after { content: "+"; position: absolute; right: 14px; bottom: 14px; width: 44px; height: 44px; border-radius: 50%; background: var(--rosa); color: #fff; display: grid; place-items: center; font: 700 1.6rem/1 var(--display); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.kiosk .pos-cats { background: var(--paper); }
.kiosk .pos-cats .chip { font-size: 1.05rem; padding: 11px 20px; }
.kiosk-welcome { display: grid; place-items: center; min-height: 100vh; text-align: center; padding: 30px; cursor: pointer; background: var(--rosa); color: #fff; position: relative; overflow: hidden; }
.kiosk-welcome::before { position: absolute; top: 0; left: 0; right: 0; height: 34px; background-image: linear-gradient(90deg, var(--maiz) 0 25%, var(--nopal) 25% 50%, #fff 50% 75%, var(--talavera) 75% 100%); background-size: 340px 100%; -webkit-mask-size: 17px 100%; mask-size: 17px 100%; filter: saturate(1.1) brightness(1.08); }
.kiosk-welcome h1 { font-size: clamp(2.6rem, 8vw, 6rem); letter-spacing: -.02em; margin-bottom: .2em; }
.kiosk-welcome p { font-size: clamp(1.1rem, 2.4vw, 1.6rem); opacity: .92; }
.kiosk-welcome .btn { min-height: 64px; font-size: 1.2rem; min-width: 220px; border-radius: 18px; border: 0; color: var(--ink); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.qr-box { background: #fff; padding: 14px; border-radius: 16px; display: inline-block; }
.step-list { display: grid; gap: 8px; counter-reset: s; }

/* firma del repartidor */
.sign-pad { border: 1.5px dashed var(--line-2); border-radius: 14px; background: #fff; touch-action: none; width: 100%; height: 160px; }

/* editor de tickets */
.tpl-editor { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.tpl-block { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.tpl-block + .tpl-block { margin-top: 6px; }
.tpl-block.off { opacity: .5; }
.tpl-block .drag { cursor: grab; color: var(--ink-3); }
@media (max-width: 900px) { .tpl-editor { grid-template-columns: 1fr; } }

/* barras de reportes */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 6px; }
.bars div { flex: 1; background: var(--rosa); border-radius: 5px 5px 2px 2px; min-height: 3px; position: relative; opacity: .9; }
.bars div:hover { opacity: 1; background: var(--ink); }
.hbar { display: grid; grid-template-columns: minmax(110px, 160px) 1fr 96px; gap: 10px; align-items: center; font-size: .88rem; padding: 4px 0; }
.hbar .b { height: 10px; background: var(--sunk); border-radius: 5px; overflow: hidden; }
.hbar .b span { display: block; height: 100%; background: var(--talavera); border-radius: 5px; }
.grid-2 > .panel:nth-child(3n+2) .hbar .b span { background: var(--nopal); }
.grid-2 > .panel:nth-child(3n) .hbar .b span { background: var(--naranja); }
.offline-banner { background: var(--maiz); color: #2b1d00; text-align: center; padding: 6px; font-weight: 700; font-size: .86rem; }

/* kiosco: todo mas grande para dedo */
.is-kiosk .modal { max-width: 660px; padding: 30px; border-radius: 26px; }
.is-kiosk .modal h2 { font: 700 1.9rem var(--display); }
.is-kiosk .modal .chip { font-size: 1.2rem; padding: 14px 24px; }
.is-kiosk .modal .btn { min-height: 60px; font-size: 1.15rem; padding: 0 28px; border-radius: 16px; }
.ready-col .muted, .turns .muted { color: #c8f5df !important; opacity: .8; }

/* ---------- presentaciones, recepcion y etiquetas ---------- */
.pres-head, .pres-row { display: grid; grid-template-columns: minmax(130px, 1.3fr) 130px minmax(140px, 1.3fr) 120px 74px 74px 36px; gap: 8px; align-items: center; }
.pres-head { font-size: .78rem; font-weight: 600; color: var(--ink-3); padding: 4px 0; border-bottom: 1.5px solid var(--line-2); }
.pres-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .pres-head { display: none; } .pres-row { grid-template-columns: 1fr 1fr; } }
.switch.sm input { width: 34px; height: 20px; } .switch.sm input::after { width: 14px; height: 14px; } .switch.sm input:checked::after { transform: translateX(14px); }
.pick-row { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.scan-box { position: relative; margin-bottom: 8px; }
.scan-box svg { position: absolute; left: 14px; top: 15px; width: 20px; color: var(--ink-3); }
.scan-box input { height: 50px; font-size: 1.08rem; padding-left: 44px; border-radius: 14px; border-width: 1.5px; }
tr.fresh-row td { animation: flash 1s ease-out; }
@keyframes flash { from { background: var(--nopal-soft); } }
.label-preview { background: var(--sunk); border-radius: 12px; padding: 16px; display: grid; place-items: center; min-height: 140px; }
.label-preview .lbl { background: #fff; color: #000; box-shadow: var(--shadow); padding: 1.5mm 2mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; font-family: Arial, sans-serif; }
.label-preview .lbl-name { font-size: 8pt; font-weight: 700; line-height: 1.1; }
.label-preview .lbl-price { font-size: 13pt; font-weight: 700; }
.label-preview .lbl-code { width: 100%; display: flex; justify-content: center; } .label-preview .lbl-code svg { height: 100%; width: auto; max-width: 100%; }
.pres-pick button { text-align: center; line-height: 1.35; }

/* ---------- reportes ---------- */
.txt-bad { color: var(--chile); }
.mt { margin-top: 22px; } .mb { margin-bottom: 14px; }
.rep-filters { margin-bottom: 14px; gap: 8px; }
.rbar { height: 6px; background: var(--sunk); border-radius: 3px; margin-top: 5px; overflow: hidden; max-width: 260px; }
.rbar i { display: block; height: 100%; background: var(--rosa); border-radius: 3px; }
.rbar.warn i { background: var(--naranja); }
.rank-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sunk); font: 700 .85rem var(--display); }
.leaders { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 20px; }
.leader-card { border-radius: var(--r-lg); padding: 16px 18px; background: var(--talavera-soft); display: grid; gap: 2px; }
.leader-card.gold { background: var(--maiz-soft); }
.leader-card span { font-size: .84rem; color: var(--ink-2); font-weight: 600; }
.leader-card b { font: 700 1.5rem/1.2 var(--display); }
.leader-card small { color: var(--ink-2); }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.month { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 1px; background: var(--paper); }
.month span { font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.month b { font-size: .95rem; }
.month.now { border-color: var(--rosa); box-shadow: inset 0 0 0 1px var(--rosa); }
.month.empty { background: transparent; }
.abc { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font: 700 .8rem var(--display); }
.abc-A { background: var(--nopal-soft); color: var(--nopal); } .abc-B { background: var(--maiz-soft); color: var(--maiz-ink); } .abc-C { background: var(--sunk); color: var(--ink-2); }
.daychart svg { width: 100%; height: 190px; color: var(--ink); }
.daychart .legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .84rem; }
.daychart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.seg.wrap { flex-wrap: wrap; }

/* ---------- mapas ---------- */
.vmap { position: relative; overflow: hidden; background: #c9d3c4; border-radius: var(--r); touch-action: none; user-select: none; cursor: grab; min-height: 220px; isolation: isolate; }
.vmap:active { cursor: grabbing; }
.vmap-tiles, .vmap-marks { position: absolute; inset: 0; }
.vmap-tiles img { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.vmap-svg { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.vmap-route-casing { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.vmap-route { fill: none; stroke: var(--talavera); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.vmap-marks { z-index: 6; pointer-events: none; }
.vmap-pin { position: absolute; left: 0; top: 0; pointer-events: auto; }
.vmap-dot { position: absolute; left: -15px; top: -38px; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c); border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.35); display: grid; place-items: center; color: #fff; font: 700 .8rem var(--font); }
.vmap-dot > * { transform: rotate(45deg); }
.vmap-dot svg { width: 14px; height: 14px; }
.vmap-pin.me .vmap-dot { left: -11px; top: -11px; width: 22px; height: 22px; border-radius: 50%; transform: none; }
.vmap-pin.pulse .vmap-dot::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 3px solid var(--c); animation: vpulse 1.8s ease-out infinite; }
@keyframes vpulse { from { transform: scale(.5); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.vmap-pin.drag { cursor: move; }
.vmap-lbl { position: absolute; left: 14px; top: -44px; white-space: nowrap; background: #fff; color: #1d1b3f; font: 600 .76rem var(--font); padding: 2px 8px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.vmap-pin.me .vmap-lbl { top: -30px; }
.vmap-ctl { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 8; }
.vmap-zoom { display: flex; flex-direction: column; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.25); overflow: hidden; }
.vmap-zoom button { width: 36px; height: 36px; border: 0; background: #fff; color: #1d1b3f; font: 600 1.2rem var(--font); cursor: pointer; }
.vmap-zoom button + button { border-top: 1px solid #e3e2ee; }
.vmap-layers { display: flex; background: rgba(255,255,255,.95); border-radius: 10px; padding: 3px; gap: 2px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.vmap-layers button { border: 0; background: transparent; padding: 5px 9px; border-radius: 7px; font: 600 .76rem var(--font); color: #4d4a73; cursor: pointer; }
.vmap-layers button.on { background: #1d1b3f; color: #fff; }
.vmap-attr { position: absolute; right: 0; bottom: 0; z-index: 8; font-size: .66rem; background: rgba(255,255,255,.8); color: #333; padding: 1px 6px; border-top-left-radius: 6px; pointer-events: none; }
.geo-bar { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.geo-bar input { flex: 1 1 200px; }
.geo-map { height: 260px; }
.geo-foot { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }

/* ---------- repartidor ---------- */
.drv-trip { display: grid; gap: 12px; }
.drv-map { height: min(56vh, 460px); border-radius: var(--r-lg); }
.drv-eta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.drv-eta div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.drv-eta b { display: block; font: 700 1.35rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.drv-eta span { font-size: .8rem; color: var(--ink-2); }
.drv-card { display: grid; gap: 6px; }
.drv-card .addr { font-size: 1.02rem; font-weight: 600; }
.drv-card .refs { background: var(--maiz-soft); color: var(--maiz-ink); border-radius: 8px; padding: 6px 10px; font-size: .88rem; }
.drv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.drv-actions .btn { flex: 1 1 auto; }
.trk-banner { display: flex; align-items: center; gap: 8px; background: var(--nopal-soft); color: var(--nopal); border-radius: 10px; padding: 7px 12px; font-size: .86rem; font-weight: 600; }
.trk-banner.off { background: var(--sunk); color: var(--ink-2); }
.trk-banner::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: vblink 1.6s infinite; }
.trk-banner.off::before { animation: none; }
@keyframes vblink { 50% { opacity: .3; } }

/* ---------- rastreo en vivo ---------- */
.live { display: grid; grid-template-columns: 320px 1fr; gap: 14px; min-height: calc(100vh - 150px); }
.live-map { min-height: 520px; height: 100%; border-radius: var(--r-lg); }
.live-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: calc(100vh - 150px); }
.live-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: pointer; display: grid; gap: 3px; text-align: left; font: inherit; color: inherit; }
.live-item:hover, .live-item.on { border-color: var(--talavera); box-shadow: inset 0 0 0 1px var(--talavera); }
.live-item .who { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.live-item .who i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.live-item .stale { color: var(--chile); }
@media (max-width: 900px) { .live { grid-template-columns: 1fr; } .live-map { min-height: 380px; } .live-list { max-height: none; } }
.addr svg, .drv-card svg, .small > svg, .live-item .small svg, .notice svg { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
@media (max-width: 520px) { .vmap-layers button { padding: 5px 7px; } .vmap-ctl { right: 8px; top: 8px; } }

/* ---------- tema y avisos del menu ---------- */
h1, .stat .v, .leader-card b { font-weight: var(--display-weight, 700); }
.nav a { position: relative; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--maiz); color: #1a1a1a; font: 700 .72rem/20px var(--font); text-align: center; }
.top-chat { position: relative; color: var(--side-ink) !important; }
.top-chat .nav-badge { position: absolute; top: -2px; right: -4px; }
.topbar .grow { flex: 1; }

/* ---------- mensajes ---------- */
.chat { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - 140px); min-height: 420px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-contact { display: flex; gap: 10px; align-items: center; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.chat-contact:hover { background: var(--sunk); }
.chat-contact.on { background: var(--rosa-soft); }
.chat-contact .grow { min-width: 0; display: grid; gap: 1px; }
.chat-contact .ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.chat-contact .nav-badge { margin-left: 6px; }
.chat-conv { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.msg { max-width: min(78%, 520px); align-self: flex-start; display: grid; gap: 2px; }
.msg.mine { align-self: flex-end; justify-items: end; }
.msg-b { background: var(--paper); border: 1px solid var(--line); padding: 8px 12px; border-radius: 4px var(--r) var(--r) var(--r); overflow-wrap: anywhere; }
.msg.mine .msg-b { background: var(--rosa); color: var(--rosa-ink, #fff); border-color: transparent; border-radius: var(--r) 4px var(--r) var(--r); }
.msg.mine .msg-b a { color: inherit; }
.msg-t { font-size: .7rem; color: var(--ink-3); }
.tick.read { color: var(--talavera); }
.msg-day { align-self: center; font-size: .74rem; color: var(--ink-2); background: var(--sunk); padding: 2px 10px; border-radius: 10px; margin: 6px 0; }
.chat-loc { display: grid; gap: 2px; text-decoration: none; color: inherit; font-weight: 600; }
.chat-loc svg { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.chat-send { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); }
.chat-send textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 150px); }
  .chat .chat-conv { display: none; }
  .chat.has-conv .chat-list { display: none; }
  .chat.has-conv .chat-conv { display: flex; }
  .chat-contact .ellipsis { max-width: 60vw; }
}

/* ---------- apariencia, cobros, checador (config) ---------- */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.preset { display: grid; gap: 4px; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: inherit; font: inherit; cursor: pointer; }
.preset:hover { border-color: var(--line-2); }
.preset.on { border-color: var(--rosa); box-shadow: inset 0 0 0 1px var(--rosa); }
.preset .sw { display: grid; grid-template-columns: 1.2fr 1fr 1fr; height: 38px; border-radius: 8px; overflow: hidden; background: var(--d); margin-bottom: 4px; }
.preset .sw i:nth-child(1) { background: var(--a); } .preset .sw i:nth-child(2) { background: var(--b); margin: 9px 4px; border-radius: 5px; } .preset .sw i:nth-child(3) { background: var(--c); margin: 12px 14px 12px 0; border-radius: 9px; }
.color-in { display: flex; gap: 6px; align-items: center; }
.color-in input[type=color] { width: 44px; height: 40px; padding: 2px; border-radius: 8px; flex: none; cursor: pointer; }
.color-in input:not([type=color]) { font-family: var(--mono); text-transform: lowercase; }
.mock { display: grid; grid-template-columns: 130px 1fr; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; min-height: 230px; }
.mock-side { background: var(--side); color: var(--side-ink); padding: 10px 8px; display: grid; align-content: start; gap: 4px; font-size: .82rem; }
.mock-brand { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 8px; overflow: hidden; white-space: nowrap; }
.mock-brand span { width: 24px; height: 24px; border-radius: 7px; background: var(--rosa); color: var(--rosa-ink, #fff); display: grid; place-items: center; flex: none; }
.mock-nav { padding: 5px 8px; border-radius: 7px; color: var(--side-ink); }
.mock-nav.on { background: var(--paper); color: var(--ink); font-weight: 600; }
.mock-main { background: var(--bg); padding: 14px; }
.mock-main .stat { padding: 10px 12px 10px 14px; }
.pm-row { display: flex; gap: 8px; align-items: center; }
.pm-row > input { flex: 1; min-width: 0; }
.pm-row.off { opacity: .55; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; margin-bottom: 8px; }
.radio-card:has(input:checked) { border-color: var(--rosa); background: var(--rosa-soft); }
.radio-card > span { display: grid; gap: 2px; }
.raw { background: var(--sunk); padding: 10px; border-radius: 8px; font: .78rem/1.4 var(--mono); max-height: 320px; overflow: auto; white-space: pre-wrap; }
.chk-mini { display: grid; gap: 4px; padding: 12px; border-radius: var(--r); background: var(--maiz-soft); }
.chk-mini .num { font: var(--display-weight, 700) 1.8rem var(--display); }
.steps-list { padding-left: 18px; display: grid; gap: 6px; }
@media (max-width: 900px) { .stat .v { font-size: clamp(1.05rem, 5.2vw, 1.4rem); overflow-wrap: normal; word-break: normal; } }

/* ---------- checador de precios (pantalla) ---------- */
.chk { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; background: var(--side); color: var(--side-ink); overflow: hidden; position: relative; }
.chk-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; }
.chk-biz { display: flex; align-items: center; gap: 14px; }
.chk-biz img { height: 52px; border-radius: 10px; background: #fff; }
.chk-biz b { display: block; font: var(--display-weight, 700) 1.35rem var(--display); }
.chk-biz span { color: var(--side-mute); font-size: .95rem; }
.chk-mark { width: 52px; height: 52px; border-radius: 14px; background: var(--rosa); color: #fff; display: grid; place-items: center; font: 700 1.6rem var(--display); }
.chk-clock { font: 600 1.4rem var(--font); color: var(--side-mute); font-variant-numeric: tabular-nums; }
.chk-stage { display: grid; place-items: center; padding: 0 28px 40px; }
.chk-idle { text-align: center; display: grid; justify-items: center; gap: 10px; }
.chk-idle h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); margin: 0; color: #fff; }
.chk-idle p { font-size: clamp(1.1rem, 2.4vw, 1.6rem); color: var(--side-mute); margin: 0; }
.chk-beam { width: min(420px, 70vw); height: 120px; border-radius: 16px; position: relative; margin-bottom: 18px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.85) 0 3px, transparent 3px 7px, rgba(255,255,255,.85) 7px 8px, transparent 8px 14px, rgba(255,255,255,.85) 14px 18px, transparent 18px 21px); opacity: .9; }
.chk-beam span { position: absolute; left: -12px; right: -12px; top: 50%; height: 3px; background: var(--chile, #e53935); box-shadow: 0 0 18px 4px color-mix(in srgb, var(--chile, #e53935) 70%, transparent); animation: chkscan 2.2s ease-in-out infinite; }
@keyframes chkscan { 0%, 100% { transform: translateY(-50px); } 50% { transform: translateY(50px); } }
.chk-card { width: min(1100px, 100%); background: var(--paper); color: var(--ink); border-radius: 28px; padding: clamp(24px, 4vw, 48px); display: flex; gap: 36px; align-items: center; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: chkin .25s ease-out; }
@keyframes chkin { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.chk-card.missing { background: var(--maiz-soft); }
.chk-img { width: clamp(160px, 26vw, 320px); aspect-ratio: 1; object-fit: contain; border-radius: 18px; background: #fff; flex: none; }
.chk-info { display: grid; gap: 10px; min-width: 0; }
.chk-name { font: var(--display-weight, 700) clamp(1.8rem, 4.2vw, 3.2rem)/1.1 var(--display); }
.chk-sub { font-size: clamp(1rem, 2vw, 1.4rem); color: var(--ink-2); }
.chk-pack { justify-self: start; background: var(--rosa-soft); color: var(--rosa); font-weight: 700; padding: 4px 14px; border-radius: 99px; font-size: 1.2rem; }
.chk-price { font: 800 clamp(4.5rem, 14vw, 10rem)/.95 var(--display); letter-spacing: -.03em; color: var(--rosa); font-variant-numeric: tabular-nums; }
.chk-cur { font-size: .45em; vertical-align: .9em; margin-right: .05em; }
.chk-dec { font-size: .42em; vertical-align: .95em; margin-left: .04em; }
.chk-was { font-size: 1.4rem; color: var(--ink-2); }
.chk-promos { display: flex; flex-wrap: wrap; gap: 8px; }
.chk-promos span { background: var(--maiz); color: #1a1a1a; font-weight: 800; padding: 6px 16px; border-radius: 10px; font-size: clamp(1rem, 2vw, 1.4rem); }
.chk-units { display: flex; flex-wrap: wrap; gap: 10px; }
.chk-units div { border: 2px solid var(--line); border-radius: 14px; padding: 8px 16px; display: grid; }
.chk-units span { color: var(--ink-2); font-size: .95rem; }
.chk-units b { font: 700 1.6rem var(--display); }
.chk-code { color: var(--ink-3); font: .9rem var(--mono); }
.chk-type { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(520px, 90vw); display: none; }
.chk.typing .chk-type { display: block; }
.chk.typing .chk-kbd { display: none; }
.chk-type input { font-size: 1.4rem; padding: 14px 18px; text-align: center; }
.chk-kbd { position: absolute; right: 22px; bottom: 22px; background: transparent; color: var(--side-mute); border: 1px solid color-mix(in srgb, var(--side-mute) 40%, transparent); border-radius: 12px; padding: 10px 16px; font: 600 .95rem var(--font); display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.chk-kbd svg { width: 18px; height: 18px; }
@media (max-width: 760px) { .chk-card { flex-direction: column; text-align: center; } .chk-info { justify-items: center; } .chk-pack { justify-self: center; } }

/* ---------- cuentas por cobrar / pagar ---------- */
.aging { display: flex; gap: 3px; border-radius: var(--r); overflow: hidden; min-height: 58px; }
.ag { min-width: 90px; padding: 8px 12px; display: grid; align-content: center; color: #fff; }
.ag span { font-size: .78rem; opacity: .9; } .ag b { font: var(--display-weight, 700) 1.02rem var(--display); font-variant-numeric: tabular-nums; }
.ag-nopal { background: var(--nopal); } .ag-maiz { background: var(--maiz); color: #1d1a10; } .ag-naranja { background: var(--naranja); } .ag-chile { background: var(--chile); } .ag-tinta { background: #3b1d1d; }
.mono { font-family: var(--mono); font-size: .9em; }
.timeline { display: grid; gap: 10px; border-left: 2px solid var(--line); padding-left: 14px; }
.timeline > div { display: grid; gap: 2px; }
.letter-prev { background: var(--sunk); border-radius: var(--r); padding: 16px 18px; font-size: .92rem; max-height: 50vh; overflow: auto; }
.pay-doc { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
svg[width="1.15em"] { vertical-align: -.2em; flex: none; }

.mock { grid-template-columns: minmax(90px, 130px) minmax(0, 1fr); }
@media (max-width: 520px) { .mock { grid-template-columns: 1fr; } .mock-side { display: none; } .mock-main .stats { grid-template-columns: 1fr !important; } }
.logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-box { width: 150px; height: 96px; border: 1px dashed var(--line-2); border-radius: var(--r); display: grid; place-items: center; background: #fff; overflow: hidden; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.settle-card { display: grid; gap: 6px; margin: 0; }
.settle-sum { background: var(--sunk); border-radius: var(--r); padding: 10px 14px; margin: 10px 0; display: grid; gap: 3px; }
.my-cut { display: grid; gap: 6px; border-left: 4px solid var(--maiz); }
.my-cut .big { font: var(--display-weight, 700) 1.4rem var(--display); }

/* ---------- agenda ---------- */
.ag-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.ag-day .ag-item { padding: 8px; gap: 8px; cursor: pointer; }
.ag-item.done { opacity: .78; }
.ag-item.missed { border-color: color-mix(in srgb, var(--chile) 40%, var(--line)); }
.ag-kind { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--talavera-soft); color: var(--talavera); }
.ag-kind.k-call { background: var(--nopal-soft); color: var(--nopal); } .ag-kind.k-whatsapp { background: var(--nopal-soft); color: var(--nopal); } .ag-kind.k-email { background: var(--maiz-soft); color: var(--maiz-ink); }
.ag-actions { margin-top: 8px; }
.ag-progress { height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.ag-progress i { display: block; height: 100%; background: var(--nopal); }
.ag-week { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ag-day { display: grid; gap: 6px; align-content: start; margin: 0; }
.ag-day h3 { margin: 0; text-transform: capitalize; }
.pick-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 6px 10px; display: grid; gap: 4px; margin-top: 6px; }
.ag-day, .ag-item, .ag-item .grow { min-width: 0; }
.ag-item .row.between { flex-wrap: wrap; gap: 4px 8px; }
.ag-item b { overflow-wrap: anywhere; }
.logo-row > .stack { flex: 1 1 200px; min-width: 0; }
.panel-head { flex-wrap: wrap; gap: 8px 12px; }
.panel-head > .row { flex-wrap: wrap; }
.panel-head input[type=date] { min-width: 0; max-width: 100%; }
.stack > * { min-width: 0; }
.look .row { flex-wrap: wrap; }

/* ---------- portal: seguimiento ---------- */
.track-panel { display: grid; gap: 10px; border-left: 4px solid var(--talavera); }
.track-panel .drv-map { height: 300px; }
.order-lines tr.cut td { color: var(--ink-3); text-decoration: line-through; }
.timeline-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline-steps li { position: relative; padding: 0 0 14px 24px; display: grid; }
.timeline-steps li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--paper); }
.timeline-steps li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline-steps li:last-child::after { display: none; }
.timeline-steps li.done::before { background: var(--nopal); border-color: var(--nopal); }
.timeline-steps li:not(.done) b { color: var(--ink-3); }
.fiscal-flag { border-left: 4px solid var(--maiz); }

/* ---------- revision de XML ---------- */
.xml-check { border: 1px solid var(--line); border-left: 4px solid var(--nopal); border-radius: var(--r); padding: 10px 14px; display: grid; gap: 4px; background: var(--paper); }
.xml-check.warn { border-left-color: var(--maiz); } .xml-check.bad { border-left-color: var(--chile); }
.xml-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; font-size: .86rem; }
.xml-list li::before { display: inline-block; width: 18px; font-weight: 700; }
.xml-list li.yes::before { content: "✓"; color: var(--nopal); } .xml-list li.no::before { content: "✕"; color: var(--chile); } .xml-list li.na::before { content: "!"; color: var(--maiz-ink); }
.xml-list li.no { color: var(--chile); }

/* ---- turnos de mostrador */
.pos-actions.two { grid-template-columns: 1fr 1fr; }
.pos-actions.two .btn { flex-direction: row; min-height: 40px; font-size: .84rem; }
.turn-big { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.turn-big .n { font: 800 4.2rem/1 var(--font); color: var(--talavera, var(--ink)); letter-spacing: -.02em; }
.turn-big.inline { margin: 14px auto 0; padding: 10px 18px; border: 2px dashed var(--line-2); border-radius: 14px; width: fit-content; }
.turn-big.inline .n { font-size: 3rem; }
.deliv-note { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; cursor: pointer; margin-bottom: 8px; font: 500 .82rem var(--font); }

/* ================================================================ pantallas de promociones (reproductor) */
.sg { --sg-accent: var(--maiz); position: fixed; inset: 0; background: #000; color: #fff; overflow: hidden; font-family: var(--font); container-type: size; }
.sg.idle { cursor: none; }
.sg-stage { position: absolute; inset: 0; }
.sg.portrait .sg-stage, .sg.portrait .sg-chrome, .sg.portrait .sg-ticker { }
@media (orientation: landscape) { .sg.portrait { width: 100vh; height: 100vw; inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-90deg); } }
.sg-layer { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.sg-layer.on { opacity: 1; z-index: 1; }
.sg[data-tr="slide"] .sg-layer { transform: translateX(6%); }
.sg[data-tr="slide"] .sg-layer.on { transform: none; }
.sg[data-tr="none"] .sg-layer { transition: none; }
.sg-slide { position: absolute; inset: 0; background: var(--sg-bg, #000); color: var(--sg-fg, #fff); }
.sg-media img, .sg-media video { width: 100%; height: 100%; display: block; }
.fit-cover { object-fit: cover; } .fit-contain { object-fit: contain; }
.sg-caption { position: absolute; left: 4cqw; bottom: 9cqh; max-width: 60cqw; display: grid; gap: .4em; }
.sg-caption b { font: 700 clamp(28px, 5.2cqw, 140px)/1 "Cartel", var(--font); background: var(--sg-accent); color: #1d1b3f; padding: .12em .35em .05em; width: fit-content; }
.sg-caption span { font: 600 clamp(16px, 2cqw, 54px)/1.25 var(--font); background: rgba(10,9,30,.78); padding: .3em .6em; width: fit-content; }
/* producto: cartel de precio */
.sg-product { --sg-bg: var(--sg-accent); --sg-fg: #1d1b3f; display: grid; grid-template-columns: 1fr 1fr; }
.sg-pic { background: #fff; display: grid; place-items: center; padding: 5cqw; position: relative; }
.sg-pic img { max-width: 100%; max-height: 80cqh; object-fit: contain; filter: drop-shadow(0 2cqh 2cqh rgba(0,0,0,.18)); }
.sg-initial { font: 700 30cqh/1 "Cartel", var(--font); color: #e6e4f2; }
.sg-tag { padding: 7cqh 5cqw 12cqh; display: flex; flex-direction: column; justify-content: center; gap: 1.6cqh; position: relative; }
.sg-tag::before { content: ""; position: absolute; left: -3.2cqh; top: 50%; width: 6.4cqh; height: 6.4cqh; background: var(--sg-bg); transform: translateY(-50%) rotate(45deg); }
.sg-kicker { font: 700 clamp(16px, 2.4cqw, 64px)/1 "Cartel", var(--font); background: #1d1b3f; color: var(--sg-bg); padding: .25em .5em .15em; width: fit-content; transform: rotate(-2deg); }
.sg-pname { font: 800 clamp(26px, 4.4cqw, 120px)/1.02 var(--font); letter-spacing: -.02em; }
.sg-brand { font: 600 clamp(14px, 1.8cqw, 44px)/1.2 var(--font); opacity: .7; }
.sg-price { font: 700 clamp(70px, 15cqw, 420px)/.86 "Cartel", var(--font); letter-spacing: -.03em; display: flex; align-items: flex-start; margin-top: 1cqh; }
.sg-price .cur { font-size: .42em; margin: .08em .04em 0 0; }
.sg-price .dec { font-size: .4em; margin-top: .08em; text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .12em; }
.sg-price .per { font-size: .22em; align-self: flex-end; margin: 0 0 .3em .2em; font-family: var(--font); font-weight: 700; }
.sg-was { font: 600 clamp(16px, 2.2cqw, 60px)/1 var(--font); display: flex; gap: .6em; align-items: center; }
.sg-was s { text-decoration-thickness: .1em; text-decoration-color: #d61f69; }
.sg-was b { background: #d61f69; color: #fff; padding: .2em .45em; border-radius: .2em; }
.sg-note { font: 600 clamp(14px, 1.7cqw, 46px)/1.3 var(--font); max-width: 36ch; opacity: .85; }
@container (max-aspect-ratio: 1/1) {
  .sg-product { grid-template-columns: 1fr; grid-template-rows: 46% 54%; }
  .sg-tag::before { left: 50%; top: -3.2cqh; transform: translateX(-50%) rotate(45deg); }
  .sg-pname { font-size: clamp(26px, 7.5cqw, 120px); } .sg-price { font-size: clamp(70px, 24cqw, 420px); }
}
/* aviso de texto */
.sg-text { --sg-bg: #1d1b3f; display: grid; align-items: center; padding: 8cqh 7cqw 14cqh; }
.sg-text.has-bg .sg-bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sg-text.has-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,9,30,.82) 0%, rgba(10,9,30,.35) 70%, transparent); }
.sg-copy { position: relative; z-index: 1; max-width: 72cqw; border-left: 1.4cqw solid var(--sg-accent); padding-left: 3.2cqw; }
.sg-copy h1 { margin: 0 0 .25em; font: 700 clamp(34px, 8cqw, 220px)/.95 "Cartel", var(--font); letter-spacing: -.02em; color: inherit; }
.sg-copy p { margin: 0; font: 500 clamp(18px, 2.8cqw, 76px)/1.3 var(--font); max-width: 34ch; opacity: .92; }
@container (max-aspect-ratio: 1/1) { .sg-copy { max-width: 86cqw; } .sg-copy h1 { font-size: clamp(34px, 13cqw, 220px); } .sg-copy p { font-size: clamp(18px, 5cqw, 76px); } }
/* encima de todo */
.sg-chrome { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 2.2cqh 2.2cqw; pointer-events: none; }
.sg-brandpill { display: flex; align-items: center; gap: .55em; background: rgba(10,9,30,.72); color: #fff; padding: .45em .9em .45em .5em; border-radius: 999px; font: 700 clamp(12px, 1.25cqw, 32px)/1 var(--font); backdrop-filter: blur(6px); }
.sg-brandpill img { height: 1.8em; width: 1.8em; object-fit: contain; border-radius: 50%; background: #fff; }
.sg-clock { background: rgba(10,9,30,.72); color: #fff; padding: .35em .7em; border-radius: .5em; font: 700 clamp(14px, 1.8cqw, 48px)/1 "Cartel", var(--font); font-variant-numeric: tabular-nums; }
.sg-ticker { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; background: #1d1b3f; color: #fff; overflow: hidden; border-top: .5cqh solid var(--sg-accent); }
.sg-ticker-run { display: flex; width: max-content; animation: sg-run 30s linear infinite; }
.sg-ticker-run span { padding: 1.4cqh 3cqw; font: 600 clamp(14px, 1.9cqw, 52px)/1 var(--font); white-space: nowrap; }
.sg-ticker-run span::before { content: "●"; color: var(--sg-accent); margin-right: 1.4em; font-size: .6em; vertical-align: middle; }
@keyframes sg-run { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .sg-ticker-run { animation-duration: 90s !important; } .sg-layer { transition: none; } }
.sg-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 10px; padding: 24px; background: #1d1b3f; color: #fff; }
.sg-empty h1 { font: 700 clamp(28px, 5cqw, 96px)/1 "Cartel", var(--font); margin: 0; }
.sg-empty p { color: #b6b3d4; margin: 0; }
.sg-fs { position: absolute; z-index: 4; right: 16px; bottom: 16px; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; padding: 8px 14px; font: 600 .9rem var(--font); cursor: pointer; transition: opacity .3s; }
.sg.idle .sg-fs, .sg-fs.hidden { opacity: 0; pointer-events: none; }

/* ---- pantallas de promociones (administrador) */
.sg-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.sg-listcard { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r, 14px); background: var(--paper); color: var(--ink); text-decoration: none; }
.sg-listcard:hover { border-color: var(--line-2); }
.sg-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.sg-thumbs span { aspect-ratio: 16/9; border-radius: 6px; background: var(--sunk); font: 600 .62rem var(--font); color: var(--ink-3); display: grid; place-items: center; text-align: center; padding: 2px; }
.sg-thumbs .t-product { background: var(--maiz-soft); color: var(--maiz-ink, var(--ink)); } .sg-thumbs .t-video { background: var(--talavera-soft); } .sg-thumbs .t-text { background: var(--rosa-soft); }
.sg-drop { border: 2px dashed var(--line-2); border-radius: 12px; padding: 18px; text-align: center; color: var(--ink-3); margin: 12px 0; }
.sg-drop.on { border-color: var(--talavera); background: var(--talavera-soft); color: var(--ink); }
.sg-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 12px; }
.sg-mitem { margin: 0; position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); display: grid; }
.sg-mitem img, .sg-mitem video { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--sunk); }
.sg-mitem figcaption { padding: 8px 10px; display: grid; font-size: .8rem; min-width: 0; }
.sg-mitem figcaption span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.sg-mitem .btn { position: absolute; top: 6px; right: 6px; background: var(--paper); }
.sg-kind { position: absolute; left: 6px; top: 6px; background: rgba(10,9,30,.75); color: #fff; font: 600 .7rem var(--font); padding: 2px 7px; border-radius: 6px; }
.sg-screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px; margin-top: 10px; }
.sg-screen { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--paper); display: grid; gap: 4px; }
.sg-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .sg-editor { grid-template-columns: 1fr; } }
.sg-side { display: grid; gap: 16px; position: sticky; top: 12px; }
.sg-seq { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.sg-row { display: grid; grid-template-columns: 22px 96px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; }
.sg-row.sel { border-color: var(--talavera); box-shadow: 0 0 0 2px var(--talavera-soft); }
.sg-row.off { opacity: .55; }
.sg-n { font: 700 .8rem var(--font); color: var(--ink-3); text-align: center; }
.sg-th img, .sg-th video, .sg-ph { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; display: grid; place-items: center; background: var(--sunk); }
.sg-ph { font: 700 1.2rem "Cartel", var(--font); } .sg-ph.t-product { background: var(--maiz); color: #1d1b3f; } .sg-ph.t-text { background: #1d1b3f; color: #fff; }
.sg-meta { display: grid; min-width: 0; } .sg-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-acts { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .sg-row { grid-template-columns: 18px 72px minmax(0, 1fr); } .sg-th img, .sg-th video, .sg-ph { width: 72px; } .sg-acts { grid-column: 1 / -1; justify-content: flex-start; } }
.sg-empty-row { padding: 18px; text-align: center; border: 1px dashed var(--line-2); border-radius: 12px; }
.sg-add { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-preview { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #000; }
.sg-preview .sg { position: absolute; }
.sg-preview .sg-fs { display: none; }
.sg-when { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.sg-when legend { font-weight: 700; padding: 0 4px; }
.empty-state { text-align: center; padding: 40px 16px; display: grid; gap: 8px; justify-items: center; }
.cms-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0; }
.sub-row td { border-top: 0; padding-top: 0; }

/* ================================================================ agenda de citas */
.ag-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 12px; }
.ag-bar input[type=date] { width: auto; }
.ag-date { margin: 0; font: 700 1.35rem/1.1 var(--display); letter-spacing: -.01em; }
.ag-counts { display: flex; gap: 14px; flex-wrap: wrap; color: var(--ink-2); font-size: .88rem; }
.ag-counts b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ag-scroll { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--line); border-radius: var(--r-lg, 14px); background: var(--paper); }
.ag-grid { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(170px, 1fr)); position: relative; min-width: min-content; }
.ag-times { position: relative; height: calc(var(--h) + 44px); border-right: 1px solid var(--line); }
.ag-times span { position: absolute; left: 0; right: 6px; transform: translateY(36px); text-align: right; font: 600 .72rem var(--font); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ag-col { border-right: 1px solid var(--line); min-width: 0; }
.ag-col:last-child { border-right: 0; }
.ag-head { position: sticky; top: 0; z-index: 3; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--paper); border-bottom: 1px solid var(--line); font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-head .dot, .ag-staff .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.ag-body { position: relative; cursor: copy; background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(60 * 1.4px - 1px), var(--line) calc(60 * 1.4px - 1px), var(--line) calc(60 * 1.4px)); background-color: var(--sunk); }
.ag-open { position: absolute; left: 0; right: 0; background: var(--paper); opacity: .92; }
.ag-appt, .ag-block { position: absolute; left: 4px; right: 4px; z-index: 1; border-radius: 8px; padding: 4px 7px; text-align: left; display: flex; flex-direction: column; gap: 1px; overflow: hidden; cursor: pointer; font: 500 .76rem/1.25 var(--font); }
.ag-appt { background: color-mix(in srgb, var(--c) 14%, var(--paper)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-left: 4px solid var(--c); color: var(--ink); }
.ag-appt b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-appt span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-appt .st { font-weight: 600; font-size: .7rem; }
.ag-appt.s-confirmed { border-left-style: double; border-left-width: 6px; }
.ag-appt.s-arrived, .ag-appt.s-in_service { background: color-mix(in srgb, var(--c) 32%, var(--paper)); }
.ag-appt.s-done { opacity: .6; }
.ag-appt.s-no_show, .ag-appt.s-cancelled { opacity: .45; text-decoration: line-through; }
.ag-appt.online::after { content: "en línea"; position: absolute; right: 5px; top: 4px; font: 700 .6rem var(--font); background: var(--c); color: #fff; padding: 1px 5px; border-radius: 5px; }
.ag-block { background: repeating-linear-gradient(135deg, var(--sunk) 0 6px, var(--line) 6px 8px); border: 1px dashed var(--line-2); color: var(--ink-2); font-weight: 600; }
.ag-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--rosa); z-index: 2; pointer-events: none; }
.ag-now::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--rosa); }
.ag-form .chip { padding: 5px 11px; }
.ag-svcs { display: grid; gap: 8px; max-height: 240px; overflow: auto; }
.ag-slots { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow: auto; padding: 2px; }
.ag-slot { border: 1.5px solid var(--line-2); background: var(--paper); border-radius: 9px; padding: 7px 10px; font: 700 .86rem var(--font); font-variant-numeric: tabular-nums; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; color: var(--ink); }
.ag-slot small { font-weight: 500; font-size: .66rem; color: var(--ink-3); }
.ag-slot.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ag-slot.on small { color: inherit; }
.ag-cust { position: relative; }
.ag-cres { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); display: grid; }
.ag-cres:empty { display: none; }
.ag-cres button { text-align: left; padding: 9px 12px; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; font: 500 .9rem var(--font); color: var(--ink); }
.ag-lines { width: 100%; margin: 6px 0; } .ag-lines td { padding: 5px 0; }
.ag-share { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ag-qr { background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line); line-height: 0; }
.ag-hours { display: grid; gap: 6px; }
.ag-hrow { display: grid; grid-template-columns: 120px repeat(2, minmax(84px, 110px) auto) ; align-items: center; gap: 6px; }
.ag-hrow { grid-template-columns: 116px 128px 14px 128px max-content 128px 14px 128px; justify-content: start; }
.ag-hrow input[type=time] { padding: 6px 8px; }
@media (max-width: 760px) { .ag-hrow { grid-template-columns: 1fr 1fr auto 1fr; } .ag-hrow > :nth-child(n+5) { display: none; } }
.ag-staff { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.ag-staff summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-staff[open] summary { margin-bottom: 10px; }

/* ---- reservacion en linea (publica, para el celular del cliente) */
.bk { min-height: 100vh; background: var(--bg); padding: 0 0 40px; }
.bk-head { display: flex; gap: 14px; align-items: center; padding: 22px 16px 18px; max-width: 640px; margin: 0 auto; }
.bk-head img, .bk-mark { width: 56px; height: 56px; border-radius: 16px; object-fit: contain; background: var(--paper); border: 1px solid var(--line); flex: none; }
.bk-mark { display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 700 1.6rem var(--display); }
.bk-head h1 { margin: 0; font: 700 1.45rem/1.1 var(--display); }
.bk-head p { margin: 2px 0 0; color: var(--ink-2); }
.bk-card { max-width: 640px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 6px 16px 20px; box-shadow: var(--shadow); }
@media (max-width: 680px) { .bk-card { border-radius: 22px 22px 0 0; border-left: 0; border-right: 0; } }
.bk-card section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.bk-card section:last-child { border-bottom: 0; }
.bk-card h2 { margin: 0 0 12px; font: 700 1.05rem var(--font); display: flex; align-items: center; gap: 8px; }
.bk-card h2 span { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); display: inline-grid; place-items: center; font-size: .78rem; }
.bk-cat h3 { margin: 12px 0 6px; font: 600 .82rem var(--font); color: var(--ink-3); }
.bk-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.bk-row { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.bk-opt { text-align: left; border: 1.5px solid var(--line-2); background: var(--paper); border-radius: 14px; padding: 12px 14px; cursor: pointer; display: grid; gap: 2px; color: var(--ink); font: 500 .95rem var(--font); min-height: 52px; }
.bk-opt small { color: var(--ink-3); font-size: .82rem; }
.bk-opt.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.bk-opt.on small { color: inherit; opacity: .8; }
.bk-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.bk-day { flex: none; width: 62px; scroll-snap-align: start; border: 1.5px solid var(--line-2); background: var(--paper); border-radius: 14px; padding: 8px 4px; display: grid; justify-items: center; cursor: pointer; color: var(--ink); }
.bk-day b { font: 700 1.3rem/1.1 var(--display); } .bk-day small { font-size: .72rem; color: var(--ink-3); }
.bk-day.on { background: var(--ink); color: var(--paper); border-color: var(--ink); } .bk-day.on small { color: inherit; }
.bk-slots { margin-top: 12px; display: grid; gap: 10px; }
.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; margin-top: 4px; }
.bk-slot { border: 1.5px solid var(--line-2); background: var(--paper); border-radius: 11px; padding: 10px 6px; font: 700 .95rem var(--font); font-variant-numeric: tabular-nums; cursor: pointer; color: var(--ink); }
.bk-slot.on { background: var(--nopal); border-color: var(--nopal); color: #fff; width: fit-content; padding: 10px 16px; }
.bk-form { display: grid; gap: 12px; }
.bk-form label { display: grid; gap: 5px; font: 600 .88rem var(--font); color: var(--ink-2); }
.bk-form input, .bk-form textarea { font-size: 16px; }
.bk-hp { position: absolute; left: -9999px; opacity: 0; width: 1px; height: 1px; }
.bk-sum { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--sunk); }
.bk-sum div { display: grid; } .bk-sum small { color: var(--ink-2); }
.bk-go { border: 0; border-radius: 14px; padding: 15px 18px; background: var(--rosa); color: #fff; font: 700 1.02rem var(--font); cursor: pointer; width: 100%; }
.bk-go:disabled { opacity: .6; }
.bk-sec { display: block; text-align: center; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 13px; background: var(--paper); color: var(--ink); font: 600 .95rem var(--font); text-decoration: none; cursor: pointer; width: 100%; }
.bk-sec.danger { color: var(--chile, #c0392b); }
.bk-msg { margin: 0; color: var(--chile, #c0392b); font-weight: 600; min-height: 1.2em; }
.bk-appt { padding: 22px 18px; display: grid; gap: 10px; }
.bk-ok { margin: 0; background: var(--nopal-soft); color: var(--nopal); font-weight: 700; padding: 10px 14px; border-radius: 12px; }
.bk-when { display: grid; } .bk-when b { font: 700 1.6rem/1.1 var(--display); } .bk-when span { font: 700 1.15rem var(--font); color: var(--ink-2); }
.bk-state { margin: 0; font-weight: 700; } .bk-state.s-cancelled { color: var(--chile, #c0392b); } .bk-state.s-confirmed { color: var(--nopal); }
.bk-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.bk-list li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.bk-actions { display: grid; gap: 8px; margin-top: 6px; }
.bk-foot { text-align: center; color: var(--ink-3); font-size: .8rem; margin-top: 18px; }

/* ---- consultorio */
.cl-list { display: grid; gap: 6px; }
.cl-item { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--paper); }
.cl-item:hover { border-color: var(--line-2); }
.cl-item > div:first-child { display: grid; }
.cl-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cl-allergy { margin-bottom: 14px; }
.cl-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .cl-wrap { grid-template-columns: 1fr; } }
.cl-timeline { display: grid; gap: 8px; margin-top: 12px; }
.cl-cons { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--talavera); border-radius: 10px; text-decoration: none; color: var(--ink); }
.cl-cons + .cl-cons { margin-top: 0; }
aside .cl-cons { margin-top: 8px; }
.cl-vitals { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cl-vitals label { display: grid; gap: 4px; font: 600 .78rem var(--font); color: var(--ink-2); }
.cl-vitals label div { display: flex; align-items: center; gap: 6px; }
.cl-vitals input { font-variant-numeric: tabular-nums; }
.cl-vitals output { font: 700 1.25rem var(--display); color: var(--ink); }
.cl-dx { display: grid; grid-template-columns: 110px 1fr auto; gap: 6px; }
.cl-rx { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.cl-rx-top { display: flex; gap: 6px; } .cl-rx-top input { font-weight: 600; }
.cl-rx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.cl-rx-grid label { display: grid; gap: 3px; font: 600 .72rem var(--font); color: var(--ink-3); }
.cl-note { border-left: 3px solid var(--maiz); padding: 6px 10px; margin-top: 8px; }
.os-list li { align-items: center; gap: 10px; }
.os-list label { display: flex; gap: 10px; align-items: flex-start; flex: 1; min-width: 0; }
.os-list label span { display: grid; } .os-list small { color: var(--ink-3); }
.os-list input { width: 20px; height: 20px; margin-top: 2px; flex: none; }

/* ---- taller */
.ws-board { --cols: 7; }
.ws-card { display: grid; gap: 4px; text-decoration: none; color: var(--ink); }
.ws-rep { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ws-new { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .ws-new { grid-template-columns: 1fr; } }
.ws-vopt { text-align: left; display: grid; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); cursor: pointer; color: var(--ink); }
.ws-fuel { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; }
.ws-fuel button { height: 30px; border: 1.5px solid var(--line-2); background: var(--paper); border-radius: 6px; font: 700 .7rem var(--font); cursor: pointer; color: var(--ink-3); }
.ws-fuel button.on { background: var(--nopal); border-color: var(--nopal); color: #fff; }
.ws-insp { display: grid; gap: 6px; }
.ws-irow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.ws-irow input { grid-column: 1 / -1; }
.ws-irow .seg button { padding: 5px 9px; font-size: .78rem; }
.ws-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 14px; }
.ws-steps li { padding: 6px 12px; border-radius: 99px; background: var(--sunk); color: var(--ink-3); font: 600 .8rem var(--font); }
.ws-steps li.done { background: var(--nopal-soft); color: var(--nopal); }
.ws-steps li.now { background: var(--ink); color: var(--paper); }
.ws-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .ws-wrap { grid-template-columns: 1fr; } }
.ws-items { display: grid; gap: 4px; margin-top: 10px; }
.ws-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 96px auto; gap: 8px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.ws-item.pending { background: var(--maiz-soft); border-radius: 8px; }
.ws-item.done .ws-iname b { text-decoration: line-through; text-decoration-color: var(--nopal); }
.ws-iname { display: grid; min-width: 0; }
.ws-done input { width: 20px; height: 20px; }
@media (max-width: 640px) { .ws-item { grid-template-columns: 28px minmax(0, 1fr) auto; } .ws-item > span.r:not(:last-child) { display: none; } }
.ws-tot { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; justify-content: end; text-align: right; margin-top: 10px; font-size: 1.05rem; }
.warn-text { color: var(--naranja, #e07a1f); }
.ws-ilist { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 3px; }
.ws-ilist li { display: flex; justify-content: space-between; gap: 8px; }
.ws-kardex { display: grid; gap: 8px; margin-top: 10px; }
.ws-k { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--talavera); border-radius: 10px; text-decoration: none; color: var(--ink); }
.ws-k ul { margin: 0; padding-left: 18px; }
.ws-next { padding: 8px 0; border-bottom: 1px solid var(--line); }
.rc-lot { display: flex; gap: 6px; margin-top: 4px; } .rc-lot input { padding: 5px 8px; font-size: .85rem; max-width: 150px; }
[hidden] { display: none !important; }
.notice.bad { background: var(--chile-soft, #fde3e0); color: var(--chile, #b42318); border-left: 4px solid var(--chile, #b42318); }
.ws-board { overflow-x: auto; grid-template-columns: repeat(7, minmax(210px, 1fr)) !important; padding-bottom: 6px; }
.ws-card .row.between > .small.muted { white-space: nowrap; }
@media (max-width: 760px) { .ag-hrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 14px minmax(0, 1fr); } .ag-hrow > :nth-child(n+5) { display: none; } .ag-hrow input[type=time] { min-width: 0; width: 100%; } }
@media (max-width: 760px) { .ag-hrow { display: flex; flex-wrap: wrap; } .ag-hrow > label { flex: 1 0 100%; } .ag-hrow input[type=time] { flex: 1 1 0; } }
.ag-staff .form-grid { margin-top: 6px; row-gap: 12px; } .ag-staff input[type=color] { height: 40px; }
