* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  margin: 0;
  background: #f4f5f7;
  color: #1f2933;
}
.cabecera {
  background: #1d3557;
  color: white;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.cabecera h1 { font-size: 1.15rem; margin: 0; }
.cabecera nav a {
  color: white;
  margin-left: 16px;
  text-decoration: none;
  font-size: 0.95rem;
}
.cabecera nav a:hover { text-decoration: underline; }
.cabecera nav .enlace-boton {
  background: none;
  border: none;
  color: white;
  margin-left: 16px;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.cabecera nav .enlace-boton:hover { text-decoration: underline; }
.selector-idioma {
  margin-left: 16px;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #45608a;
  background: #24476f;
  color: white;
}

/* Banner de selección de idioma: pensado para que sea lo primero que ve un huésped, ya
   que muchos se saltan el paso de cambiar de idioma sin darse cuenta de que existe. */
.banner-idioma {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #1d3557;
  color: white;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.banner-idioma-icono {
  font-size: 2.6rem;
  line-height: 1;
}
.banner-idioma-cuerpo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}
.banner-idioma-texto {
  font-size: 0.88rem;
  color: #cdd8ea;
  letter-spacing: 0.01em;
}
.selector-idioma-grande {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 8px;
  border: 2px solid #f2b705;
  background: white;
  color: #1d3557;
  max-width: 340px;
  width: 100%;
}

.pantalla-login {
  max-width: 380px;
  margin: 80px auto;
  padding: 28px;
  background: white;
  border-radius: 8px;
  border: 1px solid #d9dde3;
}
.pantalla-login h2 { margin-top: 0; }
.pantalla-login .fila { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }

.contenido {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 16px 48px;
}

fieldset {
  background: white;
  border: 1px solid #d9dde3;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 18px;
}
legend { font-weight: 600; padding: 0 6px; }

.fila {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 10px;
}
.fila label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #3e4c59;
  flex: 1 1 180px;
}
.fila label.ancho { flex: 2 1 320px; }
.fila label.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
input, select {
  padding: 8px 10px;
  border: 1px solid #c3c9d1;
  border-radius: 6px;
  font-size: 0.95rem;
}
.nota { font-size: 0.82rem; color: #7b8794; margin: 4px 0 8px; }

input.campo-error, select.campo-error {
  border-color: #d64545;
  background: #fff5f5;
}
.mensaje-error {
  display: block;
  color: #c0392b;
  font-size: 0.8rem;
  margin-top: 3px;
}

.fila-acciones { justify-content: flex-start; }

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 0.95rem;
}
.boton-primario { background: #1d3557; color: white; }
.boton-primario:hover { background: #16324a; }
.boton-secundario { background: #e4e7eb; color: #1f2933; }
.boton-secundario:hover { background: #d3d8de; }
.boton-peligro { background: #fde2e2; color: #9b1c1c; }
.boton-peligro:hover { background: #fac6c6; }

.avisos {
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.avisos-error { background: #fde2e2; color: #9b1c1c; }
.avisos-ok { background: #e1f5e9; color: #157347; }
.avisos ul { margin: 8px 0 0; padding-left: 20px; }

.tarjeta {
  background: white;
  border: 1px solid #d9dde3;
  border-radius: 8px;
  padding: 20px;
}
code {
  background: #eef1f4;
  padding: 2px 6px;
  border-radius: 4px;
}

.tabla-scroll { overflow-x: auto; }
.tabla-historial {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  white-space: nowrap;
}
.tabla-historial th, .tabla-historial td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e4e7eb;
}
.tabla-historial .boton-primario, .tabla-historial .boton-secundario {
  padding: 4px 10px;
  font-size: 0.8rem;
}
.fila-pendiente { background: #fff8e6; }
.estado-subido { color: #157347; font-weight: 600; }
.estado-pendiente { color: #9b6b00; font-weight: 600; }
.fila-grupo-fecha td { background: #eef1f4; color: #3e4c59; padding: 6px 10px; }

.nota-busqueda {
  font-size: 0.78rem;
  color: #157347;
  min-height: 1em;
}
