/* ═══════════════════════════════════════════════════════════
   PIX MIXSORTE — Sistema de Rifas
   Cores: Azul Royal + Vermelho + Laranja/Fogo + Dourado
   Logo: Galinha Sortuda com Chamas
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  /* ── Cores da Logo ──────────────── */
  --blue:      #2c1fc7;
  --blueD:     #1a0f8a;
  --blueL:     #4a3ae0;
  --blueBg:    #eff0ff;
  --blueBd:    #a5a8f5;

  --red:       #e8192c;
  --redD:      #b50e1e;
  --redL:      #ff3347;
  --redBg:     #fff0f1;
  --redBd:     #ffb3b8;

  --orange:    #ff6b00;
  --orangeL:   #ff8c33;
  --orangeD:   #cc5500;
  --orangeBg:  #fff4ec;
  --orangeBd:  #ffbb88;

  --gold:      #ffc700;
  --goldD:     #e0a800;
  --goldBg:    #fffbec;
  --goldBd:    #ffe066;

  --green:     #00a651;
  --greenD:    #007a3d;
  --greenBg:   #e8fff2;
  --greenBd:   #5dd49a;

  --amber:     #f59e0b;
  --amberBg:   #fffbeb;
  --amberBd:   #fcd34d;

  /* ── Base ──────────────────────── */
  --bg:        #f0f1ff;
  --paper:     #ffffff;
  --card:      #ffffff;
  --line:      #e0e2f5;
  --line2:     #c5c8ef;

  /* ── Ticket Status ─────────────── */
  --tk-free-bg:  #f0f1ff;
  --tk-free-bd:  #9096d4;
  --tk-free-txt: #3d4494;

  --tk-paid-bg:  #00a651;
  --tk-paid-bd:  #007a3d;
  --tk-paid-txt: #fff;

  --tk-res-bg:   #ff6b00;
  --tk-res-bd:   #cc5500;
  --tk-res-txt:  #fff;

  --tk-sel-bg:   #e8192c;
  --tk-sel-bd:   #b50e1e;
  --tk-sel-txt:  #fff;

  /* ── Texto ─────────────────────── */
  --txt:     #0a0c2e;
  --txtM:    #2d3066;
  --txtD:    #6366a8;
  --txtL:    #9fa3d4;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--txt); font-family: 'Nunito', sans-serif; min-height: 100vh; }

