/* ============================================================
   BITA LOSOHA - Estilos globales (v5)
   Diseño plano, profesional, sin sombras innecesarias.
   Paleta:
     verde   #149A4C  (acciones primarias, acentos)
     azul    #2F2E62  (texto, header)
   Tipografia: Poppins
   ============================================================ */

:root {
  --brand: #149A4C;
  --brand-dark: #0e7c3a;
  --brand-darker: #0a5c2a;
  --brand-soft: #e8f5ee;
  --brand-tint: #f0faf3;

  --ink: #2F2E62;
  --ink-soft: #4a4a6e;
  --ink-light: #6b6b87;

  --bg: #f9fafc;
  --bg-soft: #f3f4f8;
  --card: #ffffff;
  --border: #e5e7eb;
  --border-soft: #eef0f4;

  --text: #1e1e2f;
  --text-soft: #5a5a70;
  --text-muted: #9ca3af;

  --danger: #dc2626;
  --warning: #d97706;
  --success: #149A4C;
  --info: #2F2E62;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --container: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; }
h1, h2, h3, h4 { color: var(--ink); }

/* ---------- Spin animation (usado por loadings y botones) ---------- */
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  background: transparent;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary {
  background: var(--brand); color: #fff;
}
.btn-primary:hover { background: var(--brand-dark); }

.btn-secondary { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--bg-soft); border-color: #d1d5db; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }

.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand); color: #fff; }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1f1e44; }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-xl { padding: 16px 36px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 640px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.input,
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=url], input[type=number], input[type=search], input[type=date], textarea, select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--card);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
select { appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b87' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.checkbox input { width: auto; }

.help { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.error-msg {
  font-size: 13px; color: var(--danger);
  margin: 8px 0;
  padding: 10px 14px;
  background: #fef2f2;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--danger);
}
.success-msg {
  font-size: 13px; color: var(--brand-dark);
  margin: 8px 0;
  padding: 10px 14px;
  background: var(--brand-soft);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--brand);
}

/* ---------- Cards & layouts ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
}
.card-title { margin: 0 0 16px; font-size: 17px; font-weight: 600; color: var(--ink); }
.card-subtitle { font-size: 13px; color: var(--text-soft); margin: -10px 0 16px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.stack > * + * { margin-top: 16px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ============================================================
   PUBLIC HEADER & FOOTER
   ============================================================ */
.public-header {
  background: var(--card);
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 30;
}
.public-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}

/* --- BRAND LOGO (sistema robusto con fallback) --- */
.brand-logo {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 700; color: var(--ink); font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
}
.brand-logo:hover { text-decoration: none; color: var(--ink); }

/* Variante "marca + texto": cuadrado verde con BL + texto del sitio */
.brand-logo .mark {
  width: 40px; height: 40px;
  background: var(--brand);
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.brand-logo .brand-name { white-space: nowrap; }

/* Variante "imagen completa": la imagen ES el logo, sin texto al lado */
.brand-logo-img { gap: 0; }
.brand-logo .brand-img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  object-position: left center;
}

/* Variante en sidebar: un poco mas chico */
.sidebar .brand-logo .brand-img { height: 38px; max-width: 200px; }

/* Variante en auth pages: centrado y mas grande */
.auth-card .brand-logo { justify-content: center; font-size: 19px; margin-bottom: 24px; }
.auth-card .brand-logo .mark { width: 48px; height: 48px; font-size: 17px; }
.auth-card .brand-logo .brand-img { height: 52px; max-width: 280px; }

/* Variante en footer: la imagen sobre fondo oscuro */
.footer-brand .brand-logo .brand-img {
  height: 42px;
  background: rgba(255,255,255,0.06);
  padding: 6px 10px;
  border-radius: 8px;
}

@media (max-width: 700px) {
  .brand-logo .brand-name { display: none; }
  .brand-logo .brand-img { height: 36px; max-width: 160px; }
}

