/* =========================================================
   Super Sorteio Santana — Design System
   Verde · Amarelo · Branco
   ========================================================= */

:root {
  --green-950: #06280a;
  --green-900: #0b3d12;
  --green-800: #0f4d18;
  --green-700: #146624;
  --green-600: #1a7a2c;
  --green-500: #218c38;
  --gold-400: #f5c518;
  --gold-500: #e6b800;
  --gold-600: #c9a000;
  --cream: #f7faf5;
  --white: #ffffff;
  --ink: #132016;
  --muted: #5a6b5e;
  --danger: #c62828;
  --shadow: 0 10px 30px rgba(6, 40, 10, 0.12);
  --shadow-soft: 0 6px 18px rgba(6, 40, 10, 0.08);
  --radius: 18px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Bebas Neue", "Outfit", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(245, 197, 24, 0.12), transparent 28%),
    linear-gradient(180deg, #f3f8f2 0%, var(--cream) 45%, #eef5ec 100%);
  min-height: 100vh;
}

main {
  min-height: calc(100vh - 180px);
}

a {
  color: var(--green-700);
  text-decoration: none;
}

a:hover {
  color: var(--green-900);
}

/* ----- Navbar ----- */
.navbar-santana {
  background: linear-gradient(90deg, var(--green-950), var(--green-800));
  padding: 0.75rem 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.navbar-santana .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.5rem 0.9rem !important;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.navbar-santana .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold-400) !important;
}

.navbar-santana .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.35);
}

.navbar-santana .navbar-toggler-icon {
  filter: invert(1);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e53935, #b71c1c);
  color: white;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(183, 28, 28, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: white;
}

.brand-text strong {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand-text small {
  font-size: 0.68rem;
  opacity: 0.75;
  max-width: 220px;
}

/* ----- Buttons ----- */
.btn-green {
  --bs-btn-bg: var(--green-700);
  --bs-btn-border-color: var(--green-700);
  --bs-btn-hover-bg: var(--green-900);
  --bs-btn-hover-border-color: var(--green-900);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  font-weight: 600;
  border-radius: 12px;
}

.btn-gold {
  --bs-btn-bg: var(--gold-400);
  --bs-btn-border-color: var(--gold-400);
  --bs-btn-hover-bg: var(--gold-500);
  --bs-btn-hover-border-color: var(--gold-500);
  --bs-btn-color: var(--green-950);
  --bs-btn-hover-color: var(--green-950);
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(230, 184, 0, 0.35);
}

/* ----- Hero (desktop padrão) ----- */
.hero-promo {
  position: relative;
  min-height: clamp(520px, 78vh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: white;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center right;
  transform: scale(1.02);
  animation: heroZoom 18s ease-in-out infinite alternate;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(6, 40, 10, 0.92) 0%, rgba(11, 61, 18, 0.78) 48%, rgba(6, 40, 10, 0.35) 100%),
    linear-gradient(0deg, rgba(6, 40, 10, 0.55), transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 0 3rem;
}

.hero-tag {
  display: inline-block;
  background: var(--gold-400);
  color: var(--green-950);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero-title {
  margin: 0 0 1rem;
  line-height: 0.92;
}

.hero-title-super,
.hero-title-santana {
  display: block;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  letter-spacing: 0.04em;
  color: var(--gold-400);
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
}

.hero-title-sorteio {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(3.4rem, 9vw, 6.5rem);
  letter-spacing: 0.06em;
  padding: 0.1em 0.35em;
  margin: 0.15em 0;
  color: #ffe566;
  background: linear-gradient(180deg, #1a5c24, #0b3d12);
  border: 3px solid rgba(245, 197, 24, 0.85);
  border-radius: 18px;
  box-shadow:
    0 0 0 4px rgba(245, 197, 24, 0.15),
    0 12px 30px rgba(0, 0, 0, 0.35),
    inset 0 0 24px rgba(245, 197, 24, 0.12);
  animation: marqueePulse 2.8s ease-in-out infinite;
}

.hero-prize {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.85);
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.prize-card {
  position: relative;
  background: linear-gradient(160deg, rgba(15, 77, 24, 0.95), rgba(6, 40, 10, 0.96));
  border: 1px solid rgba(245, 197, 24, 0.35);
  border-radius: 24px;
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.prize-card-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  top: -50px;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.35), transparent 70%);
  pointer-events: none;
}

.prize-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--gold-400);
  margin-bottom: 0.35rem;
}

.prize-card h2 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.prize-value {
  font-family: var(--display);
  font-size: 3.5rem;
  color: var(--gold-400);
  line-height: 1;
  margin-bottom: 1rem;
}

.prize-total {
  display: inline-block;
  background: var(--danger);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.prize-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

/* ----- Steps ----- */
.steps-bar {
  background: linear-gradient(90deg, var(--green-900), var(--green-700));
  color: white;
  padding: 1.25rem 0;
  box-shadow: 0 8px 24px rgba(6, 40, 10, 0.2);
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem;
  transition: transform 0.2s ease;
}

.step-item:hover {
  transform: translateY(-3px);
}

.step-item i {
  font-size: 1.6rem;
  color: var(--gold-400);
}

/* ----- Metrics / Cards ----- */
.metric-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(20, 102, 36, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.metric-card i {
  font-size: 2rem;
  color: var(--green-700);
  background: rgba(20, 102, 36, 0.1);
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
}

.metric-card-gold i {
  color: var(--gold-600);
  background: rgba(245, 197, 24, 0.18);
}

.metric-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--green-900);
  line-height: 1.1;
}

.metric-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.metrics-hint {
  color: var(--muted);
  font-weight: 500;
}

.panel-card,
.consulta-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(20, 102, 36, 0.08);
}

