@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;700;900&display=swap');

:root {
  --primary-ruby: #8A1212;
  --primary-ruby-dark: #4A0000;
  --accent-gold: #B5A642;
  --bg-dark: #000000; /* Preto absoluto para os menus */
  --bg-light: #FFFFFF; /* Branco para o conteúdo */
  --text-dark: #222222; /* Texto principal escuro */
  --text-muted: #666666; /* Texto secundário cinza */
  --glass-bg: rgba(0, 0, 0, 0.05);
  --glass-border: rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
}

#site-header {
  width: 100%;
  padding: 0;
  background: black;
  position: relative;
  overflow: hidden;
}

.main-banner {
  width: 100%;
  display: block;
}

#main-nav {
  padding: 1.5rem 2rem;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: center;
  position: relative;
  align-items: center;
}

.admin-lock {
  position: absolute;
  right: 25px;
  color: var(--accent-gold);
  text-decoration: none;
  font-size: 1.2rem;
  opacity: 0.5;
  transition: all 0.3s;
  cursor: pointer;
  line-height: 1;
}

.admin-lock:hover {
  opacity: 1;
  transform: scale(1.1);
}

#main-nav ul {
  display: flex;
  list-style: none;
  gap: 3rem;
}

#main-nav a {
  text-decoration: none;
  color: #FFFFFF; /* Garante que o texto no menu preto seja branco */
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.2rem;
  font-weight: 600;
  transition: color var(--transition-speed);
}

nav a:hover {
  color: var(--accent-gold);
}

main {
  min-height: calc(100vh - 200px);
  padding: 2rem;
}

.view {
  animation: fadeIn 0.5s ease-out;
}

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

/* Home View Layout */
.home-view {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-section {
  height: 60vh;
  background: url('/placeholder.svg') center/cover no-repeat;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
}

/* In the actual implementation, we replace the placeholder with the generated image */
.hero-section {
  background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.7)), url('https://estacaorubi.com.br/wp-content/themes/rubi/img/topo-site.png');
}

.hero-content {
  text-align: center;
  z-index: 1;
}

.hero-content h2 {
  font-size: 3.5rem;
  font-style: italic;
  margin-bottom: 1rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--accent-gold);
  margin: 0.5rem auto;
}

.shows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.show-card {
  background-color: #FAF7F2; /* Bege Claro Elegante */
  border: 1px solid #EADDCD; /* Borda suave combinando com o bege */
  border-radius: 1rem;
  overflow: hidden;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.show-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.show-banner {
  height: 250px;
  overflow: hidden;
}

.show-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-speed);
}

.show-card:hover .show-banner img {
  transform: scale(1.05);
}

.show-info {
  padding: 1.5rem;
}

.show-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark); /* Texto Escuro para o fundo Bege */
}

.show-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.dates-selection {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.date-selector {
  width: 100%;
  text-align: center;
}

.buy-btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--primary-ruby);
  color: #FFFFFF; /* Texto Branco para contraste total */
  border: none;
  border-radius: 2rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--transition-speed), transform 0.2s;
  cursor: pointer;
}

.buy-btn:hover {
  background-color: var(--primary-ruby-dark);
  transform: scale(1.05);
}

.buy-btn.sold-out {
  background-color: #333 !important;
  color: #FFFFFF !important;
  cursor: not-allowed !important;
  border: 1px solid #444 !important;
  transform: none !important;
  pointer-events: none;
}

/* Seating Map View */
.seating-view {
  max-width: 1400px;
  margin: 0 auto;
}

.seating-layout {
  display: flex;
  gap: 3rem;
  margin-top: 2rem;
}

.map-container {
  flex: 2;
  background-color: #FFFFFF; /* Fundo Branco para o Mapa de Assentos */
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid #EEEEEE;
  overflow-x: auto;
}

