@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Montserrat:wght@300;400;500;600&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

:root {
  --fundo: #0a0f0c;
  --fundo-card: #0f1a14;
  --verde-escuro: #122a1e;
  --verde-accent: #1a4030;
  --dourado: #c9a84c;
  --dourado-claro: #ddc477;
  --dourado-brilho: #e8d08a;
  --branco: #f0ece4;
  --cinza-texto: #6a7a70;
}

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

/* ==============================
   PAGINA PUBLICA
   ============================== */

body.pagina-publica {
  font-family: 'Montserrat', sans-serif;
  background: var(--fundo);
  color: var(--branco);
  min-height: 100vh;
  overflow-x: hidden;
}

.pagina-wrapper {
  position: relative;
  min-height: 100vh;
  background: transparent;
}

/* Logo da medicina como marca d'agua */
.medicina-bg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.medicina-bg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.conteudo {
  position: relative;
  z-index: 1;
}

/* === FOTO === */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 0;
}

.foto-container {
  width: 340px;
  height: 460px;
  border-radius: 200px 200px 20px 20px;
  overflow: hidden;
  border: 2px solid rgba(201, 168, 76, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  margin-bottom: 40px;
  position: relative;
}

.foto-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, var(--fundo), transparent);
  pointer-events: none;
}

.foto-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* === INFO DO EVENTO === */

.evento-info {
  text-align: center;
  max-width: 550px;
  padding: 0 20px;
}

.medicina-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--dourado);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.medicina-label::before,
.medicina-label::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--dourado);
  opacity: 0.3;
}

.evento-info h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 400;
  color: var(--branco);
  margin-bottom: 6px;
  line-height: 1.25;
  letter-spacing: 1px;
}

.evento-info .curso {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--dourado-claro);
  margin-bottom: 44px;
  font-weight: 300;
  opacity: 0.8;
}

/* Data grande */
.data-destaque {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
}

.data-numero {
  font-family: 'Cormorant Garamond', serif;
  font-size: 6rem;
  font-weight: 600;
  color: var(--dourado);
  line-height: 1;
}

.data-separador {
  width: 1px;
  height: 75px;
  background: linear-gradient(to bottom, transparent, var(--dourado), transparent);
  opacity: 0.5;
}

.data-mes-ano {
  text-align: left;
}

.data-mes-ano .mes {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--branco);
  text-transform: uppercase;
  letter-spacing: 4px;
  line-height: 1.2;
}

.data-mes-ano .ano {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  color: var(--dourado-claro);
  letter-spacing: 6px;
  opacity: 0.7;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 36px;
}

.divider::before,
.divider::after {
  content: '';
  width: 50px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201, 168, 76, 0.3));
}

.divider::after {
  background: linear-gradient(to left, transparent, rgba(201, 168, 76, 0.3));
}

.divider-icon {
  color: var(--dourado);
  font-size: 0.6rem;
  opacity: 0.5;
}

/* Detalhes */
.detalhes {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.detalhe-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.1rem;
  color: rgba(240, 236, 228, 0.7);
}

.detalhe-item .icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 50%;
  font-size: 0.9rem;
  color: var(--dourado);
  flex-shrink: 0;
  background: rgba(201, 168, 76, 0.04);
}

.detalhe-item strong {
  color: var(--branco);
  font-weight: 500;
}

.detalhe-item .endereco {
  font-size: 1rem;
  color: rgba(240, 236, 228, 0.45);
}

/* ==============================
   TOGGLE + ACOMPANHANTES
   ============================== */

.toggle-group {
  display: flex;
  gap: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.15);
}

.toggle-btn {
  flex: 1;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  color: rgba(240, 236, 228, 0.5);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.toggle-btn.active {
  background: rgba(201, 168, 76, 0.15);
  color: var(--dourado);
}

.toggle-btn:first-child {
  border-right: 1px solid rgba(201, 168, 76, 0.15);
}

.acompanhantes-section {
  margin-bottom: 4px;
}

.acompanhantes-section .form-group {
  margin-bottom: 18px;
}

/* ==============================
   FORMULARIO
   ============================== */

.form-section {
  max-width: 540px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.form-titulo {
  text-align: center;
  margin-bottom: 40px;
}

.form-titulo h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--branco);
  margin-bottom: 6px;
}

.form-titulo p {
  color: var(--cinza-texto);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dourado);
  margin-bottom: 10px;
  opacity: 0.8;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: 6px;
  color: var(--branco);
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: rgba(201, 168, 76, 0.4);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.06);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

.form-group select option {
  background: var(--fundo);
  color: var(--branco);
}

.btn-confirmar {
  display: block;
  width: 100%;
  padding: 18px;
  margin-top: 36px;
  background: var(--dourado);
  color: var(--fundo);
  border: none;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-confirmar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201, 168, 76, 0.25);
  background: var(--dourado-claro);
}

.btn-confirmar:active {
  transform: translateY(0);
}

.btn-confirmar:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ==============================
   SUCESSO
   ============================== */

.sucesso {
  display: none;
  text-align: center;
  padding: 80px 20px;
}

.sucesso.visivel {
  display: block;
}

.sucesso .check {
  width: 60px;
  height: 60px;
  border: 2px solid var(--dourado);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--dourado);
  margin: 0 auto 24px;
}