.public-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  color: var(--ink-soft);
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.nav-link.active { color: var(--brand); }
@media (max-width: 700px) {
  .nav-link { padding: 6px 10px; font-size: 13px; }
  .brand-logo .brand-name { display: none; }
  .public-header-inner { padding: 12px 0; }
}

/* ============================================================
   HERO CAROUSEL
   ============================================================ */
.hero-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--ink);
  /* Altura del banner tipo tienda */
  height: 620px;
}
@media (max-width: 900px) { .hero-carousel { height: 480px; } }
@media (max-width: 600px) { .hero-carousel { height: 380px; } }

.hero-track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Cada slide ocupa todo el banner */
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity .65s ease-in-out, visibility .65s;
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

/* Imagen de fondo: cubre todo el slide */
.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Overlay degradado para que el texto sea legible */
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(10, 10, 30, 0.72) 0%,
    rgba(10, 10, 30, 0.45) 55%,
    rgba(10, 10, 30, 0.15) 100%
  );
  z-index: 2;
}
/* Si el slide no tiene imagen, fondo de marca sólido */
.hero-slide.no-image .hero-slide-overlay {
  background: linear-gradient(135deg, var(--brand) 0%, var(--ink) 100%);
}

/* Contenido del slide: posicionado sobre el overlay */
.hero-slide-inner {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  /* ancho máximo centrado */
  max-width: 1200px;
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 60px;
}
@media (max-width: 900px) { .hero-slide-inner { padding: 0 36px; } }
@media (max-width: 600px) { .hero-slide-inner { padding: 0 22px; } }

.hero-slide-content {
  max-width: 640px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.3);
  margin-bottom: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-slide h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4.5vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.hero-slide h1 span { color: var(--brand-light, #4ade80); }

.hero-slide p {
  margin: 0 0 32px;
  font-size: clamp(15px, 1.8vw, 18px);
  color: rgba(255,255,255,0.88);
  line-height: 1.6;
  max-width: 520px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.2);
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-ctas .btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 20px rgba(20, 154, 76, 0.45);
}
.hero-ctas .btn-outline {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
  backdrop-filter: blur(6px);
}
.hero-ctas .btn-outline:hover {
  background: rgba(255,255,255,0.25);
}

/* Flechas de navegación */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,0.35);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: #fff;
  transition: background .2s, transform .2s;
  padding: 0;
}
.hero-arrow:hover {
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-50%) scale(1.08);
}
.hero-arrow svg { width: 20px; height: 20px; }
.hero-arrow.prev { left: 28px; }
.hero-arrow.next { right: 28px; }
@media (max-width: 600px) {
  .hero-arrow { width: 38px; height: 38px; }
  .hero-arrow.prev { left: 10px; }
  .hero-arrow.next { right: 10px; }
  .hero-arrow svg { width: 16px; height: 16px; }
}

/* Dots */
.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  align-items: center;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: 0;
  cursor: pointer;
  padding: 0;
  transition: all .25s;
}
.hero-dot:hover { background: rgba(255,255,255,0.75); }
.hero-dot.active {
  background: #fff;
  width: 28px;
  border-radius: 4px;
}

/* Barra de progreso del slide activo */
.hero-progress-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: var(--brand);
  z-index: 10;
  transform-origin: left;
  animation: hero-progress var(--hero-interval, 6s) linear forwards;
}
.hero-slide.active .hero-progress-bar { display: block; }
.hero-slide:not(.active) .hero-progress-bar { display: none; }
@keyframes hero-progress { from { width: 0; } to { width: 100%; } }

/* ============================================================
   PUBLIC SECTIONS
   ============================================================ */
.section {
  padding: 80px 0;
}
.section-tight { padding: 50px 0; }
.section h2 {
  margin: 0 0 16px;
  font-size: 36px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.8px;
}
.section h2 span { color: var(--brand); }
.section-sub {
  font-size: 17px; color: var(--text-soft);
  margin: 0 0 40px;
  max-width: 600px;
  line-height: 1.6;
}