.checkout-panel {
  flex: 1;
  background-color: #FAF7F2; /* Bege claro igual aos cards */
  border: 1px solid #EADDCD;
  border-radius: 1rem;
  padding: 2rem;
  height: fit-content;
  position: sticky;
  top: 100px;
  color: #333;
}

.official-map-ref {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 3rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
}

.official-map-ref img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.stage {
  width: 100%;
  height: 60px;
  background: linear-gradient(to right, #4A0000, #7A1212, #4A0000);
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 4rem;
  color: #FFFFFF; /* Texto Branco Puro */
  font-size: 0.9rem;
  letter-spacing: 0.5rem;
  text-transform: uppercase;
  font-weight: bold;
}

.seating-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 2rem;
  justify-items: center;
}

.table-unit {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.table-surface {
  width: 60px;
  height: 60px;
  background-color: #FAF7F2; /* Bege claro combinando com os cards */
  border: 4px solid var(--accent-gold);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 1rem;
  z-index: 2;
  color: #333; /* Texto escuro para o número da mesa */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.chair {
  position: absolute;
  width: 28px;
  height: 28px;
  background-color: #28a745; /* Verde padrão de Disponível */
  border: 1px solid #1e7e34;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #FFFFFF !important; /* Letras em branco sobre o verde */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chair:hover {
  background-color: var(--accent-gold);
  color: #FFF;
  transform: scale(1.1);
  border-color: var(--accent-gold);
}

.chair.selected {
  background-color: var(--accent-gold);
  color: #FFF;
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold);
}

.chair.reserved {
  background-color: #E0E0E0; /* Cinza claro para ocupado */
  border-color: #CCCCCC;
  color: #999999; /* Texto apagado */
  cursor: not-allowed;
  opacity: 1; /* Removido opacity para não ficar transparente demais */
}

/* Chair Positions (Diamond for 4 chairs) */
.chair.pos-a { top: 0; left: 50%; transform: translateX(-50%); }
.chair.pos-b { right: 0; top: 50%; transform: translateY(-50%); }
.chair.pos-c { bottom: 0; left: 50%; transform: translateX(-50%); }
.chair.pos-d { left: 0; top: 50%; transform: translateY(-50%); }

/* Pos for 2 chairs */
.table-unit.two-chairs .chair.pos-a { left: -5px; top: 50%; transform: translateY(-50%); }
.table-unit.two-chairs .chair.pos-b { right: -5px; top: 50%; transform: translateY(-50%); }

