:root {
  --blue: #1B3F72;
  --blue-light: #2a5298;
  --blue-pale: #e8f0fb;
  --gold: #C9A84C;
  --gold-light: #f5e6b8;
  --green: #10B981;
  --green-pale: #d1fae5;
  --amber: #F59E0B;
  --amber-pale: #fef3c7;
  --red: #EF4444;
  --red-pale: #fee2e2;
  --gray-50: #F8F9FC;
  --gray-100: #f1f3f7;
  --gray-200: #e2e6ee;
  --gray-400: #9aa3b2;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--gray-50);
  min-height: 100vh;
}

/* ── PUBLIC PAGE ─────────────────────────────────────────── */
.public-page {
  background: var(--gray-50);
  min-height: 100vh;
}

/* Hero */
.hero {
  background: linear-gradient(160deg, #07182e 0%, #1B3F72 55%, #2a5298 100%);
  padding: 60px 20px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-inner { position: relative; max-width: 640px; margin: 0 auto; }

.hero-cross {
  font-size: 40px;
  color: var(--gold);
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 8px rgba(201,168,76,0.4));
}

.hero-sup {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.hero-edition {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 36px;
}

.hero-date-box {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 20px 32px;
}

.hero-date-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hero-date-num {
  font-size: 40px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.hero-date-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
}

.hero-date-sep {
  font-size: 28px;
  color: rgba(255,255,255,0.3);
  font-weight: 300;
}

.hero-date-month {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.3;
  text-align: left;
}

/* About */
.about-section {
  background: var(--white);
  padding: 48px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.about-card {
  max-width: 680px;
  margin: 0 auto;
}

.about-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 16px;
}

.about-text {
  color: var(--gray-700);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 14px;
}

.about-quote {
  border-left: 3px solid var(--gold);
  padding: 12px 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--gray-500);
  font-size: 15px;
  background: var(--gray-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.about-quote cite {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.about-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.pill {
  display: inline-block;
  padding: 6px 14px;
  background: var(--blue-pale);
  color: var(--blue);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

/* Form section */
.form-section {
  padding: 40px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* Quando só a confirmação aparece (sem hero), fundo azul na página toda */
.success-page .form-section {
  background: linear-gradient(160deg, #07182e 0%, #1B3F72 55%, #2a5298 100%);
}

.success-page .card {
  margin-top: 40px;
}

.counter-wrap {
  text-align: center;
  margin-bottom: 20px;
}

.counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: var(--white);
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(27,63,114,0.25);
}

.counter-badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

.counter-badge.full { background: var(--amber); }
.counter-badge.full .dot { background: var(--white); animation: none; }

@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Footer */
.site-footer {
  text-align: center;
  padding: 20px;
  background: var(--blue);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}

.card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 36px 32px;
  width: 100%;
  max-width: 600px;
}

.alert {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-warning {
  background: var(--amber-pale);
  color: #92400e;
  border-left: 4px solid var(--amber);
}

.alert-success {
  background: var(--green-pale);
  color: #065f46;
  border-left: 4px solid var(--green);
}

.alert-error {
  background: var(--red-pale);
  color: #991b1b;
  border-left: 4px solid var(--red);
}

.alert-info {
  background: var(--blue-pale);
  color: #1e3a5f;
  border-left: 4px solid var(--blue);
}

.alert .icon { font-size: 18px; flex-shrink: 0; line-height: 1; }

.form-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-pale);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group label .req { color: var(--red); margin-left: 2px; }
.form-group label .opt { color: var(--gray-400); font-weight: 400; font-size: 12px; margin-left: 4px; }

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(42,82,152,0.12);
}

.radio-group {
  display: flex;
  gap: 12px;
}

.radio-option {
  flex: 1;
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  cursor: pointer;
  margin: 0;
}

.radio-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  margin: 0;
  user-select: none;
}

.radio-option input:checked + label {
  border-color: var(--blue-light);
  background: var(--blue-pale);
  color: var(--blue);
}

.radio-option label .radio-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--gray-400);
  display: inline-block;
  transition: all 0.15s;
  flex-shrink: 0;
}

.radio-option input:checked + label .radio-dot {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: inset 0 0 0 3px var(--white);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  width: 100%;
}

.btn-primary:hover { background: var(--blue-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(27,63,114,0.3); }

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-700);
}
.btn-outline:hover { border-color: var(--gray-400); background: var(--gray-50); }

.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #dc2626; }

