:root {
  --azul: #0a3d62;
  --azul-claro: #1e6091;
  --amarillo: #f6b93b;
  --rojo: #b71540;
  --verde: #0a8754;
  --texto: #1f2a37;
  --texto-suave: #5b6b7c;
  --fondo: #f4f7fb;
  --blanco: #ffffff;
  --borde: #d9e2ec;
  --radio: 14px;
  --sombra: 0 10px 30px rgba(10, 61, 98, 0.08);
}

* { box-sizing: border-box; }

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

a { color: var(--azul-claro); }

.contenedor { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* Encabezado */
.header {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-claro) 100%);
  color: var(--blanco);
}
.header .barra {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.1rem; }
.logo .bandera {
  width: 40px; height: 28px; border-radius: 5px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.logo .bandera span { flex: 1; }
.logo .bandera .a { background: #fcd116; }
.logo .bandera .b { background: #003893; }
.logo .bandera .c { background: #cf142b; }

.hero { padding: 48px 0 56px; }
.hero h1 { font-size: 2.1rem; margin: 0 0 12px; line-height: 1.2; }
.hero p { font-size: 1.1rem; max-width: 640px; color: #e7eef6; margin: 0 0 24px; }
.hero .acciones { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; border: none; cursor: pointer;
  padding: 14px 24px; border-radius: 10px; font-size: 1rem; font-weight: 600;
  text-decoration: none; transition: transform .05s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primario { background: var(--amarillo); color: #3a2c00; box-shadow: 0 6px 16px rgba(246,185,59,.4); }
.btn-primario:hover { box-shadow: 0 8px 22px rgba(246,185,59,.55); }
.btn-claro { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-bloque { width: 100%; text-align: center; font-size: 1.05rem; padding: 16px; }

/* Secciones */
.seccion { padding: 44px 0; }
.seccion h2 { font-size: 1.5rem; margin: 0 0 8px; color: var(--azul); }
.seccion .intro { color: var(--texto-suave); margin: 0 0 28px; max-width: 640px; }

.pasos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.paso {
  background: var(--blanco); border: 1px solid var(--borde);
  border-radius: var(--radio); padding: 22px; box-shadow: var(--sombra);
}
.paso .num {
  width: 38px; height: 38px; border-radius: 50%; background: var(--azul);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 12px;
}
.paso h3 { margin: 0 0 6px; font-size: 1.05rem; }
.paso p { margin: 0; color: var(--texto-suave); font-size: .95rem; }

/* Formulario */
.form-card {
  background: var(--blanco); border: 1px solid var(--borde);
  border-radius: var(--radio); box-shadow: var(--sombra); padding: 28px;
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo.ancho { grid-column: 1 / -1; }
.campo label { font-weight: 600; font-size: .92rem; }
.campo .ayuda { font-weight: 400; color: var(--texto-suave); font-size: .82rem; }
.campo input, .campo select, .campo textarea {
  padding: 11px 12px; border: 1px solid var(--borde); border-radius: 10px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--texto);
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--azul-claro);
  box-shadow: 0 0 0 3px rgba(30,96,145,.15);
}
.campo textarea { resize: vertical; min-height: 90px; }

.consentimiento {
  grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start;
  background: #f0f5fb; border: 1px solid var(--borde); border-radius: 10px; padding: 14px;
}
.consentimiento input { margin-top: 3px; width: 18px; height: 18px; }
.consentimiento label { font-size: .88rem; color: var(--texto-suave); font-weight: 400; }

.req { color: var(--rojo); }

.mensaje { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: .95rem; display: none; }
.mensaje.error { background: #fdecef; color: var(--rojo); border: 1px solid #f5c6cf; display: block; }
.mensaje.ok { background: #e7f6ef; color: var(--verde); border: 1px solid #b7e2cd; display: block; }

/* Pie */
.footer { background: #0b2b40; color: #c6d4e1; padding: 28px 0; margin-top: 40px; }
.footer p { margin: 4px 0; font-size: .9rem; }

/* Página de gracias */
.centro { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.check { width: 72px; height: 72px; border-radius: 50%; background: var(--verde); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 2.2rem; margin: 0 auto 18px; }

/* Panel admin */
.admin-login { max-width: 420px; margin: 60px auto; }
.tabla-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--borde); white-space: nowrap; }
th { background: #f0f5fb; position: sticky; top: 0; }
tr:hover td { background: #f8fbff; }
.filtros { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filtros input, .filtros select { padding: 9px 11px; border: 1px solid var(--borde); border-radius: 9px; font-size: .95rem; }
.badge { background: #e7eef6; color: var(--azul); padding: 2px 9px; border-radius: 20px; font-size: .8rem; }

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .pasos { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
}
