@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --bg: #f1f6f3;
  --card: #ffffff;
  --text: #11251e;
  --muted: #567268;
  --primary: #044018;
  --primary-dark: #022a10;
  --line: #d4e1da;
  --danger: #b32632;
  --shadow: 0 18px 45px rgba(14, 74, 47, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Outfit", "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f5fbf7 0%, #edf3ef 100%);
  color: var(--text);
}

.public-page {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.top-lang {
  position: relative;
  z-index: 3;
  width: min(1160px, 92vw);
  margin: 16px auto 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #3f6456;
}

.top-lang a {
  text-decoration: none;
  border: 1px solid #c9ddd1;
  color: #275747;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.top-lang a:hover {
  border-color: #8ac3a5;
  background: #f7fcf9;
}

.top-lang a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.bg-orb {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(0.5px);
  pointer-events: none;
}

.orb-a {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at 30% 30%, #b4ebcd 0%, #69cb96 45%, rgba(105, 203, 150, 0) 70%);
  top: -120px;
  right: -120px;
  opacity: 0.42;
}

.orb-b {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 60% 60%, #8cd7bc 0%, #59b89c 42%, rgba(89, 184, 156, 0) 70%);
  bottom: -120px;
  left: -110px;
  opacity: 0.4;
}

.public-shell {
  position: relative;
  z-index: 2;
  width: min(1160px, 92vw);
  margin: 34px auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
}

.single-column {
  grid-template-columns: 1fr;
  max-width: 760px;
}

.hero-card,
.lang-card,
.info-card,
.form-card,
.success-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero-card,
.info-card,
.success-card {
  padding: 34px;
}

.success-content {
  text-align: center;
}

.success-card .eyebrow,
.success-card h1,
.success-card .lead,
.success-card .ticket-wrap {
  text-align: center;
}

.lang-card,
.form-card {
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #176949;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", "Outfit", sans-serif;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.lead {
  margin: 12px 0 0;
  font-size: 1.03rem;
  color: #425f53;
  line-height: 1.5;
}

.hero-points {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.hero-points.compact {
  margin-top: 18px;
}

.home-hero {
  text-align: center;
}

.home-hero h1 {
  margin-left: auto;
  margin-right: auto;
  max-width: 18ch;
}

.home-hero .hero-points.compact {
  margin-left: auto;
  margin-right: auto;
  max-width: 760px;
}

.point-item {
  background: #f4faf6;
  border: 1px solid #d9ece0;
  border-radius: 12px;
  padding: 11px 13px;
  font-weight: 600;
  color: #27483c;
}

.point-item a {
  color: #176949;
  text-decoration: underline;
  font-weight: 700;
}

.point-item-instagram {
  text-align: center;
  background: linear-gradient(180deg, #f6fbf8, #eef6f1);
  border-color: #cfe3d6;
}

.lang-grid {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.lang-btn {
  text-decoration: none;
  border: 1px solid #d5e5dc;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fbf8);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lang-btn:hover {
  transform: translateY(-2px);
  border-color: #8bc7a8;
  box-shadow: 0 10px 24px rgba(24, 105, 73, 0.14);
}

.lang-title {
  color: #1a352b;
  font-weight: 700;
}

.lang-sub {
  color: #4e7063;
  font-size: 0.9rem;
}

.form-layout {
  grid-template-columns: 0.9fr 1.1fr;
}

.cadastro-centered {
  min-height: calc(100vh - 74px);
  margin: 12px auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cadastro-centered .form-card {
  width: min(760px, 100%);
}

.confirmacao-centered {
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirmacao-centered .success-card {
  width: min(560px, 100%);
}

.brand-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.brand-logo {
  width: clamp(130px, 26vw, 200px);
  height: auto;
  display: block;
}

.field-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
}

.field-grid.two {
  grid-template-columns: 1fr 1fr;
}

.field-grid.three {
  grid-template-columns: 0.95fr 1.05fr 1fr;
}

.container {
  width: min(1160px, 92vw);
  margin: 34px auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 600;
  color: #26473b;
}

input,
select,
button {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid #c7d8ce;
  font-family: inherit;
  font-size: 0.98rem;
}

input:focus,
select:focus {
  border-color: #7fbd9e;
  outline: 3px solid rgba(127, 189, 158, 0.2);
}

.btn {
  display: inline-block;
  width: auto;
  background: linear-gradient(180deg, #0a5a27, var(--primary));
  color: #fff;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.btn-wide {
  margin-top: 8px;
  width: 100%;
}

.btn-strong {
  min-width: 220px;
  text-align: center;
}

.btn-outline {
  background: transparent;
  border: 1px solid #8abca0;
  color: #20503d;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.error {
  color: var(--danger);
}

.alert-error {
  border: 1px solid #f2c8cd;
  background: #fff4f4;
  color: var(--danger);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0 14px;
}

.alert-ok {
  border: 1px solid #b8e0c7;
  background: #f2fbf6;
  color: #0f5132;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0 14px;
}

.muted {
  color: var(--muted);
}

.ticket {
  margin: 8px 0 0;
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 5px;
  color: #175b3f;
  font-family: "Space Grotesk", "Outfit", sans-serif;
}

.ticket-wrap {
  margin-top: 20px;
  border: 1px dashed #8fc3a7;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #f6fcf8, #eef8f2);
}

.ticket-label {
  color: #4d6b5e;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.3px;
}

.cta-row {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-single {
  justify-content: center;
}

.cta-single .btn {
  min-width: 240px;
}

.instagram-follow-box {
  margin-top: 16px;
  border: 1px solid #dbe8e0;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #fbfdfc, #f4faf7);
}

.instagram-note {
  margin: 0;
  color: #3f5f53;
  font-size: 0.95rem;
  line-height: 1.5;
}

.instagram-follow-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.instagram-follow-actions .btn {
  min-width: 190px;
}

.btn-subtle {
  background: #f9fcfa;
  border-color: #c8ddd1;
  color: #24513f;
}

.btn-subtle:hover {
  background: #f2f8f4;
  border-color: #b6d2c2;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.08);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--line);
  padding: 9px;
  text-align: left;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.filters label {
  margin: 0;
}

.pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pagination a {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
}

.pagination .page-current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.winner-box {
  margin-top: 16px;
  border: 1px solid #cde0d0;
  background: #f6fcf7;
  border-radius: 12px;
  padding: 14px;
}

.history-box {
  margin-top: 18px;
}

@media (max-width: 860px) {
  .top-lang {
    justify-content: center;
    margin-top: 14px;
  }

  .public-shell,
  .form-layout {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .lang-card,
  .info-card,
  .form-card,
  .success-card {
    padding: 22px;
    border-radius: 18px;
  }

  .field-grid.two,
  .field-grid.three {
    grid-template-columns: 1fr;
  }

  .cta-row {
    flex-direction: column;
  }

  .instagram-follow-actions {
    flex-direction: column;
  }

  .instagram-follow-actions .btn {
    width: 100%;
  }

  .btn-strong,
  .btn-outline {
    width: 100%;
    text-align: center;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .cadastro-centered {
    min-height: auto;
    margin: 18px auto;
  }
}

/* Autocomplete styles */
.autocomplete-list {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 240px;
  overflow-y: auto;
  margin-top: -1px;
  margin-left: 0;
  margin-right: 0;
}

.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
  font-size: 0.95rem;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: #f5fbf7;
}

/* Admin page styles */
.admin-page {
  background: linear-gradient(180deg, #f5fbf7 0%, #edf3ef 100%);
  min-height: 100vh;
}

.admin-container {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 34px 44px 28px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-header h1 {
  margin: 0;
  font-size: 2rem;
  color: var(--text);
  font-family: "Space Grotesk", "Outfit", sans-serif;
}

.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.sortear-form-inline {
  margin: 0;
}

.sortear-form-inline .btn[disabled] {
  cursor: not-allowed;
  opacity: 0.65;
  background: #a3b1a9;
  border-color: #a3b1a9;
  box-shadow: none;
}

.admin-page .btn {
  min-height: 46px;
  padding: 0 24px;
  font-size: 0.86rem;
  letter-spacing: 0;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.public-page .g-btn {
  min-height: 46px;
  padding: 0 24px;
  font-size: 0.86rem;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.g-btn {
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.g-btn-filled {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}

.g-btn-filled:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  filter: none;
  transform: none;
  box-shadow: 0 2px 6px rgba(4, 64, 24, 0.35);
}

.g-btn-outline {
  background: #fff;
  color: #1f2937;
  border: 1px solid #dadce0;
}

.g-btn-outline:hover {
  background: #f8fafc;
  border-color: #b7d2c1;
  color: var(--primary);
  filter: none;
  transform: none;
  box-shadow: 0 2px 5px rgba(17, 24, 39, 0.12);
}

.cell-whatsapp {
  text-align: center;
  vertical-align: middle;
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
}

.wa-btn:hover {
  background: #20ba5a;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.wa-btn-sent {
  background: #9ca3af;
}

.wa-btn-sent:hover {
  background: #6b7280;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.25);
}

.cell-whatsapp svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
}

.filters {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}

.filters .btn {
  min-height: 46px;
}

.filters label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 6px;
}

.filters input,
.filters select {
  background: #f5fbf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  color: var(--text);
  font-size: 0.95rem;
}

.filters input:focus,
.filters select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 138, 85, 0.1);
}

.table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead {
  background: #f9fdfb;
  border-bottom: 2px solid var(--line);
}

th {
  padding: 14px;
  text-align: left;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
}

td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

tbody tr:hover {
  background: #fafcfb;
}

tbody tr:last-child td {
  border-bottom: none;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  background: var(--card);
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-current {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

.draw-codes-grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.draw-code-item {
  border: 1px dashed #8fc3a7;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  font-family: "Space Grotesk", "Outfit", sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  letter-spacing: 3px;
  font-weight: 700;
  color: #175b3f;
  background: linear-gradient(180deg, #f6fcf8, #eef8f2);
  display: grid;
  gap: 6px;
}

.draw-order-badge {
  display: inline-block;
  margin: 0 auto;
  min-width: 44px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  color: #fff;
  background: var(--primary);
}

.draw-prize-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #2f5b45;
}

.admin-login-page {
  display: flex;
  align-items: center;
}

.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-login-card {
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.admin-login-card h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
}

.admin-login-subtitle {
  margin: 8px 0 14px;
  text-align: center;
}

.admin-login-form {
  display: grid;
  gap: 8px;
}

.admin-login-form label {
  margin-top: 10px;
  font-weight: 600;
}

.admin-login-form input {
  width: 100%;
  background: #f8fbf9;
  border: 1px solid #d8e5de;
  border-radius: 12px;
  padding: 12px 13px;
}

.admin-login-form .btn-wide {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .admin-container {
    padding: 20px 16px 16px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-page .btn {
    min-height: 44px;
    padding: 0 20px;
    font-size: 0.82rem;
  }

  .public-page .g-btn {
    min-height: 44px;
    padding: 0 20px;
    font-size: 0.82rem;
  }

  .admin-login-card {
    padding: 24px 18px;
    border-radius: 16px;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 10px;
  }

  th:nth-child(3),
  td:nth-child(3) {
    display: none;
  }
}
