/* =====================================================================
   RifaPanel — Sistema de diseño
   Blanco + un color de marca (índigo) con sombras suaves.
   Títulos: Baloo 2 · Texto: Nunito
   ===================================================================== */
:root {
  --brand: #4F46E5;
  --brand-600: #4338CA;
  --brand-50: #EEF2FF;
  --brand-100: #E0E7FF;
  --brand-200: #C7D2FE;
  --ink: #1E1B3A;
  --ink-2: #4B4868;
  --muted: #8A87A3;
  --line: #ECEBF5;
  --bg: #F7F7FC;
  --white: #fff;
  --ok: #10B981;    --ok-50: #ECFDF5;
  --warn: #F59E0B;  --warn-50: #FFFBEB;
  --bad: #E11D48;   --bad-50: #FFF1F2;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(30,27,58,.06), 0 1px 3px rgba(30,27,58,.04);
  --shadow: 0 4px 14px rgba(79,70,229,.08), 0 2px 6px rgba(30,27,58,.05);
  --shadow-lg: 0 18px 40px rgba(79,70,229,.16), 0 6px 14px rgba(30,27,58,.08);
  --font-title: 'Baloo 2', system-ui, sans-serif;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side: 248px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); }
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.15; margin: 0 0 .4em; color: var(--ink); font-weight: 700; }
h1 { font-size: 1.85rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.15rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
img { max-width: 100%; display: block; }
svg { width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: -0.18em; }
.winner > div:first-child svg, .segob > div:first-child svg { width: 100%; height: 100%; }
p { margin: 0 0 .8em; }
small, .small { font-size: .84rem; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Layout app ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  width: var(--side); flex: 0 0 var(--side); background: var(--white); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--font-title); font-weight: 800; font-size: 1.2rem; overflow: hidden; flex: 0 0 auto; box-shadow: var(--shadow); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.brand-name { font-family: var(--font-title); font-weight: 700; font-size: 1.02rem; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--font); color: var(--muted); font-weight: 600; font-size: .75rem; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 700; }
.nav a svg { width: 20px; height: 20px; flex: 0 0 auto; }
.nav a:hover { background: var(--brand-50); color: var(--brand); }
.nav a.on { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.user-chip { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-100); color: var(--brand); display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.main { flex: 1; min-width: 0; }
.topbar { display: none; }
.content { padding: 28px 32px 60px; max-width: 1240px; }
.page-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin: 2px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Bottom nav (móvil) ---------- */
.bottom-nav { display: none; }

@media (max-width: 900px) {
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .topbar .brand { padding: 0; }
  .content { padding: 18px 14px 100px; }
  h1 { font-size: 1.5rem; }
  .bottom-nav { display: flex; position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(30,27,58,.06); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: .7rem; font-weight: 800; color: var(--muted); border-radius: 10px; }
  .bottom-nav a svg { width: 22px; height: 22px; }
  .bottom-nav a.on { color: var(--brand); background: var(--brand-50); }
}

/* ---------- Tarjetas ---------- */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; border: 1px solid rgba(79,70,229,.05); }
.card + .card { margin-top: 18px; }
.grid > .card + .card, .grid > * > .card:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 700px) { .g2, .g3 { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .card { padding: 16px; } }

.kpi { padding: 18px 20px; }
.kpi .lbl { color: var(--muted); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi .val { font-family: var(--font-title); font-size: 1.8rem; font-weight: 800; line-height: 1.1; margin-top: 4px; }
.kpi .val.accent { color: var(--brand); }
.kpi .hint { color: var(--muted); font-size: .8rem; }

/* ---------- Botones ---------- */
.btn { --b: var(--brand); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1.5px solid transparent; font: 800 .92rem var(--font); cursor: pointer; transition: transform .08s, box-shadow .15s, background .15s; text-decoration: none; white-space: nowrap; line-height: 1.2; }
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(79,70,229,.28); }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-ghost { background: var(--white); color: var(--ink-2); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand-200); color: var(--brand); }
.btn-soft { background: var(--brand-50); color: var(--brand); }
.btn-soft:hover { background: var(--brand-100); }
.btn-wa { background: #25D366; color: #fff; box-shadow: 0 6px 16px rgba(37,211,102,.3); }
.btn-wa:hover { background: #1fb457; color: #fff; }
.btn-danger { background: var(--white); color: var(--bad); border-color: #FBD0DA; }
.btn-danger:hover { background: var(--bad-50); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-lg { padding: 14px 22px; font-size: 1rem; border-radius: 14px; }
.btn-sm { padding: 6px 11px; font-size: .8rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Interruptor único activar/desactivar */
.toggle-rifa { display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font: 800 .92rem var(--font); cursor: pointer; box-shadow: var(--shadow-sm); color: var(--ink-2); }
.toggle-rifa .sw { width: 46px; height: 26px; border-radius: 99px; background: #D9D8E6; position: relative; transition: background .2s; }
.toggle-rifa .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.toggle-rifa.on { border-color: #A7F3D0; color: #047857; background: var(--ok-50); }
.toggle-rifa.on .sw { background: var(--ok); }
.toggle-rifa.on .sw::after { transform: translateX(20px); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 800; background: var(--brand-50); color: var(--brand); white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-50); color: #047857; }
.badge.warn { background: var(--warn-50); color: #B45309; }
.badge.bad { background: var(--bad-50); color: var(--bad); }
.badge.gray { background: #F1F0F6; color: var(--muted); }
.badge.plain::before { display: none; }

/* ---------- Alertas / flash ---------- */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 10px; font-weight: 700; border: 1px solid; display: block; overflow-wrap: anywhere; }
.flash.ok { background: var(--ok-50); border-color: #A7F3D0; color: #065F46; }
.flash.error { background: var(--bad-50); border-color: #FECDD3; color: #9F1239; }
.flash.info { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-600); }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--warn-50); border: 1px solid #FDE68A; color: #92400E; font-weight: 600; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- Formularios ---------- */
.field { margin-bottom: 16px; }
.field label, .lbl-form { display: block; font-weight: 800; font-size: .86rem; margin-bottom: 6px; color: var(--ink-2); }
.field .help { color: var(--muted); font-size: .8rem; margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 13px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--white);
  font: 600 .95rem var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; background: var(--brand-50); color: var(--brand); font-weight: 800; border: 1.5px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; }
.input-group .input { border-radius: 0 12px 12px 0; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 700; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 2px; }
.seg { display: inline-flex; background: var(--brand-50); border-radius: 12px; padding: 4px; gap: 4px; }
.seg label { padding: 7px 14px; border-radius: 9px; font-weight: 800; font-size: .85rem; color: var(--brand); cursor: pointer; }
.seg input { display: none; }
.seg input:checked + span { color: #fff; }
.seg label:has(input:checked) { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.form-foot { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; flex-wrap: wrap; }
.file-drop { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1.5px dashed var(--brand-200); border-radius: 14px; background: var(--brand-50); }
.file-drop img, .file-drop .ph { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: #fff; box-shadow: var(--shadow-sm); display: grid; place-items: center; color: var(--brand); font-weight: 800; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; color: var(--muted); font-weight: 800; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FBFBFE; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; color: var(--brand-200); margin: 0 auto 10px; }

/* ---------- Tabs de rifa ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; background: var(--white); padding: 5px; border-radius: 14px; box-shadow: var(--shadow-sm); margin-bottom: 20px; scrollbar-width: none; }
.tabs a { padding: 9px 14px; border-radius: 10px; font-weight: 800; font-size: .88rem; color: var(--ink-2); white-space: nowrap; }
.tabs a:hover { color: var(--brand); background: var(--brand-50); }
.tabs a.on { background: var(--brand); color: #fff; }

/* ---------- Tarjeta de rifa ---------- */
.rifa-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; transition: transform .15s, box-shadow .15s; color: inherit; }
.rifa-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: inherit; }
.rifa-card .cover { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); display: grid; place-items: center; position: relative; overflow: hidden; }
.rifa-card .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.rifa-card .cover .ph { font-family: var(--font-title); font-size: 3rem; color: var(--brand); font-weight: 800; }
.rifa-card .cover .badge { position: absolute; top: 12px; left: 12px; box-shadow: var(--shadow-sm); }
.rifa-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rifa-card h3 { margin: 0; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .84rem; font-weight: 700; }
.meta span { display: inline-flex; gap: 5px; align-items: center; }
.meta svg { width: 15px; height: 15px; }
.progress { height: 9px; border-radius: 99px; background: var(--brand-50); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #7C73F0); border-radius: 99px; }
.progress-row { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 800; color: var(--ink-2); margin-bottom: 5px; }

/* ---------- Panel de abeja ---------- */
.hive-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.hive-tools .input { width: auto; flex: 1 1 160px; padding: 9px 12px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; font-weight: 800; color: var(--ink-2); margin: 4px 0 14px; }
.legend i { display: inline-block; width: 14px; height: 16px; margin-right: 6px; vertical-align: -3px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hive-wrap { --hx: 54px; position: relative; overflow: hidden; padding: 6px 0 10px; }
.hive { display: flex; flex-direction: column; align-items: center; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.hive-row { display: flex; gap: 4px; }
.hive-row + .hive-row { margin-top: calc(var(--hx) * -0.24); }
.hive-row { transform: translateX(calc((var(--hx) + 4px) / -4)); }
.hive-row.odd { transform: translateX(calc((var(--hx) + 4px) / 4)); }
.hex {
  width: var(--hx); height: calc(var(--hx) * 1.1547); flex: 0 0 auto; position: relative; border: 0; padding: 0; margin: 0;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); cursor: pointer;
  background: var(--brand-200); display: grid; place-items: center; transition: transform .1s, filter .15s;
  font: 800 calc(var(--hx) * .27) var(--font); color: var(--brand-600);
}
.hex::before { content: ''; position: absolute; inset: 2px; clip-path: inherit; background: #fff; z-index: 0; }
.hex { -webkit-tap-highlight-color: transparent; outline: none; }
.hex:focus-visible { filter: drop-shadow(0 0 4px var(--brand)); }
.hex span { position: relative; z-index: 1; letter-spacing: -.02em; }
.hex.d:hover { transform: scale(1.08); z-index: 2; }
.hex.d:hover::before { background: var(--brand-50); }
.hex.sel { background: var(--brand-600); color: #fff; transform: scale(1.06); z-index: 2; }
.hex.sel::before, .hex.sel:hover::before { background: var(--brand); }
.hex.a { background: #F5C451; color: #92400E; }
.hex.a::before { background: #FEF3C7; }
.hex.v { background: #F2879E; color: #9F1239; }
.hex.v::before { background: #FFE4EA; }
.hex.b, .hex.n { background: #D4D3E0; color: #A3A1B8; cursor: default; }
.hex.b::before, .hex.n::before { background: #F1F0F6; }
.hex.n span { text-decoration: line-through; text-decoration-thickness: 2px; }
.hex.win { background: var(--warn); color: #fff; animation: pulse 1.4s infinite; }
.hex.win::before { background: #F59E0B; }
.hex.hit { animation: hit .8s 2; }
@keyframes hit { 50% { transform: scale(1.3); filter: drop-shadow(0 0 10px var(--brand)); } }
@keyframes pulse { 50% { transform: scale(1.12); } }
.lg-d { background: #fff; outline: 2px solid var(--brand-200); outline-offset: -2px; }
.lg-sel { background: var(--brand); } .lg-a { background: #FCD679; } .lg-v { background: #F7A8B9; } .lg-b { background: #DCDBE6; }
.blocks { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.blocks .input { width: auto; padding: 8px 10px; }

/* Barra de selección (sticky) */
.selbar { position: sticky; bottom: 14px; z-index: 20; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 14px 12px 18px; box-shadow: var(--shadow-lg); margin-top: 14px; }
.selbar .nums { flex: 1; min-width: 120px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selbar .nums small { display: block; color: #B9B6D8; font-weight: 700; }
.selbar .total { font-family: var(--font-title); font-size: 1.35rem; font-weight: 800; }
@media (max-width: 900px) { .selbar { bottom: 78px; } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(30,27,58,.45); backdrop-filter: blur(3px); }
.modal.open { display: flex; animation: fade .15s; }
.modal-box { background: #fff; border-radius: 22px; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); padding: 24px; animation: rise .2s; }
.modal-box h2 { display: flex; justify-content: space-between; align-items: center; }
.modal-x { background: var(--brand-50); border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--brand); font-size: 1.2rem; font-weight: 800; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
@media (max-width: 600px) { .modal { align-items: flex-end; padding: 0; } .modal-box { border-radius: 22px 22px 0 0; max-height: 94vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); } }
.success-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-50); color: var(--ok); display: grid; place-items: center; margin: 0 auto 10px; }
.success-ico svg { width: 34px; height: 34px; }
.summary { background: var(--bg); border-radius: 14px; padding: 14px 16px; margin: 14px 0; }
.summary div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: .92rem; }
.summary div b { text-align: right; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 200; box-shadow: var(--shadow-lg); max-width: 92vw; }
@media (max-width: 900px) { .toast { bottom: 90px; } }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(1000px 500px at 110% -10%, var(--brand-100), transparent 60%),
  radial-gradient(800px 400px at -10% 110%, var(--brand-50), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { justify-content: center; flex-direction: column; text-align: center; padding-bottom: 8px; }
.auth-card .brand-logo { width: 64px; height: 64px; border-radius: 18px; font-size: 1.8rem; }

/* ---------- Público ---------- */
.pub-top { background: #fff; border-bottom: 1px solid var(--line); }
.pub-top .in { max-width: 1100px; margin: 0 auto; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pub { max-width: 1100px; margin: 0 auto; padding: 26px 18px 70px; }
.pub-foot { text-align: center; color: var(--muted); font-size: .82rem; padding: 26px 16px 40px; }
.pub-foot a { font-weight: 700; }
.hero { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: center; }
.hero-logo { aspect-ratio: 1; border-radius: 26px; background: #fff; box-shadow: var(--shadow-lg); display: grid; place-items: center; overflow: hidden; }
.hero-logo img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.hero-logo .ph { font-family: var(--font-title); font-size: 5rem; color: var(--brand); font-weight: 800; }
.hero h1 { font-size: 2.4rem; margin-bottom: 8px; }
.prize { display: inline-flex; gap: 10px; align-items: center; background: var(--brand-50); color: var(--brand-600); padding: 10px 16px; border-radius: 14px; font-weight: 800; margin: 6px 0 14px; }
.prize svg { width: 22px; height: 22px; }
.facts { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 18px; }
.fact { background: #fff; border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.fact .k { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fact .v { font-family: var(--font-title); font-weight: 800; font-size: 1.15rem; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; text-align: center; } .hero-logo { max-width: 220px; margin: 0 auto; } .hero h1 { font-size: 1.9rem; } .facts { justify-content: center; } .hero .actions { justify-content: center; } }
.vend-list { display: flex; flex-direction: column; gap: 10px; }
.vend { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); }
.vend .avatar { width: 42px; height: 42px; }
.vend .grow { flex: 1; min-width: 0; font-weight: 800; }
.legal h2 { margin-top: 26px; font-size: 1.2rem; color: var(--brand-600); }
.legal p, .legal li { color: var(--ink-2); }
.legal dl { display: grid; grid-template-columns: 220px 1fr; gap: 8px 16px; margin: 0; }
.legal dt { font-weight: 800; color: var(--ink); }
.legal dd { margin: 0; color: var(--ink-2); white-space: pre-line; }
@media (max-width: 700px) { .legal dl { grid-template-columns: 1fr; } .legal dd { margin-bottom: 8px; } }
.segob { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--ok-50); border: 1px solid #A7F3D0; color: #065F46; font-weight: 700; }
.blocked { text-align: center; max-width: 560px; margin: 30px auto; padding: 40px 28px; }
.blocked .lock { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; margin: 0 auto 16px; background: var(--brand-50); color: var(--brand); }
.blocked .lock svg { width: 42px; height: 42px; }
.blocked .logo-sm { width: 96px; height: 96px; border-radius: 20px; object-fit: contain; margin: 0 auto 14px; background: #fff; box-shadow: var(--shadow); padding: 8px; }
.ticket { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; padding: 22px; overflow: hidden; }
.ticket::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--brand); }
.ticket .tl { aspect-ratio: 1; border-radius: 16px; background: var(--brand-50); overflow: hidden; display: grid; place-items: center; }
.ticket .tl img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.tnums { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.tnums span { background: var(--brand); color: #fff; font-family: var(--font-title); font-weight: 800; padding: 4px 12px; border-radius: 10px; font-size: 1.1rem; }
@media (max-width: 560px) { .ticket { grid-template-columns: 1fr; text-align: center; } .ticket .tl { width: 110px; margin: 0 auto; } .tnums { justify-content: center; } }

.var-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chips button { border: 1px solid var(--brand-200); background: var(--brand-50); color: var(--brand-600); border-radius: 8px; padding: 4px 8px; font: 700 .78rem ui-monospace, monospace; cursor: pointer; }
.var-chips button:hover { background: var(--brand); color: #fff; }
.wa-preview { background: #E7DDD3; border-radius: 16px; padding: 16px; min-height: 140px; }
.wa-bubble { background: #D9FDD3; border-radius: 12px 0 12px 12px; padding: 10px 12px; max-width: 92%; margin-left: auto; box-shadow: 0 1px 1px rgba(0,0,0,.08); font-size: .88rem; white-space: pre-wrap; word-break: break-word; color: #111; }
.dl-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; }
.dl-list dt { color: var(--muted); font-weight: 700; }
.dl-list dd { margin: 0; font-weight: 700; }
.winner { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 18px; background: linear-gradient(135deg, #FFFBEB, #FEF3C7); border: 1px solid #FDE68A; }
.winner .num { font-family: var(--font-title); font-weight: 800; font-size: 2.4rem; color: #B45309; line-height: 1; }

/* =====================================================================
   Marca, registro, planes y pasos (v2 — homologado con el sitio)
   ===================================================================== */
.hexlogo { background: none; box-shadow: none; position: relative; }
.hexlogo::before { content: ''; position: absolute; inset: 0; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(135deg, var(--brand), #7C73F0); }
.hexlogo::after { content: ''; position: absolute; inset: 30%; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: #fff; opacity: .95; }
.nav-count { margin-left: auto; background: var(--warn); color: #fff; border-radius: 99px; font-size: .72rem; padding: 1px 8px; font-weight: 800; }
.nav a.on .nav-count { background: #fff; color: var(--brand); }
.auth-card:has(.auth-wide) { max-width: 680px; }
.fs { border: 0; padding: 0; margin: 0 0 18px; }
.fs legend { font-family: var(--font-title); font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; color: var(--ink); }
.input-group .addon.small { font-size: .78rem; white-space: nowrap; max-width: 48%; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; }
.plan-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.plan-opt { position: relative; cursor: pointer; }
.plan-opt input { position: absolute; opacity: 0; }
.plan-opt > span { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; height: 100%; }
.plan-opt b { font-family: var(--font-title); font-size: 1.05rem; }
.plan-opt small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.plan-opt em { font-style: normal; font-weight: 800; color: var(--brand); margin-top: 4px; }
.plan-opt.star > span { border-color: var(--brand-200); }
.plan-opt input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79,70,229,.14); transform: translateY(-1px); }
.plan-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.plans .plan { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; }
.plans .plan.star { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.plan-hex { width: 34px; height: 38px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--brand-100); margin-bottom: 4px; }
.plans .plan.star .plan-hex { background: var(--brand); }
.plans h3 { margin: 0; }
.plan-price { font-family: var(--font-title); font-size: 2rem; font-weight: 800; line-height: 1; }
.plan-qty { font-weight: 800; color: var(--brand); }
.plans .plan .btn { margin-top: auto; }
.pay-card { border: 1.5px solid #FDE68A; }
.price-tag { font-family: var(--font-title); font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.price-tag small { font-size: .8rem; color: var(--muted); }
.step-t { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin-bottom: 12px; }
.step-t span { width: 26px; height: 30px; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--brand); color: #fff; font-size: .85rem; }
.dl-list.bank { background: var(--bg); border-radius: 14px; padding: 14px 16px; }
.plan-kpi { color: inherit; transition: transform .15s, box-shadow .15s; }
.plan-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: inherit; }
.steps-card { margin-bottom: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: s; }
.steps a { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); color: inherit; height: 100%; transition: border-color .15s, background .15s; }
.steps a:hover { border-color: var(--brand-200); background: var(--brand-50); color: inherit; }
.steps .hx { flex: 0 0 auto; width: 30px; height: 34px; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--brand-100); color: var(--brand); font-weight: 800; font-size: .85rem; }
.steps .hx svg { width: 16px; height: 16px; }
.steps li.done .hx { background: var(--ok); color: #fff; }
.steps b { display: block; font-size: .88rem; line-height: 1.2; }
.steps small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.steps li:not(.done) a { border-style: dashed; }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.grid > * { min-width: 0; }
.file-drop input[type=file] { min-width: 0; max-width: 100%; font-size: .85rem; }
.dl-list dd { min-width: 0; overflow-wrap: anywhere; }
