:root {
  /* Marca Kobralia */
  --brand-violet: #5B3DF5;
  --brand-mint: #12C99B;
  --brand-night: #15123A;
  /* Vidrio */
  --glass: rgba(255, 255, 255, .34);
  --glass-card: rgba(255, 255, 255, .46);
  --glass-line: rgba(255, 255, 255, .55);
  --glass-blur: blur(28px) saturate(1.5);
  --shadow: 0 20px 60px rgba(60, 40, 20, .18), inset 0 1px 0 rgba(255, 255, 255, .6);
  --ink: #1d1a2e;
  --muted: #5f5868;
  --line: rgba(40, 30, 20, .1);
  --primary: var(--brand-night);
  --primary-ink: #ffffff;
  --accent: var(--brand-violet);
  --primary-soft: rgba(91, 61, 245, .12);
  --ok: #08875f;
  --ok-soft: rgba(18, 201, 155, .18);
  --warn: #9a5b00;
  --warn-soft: rgba(255, 176, 50, .22);
  --bad: #c0362f;
  --bad-soft: rgba(240, 80, 70, .16);
  --radius: 18px;
  --radius-sm: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #cdb9a3; min-height: 100vh; }
h1 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 10px; }
h3 { font-size: 12px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
kbd { font: 11px ui-monospace, Menlo, monospace; background: rgba(0,0,0,.06); border: 1px solid rgba(0,0,0,.1); border-radius: 6px; padding: 1px 5px; }
.btn.primary kbd { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.25); }
.btn.ok kbd { background: rgba(21,18,58,.1); border-color: rgba(21,18,58,.18); }

/* Escena de fondo: interior cálido difuminado */
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(40% 55% at 8% 18%, rgba(120, 72, 40, .85), transparent 70%),
    radial-gradient(30% 45% at 30% 0%, rgba(150, 98, 58, .7), transparent 70%),
    radial-gradient(45% 60% at 92% 30%, rgba(250, 244, 236, .95), transparent 70%),
    radial-gradient(35% 40% at 70% 100%, rgba(110, 70, 40, .55), transparent 70%),
    radial-gradient(30% 40% at 0% 100%, rgba(40, 30, 28, .6), transparent 70%),
    radial-gradient(28% 32% at 58% 62%, rgba(91, 61, 245, .16), transparent 70%),
    radial-gradient(22% 28% at 82% 78%, rgba(18, 201, 155, .14), transparent 70%),
    linear-gradient(160deg, #d8c3ab 0%, #c9b097 45%, #e6d9ca 100%);
}
.scene::before, .scene::after { content: ""; position: absolute; top: -10%; bottom: -10%; width: 9%; border-radius: 40px; filter: blur(40px); opacity: .45; }
.scene::before { left: 22%; background: linear-gradient(#7a4a2a, #a8764c); }
.scene::after { right: 26%; background: linear-gradient(#8a5a36, #c39a72); opacity: .3; }

.glass { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); box-shadow: var(--shadow); }

/* Layout */
.app { display: grid; grid-template-columns: 60px minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr); gap: 14px; height: 100vh; padding: 14px 18px 18px 14px; }
.topbar { grid-column: 1 / -1; border-radius: 999px; display: flex; align-items: center; gap: 14px; padding: 6px 8px; min-width: 0; }
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; flex: none; box-shadow: 0 4px 12px rgba(91,61,245,.3); }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -.02em; line-height: 1.1; }
.brand-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.command { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.orb { width: 22px; height: 22px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff 0, #c9b8ff 25%, var(--brand-violet) 60%, var(--brand-mint) 100%); box-shadow: 0 0 14px rgba(91,61,245,.55); }
.side-select { background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.6); border-radius: 999px; padding: 6px 12px; font-size: 13px; max-width: 220px; }
.side-select:disabled { opacity: 1; appearance: none; -webkit-appearance: none; color: var(--ink); }
.caja-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.6); white-space: nowrap; }
.caja-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 3px rgba(240,80,70,.18); }
.caja-status.open .dot { background: var(--brand-mint); box-shadow: 0 0 0 3px rgba(18,201,155,.22); }
.top-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.clock { font-size: 12px; color: var(--muted); white-space: nowrap; }
.side-user { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.side-user > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand-violet), var(--brand-mint)); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: #fff; color: var(--ink); box-shadow: 0 4px 12px rgba(0,0,0,.08); flex: none; }
.icon-btn:hover { background: var(--brand-night); color: #fff; }
.icon-btn svg, .rail svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Riel de navegación */
.rail { border-radius: 999px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; align-self: center; }
.rail a { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); text-decoration: none; transition: background .15s; }
.rail a > span { display: none; }
.rail a:hover { background: rgba(255,255,255,.55); }
.rail a.active { background: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.12); color: var(--brand-violet); }
.rail a::after { content: attr(data-label); position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-6px, -50%); white-space: nowrap; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.88); box-shadow: 0 8px 20px rgba(0,0,0,.12); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 50; }
.rail a:hover::after { opacity: 1; transform: translate(0, -50%); }