.sucesso h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--dourado);
  margin-bottom: 8px;
}

.sucesso p {
  color: var(--cinza-texto);
  font-size: 0.85rem;
}

/* ==============================
   ERRO
   ============================== */

.erro-msg {
  display: none;
  background: rgba(160, 40, 40, 0.12);
  border: 1px solid rgba(160, 40, 40, 0.25);
  color: #d4a0a0;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 20px;
  text-align: center;
}

.erro-msg.visivel {
  display: block;
}

/* ==============================
   ADMIN PAGE
   ============================== */

body.pagina-admin {
  font-family: 'Montserrat', sans-serif;
  background: #0a0a0a;
  color: #eee;
  min-height: 100vh;
}

.admin-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

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

.admin-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: #eee;
}

.btn-logout {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #888;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}

.btn-logout:hover {
  border-color: var(--dourado);
  color: var(--dourado);
}

/* Login */
.login-container {
  max-width: 380px;
  margin: 120px auto;
  padding: 40px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.login-container h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  text-align: center;
  color: #eee;
  margin-bottom: 24px;
}

.login-container .form-group {
  margin-bottom: 16px;
}

.login-container .form-group label {
  color: #888;
}

.login-container .form-group input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #eee;
}

.login-container .form-group input:focus {
  border-color: var(--dourado);
}

.btn-login {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--dourado);
  color: #0a0a0a;
  border: none;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-login:hover {
  transform: translateY(-2px);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.stat-card .numero {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dourado);
}

.stat-card .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin-top: 4px;
}

/* Table */
.tabela-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
}

.tabela-container table {
  width: 100%;
  border-collapse: collapse;
}

.tabela-container th {
  background: rgba(255, 255, 255, 0.04);
  padding: 14px 16px;
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dourado);
  font-weight: 600;
}

.tabela-container td {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  color: #bbb;
}

.tabela-container tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.btn-remover {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(200, 40, 40, 0.25);
  color: #e07070;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-remover:hover {
  background: rgba(200, 40, 40, 0.1);
}

.sem-convidados {
  text-align: center;
  padding: 48px 20px;
  color: #555;
  font-size: 0.85rem;
}

/* Acompanhante tags com X */
.td-acomp {
  min-width: 200px;
}

.acomp-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 4px;
  padding: 4px 8px;
  margin: 2px 4px 2px 0;
  font-size: 0.8rem;
  color: #ccc;
}

.btn-x {
  background: none;
  border: none;
  color: #e07070;
  font-size: 1rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.btn-x:hover {
  opacity: 1;
}

.btn-editar-acomp {
  padding: 3px 10px;
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.25);
  color: var(--dourado);
  border-radius: 4px;
  font-size: 0.65rem;
  cursor: pointer;
  margin-left: 4px;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.3s;
}

.btn-editar-acomp:hover {
  background: rgba(201, 168, 76, 0.1);
}

/* Edição inline de acompanhantes */
.editar-acomp-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-editar-acomp {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 4px;
  color: #eee;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  width: 100%;
}

.input-editar-acomp:focus {
  outline: none;
  border-color: var(--dourado);
}

.editar-acomp-btns {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-salvar-acomp {
  padding: 4px 12px;
  background: var(--dourado);
  color: #0a0a0a;
  border: none;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
}

.btn-salvar-acomp:hover {
  background: var(--dourado-claro);
}

.btn-cancelar-acomp {
  padding: 4px 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #888;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
}

.btn-cancelar-acomp:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #aaa;
}

/* ==============================
   LISTA COMPLETA
   ============================== */

.lista-completa-container {
  margin-top: 32px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 28px;
}

.lista-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.lista-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: #eee;
}

.btn-copiar {
  padding: 8px 20px;
  background: var(--dourado);
  color: #0a0a0a;
  border: none;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.btn-copiar:hover {
  transform: translateY(-1px);
  background: var(--dourado-claro);
}

.lista-descricao {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 20px;
}

.lista-completa {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lista-pessoa {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 0.9rem;
  color: #ddd;
}

.lista-pessoa.lista-acompanhante {
  padding-left: 32px;
  background: rgba(255, 255, 255, 0.015);
  color: #aaa;
}

.lista-numero {
  color: var(--dourado);
  font-weight: 600;
  margin-right: 8px;
  font-size: 0.8rem;
}

.tag-acomp {
  font-size: 0.7rem;
  color: #666;
  font-style: italic;
}

.copiado-msg {
  display: none;
  text-align: center;
  margin-top: 12px;
  padding: 8px;
  background: rgba(26, 64, 48, 0.3);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 6px;
  color: var(--dourado);
  font-size: 0.8rem;
}

.copiado-msg.visivel {
  display: block;
}

/* ==============================
   RESPONSIVO
   ============================== */

@media (max-width: 600px) {
  .foto-container {
    width: 260px;
    height: 360px;
  }

  .evento-info h1 {
    font-size: 2.2rem;
  }

  .data-numero {
    font-size: 4.5rem;
  }

  .data-mes-ano .mes {
    font-size: 1.6rem;
  }

  .medicina-bg {
    width: 400px;
    height: 400px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .tabela-container {
    overflow-x: auto;
  }

  .admin-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}
