/* Hoja de estilos única del panel RGPS-RIBB. */

:root {
  --azul: #1f3a8a;
  --azul-claro: #e8edfb;
  --gris: #5b6472;
  --borde: #d5dae3;
  --fondo: #f4f6fa;
  --rojo: #b3261e;
  --verde: #1b7a3d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  color: #1c2330;
  background: var(--fondo);
}

/* ---------- Barra superior ---------- */
.barra {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 8px 20px;
  background: white;
  border-bottom: 3px solid var(--azul);
}
.barra img { height: 44px; }
.barra .titulo { font-weight: 700; color: var(--azul); margin-right: auto; }
.barra nav { display: flex; gap: 14px; flex-wrap: wrap; }
.barra a { color: var(--azul); text-decoration: none; font-weight: 600; }
.barra a:hover { text-decoration: underline; }
.barra .quien { color: var(--gris); font-size: 13px; }
.barra form { margin: 0; }

/* ---------- Contenido ---------- */
main { max-width: 1150px; margin: 22px auto; padding: 0 16px; }
h1 { font-size: 22px; margin: 0 0 14px; color: var(--azul); }
h2 { font-size: 17px; margin: 0 0 10px; }

.tarjeta {
  background: white;
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.tarjetas .tarjeta { margin-bottom: 0; }
.numero-grande { font-size: 34px; font-weight: 700; color: var(--azul); }
.nota { color: var(--gris); font-size: 13px; }

/* ---------- Avisos ---------- */
.aviso { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; background: #e6f4ea; color: var(--verde); }
.aviso.error { background: #fce8e6; color: var(--rojo); }

/* ---------- Tablas ---------- */
.tabla-con-desplazamiento { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
th { background: var(--azul-claro); font-size: 13px; }
.etiqueta { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #e6f4ea; color: var(--verde); }
.etiqueta.apagada { background: #eceef2; color: var(--gris); }

/* ---------- Formularios ---------- */
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; margin-bottom: 14px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--gris); }
input[type="text"], input[type="password"], input[type="date"], input[type="file"], select, textarea {
  width: 100%;
  margin-top: 4px;
  padding: 7px 9px;
  font: inherit;
  border: 1px solid var(--borde);
  border-radius: 5px;
  background: white;
}
label.casilla { display: flex; align-items: center; gap: 8px; font-weight: 400; color: inherit; }

.boton {
  display: inline-block;
  padding: 8px 16px;
  font: inherit;
  font-weight: 600;
  color: white;
  background: var(--azul);
  border: 1px solid var(--azul);
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
}
.boton.secundario { color: var(--azul); background: white; }
.boton.peligro { color: var(--rojo); background: white; border-color: var(--rojo); padding: 3px 10px; font-size: 13px; }
.botones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.pestanas { display: flex; gap: 8px; margin-bottom: 14px; }
.pestanas a { padding: 6px 14px; border-radius: 5px; text-decoration: none; color: var(--azul); border: 1px solid var(--borde); background: white; }
.pestanas a.activa { background: var(--azul); color: white; border-color: var(--azul); }

/* ---------- Pantalla de ingreso ---------- */
.ingreso { max-width: 360px; margin: 8vh auto; text-align: center; }
.ingreso img { width: 150px; margin-bottom: 10px; }
.ingreso .tarjeta { text-align: left; }
.ingreso label { margin-bottom: 12px; }
.ingreso .boton { width: 100%; }

/* ---------- Mapa ---------- */
#mapa { height: 68vh; min-height: 420px; border: 1px solid var(--borde); border-radius: 8px; margin-bottom: 10px; }
.icono-buque { background: none; border: none; cursor: pointer; }
.ficha-buque { font-size: 13px; line-height: 1.45; min-width: 190px; }
.ficha-buque strong { display: block; font-size: 14px; color: var(--azul); margin-bottom: 2px; }
.ficha-buque .etiqueta-ficha { color: var(--gris); }
.muestra { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.muestra.hidrovia { background: #1b7a3d; }
.muestra.maritimo { background: #1f3a8a; }