main { border-radius: 30px; padding: 26px 30px; min-width: 0; min-height: 0; overflow: auto; }

.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .spacer { flex: 1; }
.card { background: var(--glass-card); border: 1px solid var(--glass-line); border-radius: var(--radius); padding: 16px; box-shadow: 0 8px 24px rgba(60,40,20,.08), inset 0 1px 0 rgba(255,255,255,.6); }
.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.right { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.small { font-size: 12px; }

/* Controles */
input, select, textarea { font: inherit; color: inherit; border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius-sm); padding: 9px 12px; background: rgba(255,255,255,.55); min-width: 0; transition: background .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #8a8290; }
input:focus, select:focus, textarea:focus { outline: none; background: rgba(255,255,255,.85); border-color: rgba(91,61,245,.5); box-shadow: 0 0 0 4px rgba(91,61,245,.14); }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 500; }
label.field input, label.field select, label.field textarea { font-size: 14px; color: var(--ink); font-weight: 400; }
label.check { display: flex; gap: 8px; align-items: center; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand-violet); }
.btn { text-decoration: none; font: inherit; font-weight: 500; border: 1px solid rgba(255,255,255,.75); background: rgba(255,255,255,.62); color: var(--ink); border-radius: 999px; padding: 8px 16px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; white-space: nowrap; transition: background .15s, transform .1s, box-shadow .15s; }
.btn:hover { background: rgba(255,255,255,.9); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 18px rgba(21,18,58,.25); }
.btn.primary:hover { background: #241e5c; }
.btn.ok { background: var(--brand-mint); border-color: var(--brand-mint); color: var(--brand-night); font-weight: 600; box-shadow: 0 6px 18px rgba(18,201,155,.3); }
.btn.ok:hover { filter: brightness(1.05); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: rgba(192,54,47,.4); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.lg { padding: 14px 18px; font-size: 16px; font-weight: 700; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.7); color: var(--accent); }
.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; }

