/* Variáveis de Tema - Cores Premium e Elegantes */
:root {
  --primary-color: #D4AF37; /* Dourado Moderno */
  --secondary-color: #B49022; /* Dourado mais escuro para hover */
  --bg-color: #f7f3ed; /* Um bege claríssimo e sofisticado */
  --text-dark: #1a1a1a;
  --text-light: #5a5a5a;
  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(212, 175, 55, 0.3);
  --glass-shadow: 0 15px 45px 0 rgba(212, 175, 55, 0.08);
  --success: #2d8a4e;
  --danger: #b53d4a;
  
  --font-title: 'Playfair Display', serif;
  --font-text: 'Montserrat', sans-serif;
}

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

body {
  font-family: var(--font-text);
  color: var(--text-dark);
  background-color: var(--bg-color);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Background animado sutil */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: radial-gradient(circle at 15% 50%, rgba(212, 175, 55, 0.1), transparent 35%),
              radial-gradient(circle at 85% 30%, rgba(212, 175, 55, 0.05), transparent 35%);
  animation: bg-shift 15s ease-in-out infinite alternate;
}

@keyframes bg-shift {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-section {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: slowZoom 20s infinite alternate;
}

@keyframes slowZoom {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.5) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 50px;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.main-wedding-card {
  margin-top: -60px;
  position: relative;
  z-index: 2;
  padding: 40px;
  border-radius: 24px;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.info-item {
  text-align: center;
}

.info-item .icon {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 40px 0;
}

.countdown-unit {
  text-align: center;
  background: white;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
  transition: transform 0.3s ease;
}

.countdown-unit:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

.countdown-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.countdown-lab {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-top: 4px;
}

@media (max-width: 480px) {
  .countdown {
    gap: 10px;
  }
  .countdown-unit {
    width: 65px;
    height: 65px;
  }
  .countdown-val {
    font-size: 1.3rem;
  }
}

.celebration-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .celebration-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

#login-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-color);
  margin: 0;
  padding: 20px;
}

#login-section .card {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.screen {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.screen.active {
  display: block;
  opacity: 1;
}

.screen.hidden {
  display: none;
}

/* Glassmorphism Card */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
}

.card {
  padding: 40px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

/* Tipografia */
.title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.dashboard-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  color: var(--primary-color);
}

.subtitle {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 30px;
  line-height: 1.5;
}

/* Formulários */
.input-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--primary-color);
}

.input-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #dcdfe3;
  border-radius: 8px;
  font-family: var(--font-text);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(140, 118, 87, 0.2);
}

/* Botões */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  width: 100%;
}

.primary-btn {
  background-color: var(--primary-color);
  color: #fff;
}

.primary-btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.text-btn {
  background: none;
  color: var(--text-light);
  width: auto;
  padding: 5px 10px;
}
.text-btn:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.outline-btn {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  width: calc(50% - 10px);
}

.outline-btn.success.active {
  background-color: var(--success);
  border-color: var(--success);
  color: white;
}

.outline-btn.danger.active {
  background-color: var(--danger);
  border-color: var(--danger);
  color: white;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Dashboard Grid */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr; /* Mudado para uma coluna única (narrativa vertical) */
  gap: 25px;
}

.info-card, .pix-card, .rsvp-card {
  max-width: 100%;
  text-align: left;
  padding: 30px;
  grid-column: 1 / -1;
}

.rsvp-card {
  text-align: center;
}