.consulta-box h2,
.section-head h2 {
  color: var(--green-900);
  font-weight: 800;
}

/* Consulta CPF: no PC botão ao lado; no celular/tablet embaixo */
.consulta-cpf-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.consulta-cpf-row .input-group {
  flex: 1 1 auto;
  min-width: 0;
}

.consulta-cpf-row > .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* No celular/tablet (e Safari em modo desktop), botão fica embaixo */
@media (max-width: 1199.98px) {
  .consulta-cpf-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }

  .consulta-cpf-row > .btn {
    width: 100% !important;
    flex: 0 0 auto !important;
  }
}

.section-head {
  margin-bottom: 1.25rem;
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
}

.table-santana {
  margin: 0;
}

.table-santana thead {
  background: linear-gradient(90deg, var(--green-900), var(--green-700));
  color: white;
}

.table-santana thead th {
  font-weight: 600;
  border: 0;
  padding: 0.95rem 1rem;
  white-space: nowrap;
}

.table-santana tbody td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  border-color: rgba(20, 102, 36, 0.08);
}

.table-santana tbody tr {
  transition: background 0.15s ease;
}

.table-santana tbody tr:hover {
  background: rgba(20, 102, 36, 0.04);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(20, 102, 36, 0.12);
  color: var(--green-800);
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

.badge-status-gold {
  background: rgba(245, 197, 24, 0.28);
  color: #7a5a00;
}

.badge-status-muted {
  background: rgba(90, 107, 94, 0.16);
  color: #4a574e;
}

.result-card {
  background: linear-gradient(160deg, #f8fcf7, #ffffff);
  border: 1px solid rgba(20, 102, 36, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
  animation: fadeUp 0.35s ease;
}

.result-card.error {
  border-color: rgba(198, 40, 40, 0.25);
  background: #fff8f8;
}

.result-card h3 {
  color: var(--green-900);
  margin-bottom: 1rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.result-item label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.result-item strong {
  font-size: 1.05rem;
  color: var(--ink);
}

/* ----- Page headers / Auth ----- */
.page-header {
  background: linear-gradient(120deg, var(--green-900), var(--green-700));
  color: white;
  padding: 2.5rem 0;
}

.page-header h1 {
  margin: 0 0 0.35rem;
  font-weight: 800;
}

.page-header p {
  margin: 0;
  opacity: 0.85;
}

.page-header-admin,
.page-header-caixa {
  background: linear-gradient(120deg, var(--green-950), var(--green-800));
}

.auth-section {
  padding: 4rem 0;
}

.auth-card {
  background: white;
  border-radius: 22px;
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 5px solid var(--green-700);
}

.auth-card-caixa {
  border-top-color: var(--gold-500);
}

.auth-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 1rem;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: rgba(20, 102, 36, 0.1);
  color: var(--green-700);
  font-size: 1.8rem;
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green-900);
}

.auth-card > p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.auth-card .form-label {
  text-align: left;
  display: block;
  width: 100%;
}

.log-viewer {
  background: #0f1a12;
  color: #b7f0c1;
  border-radius: 12px;
  padding: 1.25rem;
  max-height: 65vh;
  overflow: auto;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.config-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(20, 102, 36, 0.08);
}

.text-green {
  color: var(--green-700) !important;
}

.historico-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.historico-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed rgba(20, 102, 36, 0.15);
}

/* ----- Footer ----- */
.site-footer {
  margin-top: 3rem;
  background: linear-gradient(90deg, var(--green-950), var(--green-900));
  color: rgba(255, 255, 255, 0.88);
  padding: 2.5rem 0;
}

.footer-brand {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.footer-brand i {
  font-size: 1.6rem;
  color: var(--gold-400);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  display: inline-block;
  padding: 0.2rem 0;
}

.footer-links a:hover {
  color: var(--gold-400);
}

.footer-badge {
  display: inline-block;
  background: rgba(245, 197, 24, 0.18);
  color: var(--gold-400);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-size: 0.85rem;
  opacity: 0.85;
}

.footer-copy a {
  color: rgba(255, 255, 255, 0.9);
}

.footer-copy a:hover {
  color: var(--gold-400);
}

.regulamento ol {
  padding-left: 1.2rem;
}

.regulamento li {
  margin-bottom: 0.85rem;
  color: var(--ink);
}

/* ----- Animations ----- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}

@keyframes marqueePulse {
  0%, 100% {
    box-shadow:
      0 0 0 4px rgba(245, 197, 24, 0.15),
      0 12px 30px rgba(0, 0, 0, 0.35),
      inset 0 0 24px rgba(245, 197, 24, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 7px rgba(245, 197, 24, 0.28),
      0 14px 34px rgba(0, 0, 0, 0.4),
      inset 0 0 28px rgba(245, 197, 24, 0.2);
  }
}

.animate-fade-up {
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}

.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; }
.delay-3 { animation-delay: 0.36s; }

/* ----- Choice lists (sexo / cidade) ----- */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(20, 102, 36, 0.12);
  border-radius: 14px;
  background: #fbfefb;
}

.choice-list-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
}

