/* =========================================================
   Clean Footgear Co. — Punto de venta
   Paleta tomada del logo (#005870) y del encabezado durazno de tus tableros.
   ========================================================= */
:root {
  color-scheme: light;
  --teal: #005870;
  --teal-700: #00475b;
  --teal-900: #00303f;
  --teal-300: #7fb5c4;
  --teal-100: #d3e7ec;
  --teal-50: #eaf3f5;
  --peach: #fce9d8;
  --peach-300: #f4cfae;
  --ink: #0f242d;
  --ink-2: #3c5560;
  --ink-3: #647c86;
  --paper: #ffffff;
  --bg: #edf3f4;
  --line: #cbdce1;
  --ok: #1d7a4b;
  --ok-bg: #dcf1e5;
  --warn: #8a5a00;
  --warn-bg: #fbeacb;
  --bad: #b3372b;
  --bad-bg: #f9dcd8;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Anton", Impact, "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --r-tile: 22px;
  --r-card: 16px;
  --r-field: 12px;
  --shadow: 0 1px 0 rgba(0, 48, 63, .06), 0 6px 18px -8px rgba(0, 48, 63, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 500 17px/1.45 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid #1b9bbd; outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: .02em; text-transform: uppercase; line-height: 1.05; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 8px clamp(14px, 3vw, 32px);
  background: var(--peach); border-bottom: 3px solid var(--teal);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { display: block; }
.brand-name { font-family: var(--font-display); font-size: clamp(22px, 3vw, 34px); letter-spacing: .03em; line-height: 1; }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--teal-700); }
.crumbs .sep { color: var(--teal-300); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.clock { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-right: 8px; white-space: nowrap; }
.icon-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: transparent; color: var(--teal-700); text-decoration: none;
}
.icon-btn:hover { background: rgba(0, 88, 112, .12); }

main { padding: clamp(14px, 2.4vw, 28px) clamp(14px, 3vw, 32px) 56px; max-width: 1480px; margin: 0 auto; outline: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 14px; border: 2px solid var(--teal);
  background: var(--teal); color: #fff; font-weight: 800; font-size: 1rem; text-decoration: none;
  transition: transform .08s ease, background .15s ease;
}
.btn:hover { background: var(--teal-700); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: var(--paper); color: var(--teal-700); }
.btn.secondary:hover { background: var(--teal-50); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--teal-700); }
.btn.ghost:hover { background: var(--teal-100); }
.btn.danger { background: var(--paper); color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.big { min-height: 68px; font-size: 1.25rem; border-radius: 18px; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: .92rem; border-radius: 11px; }
.btn.block { width: 100%; }
.btn svg { flex: none; }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; }
.field > span { font-weight: 700; font-size: .92rem; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 10px 14px; border-radius: var(--r-field);
  border: 2px solid var(--line); background: var(--paper); font-weight: 600;
}
.textarea { min-height: 88px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 4px rgba(0, 88, 112, .15); }
.input.xl { min-height: 72px; font-family: var(--font-display); font-size: 2.2rem; letter-spacing: .04em; text-align: center; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: .88rem; color: var(--ink-3); font-weight: 500; }
.err-text { color: var(--bad); font-weight: 700; }

/* ---------- Paneles y encabezados ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 4vw, 46px); text-transform: uppercase; letter-spacing: .02em; line-height: 1; color: var(--teal-900); }
.page-head p { margin: 6px 0 0; color: var(--ink-3); font-weight: 600; }
.panel { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); padding: clamp(16px, 2vw, 24px); }
.panel + .panel { margin-top: 18px; }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-title h2 { font-size: 1.15rem; font-weight: 800; color: var(--teal-900); }
.tabs { display: inline-flex; gap: 6px; padding: 5px; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); flex-wrap: wrap; }
.tab { min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; background: transparent; font-weight: 800; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; }
.tab[aria-selected="true"], .tab.on { background: var(--teal); color: #fff; }

/* =========================================================
   INICIO — tarjetas grandes
   ========================================================= */
.home-grid {
  display: grid; gap: clamp(12px, 1.6vw, 20px);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(150px, auto);
}
.home-tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  padding: clamp(18px, 2.2vw, 28px); border-radius: 28px; text-decoration: none; color: var(--ink);
  background: var(--paper); box-shadow: var(--shadow); border: 2px solid transparent; overflow: hidden;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.home-tile:hover { transform: translateY(-3px); border-color: var(--teal); }
