/* ============================================================
   RIFAS COROZAL — Casino Theme
   ============================================================ */

:root {
  --gold:        #ffd700;
  --gold-dk:     #c9a227;
  --gold-lt:     #ffe566;
  --gold-glow:   rgba(255,215,0,.35);
  --red:         #c0392b;
  --green-felt:  #08100a;

  /* Legacy aliases */
  --primary:     #ffd700;
  --primary-dk:  #c9a227;
  --primary-lt:  rgba(255,215,0,.12);
  --success:     #27ae60;
  --danger:      #e74c3c;
  --warning:     #f39c12;

  /* Backgrounds */
  --bg:    #05050a;
  --bg2:   #0b0b16;
  --bg3:   #0e0e1e;

  /* Cards */
  --card:  #0f0f1e;
  --card2: #141428;

  /* Borders */
  --border:    rgba(255,215,0,.18);
  --border-dk: rgba(255,215,0,.07);

  /* Text */
  --text:       #f2e8d0;
  --text-muted: #7a6a4a;

  --radius: 12px;
  --shadow: 0 8px 40px rgba(0,0,0,.7);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -300% center; }
  100% { background-position:  300% center; }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255,215,0,.3), 0 4px 15px rgba(255,165,0,.3); }
  50%       { box-shadow: 0 0 35px rgba(255,215,0,.6), 0 6px 25px rgba(255,165,0,.5), 0 0 70px rgba(255,215,0,.2); }
}
@keyframes float-suit {
  0%, 100% { transform: translateY(0) rotate(0deg);   opacity: .07; }
  33%       { transform: translateY(-18px) rotate(9deg);  opacity: .1; }
  66%       { transform: translateY(9px)  rotate(-5deg); opacity: .05; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes chip-pop {
  0%   { transform: scale(1.08); }
  30%  { transform: scale(1.22) rotate(-6deg); }
  65%  { transform: scale(0.97) rotate(3deg); }
  100% { transform: scale(1.08); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes border-glow {
  0%, 100% { border-color: rgba(255,215,0,.25); }
  50%       { border-color: rgba(255,215,0,.55); }
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: linear-gradient(90deg, #03030c 0%, #09091a 50%, #03030c 100%);
  border-bottom: 2px solid rgba(255,215,0,.28);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 30px rgba(0,0,0,.9), 0 0 80px rgba(255,215,0,.04);
}
.navbar::after {
  content: '♠  ♥  ♦  ♣';
  position: absolute;
  right: 5rem;
  font-size: .7rem;
  letter-spacing: .4em;
  color: rgba(255,215,0,.12);
  pointer-events: none;
}
.navbar-brand {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: .04em;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: linear-gradient(90deg, #ffe566 0%, #ffd700 30%, #ff8c00 60%, #ffd700 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
  filter: drop-shadow(0 0 10px rgba(255,215,0,.35));
}
.navbar-links { display: flex; gap: 1.2rem; align-items: center; }
.navbar-links a {
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .03em;
  transition: color .2s;
}
.navbar-links a:hover { color: var(--gold); text-decoration: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container    { max-width: 1200px; margin: 0 auto; padding: 0 1.2rem; }
.container-sm { max-width: 900px;  margin: 0 auto; padding: 0 1.2rem; }

/* ============================================================
   HERO — Casino
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #06060f 0%, #0a0a1c 45%, #070710 100%);
  border-bottom: 2px solid rgba(255,215,0,.18);
  padding: 4.5rem 1.5rem 3.5rem;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 65%, rgba(192,57,43,.13) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 35%, rgba(255,215,0,.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(26,92,56,.1) 0%, transparent 45%);
  pointer-events: none;
}
/* Floating casino symbols */
.hero-suit {
  position: absolute;
  color: #ffd700;
  opacity: .07;
  animation: float-suit 10s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
.hero-suit.s1 { font-size: 4.5rem; top: 8%;   left: 4%;   animation-delay: 0s;   }
.hero-suit.s2 { font-size: 3.5rem; top: 18%;  right: 6%;  animation-delay: 2s;   color: #c0392b; }
.hero-suit.s3 { font-size: 3rem;   bottom:20%;left: 7%;   animation-delay: 4s;   color: #c0392b; }
.hero-suit.s4 { font-size: 4rem;   bottom:12%;right: 5%;  animation-delay: 6s;   }
.hero-suit.s5 { font-size: 2.5rem; top: 48%;  left: 2%;   animation-delay: 1s;   }
.hero-suit.s6 { font-size: 5.5rem; top: 30%;  right: 2%;  animation-delay: 3s;   opacity: .04; font-weight: 900; }
.hero-suit.s7 { font-size: 2rem;   top: 65%;  left: 18%;  animation-delay: 5s;   }
.hero-suit.s8 { font-size: 3rem;   top: 22%;  left: 45%;  animation-delay: 7.5s; opacity: .04; }

.hero-content { position: relative; z-index: 1; }

.hero .badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(255,215,0,.14), rgba(255,140,0,.09));
  border: 1px solid rgba(255,215,0,.38);
  color: var(--gold);
  padding: .32rem 1.1rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1.1rem;
  box-shadow: 0 0 18px rgba(255,215,0,.1);
}
.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 800;
  letter-spacing: .04em;
  margin-bottom: .6rem;
  line-height: 1.1;
  text-transform: uppercase;
}
.gold-text {
  background: linear-gradient(135deg, #ffe566 0%, #ffd700 35%, #ff8c00 65%, #ffd700 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 1.6rem;
}
.hero-stats {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .3rem 1rem;
  background: rgba(255,215,0,.03);
  transition: border-color .2s;
}
.hero-stat:hover { border-color: rgba(255,215,0,.4); color: var(--gold); }

/* ============================================================
   SORTEOS GRID
   ============================================================ */
.sorteos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 1.6rem;
  padding: 2rem 0;
}

.sorteo-card {
  background: linear-gradient(150deg, #0f0f22 0%, #0b0b16 100%);
  border: 1px solid rgba(255,215,0,.2);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
  position: relative;
}
.sorteo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255,215,0,.025), transparent 55%);
  pointer-events: none;
  border-radius: inherit;
}
.sorteo-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(255,215,0,.5);
  box-shadow:
    0 24px 55px rgba(0,0,0,.75),
    0 0 40px rgba(255,215,0,.13),
    0 0 80px rgba(255,215,0,.05);
}
.sorteo-card-img {
  height: 185px;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(255,215,0,.015) 8px, rgba(255,215,0,.015) 9px),
    linear-gradient(135deg, #1a0600 0%, #0c0c1e 50%, #1a1400 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.8rem;
  overflow: hidden;
  position: relative;
}
.sorteo-card-img::after {
  content: '♠ ♥ ♦ ♣';
  position: absolute;
  bottom: .7rem; right: .8rem;
  font-size: .85rem;
  opacity: .18;
  letter-spacing: .35em;
  color: #ffd700;
}
.sorteo-card-img img { width: 100%; height: 100%; object-fit: cover; }

.sorteo-card-body { padding: 1.25rem; }
.sorteo-card-titulo { font-weight: 700; font-size: 1rem; margin-bottom: .5rem; color: var(--text); }
.sorteo-card-meta { color: var(--text-muted); font-size: .82rem; margin-bottom: .7rem; }
.sorteo-card-precio {
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: .85rem;
  text-shadow: 0 0 14px rgba(255,215,0,.22);
}

.barra-progreso-wrap { margin-bottom: .9rem; }
.barra-progreso-label {
  display: flex;
  justify-content: space-between;
  font-size: .77rem;
  color: var(--text-muted);
  margin-bottom: .3rem;
}
.barra-progreso {
  height: 9px;
  background: rgba(255,215,0,.07);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,215,0,.1);
}
.barra-progreso-fill {
  height: 100%;
  background: linear-gradient(90deg, #c9a227, #ffd700, #ff8c00, #ffe566, #ffd700);
  background-size: 400% auto;
  border-radius: 999px;
  animation: shimmer 2.5s linear infinite;
  transition: width .6s ease;
  box-shadow: 0 0 10px rgba(255,215,0,.45), 0 0 20px rgba(255,215,0,.15);
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .6rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
  text-decoration: none !important;
  letter-spacing: .025em;
  position: relative;
}
.btn-primary {
  background: linear-gradient(135deg, #ffe566 0%, #ffd700 30%, #ff8c00 65%, #ffd700 100%);
  background-size: 300% auto;
  color: #000 !important;
  font-weight: 800;
  animation: shimmer 2.5s linear infinite, glow-pulse 2s ease-in-out infinite;
  text-shadow: none;
  border-radius: 11px;
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
}
.btn-success {
  background: linear-gradient(135deg, #1a6b3c, #27ae60);
  color: #fff !important;
}
.btn-success:hover { background: linear-gradient(135deg, #27ae60, #2ecc71); transform: translateY(-1px); }
.btn-danger {
  background: linear-gradient(135deg, #7b241c, #c0392b);
  color: #fff !important;
}
.btn-danger:hover { background: linear-gradient(135deg, #c0392b, #e74c3c); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border: 1.5px solid rgba(255,215,0,.28);
  color: var(--text-muted);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-block  { width: 100%; justify-content: center; }
.btn-sm     { padding: .35rem .85rem; font-size: .82rem; }
.btn:disabled { opacity: .38; cursor: not-allowed; animation: none; }

/* ============================================================
   PÁGINA SORTEO
   ============================================================ */
.sorteo-header {
  background: linear-gradient(160deg, #06061a, #0a0a18);
  border-bottom: 2px solid rgba(255,215,0,.14);
  padding: 1.5rem;
}
.sorteo-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.sorteo-banner {
  width: 180px; min-width: 140px; height: 140px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a0600, #0c0c1e, #1a1400);
  border: 2px solid rgba(255,215,0,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(255,215,0,.1);
}
.sorteo-banner img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
.sorteo-info { flex: 1; min-width: 200px; }
.sorteo-info h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: .3rem; color: var(--text); }
.sorteo-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .4rem .8rem;
  margin-top: .6rem;
}
.sorteo-info-item { font-size: .82rem; color: var(--text-muted); }
.sorteo-info-item strong { color: var(--text); font-weight: 600; display: block; }

/* ---- HERRAMIENTAS ---- */
.herramientas {
  max-width: 1000px;
  margin: 1.2rem auto;
  padding: 0 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
}
.herramientas input[type=text],
.herramientas select {
  padding: .52rem .9rem;
  border-radius: 8px;
  border: 1.5px solid rgba(255,215,0,.2);
  background: var(--card);
  color: var(--text);
  font-size: .88rem;
  font-family: inherit;
  transition: all .2s;
}
.herramientas input[type=text]:focus,
.herramientas select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255,215,0,.1);
}

/* ============================================================
   GRILLA DE NÚMEROS — CASINO CHIPS
   ============================================================ */
.grilla-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: .8rem 1.2rem 135px;
}
.grilla-nums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 6px;
  /* Casino felt table */
  background:
    radial-gradient(ellipse at 50% 50%, rgba(18,55,22,.35) 0%, transparent 72%),
    repeating-linear-gradient(0deg, transparent, transparent 4px, rgba(255,255,255,.007) 4px, rgba(255,255,255,.007) 8px),
    repeating-linear-gradient(90deg, transparent, transparent 4px, rgba(255,255,255,.007) 4px, rgba(255,255,255,.007) 8px),
    #060e07;
  border: 1px solid rgba(255,215,0,.12);
  border-radius: 14px;
  padding: 1.1rem;
  box-shadow:
    inset 0 3px 25px rgba(0,0,0,.6),
    inset 0 0 60px rgba(0,0,0,.3),
    0 0 40px rgba(0,0,0,.4);
}

/* Each number = casino chip */
.num-btn {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2.5px solid rgba(255,215,0,.38);
  background: radial-gradient(circle at 38% 30%, #20203a, #0d0d1e);
  color: rgba(255,215,0,.72);
  font-weight: 800;
  font-size: .77rem;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, color .12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    inset 0 -1px 0 rgba(0,0,0,.35),
    0 2px 6px rgba(0,0,0,.65);
}
.num-btn:hover:not(.vendido) {
  border-color: #ffd700;
  color: #ffd700;
  background: radial-gradient(circle at 38% 30%, #28283e, #121228);
  box-shadow:
    0 0 16px rgba(255,215,0,.55),
    0 0 32px rgba(255,215,0,.2),
    inset 0 1px 0 rgba(255,255,255,.12),
    0 3px 10px rgba(0,0,0,.7);
  transform: scale(1.14);
  z-index: 1;
}
.num-btn.seleccionado {
  background: radial-gradient(circle at 38% 30%, #ffe566, #ffd700, #c9a227);
  border-color: rgba(255,255,255,.65);
  color: #000 !important;
  font-weight: 900;
  box-shadow:
    0 0 22px rgba(255,215,0,.85),
    0 0 45px rgba(255,215,0,.45),
    0 0 80px rgba(255,215,0,.15),
    inset 0 1px 0 rgba(255,255,255,.45);
  transform: scale(1.09);
  animation: chip-pop .32s ease;
  z-index: 1;
}
.num-btn.vendido {
  background: #090909;
  border-color: rgba(110,0,0,.22);
  color: rgba(130,0,0,.22);
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
}

/* Paginación */
.paginacion {
  display: flex;
  gap: .4rem;
  justify-content: center;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.paginacion button {
  padding: .32rem .72rem;
  border-radius: 7px;
  border: 1.5px solid rgba(255,215,0,.18);
  background: var(--card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  font-family: inherit;
  transition: all .15s;
}
.paginacion button.activa {
  background: linear-gradient(135deg, #c9a227, #ffd700);
  border-color: #ffd700;
  color: #000;
  box-shadow: 0 0 12px rgba(255,215,0,.35);
}
.paginacion button:hover:not(.activa) { border-color: var(--gold); color: var(--gold); }

/* ============================================================
   BARRA INFERIOR DE COMPRA
   ============================================================ */
.barra-compra {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(90deg, #03030e 0%, #09091c 50%, #03030e 100%);
  border-top: 2px solid rgba(255,215,0,.32);
  padding: .9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  z-index: 200;
  box-shadow:
    0 -5px 35px rgba(0,0,0,.85),
    0 -1px 0 rgba(255,215,0,.06),
    0 -10px 50px rgba(255,215,0,.04);
}
.barra-compra-info { flex: 1; min-width: 150px; }
.barra-compra-info .label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.barra-compra-info .value {
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255,215,0,.3);
}
.numeros-seleccionados-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  max-width: 420px;
  max-height: 60px;
  overflow-y: auto;
}
.pill {
  background: linear-gradient(135deg, #c9a227, #ffd700);
  color: #000;
  font-size: .73rem;
  font-weight: 800;
  padding: .18rem .52rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 0 7px rgba(255,215,0,.3);
}
.pill:hover { background: linear-gradient(135deg, #7b241c, #c0392b); color: #fff; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(5px);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: linear-gradient(150deg, #10102c, #0c0c1e);
  border: 1px solid rgba(255,215,0,.3);
  border-radius: 22px;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  animation: fadeUp .3s ease;
  box-shadow:
    0 30px 70px rgba(0,0,0,.85),
    0 0 50px rgba(255,215,0,.08),
    inset 0 1px 0 rgba(255,215,0,.12);
}
.modal-close {
  position: absolute;
  top: .9rem; right: 1.1rem;
  font-size: 1.45rem;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  line-height: 1;
  transition: color .2s;
}
.modal-close:hover { color: var(--gold); }
.modal-title {
  font-size: 1.22rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255,215,0,.25);
}

/* ============================================================
   FORMULARIO
   ============================================================ */
.form-grupo { margin-bottom: 1rem; }
.form-grupo label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: .38rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.form-grupo input,
.form-grupo select,
.form-grupo textarea {
  width: 100%;
  padding: .68rem 1rem;
  border-radius: 9px;
  border: 1.5px solid rgba(255,215,0,.15);
  background: rgba(255,215,0,.03);
  color: var(--text);
  font-size: .92rem;
  font-family: inherit;
  transition: all .2s;
}
.form-grupo input:focus,
.form-grupo select:focus,
.form-grupo textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255,215,0,.1);
  background: rgba(255,215,0,.05);
}
.form-grupo textarea { resize: vertical; min-height: 80px; }
.form-grupo select option { background: #0f0f1e; }

/* ============================================================
   TICKET
   ============================================================ */
.ticket-wrap { max-width: 620px; margin: 2rem auto; padding: 0 1rem; }
.ticket-box {
  background: linear-gradient(150deg, #0f0f22, #0b0b18);
  border: 1px solid rgba(255,215,0,.26);
  border-radius: 22px;
  padding: 2rem;
  box-shadow: 0 15px 50px rgba(0,0,0,.6), 0 0 40px rgba(255,215,0,.05);
}
.ticket-header { text-align: center; margin-bottom: 1.5rem; }
.ticket-header h2 { font-size: 1.55rem; font-weight: 800; color: var(--text); }
.ticket-header .codigo {
  color: var(--gold);
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255,215,0,.3);
}
.ticket-numeros { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0; }
.ticket-num {
  background: linear-gradient(135deg, #c9a227, #ffd700);
  color: #000;
  font-weight: 800;
  padding: .32rem .8rem;
  border-radius: 999px;
  font-size: .9rem;
  box-shadow: 0 0 10px rgba(255,215,0,.3);
}
.ticket-fila {
  display: flex;
  justify-content: space-between;
  padding: .6rem 0;
  border-bottom: 1px solid rgba(255,215,0,.08);
  font-size: .9rem;
}
.ticket-fila:last-child { border-bottom: none; }
.ticket-fila .lbl { color: var(--text-muted); }
.ticket-fila .val { font-weight: 700; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse at 18% 75%, rgba(192,57,43,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 82% 25%, rgba(255,215,0,.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 55%, rgba(26,92,56,.07) 0%, transparent 65%),
    var(--bg);
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '♠  ♥  ♦  ♣';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14vw;
  color: rgba(255,215,0,.022);
  pointer-events: none;
  white-space: nowrap;
  font-weight: 900;
  letter-spacing: .4em;
}
.login-box {
  background: linear-gradient(150deg, #10102a, #0c0c1e);
  border: 1px solid rgba(255,215,0,.3);
  border-radius: 22px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow:
    0 30px 70px rgba(0,0,0,.85),
    0 0 60px rgba(255,215,0,.07),
    inset 0 1px 0 rgba(255,215,0,.12);
  position: relative;
  z-index: 1;
  animation: border-glow 3s ease-in-out infinite;
}
.login-box h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--gold);
  text-shadow: 0 0 22px rgba(255,215,0,.3);
}

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 62px);
}
.admin-sidebar {
  width: 225px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #06061a 0%, #050510 100%);
  border-right: 1px solid rgba(255,215,0,.1);
  padding: 1.5rem 0;
  position: sticky;
  top: 62px;
  height: calc(100vh - 62px);
  overflow-y: auto;
}
.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .72rem 1.4rem;
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all .15s;
  border-left: 3px solid transparent;
}
.admin-sidebar-link:hover,
.admin-sidebar-link.activo {
  background: rgba(255,215,0,.07);
  color: var(--gold);
  border-left-color: var(--gold);
}
.admin-sidebar-sep { height: 1px; background: rgba(255,215,0,.07); margin: .5rem 0; }
.admin-container { flex: 1; padding: 2rem 1.5rem; overflow-x: auto; }
.admin-titulo {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text);
  border-bottom: 1px solid rgba(255,215,0,.1);
  padding-bottom: .75rem;
}

/* ---- DASH CARDS ---- */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.dash-card {
  background: linear-gradient(150deg, #0f0f22, #0c0c18);
  border: 1px solid rgba(255,215,0,.14);
  border-radius: var(--radius);
  padding: 1.3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow .2s, border-color .2s;
  box-shadow: inset 0 1px 0 rgba(255,215,0,.04);
}
.dash-card:hover {
  border-color: rgba(255,215,0,.3);
  box-shadow: 0 0 30px rgba(255,215,0,.07);
}
.dash-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.dash-icon.purple { background: rgba(255,215,0,.12); color: var(--gold); }
.dash-icon.green  { background: rgba(39,174,96,.18); color: #2ecc71; }
.dash-icon.orange { background: rgba(255,107,53,.15); color: #ff6b35; }
.dash-icon.red    { background: rgba(192,57,43,.2);  color: #e74c3c; }
.dash-value { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.dash-label {
  font-size: .76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: .1rem;
}

/* ---- TABLA ADMIN ---- */
.tabla-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,215,0,.1);
}
.tabla { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tabla th {
  text-align: left;
  padding: .72rem 1rem;
  background: rgba(255,215,0,.05);
  color: var(--text-muted);
  font-weight: 700;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid rgba(255,215,0,.1);
}
.tabla td {
  padding: .78rem 1rem;
  border-bottom: 1px solid rgba(255,215,0,.05);
  vertical-align: middle;
}
.tabla tr:last-child td { border-bottom: none; }
.tabla tr:hover td { background: rgba(255,215,0,.03); }

/* ---- BADGES ---- */
.badge-estado {
  display: inline-block;
  padding: .2rem .62rem;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-reservado  { background: rgba(243,156,18,.14); color: #f39c12; border: 1px solid rgba(243,156,18,.3); }
.badge-pagado     { background: rgba(39,174,96,.14);  color: #2ecc71; border: 1px solid rgba(39,174,96,.3); }
.badge-cancelado  { background: rgba(192,57,43,.14);  color: #e74c3c; border: 1px solid rgba(192,57,43,.3); }
.badge-activo     { background: rgba(39,174,96,.14);  color: #2ecc71; border: 1px solid rgba(39,174,96,.3); }
.badge-finalizado { background: rgba(120,130,140,.14); color: #95a5a6; border: 1px solid rgba(120,130,140,.3); }
.badge-borrador   { background: rgba(243,156,18,.14); color: #f39c12; border: 1px solid rgba(243,156,18,.3); }

/* ---- TABLERO ADMIN (CHIPS) ---- */
.tablero-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 5px;
  margin-top: 1rem;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(15,45,18,.3) 0%, transparent 70%),
    #060e07;
  border: 1px solid rgba(255,215,0,.1);
  border-radius: 14px;
  padding: .8rem;
}
.num-admin {
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  border: 2px solid transparent;
  transition: transform .12s;
}
.num-admin:hover { transform: scale(1.1); }
.num-admin.libre     { background: rgba(255,215,0,.05); border-color: rgba(255,215,0,.15); color: rgba(255,215,0,.35); }
.num-admin.reservado { background: rgba(243,156,18,.2); border-color: rgba(243,156,18,.5); color: #f39c12; }
.num-admin.pagado    { background: rgba(39,174,96,.22); border-color: rgba(39,174,96,.55); color: #2ecc71; box-shadow: 0 0 9px rgba(39,174,96,.2); }
.num-admin.cancelado { background: rgba(0,0,0,.4); border-color: transparent; color: #2d2d2d; }

/* ---- LEYENDA ---- */
.leyenda { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; font-size: .82rem; color: var(--text-muted); }
.leyenda-item { display: flex; align-items: center; gap: .4rem; }
.leyenda-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid transparent; }

/* ---- ALERTAS ---- */
.alert {
  padding: .82rem 1.1rem;
  border-radius: 10px;
  font-size: .9rem;
  margin-bottom: 1rem;
  font-weight: 500;
}
.alert-success { background: rgba(39,174,96,.1);  border: 1px solid rgba(39,174,96,.3);  color: #2ecc71; }
.alert-danger  { background: rgba(192,57,43,.1);  border: 1px solid rgba(192,57,43,.3);  color: #e74c3c; }
.alert-info    { background: rgba(255,215,0,.07); border: 1px solid rgba(255,215,0,.25); color: var(--gold); }

/* ---- PAGO ---- */
.pago-metodos { display: flex; flex-direction: column; gap: .7rem; margin: 1rem 0; }
.pago-metodo {
  background: rgba(255,215,0,.04);
  border: 1px solid rgba(255,215,0,.14);
  border-radius: 10px;
  padding: .9rem 1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  font-size: .9rem;
  transition: border-color .2s;
}
.pago-metodo:hover { border-color: rgba(255,215,0,.3); }
.pago-metodo-icon { font-size: 1.6rem; }
.pago-metodo-info strong { display: block; font-weight: 700; color: var(--text); }
.pago-metodo-info small { color: var(--text-muted); font-size: .8rem; }

/* ---- ASESORES ---- */
.accesos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.asesor-card {
  background: linear-gradient(150deg, #0f0f22, #0c0c18);
  border: 1px solid rgba(255,215,0,.14);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: border-color .2s;
}
.asesor-card:hover { border-color: rgba(255,215,0,.3); }
.asesor-nombre { font-weight: 700; margin-bottom: .3rem; color: var(--text); }
.asesor-email  { color: var(--text-muted); font-size: .85rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%; height: auto; position: static;
    display: flex; overflow-x: auto; padding: .4rem 0;
    border-right: none; border-bottom: 1px solid rgba(255,215,0,.1);
  }
  .admin-sidebar-link { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .admin-sidebar-link:hover, .admin-sidebar-link.activo {
    border-left: none; border-bottom-color: var(--gold);
  }
  .sorteo-header-inner { flex-direction: column; }
  .barra-compra { flex-direction: column; align-items: stretch; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .hero-stats { gap: .5rem; }
  .hero-suit { display: none; }
}

/* ============================================================
   UTILIDADES
   ============================================================ */
.text-muted      { color: var(--text-muted); }
.text-primary    { color: var(--gold); }
.text-success    { color: #2ecc71; }
.text-danger     { color: #e74c3c; }
.fw-bold         { font-weight: 700; }
.mt-1            { margin-top: .5rem; }
.mt-2            { margin-top: 1rem; }
.mt-3            { margin-top: 1.5rem; }
.mb-1            { margin-bottom: .5rem; }
.mb-2            { margin-bottom: 1rem; }
.gap-1           { gap: .5rem; }
.flex            { display: flex; }
.items-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap       { flex-wrap: wrap; }
.empty-state     { text-align: center; padding: 3rem; color: var(--text-muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: .8rem; }

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
#theme-toggle {
  position: fixed;
  bottom: 88px;
  right: 16px;
  z-index: 500;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,215,0,.4);
  background: var(--card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.5), 0 0 16px rgba(255,215,0,.1);
  transition: all .2s ease;
  line-height: 1;
  padding: 0;
}
#theme-toggle:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 22px rgba(0,0,0,.6), 0 0 24px rgba(255,215,0,.2);
  transform: scale(1.1);
}

/* ============================================================
   LIGHT THEME — Cream Casino
   ============================================================ */
[data-theme="light"] {
  --bg:        #f2e8cc;
  --bg2:       #e8ddb8;
  --bg3:       #dfd3a8;
  --card:      #fffdf0;
  --card2:     #f7f0d8;
  --border:    rgba(160,115,0,.3);
  --border-dk: rgba(160,115,0,.1);
  --text:       #1a1005;
  --text-muted: #7a5a20;
}

[data-theme="light"] body {
  background: var(--bg);
  background-image: none;
}

[data-theme="light"] a { color: #8b6010; }

/* Navbar stays dark for brand contrast */
[data-theme="light"] .navbar {
  background: linear-gradient(90deg, #0f0800 0%, #1e1000 50%, #0f0800 100%);
}

/* Hero */
[data-theme="light"] .hero {
  background: linear-gradient(160deg, #f2e8cc 0%, #e8ddb8 45%, #ece0b8 100%);
  border-bottom-color: rgba(160,115,0,.3);
}
[data-theme="light"] .hero::before {
  background:
    radial-gradient(ellipse at 20% 65%, rgba(192,57,43,.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 35%, rgba(180,130,0,.1) 0%, transparent 50%);
}
[data-theme="light"] .hero p { color: #7a5a20; }
[data-theme="light"] .hero-stat { color: #7a5a20; border-color: rgba(160,115,0,.3); }
[data-theme="light"] .hero-stat:hover { color: #8b6010; }
[data-theme="light"] .hero-suit { color: rgba(100,70,0,.12); }
[data-theme="light"] .hero-suit.s2,
[data-theme="light"] .hero-suit.s3 { color: rgba(160,30,10,.1); }

/* Cards */
[data-theme="light"] .sorteo-card {
  background: #fffdf0;
  border-color: rgba(160,115,0,.25);
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
[data-theme="light"] .sorteo-card:hover {
  border-color: rgba(160,115,0,.55);
  box-shadow: 0 20px 45px rgba(0,0,0,.14), 0 0 30px rgba(160,115,0,.12);
}
[data-theme="light"] .sorteo-card-titulo { color: #1a1005; }
[data-theme="light"] .sorteo-card-meta { color: #7a5a20; }
[data-theme="light"] .barra-progreso { background: rgba(160,115,0,.12); border-color: rgba(160,115,0,.15); }

/* Number grid — keep felt green in both themes */
[data-theme="light"] .grilla-nums {
  border-color: rgba(160,115,0,.2);
}
[data-theme="light"] .num-btn {
  background: radial-gradient(circle at 38% 30%, #fff8e8, #f5eccf);
  border-color: rgba(180,125,0,.5);
  color: rgba(120,80,0,.75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 6px rgba(0,0,0,.15);
}
[data-theme="light"] .num-btn:hover:not(.vendido) {
  border-color: #c9a227;
  color: #8b6010;
  background: radial-gradient(circle at 38% 30%, #fff, #f5eccf);
  box-shadow: 0 0 16px rgba(180,125,0,.4), inset 0 1px 0 rgba(255,255,255,.9);
}
[data-theme="light"] .num-btn.vendido {
  background: #e8ddb8;
  border-color: rgba(160,30,10,.18);
  color: rgba(160,30,10,.18);
}

/* Pagination */
[data-theme="light"] .paginacion button {
  background: #fffdf0;
  border-color: rgba(160,115,0,.25);
  color: #7a5a20;
}
[data-theme="light"] .paginacion button.activa { background: linear-gradient(135deg,#c9a227,#ffd700); color: #000; }

/* Bottom buy bar stays dark */
[data-theme="light"] .barra-compra {
  background: linear-gradient(90deg, #0f0800 0%, #1e1000 50%, #0f0800 100%);
}

/* Sorteo header */
[data-theme="light"] .sorteo-header { background: #ece0b8; border-bottom-color: rgba(160,115,0,.2); }
[data-theme="light"] .sorteo-banner { background: #dfd3a8; border-color: rgba(160,115,0,.35); }
[data-theme="light"] .sorteo-info h1 { color: #1a1005; }
[data-theme="light"] .sorteo-info-item { color: #7a5a20; }
[data-theme="light"] .sorteo-info-item strong { color: #1a1005; }

/* Herramientas search */
[data-theme="light"] .herramientas input[type=text],
[data-theme="light"] .herramientas select {
  background: #fffdf0;
  border-color: rgba(160,115,0,.28);
  color: #1a1005;
}

/* Admin layout */
[data-theme="light"] .admin-layout { background: var(--bg); }
[data-theme="light"] .admin-sidebar {
  background: linear-gradient(180deg, #160c00, #0f0800);
  border-right-color: rgba(255,215,0,.12);
}
[data-theme="light"] .admin-container { background: var(--bg); }
[data-theme="light"] .admin-titulo { color: #1a1005; border-bottom-color: rgba(160,115,0,.15); }
[data-theme="light"] .dash-card {
  background: #fffdf0;
  border-color: rgba(160,115,0,.2);
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
[data-theme="light"] .dash-value { color: #1a1005; }
[data-theme="light"] .tabla-wrap { border-color: rgba(160,115,0,.2); }
[data-theme="light"] .tabla th { background: rgba(160,115,0,.07); color: #7a5a20; border-bottom-color: rgba(160,115,0,.15); }
[data-theme="light"] .tabla td { border-color: rgba(160,115,0,.08); color: #1a1005; }
[data-theme="light"] .tabla tr:hover td { background: rgba(160,115,0,.04); }

/* Modal */
[data-theme="light"] .modal-overlay { background: rgba(0,0,0,.7); }
[data-theme="light"] .modal-box {
  background: #fffdf0;
  border-color: rgba(160,115,0,.35);
  box-shadow: 0 25px 60px rgba(0,0,0,.2);
}
[data-theme="light"] .modal-title { color: #8b6010; }
[data-theme="light"] .modal-close { color: #7a5a20; }
[data-theme="light"] .modal-close:hover { color: #8b6010; }

/* Forms */
[data-theme="light"] .form-grupo label { color: #7a5a20; }
[data-theme="light"] .form-grupo input,
[data-theme="light"] .form-grupo select,
[data-theme="light"] .form-grupo textarea {
  background: #fff;
  border-color: rgba(160,115,0,.25);
  color: #1a1005;
}
[data-theme="light"] .form-grupo input:focus,
[data-theme="light"] .form-grupo select:focus,
[data-theme="light"] .form-grupo textarea:focus {
  border-color: #c9a227;
  background: #fffdf0;
  box-shadow: 0 0 0 3px rgba(160,115,0,.1);
}
[data-theme="light"] .form-grupo select option { background: #fffdf0; color: #1a1005; }

/* Login */
[data-theme="light"] .login-wrap {
  background:
    radial-gradient(ellipse at 18% 75%, rgba(192,57,43,.07) 0%, transparent 50%),
    radial-gradient(ellipse at 82% 25%, rgba(160,115,0,.1) 0%, transparent 50%),
    var(--bg);
}
[data-theme="light"] .login-wrap::before { color: rgba(100,70,0,.025); }
[data-theme="light"] .login-box {
  background: #fffdf0;
  border-color: rgba(160,115,0,.38);
  box-shadow: 0 20px 50px rgba(0,0,0,.12), 0 0 40px rgba(160,115,0,.08);
}
[data-theme="light"] .login-box h2 { color: #8b6010; text-shadow: none; }

/* Ticket */
[data-theme="light"] .ticket-box {
  background: #fffdf0;
  border-color: rgba(160,115,0,.3);
}
[data-theme="light"] .ticket-fila { border-bottom-color: rgba(160,115,0,.12); }
[data-theme="light"] .ticket-fila .lbl { color: #7a5a20; }

/* Asesores */
[data-theme="light"] .asesor-card { background: #fffdf0; border-color: rgba(160,115,0,.2); }
[data-theme="light"] .asesor-nombre { color: #1a1005; }
[data-theme="light"] .asesor-email { color: #7a5a20; }

/* Pago */
[data-theme="light"] .pago-metodo { background: rgba(160,115,0,.05); border-color: rgba(160,115,0,.2); }
[data-theme="light"] .pago-metodo-info strong { color: #1a1005; }
[data-theme="light"] .pago-metodo-info small { color: #7a5a20; }

/* Alerts */
[data-theme="light"] .alert-success { background: rgba(39,174,96,.08); color: #1a6b3c; border-color: rgba(39,174,96,.3); }
[data-theme="light"] .alert-danger  { background: rgba(192,57,43,.08); color: #7b1a10; border-color: rgba(192,57,43,.3); }
[data-theme="light"] .alert-info    { background: rgba(160,115,0,.08); color: #7a5a20; border-color: rgba(160,115,0,.28); }

/* Theme toggle in light mode */
[data-theme="light"] #theme-toggle {
  background: #fffdf0;
  border-color: rgba(160,115,0,.4);
  box-shadow: 0 4px 15px rgba(0,0,0,.15);
}

/* Tablero admin */
[data-theme="light"] .tablero-admin {
  background: radial-gradient(ellipse at 50% 50%, rgba(15,55,18,.4) 0%, transparent 70%), #0a1a0b;
  border-color: rgba(160,115,0,.15);
}

/* Navbar after (suit symbols) */
[data-theme="light"] .navbar::after { color: rgba(255,215,0,.1); }