.choice-option input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--green-700);
  flex-shrink: 0;
}

.choice-option-outro {
  flex-wrap: wrap;
}

.choice-outro-input {
  flex: 1 1 180px;
  min-width: 160px;
  border: none;
  border-bottom: 1px dotted rgba(20, 102, 36, 0.45);
  border-radius: 0;
  background: transparent;
  padding-left: 0.25rem;
}

.choice-outro-input:disabled {
  opacity: 0.55;
}

.choice-outro-input:focus {
  box-shadow: none;
  border-bottom-color: var(--green-700);
}

.choice-list.is-invalid {
  border-color: #dc3545;
  background: #fff8f8;
}

/* =========================================================
   Ajustes SOMENTE para celular (não altera o desktop)
   ========================================================= */
@media (max-width: 767.98px) {
  body {
    overflow-x: hidden;
  }

  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 0.82rem;
  }

  .hero-promo {
    min-height: auto;
    align-items: flex-start;
    overflow: visible;
  }

  .hero-bg {
    background-position: center center;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(6, 40, 10, 0.94) 0%, rgba(11, 61, 18, 0.88) 55%, rgba(6, 40, 10, 0.92) 100%);
  }

  .hero-content {
    padding: 2.25rem 1rem 2rem;
  }

  .hero-promo .container {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .hero-tag {
    max-width: 100%;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    padding: 0.4rem 0.75rem;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
    margin-left: 0.15rem;
  }

  .hero-title {
    line-height: 0.95;
    max-width: 100%;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }

  .hero-prize,
  .hero-sub {
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }

  .hero-title-super,
  .hero-title-santana {
    font-size: clamp(1.85rem, 10vw, 2.6rem);
    letter-spacing: 0.03em;
    overflow-wrap: anywhere;
  }

  .hero-title-sorteio {
    display: block;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    font-size: clamp(2.1rem, 13vw, 3.2rem);
    letter-spacing: 0.02em;
    padding: 0.12em 0.22em;
    border-width: 2px;
    border-radius: 14px;
    line-height: 1;
    box-shadow:
      0 0 0 3px rgba(245, 197, 24, 0.15),
      0 8px 18px rgba(0, 0, 0, 0.3);
  }

  .hero-prize {
    font-size: 1.05rem;
    overflow-wrap: anywhere;
  }

  .hero-sub {
    font-size: 0.95rem;
    line-height: 1.45;
    margin-bottom: 1.15rem;
    overflow-wrap: anywhere;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .prize-card {
    margin-top: 0.25rem;
    padding: 1.4rem 1.25rem;
  }

  .prize-value {
    font-size: clamp(2.4rem, 12vw, 3.2rem);
  }

  .prize-total {
    font-size: 0.78rem;
    white-space: normal;
    line-height: 1.3;
  }

  .step-item {
    font-size: 0.78rem;
    padding: 0.35rem 0.2rem;
  }

  .step-item i {
    font-size: 1.35rem;
  }

  .metric-card {
    padding: 1.1rem;
  }

  .metric-value {
    font-size: 1.4rem;
  }

  .panel-card,
  .consulta-box {
    padding: 1.25rem;
  }

  .consulta-cpf-row .input-group > .form-control {
    font-size: 16px;
  }

  .page-header {
    padding: 1.75rem 0;
  }

  .page-header h1 {
    font-size: 1.55rem;
  }

  .page-header .btn,
  .auth-card .btn {
    width: 100%;
  }
}

/* ----- Sorteios (ganhadores mensais) ----- */
.sorteio-mes-titulo {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--green-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(20, 102, 36, 0.12);
}

.sorteio-aguardando {
  color: var(--muted);
  background: rgba(20, 102, 36, 0.05);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.accordion-santana .accordion-item {
  border: 1px solid rgba(20, 102, 36, 0.12);
  border-radius: 12px !important;
  overflow: hidden;
  margin-bottom: 0.65rem;
  background: #f8fbf7;
}

.accordion-santana .accordion-button {
  font-weight: 600;
  color: var(--ink);
  background: #f8fbf7;
  box-shadow: none;
  gap: 0.65rem;
}

.accordion-santana .accordion-button:not(.collapsed) {
  color: var(--green-900);
  background: rgba(245, 197, 24, 0.18);
}

.accordion-santana .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(20, 102, 36, 0.15);
}

.accordion-santana .accordion-body {
  background: white;
}

.sorteio-item-plus {
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green-700);
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

@media (max-width: 399.98px) {
  .hero-title-sorteio {
    font-size: 1.95rem;
  }

  .hero-actions .btn {
    font-size: 0.95rem;
    padding: 0.7rem 0.9rem;
  }

  .navbar-brand {
    max-width: calc(100% - 56px);
  }

  .brand-text strong {
    font-size: 0.74rem;
    white-space: normal;
    line-height: 1.15;
  }
}
