/* Sistema de diseño: minimalista, rápido, claro/oscuro automático. Sin fuentes externas. */
:root {
  --bg: #fafaf9; --surface: #ffffff; --surface-2: #f5f5f4; --text: #0c0a09; --muted: #6b6560; --line: #e7e5e4; --line-2: #d6d3d1;
  --accent: #5b4bff; --accent-2: #8b5cf6; --accent-ink: #ffffff; --accent-soft: #eeedff;
  --ok: #15803d; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7; --bad: #b91c1c; --bad-soft: #fee2e2; --info: #1d4ed8; --info-soft: #dbeafe;
  --shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 4px 16px rgb(0 0 0 / 5%); --shadow-lg: 0 10px 40px rgb(0 0 0 / 14%);
  --r: 14px; --r-sm: 10px; --gutter: 20px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0e; --surface: #141418; --surface-2: #1b1b21; --text: #f5f5f4; --muted: #a8a29e; --line: #26262d; --line-2: #35353d;
    --accent: #8b7bff; --accent-ink: #0b0b0e; --accent-soft: #23203f;
    --ok: #4ade80; --ok-soft: #12301f; --warn: #fbbf24; --warn-soft: #33260c; --bad: #f87171; --bad-soft: #3a1515; --info: #7cb0ff; --info-soft: #14253f;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%); --shadow-lg: 0 10px 40px rgb(0 0 0 / 60%); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0e; --surface: #141418; --surface-2: #1b1b21; --text: #f5f5f4; --muted: #a8a29e; --line: #26262d; --line-2: #35353d;
  --accent: #8b7bff; --accent-ink: #0b0b0e; --accent-soft: #23203f;
  --ok: #4ade80; --ok-soft: #12301f; --warn: #fbbf24; --warn-soft: #33260c; --bad: #f87171; --bad-soft: #3a1515; --info: #7cb0ff; --info-soft: #14253f;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%); --shadow-lg: 0 10px 40px rgb(0 0 0 / 60%); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 750; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0 0 12px; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.row { display: flex; align-items: center; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .row.wrap { flex-wrap: wrap; }
.gap { gap: 10px; } .gap-lg { gap: 20px; } .grow { flex: 1; min-width: 0; } .mt { margin-top: 16px; } .mt-lg { margin-top: 28px; } .center { text-align: center; }
.stack { display: grid; gap: 16px; } .stack-sm { display: grid; gap: 8px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.num { font-variant-numeric: tabular-nums; } .right { text-align: right; }
.ico { flex: none; vertical-align: -3px; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 720px; }
[hidden] { display: none !important; }

/* ---------- botones e inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.danger { background: var(--bad); color: #fff; border-color: transparent; } .btn.danger:hover { background: var(--bad); filter: brightness(1.1); }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--surface-2); }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn.lg { min-height: 50px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 40px; } .btn.icon.sm { width: 32px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.input { width: 100%; min-height: 42px; padding: 9px 13px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input.area { min-height: 80px; resize: vertical; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b6560' stroke-width='2'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; } .req { color: var(--bad); }
.form { display: grid; gap: 16px; } .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .span2 { grid-column: 1 / -1; }
.form-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; } .check small { display: block; font-weight: 400; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.search { position: relative; } .search .ico { position: absolute; left: 13px; top: 13px; color: var(--muted); } .search .input { padding-left: 38px; }

/* ---------- piezas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; } .card.pad-0 { padding: 0; overflow: hidden; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); } .badge.accent { background: var(--accent-soft); color: var(--accent); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: var(--info-soft); color: var(--info); }
.alert.bad { background: var(--bad-soft); color: var(--bad); } .alert.ok { background: var(--ok-soft); color: var(--ok); } .alert.warn { background: var(--warn-soft); color: var(--warn); }
.empty { text-align: center; padding: 48px 20px; } .empty-ico { width: 52px; height: 52px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 16px; background: var(--surface-2); color: var(--muted); } .empty p { max-width: 380px; margin: 6px auto 0; }
.loading { display: grid; place-items: center; padding: 60px; } .spin { width: 26px; height: 26px; border: 3px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: gira .7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-weight: 600; }
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 550; box-shadow: var(--shadow-lg); animation: sube .2s ease; pointer-events: auto; }
.toast.bad { background: var(--bad); color: #fff; } .toast.ok { background: var(--ok); color: #fff; } .toast.out { opacity: 0; transition: opacity .35s; }
@keyframes sube { from { opacity: 0; transform: translateY(8px); } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 12px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); } .tab-n { margin-left: 6px; background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 0 7px; font-size: 11px; }
.seg { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: 12px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 7px 15px; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- hoja modal ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 100; background: rgb(0 0 0 / 45%); display: grid; place-items: center; padding: 16px; animation: aparece .15s; }
@keyframes aparece { from { opacity: 0; } }
.sheet { width: min(520px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); animation: sube .22s ease; }
.sheet.wide { width: min(720px, 100%); } .sheet.full { width: min(960px, 100%); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 22px; }
.sheet-body { padding: 8px 22px 22px; overflow-y: auto; display: grid; gap: 14px; align-content: start; }
@media (max-width: 640px) {
  .sheet-backdrop { align-items: end; padding: 0; } .sheet, .sheet.wide, .sheet.full { width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- tabla (en móvil se ve como tarjetas) ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; } .toolbar .input { min-width: 0; } .toolbar select.input { width: auto; }
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; } .table tbody tr:last-child td { border-bottom: 0; } .table tbody tr:hover { background: var(--surface-2); }
.table .actions { text-align: right; white-space: nowrap; } .table .actions .btn + .btn { margin-left: 6px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; }
@media (max-width: 760px) {
  .table thead { display: none; } .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; margin-bottom: 10px; }
  .table td { display: flex; justify-content: space-between; gap: 14px; border: 0; padding: 6px 12px; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex: none; padding-top: 2px; }
  .table td.actions { justify-content: flex-end; } .table td.actions::before, .table td[data-label=""]::before { content: none; }
  .hide-sm { display: none; } .table-wrap { margin: 0; padding: 0; }
}

/* ---------- público ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .container { display: flex; align-items: center; gap: 14px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -0.03em; } .brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: #fff; }
.topbar nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.hero { padding: 56px 0 28px; } .hero p { font-size: 18px; color: var(--muted); max-width: 560px; margin-top: 12px; }
.hero h1 span { background: linear-gradient(120deg, var(--accent), var(--accent-2), #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.searchbar { display: flex; gap: 10px; margin: 26px 0 16px; max-width: 560px; } .searchbar .search { flex: 1; } .searchbar .input { min-height: 50px; border-radius: 14px; }
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; padding: 22px 0 60px; }
.ev { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform .18s, box-shadow .18s; }
.ev:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.cover { position: relative; aspect-ratio: 16 / 10; background: var(--c, #6d5dfc) center / cover; overflow: hidden; }
.cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 0% 0%, rgb(255 255 255 / 28%), transparent 55%), linear-gradient(160deg, transparent 40%, rgb(0 0 0 / 38%)); }
.cover .cat { position: absolute; left: 12px; bottom: 12px; color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 1px 6px rgb(0 0 0 / 40%); }
.cover .tag { position: absolute; right: 10px; top: 10px; }
.cover .glyph { position: absolute; right: -14px; bottom: -22px; color: rgb(255 255 255 / 22%); transform: rotate(-14deg); }
.datebadge { position: absolute; left: 12px; top: 12px; background: rgb(255 255 255 / 94%); color: #111; border-radius: 12px; padding: 5px 11px; text-align: center; line-height: 1.1; box-shadow: 0 2px 8px rgb(0 0 0 / 15%); }
.datebadge b { display: block; font-size: 20px; font-weight: 800; } .datebadge small { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #555; }
.ev-body { padding: 14px 16px 16px; display: grid; gap: 6px; } .ev-body h3 { font-size: 17px; }
.ev-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; } .ev-meta .ico { color: var(--muted); }
.ev-price { margin-top: 4px; font-weight: 700; } .ev-price small { color: var(--muted); font-weight: 500; }

.evpage { display: grid; grid-template-columns: 1fr 380px; gap: 36px; padding: 28px 0 100px; align-items: start; }
.evpage .cover { border-radius: 22px; aspect-ratio: 21 / 9; } .evinfo { display: grid; gap: 14px; margin-top: 22px; }
.info-row { display: flex; gap: 12px; align-items: flex-start; } .info-row .ico-box { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.desc { white-space: pre-wrap; color: var(--text); opacity: .88; line-height: 1.65; }
.buybox { position: sticky; top: 82px; }
.tipo { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); } .tipo:last-of-type { border-bottom: 0; }
.tipo h3 { font-size: 15px; } .tipo .price { font-weight: 750; font-size: 16px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.stepper button { width: 36px; height: 36px; border: 0; background: var(--surface); cursor: pointer; display: grid; place-items: center; } .stepper button:hover:not(:disabled) { background: var(--surface-2); } .stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 32px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.totalrow { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0; font-size: 15px; } .totalrow b { font-size: 24px; letter-spacing: -0.02em; }
@media (max-width: 900px) {
  .evpage { grid-template-columns: 1fr; gap: 20px; } .buybox { position: static; }
  .evpage .cover { aspect-ratio: 16 / 10; }
}
.paymethods { display: grid; gap: 8px; }
.pm { display: flex; gap: 12px; align-items: center; padding: 13px 14px; border: 1.5px solid var(--line-2); border-radius: 14px; cursor: pointer; }
.pm:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); } .pm input { accent-color: var(--accent); width: 18px; height: 18px; }
.pm.off { opacity: .55; cursor: not-allowed; } .pm .ico-box { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; }

/* ---------- entradas con QR ---------- */
.tickets { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.ticket-top { color: #fff; padding: 18px 20px 16px; background: var(--c, #5b4bff); position: relative; } .ticket-top::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgb(255 255 255 / 20%), rgb(0 0 0 / 28%)); }
.ticket-top > * { position: relative; z-index: 1; } .ticket-top h3 { font-size: 18px; } .ticket-top small { opacity: .9; }
.ticket-qr { position: relative; padding: 22px; display: grid; place-items: center; border-top: 2px dashed var(--line-2); }
.ticket-qr::before, .ticket-qr::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.ticket-qr::before { left: -11px; } .ticket-qr::after { right: -11px; }
.qr { background: #fff; padding: 8px; border-radius: 14px; width: min(230px, 100%); aspect-ratio: 1; } .qr img { width: 100%; height: 100%; image-rendering: crisp-edges; }
.ticket-qr.usada .qr, .ticket-qr.anulada .qr { opacity: .18; filter: grayscale(1); } .ticket-qr .stamp { position: absolute; font-weight: 800; font-size: 22px; transform: rotate(-12deg); border: 3px solid currentColor; padding: 4px 14px; border-radius: 10px; }
.ticket-foot { padding: 0 20px 18px; display: grid; gap: 4px; text-align: center; } .ticket-foot .code { font-size: 17px; font-weight: 700; }
.ticket-actions { display: flex; gap: 8px; justify-content: center; padding: 0 16px 16px; flex-wrap: wrap; }
.qr-full { width: min(86vw, 420px); }

/* ---------- panel ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 18px 12px; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; }
.side .brand { padding: 4px 10px 18px; }
.nav-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; font-weight: 600; color: var(--muted); } .nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); } .nav-item .n { margin-left: auto; background: var(--warn); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 7px; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.me { display: flex; gap: 10px; align-items: center; padding: 8px 10px; } .avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.me b { display: block; font-size: 13.5px; line-height: 1.2; } .me small { color: var(--muted); font-size: 12px; }
.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 100px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; } .page-head p { margin: 4px 0 0; color: var(--muted); }
.banner { background: var(--warn-soft); color: var(--warn); padding: 10px var(--gutter); display: flex; justify-content: center; gap: 12px; align-items: center; font-weight: 600; flex-wrap: wrap; }
.mobilebar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; } .side { display: none; }
  .mobilebar { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .mobilebar a, .mobilebar button { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; font-size: 11px; font-weight: 600; color: var(--muted); background: none; border: 0; border-radius: 10px; cursor: pointer; }
  .mobilebar [aria-current="page"] { color: var(--accent); } .mobilebar a:hover { text-decoration: none; }
  .main { padding-bottom: 96px; padding-top: 18px; }
}
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; } .kpi small { color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi b { display: block; font-size: 28px; letter-spacing: -0.03em; margin-top: 4px; font-variant-numeric: tabular-nums; } .kpi em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; } @media (max-width: 960px) { .grid2 { grid-template-columns: 1fr; } }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 150px; margin-top: 14px; }
.bar { display: grid; gap: 6px; align-items: end; justify-items: center; height: 100%; font-size: 10.5px; color: var(--muted); } .bar i { display: block; width: 100%; max-width: 26px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); min-height: 3px; }
.bar:hover i { filter: brightness(1.15); } .bar.zero i { background: var(--line-2); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; } .progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; }
.list { display: grid; } .list-item { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); } .list-item:last-child { border-bottom: 0; }
.thumb { width: 46px; height: 46px; border-radius: 13px; background: var(--c, var(--accent)); flex: none; display: grid; place-items: center; color: #fff; }

/* matriz de permisos */
.matrix-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); max-height: 70dvh; }
.matrix { border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 100%; }
.matrix th, .matrix td { padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.matrix thead th { position: sticky; top: 0; z-index: 2; text-align: center; font-size: 12px; } .matrix th:first-child, .matrix td:first-child { position: sticky; left: 0; z-index: 1; text-align: left; min-width: 230px; border-right: 1px solid var(--line); }
.matrix thead th:first-child { z-index: 3; } .matrix .grp td { background: var(--surface-2); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.matrix td.c { text-align: center; } .lv { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.lv.l0 { color: var(--line-2); } .lv.l1 { background: var(--info-soft); color: var(--info); } .lv.l2 { background: var(--ok-soft); color: var(--ok); }
.perm-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); } .perm-row small { color: var(--muted); display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }

/* ---------- escáner y punto de venta ---------- */
.scanbox { position: relative; background: #000; border-radius: 22px; overflow: hidden; aspect-ratio: 3 / 4; max-height: 62dvh; width: 100%; margin: 0 auto; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; }
.scanbox .frame { position: absolute; inset: 14% 12%; border: 3px solid rgb(255 255 255 / 85%); border-radius: 26px; box-shadow: 0 0 0 100vmax rgb(0 0 0 / 38%); pointer-events: none; }
.scanbox .msg { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-align: center; padding: 24px; }
.result { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 24px; text-align: center; color: #fff; animation: aparece .12s; }
.result.ok { background: #15803d; } .result.dup { background: #b45309; } .result.bad { background: #b91c1c; }
.result .big { font-size: clamp(28px, 8vw, 46px); font-weight: 800; letter-spacing: -0.03em; } .result .who { font-size: 22px; font-weight: 650; margin-top: 8px; } .result .sub { opacity: .92; margin-top: 4px; font-size: 16px; }
.result .ico-lg { width: 84px; height: 84px; border-radius: 50%; background: rgb(255 255 255 / 22%); display: grid; place-items: center; margin: 0 auto 18px; }
.counter { display: flex; align-items: baseline; gap: 6px; justify-content: center; } .counter b { font-size: 34px; font-variant-numeric: tabular-nums; }
.pos { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; } @media (max-width: 960px) { .pos { grid-template-columns: 1fr; } }
.pos-tipo { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line-2); border-radius: 16px; background: var(--surface); }
.pos-tipo.on { border-color: var(--accent); background: var(--accent-soft); } .pos-tipo b { font-size: 17px; }
.pos-cart { position: sticky; top: 16px; }
.big-money { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(70% 60% at 85% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent), radial-gradient(60% 50% at 0% 100%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent), var(--bg); }
.auth .card { width: min(420px, 100%); padding: 28px; } .auth h1 { font-size: 26px; }
footer.foot { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 13.5px; } footer.foot .container { display: flex; gap: 18px; justify-content: space-between; flex-wrap: wrap; }
@media print { .topbar, .side, .mobilebar, .btn, footer, .toasts { display: none !important; } body { background: #fff; } .ticket { break-inside: avoid; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