.btn-success { background: var(--green); color: var(--white); }
.btn-success:hover { background: #059669; }

.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: #b8962a; }

.section-divider {
  border: none;
  border-top: 1.5px solid var(--gray-100);
  margin: 20px 0;
}

.success-card {
  text-align: center;
  padding: 40px 32px;
}

.success-card .check {
  font-size: 56px;
  margin-bottom: 16px;
  display: block;
}

.success-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.success-card p {
  color: var(--gray-500);
  font-size: 15px;
  margin-bottom: 24px;
}

.success-details {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: left;
  font-size: 14px;
}

.success-details dt {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 10px;
}

.success-details dt:first-child { margin-top: 0; }
.success-details dd { color: var(--gray-900); margin-left: 0; }

/* ── ADMIN PAGE ──────────────────────────────────────────── */
.admin-page { background: var(--gray-50); min-height: 100vh; }

.admin-topbar {
  background: var(--blue);
  color: var(--white);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.admin-topbar .brand {
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-topbar .brand span { opacity: 0.6; font-weight: 400; font-size: 13px; }

.admin-topbar nav { display: flex; align-items: center; gap: 8px; }

.admin-topbar a, .admin-topbar button.link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}

.admin-topbar a:hover, .admin-topbar button.link:hover { color: var(--white); background: rgba(255,255,255,0.1); }

.admin-content { padding: 28px; max-width: 1280px; margin: 0 auto; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.stat-card.blue::before { background: var(--blue); }
.stat-card.green::before { background: var(--green); }
.stat-card.amber::before { background: var(--amber); }
.stat-card.gold::before { background: var(--gold); }

.stat-card .label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  margin-bottom: 6px;
}

.stat-card .value {
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .sub {
  font-size: 12px;
  color: var(--gray-400);
}

.progress-bar-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 28px;
}

.progress-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.progress-track {
  height: 10px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  border-radius: 999px;
  transition: width 0.5s ease;
}

.progress-fill.full { background: linear-gradient(90deg, var(--amber), #f97316); }

.panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

.filter-tabs { display: flex; gap: 4px; }

.tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: none;
  color: var(--gray-500);
  font-family: inherit;
  transition: all 0.15s;
}

.tab.active {
  background: var(--blue-pale);
  color: var(--blue);
  border-color: var(--blue-pale);
}

.tab:hover:not(.active) { background: var(--gray-100); color: var(--gray-700); }

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--gray-100);
}

.search-bar input {
  flex: 1;
  padding: 8px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  color: var(--gray-900);
  transition: border-color 0.15s;
}

.search-bar input:focus { border-color: var(--blue-light); }

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--gray-50);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  white-space: nowrap;
  border-bottom: 1px solid var(--gray-200);
}

tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.1s;
}

tbody tr:hover { background: var(--gray-50); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 10px 14px;
  vertical-align: middle;
  color: var(--gray-700);
}

.casal-name { font-weight: 600; color: var(--gray-900); font-size: 14px; }
.casal-sub { font-size: 12px; color: var(--gray-400); margin-top: 1px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green { background: var(--green-pale); color: #065f46; }
.badge-amber { background: var(--amber-pale); color: #92400e; }
.badge-blue { background: var(--blue-pale); color: var(--blue); }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }

.check-icon { font-size: 16px; display: block; text-align: center; cursor: pointer; }

.inline-input {
  width: 100%;
  padding: 5px 8px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: inherit;
  color: var(--gray-900);
  min-width: 120px;
  outline: none;
  transition: border-color 0.15s;
}

.inline-input:focus { border-color: var(--blue-light); }
.inline-input.saved { border-color: var(--green); animation: saved-flash 0.8s ease forwards; }

@keyframes saved-flash {
  0% { background: var(--green-pale); }
  100% { background: var(--white); }
}

.save-indicator {
  font-size: 11px;
  color: var(--green);
  opacity: 0;
  transition: opacity 0.3s;
  margin-left: 4px;
}

.save-indicator.show { opacity: 1; }

.actions-cell { display: flex; align-items: center; gap: 6px; white-space: nowrap; }

/* Login page */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #0f2444 0%, #1B3F72 100%);
}

.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
}

.login-card .cross { font-size: 36px; display: block; margin-bottom: 12px; }
.login-card h1 { font-size: 22px; font-weight: 700; color: var(--blue); margin-bottom: 4px; }
.login-card p { font-size: 13px; color: var(--gray-400); margin-bottom: 28px; }

.login-card .form-group { text-align: left; }

.login-card .btn-primary { margin-top: 8px; }

/* Responsive */
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .card { padding: 24px 18px; }
  .admin-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-topbar { padding: 0 16px; }
  .hero-date-box { flex-wrap: wrap; justify-content: center; gap: 12px; padding: 16px 20px; }
  .about-pills { gap: 6px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-date-num { font-size: 32px; }
}
