/* =======================
   SECCIÓN: LOGIN PAGE
   ======================= */

.login-container {
  display: flex;
  min-height: 100vh;
  background: #f7f9fc;
}

.login-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  padding: 40px;
}

.login-form-box {
  width: 100%;
  max-width: 400px;
}

.login-image-side {
  flex: 1;
  background: url('https://images.unsplash.com/photo-1515169067865-5387ec356754?auto=format&fit=crop&w=1200&q=80')
    no-repeat center center;
  background-size: cover;
  position: relative;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
}

.login-form-box h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.login-form-box p {
  color: #666;
  margin-bottom: 25px;
}

.login-form-box label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.login-form-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.login-form-box input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
  outline: none;
}

.btn-primary {
  width: 100%;
  background-color: #007bff;
  color: white;
  padding: 12px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.auth-links {
  text-align: center;
  margin-top: 15px;
}

.auth-links a {
  color: #007bff;
  text-decoration: none;
  display: inline-block;
  margin: 5px 0;
  transition: color 0.3s ease;
}

.auth-links a:hover {
  color: #0056b3;
}

/* Responsive */
@media (max-width: 900px) {
  .login-container {
    flex-direction: column;
  }

  .login-image-side {
    display: none;
  }

  .login-form-side {
    flex: none;
    height: 100vh;
  }
}



/* ======== Encabezado principal ======== */
.app-header {
  background-color: #1E3A8A;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header h1 {
  font-size: 1.4rem;
  margin: 0;
}

/* ======== Dashboard ======== */
.dashboard {
  padding: 2rem;
  max-width: 900px;
  margin: auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.event-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.event-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.event-card h3 {
  margin-top: 0;
  color: #1E3A8A;
}

/* ======== Formularios generales ======== */
.form-page {
  display: flex;
  justify-content: center;
  padding: 3rem 1rem;
}

.form-card {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  max-width: 700px;
  width: 100%;
}

.form-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #1E3A8A;
}

textarea {
  resize: none;
}

/* ======== Botón secundario y contorno ======== */
/* ======== BOTÓN CREAR EVENTO ======== */
.btn-create {
  display: inline-block;
  padding: 10px 18px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  width: auto; /* evita que se estire */
}

.btn-create:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}


/* ======== BOTÓN CERRAR SESIÓN ======== */
.btn-logout {
  display: inline-block;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-logout:hover {
  background-color: #b52a37;
  transform: translateY(-2px);
}


/* =======================
   MENSAJES DE ESTADO (ÉXITO / ERROR)
   ======================= */

.message {
  display: none; /* <-- se oculta por defecto */
  position: relative;
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.4s ease;
}

/* Éxito */
.message.success {
  background-color: #e8f8ef;
  color: #157347;
  border-left: 5px solid #198754;
}

/* Error */
.message.error {
  background-color: #fde8e8;
  color: #b02a37;
  border-left: 5px solid #dc3545;
}

/* Ícono o acento visual opcional */
.message::before {
  content: "ℹ️";
  font-size: 1.2rem;
}

.message.success::before {
  content: "✅";
}

.message.error::before {
  content: "⚠️";
}

/* Animación suave */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* =======================
   FIN MENSAJES DE ESTADO
   ======================= */

   /* ======== BOTÓN SECUNDARIO (Regresar) ======== */
.btn-secondary {
  display: inline-block;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-secondary:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
}


/* ======== BOTÓN AZUL CLARO (Agregar Invitado) ======== */
.btn-light-blue {
  display: inline-block;
  background-color: #3da9fc;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-light-blue:hover {
  background-color: #1b7ed6;
  transform: translateY(-2px);
}


/* ======== BOTÓN VERDE (Guardar) ======== */
.btn-success {
  display: inline-block;
  background-color: #198754;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-success:hover {
  background-color: #157347;
  transform: translateY(-2px);
}

/* ======== Ajustes visuales para select ======== */
select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 16px;
  background-color: white;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
  outline: none;
}



/* ======== FORMULARIOS ======== */
.form-group {
  margin-bottom: 1.5rem; /* aumenta el espaciado entre los campos */
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
  outline: none;
}
/* ======== FIN FORMULARIOS ======== */



/* Contenedor general que mantiene la tabla dentro del form-card */
.responsive-table-container {
    width: 100%;
    overflow-x: auto;        /* Permite scroll si la tabla es muy ancha */
    -webkit-overflow-scrolling: touch;
    margin-top: 10px;
    border-radius: 8px;
}

/* Estilo base para la tabla */
.event-guest-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 850px;        /* Evita que columnas como Fecha se compriman demasiado */
}

/* Header */
.event-guest-table thead th {
    background-color: #f8f9fa;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;     /* Evita que la fecha se rompa en 2 líneas */
}

/* Celdas */
.event-guest-table tbody td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    white-space: nowrap;     /* Mantiene la fecha en una sola línea */
}

/* Alternancia de filas */
.event-guest-table tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* Hover */
.event-guest-table tbody tr:hover {
    background-color: #f2f6ff;
}

/* Responsiveness adicional */
@media (max-width: 768px) {
    .event-guest-table {
        font-size: 0.85rem;
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .event-guest-table {
        font-size: 0.8rem;
        min-width: 500px;
    }
}



/* ======== FORM CARD ESPECIAL SOLO PARA TABLAS AMPLIAS ======== */
.form-card-wide {
    width: 100%;
    max-width: 1200px;   /* Más ancho que el form-card normal */
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* Título dentro del card */
.form-card-wide h3 {
    margin-bottom: 1.5rem;
    color: #1E3A8A;
    font-size: 1.4rem;
    font-weight: 700;
}

/* ======== TABLA ESPECIAL ======== */
.table-wide {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

/* Encabezado */
.table-wide thead th {
    background: #f3f4f6;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
    white-space: nowrap; /* La fecha se mantiene en una línea */
}

/* Celdas */
.table-wide tbody td {
    padding: 10px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* Alternancia */
.table-wide tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Hover */
.table-wide tbody tr:hover {
    background: #eef3ff;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 1100px) {
    .form-card-wide {
        max-width: 95%;
    }
}

@media (max-width: 900px) {
    .table-wide {
        font-size: 0.85rem;
    }
}

@media (max-width: 600px) {
    .form-card-wide {
        padding: 1.2rem;
    }

    /* Permite que la tabla se autoajuste sin romper columnas */
    .table-wide thead th,
    .table-wide tbody td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .table-wide {
        font-size: 0.8rem;
    }
}
