:root {
  --azul: #0d3b66;
  --azul-claro: #1565c0;
  --gris-fondo: #eef1f5;
  --gris-borde: #d9dee3;
  --verde: #2e7d32;
  --rojo: #c62828;
  --texto: #1c1f24;
  --radio: 14px;
  --sombra-suave: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 10px rgba(16, 24, 40, 0.06);
  --sombra-media: 0 2px 4px rgba(16, 24, 40, 0.06), 0 10px 24px rgba(16, 24, 40, 0.10);
  --sombra-fuerte: 0 4px 8px rgba(16, 24, 40, 0.08), 0 16px 36px rgba(16, 24, 40, 0.16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, #e4ecf7 0%, transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, #eaf2ea 0%, transparent 55%),
    var(--gris-fondo);
  background-attachment: fixed;
  color: var(--texto);
}

a { color: var(--azul-claro); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--gris-borde);
  padding: 10px 20px;
  gap: 10px;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}

.reloj {
  justify-self: center;
  text-align: center;
  font-weight: 600;
  color: var(--azul);
  font-size: 0.95rem;
  white-space: nowrap;
}

.marca {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--azul);
  font-size: 1.1rem;
}

.logo {
  height: 42px;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.15);
  transition: transform 0.15s ease;
}
.marca:hover .logo { transform: scale(1.04); }

