:root {
  --bg: #f4f5f9;
  --card: #ffffff;
  --text: #1c1f2a;
  --muted: #6b7183;
  --line: #e2e5ee;
  --brand: #6d28d9;
  --brand-2: #8b5cf6;
  --on-brand: #ffffff;
  --accent: #6d28d9;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, #fff);
  --ok: #059669;
  --ok-soft: #d1fae5;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --bad: #dc2626;
  --bad-soft: #fee2e2;
  --wa: #25d366;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 40, .06), 0 4px 16px rgba(20, 20, 40, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
/* Barra del panel: igual que la página (negra con franjas del color de marca) */
.topbar {
  background: #111;
  border-top: 6px solid var(--brand); border-bottom: 6px solid var(--brand);
  color: #fff;
  padding: 12px 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .3px; }
.topbar .badge { background: rgba(255, 255, 255, .2); color: #fff; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 20px; padding-bottom: 120px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.grid-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ---------- Buttons & inputs ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--brand); color: var(--on-brand);
  padding: 10px 16px; border-radius: 10px;
  font: inherit; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--brand-soft); color: var(--brand); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.ok { background: var(--ok); }
.btn.bad { background: var(--bad); }
.btn.danger-outline { background: #fff; color: var(--bad); border: 2px solid var(--bad); }
.btn.wa { background: var(--wa); color: #fff; }
.btn.sm { padding: 6px 10px; font-size: .85rem; border-radius: 8px; }
.btn.block { width: 100%; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
input, select, textarea {
  width: 100%; font: inherit;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 0; border-color: transparent; }
textarea { min-height: 80px; resize: vertical; }
.field { margin-bottom: 14px; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: .78rem; font-weight: 700;
  background: var(--brand-soft); color: var(--brand);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.gray { background: #eef0f4; color: var(--muted); }

/* ---------- Raffle cards (lista pública) ---------- */
.raffle-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.raffle-card .img { aspect-ratio: 16 / 10; background: var(--brand-soft) center / cover no-repeat; display: grid; place-items: center; font-size: 3rem; }
.raffle-card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.raffle-card .badge { align-self: flex-start; }
.raffle-card .price { font-size: 1.25rem; font-weight: 800; color: var(--brand); }
.progress { height: 8px; background: #eceef4; border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* ---------- Raffle page ---------- */
.hero { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .hero { grid-template-columns: 340px 1fr; } }
.hero .img { border-radius: var(--radius); aspect-ratio: 1 / 1; background: var(--brand-soft) center / cover no-repeat; display: grid; place-items: center; font-size: 4rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.stat { background: var(--bg); border-radius: 10px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 1.2rem; }
.stat span { font-size: .78rem; color: var(--muted); }
.packages { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pre { white-space: pre-wrap; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.toolbar .field { margin: 0; }
.toolbar .grow { flex: 1 1 180px; }

.tickets {
  display: grid; gap: 3px;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
}
/* Boletos por hilera elegidos en Configuración */
@media (max-width: 759px) {
  .tickets.cols-m { grid-template-columns: repeat(var(--cols-m), minmax(0, 1fr)); }
  .tickets.cols-m .tk { font-size: min(.95rem, calc((100vw - 40px) / var(--cols-m) / 3.6)); }
}
@media (min-width: 760px) {
  .tickets.cols-d { grid-template-columns: repeat(var(--cols-d), minmax(0, 1fr)); }
  .tickets.cols-d .tk { font-size: min(1rem, calc(min(100vw, 1100px) / var(--cols-d) / 4.2)); }
}
@media (max-width: 759px) { #buySection { padding: 14px 8px; } #buySection h2, #buySection .toolbar, #buySection p { padding: 0 6px; } }
@media (min-width: 760px) { .tickets { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 4px; } }
.tk {
  border: 1.5px solid var(--brand); background: #fff; color: #111;
  border-radius: 5px; padding: 11px 0; font: inherit; font-weight: 800; font-size: .78rem; line-height: 1; letter-spacing: -.2px;
  cursor: pointer; font-variant-numeric: tabular-nums; min-width: 0;
}
@media (min-width: 760px) { .tk { font-size: .95rem; padding: 12px 0; } }
.tk:hover { background: var(--brand-soft); }
.tk.sel { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 14px; flex-wrap: wrap; }

.cart {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(20, 20, 40, .1);
  padding: 12px 0;
}
.cart .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; max-height: 64px; overflow: auto; flex: 1 1 200px; }
.chip { background: var(--brand-soft); color: var(--brand); border: 0; border-radius: 999px; padding: 3px 10px; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.chip:hover { background: var(--bad-soft); color: var(--bad); }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 15, 30, .55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: var(--radius); width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; padding: 22px; }
.modal h2 { margin-bottom: 12px; }
.summary { background: var(--bg); border-radius: 10px; padding: 12px; margin-bottom: 14px; font-size: .9rem; max-height: 180px; overflow: auto; }
.big-folio { font-size: 2rem; font-weight: 800; letter-spacing: 2px; color: var(--brand); text-align: center; margin: 8px 0; }

/* ---------- Toast ---------- */
#toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: #1c1f2a; color: #fff; padding: 12px 14px; border-radius: 10px; box-shadow: var(--shadow); font-size: .92rem; animation: pop .2s ease-out; }
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Admin ---------- */
.admin { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .admin { grid-template-columns: 260px 1fr; } }
.side-list { display: grid; gap: 6px; }
.side-item { text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; color: var(--text); }
.side-item.active { border-color: var(--brand); background: var(--brand-soft); }
.side-item b { display: block; }
.side-item.ended { opacity: .6; background: #f6f6f6; }
.side-item.ended.active { opacity: 1; }
.side-sep { margin: 10px 2px 2px; font-size: .75rem; font-weight: 800; letter-spacing: .5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.tab.active { color: var(--brand); border-color: var(--brand); }
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-bottom: 16px; }
.kpi { background: var(--bg); border-radius: 10px; padding: 12px; }
.kpi b { display: block; font-size: 1.3rem; }
.kpi span { font-size: .8rem; color: var(--muted); }
.stat-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.stat-card.total { background: var(--bg); border-width: 2px; }
.stat-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; margin-bottom: 6px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; }
.stat-grid div { background: var(--bg); border-radius: 8px; padding: 6px 8px; }
.stat-card.total .stat-grid div { background: #fff; }
.stat-grid b { display: block; font-size: 1.05rem; }
.stat-grid span { font-size: .72rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; color: var(--muted); letter-spacing: .4px; }
td .nums { max-width: 260px; font-variant-numeric: tabular-nums; word-break: break-word; }
td .actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* ---------- Foto de la rifa (panel) ---------- */
.photo-box { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.photo-preview {
  width: 120px; height: 120px; border-radius: 12px; border: 1px dashed var(--line);
  background: var(--brand-soft) center / cover no-repeat; display: grid; place-items: center; font-size: 2rem; flex: none;
}
.photo-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* ---------- Editor de texto enriquecido (panel) ---------- */
.rt-wrap { position: relative; background: #fff; border-radius: 10px; }
.rt-wrap .ql-toolbar.ql-snow { border-color: var(--line); border-radius: 10px 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.rt-wrap .ql-toolbar .ql-formats { margin-right: 6px !important; }
.rt-wrap .ql-container.ql-snow { border-color: var(--line); border-radius: 0 0 10px 10px; font: inherit; }
.rt-wrap .ql-editor { min-height: 160px; font-size: 1rem; }
.rt-wrap .ql-emoji { font-size: 16px; line-height: 1; width: auto !important; }
.emoji-pop {
  position: absolute; z-index: 10; top: 48px; right: 8px; left: 8px; max-width: 320px; margin-left: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 8px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
}
.emoji-pop button { border: 0; background: none; font-size: 1.4rem; padding: 4px; border-radius: 8px; cursor: pointer; }
.emoji-pop button:hover { background: var(--brand-soft); }
.emoji-pop.hidden { display: none; }
/* Etiquetas del editor en español */
.ql-snow .ql-picker.ql-font .ql-picker-label::before, .ql-snow .ql-picker.ql-font .ql-picker-item::before { content: 'Fuente'; }
.ql-snow .ql-picker.ql-font .ql-picker-item::before { content: 'Normal'; }
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { content: 'Clásica'; }
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before { content: 'Máquina'; }
.ql-snow .ql-picker.ql-size .ql-picker-label::before, .ql-snow .ql-picker.ql-size .ql-picker-item::before { content: 'Tamaño'; }
.ql-snow .ql-picker.ql-size .ql-picker-item::before { content: 'Normal'; }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { content: 'Chica'; }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { content: 'Grande'; }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { content: 'Enorme'; }
.ql-snow .ql-tooltip[data-mode="link"]::before { content: 'Enlace:'; }
.ql-snow .ql-tooltip.ql-editing a.ql-action::after { content: 'Guardar'; }
.ql-snow .ql-tooltip::before { content: 'Abrir:'; }
.ql-snow .ql-tooltip a.ql-action::after { content: 'Editar'; }
.ql-snow .ql-tooltip a.ql-remove::before { content: 'Quitar'; }

/* ---------- Descripción en la página pública ---------- */
.rich.ql-editor { padding: 0; height: auto; overflow: visible; font: inherit; line-height: 1.5; }
.rich a { color: var(--brand); }
.info-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }

/* ---------- Encabezado con logo, palomita y menú ---------- */
.brand-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar a.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar a.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #fff; flex: none; }
.verified { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #1d9bf0; color: #fff; font-size: 11px; flex: none; }
.menu-btn { background: rgba(255, 255, 255, .18); color: var(--on-brand); border: 0; border-radius: 10px; width: 38px; height: 38px; font-size: 1.2rem; cursor: pointer; flex: none; }
.classic-menu { margin-top: 10px; }
.classic-menu .wrap { display: flex; gap: 6px; overflow-x: auto; justify-content: flex-start; }
.classic-menu a { font-size: .85rem !important; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .15); white-space: nowrap; }
.classic-menu a.active { background: rgba(255, 255, 255, .35); }
.drawer-bg { position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 25, .5); }
.drawer { position: absolute; top: 0; bottom: 0; left: 0; width: min(80vw, 300px); background: #fff; padding: 18px; display: flex; flex-direction: column; gap: 4px; animation: slide .2s ease-out; overflow-y: auto; }
.drawer-head { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.drawer a { color: var(--text); text-decoration: none; font-weight: 600; padding: 12px 10px; border-radius: 10px; }
.drawer a.active, .drawer a:hover { background: var(--brand-soft); color: var(--brand); }
@keyframes slide { from { transform: translateX(-100%); } }

.site-footer { margin-top: 30px; padding: 24px 0 110px; color: var(--muted); text-align: center; border-top: 1px solid var(--line); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-bottom: 10px; }
.foot-links a { color: var(--accent); text-decoration: none; font-weight: 600; }

/* ---------- Temporizador ---------- */
.countdown { display: flex; gap: 8px; margin: 10px 0; }
.cd-box { background: var(--brand); color: var(--on-brand); border-radius: 10px; padding: 6px 8px; min-width: 56px; text-align: center; }
.cd-box b { display: block; font-size: 1.25rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd-box small { font-size: .7rem; opacity: .85; }

/* ---------- Métodos de pago ---------- */
.pay-list { display: grid; gap: 10px; margin-top: 10px; }
.pay-card { display: flex; gap: 12px; align-items: center; background: var(--bg); border-radius: 12px; padding: 12px; }
.pay-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; flex: none; }
.pay-info { flex: 1; min-width: 0; word-break: break-word; }
.mono { font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: .5px; }

/* ---------- Nombre y fecha de la rifa hasta arriba ---------- */
.title-banner { background: #1f1f1f; color: #fff; text-align: center; border-radius: 12px; padding: 18px 12px 16px; margin: 0 -4px 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); text-transform: uppercase; }
.title-banner h1 { margin: 0 0 6px; font-weight: 900; font-size: clamp(1.4rem, 7.5vw, 2.6rem); line-height: 1.05; letter-spacing: -.5px; }
.title-banner div { font-weight: 800; font-size: clamp(1.05rem, 5vw, 1.6rem); }
.tickets-below { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 14px; color: var(--brand); text-decoration: none; font-size: 1.6rem; line-height: 1; }
.tickets-below span { color: var(--text); font-weight: 900; font-size: clamp(1rem, 5.2vw, 1.5rem); letter-spacing: -.3px; }

/* ---------- Botón grupo de WhatsApp ---------- */
.wa-group-wrap { display: flex; justify-content: center; margin: 16px 0; }
.wa-group-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(90deg, #25d366, #128c7e); color: #fff; text-decoration: none; font-weight: 800; font-size: clamp(.92rem, 4.4vw, 1.15rem);
  box-shadow: 0 0 0 5px #fff, 0 0 0 8px #6ee7a0, 0 6px 16px rgba(18, 140, 126, .35); animation: waPulse 2.2s ease-in-out infinite;
}
.wa-group-btn .ico { width: 30px; height: 30px; }
.wa-group-btn .ico path:first-child { fill: transparent; }
.wa-group-btn:hover { filter: brightness(1.06); }
@keyframes waPulse { 50% { transform: scale(1.03); } }

/* ---------- Buscar número + Maquinita de la suerte ---------- */
.search-big { text-align: center; font-size: 1.1rem; font-weight: 700; letter-spacing: .5px; padding: 12px; }
.search-big::placeholder { color: #9aa0ad; font-weight: 700; }
.lucky-btn {
  display: block; width: 100%; margin: 4px 0 16px; padding: 14px 10px; cursor: pointer;
  background: #fff; color: var(--brand); border: 2.5px solid var(--brand); border-radius: 10px;
  font: inherit; font-weight: 900; font-size: clamp(.78rem, 3.7vw, 1.15rem); letter-spacing: .07em; white-space: nowrap;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
}
.lucky-btn:hover { background: var(--brand-soft); }
.lucky-emoji { font-size: 1.5em; letter-spacing: 0; line-height: 1; }

/* Ventana de la maquinita */
.slot-modal { text-align: center; max-width: 420px; }
.slot-title { font-weight: 900; font-size: 1.25rem; color: var(--brand); letter-spacing: .04em; margin-bottom: 4px; }
.slot-sub { margin: 4px 0 10px; font-weight: 700; }
.slot-qty { display: flex; justify-content: center; align-items: center; gap: 10px; }
.slot-qty button { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--brand); background: #fff; color: var(--brand); font-size: 1.6rem; font-weight: 900; cursor: pointer; line-height: 1; }
.slot-qty input { width: 90px; text-align: center; font-size: 1.6rem; font-weight: 900; padding: 6px; }
.slot-quick { display: flex; justify-content: center; gap: 6px; margin: 10px 0 14px; flex-wrap: wrap; }
.slot-quick button { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 5px 14px; font: inherit; font-weight: 800; cursor: pointer; }
.slot-quick button:hover { border-color: var(--brand); color: var(--brand); }
.slot-machine { background: linear-gradient(180deg, #2a2a2a, #111); border: 4px solid var(--brand); border-radius: 16px; padding: 14px 10px; box-shadow: inset 0 0 18px rgba(0, 0, 0, .6), 0 6px 16px rgba(0, 0, 0, .25); }
.slot-reels { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 52px; }
.slot-reel { min-width: 56px; padding: 10px 6px; background: #fff; color: #111; border-radius: 8px; font: 900 1.25rem ui-monospace, Consolas, monospace; box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .12); }
.slot-reel.spin { color: #888; filter: blur(.6px); animation: reel .12s linear infinite; }
.slot-reel.stop { background: #fff7d1; color: var(--brand); animation: pop .3s ease-out; box-shadow: 0 0 0 2px #ffd100, inset 0 -6px 10px rgba(0, 0, 0, .08); }
.slot-more { align-self: center; color: #ffd100; font-weight: 900; }
@keyframes reel { 0% { transform: translateY(-3px); } 50% { transform: translateY(3px); } 100% { transform: translateY(-3px); } }
.slot-msg { min-height: 1.4em; margin: 12px 0 8px; font-weight: 800; }
.slot-spin { font-size: 1.15rem; letter-spacing: .08em; padding: 13px; }

.hero #name { display: none; } /* el nombre ya va hasta arriba */

.chip-opp { font-weight: 600; opacity: .8; }
.cart .chips { max-height: 92px; }

/* ---------- Texto automático de la rifa ---------- */
.rules-box { background: var(--bg); border-left: 4px solid var(--brand); border-radius: 10px; padding: 10px 14px; margin: 12px 0; font-size: .95rem; }
.rules-box p { margin: 6px 0; }
.rules-box .warn { font-weight: 700; color: var(--bad); }

/* ---------- Lista de precios (1 al 10 boletos) ---------- */
.price-list { background: #1f1f1f; color: #fff; border-radius: 12px; padding: 14px 12px; margin-top: 12px; text-align: center; font-weight: 800; text-transform: uppercase; font-size: 1.15rem; line-height: 1.55; letter-spacing: -.2px; }
.price-list .pl-title { color: var(--on-brand); background: var(--brand); display: inline-block; padding: 2px 12px; border-radius: 8px; margin-bottom: 8px; font-size: 1rem; }

/* ---------- Tarjetas de cuentas por banco ---------- */
.bank-card { border-radius: 14px; color: #fff; overflow: hidden; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); background: linear-gradient(135deg, #2b2f3a, #4a5060); }
.bank-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, .22); }
.bank-mark { font-weight: 900; font-size: 1.35rem; letter-spacing: -.3px; }
.bank-name { font-size: 1.15rem; font-weight: 500; }
.bank-body { padding: 14px 18px 16px; }
.bank-label { text-align: center; font-weight: 800; opacity: .92; }
.bank-number { text-align: center; font-family: ui-monospace, Consolas, monospace; font-weight: 800; font-size: clamp(1.05rem, 5.2vw, 1.5rem); letter-spacing: .14em; margin: 2px 0 12px; word-break: break-all; }
.bank-row { margin-bottom: 10px; }
.bank-row b { display: block; }
.bank-copy { width: 100%; margin-top: 4px; background: rgba(255, 255, 255, .2); color: #fff; border: 1px solid rgba(255, 255, 255, .35); border-radius: 10px; padding: 9px; font: inherit; font-weight: 700; cursor: pointer; }
.bank-copy:hover { background: rgba(255, 255, 255, .3); }
.bank-bbva { background: linear-gradient(135deg, #0a5fd8, #1d8cff); }
.bank-bbva .bank-mark { font-style: italic; letter-spacing: 1px; }
.bank-azteca { background: linear-gradient(135deg, #0a5c0a, #138f13); }
.bank-azteca .bank-mark { font-style: italic; font-size: 1.1rem; }
.bank-nu { background: linear-gradient(135deg, #3b0a4c, #820ad1); }
.bank-nu .bank-mark { font-size: 1.9rem; line-height: 1; letter-spacing: -1px; }
.bank-albo { background: linear-gradient(135deg, #10172e, #2a3a8c); }
.bank-albo .bank-mark { font-size: 1.6rem; letter-spacing: -.5px; }
.bank-spin { background: linear-gradient(135deg, #c8102e, #e9303f); }
.bank-spin .bank-mark { color: #ffd100; font-size: 1.5rem; }

/* ---------- Boletos vendidos visibles ---------- */
.tk.taken { background: #4a4a4a; color: #8a8a8a; border-color: var(--brand); cursor: not-allowed; }
.tk.taken.paid { background: #3a3a3a; }
.legend { display: flex; gap: 10px 20px; flex-wrap: wrap; justify-content: center; font-weight: 800; font-size: 1rem; margin: 4px 0 14px; }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; width: 46px; height: 26px; border-radius: 5px; border: 1.5px solid var(--brand); background: #fff; }

/* ---------- Páginas informativas ---------- */
.page-title { margin: 6px 0 14px; }
.faq details { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 10px 0 0; white-space: pre-wrap; color: var(--muted); }
.winner { display: flex; gap: 14px; align-items: center; }
.winner .w-photo { width: 76px; height: 76px; border-radius: 12px; background: var(--brand-soft) center / cover no-repeat; display: grid; place-items: center; font-size: 2rem; flex: none; }
.result-box { margin-top: 14px; }
.status-big { font-size: 1.4rem; font-weight: 800; }
.ended-banner { background: var(--bad-soft); color: var(--bad); font-weight: 700; padding: 10px 14px; border-radius: 10px; margin: 10px 0; }
.participants { display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); font-size: .9rem; max-height: 420px; overflow: auto; }
.participants div { background: var(--bg); padding: 6px 10px; border-radius: 8px; }

/* ---------- Página Bio ---------- */
.bio { max-width: 520px; margin: 0 auto; padding: 30px 16px 60px; text-align: center; }
.bio .logo { width: 96px; height: 96px; margin: 0 auto 10px; display: block; }
.bio-links { display: grid; gap: 10px; margin-top: 18px; }
.bio-links a { display: block; background: var(--brand); color: var(--on-brand); text-decoration: none; font-weight: 700; padding: 14px; border-radius: 14px; box-shadow: var(--shadow); }
.bio-links a.alt { background: var(--card); color: var(--text); }

/* ---------- Panel: navegación inferior y configuración ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: center; gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgba(20, 20, 40, .08); }
.bottom-nav button { flex: 0 1 140px; background: none; border: 0; font: inherit; font-size: .8rem; font-weight: 600; color: var(--muted); padding: 6px; border-radius: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bottom-nav button span { font-size: 1.3rem; }
.bottom-nav button.active { color: var(--brand); background: var(--brand-soft); }
.chips-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.chips-tabs button { flex: none; background: var(--card); border: 1px solid var(--line); color: var(--text); font: inherit; font-weight: 600; font-size: .9rem; padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.chips-tabs button.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.cfg-section h3 { margin-top: 22px; font-size: .8rem; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.cfg-section h3:first-child { margin-top: 0; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 48px; height: 42px; padding: 2px; flex: none; }
.item-list { display: grid; gap: 10px; margin-top: 12px; }
.item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; gap: 12px; align-items: center; }
.item .grow { flex: 1; min-width: 0; word-break: break-word; }
.item-edit { border: 1px dashed var(--brand); border-radius: 12px; padding: 14px; margin-top: 12px; background: var(--brand-soft); }

/* ---------- Encabezado: barra oscura con franjas y logo al centro ---------- */
.hbar { --bar-h: 72px; --logo: 86px; background: var(--brand); padding: 9px 0; margin-bottom: 18px; position: relative; z-index: 20; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.hbar-inner {
  background: #111; height: var(--bar-h); position: relative;
  display: grid; grid-template-columns: 1fr var(--logo) 1fr; grid-template-rows: var(--bar-h);
  align-items: center; gap: 10px; padding: 0 10px;
}
.hb-side { display: flex; align-items: center; justify-content: center; text-align: center; height: 100%; min-width: 0; }
.hb-link { color: #fff; text-decoration: none; font-weight: 800; text-transform: uppercase; font-size: clamp(.74rem, 3.5vw, 1.15rem); line-height: 1.15; letter-spacing: .3px; }
.hb-link:hover { color: var(--brand-soft); }
/* Logo circular, centrado sobre la barra (sobresale apenas a las franjas rojas) */
.hb-center { position: relative; display: block; width: var(--logo); height: var(--logo); text-decoration: none; justify-self: center; }
.hb-logo-wrap { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #fff; border: 3px solid var(--brand); box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.hb-logo { display: block; width: 100%; height: 100%; object-fit: cover; }
.hb-title { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; padding: 8px; background: var(--brand); color: var(--on-brand); font-weight: 900; text-transform: uppercase; text-align: center; line-height: 1.05; font-size: .72rem; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); overflow: hidden; }
.hb-badge { position: absolute; top: 0; right: -6px; line-height: 0; }
.hb-badge .ico { width: 28px; height: 28px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4)); }
.hb-menu { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 10px; width: 32px; height: 32px; font-size: 1rem; cursor: pointer; z-index: 1; }
.hbar:has(.hb-menu) .hb-side:first-of-type { padding-left: 30px; }
.hbar .classic-menu { background: var(--brand); padding: 8px 0 0; margin-top: 0; }
.hbar .classic-menu a { color: var(--on-brand); text-decoration: none; }
@media (min-width: 760px) { .hbar { --bar-h: 84px; --logo: 100px; } .hb-title { font-size: .85rem; } .hb-badge .ico { width: 32px; height: 32px; } }

/* Foto de la rifa completa, sin recortar */
.full-img { display: block; width: 100%; height: auto; }
.raffle-card .full-img { border-radius: var(--radius) var(--radius) 0 0; }
.hero .img.has-photo { aspect-ratio: auto; background: none; display: block; overflow: hidden; align-self: start; }
.hero .img.has-photo .full-img { border-radius: var(--radius); }

/* Logos SVG */
.ico { width: 1.25em; height: 1.25em; vertical-align: -.28em; display: inline-block; flex: none; }
.drawer-head .ico { width: 20px; height: 20px; }

/* ---------- IP y bloqueos (panel) ---------- */
.ip-tag { margin-top: 3px; border: 0; background: #eef0f4; color: var(--muted); font: inherit; font-size: .72rem; padding: 2px 7px; border-radius: 999px; cursor: pointer; }
.ip-tag.many { background: var(--warn-soft); color: var(--warn); font-weight: 700; }
/* Apartados: en computadora tabla; en celular cada apartado es una TARJETA */
.m-only { display: none; }
@media (max-width: 760px) {
  .orders-table thead { display: none; }
  .orders-table, .orders-table tbody { display: block; }
  .orders-table tr {
    display: grid; grid-template-columns: 34px 1fr auto;
    grid-template-areas: "pick client status" "pick nums total" "pick date folio" "act act act";
    gap: 4px 10px; align-items: center;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(20, 20, 40, .05);
  }
  .orders-table td { display: block; padding: 0; border: 0; }
  .orders-table tr.picked { border-color: var(--brand); background: var(--brand-soft); }
  .orders-table tr.picked td { background: transparent; }
  .orders-table td.empty { grid-column: 1 / -1; }
  .c-pick { grid-area: pick; align-self: start; padding-top: 2px !important; }
  .c-client { grid-area: client; min-width: 0; }
  .m-name { font-size: 1.05rem; }
  .c-status { grid-area: status; text-align: right; }
  .c-nums { grid-area: nums; }
  .c-nums .nums { font-weight: 800; font-size: 1.05rem; word-break: break-word; }
  .c-total { grid-area: total; text-align: right; font-weight: 800; font-size: 1.05rem; }
  .c-date { grid-area: date; color: var(--muted); }
  .c-folio { grid-area: folio; text-align: right; font-size: .8rem; }
  .m-only { display: inline; }
  .c-act { grid-area: act; border-top: 1px solid var(--line) !important; padding-top: 10px !important; margin-top: 4px; }
  .c-act .actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .c-act .actions .btn { width: 100%; padding: 10px 6px; font-size: .9rem; }
  .table-wrap { overflow: visible; }
}
/* Selección de varios apartados */
input.pick { width: 22px; height: 22px; accent-color: var(--brand); cursor: pointer; }
tr.picked td { background: var(--brand-soft); }
.pick-bar { position: fixed; left: 8px; right: 8px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 40; background: #111; color: #fff;
  border-radius: 14px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3); max-width: 900px; margin: 0 auto; }
.pick-bar .muted { color: #bbb; }
body.has-pick main { padding-bottom: 170px; }
.pick-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pick-actions .btn.ghost { color: #fff; border-color: #555; }
.modal .check { margin-bottom: 8px; font-weight: 500; }

.demo-banner { background: var(--warn-soft); color: #7c4a03; padding: 8px 16px; font-size: .85rem; text-align: center; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
