/* =========================================================
   Raspaditas — estilos compartidos (público + administración)
   ========================================================= */

:root {
  --brand: #6d28d9;
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, var(--surface));
  --brand-deep: color-mix(in srgb, var(--brand) 70%, #000);
  --gold: #f5b301;
  --gold-hi: #ffe08a;
  --gold-ink: #3b2a00;

  --bg: #f5f3fa;
  --surface: #ffffff;
  --surface-2: #f0edf7;
  --ink: #1c1530;
  --ink-2: #463e5c;
  --muted: #6f6787;
  --line: #e3deee;

  --good: #15803d;
  --good-bg: #e6f5eb;
  --warn: #9a5b00;
  --warn-bg: #fdf3dc;
  --bad: #b42318;
  --bad-bg: #fdeceb;
  --info: #1d4ed8;
  --info-bg: #e8effd;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px -14px rgba(38, 16, 82, .28);
  --shadow-sm: 0 2px 8px -2px rgba(38, 16, 82, .12);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110d1c;
    --surface: #1b1529;
    --surface-2: #241d36;
    --ink: #f1edf9;
    --ink-2: #cdc5df;
    --muted: #9d94b5;
    --line: #342b4b;
    --good: #4ade80;
    --good-bg: #12301f;
    --warn: #f5c25b;
    --warn-bg: #352710;
    --bad: #f87171;
    --bad-bg: #3a1618;
    --info: #93b4ff;
    --info-bg: #17233f;
    --shadow: 0 12px 32px -14px rgba(0, 0, 0, .6);
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--brand); }
@media (prefers-color-scheme: dark) { a { color: color-mix(in srgb, var(--brand) 45%, #fff); } }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 560px; }
.container.mid { max-width: 880px; }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-ink: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.1rem;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-ink);
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  transition: transform .08s ease, filter .15s ease, background .15s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px;
}
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { --btn-bg: var(--brand); --btn-ink: var(--brand-ink); }
.btn-gold { --btn-bg: linear-gradient(180deg, var(--gold-hi), var(--gold)); --btn-ink: var(--gold-ink); background: var(--btn-bg); box-shadow: 0 6px 18px -8px rgba(245, 179, 1, .8); }
.btn-ghost { --btn-bg: transparent; border-color: var(--line); }
.btn-danger { --btn-bg: var(--bad-bg); --btn-ink: var(--bad); }
.btn-whatsapp { --btn-bg: #1f9d55; --btn-ink: #fff; }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 1.075rem; padding: .8rem 1.4rem; }
.btn-sm { min-height: 34px; padding: .35rem .8rem; font-size: .875rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; }
@media (prefers-color-scheme: dark) { .link-btn { color: color-mix(in srgb, var(--brand) 45%, #fff); } }

/* ---------- Formularios ---------- */
.field { display: block; margin-bottom: 1rem; }
.field > span, .field > .label { display: block; font-weight: 600; font-size: .925rem; margin-bottom: .35rem; color: var(--ink-2); }
.field .hint { display: block; font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.field .error { display: block; font-size: .85rem; color: var(--bad); margin-top: .3rem; font-weight: 600; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number],
input[type=search], input[type=datetime-local], input[type=color], select, textarea {
  width: 100%; min-height: 46px; padding: .65rem .85rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit;
}
input[type=color] { padding: .25rem; width: 64px; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; }
.is-invalid { border-color: var(--bad) !important; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .9rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--brand); flex: none; }
.code-input { text-transform: uppercase; letter-spacing: .12em; font-family: var(--mono); font-size: 1.15rem; text-align: center; }
.grid-2 { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Avisos y etiquetas ---------- */
.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-weight: 550; display: flex; gap: .6rem; align-items: flex-start; }
.alert::before { font-weight: 800; }
.alert-success { background: var(--good-bg); color: var(--good); }
.alert-success::before { content: "✓"; }
.alert-error { background: var(--bad-bg); color: var(--bad); }
.alert-error::before { content: "!"; }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert-info::before { content: "i"; font-style: italic; }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-warn::before { content: "!"; }

.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.chip { display: inline-block; padding: .1rem .5rem; border-radius: 6px; background: var(--surface-2); font-family: var(--mono); font-size: .82rem; margin: .1rem .15rem .1rem 0; }

/* ---------- Tarjetas ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.panel + .panel { margin-top: 1rem; }
.panel h2 { font-size: 1.15rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-head h2 { margin: 0; }

/* =========================================================
   PÚBLICO
   ========================================================= */
.hero {
  position: relative; overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--gold) 35%, transparent), transparent 60%),
    linear-gradient(140deg, var(--brand), var(--brand-deep));
  padding: 28px 0 88px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image:
    radial-gradient(2px 2px at 12% 30%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 78% 22%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 70%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 90% 75%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 25% 85%, #fff 50%, transparent 51%);
}
.hero .brandbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 28px; position: relative; z-index: 1; }
.hero .logo { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; color: #fff; text-decoration: none; letter-spacing: .01em; }
.hero .logo img { width: 34px; height: 34px; border-radius: 9px; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); font-weight: 850; letter-spacing: -.02em; margin-bottom: .35em; position: relative; z-index: 1; }
.hero .tagline { font-size: clamp(1.05rem, 3.4vw, 1.3rem); opacity: .95; max-width: 34ch; position: relative; z-index: 1; }
.hero .meta { display: flex; gap: .5rem; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .pill { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); padding: .3rem .75rem; border-radius: 999px; font-size: .88rem; font-weight: 600; backdrop-filter: blur(4px); }
.hero.compact { padding-bottom: 72px; }
.hero.compact h1 { font-size: clamp(1.5rem, 5vw, 2.2rem); }

.lift { margin-top: -64px; position: relative; z-index: 2; }
.page { padding-bottom: 48px; }
.section-title { font-size: 1.2rem; margin: 2rem 0 .9rem; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .9rem; margin: 1.1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.steps { display: grid; gap: .75rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem 1rem 3.4rem; position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 1rem; top: 1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; }
.step strong { display: block; margin-bottom: .15rem; }
.step span { color: var(--muted); font-size: .92rem; }

.prize-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.prize { display: flex; gap: .9rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.prize .medal { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 850; color: var(--gold-ink); background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold)); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.prize .medal.silver { background: radial-gradient(circle at 35% 30%, #f4f4f6, #b9bcc6); color: #2c2f3a; }
.prize .medal.bronze { background: radial-gradient(circle at 35% 30%, #f6c79a, #c47a3c); color: #3a1d05; }
.prize .medal.plain { background: var(--surface-2); color: var(--ink-2); box-shadow: none; }
.prize .info { flex: 1; min-width: 0; }
.prize .info strong { display: block; }
.prize .info small { color: var(--muted); }
.prize .won { font-size: .85rem; color: var(--good); font-weight: 650; }

.counter { display: flex; align-items: baseline; gap: .5rem; justify-content: center; margin: 1.5rem 0 .5rem; }
.counter b { font-size: 2rem; font-weight: 850; color: var(--brand); font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .counter b { color: color-mix(in srgb, var(--brand) 45%, #fff); } }

.my-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.my-cards a { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .7rem .9rem; border-radius: var(--radius-sm); background: var(--surface-2); text-decoration: none; color: var(--ink); font-weight: 650; }

.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 32px 16px 48px; }
.footer a { color: inherit; }

/* ---------- Raspadita ---------- */
.ticket {
  position: relative; border-radius: 22px; padding: 18px; color: var(--gold-ink);
  background:
    radial-gradient(circle at 0 50%, var(--bg) 13px, transparent 14px) left center / 28px 28px no-repeat,
    radial-gradient(circle at 100% 50%, var(--bg) 13px, transparent 14px) right center / 28px 28px no-repeat,
    linear-gradient(135deg, var(--gold-hi), var(--gold) 45%, #e39a00);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, .35);
}
.ticket-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
.ticket-foot { display: flex; justify-content: space-between; gap: .75rem; margin-top: 12px; font-size: .8rem; font-weight: 700; }
.scratch {
  position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10;
  background: #fffdf5; color: #2a1d4f; user-select: none; -webkit-user-select: none;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .15);
}
.scratch-under { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px; gap: .2rem;
  background: radial-gradient(circle at 50% 40%, #fff 0, #fff7dc 70%); }
.scratch-under .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; color: #7a6a9a; }
.scratch-under .number { font-size: clamp(2.2rem, 11vw, 3.6rem); font-weight: 900; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--brand); line-height: 1.05; }
.scratch-under .instant { margin-top: .35rem; font-weight: 800; color: #9a3412; background: #ffedd5; border-radius: 999px; padding: .25rem .75rem; font-size: .9rem; }
.scratch canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .7s ease; }
.scratch canvas.gone { opacity: 0; pointer-events: none; }
.scratch canvas.scratch-dust { pointer-events: none; touch-action: auto; cursor: default; transition: none; }

/* Selector de signo */
.sign-picker { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.sign-picker legend { display: block; font-weight: 600; font-size: .925rem; margin-bottom: .45rem; color: var(--ink-2); padding: 0; }
.sign-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
@media (min-width: 520px) { .sign-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.sign-option { cursor: pointer; }
.sign-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sign-option span { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .45rem .2rem; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface); font-size: .72rem; font-weight: 650; color: var(--ink-2); text-align: center; transition: border-color .15s, background .15s; }
.sign-option b { font-size: 1.35rem; line-height: 1.1; font-weight: 400; font-family: "Segoe UI Symbol", "Noto Sans Symbols", "DejaVu Sans", system-ui, sans-serif; color: var(--brand); }
.sign-option input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.sign-option input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { .sign-option b { color: color-mix(in srgb, var(--brand) 45%, #fff); } }

/* Suerte del día debajo del número */
.luck-row { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: .35rem; font-size: .82rem; font-weight: 700; color: #4b4361; }
.luck-glyph { font-family: "Segoe UI Symbol", "Noto Sans Symbols", "DejaVu Sans", system-ui, sans-serif; font-weight: 400; }
.luck-color { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.luck-color i, .luck-grid i { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; background: var(--luck); box-shadow: 0 0 0 2px rgba(255, 255, 255, .8); }
.luck-phrase { font-size: .8rem; color: #6f6787; font-style: italic; margin-top: .1rem; max-width: 30ch; }
.luck-box { margin: .25rem 0 1rem; padding: .9rem 1rem; border-radius: var(--radius); text-align: center;
  background: color-mix(in srgb, var(--luck) 12%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--luck) 45%, transparent); }
.luck-box strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: .4rem; }
.luck-grid { display: flex; justify-content: center; gap: 1.5rem; font-weight: 750; flex-wrap: wrap; }
.luck-grid span { display: inline-flex; align-items: center; gap: .35rem; }
.luck-grid small { color: var(--muted); font-weight: 600; margin-right: .2rem; }
.luck-box em { display: block; margin-top: .45rem; color: var(--ink-2); }

/* Marcos de cada diseño */
.ticket.theme-zodiaco { color: #fde68a; background:
    radial-gradient(circle at 0 50%, var(--bg) 13px, transparent 14px) left center / 28px 28px no-repeat,
    radial-gradient(circle at 100% 50%, var(--bg) 13px, transparent 14px) right center / 28px 28px no-repeat,
    linear-gradient(135deg, #312e81, #1e1b4b 50%, #4c1d95); }
.ticket.theme-holo { color: #4c1d95; background:
    radial-gradient(circle at 0 50%, var(--bg) 13px, transparent 14px) left center / 28px 28px no-repeat,
    radial-gradient(circle at 100% 50%, var(--bg) 13px, transparent 14px) right center / 28px 28px no-repeat,
    linear-gradient(120deg, #f5d0fe, #bfdbfe, #bbf7d0, #fef08a, #fbcfe8); }
.ticket.theme-confeti { color: #fff; background:
    radial-gradient(circle at 0 50%, var(--bg) 13px, transparent 14px) left center / 28px 28px no-repeat,
    radial-gradient(circle at 100% 50%, var(--bg) 13px, transparent 14px) right center / 28px 28px no-repeat,
    linear-gradient(135deg, #f472b6, #a855f7 55%, #6366f1); }
.ticket.theme-trebol { color: #f0fdf4; background:
    radial-gradient(circle at 0 50%, var(--bg) 13px, transparent 14px) left center / 28px 28px no-repeat,
    radial-gradient(circle at 100% 50%, var(--bg) 13px, transparent 14px) right center / 28px 28px no-repeat,
    linear-gradient(135deg, #22c55e, #15803d 55%, #14532d); }
.ticket.theme-plata { color: #2b2f3a; background:
    radial-gradient(circle at 0 50%, var(--bg) 13px, transparent 14px) left center / 28px 28px no-repeat,
    radial-gradient(circle at 100% 50%, var(--bg) 13px, transparent 14px) right center / 28px 28px no-repeat,
    linear-gradient(135deg, #f4f5f8, #c3c7d1 50%, #e7e9ef); }
.mini-card.mini-zodiaco { background: linear-gradient(135deg, #312e81, #4c1d95); color: #fde68a; }
.mini-card.mini-holo { background: linear-gradient(120deg, #f5d0fe, #bfdbfe, #bbf7d0, #fef08a); color: #4c1d95; }
.mini-card.mini-confeti { background: linear-gradient(135deg, #f472b6, #a855f7); color: #fff; }
.mini-card.mini-trebol { background: linear-gradient(135deg, #22c55e, #14532d); color: #f0fdf4; }
.mini-card.mini-plata { background: linear-gradient(135deg, #f4f5f8, #c3c7d1); color: #2b2f3a; }
.mini-card.revealed { border-color: var(--luck, var(--good)); }
.scratch .spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #e9e1ff; border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scratch-hint { text-align: center; color: var(--muted); font-size: .92rem; margin: .9rem 0 .4rem; }

/* ---------- Comprobante ---------- */
.receipt { text-align: center; }
.receipt .ok-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto .75rem; display: grid; place-items: center; font-size: 2rem; color: #fff; background: var(--good); box-shadow: 0 8px 24px -10px var(--good); }
.receipt h2 { font-size: 1.45rem; }
.receipt .big-number { font-size: clamp(2.4rem, 12vw, 3.4rem); font-weight: 900; color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: .02em; margin: .2rem 0 .8rem; }
@media (prefers-color-scheme: dark) { .receipt .big-number { color: color-mix(in srgb, var(--brand) 45%, #fff); } }
.receipt dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; text-align: left; margin: 1.2rem 0; padding: 1rem; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .93rem; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 650; word-break: break-word; }
.receipt .actions { display: grid; gap: .6rem; }
.prize-banner { border-radius: var(--radius); padding: 1rem; margin: .5rem 0 1rem; font-weight: 700; background: linear-gradient(135deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); }
.prize-banner strong { display: block; font-size: 1.2rem; }
.prize-banner small { font-weight: 600; }

.receipt .ok-icon.pending { background: var(--warn); box-shadow: 0 8px 24px -10px var(--warn); }

/* ---------- Compra en pasos ---------- */
.wizard { list-style: none; display: flex; gap: .4rem; padding: 0; margin: 0 0 1.25rem; counter-reset: wiz; }
.wizard li { flex: 1; text-align: center; font-size: .82rem; font-weight: 700; color: var(--muted); padding-top: .55rem; border-top: 4px solid var(--line); counter-increment: wiz; }
.wizard li::before { content: counter(wiz) ". "; }
.wizard li.on { color: var(--brand); border-top-color: var(--brand); }
.wizard li.done { color: var(--good); border-top-color: var(--good); }
.wizard li.done::before { content: "✓ "; }
@media (prefers-color-scheme: dark) { .wizard li.on { color: color-mix(in srgb, var(--brand) 45%, #fff); } }

.qty { display: flex; align-items: center; justify-content: center; gap: .75rem; margin: .5rem 0 1rem; }
.qty-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; font-size: 1.8rem; font-weight: 700; line-height: 1; cursor: pointer; background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.qty-btn:disabled { opacity: .35; cursor: not-allowed; }
.qty-input { width: 110px !important; text-align: center; font-size: 2.2rem !important; font-weight: 850; min-height: 64px !important; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-chips { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.chip-btn { min-width: 52px; min-height: 40px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.chip-btn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

.ticket-stack { display: flex; justify-content: center; align-items: center; min-height: 64px; margin: .25rem 0 1rem; padding-left: 18px; }
.mini-ticket { width: 46px; height: 62px; margin-left: -18px; border-radius: 8px; transform: rotate(calc((var(--i) - 4) * 4deg)); background: linear-gradient(135deg, var(--gold-hi), var(--gold)); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); border: 2px solid rgba(255, 255, 255, .6); animation: drop-in .3s ease-out backwards; position: relative; }
.mini-ticket::after { content: ""; position: absolute; inset: 10px 7px 18px; border-radius: 4px; background: linear-gradient(135deg, #e7e9ef, #b8bcc8); }
.mini-more { margin-left: 10px; font-weight: 800; color: var(--muted); }
@keyframes drop-in { from { opacity: 0; transform: translateY(-14px) rotate(0); } }

.total-box { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: 1rem; margin-bottom: 1rem; border-radius: var(--radius); background: var(--surface-2); text-align: center; }
.total-box span { color: var(--muted); font-weight: 600; font-size: .9rem; }
.total-box strong { font-size: 2rem; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.total-box small { color: var(--muted); }
.pay-box { border: 2px dashed var(--brand); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; background: var(--brand-soft); }
.pay-box strong { display: block; margin-bottom: .35rem; color: var(--brand); }
@media (prefers-color-scheme: dark) { .pay-box strong { color: color-mix(in srgb, var(--brand) 45%, #fff); } }
.upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; min-height: 110px; padding: 1rem; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; text-align: center; background: var(--surface); }
.upload:hover { border-color: var(--brand); }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload img { max-height: 180px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.upload-text { font-weight: 650; color: var(--ink-2); }
.step-actions { display: flex; gap: .6rem; margin-top: .5rem; }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.buy-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1rem; }
.buy-option { display: flex; flex-direction: column; align-items: center; padding: .8rem .4rem; border-radius: var(--radius-sm); border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); background: var(--surface-2); }
.buy-option:hover { border-color: var(--brand); }
.buy-option b { font-size: 1.6rem; line-height: 1.1; }
.buy-option span { font-size: .8rem; color: var(--muted); }
.buy-option small { font-weight: 700; margin-top: .2rem; }
.code-entry { margin-top: 1.1rem; }
.code-entry summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: .92rem; text-align: center; margin-bottom: .8rem; }
.back-link { display: inline-block; margin-bottom: .75rem; color: #fff; font-weight: 700; text-decoration: none; position: relative; z-index: 3; }

/* ---------- Meta y barra de progreso ---------- */
.goal { margin: 1.25rem 0; padding: 1.1rem 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.goal-head { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .55rem; }
.goal-head strong { font-size: 2rem; font-weight: 900; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1; }
@media (prefers-color-scheme: dark) { .goal-head strong { color: color-mix(in srgb, var(--brand) 45%, #fff); } }
.goal-head span { color: var(--muted); font-weight: 600; }
.goal-track { height: 16px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.goal-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--gold))); position: relative; overflow: hidden; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.goal-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); animation: shine 2.4s linear infinite; }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.goal-legend { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; font-size: .88rem; color: var(--muted); }
.goal-legend b { color: var(--ink); }
.goal.complete .goal-fill { background: linear-gradient(90deg, var(--gold), var(--gold-hi)); }
.goal.complete .goal-head strong { color: var(--good); }
@media (prefers-reduced-motion: reduce) { .goal-fill::after { animation: none; } }

/* ---------- Raspaditas de una compra ---------- */
.ticket-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; }
.mini-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; aspect-ratio: 3 / 4; border-radius: 12px; text-decoration: none; text-align: center; padding: .5rem; color: var(--gold-ink); background: linear-gradient(135deg, var(--gold-hi), var(--gold)); box-shadow: var(--shadow-sm); border: 2px solid rgba(255, 255, 255, .5); }
.mini-card small { font-size: .72rem; font-weight: 700; opacity: .8; }
.mini-card strong { font-size: 1rem; font-weight: 900; font-variant-numeric: tabular-nums; word-break: break-all; }
.mini-card em { font-style: normal; font-size: .72rem; font-weight: 800; }
.mini-card.hidden-number strong { background: linear-gradient(135deg, #f4f5f8, #b8bcc8); color: #4b5060; padding: .35rem .6rem; border-radius: 8px; }
.mini-card.revealed { background: var(--surface); color: var(--brand); border-color: var(--good); }
.mini-card.voided { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }

@media print {
  .hero, .footer, .no-print, .btn { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; border: 1px solid #ccc; }
  .lift { margin-top: 0; }
}

/* ---------- Mensaje de estado centrado ---------- */
.state-card { text-align: center; padding: 2rem 1.25rem; }
.state-card .emoji { font-size: 2.6rem; margin-bottom: .5rem; }

/* =========================================================
   ADMINISTRACIÓN
   ========================================================= */
.admin-bar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.admin-bar .container { display: flex; align-items: center; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.admin-bar .logo { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--ink); text-decoration: none; }
.admin-bar .logo img { width: 30px; height: 30px; border-radius: 8px; }
.admin-nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.admin-nav a { padding: .45rem .8rem; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .93rem; }
.admin-nav a.active, .admin-nav a:hover { background: var(--surface-2); color: var(--ink); }
.admin-user { margin-left: auto; display: flex; align-items: center; gap: .75rem; font-size: .88rem; color: var(--muted); }
.admin-main { padding: 24px 0 64px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.6rem; margin-bottom: .25rem; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: .35rem; }
.breadcrumb a { color: inherit; }

.kpis { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; }
.kpi .kpi-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.kpi .kpi-value { font-size: 1.65rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.2; margin-top: .15rem; }
.kpi .kpi-sub { font-size: .8rem; color: var(--muted); }
.kpis.kpis-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
a.kpi-link { text-decoration: none; color: inherit; border-color: var(--warn); background: var(--warn-bg); }
a.kpi-link:hover { filter: brightness(1.03); }
.receipt-thumb { display: block; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.receipt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.receipt-thumb.pdf { display: grid; place-items: center; font-weight: 800; color: var(--bad); text-decoration: none; }
.migrate-banner { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--line); }
.migrate-banner .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: .6rem; padding-bottom: .6rem; font-weight: 600; }

.meter { margin: .25rem 0 1.25rem; }
.meter-track { height: 10px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--brand); }
.meter-legend { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-top: .35rem; }

.cols { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 960px) { .cols { grid-template-columns: 1fr 1fr; } .cols .panel + .panel { margin-top: 0; } }

.table-wrap { overflow-x: auto; margin: 0 -1.25rem; padding: 0 1.25rem; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: .55rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.empty { text-align: center; color: var(--muted); padding: 1.5rem; }

.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin: 0; flex: 1 1 140px; }
.inline-form .field.sm { flex: 0 1 90px; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filters input[type=search] { flex: 1 1 240px; width: auto; }
.filters select { width: auto; flex: 0 1 220px; }

details.mini > summary { cursor: pointer; color: var(--bad); font-weight: 600; font-size: .85rem; list-style: none; }
details.mini > summary::-webkit-details-marker { display: none; }
details.mini[open] { background: var(--surface-2); padding: .6rem; border-radius: var(--radius-sm); }
details.mini form { display: flex; gap: .4rem; margin-top: .5rem; }
details.mini input { min-height: 36px; padding: .35rem .6rem; }
details.payload summary { cursor: pointer; color: var(--muted); font-size: .82rem; }
details.payload pre { white-space: pre-wrap; word-break: break-all; font-size: .78rem; background: var(--surface-2); padding: .6rem; border-radius: 8px; margin: .4rem 0 0; max-width: 520px; }

.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.activity li:last-child { border-bottom: 0; }
.activity time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .82rem; padding-top: .1rem; }

.pagination { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; list-style: none; padding: 0; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 .6rem; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; background: var(--surface); }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .disabled { opacity: .45; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(140deg, var(--brand), var(--brand-deep)); }
.login-wrap .panel { width: 100%; max-width: 400px; padding: 1.75rem; }
.login-wrap .logo { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; margin-bottom: 1.25rem; }
.login-wrap .logo img { width: 40px; height: 40px; border-radius: 10px; }

.color-row { display: flex; gap: .6rem; align-items: center; }
.preview-number { font-family: var(--mono); font-weight: 800; color: var(--brand); font-size: 1.1rem; }
.form-section { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.25rem; }
.form-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section h2 { font-size: 1.05rem; margin-bottom: 1rem; }