.checkout-header {
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.checkout-items {
  margin-bottom: 2rem;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #EEEEEE; /* Linha sutil de separação */
}

.type-select {
  background-color: #FFFFFF !important;
  color: #000000 !important;
  border: 1px solid #CCCCCC !important;
  padding: 6px 12px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.total-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--accent-gold);
  padding-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.confirm-btn {
  width: 100%;
  padding: 1rem;
  background-color: var(--primary-ruby);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.confirm-btn:disabled {
  background-color: #333;
  cursor: not-allowed;
}

.checkout-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.seat-type-ctrl {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Removida definição duplicada de type-select para evitar conflitos */

.seat-subtotal {
  font-weight: 600;
  color: var(--accent-gold);
}

/* Spinner */
.loader-view {
  height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ruby-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(122, 18, 18, 0.2);
  border-top: 4px solid var(--primary-ruby);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   RODAPÉ OFICIAL ESTAÇÃO RUBI
   ============================================ */
.site-footer {
    font-family: 'Raleway', sans-serif;
    width: 100%;
    margin-top: 4rem;
}

/* ============================================
   RODAPÉ OFICIAL ESTAÇÃO RUBI (EXATAMENTE COMO O ORIGINAL)
   ============================================ */
.site-footer {
    font-family: 'Raleway', sans-serif;
    width: 100%;
    margin-top: 4rem;
}

/* Barra Bege de Marcas */
.marcas {
    background-color: #c9b476; /* Tom de bege mais dourado como no print */
    padding: 10px 0; /* Padding reduzido para diminuir a altura */
    text-align: center;
}

.marcas img {
    max-width: 90%; /* Leve redução para compactar */
    height: auto;
}

/* Barra Vermelha Principal */
.section-rodape {
    background-color: #8a0204;
    padding: 15px 0; /* Padding reduzido para diminuir a altura */
    color: #ffffff;
}

.container-padrao {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center; /* Centraliza o grupo no meio da tela */
    align-items: center;
    gap: 80px; /* Mantém os dois blocos próximos um do outro */
    list-style: none; /* Remove as bolinhas do li */
}

.container-padrao li {
    display: block;
}

.section-rodape img {
    max-width: 140px; /* Reduzido de 180px para 140px */
    height: auto;
}

/* Área Social e Contatos */
.fsocial {
    text-align: left; /* Alinhado à esquerda como no original para ficar mais 'junto' */
    font-size: 18px;
    font-weight: 400; /* Removido o negrito (de 700 para 400) */
    line-height: 1.1; /* Reduzido para aproximar as linhas */
}

.fsocial span {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 2px; /* Reduzido de 5px para 2px */
}

.fsocial a img {
    width: 32px;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

/* ============================================
   RESPONSIVIDADE MOBILE — COMPLETA
   ============================================ */

/* Tablet (≤900px) */
@media (max-width: 900px) {

  /* Nav */
  #main-nav { padding: 1rem; }
  #main-nav ul { gap: 1.5rem; }
  #main-nav a { font-size: 0.85rem; letter-spacing: 0.1rem; }

  /* Main padding */
  main { padding: 1.5rem 1rem; }

  /* Home */
  .shows-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-content h2 { font-size: 2.5rem; }
  .section-title { font-size: 2rem; }

  /* Seating map */
  .seating-layout { flex-direction: column; }
  .checkout-panel { position: static; }

  /* Checkout */
  .checkout-container {
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 2rem;
  }
  .order-summary {
    border-left: none;
    border-top: 1px solid var(--glass-border);
    padding-left: 0;
    padding-top: 2rem;
  }
  .form-row { flex-direction: column; gap: 0; }

  /* Admin table — scroll horizontal */
  .admin-view { max-width: 100%; }
  .admin-card { padding: 1.5rem 1rem; }
  .admin-card table { min-width: 800px; }
  .admin-card > div { overflow-x: auto; }

  /* Modal */
  .modal-content { padding: 2rem 1.5rem; }
  .modal-actions { flex-direction: column; }
}

/* Mobile (≤600px) */
@media (max-width: 600px) {

  /* Nav */
  #main-nav ul { gap: 1rem; }
  #main-nav a { font-size: 0.75rem; letter-spacing: 0.05rem; }

  /* Main */
  main { padding: 1rem 0.75rem; }

  /* Hero */
  .hero-section { height: 40vh; }
  .hero-content h2 { font-size: 1.8rem; }
  .section-title { font-size: 1.5rem; margin-bottom: 2rem; }

  /* Show card */
  .show-banner { height: 180px; }
  .show-info h3 { font-size: 1.2rem; }

  /* Seating map — cadeiras menores para caber na tela */
  .map-container { padding: 1rem 0.5rem; }
  .seating-grid { gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); }
  .table-unit { width: 80px; height: 80px; }
  .table-surface { width: 46px; height: 46px; font-size: 0.8rem; }
  .chair { width: 20px; height: 20px; font-size: 8px; }

  /* Checkout */
  .checkout-container { padding: 1.25rem; border-radius: 1rem; }
  .checkout-view { max-width: 100%; }
  .payment-options { flex-direction: column; }
  .finish-btn { font-size: 1rem; padding: 1rem; }

  /* Modal */
  .modal-content { width: 95%; padding: 1.5rem 1rem; border-radius: 1rem; }
  .modal-header h2 { font-size: 1.6rem; }
  .qr-placeholder { width: 200px; height: 200px; }
  .ticket-data { padding: 1.25rem; }
  .ticket-info { flex-direction: column; gap: 0.25rem; }

  /* PDf/print buttons */
  .btn-pdf, .btn-home { padding: 0.9rem; font-size: 0.9rem; }

  /* Admin — hide on mobile (admin is desktop-only by design) */
  .admin-card { padding: 1rem 0.75rem; }
  .admin-card h2 { font-size: 1.3rem; }

  /* Footer */
  .site-footer { margin-top: 2rem; }
  .container-padrao {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }
  .fsocial {
    text-align: center;
  }
  .fsocial span {
    justify-content: center;
  }
  .marcas img {
    max-width: 95%;
  }
}

.mezzanine-divider {
  grid-column: 1 / -1;
  width: 100%;
  padding: 1rem;
  background-color: var(--primary-ruby);
  color: white;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.2rem;
  margin: 2rem 0;
  border-radius: 0.5rem;
}

.map-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.legend-box {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 3px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.legend-box.available { background-color: #28a745; }
.legend-box.reserved { background-color: #E0E0E0; border: 1px solid #CCC; }
.legend-box.selected { background-color: var(--accent-gold); }

/* 
   ==========================================================================
   ADMIN DASHBOARD - TOTAL CLEANUP
   ========================================================================== 
*/
/* Layout Principal Admin (Tema Claro) */
.admin-view, .auth-view {
  background-color: #FFFFFF;
  color: #333333;
  min-height: 100vh;
  margin: -2rem -2rem -2rem -2rem;
  padding: 40px;
  width: calc(100% + 4rem);
}

.admin-card {
  background: #FAF7F2; /* Bege suave combinando com o site */
  border: 1px solid #EADDCD;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}

.admin-nav-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 3rem;
  border-bottom: 2px solid #EEE;
  padding-bottom: 20px;
  align-items: center;
}

.admin-tab {
  background: #FFF;
  color: #666;
  border: 1px solid #DDD;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.admin-tab:hover {
  background: #F9F9F9;
  border-color: #BBB;
}

.admin-tab.active {
  background: var(--primary-ruby) !important;
  color: #fff !important;
  border-color: var(--primary-ruby) !important;
}

/* Tabelas Admin (Fundo Claro de Alto Contraste) */
.admin-view table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.admin-view th {
  background: #F8F8F8;
  color: #111;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 15px;
  border-bottom: 2px solid #EEE;
  letter-spacing: 0.5px;
}

.admin-view td {
  padding: 15px;
  border-bottom: 1px solid #EEE;
  color: #222222 !important; /* Força cor escura para leitura */
  vertical-align: middle;
  font-size: 0.9rem;
}

.admin-view tr:hover td {
  background-color: #F0F0F0;
}

/* Inputs da Busca */
.admin-view input {
  background: #FFF !important;
  border: 1px solid #DDD !important;
  color: #333 !important;
  height: 45px;
  border-radius: 6px !important;
  padding: 0 15px !important;
}

.admin-view input:focus {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 0 3px rgba(181, 166, 66, 0.1);
}

/* Estilos Adicionais de Admin unificados */
.back-link {
  background: none;
  border: none;
  color: var(--primary-ruby);
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  margin-bottom: 1.5rem;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Inputs da Busca (Tema Claro) */
.admin-view input {
  background: #FFFFFF !important;
  border: 1px solid #CCCCCC !important;
  color: #333333 !important;
  height: 48px;
  border-radius: 6px !important;
  padding: 0 15px !important;
  font-size: 0.95rem;
}

.admin-view input::placeholder {
  color: #999999 !important;
}

.admin-view input:focus {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 0 3px rgba(181, 166, 66, 0.1);
}

.back-link {
  background: none;
  border: none;
  color: var(--accent-gold);
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  margin-bottom: 1rem;
  transition: opacity 0.2s;
}

.back-link:hover {
  opacity: 0.7;
}

.empty-msg {
  color: var(--text-muted);
  font-style: italic;
}

/* Checkout View */
.checkout-view {
  max-width: 1000px;
  margin: 0 auto;
}

.checkout-container {
  display: flex;
  gap: 3rem;
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 3rem;
}

.checkout-main {
  flex: 2;
}

.order-summary {
  flex: 1;
  border-left: 1px solid var(--glass-border);
  padding-left: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 1rem;
  background-color: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  color: white;
  font-family: inherit;
}

.form-row {
  display: flex;
  gap: 1.5rem;
}

.payment-methods label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.payment-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.payment-opt {
  flex: 1;
  padding: 1rem;
  background-color: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.payment-opt.active {
  border-color: var(--accent-gold);
  background-color: rgba(181, 166, 66, 0.1);
}

.finish-btn {
  width: 100%;
  padding: 1.25rem;
  background-color: var(--primary-ruby);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 2rem;
}

.form-section-title {
  font-size: 1rem;
  color: var(--accent-gold);
  margin: 2rem 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
}

.summary-details {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.total-summary {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--accent-gold);
  display: flex;
  justify-content: space-between;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Admin View */
.admin-view {
  max-width: 1300px;
  margin: 0 auto;
}

.admin-card {
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 3rem;
}

.admin-card h2 {
  margin-bottom: 2rem;
  text-align: center;
}

.save-admin-btn {
  width: 100%;
  padding: 1.25rem;
  background-color: var(--accent-gold);
  color: #000;
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

/* Modal System */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.modal-content {
  background-color: var(--bg-dark);
  border: 4px solid var(--accent-gold);
  border-radius: 2rem;
  padding: 3rem;
  max-width: 600px;
  width: 90%;
  position: relative;
  box-shadow: 0 0 50px rgba(181, 166, 66, 0.3);
  animation: modalIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  text-align: center;
  margin-bottom: 2rem;
}

.modal-header h2 {
  font-size: 2.2rem;
  color: var(--accent-gold);
}

.qr-code-section {
  text-align: center;
  margin: 2rem 0;
}

.qr-placeholder {
  width: 250px;
  height: 250px;
  background-color: white;
  margin: 0 auto;
  padding: 1rem;
  border-radius: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-placeholder img { width: 100%; height: 100%; }

.pix-copy-box {
  background-color: rgba(255,255,255,0.05);
  border: 1px dashed var(--accent-gold);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: monospace;
  font-size: 0.8rem;
  overflow-x: hidden;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--accent-gold);
  cursor: pointer;
  font-weight: bold;
}

/* Success View */
.success-modal {
  text-align: center;
}

.ticket-data {
  background-color: white;
  color: #333;
  padding: 2rem;
  border-radius: 1rem;
  margin: 2rem 0;
  text-align: left;
  border-left: 10px solid var(--primary-ruby);
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  position: relative;
}

.ticket-data::after {
  content: 'ESTAÇÃO RUBI';
  position: absolute;
  bottom: 10px; right: 20px;
  font-size: 0.7rem; color: #ccc; font-weight: bold; letter-spacing: 0.2rem;
}

.ticket-info {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.ticket-info strong { color: #000; }

.ticket-item-detail {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: #555;
  font-style: italic;
}

.ticket-info-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  color: var(--primary-ruby);
  font-weight: 800;
  margin-top: 0.5rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-pdf {
  flex: 1;
  background-color: #333;
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-home {
  flex: 1;
  background-color: var(--primary-ruby);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: 700;
  cursor: pointer;
}

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

/* Print Styling */
@media print {
  body * { visibility: hidden; }
  .modal-overlay, .modal-content, .ticket-data, .ticket-data * { visibility: visible; }
  .modal-overlay { position: absolute; left: 0; top: 0; background: white; }
  .modal-content { border: none; box-shadow: none; width: 100%; top: 0; }
  .modal-actions, .close-modal { display: none; }
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--accent-gold);
  color: black;
  padding: 1rem 2rem;
  border-radius: 2rem;
  font-weight: 700;
  z-index: 2000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  opacity: 0;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   ESTILOS DE IMPRESSÃO (PDF DO TICKET)
   ========================================================================== */
@media print {
    /* Esconder tudo que não for o ticket */
    body * {
        visibility: hidden;
        background: none !important;
    }
    
    /* Mostrar apenas o conteúdo do modal e o ticket */
    .modal-overlay, .modal-overlay * {
        visibility: visible;
    }

    .modal-overlay {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white !important;
        display: block !important;
    }

    .modal-content {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
    }

    .success-modal {
        background: white !important;
        color: black !important;
        padding: 0 !important;
    }

    .modal-actions, .btn-pdf, .btn-home {
        display: none !important; /* Esconder botões no PDF */
    }

    #ticket-print {
        visibility: visible;
        width: 100% !important;
        max-width: 450px;
        margin: 0 auto !important;
        border: 2px solid #333 !important;
        padding: 40px !important;
        background: white !important;
        display: block !important;
        page-break-inside: avoid;
    }

    .ticket-info, .ticket-info-total, .ticket-item-detail {
        color: black !important;
    }

    .modal-header h2 {
        color: #9b1c26 !important;
        margin-bottom: 5px !important;
    }
}
/* Elegant Date Select in Seating View */
.elegant-date-select {
  appearance: none;
  background-color: transparent;
  border: none;
  border-bottom: 2px solid var(--accent-gold);
  color: var(--primary-ruby);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 2px 25px 2px 5px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23B5A642' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.elegant-date-select:hover {
  border-bottom-color: var(--primary-ruby);
  color: var(--primary-ruby-dark);
}

.elegant-date-select option {
  background: white;
  color: var(--text-dark);
  padding: 10px;
}

.date-selector-wrapper {
  display: inline-flex;
  align-items: center;
}

/* --- TICKETS / CONVITES --- */
.ticket-modal-content {
    max-width: 700px !important;
    padding: 25px !important;
    background: #fff !important;
}

.official-ticket {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    color: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    min-height: 400px;
    position: relative;
}

.ticket-header {
    background: var(--primary-ruby);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--accent-gold);
}

.ticket-logo {
    height: 40px;
}

.ticket-type {
    color: #fff;
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 4px 12px;
    border-radius: 20px;
}

.ticket-body {
    padding: 30px;
    flex-grow: 1;
    background: radial-gradient(circle at 100% 50%, transparent 20px, #fff 21px),
                radial-gradient(circle at 0% 50%, transparent 20px, #fff 21px);
}

.ticket-main-info .show-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--primary-ruby);
    margin-bottom: 10px;
    line-height: 1.1;
}

.show-datetime {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
}

.ticket-guest-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
}

.guest-name, .guest-seats {
    font-size: 1rem;
    margin-bottom: 8px;
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 20px 30px;
    background: #fdfdfd;
    border-top: 1px solid #eee;
}

.tracking-label {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 4px;
}

.tracking-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.qr-code-dummy {
    width: 60px;
    height: 60px;
    background: #000;
    margin: 0 auto;
    /* Placeholder for a QR code look */
    background-image: linear-gradient(45deg, #fff 25%, transparent 25%), 
                      linear-gradient(-45deg, #fff 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #fff 75%), 
                      linear-gradient(-45deg, transparent 75%, #fff 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
}

.ticket-stub {
    display: none; /* Apenas visível no impresso se desejar */
}

/* --- PRINT RULES --- */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-ticket, #printable-ticket * {
        visibility: visible;
    }
    #printable-ticket {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
        box-shadow: none;
    }
    .no-print {
        display: none !important;
    }
}