.home-tile:active { transform: translateY(0); }
.home-tile .ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal); }
.home-tile .ico svg { width: 36px; height: 36px; }
.home-tile h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; font-size: clamp(28px, 3vw, 40px); line-height: 1; color: var(--teal-900); }
.home-tile p { margin: 6px 0 0; font-weight: 600; color: var(--ink-3); }
.home-tile.ventas { grid-column: 1 / span 3; grid-row: span 2; background: var(--teal); color: #fff; border-color: var(--teal-900); }
.home-tile.ventas h2 { color: #fff; font-size: clamp(46px, 6vw, 84px); }
.home-tile.ventas p { color: rgba(255,255,255,.82); font-size: 1.1rem; }
.home-tile.ventas .ico { background: rgba(255,255,255,.14); color: #fff; width: 84px; height: 84px; border-radius: 26px; }
.home-tile.ventas .ico svg { width: 48px; height: 48px; }
.home-tile.ventas:hover { border-color: var(--peach); }
.home-tile.ventas .wave { position: absolute; right: -40px; bottom: -30px; width: 62%; opacity: .12; pointer-events: none; }
.home-tile.cat, .home-tile.cli { grid-column: span 3; flex-direction: row; align-items: center; justify-content: flex-start; gap: 22px; }
.home-tile.rep { grid-column: span 2; }
.today { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.today div { background: rgba(255,255,255,.14); border-radius: 16px; padding: 10px 16px; min-width: 120px; }
.today b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; letter-spacing: .02em; line-height: 1.1; }
.today span { font-size: .85rem; font-weight: 700; opacity: .85; }
.group-label { margin: 28px 2px 12px; font-weight: 800; color: var(--ink-2); }

/* =========================================================
   NUEVA VENTA
   ========================================================= */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.pos-main { display: grid; gap: 18px; }
.pos-side { position: sticky; top: 92px; }
.step-title { font-size: 1.1rem; font-weight: 800; color: var(--teal-900); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.step-title small { font-weight: 600; color: var(--ink-3); font-size: .9rem; }

.client-row { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: stretch; }
.client-card { border: 2px dashed var(--line); border-radius: var(--r-card); padding: 14px 18px; display: grid; align-content: center; gap: 2px; min-height: 100px; }
.client-card.ok { border: 2px solid var(--teal); background: var(--teal-50); }
.client-card.miss { border-color: var(--warn); background: var(--warn-bg); }
.client-card .nm { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: .02em; text-transform: uppercase; color: var(--teal-900); line-height: 1.1; }
.client-card .meta { font-weight: 600; color: var(--ink-2); }
.client-card .row-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.search-pop { position: relative; }
.results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); background: var(--paper); border-radius: 14px; box-shadow: 0 14px 40px -10px rgba(0,48,63,.45); border: 2px solid var(--teal); max-height: 340px; overflow: auto; }
.results button { display: flex; width: 100%; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border: 0; background: transparent; border-bottom: 1px solid var(--line); }
.results button:hover, .results button:focus-visible { background: var(--teal-50); }
.results .badge { flex: none; }

.badge-n { display: inline-grid; place-items: center; min-width: 46px; height: 34px; padding: 0 10px; border-radius: 10px; background: var(--teal); color: #fff; font-family: var(--font-display); letter-spacing: .04em; font-size: 1.1rem; }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 104px; padding: 14px 10px; border-radius: var(--r-tile); text-align: center;
  background: var(--paper); border: 2px solid var(--line); color: var(--ink); font-weight: 800;
  transition: transform .08s ease, border-color .12s ease, background .12s ease;
}
.tile:hover:not([disabled]) { border-color: var(--teal); background: var(--teal-50); }
.tile:active:not([disabled]) { transform: scale(.98); }
.tile[aria-pressed="true"] { background: var(--teal); border-color: var(--teal-900); color: #fff; }
.tile[aria-pressed="true"]::after { content: ""; position: absolute; top: 10px; right: 12px; width: 18px; height: 10px; border-left: 4px solid #fff; border-bottom: 4px solid #fff; transform: rotate(-45deg) scale(.8); }
.tile[disabled] { opacity: .38; cursor: not-allowed; background: repeating-linear-gradient(135deg, var(--bg) 0 8px, var(--paper) 8px 16px); }
.tile .emo { font-size: 2.4rem; line-height: 1; }
.tile .t-name { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .03em; font-size: 1.35rem; line-height: 1.05; }
.tile .t-sub { font-size: .85rem; font-weight: 700; opacity: .75; }
.tile.product { min-height: 150px; }
.tile.small-tile { min-height: 84px; }
.tile .t-name { max-width: 100%; overflow-wrap: anywhere; }
.tile .t-name.long { font-size: 1rem; letter-spacing: .01em; }
.tiles.wide-tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.step-note { margin: 10px 0 0; }

.add-bar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: end; }
.add-bar .btn { min-height: 64px; font-size: 1.1rem; }

/* Comanda */
.ticket-panel { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; border-top: 8px solid var(--teal); }
.tp-head { padding: 16px 18px 10px; display: flex; align-items: baseline; justify-content: space-between; }
.tp-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--teal-900); }
.tp-client { margin: 0 18px 10px; padding: 10px 14px; background: var(--teal-50); border-radius: 12px; font-weight: 700; }
.tp-client.none { background: var(--bg); color: var(--ink-3); }
.tp-lines { list-style: none; margin: 0; padding: 0 18px; max-height: 38vh; overflow: auto; }
.tp-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.tp-line .l-name { font-weight: 800; }
.tp-line .l-sub { grid-column: 1; color: var(--ink-3); font-size: .88rem; font-weight: 600; }
.tp-line .l-price { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.tp-line .l-ship { color: var(--ink-3); font-size: .85rem; font-weight: 600; text-align: right; }
.tp-line .l-x { grid-column: 2; grid-row: 2 / span 2; justify-self: end; align-self: end; }
.rm-btn { border: 0; background: transparent; color: var(--bad); font-weight: 800; font-size: .85rem; padding: 4px 2px; }
.tp-empty { padding: 26px 18px; text-align: center; color: var(--ink-3); font-weight: 600; }
.tp-foot { padding: 14px 18px 18px; display: grid; gap: 12px; background: linear-gradient(var(--paper), var(--teal-50)); }
.sum { display: flex; justify-content: space-between; font-weight: 700; color: var(--ink-2); }
.sum.total { align-items: baseline; color: var(--teal-900); }
.sum.total b { font-family: var(--font-display); font-weight: 400; font-size: 2.8rem; letter-spacing: .02em; line-height: 1; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg button { min-height: 48px; padding: 0 6px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper); font-weight: 800; font-size: .95rem; }
.seg button[aria-pressed="true"] { background: var(--teal-100); border-color: var(--teal); color: var(--teal-900); }
.pay-row { display: grid; gap: 8px; }

/* ---------- Estado de pedidos ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-recibido { background: var(--warn-bg); color: var(--warn); }
.st-en_proceso { background: var(--teal-100); color: var(--teal-700); }
.st-listo { background: var(--ok-bg); color: var(--ok); }
.st-entregado { background: #e6ecee; color: #4a5f68; }
.st-cancelado { background: var(--bad-bg); color: var(--bad); }
.chip.paid { background: var(--ok-bg); color: var(--ok); }
.chip.unpaid { background: var(--bad-bg); color: var(--bad); }

/* ---------- Tablas / listas ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.filters .field { min-width: 150px; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: .85rem; font-weight: 800; color: var(--ink-3); padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.data td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data td.r, table.data th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:hover td { background: var(--teal-50); }

.order-list { display: grid; gap: 12px; }
.order { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 18px; align-items: center; padding: 14px 18px; border-radius: var(--r-card); background: var(--paper); box-shadow: var(--shadow); border-left: 8px solid var(--teal-300); }
.order.s-recibido { border-left-color: #e0a63c; }
.order.s-en_proceso { border-left-color: var(--teal); }
.order.s-listo { border-left-color: var(--ok); }
.order.s-entregado { border-left-color: #9fb2ba; }
.order.s-cancelado { border-left-color: var(--bad); opacity: .7; }
.order .folio { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .04em; color: var(--teal-900); }
.order .who { font-weight: 800; font-size: 1.1rem; }
.order .info { color: var(--ink-3); font-weight: 600; font-size: .92rem; }
.order .amt { font-family: var(--font-display); font-size: 1.9rem; letter-spacing: .02em; text-align: right; }
.order .acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Catálogo ---------- */
.cat-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.prod-card { background: var(--paper); border-radius: 24px; box-shadow: var(--shadow); padding: 20px; display: grid; gap: 16px; border: 2px solid transparent; align-content: start; }
.prod-card.dirty { border-color: #e0a63c; }
.prod-card.off { opacity: .6; }
.prod-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.emoji-in { width: 64px; min-height: 64px; text-align: center; font-size: 2rem; padding: 0; }
.prod-head .input { font-family: var(--font-display); font-size: 1.5rem; text-transform: uppercase; letter-spacing: .03em; }
.price-grid { display: grid; gap: 8px; align-items: center; }
.price-grid .h { font-weight: 800; font-size: .85rem; color: var(--ink-3); text-align: center; }
.price-grid .rl { font-weight: 800; }
.money-in { position: relative; }
.money-in::before { content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--ink-3); }
.money-in .input { padding-left: 28px; font-variant-numeric: tabular-nums; font-weight: 800; }
.toggles { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; min-height: 40px; cursor: pointer; }
.switch input { width: 24px; height: 24px; accent-color: var(--teal); }
.prod-actions { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.opt-list { display: flex; flex-wrap: wrap; gap: 10px; }
.opt-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 16px; border-radius: 999px; background: var(--teal-50); border: 2px solid var(--teal-100); font-weight: 800; }
.opt-pill.off { opacity: .5; text-decoration: line-through; }
.opt-pill .extra { font-weight: 700; color: var(--teal-700); }
.opt-pill button { border: 0; background: var(--paper); border-radius: 999px; width: 34px; height: 34px; font-weight: 800; color: var(--teal-700); }

/* ---------- Clientes ---------- */
.cust-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cust { text-align: left; display: grid; gap: 8px; padding: 18px; border-radius: 20px; background: var(--paper); border: 2px solid transparent; box-shadow: var(--shadow); }
.cust:hover { border-color: var(--teal); }
.cust .top { display: flex; gap: 12px; align-items: center; }
.cust .nm { font-family: var(--font-display); font-size: 1.4rem; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; color: var(--teal-900); }
.cust .line { color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.cust .stats { display: flex; gap: 14px; margin-top: 4px; font-weight: 800; color: var(--teal-700); }
.searchbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.searchbar .input { flex: 1; min-width: 240px; min-height: 60px; font-size: 1.1rem; }

/* ---------- Modales y avisos ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0, 31, 41, .55); display: grid; place-items: center; padding: 16px; overflow: auto; }
.modal { width: min(680px, 100%); background: var(--paper); border-radius: 24px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); max-height: calc(100vh - 32px); overflow: auto; }
.modal.wide { width: min(920px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 2px solid var(--teal-50); position: sticky; top: 0; background: var(--paper); z-index: 2; }
.modal-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--teal-900); }
.modal-body { padding: 22px; display: grid; gap: 16px; }
.modal-foot { padding: 16px 22px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
#toast-root { position: fixed; z-index: 90; left: 50%; top: 92px; transform: translateX(-50%); display: grid; gap: 10px; width: min(520px, calc(100vw - 28px)); pointer-events: none; }
.toast { background: var(--teal-900); color: #fff; padding: 14px 18px; border-radius: 14px; font-weight: 700; box-shadow: 0 14px 40px -10px rgba(0,0,0,.5); animation: toast-in .2s ease-out; }
.toast.error { background: var(--bad); }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Inicio de sesión ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(1200px 500px at 50% -10%, var(--peach) 0, transparent 70%), var(--teal); }
.login-card { width: min(440px, 100%); background: var(--paper); border-radius: 28px; padding: 32px 28px 28px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.55); display: grid; gap: 16px; text-align: center; }
.login-card img { width: 128px; margin: 0 auto; display: block; }
.login-card h1 { font-family: var(--font-display); font-weight: 400; font-size: 2.2rem; letter-spacing: .03em; color: var(--teal-900); text-transform: uppercase; line-height: 1; }
.login-card p { margin: 0; color: var(--ink-3); font-weight: 600; }
.login-card form { display: grid; gap: 14px; text-align: left; }

/* ---------- Reportes ---------- */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 18px; }
.kpi { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 16px 20px; }
.kpi span { font-weight: 700; color: var(--ink-3); font-size: .92rem; }
.kpi b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 2.4rem; letter-spacing: .02em; line-height: 1.15; color: var(--teal-900); }
.kpi small { color: var(--ink-3); font-weight: 600; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--ink-3); font: 700 12px var(--font-ui); }
.chart .val { fill: var(--ink); font: 800 12.5px var(--font-ui); }
.chart .bar { fill: var(--teal-300); transition: fill .12s; }
.chart .bar.best { fill: var(--teal); }
.chart .hit:hover .bar { fill: var(--teal-900); }
.tip { position: absolute; pointer-events: none; z-index: 5; background: var(--teal-900); color: #fff; padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: .9rem; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: 0 8px 20px -6px rgba(0,0,0,.5); }
.rank-list { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.rank { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 18px; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.rank .pos-n { font-family: var(--font-display); font-size: 2.2rem; color: var(--teal-300); text-align: center; line-height: 1; }
.rank.first .pos-n { color: var(--teal); font-size: 2.8rem; }
.rank .rn { font-weight: 800; font-size: 1.1rem; }
.rank .rs { color: var(--ink-3); font-weight: 600; font-size: .9rem; }
.rank .rv { font-family: var(--font-display); font-size: 1.7rem; letter-spacing: .02em; text-align: right; }
.rank .rbar { grid-column: 2 / -1; height: 10px; border-radius: 0 6px 6px 0; background: var(--teal-300); }
.rank.first .rbar { background: var(--teal); }
.hero-zone { background: var(--teal); color: #fff; border-radius: 26px; padding: clamp(20px, 3vw, 34px); display: grid; gap: 6px; margin-bottom: 18px; position: relative; overflow: hidden; }
.hero-zone small { font-weight: 700; opacity: .85; font-size: 1rem; }
.hero-zone h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 6vw, 72px); text-transform: uppercase; letter-spacing: .02em; line-height: 1; }
.hero-zone .facts { display: flex; gap: 22px; flex-wrap: wrap; font-weight: 800; font-size: 1.15rem; margin-top: 8px; position: relative; z-index: 1; }
.hero-zone .wave { position: absolute; right: -30px; bottom: -40px; width: 300px; opacity: .13; }
.empty { text-align: center; padding: 44px 16px; color: var(--ink-3); font-weight: 600; }
.empty h3 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .03em; font-size: 1.6rem; color: var(--teal-900); margin-bottom: 6px; }

/* ---------- Ticket ---------- */
.ticket-preview { display: grid; place-items: center; background: var(--bg); border-radius: 16px; padding: 18px; }
.ticket { background: #fff; color: #000; width: 58mm; padding: 3mm 3mm 5mm; font: 700 10.5px/1.25 "Arial Narrow", "Roboto Condensed", "Liberation Sans Narrow", Arial, sans-serif; box-shadow: 0 6px 24px -8px rgba(0,0,0,.35); }
.ticket.w80 { width: 80mm; font-size: 12px; }
.ticket .t-logo { display: block; width: 62%; margin: 0 auto 2mm; filter: grayscale(1) contrast(1.6); }
.ticket .t-biz { text-align: center; font-size: 1.1em; letter-spacing: .06em; margin-bottom: 2mm; }
.ticket .t-row { display: grid; grid-template-columns: 24mm 1fr; gap: 1mm; padding: .3mm 0; }
.ticket.w80 .t-row { grid-template-columns: 30mm 1fr; }
.ticket .t-row dt { text-transform: uppercase; }
.ticket .t-row dd { margin: 0; font-weight: 600; text-transform: uppercase; overflow-wrap: anywhere; }
.ticket hr { border: 0; border-top: 1px dashed #000; margin: 2mm 0; }
.ticket .t-total { display: flex; justify-content: space-between; font-size: 1.5em; margin: 1mm 0; }
.ticket .t-qr { display: grid; place-items: center; margin-top: 2mm; }
.ticket .t-qr svg { width: 30mm; height: 30mm; }
.ticket .t-foot { text-align: center; font-weight: 600; font-size: .9em; margin-top: 2mm; }
.ticket .t-folio { text-align: center; font-size: 1.15em; letter-spacing: .08em; margin-bottom: 1mm; }
#print-root { display: none; }

@media print {
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  body { background: #fff; }
  .ticket { box-shadow: none; margin: 0; }
}

/* ---------- Adaptación a pantallas ---------- */
@media (max-width: 1180px) {
  .pos { grid-template-columns: minmax(0, 1fr); }
  .pos-side { position: static; }
  .tp-lines { max-height: none; }
}
@media (max-width: 900px) {
  .home-tile.ventas { grid-column: 1 / -1; grid-row: auto; min-height: 280px; }
  .home-tile.cat, .home-tile.cli { grid-column: span 3; }
  .home-tile.rep { grid-column: span 6; flex-direction: row; align-items: center; justify-content: flex-start; gap: 18px; }
  .client-row { grid-template-columns: 1fr; }
  .crumbs { display: none; }
  .clock { display: none; }
}
@media (max-width: 620px) {
  .home-tile.cat, .home-tile.cli { grid-column: 1 / -1; }
  .topbar { gap: 8px; }
  .brand { min-width: 0; flex: 1; gap: 10px; }
  .brand-name { font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand img { width: 40px; height: 40px; }
  .icon-btn { width: 40px; height: 40px; }
  .top-actions { flex: none; }
  .form-grid { grid-template-columns: 1fr; }
  .add-bar { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .order { grid-template-columns: minmax(0, 1fr) auto; }
  .order .folio { grid-column: 1 / -1; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
