/* ============================================================
   ESTILO MODERNO COMPARTIDO — Registro y Listado de Reservas
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #07070d;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.10);
  --text: #f2f3f8;
  --text-dim: #9aa0b4;
  --accent: #2d8fc4;   /* Azul acero del logo */
  --accent-2: #5ad1e6; /* Cian claro */
  --accent-3: #ff5d7e; /* Coral para errores y acentos */
  --ok: #2dd4a0;
  --warn: #ffb020;
  --radius: 20px;
}

html { color-scheme: dark; }

body {
  min-height: 100vh;
  font-family: 'Sora', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Fondo con orbes de gradiente animados --- */
.orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: flotar 18s ease-in-out infinite alternate;
}
.orb-1 { width: 480px; height: 480px; top: -140px; left: -120px;
  background: radial-gradient(circle, var(--accent), transparent 70%); }
.orb-2 { width: 420px; height: 420px; bottom: -120px; right: -100px;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  animation-delay: -6s; }
.orb-3 { width: 340px; height: 340px; top: 40%; left: 55%;
  background: radial-gradient(circle, var(--accent-3), transparent 70%);
  opacity: 0.28; animation-delay: -12s; }

@keyframes flotar {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, -50px) scale(1.15); }
}

/* --- Malla sutil sobre el fondo --- */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
}

/* --- Estructura --- */
.contenedor {
  width: min(100% - 2.5rem, 1100px);
  margin-inline: auto;
  padding-block: 2.5rem 4rem;
}
.contenedor--angosto { width: min(100% - 2.5rem, 560px); }

/* --- Barra de navegación --- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 2.75rem;
}
.marca { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text); }
.marca-icono {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center; font-size: 1.15rem;
  background: #eef2f5;
  box-shadow: 0 8px 24px rgba(45, 143, 196, 0.45);
  overflow: hidden;
}
.marca-icono img { width: 100%; height: 100%; object-fit: cover; }
.marca-texto { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.01em; }
.marca-texto span { color: var(--text-dim); font-weight: 400; }

.nav-enlaces { display: flex; gap: 0.5rem; }
.nav-enlace {
  padding: 0.6rem 1.1rem; border-radius: 999px;
  text-decoration: none; font-size: 0.9rem; font-weight: 600;
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.nav-enlace:hover { color: var(--text); background: var(--surface); }
.nav-enlace.activo {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--border);
}

/* --- Encabezado de página --- */
.encabezado { margin-bottom: 2rem; }
.etiqueta-sup {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-2);
  margin-bottom: 0.9rem;
}
.etiqueta-sup::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}
.titulo {
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  font-weight: 800; line-height: 1.12; letter-spacing: -0.02em;
}
.titulo .degradado {
  background: linear-gradient(92deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.subtitulo { margin-top: 0.7rem; color: var(--text-dim); font-size: 1rem; line-height: 1.6; }

/* --- Tarjeta de vidrio --- */
.tarjeta {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.tarjeta::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 1px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
}

/* --- Formulario --- */
.form { display: grid; gap: 1.25rem; }
.fila-doble { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 520px) { .fila-doble { grid-template-columns: 1fr; } }

.campo { display: grid; gap: 0.45rem; }
.campo label {
  font-size: 0.82rem; font-weight: 600; color: var(--text-dim);
  letter-spacing: 0.02em;
}
.campo input, .campo select {
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit; font-size: 0.95rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.campo input::placeholder { color: rgba(154, 160, 180, 0.55); }
.campo input:focus, .campo select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(45, 143, 196, 0.25);
  background: rgba(0, 0, 0, 0.5);
}
.campo select option { background: #14141f; color: var(--text); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8); cursor: pointer; }

/* --- Botones --- */
.boton {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  font: inherit; font-size: 0.98rem; font-weight: 700;
  color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #1d6fa5, var(--accent-2));
  border: none; border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(45, 143, 196, 0.4);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  overflow: hidden;
}
.boton:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(45, 143, 196, 0.55); filter: brightness(1.06); }
.boton:active { transform: translateY(0); }
.boton::after {
  content: '';
  position: absolute; top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s;
}
.boton:hover::after { left: 130%; }

.boton--fantasma {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none; color: var(--text);
}
.boton--fantasma:hover { box-shadow: none; background: var(--surface-strong); }

/* --- Alertas --- */
.alerta {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.9rem 1.1rem; margin-bottom: 1.4rem;
  border-radius: 13px; font-size: 0.92rem; font-weight: 600;
  animation: aparecer 0.4s ease;
}
.alerta--ok { background: rgba(45, 212, 160, 0.12); border: 1px solid rgba(45, 212, 160, 0.35); color: var(--ok); }
.alerta--error { background: rgba(255, 77, 141, 0.12); border: 1px solid rgba(255, 77, 141, 0.35); color: var(--accent-3); }

@keyframes aparecer {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Estadísticas (página de listado) --- */
.estadisticas {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem; margin-bottom: 1.75rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.stat-valor { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-nombre { font-size: 0.78rem; color: var(--text-dim); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.2rem; }

/* --- Tabla de reservas --- */
.tabla-envoltura { overflow-x: auto; border-radius: var(--radius); }
table.reservas { width: 100%; border-collapse: collapse; min-width: 680px; }
table.reservas th {
  text-align: left; padding: 0.85rem 1rem;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.reservas td {
  padding: 0.95rem 1rem;
  font-size: 0.93rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  white-space: nowrap;
}
table.reservas tbody tr { transition: background 0.15s; }
table.reservas tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
table.reservas tbody tr:last-child td { border-bottom: none; }

.codigo {
  font-family: 'Consolas', monospace; font-size: 0.85rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--accent-2);
  padding: 0.25rem 0.6rem; border-radius: 8px;
}
.valor-dinero { font-weight: 700; color: var(--ok); }

.insignia {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.75rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700;
}
.insignia::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.insignia--confirmada { background: rgba(45, 212, 160, 0.13); color: var(--ok); border: 1px solid rgba(45, 212, 160, 0.3); }
.insignia--pendiente { background: rgba(255, 176, 32, 0.13); color: var(--warn); border: 1px solid rgba(255, 176, 32, 0.3); }
.insignia--procesando { background: rgba(90, 209, 230, 0.13); color: var(--accent-2); border: 1px solid rgba(90, 209, 230, 0.3); }

/* Selector de estado dentro de la tabla (solo admin) */
.select-status {
  font: inherit; font-size: 0.8rem; font-weight: 700;
  padding: 0.3rem 0.6rem; border-radius: 999px;
  cursor: pointer; outline: none;
  transition: box-shadow 0.2s;
}
.select-status:focus { box-shadow: 0 0 0 3px rgba(90, 209, 230, 0.25); }
.select-status option { background: #14141f; color: var(--text); }
.select-status.insignia--pendiente  { background: rgba(255, 176, 32, 0.13); }
.select-status.insignia--procesando { background: rgba(90, 209, 230, 0.13); }
.select-status.insignia--confirmada { background: rgba(45, 212, 160, 0.13); }

.vacio { text-align: center; padding: 3.5rem 1rem; color: var(--text-dim); }
.vacio-icono { font-size: 2.6rem; margin-bottom: 0.8rem; }

/* --- Animación de entrada de tarjetas --- */
.animar { animation: subir 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.animar-2 { animation-delay: 0.08s; }
.animar-3 { animation-delay: 0.16s; }
@keyframes subir {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