::-webkit-scrollbar { width: 6px; background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

.bb { font-family: 'Bebas Neue', sans-serif; letter-spacing: 1.5px; }

/* ── Utilitários ─────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; } .items-center { align-items: center; }
.gap-2{gap:8px} .gap-3{gap:12px} .gap-4{gap:16px}
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.mt-1{margin-top:6px} .mt-2{margin-top:12px} .mt-3{margin-top:20px} .mt-4{margin-top:28px}
.mb-1{margin-bottom:6px} .mb-2{margin-bottom:12px} .mb-3{margin-bottom:20px}
.text-center { text-align: center; }
.w-full { width: 100%; }

/* ── Animações ───────────────────────────────────── */
@keyframes fadeUp   { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
@keyframes zoomIn   { from{opacity:0;transform:scale(.88)} to{opacity:1;transform:scale(1)} }
@keyframes pulse    { 0%,100%{opacity:1} 50%{opacity:.4} }
@keyframes flamePulse { 0%,100%{transform:scaleY(1) scaleX(1)} 50%{transform:scaleY(1.06) scaleX(.97)} }
@keyframes confettifall { from{transform:translateY(-30px) rotate(0);opacity:1} to{transform:translateY(700px) rotate(960deg);opacity:0} }
@keyframes winPop   { 0%{transform:scale(0) rotate(-10deg);opacity:0} 65%{transform:scale(1.1) rotate(2deg)} 100%{transform:scale(1) rotate(0);opacity:1} }
@keyframes slideIn  { from{transform:translateX(110%);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes glow     { 0%,100%{box-shadow:0 0 20px rgba(232,25,44,.4)} 50%{box-shadow:0 0 40px rgba(232,25,44,.8)} }

.anim-up { animation: fadeUp .45s ease both; }

/* ── Botões ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: 'Nunito', sans-serif; font-weight: 900;
  border: none; cursor: pointer; border-radius: 12px;
  padding: 12px 24px; font-size: 15px;
  text-decoration: none; transition: all .18s; white-space: nowrap;
  letter-spacing: .3px;
}

/* Vermelho — ação principal */
.btn-red {
  background: linear-gradient(135deg, var(--redD), var(--red), var(--redL));
  color: #fff; box-shadow: 0 4px 18px rgba(232,25,44,.45);
  border: 2px solid var(--redD);
}
.btn-red:hover { filter:brightness(1.1); transform:translateY(-2px); box-shadow:0 8px 28px rgba(232,25,44,.55); }
.btn-red:active { transform:translateY(0); }
.btn-red:disabled { opacity:.4; cursor:not-allowed; transform:none; box-shadow:none; filter:none; }

/* Azul */
.btn-blue {
  background: linear-gradient(135deg, var(--blueD), var(--blue), var(--blueL));
  color: #fff; box-shadow: 0 4px 18px rgba(44,31,199,.4);
}
.btn-blue:hover { filter:brightness(1.1); transform:translateY(-2px); }

/* Verde */
.btn-green {
  background: linear-gradient(135deg, var(--greenD), var(--green));
  color: #fff; box-shadow: 0 4px 14px rgba(0,166,81,.4);
}
.btn-green:hover { filter:brightness(1.1); transform:translateY(-1px); }

/* Ghost */
.btn-ghost {
  background: transparent; color: var(--txtM);
  border: 2px solid var(--line2);
}
.btn-ghost:hover { border-color: var(--red); color: var(--red); background: var(--redBg); }

.btn-danger  { background: var(--redBg);   color: var(--red);   border: 2px solid var(--redBd); }
.btn-success { background: var(--greenBg); color: var(--green); border: 2px solid var(--greenBd); }
.btn-success:hover { background: #c6f6e0; }

.btn-sm  { padding: 7px 16px; font-size: 13px; border-radius: 10px; }
.btn-lg  { padding: 16px 36px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }

/* ── Inputs ──────────────────────────────────────── */
.inp {
  width: 100%; background: var(--paper);
  border: 2px solid var(--line2);
  border-radius: 12px; color: var(--txt);
  font-family: 'Nunito', sans-serif; font-size: 15px;
  padding: 13px 17px; outline: none; transition: all .2s;
}
.inp:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(232,25,44,.1); }
.inp::placeholder { color: var(--txtL); }
.inp option { background: #fff; }

label.lbl {
  display: block; font-size: 12px; font-weight: 800;
  color: var(--txtD); letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: 6px;
}
.form-group { margin-bottom: 16px; }
.form-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(44,31,199,.06);
}
.card-hover { transition: transform .25s, box-shadow .25s, border-color .25s; cursor: pointer; }
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(232,25,44,.2);
  border-color: var(--red);
}

/* ── Progress ────────────────────────────────────── */
.progress { height: 14px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--redD), var(--red), var(--orange), var(--gold));
  transition: width 1s cubic-bezier(.16,.84,.44,1);
  position: relative;
}
.progress-fill::after {
  content:''; position:absolute; top:2px; right:4px; bottom:2px; width:20px;
  background: rgba(255,255,255,.4); border-radius: 99px;
}

/* ── Pills ───────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 13px; border-radius: 99px;
  font-size: 12px; font-weight: 800;
  border: 2px solid transparent;
}
.pill-red    { background: var(--redBg);    color: var(--red);    border-color: var(--redBd); }
.pill-green  { background: var(--greenBg);  color: var(--green);  border-color: var(--greenBd); }
.pill-amber  { background: var(--amberBg);  color: var(--amber);  border-color: var(--amberBd); }
.pill-blue   { background: var(--blueBg);   color: var(--blue);   border-color: var(--blueBd); }
.pill-gold   { background: var(--goldBg);   color: var(--goldD);  border-color: var(--goldBd); }
.pill-orange { background: var(--orangeBg); color: var(--orange); border-color: var(--orangeBd); }

/* ── Alerts ──────────────────────────────────────── */
.alert {
  border-radius: 14px; padding: 14px 20px;
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; animation: fadeUp .3s ease;
  border: 2px solid transparent;
}
.alert-success { background: var(--greenBg); border-color: var(--greenBd); color: #064e2c; }
.alert-error   { background: var(--redBg);   border-color: var(--redBd);   color: #7a0c15; }
.alert-warning { background: var(--amberBg); border-color: var(--amberBd); color: #7a4a00; }

/* ── Banners ─────────────────────────────────────── */
.banner-container { margin: 0; border-radius: 0; overflow: hidden; position: relative; width: 100%; }
.banner-slider { display: flex; transition: transform .5s ease-in-out; width: 100%; }
.banner-item { 
  min-width: 100%; 
  width: 100%; 
  height: clamp(200px, 40vw, 480px); 
  display: block; 
  overflow: hidden;
}
.banner-img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
}
.banner-nav { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.3); cursor: pointer; border: 1px solid rgba(255,255,255,.5); transition: all .2s; }
.banner-dot.active { background: var(--gold); border-color: var(--gold); width: 20px; border-radius: 4px; }

/* ── NAV ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, var(--blueD) 0%, var(--blue) 60%, var(--blueL) 100%);
  height: 68px; display: flex; align-items: center;
  padding: 0 24px; justify-content: space-between;
  box-shadow: 0 4px 20px rgba(26,15,138,.5);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-img {
  height: 54px; width: 54px;
  object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}
.nav-brand-name {
  font-family: 'Bebas Neue'; font-size: 26px; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  line-height: 1;
}
.nav-brand-sub { font-size: 10px; color: var(--gold); font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }

/* ── HERO ────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 0;
  background: linear-gradient(160deg, var(--blueD) 0%, var(--blue) 45%, #3b1dd4 70%, #1a0a8a 100%);
}
.hero-glow {
  position: absolute; top: -100px; right: -100px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,25,44,.3) 0%, transparent 70%);
  pointer-events: none; animation: flamePulse 3s ease-in-out infinite;
}
.hero-glow2 {
  position: absolute; bottom: -80px; left: -80px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,0,.2) 0%, transparent 70%);
  pointer-events: none;
}

/* ── TICKET GRID ─────────────────────────────────── */
.ticket-grid { display: grid; gap: 7px; }
.ticket-grid.cols-6  { grid-template-columns: repeat(6,  1fr); }
.ticket-grid.cols-10 { grid-template-columns: repeat(10, 1fr); }

.ticket {
  aspect-ratio: 1; border-radius: 10px;
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 900;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; transition: transform .12s, box-shadow .12s;
  user-select: none; border: 2px solid transparent;
  line-height: 1.1; gap: 2px;
}
.ticket .t-num { font-size: 14px; font-weight: 900; line-height: 1; }
.ticket .t-lbl { font-size: 8px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; opacity: .85; }

.ticket:hover:not(.t-paid):not(.t-res) { transform: scale(1.18); z-index: 5; }

.t-free {
  background: var(--tk-free-bg); color: var(--tk-free-txt);
  border-color: var(--tk-free-bd);
}
.t-free:hover { background: #dfe1ff; color: #1a1566; border-color: var(--blue); transform: scale(1.18); }

.t-paid {
  background: var(--tk-paid-bg); color: var(--tk-paid-txt);
  border-color: var(--tk-paid-bd);
  box-shadow: 0 2px 10px rgba(0,166,81,.45); cursor: default;
}
.t-res {
  background: var(--tk-res-bg); color: var(--tk-res-txt);
  border-color: var(--tk-res-bd);
  box-shadow: 0 2px 10px rgba(255,107,0,.45); cursor: default;
}
.t-sel {
  background: var(--tk-sel-bg); color: var(--tk-sel-txt);
  border-color: var(--tk-sel-bd);
  box-shadow: 0 0 0 3px rgba(232,25,44,.3), 0 4px 16px rgba(232,25,44,.5);
  transform: scale(1.15); z-index: 5;
}

/* ── CHECKOUT ────────────────────────────────────── */
.checkout-wrap {
  background: linear-gradient(135deg, var(--redBg), #fff8f8);
  border: 3px solid var(--red);
  border-radius: 20px; padding: 24px;
  animation: fadeUp .3s ease;
  box-shadow: 0 6px 28px rgba(232,25,44,.18);
  margin-top: 20px;
}

/* ── TABLE ───────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 12px 16px; text-align: left;
  font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  color: var(--txtD); border-bottom: 3px solid var(--line);
  background: var(--bg); white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.table tbody tr:hover { background: var(--redBg); }

/* ── ADMIN SIDEBAR ───────────────────────────────── */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 250px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--blueD) 0%, var(--blue) 60%, #2416a8 100%);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  box-shadow: 4px 0 20px rgba(26,15,138,.3);
}
.admin-content { flex: 1; min-width: 0; padding: 32px 28px; background: var(--bg); }

.sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo-img { height: 52px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.sidebar-nav  { padding: 14px 10px; flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  color: rgba(255,255,255,.7); font-weight: 700; font-size: 14px;
  text-decoration: none; transition: all .18s; margin-bottom: 4px;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(232,25,44,.35); color: #fff;
  box-shadow: 0 2px 12px rgba(232,25,44,.3);
}
.sidebar-link .icon { font-size: 18px; width: 22px; text-align: center; }
.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: 12px; color: rgba(255,255,255,.55); font-weight: 700;
}

.page-title    { font-family:'Bebas Neue'; font-size:34px; color:var(--txt); margin-bottom:24px; }
.section-title { font-family:'Bebas Neue'; font-size:22px; color:var(--txt); margin-bottom:14px; }

/* ── STAT CARDS ──────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: var(--card); border-radius: 18px;
  padding: 22px 20px; transition: transform .2s, box-shadow .2s;
  box-shadow: 0 2px 12px rgba(44,31,199,.08);
  border: 2px solid var(--line);
  border-left: 5px solid transparent;
}
.stat-card:hover { transform:translateY(-3px); box-shadow:0 10px 30px rgba(44,31,199,.12); }
.stat-icon  { font-size: 28px; margin-bottom: 10px; }
.stat-val   { font-family:'Bebas Neue'; font-size:38px; line-height:1; }
.stat-label { font-size:13px; color:var(--txtD); margin-top:6px; font-weight:700; }

/* ── MODAL ───────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(10,8,46,.7);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  background: var(--paper); border-radius: 24px;
  padding: 34px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  animation: zoomIn .25s ease;
  box-shadow: 0 24px 64px rgba(10,8,46,.4);
  border: 2px solid var(--line);
}

/* ── ROLETA ──────────────────────────────────────── */
#wheel-overlay {
  position: fixed; inset: 0; z-index: 950;
  background: linear-gradient(135deg, var(--blueD) 0%, #0d0880 50%, #1a0a8a 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px;
  animation: zoomIn .3s ease;
}
#wheelCanvas {
  border-radius: 50%; display: block;
  filter: drop-shadow(0 0 30px rgba(232,25,44,.7));
  transition: filter .6s;
}
.winner-card {
  background: linear-gradient(135deg, #fff, var(--goldBg));
  border: 4px solid var(--gold);
  border-radius: 24px; padding: 28px 52px; text-align: center;
  box-shadow: 0 0 60px rgba(255,199,0,.6), 0 0 120px rgba(232,25,44,.3);
  animation: winPop .6s cubic-bezier(.34,1.56,.64,1) both;
}

/* ── TOAST ───────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  border-radius: 14px; padding: 14px 22px;
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 800;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
  animation: slideIn .4s cubic-bezier(.34,1.56,.64,1);
  display: flex; align-items: center; gap: 10px; max-width: 360px;
  border: 2px solid transparent;
}
.toast-success { background: var(--greenBg); border-color: var(--greenBd); color: #064e2c; }
.toast-error   { background: var(--redBg);   border-color: var(--redBd);   color: #7a0c15; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .form-grid     { grid-template-columns: 1fr; }
  .hero          { padding: 44px 16px 36px; }
  .hide-mobile   { display: none !important; }
}