.boton-inicio {
  background: linear-gradient(180deg, #1b73d6 0%, var(--azul-claro) 100%);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(13, 59, 102, 0.15), 0 4px 10px rgba(21, 101, 192, 0.28);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.marca:hover .boton-inicio { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(13, 59, 102, 0.18), 0 6px 14px rgba(21, 101, 192, 0.32); }

.nav-principal { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.usuario-actual { color: #555; font-size: 0.9rem; }

.contenido { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }

.mensajes { margin-bottom: 16px; }
.mensaje { padding: 10px 14px; border-radius: var(--radio); margin-bottom: 8px; font-size: 0.95rem; box-shadow: var(--sombra-suave); }
.mensaje-success { background: #e6f4ea; color: var(--verde); border: 1px solid #b6dfc0; }
.mensaje-error { background: #fdecea; color: var(--rojo); border: 1px solid #f3c1bc; }

.tarjeta {
  background: #fff;
  border: 1px solid rgba(217, 222, 227, 0.6);
  border-radius: var(--radio);
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: var(--sombra-media);
}

.tarjeta h2, .tarjeta h3 { margin-top: 0; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}
.pill-disponible { background: #e6f4ea; color: var(--verde); }
.pill-ocupado { background: #fdecea; color: var(--rojo); }

.estrellas { letter-spacing: 2px; color: #f5a623; font-size: 1.05rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--gris-borde); font-size: 0.92rem; }
th { color: #555; font-weight: 600; }
tbody tr { transition: background-color 0.12s ease; }
tbody tr:hover { background-color: #f7f9fc; }

.en-linea { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.en-linea form { margin: 0; }

label { display: block; font-size: 0.85rem; color: #444; margin-bottom: 4px; margin-top: 10px; }
input[type=text], input[type=password], input[type=date], input[type=number], input[type=file], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--gris-borde);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fbfcfe;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--azul-claro);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
  background: #fff;
}
textarea { min-height: 90px; resize: vertical; }

button, .boton {
  display: inline-block;
  background: linear-gradient(180deg, #1b73d6 0%, var(--azul-claro) 100%);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  margin-top: 12px;
  box-shadow: 0 1px 2px rgba(13, 59, 102, 0.15), 0 4px 10px rgba(21, 101, 192, 0.28);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
button:hover, .boton:hover {
  background: linear-gradient(180deg, #1565c0 0%, var(--azul) 100%);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(13, 59, 102, 0.2), 0 8px 16px rgba(21, 101, 192, 0.32);
}
button:active, .boton:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(13, 59, 102, 0.2); }
button.secundario, .boton.secundario { background: linear-gradient(180deg, #7b848c 0%, #6c757d 100%); box-shadow: 0 1px 2px rgba(0,0,0,0.12), 0 4px 10px rgba(108, 117, 125, 0.25); }
button.secundario:hover, .boton.secundario:hover { background: linear-gradient(180deg, #6c757d 0%, #5a6268 100%); }
button.peligro, .boton.peligro { background: linear-gradient(180deg, #d64545 0%, var(--rojo) 100%); box-shadow: 0 1px 2px rgba(0,0,0,0.12), 0 4px 10px rgba(198, 40, 40, 0.3); }
button.peligro:hover, .boton.peligro:hover { background: linear-gradient(180deg, var(--rojo) 0%, #a02020 100%); }

.foto-perfil {
  width: 200px; height: 200px; max-width: 60vw; max-height: 60vw;
  object-fit: cover; border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: var(--sombra-fuerte);
}

.tabs-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab-boton {
  background: #fff;
  color: var(--azul-claro);
  border: 1px solid var(--gris-borde);
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  margin-top: 0;
  box-shadow: var(--sombra-suave);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.tab-boton:hover { background: #eef4fb; transform: translateY(-1px); box-shadow: var(--sombra-media); }
.tab-boton.activo { background: linear-gradient(180deg, #1b73d6 0%, var(--azul-claro) 100%); color: #fff; border-color: var(--azul-claro); box-shadow: 0 4px 12px rgba(21, 101, 192, 0.35); }
.tab-panel { display: none; }
.tab-panel.activo { display: block; }

.calendario-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.calendario-nav h3 { margin: 0; }
.calendario-nav .boton { margin-top: 0; }
.calendario-tabla { table-layout: fixed; }
.calendario-tabla th { text-align: center; padding: 6px 2px; font-size: 0.8rem; }
.calendario-tabla td {
  text-align: center;
  vertical-align: top;
  border: 1px solid var(--gris-borde);
  padding: 4px 2px;
  height: 56px;
}
.dia-numero { font-weight: 600; font-size: 0.85rem; }
.dia-fuera-mes { opacity: 0.35; }
.dia-hoy { background: #eef4fb; box-shadow: inset 0 0 0 2px var(--azul-claro); }
.dia-hora { font-size: 0.68rem; line-height: 1.2; }
.dia-entrada { color: var(--verde); }
.dia-salida { color: var(--rojo); }

@media (max-width: 600px) {
  .calendario-tabla th, .calendario-tabla td { font-size: 0.75rem; padding: 2px 1px; }
  .dia-hora { font-size: 0.6rem; }
}

.acordeon {
  background: #fff;
  border: 1px solid rgba(217, 222, 227, 0.6);
  border-radius: var(--radio);
  margin-bottom: 14px;
  box-shadow: var(--sombra-media);
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}
.acordeon[open] { box-shadow: var(--sombra-fuerte); }
.acordeon summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--azul);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background-color 0.15s ease;
}
.acordeon summary::-webkit-details-marker { display: none; }
.acordeon summary::after {
  content: "▾";
  color: var(--azul-claro);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.acordeon[open] summary::after { transform: rotate(180deg); }
.acordeon summary:hover { background: #f8fafc; }
.acordeon-contenido { padding: 4px 20px 20px; border-top: 1px solid var(--gris-borde); }

.encabezado-cliente {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-claro) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 6px 20px rgba(13, 59, 102, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.encabezado-cliente h2 { color: #fff; margin-bottom: 0; }
.logo-cliente {
  height: 96px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  background: #fff;
  padding: 8px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.fotos-informe { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.miniatura-foto { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.miniatura-foto img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--gris-borde); box-shadow: var(--sombra-suave); }
.miniatura-foto button { margin-top: 0; padding: 4px 10px; font-size: 0.78rem; }
.foto-miniatura { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--gris-borde); box-shadow: var(--sombra-suave); transition: transform 0.15s ease; }
.foto-miniatura:hover { transform: scale(1.04); }

.lista-buzon li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-radius: 8px;
  transition: background-color 0.12s ease;
}
.lista-buzon li form { margin: 0; }
.lista-buzon li.no-leida { font-weight: 600; background: #f8fafc; margin: 0 -12px; padding: 8px 12px; border-radius: 8px; box-shadow: var(--sombra-suave); }
.buzon-titulo { display: block; font-weight: 700; color: var(--azul); }
.buzon-fecha { color: #888; font-size: 0.82rem; font-weight: 400; margin-right: 10px; }
.buzon-texto { margin-right: 8px; }

.login-caja {
  max-width: 380px;
  margin: 70px auto;
  background: #fff;
  border: 1px solid rgba(217, 222, 227, 0.6);
  border-radius: calc(var(--radio) + 4px);
  padding: 36px 30px;
  text-align: center;
  box-shadow: var(--sombra-fuerte);
}
.login-caja .logo { height: 72px; margin-bottom: 10px; box-shadow: 0 4px 14px rgba(16, 24, 40, 0.2); }

.lista-simple { list-style: none; padding: 0; margin: 0; }
.lista-simple li { padding: 8px 0; border-bottom: 1px solid var(--gris-borde); }
.lista-simple li:last-child { border-bottom: none; }

.pie-pagina {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px 30px;
  text-align: center;
  color: #99a1ab;
  font-size: 0.78rem;
}

@media (max-width: 600px) {
  .topbar { grid-template-columns: 1fr; justify-items: start; }
  .reloj { justify-self: start; }
}

/* ---- Landing pública + catálogo: animaciones ---- */

.landing-hero {
  text-align: center;
  padding: 64px 24px;
  border-radius: calc(var(--radio) + 8px);
  color: #fff;
  background: linear-gradient(120deg, var(--azul) 0%, var(--azul-claro) 45%, #1b8f6f 100%);
  background-size: 200% 200%;
  animation: landing-gradiente 12s ease infinite;
  box-shadow: var(--sombra-fuerte);
  margin-bottom: 24px;
}
@keyframes landing-gradiente {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.landing-hero .logo { height: 84px; margin-bottom: 18px; box-shadow: 0 6px 18px rgba(0,0,0,0.25); animation: landing-flotar 3.5s ease-in-out infinite; }
@keyframes landing-flotar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.landing-hero h1 { margin: 0 0 10px; font-size: 2.2rem; }
.landing-hero p { font-size: 1.08rem; max-width: 620px; margin: 0 auto 24px; opacity: 0.95; }
.landing-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.landing-cta .boton { background: #fff; color: var(--azul); font-size: 1rem; padding: 12px 24px; }
.landing-cta .boton:hover { background: #eef4fb; }
.landing-cta .boton.secundario { background: rgba(255,255,255,0.14); color: #fff; box-shadow: none; border: 1px solid rgba(255,255,255,0.6); }
.landing-cta .boton.secundario:hover { background: rgba(255,255,255,0.24); }

.stat-card { text-align: center; }
.stat-numero { font-size: 2.4rem; font-weight: 700; color: var(--azul-claro); line-height: 1.1; }
.stat-etiqueta { color: #667; font-size: 0.9rem; margin-top: 4px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

.logos-clientes { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; align-items: center; margin-top: 10px; }
.logo-cliente-card { display: flex; align-items: center; justify-content: center; min-height: 96px; padding: 10px 18px; }
.logo-empresa-publica {
  max-height: 88px;
  max-width: 240px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.75;
  transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.logo-empresa-publica:hover { filter: grayscale(0%); opacity: 1; transform: scale(1.05); }
.logo-empresa-texto {
  font-weight: 700;
  color: var(--azul);
  font-size: 1.3rem;
  padding: 12px 22px;
  border: 1px solid var(--gris-borde);
  border-radius: 999px;
  background: #fff;
}