.info-card h3, .pix-card h3, .rsvp-card h3 {
  font-family: var(--font-title);
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.event-details {
  list-style: none;
  margin-bottom: 20px;
}

.event-details li {
  margin-bottom: 10px;
  line-height: 1.5;
}

.agenda {
  line-height: 1.6;
  color: var(--text-light);
}

.pix-desc {
  line-height: 1.5;
  margin-bottom: 20px;
}

.qr-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.qr-container img {
  border-radius: 8px;
  border: 5px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.qr-container img:hover {
  transform: scale(1.05);
}

.rsvp-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Utilitários */
.error-msg { color: var(--danger); font-size: 0.85rem; margin-top: 10px; }
.success-msg { color: var(--success); font-size: 0.85rem; margin-top: 10px; }
.status-pending { color: var(--text-light); font-style: italic; }
.status-confirmed { color: var(--success); font-weight: 600; }
.status-declined { color: var(--danger); font-weight: 600; }

.info-box {
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  padding: 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: center;
}

.btn.success.active {
  background-color: var(--success);
  color: white;
  border-color: var(--success);
  font-weight: 700;
  cursor: default;
}

.btn.danger.active {
  background-color: var(--danger);
  color: white;
  border-color: var(--danger);
  font-weight: 700;
  cursor: default;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#success-modal .modal-content {
  text-align: center;
  padding: 50px 40px;
  max-width: 450px;
  border: 1px solid var(--primary-color);
}
.hidden { display: none !important; }

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-down {
  animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; transform: translateY(-10px); }
  to { opacity: 1; max-height: 2000px; transform: translateY(0); } /* Aumentado de 500px para 2000px para suportar múltiplos acompanhantes */
}

/* Responsividade */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
}

/* Painel Admin Styles */
#admin-dashboard .card {
  max-width: 900px;
}

.admin-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.admin-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #eee;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th, .admin-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
}

.admin-table th {
  background-color: rgba(212, 175, 55, 0.1);
  color: var(--primary-color);
  font-family: var(--font-text);
  font-weight: 600;
  white-space: nowrap;
}

.admin-table tr:hover {
  background-color: rgba(0,0,0,0.02);
}

.action-btn {
  padding: 6px 10px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.action-btn.edit {
  color: #17a2b8;
}

.action-btn.view {
  color: var(--success);
}

.action-btn.delete {
  color: var(--danger);
}

.action-btn:hover {
  background-color: rgba(0,0,0,0.05);
}

/* Modal Simplificado */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  max-width: 400px;
  width: 90%;
  padding: 30px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}

.badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-confirmed { background: rgba(40, 167, 69, 0.1); color: var(--success); }
.badge-declined { background: rgba(220, 53, 69, 0.1); color: var(--danger); }
.badge-pending { background: rgba(108, 117, 125, 0.1); color: var(--text-light); }

/* Novos estilos para o RSVP em colunas */
.rsvp-row-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 15px;
  align-items: flex-end;
  text-align: left;
  margin-bottom: 20px;
}

.companion-row-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr 0.8fr;
  gap: 15px;
  align-items: flex-end;
  text-align: left;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #dcdfe3;
  cursor: pointer;
  transition: all 0.2s;
  height: 46px;
  user-select: none;
}

.checkbox-group:hover {
  border-color: var(--primary-color);
  background: rgba(212, 175, 55, 0.02);
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.checkbox-group label {
  margin-bottom: 0 !important;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
}

.radio-group {
  display: flex;
  gap: 15px;
  background: white;
  padding: 8px 15px;
  border-radius: 8px;
  border: 1px solid #dcdfe3;
  height: 46px;
  align-items: center;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .rsvp-row-grid, .companion-row-grid {
    grid-template-columns: 1fr;
  }
}

/* Dashboard Metrics & Tabs */
.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.metric-card {
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(250,250,250,1) 100%);
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.metric-card h4 {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 5px;
}

.metric-card .metric-val {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--primary-color);
}

.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.admin-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-text);
  margin-bottom: -1px;
}

.admin-tab:hover {
  color: var(--primary-color);
}

.admin-tab.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

/* Layout Horizontal do PIX */
.pix-container {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
}

.pix-info {
  flex: 1;
}

.pix-qr {
  width: 140px; /* Reduzido levemente para o layout de coluna lateral */
  height: 140px;
  background: white;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px auto;
}

.pix-qr img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.pix-key-container {
  margin: 15px auto 0;
  display: flex;
  flex-direction: column; /* Pilarizado para a coluna lateral */
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(212, 175, 55, 0.05);
  padding: 12px;
  border-radius: 8px;
  border: 1px dashed var(--primary-color);
  width: 100%;
}

.pix-key-text {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
  text-align: center;
}

.copy-btn {
  padding: 6px 12px;
  font-size: 0.75rem;
  white-space: nowrap;
  width: 100%;
}

@media (max-width: 768px) {
  .pix-container {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }
  .pix-qr {
    margin: 0 auto;
  }
  .pix-key-container {
    flex-direction: column;
    text-align: center;
  }
}