/* Frase comercial destacada */
.frase-destacada {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 50px;
  letter-spacing: -0.5px;
}
.frase-destacada span { color: var(--brand); }

.subtitulo-seccion {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ink);
  margin: 50px 0 30px;
  position: relative;
  padding-bottom: 10px;
}
.subtitulo-seccion::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 60px; height: 3px;
  background: var(--brand);
  border-radius: 2px;
}

/* Tarjetas de servicio/misión */
.feature {
  padding: 28px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  transition: border-color .15s;
}
.feature:hover {
  border-color: var(--brand);
}
.feature h3 { margin: 0 0 10px; font-size: 18px; color: var(--ink); font-weight: 600; }
.feature p { margin: 0; color: var(--text-soft); font-size: 14.5px; line-height: 1.6; }
.feature-icon {
  width: 48px; height: 48px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.feature-icon svg { width: 24px; height: 24px; }

/* Lista de items con check */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 12px;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.5;
}
.check-list li::before {
  content: '';
  width: 18px; height: 18px;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23149A4C' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Quiénes somos */
.quienes-somos {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin: 50px 0;
  border: 1px solid var(--border-soft);
}
.quienes-somos-contenido {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}
.quienes-somos-texto { flex: 2; min-width: 280px; }
.quienes-somos-texto h2 { margin-top: 0; }
.quienes-somos-texto p {
  margin-bottom: 16px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.7;
}
.quienes-somos-texto strong { color: var(--ink); }
.quienes-somos-servicios {
  flex: 1; min-width: 240px;
  background: var(--brand-tint);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.quienes-somos-servicios h4 {
  margin: 0 0 18px;
  font-size: 17px;
  color: var(--ink);
  font-weight: 600;
}
.quienes-somos-servicios ul { list-style: none; padding: 0; margin: 0; }
.quienes-somos-servicios li {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.quienes-somos-servicios li::before {
  content: ''; width: 6px; height: 6px;
  background: var(--brand); border-radius: 50%;
  flex-shrink: 0;
}

/* Compromiso */
.compromiso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.compromiso-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  border: 1px solid var(--border-soft);
}
.compromiso-item .feature-icon {
  margin: 0 auto 14px;
}
.compromiso-item h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}
.compromiso-item p {
  font-size: 13.5px;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.5;
}

/* Stats band */
.stats-band {
  background: var(--ink);
  padding: 60px 0;
  color: #fff;
}
.stats-band .grid { gap: 30px; }
.stat-big { text-align: center; }
.stat-big .num {
  font-size: 44px; font-weight: 700; line-height: 1;
  color: #fff;
  letter-spacing: -1px;
}
.stat-big .num span { color: var(--brand); }
.stat-big .label {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Seccion inspiradora */
.inspiradora {
  background: var(--ink);
  color: #fff;
  padding: 80px 0;
}
.inspiradora-contenido {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.inspiradora-texto { flex: 1 1 400px; }
.inspiradora h2 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -1px;
}
.inspiradora h2 span { color: var(--brand); display: block; }
.inspiradora p {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  margin: 0 0 30px;
  max-width: 500px;
  line-height: 1.6;
}

/* Carreras (lista con buscador) */
.cabecera { text-align: center; margin-bottom: 40px; }
.buscador {
  position: relative;
  max-width: 480px;
  margin: 0 auto 40px;
}
.buscador input {
  padding-left: 44px;
  border-radius: var(--radius-pill);
  background: var(--card);
  border-color: var(--border);
}
.buscador svg {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.grid-carreras {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.tarjeta-carrera {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 14px;
  position: relative;
  transition: border-color .15s;
}
.tarjeta-carrera:hover { border-color: var(--brand); }
.icono-carrera {
  background: var(--brand-soft);
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}
.icono-carrera svg { width: 20px; height: 20px; }
.nombre-carrera {
  flex: 1;
  font-weight: 500;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
}
.tooltip-espanol {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 100%; left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--ink); color: white;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity .15s, visibility .15s;
  z-index: 10;
  pointer-events: none;
}
.tarjeta-carrera:hover .tooltip-espanol {
  visibility: visible; opacity: 1;
}
.sin-resultados {
  text-align: center;
  padding: 50px 20px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  color: var(--text-soft);
  display: none;
}

/* CTA */
.cta-section {
  background: var(--brand);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  color: #fff;
  margin: 0 20px;
}
.cta-section h2 {
  color: #fff;
  margin: 0 0 10px;
  font-size: 32px;
  letter-spacing: -0.5px;
}
.cta-section p {
  font-size: 16px;
  color: rgba(255,255,255,0.92);
  max-width: 540px; margin: 0 auto 28px;
}
.cta-section .btn-primary {
  background: #fff;
  color: var(--brand);
}
.cta-section .btn-primary:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.cta-section .btn-outline {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}
.cta-section .btn-outline:hover {
  background: #fff;
  color: var(--brand);
}

/* Footer */
.public-footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 60px 0 30px;
  font-size: 14px;
}
.public-footer h4 { color: #fff; margin: 0 0 16px; font-size: 15px; font-weight: 600; }
.public-footer a { color: #e2e8f0; }
.public-footer a:hover { color: #fff; }
.public-footer p { color: #94a3b8; line-height: 1.7; margin: 0 0 8px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 13px;
  color: #64748b;
}
.footer-brand .brand-logo { color: #fff; margin-bottom: 14px; }
.footer-brand .brand-logo:hover { color: #fff; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--bg) 100%);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border-soft);
}
.auth-card h1 {
  margin: 0 0 6px;
  font-size: 26px; font-weight: 700;
  color: var(--ink);
  text-align: center;
  letter-spacing: -0.5px;
}
.auth-card .sub {
  text-align: center;
  color: var(--text-soft);
  margin: 0 0 28px;
  font-size: 14.5px;
}
.auth-switch {
  text-align: center;
  margin-top: 22px;
  font-size: 14px;
  color: var(--text-soft);
}
.auth-switch a { font-weight: 600; }

.demo-creds {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.7;
  border-left: 3px solid var(--brand);
}
.demo-creds strong { color: var(--text); }
.demo-creds code { background: var(--card); padding: 1px 5px; border-radius: 3px; font-size: 12px; }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.app-layout {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
}
@media (max-width: 860px) {
  .app-layout { grid-template-columns: 1fr; }
}

.sidebar {
  background: var(--card);
  border-right: 1px solid var(--border-soft);
  padding: 22px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: -260px; top: 0;
    width: 244px; z-index: 50;
    transition: left .25s;
  }
  .sidebar.open { left: 0; }
  .sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 40;
  }
}
.sidebar .brand-logo {
  padding: 0 8px 22px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 14px;
  font-size: 15px;
}
.sidebar .brand-logo .mark { width: 34px; height: 34px; font-size: 13px; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  margin-bottom: 2px;
  cursor: pointer;
  border: 0; background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.nav-item .ico {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-item .ico svg { width: 18px; height: 18px; }
.sidebar-section {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: var(--text-muted); letter-spacing: 0.6px;
  padding: 14px 14px 6px;
}

.main {
  display: flex; flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  min-width: 0;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 20;
  gap: 12px;
}
.topbar-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none;
  background: transparent; border: 0; cursor: pointer;
  padding: 8px; border-radius: 6px;
  color: var(--ink);
}
.menu-toggle:hover { background: var(--bg-soft); }
.menu-toggle svg { width: 22px; height: 22px; }
@media (max-width: 860px) { .menu-toggle { display: inline-flex; } }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 5px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  transition: background .12s;
}
.user-chip:hover { text-decoration: none; background: var(--border-soft); }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff; font-weight: 600; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.user-chip-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.user-chip-role { font-size: 11px; color: var(--text-soft); }
@media (max-width: 600px) { .user-chip-info { display: none; } }

.content {
  flex: 1;
  padding: 28px 24px;
  max-width: 100%;
}
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 26px; margin: 0 0 4px; color: var(--ink);
  letter-spacing: -0.5px; font-weight: 700;
}
.page-header .sub { color: var(--text-soft); margin: 0; font-size: 14.5px; }

/* Stats cards en dashboard */
.stat {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
}
.stat .label {
  font-size: 12px; color: var(--text-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.stat .value {
  font-size: 30px; font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.stat .change {
  font-size: 12px; color: var(--text-soft); margin-top: 6px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--card);
}
table.data {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
table.data th, table.data td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
table.data th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: var(--bg-soft); }
table.data td.actions { white-space: nowrap; text-align: right; }
table.data td.actions .btn { margin-left: 4px; }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500;
  background: var(--bg-soft);
  color: var(--ink-soft);
  white-space: nowrap;
}
.badge-success { background: var(--brand-soft); color: var(--brand-dark); }
.badge-warning { background: #fef3c7; color: #78350f; }
.badge-info    { background: #e0e7ff; color: var(--ink); }
.badge-danger  { background: #fee2e2; color: #7f1d1d; }
.badge-soft    { background: var(--bg-soft); color: var(--text-soft); }
.status-pendiente   { background: #fef3c7; color: #78350f; }
.status-en_proceso  { background: #e0e7ff; color: var(--ink); }
.status-aprobado    { background: var(--brand-soft); color: var(--brand-dark); }
.status-rechazado   { background: #fee2e2; color: #7f1d1d; }

.progress {
  height: 6px;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  overflow: hidden;
  min-width: 80px;
}
.progress .bar {
  height: 100%;
  background: var(--brand);
  transition: width .25s;
}

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(30, 30, 47, .5);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px;
  z-index: 100;
  overflow-y: auto;
}
.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  animation: modalIn .15s ease-out;
}
.modal-lg { max-width: 760px; }
@keyframes modalIn {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h2 { margin: 0; font-size: 17px; color: var(--ink); font-weight: 600; }
.modal-close {
  background: transparent; border: 0; cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-soft);
}
.modal-close:hover { background: var(--bg-soft); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: 22px; }
.modal-footer {
  padding: 16px 22px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* Toast */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
  max-width: calc(100vw - 48px);
}
.toast {
  background: var(--card);
  border-left: 3px solid var(--brand);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  border-left-width: 3px;
  min-width: 280px;
  max-width: 380px;
  font-size: 14px;
  animation: toastIn .15s ease-out;
}
.toast-error { border-left-color: var(--danger); }
.toast-success { border-left-color: var(--brand); }
.toast-warning { border-left-color: var(--warning); }
@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* Misc */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-soft);
}
.empty-state h3 { color: var(--text); font-size: 18px; margin: 0 0 6px; }
.empty-state p { margin: 0 0 18px; }
.loading {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
.row-flex { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.text-soft { color: var(--text-soft); }
.text-small { font-size: 13px; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.filters {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.filters .input, .filters select { width: auto; min-width: 180px; }
.filters input[type=search] { flex: 1; min-width: 220px; }

.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}
.doc-item .doc-name { flex: 1; font-size: 14px; font-weight: 500; }
.doc-item .doc-meta { font-size: 12px; color: var(--text-soft); }

.note-list { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.note {
  padding: 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--brand);
}
.note-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-soft); margin-bottom: 4px; }
.note-text { font-size: 14px; }

.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab {
  padding: 12px 18px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  font-family: inherit;
  transition: color .12s, border-color .12s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* Image uploader */
.image-uploader {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
  min-height: 140px;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}
.image-uploader:hover { border-color: var(--brand); background: var(--brand-tint); }
.image-uploader.dragover { border-color: var(--brand); background: var(--brand-soft); }
.image-uploader.has-image {
  background: var(--card); border-style: solid; padding: 14px;
}
.image-uploader .preview {
  max-height: 160px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 6px;
  object-fit: contain;
}
.image-uploader .hint {
  margin: 8px 0 0; font-size: 13px; color: var(--text-soft);
}
.image-uploader .upload-btn {
  font-size: 13px; font-weight: 600; color: var(--brand);
  background: transparent; border: 0; cursor: pointer;
  margin-top: 8px;
}
.image-uploader .upload-btn:hover { text-decoration: underline; }
.image-uploader .remove-btn {
  position: absolute; top: 8px; right: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--danger);
  padding: 0;
}
.image-uploader .remove-btn:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.image-uploader .remove-btn svg { width: 14px; height: 14px; }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.upload-zone:hover { border-color: var(--brand); background: var(--brand-tint); }
.upload-zone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.upload-zone p { margin: 0; color: var(--text-soft); font-size: 14px; }

/* Slides admin list */
.slide-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 16px;
  align-items: center;
}
.slide-card.inactive { opacity: 0.6; }
.slide-card .slide-thumb {
  width: 100px; height: 70px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--ink) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; overflow: hidden;
}
.slide-card .slide-thumb img { width: 100%; height: 100%; object-fit: cover; }
.slide-card .slide-info { min-width: 0; }
.slide-card .slide-info h4 { margin: 0 0 4px; font-size: 15px; color: var(--ink); }
.slide-card .slide-info p { margin: 0; font-size: 13px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide-card .slide-actions { display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 600px) {
  .slide-card { grid-template-columns: 70px 1fr; }
  .slide-card .slide-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .slide-card .slide-thumb { width: 70px; height: 56px; }
  .content { padding: 18px 14px; }
  .page-header { flex-direction: column; }
  .topbar { padding: 12px 14px; }
  .section { padding: 50px 0; }
  .section h2 { font-size: 28px; }
  .auth-card { padding: 28px 22px; }
}

/* ============================================================
   FORMULARIOS DESCARGABLES
   ============================================================ */
.form-template-list {
  display: flex; flex-direction: column; gap: 10px;
}
.form-template-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  transition: border-color .15s;
}
.form-template-card:hover { border-color: var(--brand); }
.form-template-icon {
  width: 56px; height: 56px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.form-template-body { min-width: 0; }
.form-template-title {
  font-size: 15px; font-weight: 600; color: var(--ink);
  margin: 0 0 4px;
}
.form-template-desc {
  margin: 0 0 6px;
  font-size: 13.5px; color: var(--text-soft); line-height: 1.5;
}
.form-template-meta {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.form-template-actions {
  display: flex; gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .form-template-card {
    grid-template-columns: 48px 1fr;
  }
  .form-template-icon { width: 48px; height: 48px; }
  .form-template-actions { grid-column: 1 / -1; }
}

.public-forms-section { background: var(--bg-soft); }

/* Página de contacto */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-info-card {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 36px;
}
.contact-info-card h3 {
  color: #fff; margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.3px;
}
.contact-info-card p {
  color: rgba(255,255,255,0.8);
  margin: 0 0 24px;
  font-size: 14.5px;
  line-height: 1.6;
}
.contact-info-item {
  display: flex; gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.contact-info-item .ico {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.contact-info-item .ico svg { width: 18px; height: 18px; }
.contact-info-item .info-label { font-size: 12px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.contact-info-item .info-value { color: #fff; font-size: 15px; font-weight: 500; }
.contact-info-item .info-value a { color: #fff; }
.contact-info-item .info-value a:hover { color: var(--brand-soft); }

.contact-form-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.contact-form-card h3 { margin: 0 0 8px; color: var(--ink); }
.contact-form-card .sub { color: var(--text-soft); margin: 0 0 24px; font-size: 14.5px; }
