/* =====================================================================
   KASSO by Vølden — estilos
   Identidad de Vølden Spark Studio: crema #FBF7F2, tinta #1E1A17 y
   naranja #F26A1B; Unbounded (títulos y cifras), Figtree (texto) y
   JetBrains Mono (etiquetas). Acabado "Liquid Glass" cálido: paneles de
   vidrio translúcido sobre un fondo de manchas naranja y arena.
   Mobile-first: barra inferior flotante en móvil, lateral en escritorio.
   ===================================================================== */
@font-face { font-family: 'Unbounded'; src: url(/fonts/unbounded-latin-wght-normal.woff2) format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #FBF7F2;
  --surface: rgba(255,252,248,.66);
  --surface-2: rgba(243,236,227,.62);
  --surface-solid: #FFFCF8;
  --ink: #1E1A17;
  --ink-2: #4A413A;
  --ink-3: #8A7E74;
  --line: rgba(30,26,23,.1);
  --brand: #F26A1B;
  --brand-2: #FF9A4D;
  --brand-ink: #FFFFFF;
  --brand-grad: linear-gradient(160deg, #FF8C42 0%, #F26A1B 55%, #DC5711 100%);
  --ink-grad: linear-gradient(160deg, #3A322C 0%, #1E1A17 100%);
  --accent: #F26A1B;
  --accent-soft: #FCE3D2;
  --ok: #2F8F5B;
  --ok-soft: rgba(47,143,91,.13);
  --warn: #B8470A;
  --warn-soft: rgba(242,106,27,.13);
  --bad: #C8372D;
  --bad-soft: rgba(200,55,45,.12);
  --radius: 22px;
  --radius-sm: 13px;
  --glass: blur(22px) saturate(160%);
  --glass-edge: rgba(255,255,255,.8);
  --glass-hi: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(255,255,255,.35);
  --shadow: 0 1px 2px rgba(30,26,23,.05), 0 14px 34px -14px rgba(90,50,20,.25);
  --glow: 0 10px 24px -10px rgba(242,106,27,.75);
  --blob-1: rgba(242,106,27,.24); --blob-2: rgba(255,186,120,.32); --blob-3: rgba(227,216,203,.9); --blob-4: rgba(255,140,66,.14);
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130F; --surface: rgba(255,240,225,.06); --surface-2: rgba(255,240,225,.045); --surface-solid: #221C17;
    --ink: #F4EDE5; --ink-2: #CFC3B6; --ink-3: #9C8E80; --line: rgba(255,240,225,.1);
    --brand: #FF7A2E; --accent: #FF7A2E; --accent-soft: #3A2416;
    --brand-grad: linear-gradient(160deg, #FF9A5C 0%, #FF7A2E 55%, #E5601A 100%);
    --ink-grad: linear-gradient(160deg, #F4EDE5 0%, #E3D8CB 100%);
    --ok: #5CC98C; --ok-soft: rgba(92,201,140,.13); --warn: #FF9A5C; --warn-soft: rgba(255,122,46,.14); --bad: #FF6B5E; --bad-soft: rgba(255,107,94,.13);
    --glass-edge: rgba(255,240,225,.13);
    --glass-hi: inset 0 1px 0 rgba(255,240,225,.12), inset 0 0 0 1px rgba(255,240,225,.04);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 40px -14px rgba(0,0,0,.65);
    --blob-1: rgba(255,122,46,.2); --blob-2: rgba(255,154,92,.1); --blob-3: rgba(90,60,35,.35); --blob-4: rgba(255,122,46,.08);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
html { background: var(--bg); }
body { min-height: 100dvh; background: transparent; }
body::before {
  content: ''; position: fixed; inset: -10vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 12% 8%, var(--blob-1), transparent 62%),
    radial-gradient(40vmax 40vmax at 92% 6%, var(--blob-2), transparent 62%),
    radial-gradient(44vmax 44vmax at 85% 96%, var(--blob-3), transparent 62%),
    radial-gradient(36vmax 36vmax at 6% 92%, var(--blob-4), transparent 62%), var(--bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1, h2 { font-family: var(--display); letter-spacing: -0.02em; }
h1 { font-size: 1.55rem; font-weight: 800; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 700; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .9em; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.hidden { display: none !important; }
.boot { display: grid; place-items: center; min-height: 100dvh; color: var(--ink-3); }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100dvh; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; padding: 16px 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; width: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.topbar .title { display: flex; flex-direction: column; gap: 2px; }
.topbar .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Barra inferior flotante (móvil) */
.bottomnav {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30; height: var(--nav-h);
  background: var(--surface); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass);
  border: 1px solid var(--glass-edge); border-radius: 24px; box-shadow: var(--glass-hi), var(--shadow);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--ink-3); font-size: .7rem; font-weight: 700; }
.bottomnav a.active { color: var(--brand); }
.bottomnav a.scan-btn .ico { background: var(--brand-grad); color: var(--brand-ink); border-radius: 18px; width: 50px; height: 50px; display: grid; place-items: center; margin-top: -24px; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 24px -6px rgba(242,106,27,.6); border: 3px solid var(--glass-edge); }
.ico svg { width: 22px; height: 22px; display: block; }

/* Marca */
.kasso-mark { flex-shrink: 0; display: block; }
/* Cabecera con el isotipo en el móvil (en escritorio va en la barra lateral) */
.mbrand { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.mbrand .kasso-mark { width: 34px; height: 34px; }
.mbrand .kasso-word { font-size: 1.15rem; }
.mbrand .shop { font-size: .76rem; font-weight: 600; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
body[data-route="/caja"] .mbrand { display: none; }
@media (min-width: 900px) { .mbrand { display: none; } }

/* Barra lateral flotante (escritorio) */
@media (min-width: 900px) {
  .bottomnav { display: none; }
  .sidebar {
    display: flex; flex-direction: column; width: 244px; flex-shrink: 0; color: var(--ink);
    margin: 14px 0 14px 14px; padding: 18px 12px; position: sticky; top: 14px; height: calc(100dvh - 28px); overflow-y: auto;
    background: var(--surface); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass);
    border: 1px solid var(--glass-edge); border-radius: 26px; box-shadow: var(--glass-hi), var(--shadow);
  }
  .sidebar .brand { padding: 2px 8px 16px; display: flex; align-items: center; gap: 10px; }
  .sidebar .brand .shop { font-size: .78rem; font-weight: 600; color: var(--ink-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; }
  .sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 13px; color: var(--ink-2); text-decoration: none; font-weight: 700; transition: background .15s, color .15s; }
  .sidebar nav a:hover { background: var(--surface-2); color: var(--ink); }
  .sidebar nav a.active { background: var(--brand-grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 18px -8px rgba(242,106,27,.7); }
  .sidebar .ico svg { width: 19px; height: 19px; }
  .sidebar .section { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 800; padding: 16px 12px 6px; }
  .sidebar .me { margin-top: auto; padding: 12px; font-size: .85rem; color: var(--ink-2); border-top: 1px solid var(--line); }
  .sidebar .me button { background: none; border: 0; color: var(--brand); font-weight: 700; padding: 0; cursor: pointer; }
  .main { padding: 28px 32px 40px; }
  .more-link { display: none !important; }
}

/* ---------- Cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.grid > .card + .card, .tenants > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.grid { display: grid; gap: 14px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: 1fr; }
.grid-kpi { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-kpi { grid-template-columns: repeat(4, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .label { font-size: .78rem; color: var(--ink-3); font-weight: 600; }
.kpi .value { font-size: 1.45rem; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kpi .sub { font-size: .78rem; color: var(--ink-3); }
.kpi.hero { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.kpi.hero .label, .kpi.hero .sub { color: inherit; opacity: .75; }
.pos { color: var(--ok); } .neg { color: var(--bad); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  padding: 10px 16px; border-radius: 11px; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink); min-height: 42px;
  transition: transform .06s ease, background .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.btn.accent { background: var(--accent); color: #fff; border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 6px 11px; min-height: 34px; font-size: .85rem; border-radius: 9px; }
.btn.lg { padding: 14px 20px; min-height: 54px; font-size: 1.05rem; }
.btn.block { width: 100%; }
.btn .ico svg { width: 18px; height: 18px; }
.icon-btn { width: 38px; height: 38px; padding: 0; min-height: 0; border-radius: 10px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: .78rem; color: var(--ink-3); }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; min-height: 44px; outline: none;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); background: var(--surface); }
.input.big { font-size: 1.6rem; font-weight: 800; text-align: center; min-height: 60px; font-variant-numeric: tabular-nums; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-weight: 700; cursor: pointer; color: var(--ink-2); font-size: .88rem; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.searchbar { position: relative; flex: 1; min-width: 180px; }
.searchbar .input { padding-left: 38px; }
.searchbar .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.searchbar .ico svg { width: 18px; height: 18px; }

/* ---------- Lists & tables ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item .main-col { flex: 1; min-width: 0; }
.list-item .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .meta { font-size: .8rem; color: var(--ink-3); }
.list-item .price { font-weight: 800; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .75rem; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface-2); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--warn); border-color: transparent; }
.empty { text-align: center; padding: 30px 10px; color: var(--ink-3); }

/* ---------- Scanner ---------- */
.scanner { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; max-height: 52vh; width: 100%; }
.scanner .reader { width: 100%; height: 100%; }
.scanner .reader video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .overlay { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; }
.scanner .frame { width: 90%; height: 50%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); }
.scanner .laser { position: absolute; left: 7%; right: 7%; height: 2px; background: var(--accent); top: 50%; box-shadow: 0 0 12px var(--accent); animation: laser 1.6s ease-in-out infinite alternate; }
@keyframes laser { from { transform: translateY(-50px); } to { transform: translateY(50px); } }
.scanner .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #cfd6d5; text-align: center; padding: 20px; }
.manual { display: flex; gap: 8px; margin-top: 12px; }
.manual .input { font-family: var(--mono); }

.product-hero { display: flex; flex-direction: column; gap: 4px; }
.product-hero .pname { font-size: 1.3rem; font-weight: 800; }
.product-hero .pprice { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--surface-2); border-radius: 11px; padding: 10px 12px; }
.stat .l { font-size: .72rem; color: var(--ink-3); font-weight: 700; }
.stat .v { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }

/* ---------- POS ---------- */
kbd { font-family: var(--mono); font-size: .68rem; font-weight: 600; padding: 1px 6px; border-radius: 6px; border: 1px solid currentColor; opacity: .55; line-height: 1.5; }
@media (pointer: coarse), (max-width: 700px) { kbd { display: none; } }
.pos-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pos-id { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.pos-code { width: 46px; height: 46px; border-radius: 13px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; }
.pos-name { font-weight: 800; font-size: 1.25rem; line-height: 1.15; }
.cashier-chip { display: flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; line-height: 1.15; }
.cashier-chip:hover { border-color: var(--brand); }
.cashier-chip .av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.cashier-chip .small { font-size: .7rem; }
.pos-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pos-actions .count { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; font-size: .75rem; }
@media (max-width: 899px) { .pos-top { padding-top: 22px; } }
@media (max-width: 560px) { .pos-actions { width: 100%; } .pos-actions .btn { white-space: nowrap; } .pos-actions .btn { flex: 1; padding: 6px 8px; } .pos-actions .btn .ico { display: none; } }

.pos-layout { display: grid; gap: 14px; }
@media (min-width: 900px) {
  .pos-layout { grid-template-columns: minmax(0, 1.35fr) minmax(330px, 1fr); align-items: start; }
  .pos-side { position: sticky; top: 20px; }
  .pos-bar { display: none !important; }
}
.pos-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pos-search { display: flex; gap: 8px; }
.pos-search .input { min-height: 52px; font-size: 1.05rem; border-radius: 13px; background: var(--surface); }
.pos-search .btn { min-height: 52px; border-radius: 13px; }
.kbd-hint { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.searchbar .input:focus ~ .kbd-hint { display: none; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 7px 14px; border-radius: 99px; font-weight: 700; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--ink); color: var(--bg); border-color: transparent; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
@media (max-width: 899px) { .tiles { grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-template-columns: none; grid-auto-columns: 128px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; } .tile { scroll-snap-align: start; } }
.tile {
  --h: 165; position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; text-align: left; min-height: 84px;
  padding: 11px 12px 10px 15px; border-radius: 13px; border: 1px solid var(--line); cursor: pointer; overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--h) 70% 50% / .09), transparent 70%), var(--surface); transition: transform .08s ease, border-color .15s;
}
.tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: hsl(var(--h) 55% 48%); }
.tile:hover { border-color: hsl(var(--h) 55% 48%); }
.tile:active { transform: scale(.96); }
.tile.pop { animation: pop .3s ease; }
@keyframes pop { 40% { transform: scale(.93); } }
.tile-name { font-weight: 700; font-size: .88rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.tile-price { font-weight: 800; font-size: 1.02rem; }
.tile-stock { font-size: .66rem; font-weight: 700; color: var(--bad); }
.tile-q { position: absolute; top: 6px; right: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: var(--brand-ink); font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.tile-q + .tile-name { padding-right: 22px; }

.tk { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.tk-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.tk-head .btn.sm { min-height: 32px; }
.tk-lines { padding: 0 16px; min-height: 120px; }
@media (min-width: 900px) { .tk-lines { max-height: calc(100dvh - 330px); overflow-y: auto; } }
.tk-empty { display: flex; align-items: center; gap: 14px; color: var(--ink-3); padding: 26px 4px; font-size: .9rem; }
.tk-empty .ico svg { width: 38px; height: 38px; opacity: .5; }
.tk-empty strong { color: var(--ink-2); }
.tl { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.tl:last-child { border-bottom: 0; }
.ticket-line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ticket-line:last-child { border-bottom: 0; }
.tl.flash { animation: flash 1s ease; }
@keyframes flash { 0% { background: var(--accent-soft); box-shadow: -16px 0 0 var(--accent-soft), 16px 0 0 var(--accent-soft); } 100% { background: transparent; box-shadow: none; } }
.tl-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-meta { font-size: .78rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-amt { font-weight: 800; min-width: 74px; text-align: right; }
.tk-foot { padding: 12px 16px 16px; background: var(--surface-2); border-top: 1px solid var(--line); }
.tk-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.tk-total span:first-child { font-weight: 700; color: var(--ink-2); }
.tk-total .t { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; }
.btn.xl { min-height: 62px; font-size: 1.2rem; border-radius: 14px; }
.btn kbd { border-color: currentColor; }
@media (max-width: 899px) { .charge-btn { display: none; } .tk-total { margin-bottom: 0; } }

.pos-bar {
  position: fixed; z-index: 25; left: 10px; right: 10px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px;
  background: var(--ink); color: var(--bg); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .2s ease, opacity .2s;
}
.pos-bar.empty { transform: translateY(20px); opacity: 0; pointer-events: none; }
.pos-bar .muted { color: inherit; opacity: .65; }
.pos-bar .pb-t { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.pos-bar .btn { min-width: 130px; background: var(--accent); color: #fff; }
@media (max-width: 899px) { .pos-layout { padding-bottom: 76px; } }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 36px; height: 36px; border: 0; background: var(--surface-2); cursor: pointer; font-weight: 800; font-size: 1.1rem; display: grid; place-items: center; }
.qty button:hover { background: var(--line); }
.qty button.del { color: var(--bad); }
.qty button .ico svg { width: 16px; height: 16px; }
.qty span { min-width: 34px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer; }
.total-box { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; }
.total-box .t { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.change-box { background: var(--ok-soft); color: var(--ok); border-radius: 11px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 1.1rem; }
.change-box.big { padding: 14px 16px; font-size: 1rem; }
.change-box.big .num { font-size: 1.8rem; letter-spacing: -0.02em; }
.change-box.short { background: var(--bad-soft); color: var(--bad); }
.quick-cash { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

/* Pantalla de cobro */
.co-modal { max-width: 520px; }
.co { display: flex; flex-direction: column; gap: 14px; }
.co-total { background: var(--brand); color: var(--brand-ink); border-radius: 16px; padding: 16px 18px; text-align: center; }
.co-total .lbl { font-size: .8rem; font-weight: 700; opacity: .75; text-transform: uppercase; letter-spacing: .06em; }
.co-total .amt { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.co-total .sub { font-size: .85rem; opacity: .75; }
.pay-methods { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 8px; }
.pay-methods button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 4px 10px; border-radius: 13px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--ink-2); }
.pay-methods button .ico svg { width: 26px; height: 26px; }
.pay-methods button kbd { position: absolute; top: 5px; right: 6px; font-size: .6rem; padding: 0 4px; }
.pay-methods button.on { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.cash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 6px; }
.cash-grid .btn { padding: 6px 4px; }
.cash-grid .btn { min-height: 50px; flex-direction: column; gap: 0; font-variant-numeric: tabular-nums; line-height: 1.15; }
.cash-grid .btn small { font-weight: 600; font-size: .72rem; color: var(--ink-3); }
.co-opts { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
#co-disc .input { flex: 1; }
.cust-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }

/* Venta registrada */
.done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.done-check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; animation: pop .4s ease; }
.done-check svg { width: 34px; height: 34px; display: block; }
.done-change { width: 100%; margin-top: 6px; padding: 16px; border-radius: 16px; background: var(--ok-soft); color: var(--ok); }
.done-change.warn { background: var(--warn-soft); color: var(--warn); }
.done-change.plain { background: var(--surface-2); color: var(--ink); }
.done-change .lbl { font-weight: 700; font-size: .9rem; }
.done-change .amt { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.suggest { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 300px; overflow-y: auto; }
.suggest .list-item { padding: 10px 12px; }

/* ---------- Charts ---------- */
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { fill: var(--ink-3); font-size: 10px; font-family: var(--font); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bar-list .bl-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 7px 0; }
.bar-list .bl-track { grid-column: 1 / -1; height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-list .bl-fill { height: 100%; border-radius: 99px; background: var(--brand); }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,16,15,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.modal { background: var(--surface); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: up .2s ease; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@media (min-width: 640px) { .modal-backdrop { align-items: center; padding: 20px; } .modal { border-radius: 20px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }

/* ---------- Toast ---------- */
#toast-root { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px; }
@media (min-width: 900px) { #toast-root { bottom: 24px; } }
.toast { background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); animation: up .2s ease; font-size: .92rem; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

/* ---------- Auth ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent), var(--bg); }
.auth .card { width: 100%; max-width: 400px; padding: 26px 22px; }
.auth .logo { width: 48px; height: 48px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; margin-bottom: 14px; }

/* ---------- Más (menú móvil) ---------- */
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.more-grid a { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }

/* ---------- Impresión (tickets y etiquetas) ---------- */
#print-root { display: none; }
@media print {
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  @page { margin: 8mm; }
  html, body { background: #fff; color: #000; }
}
.print-ticket { width: 72mm; font-family: var(--mono); font-size: 11px; color: #000; }
.print-ticket h1 { font-size: 14px; text-align: center; margin-bottom: 4px; }
.print-ticket .c { text-align: center; }
.print-ticket table { font-size: 11px; }
.print-ticket td, .print-ticket th { padding: 2px 0; border: 0; color: #000; }
.print-ticket hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.labels-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; }
.shelf-label { border: 1px solid #000; border-radius: 2mm; padding: 3mm; height: 30mm; display: flex; flex-direction: column; justify-content: space-between; color: #000; font-family: var(--font); break-inside: avoid; }
.shelf-label .n { font-weight: 700; font-size: 10pt; line-height: 1.15; }
.shelf-label .p { font-weight: 800; font-size: 20pt; text-align: right; }
.shelf-label .b { font-family: var(--mono); font-size: 7pt; }

/* ---------- TPV ---------- */
.sync { position: fixed; z-index: 45; top: calc(8px + env(safe-area-inset-top)); right: 10px; font-size: .72rem; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); pointer-events: none; }
.sync:empty { display: none; }
.sync.ok { color: var(--ok); } .sync.warn { color: var(--warn); } .sync.off { color: var(--warn); background: var(--warn-soft); } .sync.bad { color: var(--bad); background: var(--bad-soft); }
@media (min-width: 900px) { .sync { top: auto; left: auto; bottom: 18px; right: 22px; } }
.note.warn { border-color: var(--accent); background: var(--accent-soft); }
.note.bad { border-color: var(--bad); background: var(--bad-soft); }
details summary { cursor: pointer; }
.print-ticket .r { text-align: right; }
.print-ticket .tot { font-size: 15px; font-weight: bold; text-align: right; margin-top: 2px; }
.print-ticket .qr { margin-top: 4px; }
.print-ticket .qr svg { display: block; margin: 0 auto 2px; }

/* =====================================================================
   Capa "Liquid Glass" con la identidad de Vølden
   ===================================================================== */
.card, .kpi, .modal, .suggest, .sync, .more-grid a, .cashier-chip, .pos-actions .btn, .tk, .chip, .pos-search .input, .pos-search .btn {
  -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass);
}
.card, .kpi { border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow); border-radius: var(--radius); }
h1 { font-size: 1.45rem; font-weight: 700; }
h2 { font-size: 1.02rem; font-weight: 700; }
.topbar h1 { font-size: 1.5rem; }

/* Etiquetas en mono, como el "eyebrow" de voldenstudio.com */
.kpi .label, .section-title, .sidebar .section, .co-total .lbl, .done-change .lbl, .field label, th {
  font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; font-size: .68rem;
}
.field label { color: var(--ink-3); }
.kpi .value, .total-box .t, .tk-total .t, .co-total .amt, .done-change .amt, .pprice, .pb-t, .stat .v, .tile-price, .tl-amt, .pos-name, .change-box .num {
  font-family: var(--display); letter-spacing: -0.03em;
}
.kpi .value { font-weight: 700; font-size: 1.35rem; }
.tk-total .t, .co-total .amt, .done-change .amt { font-weight: 700; }
.tile-price { font-weight: 600; font-size: .95rem; }
.tl-amt { font-weight: 600; font-size: .92rem; }
.pos-name { font-weight: 700; font-size: 1.15rem; }

/* Tarjeta destacada: tinta de Vølden con brillo naranja */
.kpi.hero { background: var(--ink-grad); color: var(--bg); border-color: rgba(255,255,255,.12); position: relative; overflow: hidden; box-shadow: var(--shadow); }
.kpi.hero::after { content: ''; position: absolute; width: 160px; height: 160px; right: -50px; top: -60px; border-radius: 50%; background: radial-gradient(circle, rgba(242,106,27,.55), transparent 70%); pointer-events: none; }
.kpi.hero .label, .kpi.hero .sub { color: inherit; opacity: .7; }
.co-total { background: var(--ink-grad); color: var(--bg); position: relative; overflow: hidden; border-radius: 22px; box-shadow: var(--shadow); }
.co-total::after { content: ''; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: radial-gradient(circle, rgba(242,106,27,.6), transparent 70%); pointer-events: none; }
.co-total > * { position: relative; z-index: 1; }

/* Botones en píldora, como en la web de Vølden */
.btn { border: 1px solid var(--glass-edge); background: var(--surface); box-shadow: var(--glass-hi), 0 1px 2px rgba(30,26,23,.06); border-radius: 999px; }
.btn:hover { background: color-mix(in srgb, var(--surface-solid) 85%, transparent); }
.btn.primary { background: var(--brand-grad); color: #fff; border-color: rgba(255,255,255,.3); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 6px rgba(120,40,0,.18), var(--glow); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.accent { background: var(--ink-grad); color: var(--bg); border-color: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 8px 18px -10px rgba(30,26,23,.7); }
.btn.danger.solid { background: linear-gradient(180deg, #E0503F, #C8372D); border-color: rgba(255,255,255,.25); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 18px -8px rgba(200,55,45,.6); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.icon-btn { border-radius: 50%; }
.btn.xl, .btn.lg { border-radius: 999px; }
.pay-methods button, .cash-grid .btn, .quick-cash .btn { border-radius: 18px; }

/* Campos */
.input, select.input, textarea.input { background: var(--surface-2); border: 1px solid var(--glass-edge); border-radius: 14px; box-shadow: inset 0 1px 2px rgba(30,26,23,.06); }
.input:focus { background: var(--surface-solid); border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.seg { background: var(--surface-2); border: 1px solid var(--glass-edge); border-radius: 999px; box-shadow: inset 0 1px 2px rgba(30,26,23,.06); }
.seg button { border-radius: 999px; }
.seg button.on { background: var(--ink); color: var(--bg); box-shadow: 0 2px 8px rgba(30,26,23,.2); }
.badge { background: var(--surface-2); border-color: var(--glass-edge); font-family: var(--mono); font-weight: 500; font-size: .68rem; letter-spacing: .02em; }
.badge.ok, .badge.warn, .badge.bad, .badge.accent { border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--warn); }
.list-item:hover { background: var(--surface-2); border-radius: 12px; }
a { color: var(--warn); }

/* Navegación */
.sidebar nav a.active { background: var(--ink); color: var(--bg); box-shadow: 0 8px 18px -10px rgba(30,26,23,.7); }
.sidebar nav a.active .ico { color: var(--brand-2); }
.bottomnav a.scan-btn .ico { background: var(--brand-grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), var(--glow); }
.bottomnav a.active { color: var(--warn); }
.sync { background: var(--surface); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow); font-family: var(--mono); font-weight: 500; }

/* Marca: KASSO en Unbounded con la O naranja + "by Vølden" */
.kasso-mark { width: 38px; height: 38px; filter: drop-shadow(0 6px 12px rgba(30,26,23,.25)); }
.kasso-word { font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1; color: var(--ink); }
.kasso-word i { font-style: normal; color: var(--brand); }
.by-volden { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 500; color: var(--ink-3); text-decoration: none; }
.by-volden svg { height: 24px; width: auto; color: var(--ink); }
.sidebar .made { padding: 10px 12px 0; }

/* Diálogos */
.modal-backdrop { background: rgba(30,26,23,.28); -webkit-backdrop-filter: blur(8px) saturate(130%); backdrop-filter: blur(8px) saturate(130%); }
.modal { background: color-mix(in srgb, var(--surface-solid) 82%, transparent); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), 0 30px 80px -20px rgba(60,30,10,.45); border-radius: 28px 28px 0 0; }
@media (min-width: 640px) { .modal { border-radius: 28px; } }
.suggest { background: color-mix(in srgb, var(--surface-solid) 88%, transparent); border: 1px solid var(--glass-edge); border-radius: 16px; box-shadow: var(--glass-hi), var(--shadow); }
.toast { background: color-mix(in srgb, #1E1A17 90%, transparent); color: #F4EDE5; -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); border-radius: 20px; border: 1px solid rgba(255,255,255,.12); padding: 11px 20px; }
.toast.ok { background: color-mix(in srgb, var(--ok) 94%, transparent); color: #fff; }
.toast.bad { background: color-mix(in srgb, var(--bad) 94%, transparent); color: #fff; }
.more-grid a { background: var(--surface); border: 1px solid var(--glass-edge); border-radius: 18px; box-shadow: var(--glass-hi), var(--shadow); }
.scanner { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Acceso */
.auth { background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.auth .card { max-width: 410px; padding: 30px 26px; border-radius: 30px; }
.auth .brandline { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth .brandline .kasso-mark { width: 54px; height: 54px; }
.auth .brandline .kasso-word { font-size: 1.9rem; }
.auth h1 { font-size: 1.35rem; }
.auth .made { margin-top: 18px; }

/* Caja */
.pos-code { background: var(--ink-grad); color: var(--bg); font-family: var(--display); font-weight: 700; box-shadow: 0 10px 20px -10px rgba(30,26,23,.7); border-radius: 15px; }
.cashier-chip { background: var(--surface); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow); }
.cashier-chip .av { background: var(--brand-grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.pos-actions .count { background: var(--brand); color: #fff; }
.pos-search .input { background: var(--surface); }
.pos-search .btn.accent { border-radius: 16px; }
.chip { background: var(--surface); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi); }
.chip.on { background: var(--ink); color: var(--bg); border-color: transparent; box-shadow: 0 6px 14px -8px rgba(30,26,23,.8); }
.tile { background: linear-gradient(150deg, hsl(var(--h) 75% 62% / .14), transparent 65%), var(--surface); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), 0 6px 16px -10px rgba(80,45,20,.35); border-radius: 18px; }
.tile::before { width: auto; inset: auto 12px 0 12px; height: 3px; border-radius: 3px 3px 0 0; background: hsl(var(--h) 60% 55%); }
.tile:hover { border-color: hsl(var(--h) 60% 60% / .7); }
.tile-q { background: var(--brand-grad); color: #fff; box-shadow: 0 4px 10px -4px rgba(242,106,27,.8); }
.tk { border-radius: 26px; }
.tk-head { border-bottom-color: var(--line); }
.tk-foot { background: var(--surface-2); border-top: 1px solid var(--line); }
.qty { border: 1px solid var(--glass-edge); border-radius: 999px; background: var(--surface-2); }
.qty button { background: transparent; }
.qty button:hover { background: var(--surface); }
.pos-bar { background: color-mix(in srgb, #1E1A17 88%, transparent); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); border: 1px solid rgba(255,255,255,.12); border-radius: 26px; color: #F4EDE5; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 18px); }
.pos-bar .btn { background: var(--brand-grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), var(--glow); }
.pay-methods button { background: var(--surface); border: 1.5px solid var(--glass-edge); box-shadow: var(--glass-hi); }
.pay-methods button.on { border-color: var(--brand); color: var(--warn); background: color-mix(in srgb, var(--brand) 10%, var(--surface-solid)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent), var(--glass-hi); }
.change-box, .done-change { border-radius: 18px; }
.done-check { background: var(--accent-soft); color: var(--brand); }

@media (prefers-reduced-transparency: reduce) {
  :root { --surface: var(--surface-solid); --surface-2: var(--bg); }
}

/* Aviso de licencia (tienda) */
.license-note { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: 16px; font-size: .9rem;
  background: var(--surface); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); }
.license-note.warn { background: var(--accent-soft); color: var(--warn); border-color: transparent; }
.license-note.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.license-note .ico svg { width: 18px; height: 18px; }
.license-note a { font-weight: 700; color: inherit; margin-left: 4px; }

/* Facturas de proveedores (foto → datos) */
.scan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .scan-pick { grid-template-columns: 1fr; } }
.scan-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 26px 16px; border-radius: 22px; cursor: pointer;
  background: var(--surface); border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, transparent); transition: transform .1s, background .15s; }
.scan-opt:hover { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.scan-opt:active { transform: scale(.98); }
.scan-opt.primary { background: var(--brand-grad); color: #fff; border: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), var(--glow); }
.scan-opt .ico svg { width: 34px; height: 34px; }
.scan-opt span { font-size: .82rem; opacity: .75; }
.scan-wait { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.scan-wait img, .scan-pdf { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 16px; background: var(--surface-2); }
.scan-pdf { display: grid; place-items: center; gap: 8px; padding: 40px 10px; text-align: center; font-size: .85rem; }
.scan-pdf .ico svg { width: 40px; height: 40px; }
.scan-status { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.inv-review { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .inv-review, .scan-wait { grid-template-columns: 1fr; } }
.inv-doc { position: sticky; top: 0; border-radius: 18px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--glass-edge); }
.inv-doc img { display: block; width: 100%; max-height: 72vh; object-fit: contain; }
.inv-doc iframe { display: block; width: 100%; height: 66vh; border: 0; background: #fff; }
.inv-doc.solo iframe { height: 72vh; }
@media (max-width: 760px) { .inv-doc { position: static; } .inv-doc img { max-height: 34vh; } .inv-doc iframe { height: 40vh; } }
.vat-lines { display: flex; flex-direction: column; gap: 6px; }
.vat-head, .vat-row { display: grid; grid-template-columns: 86px 1fr 1fr 1fr 38px; gap: 6px; align-items: center; }
.vat-head span { font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.vat-row .input { min-height: 40px; padding: 8px 10px; }
.vat-lines .btn.sm { align-self: flex-start; }
.progress { width: 180px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--brand-grad); transition: width .2s; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; display: inline-block; vertical-align: -3px; }

/* =====================================================================
   Móvil: cabeceras, fechas, tablas y aviso de conexión
   ===================================================================== */
.date-range { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.date-range .input { width: auto; }
@media (max-width: 699px) {
  /* El aviso «Conectado» solo aparece si hay algo que contar, y sin tapar los botones */
  .sync.ok { display: none; }
  .sync { left: 50%; right: auto; transform: translateX(-50%); white-space: nowrap; }

  /* Cabecera: título arriba y botones debajo, a lo ancho */
  .topbar { flex-wrap: wrap; align-items: flex-start; margin-bottom: 14px; }
  .topbar .title { flex: 1 1 100%; min-width: 0; }
  .topbar h1 { font-size: 1.35rem; overflow-wrap: anywhere; }
  .topbar .actions { flex: 1 1 100%; justify-content: stretch; flex-wrap: nowrap; }
  .topbar .actions:empty { display: none; }
  .topbar .actions > .btn { flex: 1 1 0; min-width: 0; justify-content: center; white-space: nowrap; }
  .topbar .actions > .btn.sm { flex: 0 0 auto; }

  /* Rango de fechas en una línea */
  .date-range { display: flex; flex: 1 1 100%; min-width: 0; }
  .row > .row:has(> .date-range) { flex: 1 1 100%; min-width: 0; }
  .date-range .input { flex: 1 1 0; min-width: 0; width: 100%; padding-left: 10px; padding-right: 8px; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1 1 auto; padding: 7px 10px; }

  /* Botones grandes de igual altura y sin cortar palabras raras */
  .quick-grid { gap: 10px; }
  .quick-grid .btn.lg { min-height: 58px; padding: 10px 14px; font-size: .95rem; justify-content: flex-start; text-align: left; line-height: 1.15; border-radius: 20px; }

  /* Tablas anchas → fichas */
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr:first-child:has(th) { display: none; }
  table.stack-sm tr { padding: 12px 2px; border-bottom: 1px solid var(--line); }
  table.stack-sm tr:last-child { border-bottom: 0; }
  table.stack-sm td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 0; border: 0; text-align: right; font-size: .88rem; }
  table.stack-sm td .cv { min-width: 0; overflow-wrap: anywhere; }
  table.stack-sm td[data-label]::before { content: attr(data-label); flex-shrink: 0; text-align: left; font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
  /* La primera columna hace de título de la ficha */
  table.stack-sm td:first-child { justify-content: flex-start; text-align: left; font-size: .95rem; font-weight: 700; padding-bottom: 4px; }
  table.stack-sm td:first-child::before { display: none; }
  table.stack-sm td:not([data-label]) { justify-content: flex-end; }
  table.stack-sm td:empty, table.stack-sm td:has(> .cv:empty) { display: none; }
  .table-wrap { margin: 0; }
}

/* =====================================================================
   iPhone con notch / Dynamic Island: nada queda debajo de la barra de estado
   ===================================================================== */
.main { padding-top: calc(16px + env(safe-area-inset-top)); }
@media (min-width: 900px) { .main { padding-top: calc(28px + env(safe-area-inset-top)); } }
.auth { padding-top: calc(20px + env(safe-area-inset-top)); }
.modal { max-height: calc(100dvh - env(safe-area-inset-top) - 16px); }
@media (max-width: 899px) { .main, .auth { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); } }
/* Franja bajo la barra de estado para que el contenido no se mezcle con la hora y la batería al hacer scroll */
html::after { content: ''; position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); pointer-events: none;
  background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

/* =====================================================================
   Imágenes de producto, caja táctil, importación y pedidos
   ===================================================================== */
/* Miniatura de producto: foto o iniciales sobre el color de su categoría */
.thumb, .tile-img { --h: 24; position: relative; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); }
.thumb img, .tile-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb b, .tile-img b { display: none; }
.thumb.noimg, .tile-img.noimg { background: linear-gradient(145deg, hsl(var(--h) 75% 62% / .32), hsl(var(--h) 70% 45% / .18)); border-color: hsl(var(--h) 50% 50% / .25); }
.thumb.noimg b, .tile-img.noimg b { display: block; font-family: var(--display); font-weight: 700; font-size: .78rem; color: hsl(var(--h) 55% 30%); letter-spacing: -0.02em; }
.thumb.noimg .ico svg { width: 20px; height: 20px; color: hsl(var(--h) 55% 32%); }
.thumb.sm { width: 36px; height: 36px; border-radius: 10px; }
.thumb.sm.misc { background: var(--accent-soft); border-color: transparent; color: var(--brand); }
.thumb.lg { width: 72px; height: 72px; border-radius: 16px; }
.thumb.lg b { font-size: 1.1rem; }
.thumb.xl { width: 112px; height: 112px; border-radius: 20px; }
.thumb.xl b { font-size: 1.6rem; }
@media (prefers-color-scheme: dark) {
  .thumb, .tile-img { background: #fff; }
  .thumb.noimg b, .tile-img.noimg b, .thumb.noimg .ico svg { color: hsl(var(--h) 70% 78%); }
}
.price small, .pprice small, .tile-price small { font-size: .62em; font-weight: 600; color: var(--ink-3); margin-left: 2px; }

/* Botones de producto con foto */
.tile.has-img, .tile:has(.tile-img) { padding-top: 8px; }
.tile .tile-img { width: 100%; height: 74px; border-radius: 12px; margin-bottom: 2px; }
.tile .tile-img.noimg { height: 44px; }
.tile .tile-img.noimg b { font-size: .95rem; }
.tile.has-img .tile-img { height: 92px; background: #fff; }
.tile-kg .ico svg { width: 16px; height: 16px; color: var(--ink-3); }
.tile-misc { --h: 24; border-style: dashed; justify-content: flex-start; background: var(--accent-soft); }
.tile-misc::before { background: var(--brand); }
.tile-misc .tile-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-grad); color: #fff; box-shadow: var(--glow); }
.tile-misc .tile-ico svg { width: 22px; height: 22px; }
@media (max-width: 899px) { .tiles { grid-auto-columns: 132px; } .tile.has-img .tile-img { height: 76px; } }

/* Líneas del ticket con miniatura; tocar el nombre abre la edición de la línea */
.tl { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.tl-info { all: unset; display: flex; flex-direction: column; min-width: 0; cursor: pointer; border-radius: 8px; padding: 2px 4px; margin: -2px -4px; }
.tl-info:hover { background: var(--surface-2); }
.tl-info:focus-visible { outline: 2px solid var(--brand); }
.tl-meta s, .le s { color: var(--ink-3); }
.qty.single { border-color: transparent; }
.qty.single button { background: transparent; }

/* Teclado numérico */
.kp-modal { max-width: 420px; }
.kp { display: flex; flex-direction: column; gap: 10px; }
.kp-prod { display: flex; align-items: center; gap: 12px; }
.kp-extra { display: flex; flex-direction: column; gap: 8px; }
.kp-extra .seg { display: flex; }
.kp-extra .seg button { flex: 1; }
.kp-display { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.kp-v { font-family: var(--display); font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; overflow: hidden; text-overflow: ellipsis; }
.kp-u { font-weight: 700; color: var(--ink-3); }
.kp-preview { text-align: right; min-height: 1.3em; font-size: .95rem; }
.kp-preview strong { font-family: var(--display); color: var(--ink); font-size: 1.2rem; }
.kp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kp-k { min-height: 58px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-solid); font: 700 1.45rem var(--display); color: var(--ink); cursor: pointer; transition: transform .06s, background .15s; touch-action: manipulation; }
.kp-k:hover { background: var(--surface-2); }
.kp-k:active { transform: scale(.95); background: var(--accent-soft); }

/* Editor de línea */
.le { display: flex; flex-direction: column; gap: 14px; }
.le-head { display: flex; gap: 14px; align-items: center; }
.le-amt { font-family: var(--display); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; }
.le-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.le-actions .btn:only-child { grid-column: 1 / -1; }
.le-disc { display: flex; flex-direction: column; gap: 6px; }
.le-disc .row { gap: 6px; }
.le-disc .btn { flex: 1; min-width: 56px; }

/* Ficha de producto con foto */
.pf { display: grid; gap: 16px; }
@media (min-width: 700px) { .pf { grid-template-columns: 180px 1fr; align-items: start; } }
.pf-photo { display: flex; flex-direction: column; gap: 8px; }
.pf-img { aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; position: relative; }
@media (max-width: 699px) { .pf-photo { flex-direction: row; align-items: center; } .pf-img { width: 112px; flex-shrink: 0; } .pf-photo-btns { flex-direction: column; } }
.pf-img img { width: 100%; height: 100%; object-fit: contain; }
.pf-img.busy::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23F26A1B' stroke-width='2.5' stroke-dasharray='40 20'/%3E%3C/svg%3E") center / 34px no-repeat; animation: none; }
.pf-noimg { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink-3); font-size: .8rem; font-weight: 600; }
.pf-noimg .ico svg { width: 34px; height: 34px; opacity: .55; }
.pf-photo-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-photo-btns .btn { flex: 1; cursor: pointer; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .92rem; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.off-box { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.off-box img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: #fff; }
.off-box > div { flex: 1; min-width: 0; }
.off-box .ico svg { width: 16px; height: 16px; vertical-align: -3px; color: var(--brand); }
.product-hero.with-img { flex-direction: row; gap: 16px; align-items: center; }
.product-hero.with-img > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* Importar */
.drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 34px 20px; border: 2px dashed color-mix(in srgb, var(--brand) 35%, var(--line)); border-radius: 22px; cursor: pointer; background: var(--surface-2); transition: background .15s, border-color .15s; }
.drop:hover, .drop.over { background: var(--accent-soft); border-color: var(--brand); }
.drop.busy { opacity: .6; pointer-events: none; }
.drop .ico svg { width: 40px; height: 40px; color: var(--brand); }
.im-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 12px; }
.im-map .field { gap: 3px; }
.im-done { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.im-done .ico svg { width: 44px; height: 44px; color: var(--ok); }

/* Pedidos */
.ro-group + .ro-group { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ro-head { margin-bottom: 4px; }
.field.check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field.check > span { font-size: .92rem; color: var(--ink); font-weight: 400; text-transform: none; letter-spacing: 0; font-family: var(--font); }
.locked { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.locked > .ico svg { width: 20px; height: 20px; color: var(--ink-3); margin-top: 2px; }

/* Ofertas en el ticket */
.tl-promo { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin-top: -4px; font-size: .78rem; font-weight: 700; color: var(--ok); }
.tl-promo .ico svg { width: 14px; height: 14px; }
.tl-amt s { font-weight: 500; }
.promo-card.off { opacity: .6; }
.promo-big { font-family: var(--display, inherit); font-size: 1.9rem; font-weight: 800; color: var(--brand); margin: 2px 0 6px; letter-spacing: -.01em; }

/* Cliente en el cobro */
.co-cli { justify-content: flex-start; }
.co-cli .av, .kiosk-p .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; font-size: .85rem;
  background: hsl(var(--h, 24) 70% 92%); color: hsl(var(--h, 24) 55% 32%); }
.co-cli-add { justify-content: flex-start; border: 1.5px dashed var(--line); }
.co-cli-add .muted { font-weight: 500; }

/* Fichaje */
.clock-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.clock-card .clock-now { font-family: var(--mono); font-size: 3.2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 6px 0; }
.clock-card.in { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.clock-card.in .clock-now { color: var(--ok); }
.kiosk { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kiosk-p { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 12px; border-radius: 22px; border: 1.5px solid var(--glass-edge, var(--line)); background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); box-shadow: var(--shadow); }
.kiosk-p .av { width: 64px; height: 64px; font-size: 1.3rem; }
.kiosk-p .small { color: var(--ink-3); }
.kiosk-p.in { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.kiosk-p.in .small { color: var(--ok); font-weight: 700; }

/* Recuento */
.rc-n { width: 84px; text-align: right; font-weight: 700; }
.rc-row.flash { animation: flashbg 1.2s ease; }
@keyframes flashbg { from { background: color-mix(in srgb, var(--ok) 22%, transparent); } to { background: transparent; } }

/* Asistente */
.chat-card { display: flex; flex-direction: column; gap: 10px; min-height: 60vh; }
.chat { flex: 1; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 62vh; padding: 4px 2px; }
.msg { max-width: min(680px, 88%); padding: 10px 14px; border-radius: 18px; line-height: 1.5; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; }
.msg ul { margin: 4px 0 6px; padding-left: 20px; }
.msg.me { align-self: flex-end; background: var(--brand-grad); color: #fff; border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.thinking { display: flex; gap: 5px; padding: 14px 16px; }
.msg.thinking span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: dots 1s infinite ease-in-out; }
.msg.thinking span:nth-child(2) { animation-delay: .15s; } .msg.thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-in { display: flex; gap: 8px; align-items: flex-end; }
.chat-in textarea { resize: none; min-height: 46px; }
.daily-text { line-height: 1.55; }
.daily-text p { margin: 0 0 4px; } .daily-text ul { margin: 2px 0 8px; padding-left: 20px; }

/* Ticket digital (página pública) */
.pub { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.pub-card { background: #fff; color: #000; border-radius: 18px; padding: 20px 16px; box-shadow: var(--shadow); max-width: 100%; }
.pub-card .print-ticket { width: min(80mm, 100%); font-size: 12px; }
.pub-actions { display: flex; gap: 8px; }

/* Registro de jornada impreso */
.print-sheet { font-family: var(--font); color: #000; break-after: page; }
.print-sheet h2 { font-size: 16pt; margin: 0 0 4px; }
.print-sheet table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 10pt; }
.print-sheet td, .print-sheet th { border: 1px solid #999; padding: 4px 6px; text-align: left; color: #000; }
@media print { .pub .pub-actions, .pub .made { display: none !important; } .pub { padding: 0; min-height: 0; } .pub-card { box-shadow: none; padding: 0; } }

/* ---------- Menú lateral minimizable ---------- */
.side-tog { display: none; }
@media (min-width: 900px) {
  .sidebar { transition: width .22s ease; }
  .side-tog { display: grid; place-items: center; margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 10px; background: none; color: var(--ink-3); cursor: pointer; flex-shrink: 0; }
  .side-tog:hover { background: var(--surface-2); color: var(--ink); }
  .side-tog .ico svg { width: 18px; height: 18px; transition: transform .22s ease; }
  body.side-mini .sidebar { width: 78px; padding-left: 10px; padding-right: 10px; }
  body.side-mini .sidebar .brand { padding: 2px 0 12px; flex-direction: column; gap: 8px; }
  body.side-mini .side-tog { margin: 0; }
  body.side-mini .side-tog .ico svg { transform: rotate(180deg); }
  body.side-mini .sidebar .brand > div, body.side-mini .sidebar nav a > span:not(.ico), body.side-mini .sidebar .me, body.side-mini .sidebar .made { display: none; }
  body.side-mini .sidebar nav a { justify-content: center; padding: 10px 0; }
  body.side-mini .sidebar .section { font-size: 0; padding: 0; margin: 10px 14px 8px; border-top: 1px solid var(--line); }
}

/* ---------- Ayuda ---------- */
.help-btn .ico svg { width: 20px; height: 20px; }
.modal-head h2 .ico { display: inline-block; vertical-align: -3px; margin-right: 4px; color: var(--brand); }
.help-steps { margin: 0 0 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.45; }
.help-steps li::marker { font-weight: 800; color: var(--brand); }
.help-tips { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--accent-soft); font-size: .92rem; }
.help-tips div { display: flex; gap: 8px; align-items: flex-start; }
.help-tips .ico svg { width: 16px; height: 16px; color: var(--brand); margin-top: 2px; }
.help-hero, .help-contact { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.help-h { margin: 22px 0 10px; }
.help-card summary { display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; }
.help-card summary::-webkit-details-marker { display: none; }
.help-card summary::after { content: '+'; margin-left: auto; font-weight: 800; color: var(--ink-3); font-size: 1.2rem; }
.help-card[open] summary::after { content: '–'; }
.help-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--brand); flex-shrink: 0; }
.help-in { margin-top: 12px; }
.faq { padding: 12px 2px; border-bottom: 1px dashed var(--line); }
.faq:last-child { border-bottom: 0; }
.faq summary { font-weight: 700; }
.faq p { margin: 8px 0 0; color: var(--ink-2); line-height: 1.5; }
.help-contact { margin-top: 14px; }

/* ---------- Tour ---------- */
.tour { position: fixed; inset: 0; z-index: 200; }
.tour-hole { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(23,19,15,.62); transition: all .28s ease; pointer-events: none; outline: 3px solid rgba(255,140,66,.9); outline-offset: 2px; }
.tour-pop { position: fixed; width: min(340px, calc(100vw - 24px)); background: var(--surface-solid); color: var(--ink); border-radius: 22px; padding: 18px 18px 14px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); transition: left .28s ease, top .28s ease; }
.tour-pop h3 { margin: 4px 0 6px; font-size: 1.15rem; }
.tour-pop p { margin: 0 0 12px; color: var(--ink-2); line-height: 1.45; }
.tour-n { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: var(--brand); text-transform: uppercase; }
.tour-dots { display: flex; gap: 5px; margin-bottom: 12px; flex-wrap: wrap; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tour-dots i.on { background: var(--brand); width: 18px; border-radius: 4px; }

/* Firma de Vølden abajo, en la zona de contenido */
.main { display: flex; flex-direction: column; min-height: 100dvh; }
#view { flex: 1 0 auto; }
.app-foot { display: flex; justify-content: center; padding: 28px 0 4px; opacity: .85; }
.app-foot .by-volden svg { height: 26px; }
body[data-route="/caja"] .app-foot { display: none; }

/* ---------- Planes: funciones bloqueadas y pantalla de KASSO Pro ---------- */
.sidebar nav a.in-pro, .more-grid a.in-pro { opacity: .62; }
.sidebar nav a.in-pro:hover, .more-grid a.in-pro:hover { opacity: 1; }
.pro-tag { margin-left: auto; display: inline-flex; font-style: normal; color: var(--brand); }
.pro-tag .ico svg { width: 14px; height: 14px; }
body.side-mini .sidebar nav a .pro-tag { display: none; }
.upsell { max-width: 620px; margin: 10px auto 0; text-align: center; padding: 36px 28px; }
.upsell .up-ico { position: relative; width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 22px; display: grid; place-items: center; background: var(--brand-grad); color: #fff; box-shadow: 0 14px 30px -12px rgba(242,106,27,.7); }
.upsell .up-ico > .ico svg { width: 34px; height: 34px; }
.upsell .up-ico > span:last-child { position: absolute; right: -8px; bottom: -8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; border: 3px solid var(--surface-solid, #fff); }
.upsell .up-ico > span:last-child svg { width: 14px; height: 14px; }
.upsell .up-k { font: 700 .72rem/1 var(--mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.upsell h2 { font-size: 1.6rem; margin: 10px 0 8px; }
.up-list { list-style: none; padding: 0; margin: 18px auto 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; text-align: left; max-width: 520px; }
.up-list li { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.up-list li .ico { color: var(--ok); flex-shrink: 0; }
.up-list li .ico svg { width: 18px; height: 18px; }
.up-list li.on { color: var(--ink); }
.up-list li.on .ico { color: var(--brand); }
@media (max-width: 560px) { .up-list { grid-template-columns: 1fr; } .upsell { padding: 28px 18px; } }