/* Tablas */
.table-wrap { overflow: auto; border: 1px solid var(--glass-line); border-radius: var(--radius); background: rgba(255,255,255,.42); box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th { background: rgba(250,246,241,.92); font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; z-index: 1; }
tbody tr:hover { background: rgba(255,255,255,.4); }
tr.selected td { background: rgba(91,61,245,.1); }
tr.clickable { cursor: pointer; }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* KPI */
.kpi { background: var(--glass-card); border: 1px solid var(--glass-line); border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 8px 24px rgba(60,40,20,.08), inset 0 1px 0 rgba(255,255,255,.6); }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* POS */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 16px; height: 100%; min-height: 520px; }
.pos-left { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.pos-search { display: flex; gap: 8px; position: relative; }
.pos-search input { flex: 1; font-size: 18px; padding: 13px 18px; border-radius: 999px; background: rgba(255,255,255,.7); }
.suggest { position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px; background: rgba(255,255,255,.94); border: 1px solid var(--glass-line); border-radius: var(--radius); box-shadow: 0 20px 50px rgba(40,30,20,.2); z-index: 20; max-height: 320px; overflow: auto; padding: 6px; }
.suggest div { padding: 9px 12px; display: flex; justify-content: space-between; gap: 10px; cursor: pointer; border-radius: 10px; }
.suggest div.active, .suggest div:hover { background: rgba(91,61,245,.1); }
.pos-cart { flex: 1; min-height: 0; }
.pos-cart td input { width: 80px; padding: 5px 8px; text-align: right; border-radius: 8px; }
.pos-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pos-right { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.total-box { background: linear-gradient(145deg, rgba(21,18,58,.94) 0%, rgba(52,36,140,.9) 100%); color: #fff; border-radius: 24px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 20px 40px rgba(21,18,58,.3), inset 0 1px 0 rgba(255,255,255,.15); position: relative; overflow: hidden; }
.total-box::after { content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -70px; border-radius: 50%; background: radial-gradient(circle, rgba(18,201,155,.55), transparent 70%); pointer-events: none; }
.total-box .lbl { font-size: 11px; opacity: .7; text-transform: uppercase; letter-spacing: .08em; }
.total-box .big { font-size: 42px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 4px 0 12px; }
.total-box .line { display: flex; justify-content: space-between; font-size: 13px; opacity: .85; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .full { grid-column: 1 / -1; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; overflow: auto; align-content: start; }
.quick button { border: 1px solid var(--glass-line); background: rgba(255,255,255,.5); border-radius: 14px; padding: 10px; cursor: pointer; text-align: left; font: inherit; transition: background .15s, transform .15s, box-shadow .15s; }
.quick button:hover { background: rgba(255,255,255,.85); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(40,30,20,.12); }
.quick .q-name { font-size: 12px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quick .q-price { font-size: 12px; color: var(--accent); margin-top: 4px; font-weight: 600; }
.cats { display: flex; gap: 6px; flex-wrap: wrap; }
.cats button { border: 1px solid var(--glass-line); background: rgba(255,255,255,.45); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12px; cursor: pointer; }
.cats button:hover { background: rgba(255,255,255,.8); }
.cats button.active { background: var(--brand-night); color: #fff; border-color: var(--brand-night); }

/* Cobro */
.pay-total { font-size: 38px; font-weight: 700; letter-spacing: -.03em; text-align: center; margin: 4px 0 14px; font-variant-numeric: tabular-nums; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-grid input { font-size: 18px; text-align: right; }
.bills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.change { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ok); display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; }
.change.missing { background: var(--bad-soft); color: var(--bad); }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(50,35,20,.22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s ease; }
.modal { background: rgba(255,255,255,.8); -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6); border: 1px solid rgba(255,255,255,.8); border-radius: 26px; width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 40px 100px rgba(40,25,10,.35); animation: pop .18s ease; }
.modal.wide { width: min(900px, 100%); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h2 { margin: 0; flex: 1; font-size: 18px; }
.modal-head .x { border: 0; background: rgba(0,0,0,.05); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-head .x:hover { background: rgba(0,0,0,.1); }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.modal input, .modal select, .modal textarea { background: rgba(255,255,255,.75); border-color: rgba(0,0,0,.08); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Avisos */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: rgba(21,18,58,.9); color: #fff; padding: 11px 16px; border-radius: 999px; box-shadow: 0 12px 30px rgba(0,0,0,.25); animation: tin .2s ease; font-weight: 500; }
.toast.bad { background: rgba(192,54,47,.94); }
.toast.ok { background: rgba(8,135,95,.94); }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }

/* Gráficas */
.bars { display: flex; align-items: flex-end; gap: 5px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; background: linear-gradient(180deg, var(--brand-violet), rgba(91,61,245,.55)); border-radius: 8px 8px 3px 3px; min-height: 2px; position: relative; }
.bars .bar:hover { background: linear-gradient(180deg, var(--brand-mint), rgba(18,201,155,.6)); }
.bars-labels { display: flex; gap: 5px; font-size: 10px; color: var(--muted); }
.bars-labels span { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; }
.hbar { height: 8px; background: rgba(0,0,0,.07); border-radius: 999px; overflow: hidden; }
.hbar > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-violet), var(--brand-mint)); }

/* Ticket impreso */
#print-area { display: none; }
.ticket { width: 72mm; font: 12px/1.35 ui-monospace, Menlo, Consolas, monospace; color: #000; }
.ticket .c { text-align: center; }
.ticket hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.ticket table td { padding: 1px 0; border: 0; }
.ticket .tot { font-size: 15px; font-weight: 700; }
@media print {
  @page { margin: 4mm; }
  body { background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; }
}

/* Carga, acceso y sesión */
.loading { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); z-index: 300; }
.loading img { width: 60px; height: 60px; border-radius: 50%; animation: pulse 1.2s ease-in-out infinite; box-shadow: 0 10px 30px rgba(91,61,245,.35); }
@keyframes pulse { 50% { transform: scale(.9); opacity: .7; } }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { background: rgba(255,255,255,.5); -webkit-backdrop-filter: blur(30px) saturate(1.5); backdrop-filter: blur(30px) saturate(1.5); border: 1px solid rgba(255,255,255,.7); border-radius: 30px; width: min(420px, 100%); padding: 32px; box-shadow: 0 40px 100px rgba(60,35,15,.25), inset 0 1px 0 rgba(255,255,255,.7); }
.auth-card .logo { height: 44px; margin-bottom: 20px; }
.auth-card h1 { margin-bottom: 4px; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.auth-card input { background: rgba(255,255,255,.7); }
.auth-card .btn.primary { padding: 12px; font-weight: 600; }
.auth-tabs { display: flex; gap: 4px; background: rgba(255,255,255,.4); border: 1px solid rgba(255,255,255,.6); border-radius: 999px; padding: 4px; margin-top: 18px; }
.auth-tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 999px; font: inherit; cursor: pointer; color: var(--muted); }
.auth-tabs button.active { background: var(--brand-night); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(21,18,58,.25); }
.link { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; }
.notice.info { background: var(--primary-soft); color: var(--accent); }
.btn.busy { pointer-events: none; opacity: .6; }

/* Navegadores sin vidrio: paneles casi opacos */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(250,246,241,.92); }
  .modal { background: rgba(255,255,255,.97); }
  .auth-card { background: rgba(255,255,255,.95); }
}

@media (max-height: 640px) {
  .rail a { width: 36px; height: 36px; }
  .rail { gap: 1px; padding: 6px 0; }
}

@media (max-width: 1000px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; height: auto; min-height: 100vh; padding: 10px 10px 90px; gap: 10px; }
  .topbar { border-radius: 24px; flex-wrap: wrap; padding: 8px; }
  .command { order: 3; flex-basis: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .top-right { margin-left: auto; }
  .clock, .side-user > span:last-child { display: none; }
  .rail { position: fixed; z-index: 60; left: 10px; right: 10px; bottom: 10px; flex-direction: row; justify-content: flex-start; overflow-x: auto; padding: 6px; align-self: auto; background: rgba(255,255,255,.6); }
  .rail a { flex: none; width: auto; height: 46px; padding: 0 12px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
  .rail a > span { display: block; font-size: 10px; font-weight: 600; }
  .rail a::after { display: none; }
  main { border-radius: 24px; padding: 16px; overflow: visible; }
  .pos { grid-template-columns: minmax(0, 1fr); height: auto; }
  .cols-4, .cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .cols-4, .cols-3, .cols-2, .form-grid, .pay-grid { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 22px; }
}

/* Suscripción */
.plan-pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; white-space: nowrap; text-decoration: none; background: var(--ok-soft); color: var(--ok); }
.plan-pill.warn { background: var(--warn-soft); color: var(--warn); }
.plan-pill.bad { background: var(--bad-soft); color: var(--bad); }
.plan-pill[href]:hover { filter: brightness(.95); }
.kpi-big { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.seg { display: inline-flex; gap: 4px; background: rgba(255,255,255,.45); border: 1px solid var(--glass-line); border-radius: 999px; padding: 4px; }
.seg button { border: 0; background: none; padding: 8px 18px; border-radius: 999px; font: inherit; font-weight: 500; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button.active { background: var(--brand-night); color: #fff; box-shadow: 0 4px 12px rgba(21,18,58,.25); }
.planes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 6px; padding: 22px; position: relative; }
.plan h2 { margin: 0; font-size: 18px; }
.plan.destacado { background: rgba(255,255,255,.66); border-color: rgba(91,61,245,.35); box-shadow: 0 18px 40px rgba(91,61,245,.16), inset 0 1px 0 rgba(255,255,255,.7); }
.plan-tag { position: absolute; top: -11px; right: 18px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--brand-violet), var(--brand-mint)); }
.precio { font-size: 36px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.precio span { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 12px 0 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plan li { padding-left: 24px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--ok); background: var(--ok-soft); }
.plan .btn { width: 100%; padding: 11px; }
.bloqueo { max-width: 520px; margin: 8vh auto 0; text-align: center; padding: 36px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bloqueo img { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 10px 30px rgba(91,61,245,.3); }
.bloqueo p { margin: 0 0 8px; }
@media (max-width: 1000px) { .planes { grid-template-columns: minmax(0, 1fr); } }
