/* Paleta e identidad tomadas del sitio oficial del Ministerio de Cultura
   (cultura.gob.do): azul institucional #003876, rojo #ED232A, tipografías
   Poppins (títulos) e Inter (texto). */
:root {
  --azul: #003876;
  --azul-oscuro: #002855;
  --azul-claro: #EFF7FF;
  --rojo: #ED232A;
  --gris-borde: #E0E0E0;
  --gris-fondo: #F5F6F8;
  --verde: #2DA549;
  --ambar: #B45309;
  --texto: #1C1F24;
  --texto-tenue: #5B6370;
  --radio: 10px;
  --sombra: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --sombra-media: 0 4px 14px rgba(0, 56, 118, 0.12);
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: var(--gris-fondo);
  color: var(--texto);
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: 1.7rem; margin: 0; }
h2 { font-size: 1.2rem; color: var(--azul); margin: 0 0 0.9rem; }

.topbar {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-oscuro) 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: var(--sombra-media);
}

.marca {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  text-decoration: none;
}

.marca img { height: 38px; width: auto; display: block; filter: brightness(0) invert(1); }

.marca-texto {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.15;
}
.marca-texto small { display: block; font-weight: 400; font-size: 0.7rem; opacity: 0.75; letter-spacing: 0.02em; }

.topbar nav { display: flex; align-items: center; gap: 1.35rem; }
.topbar nav a { color: rgba(255,255,255,0.9); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.topbar nav a:hover { color: white; text-decoration: underline; }
.usuario { opacity: 0.85; font-size: 0.85rem; }

.contenido { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem; }

.cabecera-seccion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.bloque {
  background: white;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--sombra);
}

.tarjeta {
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  padding: 1.1rem;
  margin-bottom: 1rem;
  background: #fff;
  box-shadow: var(--sombra);
}

.login-tarjeta {
  max-width: 380px;
  margin: 4rem auto;
  text-align: center;
}
.login-tarjeta .marca-login { height: 64px; width: auto; margin-bottom: 1rem; }
.login-tarjeta h1 { margin-bottom: 1.5rem; color: var(--azul); }
.login-tarjeta form { text-align: left; }

.noticia-cabecera { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.noticia-imagen { margin: 0.6rem 0; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.miniatura { max-width: 130px; max-height: 95px; border-radius: 6px; object-fit: cover; box-shadow: var(--sombra); }
.vista-previa-pdf { width: 100%; height: 80vh; border: 1px solid var(--gris-borde); border-radius: var(--radio); }

label { display: block; margin-bottom: 0.7rem; font-size: 0.88rem; color: var(--texto-tenue); font-weight: 500; }
input[type="text"], input[type="password"], input[type="date"], input[type="file"], textarea, select {
  display: block;
  width: 100%;
  padding: 0.6rem 0.7rem;
  margin-top: 0.3rem;
  border: 1px solid var(--gris-borde);
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--texto);
  background: white;
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(0, 56, 118, 0.12);
}

.fila-patrullaje { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.45rem; }
.fila-patrullaje .provincia { flex: 0 0 180px; font-weight: 600; font-size: 0.9rem; color: var(--azul); }
.fila-patrullaje input[type="text"] { margin: 0; }
.fila-patrullaje input[name="hora"] { flex: 0 0 100px; }
.fila-patrullaje input[name="novedad"] { flex: 1; }

.fila-botones { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.inline { display: inline-block; }

.boton {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--gris-borde);
  border-radius: 8px;
  background: white;
  color: var(--texto);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: inherit;
  transition: box-shadow 0.15s, transform 0.1s;
}
.boton:hover { box-shadow: var(--sombra); }
.boton:active { transform: translateY(1px); }
.boton-primario { background: var(--azul); color: white; border-color: var(--azul); }
.boton-primario:hover { background: var(--azul-oscuro); }
.boton-peligro { background: white; color: var(--rojo); border-color: var(--rojo); }
.boton-peligro:hover { background: var(--rojo); color: white; }
.boton-pequeno { padding: 0.4rem 0.85rem; font-size: 0.84rem; border-radius: 6px; }
.link-boton { background: none; border: none; color: white; text-decoration: underline; cursor: pointer; padding: 0; font-size: 0.88rem; }

.acciones-edicion { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

.tabla-lista { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }
.tabla-lista th { text-align: left; padding: 0.75rem 1rem; background: var(--azul-claro); color: var(--azul); font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.tabla-lista td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--gris-borde); font-size: 0.94rem; }
.tabla-lista tr:last-child td { border-bottom: none; }

.badge { padding: 0.22rem 0.7rem; border-radius: 100px; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.01em; }
.badge-borrador_pendiente { background: #FEF3C7; color: var(--ambar); }
.badge-aprobado { background: var(--azul-claro); color: var(--azul); }
.badge-publicado { background: #DCFCE7; color: var(--verde); }
.badge-candidata { background: #EEE; color: #555; }
.badge-aprobada { background: #DCFCE7; color: var(--verde); }
.badge-descartada { background: #FEE2E2; color: var(--rojo); }

.meta { color: var(--texto-tenue); font-size: 0.87rem; }

.flashes { margin-bottom: 1.25rem; }
.flash { padding: 0.7rem 1rem; border-radius: 8px; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 500; }
.flash-success { background: #DCFCE7; color: #15803D; }
.flash-error { background: #FEE2E2; color: #B91C1C; }
