/* ================================================================
   Campus JA Córdoba - CSS System
   Port directo de tokens JA desde campus-next/src/app/globals.css
   Fuentes self-hosted: /fonts/montserrat.woff2, /fonts/work-sans.woff2
================================================================ */

/* ── 1. Custom properties ──────────────────────────────────── */
:root {
  /* Paleta JA */
  --ja-yellow:    #e3e24f;
  --ja-blue:      #28708b;
  --ja-teal:      #00a0af;
  --ja-navy:      #22404d;
  --ja-teal-soft: #c3edef;

  /* Superficies y lineas */
  --surface:        #f7fbfc;
  --surface-strong: #ffffff;
  --line:           #dce8ec;
  --text-soft:      #55707d;

  /* Neutros Tailwind equivalentes */
  --slate-950: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;

  /* Estados */
  --ok-bg:   #e6f8ec;  --ok-text:   #19643b;
  --info-bg: #ddf7fa;  --info-text: #0e6b75;
  --warn-bg: #fff8c9;  --warn-text: #7a6b00;
  --err-bg:  #fdecec;  --err-text:  #b42318;

  /* Radios */
  --r-btn:  16px;
  --r-sm:   20px;
  --r-md:   24px;
  --r-lg:   28px;
  --r-xl:   32px;
  --r-2xl:  34px;
  --r-pill: 9999px;

  /* Gradientes reutilizables */
  --grad-logo:    linear-gradient(135deg, #22404d 0%, #28708b 60%, #00a0af 100%);
  --grad-primary: linear-gradient(135deg, var(--ja-teal) 0%, var(--ja-blue) 100%);
  --grad-footer:  linear-gradient(180deg, #ffffff 0%, #f4fafb 100%);

  /* Sombras */
  --shadow-xs: 0 10px 24px rgba(34,64,77,0.07);
  --shadow-sm: 0 14px 30px rgba(34,64,77,0.06);
  --shadow-md: 0 18px 40px rgba(34,64,77,0.08);
  --shadow-lg: 0 22px 55px rgba(34,64,77,0.10);
  --shadow-xl: 0 24px 60px rgba(34,64,77,0.12);
  --shadow-logo: 0 14px 30px rgba(34,64,77,0.20);
  --shadow-cta:  0 18px 34px rgba(0,160,175,0.20);
}

/* ── 2. Fuentes self-hosted ────────────────────────────────── */
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  src: url('/fonts/work-sans.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── 3. Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; min-height: 100%; }
html { overflow-x: clip; }
body  {
  font-family: 'Work Sans', system-ui, sans-serif;
  background: var(--surface);
  color: var(--slate-950);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a   { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
input, textarea, select, button { font: inherit; }
button { cursor: pointer; }
ul, ol { list-style: none; }

/* ── 4. Fuente de titulos ─────────────────────────────────── */
.font-heading { font-family: 'Montserrat', system-ui, sans-serif; }

/* ── 5. Layout principal ───────────────────────────────────── */
.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Contenedor max-w-7xl con padding responsivo */
.container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding: 2.5rem 1.5rem;
}

/* ── 6. Utilidades de display / flex / grid ────────────────── */
.flex        { display: flex; }
.inline-flex { display: inline-flex; }
.grid        { display: grid; }
.block       { display: block; }
.hidden      { display: none !important; }

.flex-col    { flex-direction: column; }
.flex-wrap   { flex-wrap: wrap; }
.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.items-end      { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.self-start { align-self: flex-start; }

.gap-3  { gap: 0.75rem; }
.gap-4  { gap: 1rem; }
.gap-5  { gap: 1.25rem; }
.gap-6  { gap: 1.5rem; }
.gap-7  { gap: 1.75rem; }
.gap-8  { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-16 { gap: 4rem; }

/* ── 7. Espaciado ──────────────────────────────────────────── */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

.p-5  { padding: 1.25rem; }
.p-7  { padding: 1.75rem; }
.px-4 { padding-left: 1rem;    padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem;  padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem;   padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem;  padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem;     padding-bottom: 1rem; }
.py-8 { padding-top: 2rem;     padding-bottom: 2rem; }

/* ── 8. Tipografia ─────────────────────────────────────────── */
.text-xs   { font-size: 0.75rem;  line-height: 1rem; }
.text-sm   { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem;     line-height: 1.5rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem;  line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem;   line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl  { font-size: 2.25rem;  line-height: 2.5rem; }
.text-5xl  { font-size: 3rem;     line-height: 1.04; }

.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black    { font-weight: 900; }

.leading-6 { line-height: 1.5rem; }
.leading-7 { line-height: 1.75rem; }
.leading-8 { line-height: 2rem; }
.leading-tight { line-height: 1.25; }

.uppercase     { text-transform: uppercase; }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Eyebrow: patron reutilizado en todas las pantallas */
.eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--ja-blue);
}
.eyebrow-teal { color: var(--ja-teal); }

/* ── 9. Colores de texto ───────────────────────────────────── */
.text-white  { color: #ffffff; }
.text-navy   { color: var(--ja-navy); }
.text-blue   { color: var(--ja-blue); }
.text-teal   { color: var(--ja-teal); }
.text-950    { color: var(--slate-950); }
.text-700    { color: var(--slate-700); }
.text-600    { color: var(--slate-600); }
.text-500    { color: var(--slate-500); }
.text-soft   { color: var(--text-soft); }

/* ── 10. Fondos ────────────────────────────────────────────── */
.bg-white      { background: #ffffff; }
.bg-surface    { background: var(--surface); }
.bg-teal-soft  { background: var(--ja-teal-soft); }
.bg-yellow-tint { background: rgba(227,226,79,0.28); }
.bg-dark       { background: var(--slate-950); }
.bg-grad-logo  { background: var(--grad-logo); }
.bg-grad-primary { background: var(--grad-primary); }

/* Fondos de pagina */
.bg-landing {
  background: linear-gradient(180deg, #f8fcfd 0%, #eef7f9 52%, #f7fbfc 100%);
}
.bg-login {
  background:
    radial-gradient(circle at top left, rgba(195,237,239,0.55), transparent 30%),
    linear-gradient(180deg, #f9fcfd 0%, #edf6f8 100%);
}

/* ── 11. Bordes ────────────────────────────────────────────── */
.border          { border: 1px solid var(--line); }
.border-white-80 { border: 1px solid rgba(255,255,255,0.80); }
.border-light    { border: 1px solid var(--slate-200); }
.border-dashed   { border-style: dashed; }
.border-blue-faint { border: 1px dashed rgba(40,112,139,0.25); }
.border-teal-faint { border: 1px dashed rgba(0,160,175,0.25); }

/* ── 12. Radios de borde ───────────────────────────────────── */
.rounded-pill { border-radius: var(--r-pill); }
.rounded-btn  { border-radius: var(--r-btn); }
.rounded-sm   { border-radius: var(--r-sm); }
.rounded-md   { border-radius: var(--r-md); }
.rounded-lg   { border-radius: var(--r-lg); }
.rounded-xl   { border-radius: var(--r-xl); }
.rounded-2xl  { border-radius: var(--r-2xl); }

/* ── 13. Sombras ───────────────────────────────────────────── */
.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* ── 14. Efectos ───────────────────────────────────────────── */
.backdrop-blur { backdrop-filter: blur(12px); }
.overflow-hidden { overflow: hidden; }
.pointer-events-none { pointer-events: none; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0  { inset: 0; }
.w-full   { width: 100%; }
.h-full   { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* ── 15. Transicion y hover ────────────────────────────────── */
.transition {
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease, background-color 200ms ease;
}
.hover-lift { transition: transform 200ms ease, box-shadow 200ms ease; }
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.opacity-75 { opacity: 0.75; }

/* ── 16. Botones ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--r-btn);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 200ms ease, background-color 200ms ease, border-color 200ms ease;
}
.btn:hover { transform: translateY(-2px); }

/* CTA principal con gradiente teal/blue */
.btn-gradient {
  background: var(--grad-primary);
  color: #ffffff;
  padding: 0.875rem 1.5rem;
  box-shadow: var(--shadow-cta);
}

/* CTA oscuro slate-950 */
.btn-dark {
  background: var(--slate-950);
  color: #ffffff;
}
.btn-dark:hover { background: var(--ja-blue); }

/* CTA secundario blanco + borde */
.btn-secondary {
  background: #ffffff;
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-md);
}
.btn-secondary:hover { border-color: var(--ja-teal-soft); }

/* CTA teal solido */
.btn-teal {
  background: var(--ja-teal);
  color: #ffffff;
}
.btn-teal:hover { background: var(--ja-blue); }

/* Boton submit de formularios */
.btn-submit {
  background: var(--slate-950);
  color: #ffffff;
  border-radius: var(--r-btn);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  width: 100%;
  border: none;
  cursor: pointer;
  transition: background-color 200ms ease, transform 150ms ease;
}
.btn-submit:hover   { background: var(--ja-navy); transform: translateY(-1px); }
.btn-submit:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

/* ── 17. Cards / superficies ───────────────────────────────── */
/* Card principal: fondo blanco translucido, borde blanco, sombra, blur */
.card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.80);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
}

/* Card secundaria: fondo blanco/90, sombra media */
.card-md {
  background: rgba(255,255,255,0.90);
  border: 1px solid rgba(255,255,255,0.80);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
}

/* ── 18. Pill / badge ──────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(255,255,255,0.70);
  background: rgba(255,255,255,0.85);
  border-radius: var(--r-pill);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ja-navy);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(8px);
}
.pill-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--ja-yellow);
  flex-shrink: 0;
}

/* Estado chips: modulos */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: var(--r-pill);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.chip-locked   { background: var(--slate-100); color: var(--slate-500); }
.chip-pending  { background: var(--warn-bg);   color: var(--warn-text); }
.chip-active   { background: var(--info-bg);   color: var(--info-text); }
.chip-done     { background: var(--ok-bg);     color: var(--ok-text); }

/* ── 19. Logo box (monograma JA) ───────────────────────────── */
.logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-logo);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  flex-shrink: 0;
}
.logo-box-sm { width: 3.5rem; height: 3.5rem; font-size: 1.125rem; border-radius: 18px; box-shadow: var(--shadow-logo); }
.logo-box-md { width: 4rem;   height: 4rem;   font-size: 1.25rem;  border-radius: 20px; box-shadow: var(--shadow-logo); }
.logo-box-lg { width: 5rem;   height: 5rem;   font-size: 1.5rem;   border-radius: 26px; box-shadow: var(--shadow-logo); }

/* ── 19b. Logo img (imagenes reales del logo JA) ───────────── */
.logo-img         { display: block; object-fit: contain; flex-shrink: 0; }
.logo-img-nav     { height: 3.5rem; width: auto; }
.logo-img-dash    { height: 2rem;    width: auto; }
.logo-img-login   { height: 3.5rem;  width: auto; }
.logo-img-ja      { height: 3rem;    width: auto; margin-top: 2rem; }

/* ── 20. Formularios ───────────────────────────────────────── */
.form-grid   { display: grid; gap: 1.25rem; }
.form-group  { display: grid; gap: 0.5rem; }

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
}

.form-input {
  height: 3rem;
  border-radius: var(--r-btn);
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 0 1rem;
  color: var(--slate-950);
  width: 100%;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.form-input::placeholder { color: #94a3b8; }
.form-input:focus {
  border-color: var(--ja-teal);
  box-shadow: 0 0 0 4px rgba(0,160,175,0.14);
}
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--slate-950);
  transition: background-color 9999s ease-in-out 0s;
}

.form-textarea {
  border-radius: var(--r-btn);
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 0.75rem 1rem;
  color: var(--slate-950);
  width: 100%;
  font-size: 0.875rem;
  outline: none;
  resize: vertical;
  min-height: 6rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.form-textarea:focus {
  border-color: var(--ja-teal);
  box-shadow: 0 0 0 4px rgba(0,160,175,0.14);
}
.min-h-28 { min-height: 7rem; }

/* Radio buttons estilo card */
.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: var(--r-btn);
  border: 1px solid var(--line);
  background: var(--slate-50);
  padding: 0.875rem 1rem;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.radio-card:has(input:checked) {
  border-color: var(--ja-teal);
  background: rgba(0,160,175,0.06);
}
.radio-card input[type="radio"],
.radio-card input[type="checkbox"] { accent-color: var(--ja-teal); margin-top: 2px; }

/* ── 21. Alertas / banners de estado ───────────────────────── */
.alert {
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.625;
}
.alert-error   { background: var(--err-bg);  color: var(--err-text);  border: 1px solid #fecaca; }
.alert-success { background: var(--ok-bg);   color: var(--ok-text);   border: 1px solid #bbf7d0; }
.alert-info    { background: var(--info-bg); color: var(--info-text); border: 1px solid #a5f3fc; }
.alert-warn    { background: var(--warn-bg); color: var(--warn-text); border: 1px solid #fef08a; }

/* ── Tablas compactas ──────────────────────────────────────── */
.report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
  font-size: 0.875rem;
}
.report-table th,
.report-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--slate-100);
  vertical-align: middle;
}
.report-table th {
  color: var(--slate-500);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--slate-50);
}
.report-table th span {
  display: block;
  margin-bottom: 0.5rem;
}
.table-filter {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--slate-700);
  font-size: 0.8125rem;
  letter-spacing: 0;
  padding: 0.5rem 0.625rem;
  text-transform: none;
}
.table-filter:focus {
  border-color: var(--ja-teal);
  box-shadow: 0 0 0 3px rgba(0,160,175,0.12);
  outline: none;
}
.report-table tbody tr:not(.report-group):hover td { background: #f8fbfc; }
.report-table tbody tr.report-group td {
  background: var(--ja-navy);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

/* ── Modales nativos ───────────────────────────────────────── */
dialog[open] {
  position: fixed;
  inset: 0;
  margin: auto;
}
dialog::backdrop {
  background: rgba(34,64,77,0.36);
  backdrop-filter: blur(4px);
}

/* ── 22. Barras de progreso ────────────────────────────────── */
.progress-track {
  width: 100%;
  height: 0.5rem;
  background: var(--slate-200);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--ja-yellow);
  transition: width 600ms ease;
}
.progress-fill-teal {
  background: linear-gradient(90deg, var(--ja-teal), var(--ja-blue));
}

/* ── 23. Dashboard sidebar layout ─────────────────────────── */

/* Sidebar width tokens */
:root {
  --sidebar-w: 220px;
  --sidebar-w-collapsed: 60px;
}

/* Body: flex row, sidebar + content */
.dash-body {
  display: flex;
  min-height: 100vh;
  background: var(--surface);
}

/* Sidebar */
.dash-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--ja-navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  overflow-x: hidden;
  overflow-y: auto;
  transition: width 220ms ease, transform 220ms ease;
}

/* Collapsed state */
.sidebar-collapsed .dash-sidebar {
  width: var(--sidebar-w-collapsed);
}

/* Top section: logo */
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 0.75rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: 56px;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.sidebar-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
  opacity: 0.9;
  transition: opacity 200ms;
}
.sidebar-logo:hover { opacity: 1; }
.sidebar-logo-icon { display: none; }
.sidebar-collapsed .sidebar-logo-full { display: none; }
.sidebar-collapsed .sidebar-logo-icon { display: block; width: 28px; height: 28px; }
.sidebar-collapse-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: background 150ms, color 150ms;
}
.sidebar-collapse-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-collapse-btn svg { transition: transform 220ms; }
.sidebar-collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }

/* Nav links */
.sidebar-nav {
  flex: 1;
  padding: 0.625rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.625rem;
  border-radius: 10px;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  transition: background 140ms, color 140ms;
  min-height: 40px;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.10);
  color: #fff;
}
.sidebar-link.active {
  background: rgba(255,255,255,0.16);
  color: #fff;
}
.sidebar-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-icon svg { width: 20px; height: 20px; display: block; }
.sidebar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 180ms, width 220ms;
}
.sidebar-collapsed .sidebar-label { opacity: 0; width: 0; overflow: hidden; }
.sidebar-collapsed .sidebar-link { justify-content: center; gap: 0; padding: 0.5rem; }
.sidebar-collapsed .sidebar-brand { flex: 0 0 auto; }
.sidebar-collapsed .sidebar-logout-form { display: none; }

/* Footer: user info + logout */
.sidebar-footer {
  padding: 0.75rem 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 0.25rem;
  overflow: hidden;
}
.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ja-teal);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info {
  overflow: hidden;
  transition: opacity 180ms, width 220ms;
  min-width: 0;
}
.sidebar-collapsed .sidebar-user-info { opacity: 0; width: 0; overflow: hidden; }
.sidebar-collapsed .sidebar-user { justify-content: center; gap: 0; padding: 0.375rem 0; }
.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-role {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.55);
  margin: 0;
  text-transform: capitalize;
}
.sidebar-logout-form { margin: 0; }
.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4rem 0.625rem;
  border-radius: 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  transition: background 140ms, color 140ms;
  min-height: 36px;
}
.sidebar-logout-btn:hover { background: rgba(255,255,255,0.10); color: #fff; }
.sidebar-collapsed .sidebar-logout-btn .sidebar-label { opacity: 0; width: 0; }

/* Main content area */
.dash-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-w);
  transition: margin-left 220ms ease;
}
.sidebar-collapsed .dash-content {
  margin-left: var(--sidebar-w-collapsed);
}

/* Topbar (mobile only visible, but rendered always for breadcrumbs) */
.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,251,252,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  min-height: 52px;
}
.sidebar-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--slate-600);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 8px;
  flex-shrink: 0;
}
.sidebar-hamburger:hover { background: var(--slate-100); }

/* Topbar user pill (desktop) */
.topbar-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.topbar-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}
.topbar-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--slate-600);
}

/* Footer */
.dash-footer {
  padding: 1rem 1.5rem 2rem;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
}

/* ── Mobile (< 768px) ──────────────────────────── */
@media (max-width: 767px) {
  .dash-sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w) !important;
  }
  .dash-body.sidebar-open .dash-sidebar {
    transform: translateX(0);
  }
  .dash-body.sidebar-open .sidebar-overlay {
    display: block;
  }
  .sidebar-overlay { display: none; }
  .sidebar-hamburger { display: flex; }
  .dash-content {
    margin-left: 0 !important;
  }
  .sidebar-collapse-btn { display: none; }
  .sidebar-label { opacity: 1 !important; width: auto !important; }
  .sidebar-user-info { opacity: 1 !important; width: auto !important; }
}

/* Footer del dashboard: legacy support */
.dash-footer-copy { margin: 0; }
.dash-footer-logout { margin: 0; }

/* Menu de cuenta: dropdown que oculta acciones destructivas */
.dash-menu {
  position: relative;
}
.dash-menu > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--slate-600);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.dash-menu > summary::-webkit-details-marker { display: none; }
.dash-menu > summary::marker { content: ''; }
.dash-menu > summary::after {
  content: '';
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 150ms ease;
}
.dash-menu[open] > summary::after {
  transform: translateY(2px) rotate(-135deg);
}
.dash-menu > summary:hover,
.dash-menu[open] > summary {
  background: var(--slate-50);
  color: var(--slate-950);
  border-color: var(--slate-200);
}
.dash-menu-panel {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  min-width: 12rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px rgba(34,64,77,0.18), 0 2px 6px rgba(34,64,77,0.08);
  padding: 0.375rem;
  z-index: 60;
}
/* Variante: el panel abre hacia arriba (usada en el footer) */
.dash-menu-up .dash-menu-panel {
  top: auto;
  bottom: calc(100% + 0.375rem);
}
.dash-menu-up > summary::after {
  transform: translateY(2px) rotate(-135deg);
}
.dash-menu-up[open] > summary::after {
  transform: translateY(-2px) rotate(45deg);
}
.dash-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--slate-700);
  cursor: pointer;
}
.dash-menu-item:hover,
.dash-menu-item:focus-visible {
  background: var(--slate-50);
  color: var(--slate-950);
  outline: none;
}
/* .dash-nav removed — replaced by sidebar */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--slate-500);
  font-size: 0.875rem;
}
.breadcrumbs a {
  color: var(--ja-blue);
  font-weight: 700;
  text-decoration: none;
}
.breadcrumbs strong {
  color: var(--slate-700);
  font-weight: 700;
}
.dash-main {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}
@media (min-width: 640px) {
  .dash-main {
    padding: 1.5rem;
    gap: 1.5rem;
  }
}
.dash-main .card-md,
.dash-main .card {
  min-width: 0;
}
.dash-main .font-heading {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Cards de modulo en el dashboard alumno: stats responsivas */
.module-card {
  min-width: 0;
}
.module-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.module-stats > * {
  min-width: 0;
}
@media (min-width: 480px) {
  .module-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 639px) {
  .dash-main .card-md,
  .dash-main .card {
    padding: 1.25rem;
  }
}

/* ── 24. Franja de colores decorativa ─────────────────────── */
.color-strip {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.color-strip span {
  height: 0.75rem;
  border-radius: var(--r-pill);
}

/* ── 25. Ancho maximo de texto ─────────────────────────────── */
.max-w-sm  { max-width: 24rem; }
.max-w-md  { max-width: 28rem; }
.max-w-lg  { max-width: 32rem; }
.max-w-xl  { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }

.teacher-deliverables-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
.admin-student-card,
.admin-student-identity,
.admin-student-stats,
.admin-student-stat,
.admin-student-reflections,
.admin-import-panel,
.admin-import-form,
.admin-import-code,
.admin-import-results,
.admin-import-results-scroll {
  min-width: 0;
}
.admin-import-results {
  max-width: 100%;
}
.admin-import-results-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.admin-import-table {
  min-width: 32rem;
}
.admin-import-table th,
.admin-import-table td {
  padding: 0.5rem 0.625rem;
  text-align: left;
  border-bottom: 1px solid var(--slate-100);
  vertical-align: top;
  word-break: break-word;
}
.admin-import-table td code {
  word-break: break-all;
}
.admin-student-stats {
  width: 100%;
  grid-template-columns: 1fr;
}
.admin-student-stat {
  width: 100%;
}
.admin-import-form {
  width: 100%;
}
.admin-file-input {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 639px) {
  .admin-student-card {
    padding: 1.5rem !important;
  }
  .admin-student-header {
    flex-direction: column;
    align-items: stretch !important;
  }
  .admin-student-identity,
  .admin-student-stats {
    width: 100%;
  }
  .admin-student-stats.sm\:grid-4 {
    grid-template-columns: 1fr;
  }
  .admin-student-stat {
    border-radius: 1rem !important;
    padding: 1rem !important;
  }
  .admin-student-reflections {
    padding: 1.25rem !important;
  }
  .admin-import-panel,
  .admin-import-results {
    padding: 1.25rem !important;
    overflow: hidden;
  }
  .admin-import-code {
    max-width: 100%;
  }
  .admin-file-input {
    height: auto;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    white-space: normal;
  }
  .admin-import-form .btn {
    width: 100%;
  }
}

@media (min-width: 640px) {
  .admin-student-stats.sm\:grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.teacher-kpi-card {
  min-width: 0;
}
.teacher-kpi-value {
  font-size: var(--kpi-font-size);
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

@media (max-width: 1023px) {
  .login-col-form { order: -1; }
  .login-col-narrative { order: 1; }
}

@media (max-width: 639px) {
  .teacher-kpi-grid {
    gap: 1rem !important;
  }
  .teacher-kpi-card {
    padding: clamp(1.125rem, 4.6vw, 1.5rem) clamp(1rem, 4vw, 1.25rem) !important;
    border-radius: 26px !important;
  }
  .teacher-kpi-label {
    font-size: clamp(0.625rem, 2.9vw, 0.75rem) !important;
    letter-spacing: clamp(0.12em, 0.9vw, 0.18em) !important;
    line-height: 1.55;
  }
  .teacher-kpi-value {
    font-size: clamp(1rem, 5vw, var(--kpi-mobile-font-size));
    line-height: 1.18;
  }
}

/* ── 26. Responsive: sm (640px) ─────────────────────────────── */
@media (min-width: 640px) {
  .sm\:grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .sm\:grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }
}

/* ── 27. Responsive: md (768px) ─────────────────────────────── */
@media (min-width: 768px) {
  .md\:grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .md\:text-7xl { font-size: 4.5rem;  line-height: 1; }
}

/* ── 28. Responsive: lg (1024px) ────────────────────────────── */
@media (min-width: 1024px) {
  .container { padding-left: 2.5rem; padding-right: 2.5rem; }

  /* Hero landing: columna narrativa + columna cards */
  .lg\:grid-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem;
  }

  /* Grid de 2 columnas iguales */
  .lg\:grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .teacher-deliverables-grid {
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  }

  /* Grid de 3 columnas iguales */
  .lg\:grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  /* Grid de 4 columnas iguales */
  .lg\:grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .lg\:items-start { align-items: flex-start; }

  /* Login: narativa + card form */
  .lg\:grid-login {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
  }
  .lg\:grid-login .login-col-form,
  .lg\:grid-login .login-col-narrative {
    order: 0;
  }

  /* Footer horizontal */
  .lg\:flex-row         { flex-direction: row; }
  .lg\:items-end        { align-items: flex-end; }
  .lg\:justify-between  { justify-content: space-between; }
  .lg\:items-start-end  { align-items: flex-end; }

  /* Dashboard lateral: sidebar + main */
  .lg\:grid-dash {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
  }

  /* Hero del dashboard alumno: progreso + diagnosticos */
  .lg\:grid-dash-hero {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 1.5rem;
  }
}

/* ── 29. Responsive: xl (1280px) ────────────────────────────── */
@media (min-width: 1280px) {
  /* Seccion programa: asimetrico */
  .xl\:grid-program {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1.25rem;
  }

  /* Grid 2 columnas para cards de modulos */
  .xl\:grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  /* Layout docente: lista alumnos + sidebar (asimetrico) */
  .xl\:grid-docente {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.5rem;
  }
}

/* ── 30. Landing page redesign ─────────────────────────────── */
.landing-root {
  min-height: 100vh;
  background: #ffffff;
  color: var(--slate-950);
  display: flex;
  flex-direction: column;
}

/* Sticky nav */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.landing-nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Hero */
.landing-hero {
  background: #f8fbfc;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.landing-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.landing-hero .landing-inner {
  padding: 3.5rem 1.5rem;
}
.landing-h1 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-top: 1.25rem;
  max-width: 20ch;
}
.landing-h1 .text-teal { display: block; }
.landing-subtitle {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--slate-600);
  max-width: 36rem;
  margin-top: 1.25rem;
}
.landing-link-secondary {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--ja-blue);
  text-decoration: none;
}
.landing-link-secondary:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Highlights strip */
.landing-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-top: 3rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--line);
  width: 100%;
  max-width: 32rem;
}
.landing-strip-item {
  background: #ffffff;
  padding: 0.875rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}
.landing-strip-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-900);
}
.landing-strip-sub {
  font-size: 0.75rem;
  color: var(--text-soft);
}

/* Content sections */
.landing-section {
  border-bottom: 1px solid var(--line);
}
.landing-section-alt {
  background: #f8fbfc;
}
.landing-section-dark {
  background: var(--ja-navy);
  border-bottom: none;
}
.landing-h2 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  line-height: 1.15;
  color: var(--slate-950);
}
.landing-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--slate-600);
}

/* 2-col text + aside layout */
.landing-grid-text {
  display: grid;
  gap: 3rem;
}
.landing-quote {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.landing-quote-bar {
  display: block;
  width: 4px;
  min-height: 100%;
  background: var(--ja-yellow);
  border-radius: 4px;
  flex-shrink: 0;
}

/* PLACEHOLDER visual box */
.landing-placeholder {
  border: 1px dashed var(--slate-200);
  background: var(--slate-50);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
}

/* Module journey */
.module-journey {
  position: relative;
}
.module-steps {
  display: grid;
  gap: 2rem;
}
.module-step {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 0;
}
.step-bubble {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #f8fbfc;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* Progress strip */
.landing-progress-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--slate-500);
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.progress-arrow { color: var(--slate-300); }

/* JA dark section layout */
.landing-grid-ja {
  display: grid;
  gap: 3rem;
}
.landing-logo-placeholder {
  display: inline-flex;
}

/* Stats */
.landing-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.15);
  border-radius: 16px;
  overflow: hidden;
  align-self: center;
  border: 1px solid rgba(255,255,255,0.2);
}
.landing-stat {
  background: var(--ja-navy);
  padding: 1.75rem 1rem;
  text-align: center;
}

/* Footer */
.landing-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 0.25rem 0;
}

/* Hero layout (texto + slideshow) */
.landing-hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  .landing-hero-grid {
    grid-template-columns: 1fr 22rem;
    gap: 3rem;
  }
}
@media (min-width: 1024px) {
  .landing-hero-grid {
    grid-template-columns: 1fr 28rem;
    gap: 4rem;
  }
}

/* Hero slideshow */
.hero-slideshow {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4/3;
  width: 100%;
  background: var(--slate-100);
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: hero-fade 16s infinite;
}
.hero-slide:nth-child(1) { opacity: 1; animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 4s; }
.hero-slide:nth-child(3) { animation-delay: 8s; }
.hero-slide:nth-child(4) { animation-delay: 12s; }
@keyframes hero-fade {
  0%, 20%  { opacity: 1; }
  28%, 100% { opacity: 0; }
}

/* Section photo (sección Programa) */
.landing-section-img {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  border-radius: 16px;
  margin-top: 1.5rem;
}

/* JA section photo grid (sección dark) */
.ja-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.ja-photo {
  width: 100%;
  height: 10rem;
  object-fit: cover;
  border-radius: 12px;
}
.ja-photo:first-child {
  grid-column: 1 / -1;
  height: 12rem;
}

/* Iconos en strip de highlights */
.strip-icon {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  margin-bottom: 0.25rem;
}

/* Icono dentro de step-bubble del recorrido */
.step-icon {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

/* Icono en cards de módulos (dashboard alumno) */
.module-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

/* Icono de sección genérico */
.section-icon {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

/* Dashboard footer brand */
.dash-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.dash-footer-brand p {
  margin: 0;
}

/* Responsive */
.landing-strip-item:not(:last-child) {
  border-right: 1px solid var(--line);
}

@media (min-width: 768px) {
  .landing-grid-text {
    grid-template-columns: 1fr 22rem;
    gap: 3rem;
    align-items: center;
  }
  .landing-grid-ja {
    grid-template-columns: 1fr 18rem;
    gap: 3rem;
    align-items: center;
  }
}
@media (min-width: 1024px) {
  .landing-grid-text {
    grid-template-columns: 1fr 26rem;
    gap: 4rem;
  }
  .landing-grid-ja {
    grid-template-columns: 1fr 20rem;
    gap: 4rem;
  }

  /* Module journey: 4 columns with connecting line */
  .module-steps {
    position: relative;
  }
  .module-steps.lg\:grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
  .module-steps.lg\:grid-4::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line);
  }
  .module-step {
    padding-top: 3.5rem;
  }
  .step-bubble {
    position: absolute;
    top: 0;
  }
  .module-step {
    position: relative;
  }
}

/* ── Admin students: grilla densa + modal con tabs ─────────── */
.admin-students-grid {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 18px 38px rgba(34,64,77,0.08);
  padding: 0.25rem 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-students-grid .report-table {
  min-width: 880px;
}
.admin-students-grid .report-table th,
.admin-students-grid .report-table td {
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
}

.alumnos-modal {
  width: min(720px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  border: none;
  border-radius: 24px;
  padding: 1.25rem;
  background: #fff;
  box-shadow: 0 30px 60px rgba(34,64,77,0.20);
  overflow: auto;
}

.tabs .tab-list {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
  margin-top: 0.5rem;
}
.tab-button {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.625rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--slate-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
}
.tab-button:hover { color: var(--slate-700); }
.tab-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,160,175,0.20);
}
.tab-button[aria-selected="true"] {
  color: var(--ja-navy);
  border-bottom-color: var(--ja-teal);
  background: rgba(0,160,175,0.06);
}
.tab-panel {
  padding-top: 1rem;
}

/* ── Editor de contenido: layout responsive ────────────────── */
.content-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.content-editor-aside {
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.94);
  padding: 1.25rem;
  box-shadow: 0 18px 38px rgba(34,64,77,0.08);
}
.content-editor-aside-actions {
  display: none;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1rem;
}
.content-editor-aside-actions .btn {
  width: 100%;
}
@media (min-width: 1024px) {
  .content-editor-aside-actions { display: flex; }
}

/* Desktop: aside fijo a la derecha, sticky en viewport. */
@media (min-width: 1024px) {
  .content-editor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  }
  .content-editor-aside {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
  .content-editor-layout > form,
  .content-editor-layout > .editor-main {
    grid-column: 1;
    grid-row: 1;
  }
}

.editor-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Card plegable para crear un nuevo modulo */
.module-create-card {
  border-radius: 22px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}
.module-create-card > summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  user-select: none;
}
.module-create-card > summary::-webkit-details-marker { display: none; }
.module-create-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--slate-700);
  letter-spacing: 0.02em;
}
.module-create-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.15s ease;
}
.module-create-card[open] .module-create-chevron {
  transform: rotate(45deg);
}
.module-create-body {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

/* Toolbar inline dentro de cada module-section */
.module-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.25rem;
}
.btn.btn-danger {
  border-color: #fecaca;
  color: #b91c1c;
}
.btn.btn-danger:hover {
  background: #fef2f2;
}

/* Mobile/tablet: barra inferior sticky con los CTAs principales. */
.editor-bottom-actions {
  display: flex;
  gap: 0.625rem;
  position: sticky;
  bottom: 0.5rem;
  z-index: 20;
  padding: 0.75rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(34,64,77,0.12);
}
.editor-bottom-actions .btn { flex: 1; min-height: 2.75rem; }
@media (min-width: 1024px) {
  .editor-bottom-actions { display: none; }
}

/* Module section (editor): padding mas comodo en mobile. */
.module-section {
  padding: 1rem;
  border-radius: 22px;
  background: var(--slate-50);
}
.module-section > summary {
  padding: 0.25rem 0;
}
@media (max-width: 639px) {
  .module-section {
    padding: 0.75rem;
  }
  .module-section .form-grid {
    gap: 0.625rem;
  }
}

/* Sub-secciones apilables dentro de cada modulo. */
.module-subsections {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1rem;
}
.module-subsection {
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}
.module-subsection > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  user-select: none;
}
.module-subsection > summary::-webkit-details-marker { display: none; }
.module-subsection-title {
  font-family: var(--font-heading, inherit);
  font-weight: 600;
  color: var(--slate-900);
  font-size: 0.95rem;
}
.module-subsection-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.15s ease;
}
.module-subsection[open] .module-subsection-chevron {
  transform: rotate(45deg);
}
.module-subsection-body {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.875rem;
}

/* Listas dinamicas (objetivos, datos de apoyo, pasos). */
.dynamic-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dynamic-list-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.dynamic-list-item > .form-input,
.dynamic-list-item > input[type="text"] {
  flex: 1;
  min-width: 0;
}
.dynamic-list-item.step-item {
  flex-direction: column;
  border-radius: 14px;
  background: var(--slate-50);
  padding: 0.75rem;
  gap: 0.625rem;
}
.dynamic-list-item-actions {
  display: flex;
  gap: 0.25rem;
  justify-content: flex-end;
  align-items: center;
}
.dynamic-list-item-actions .btn-icon {
  font-size: 0.75rem;
  padding: 0.3rem 0.55rem;
  min-height: 2rem;
  min-width: 2rem;
}
.btn-icon-del {
  border: 1px solid var(--line);
  background: #fff;
  color: #b91c1c;
  border-radius: var(--r-btn);
  padding: 0 0.65rem;
  font-size: 1.1rem;
  line-height: 1;
  min-height: 2.5rem;
  min-width: 2.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon-del:hover {
  background: #fef2f2;
  border-color: #fecaca;
}
.btn-add {
  align-self: flex-start;
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
}

/* Prompt-item: header + acciones reordenables en mobile. */
.prompt-item {
  border-radius: 16px;
  background: var(--slate-50);
  padding: 1rem;
  margin-top: 0.75rem;
}
@media (max-width: 639px) {
  .prompt-item {
    padding: 0.875rem;
  }
  .prompt-item > div:first-child {
    flex-wrap: wrap;
  }
}

/* Option-row: stack vertical en mobile. */
.option-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: center;
}
@media (max-width: 639px) {
  .option-row {
    flex-wrap: wrap;
  }
  .option-row > input {
    flex: 1 1 100% !important;
  }
  .option-row > button {
    flex-shrink: 0;
    margin-left: auto;
  }
}

/* Tap targets mas grandes en botones chiquitos del editor. */
@media (max-width: 639px) {
  .prompt-item button[data-action] {
    min-height: 2.25rem;
    min-width: 2.25rem;
  }
}

/* ── Headers de pagina: tamaños adaptativos en mobile ─────── */
@media (max-width: 639px) {
  .dash-main h2[style*="2.25rem"] {
    font-size: clamp(1.375rem, 6vw, 2rem) !important;
    line-height: 1.2 !important;
  }
  .dash-main h2[style*="1.875rem"] {
    font-size: clamp(1.25rem, 5.5vw, 1.625rem) !important;
    line-height: 1.25 !important;
  }
  .dash-main h3[style*="1.5rem"] {
    font-size: 1.25rem !important;
  }
  .dash-main .card-md,
  .dash-main .card,
  .dash-main details[style*="padding"] {
    padding: 1rem !important;
  }
}

/* ── Filtros: tabletas y mobile en columna stackeada ─────── */
@media (max-width: 639px) {
  .dash-main form[action*="/admin/"] > div[style*="flex-wrap:wrap"] {
    flex-direction: column;
    align-items: stretch;
  }
  .dash-main form[action*="/admin/"] > div[style*="flex-wrap:wrap"] > div {
    width: 100%;
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }
  .dash-main form[action*="/admin/"] > div[style*="flex-wrap:wrap"] > div:last-child {
    flex-direction: row !important;
  }
  .dash-main form[action*="/admin/"] > div[style*="flex-wrap:wrap"] > div:last-child > * {
    flex: 1;
  }
}

/* ── Alumnos modal: full-bleed en mobile ────────────────── */
@media (max-width: 639px) {
  .alumnos-modal {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    padding: 0.875rem;
    border-radius: 16px;
  }
  .alumnos-modal .tab-list {
    flex-wrap: wrap;
  }
}

/* ── KPI cards: menos padding en mobile ─────────────────── */
@media (max-width: 639px) {
  .dash-main .grid.lg\:grid-3 > div,
  .dash-main .grid.lg\:grid-4 > div {
    padding: 1rem !important;
    border-radius: 20px !important;
  }
}

/* ── Secciones del admin: paginas globales + contenido por programa ── */
.content-section {
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.92);
  padding: 1.5rem;
  box-shadow: 0 18px 40px rgba(34,64,77,0.08);
}
.content-section-head .content-section-title {
  font-size: clamp(1.35rem, 4vw, 1.875rem);
  line-height: 1.2;
}
@media (max-width: 639px) {
  .content-section {
    padding: 1rem;
    border-radius: 22px;
  }
}

.cohort-draft-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) {
  .cohort-draft-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Cada pagina principal como acordion compacto */
.page-edit-section {
  border-radius: 22px;
  background: var(--slate-50);
  padding: 1rem 1.125rem;
  transition: background 150ms ease;
}
.page-edit-section[open] {
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(34,64,77,0.06);
}
.page-edit-section > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.25rem 0;
  min-width: 0;
}
.page-edit-section > summary::-webkit-details-marker { display: none; }
.page-edit-section > summary::marker { content: ''; }
.page-edit-summary-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.page-edit-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--slate-950);
  font-size: 1rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.page-edit-subtitle {
  font-size: 0.8125rem;
  color: var(--slate-600);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.page-edit-section > summary::after {
  content: '+';
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--slate-500);
  border-radius: 50%;
  background: rgba(0,160,175,0.08);
  transition: transform 200ms ease, background 200ms ease, color 200ms ease;
}
.page-edit-section[open] > summary::after {
  transform: rotate(45deg);
  background: var(--ja-teal);
  color: #fff;
}
@media (max-width: 639px) {
  .page-edit-section {
    padding: 0.875rem 1rem;
  }
  .page-edit-section > summary {
    gap: 0.75rem;
  }
  .page-edit-label {
    font-size: 0.9375rem;
  }
  .page-edit-subtitle {
    font-size: 0.78125rem;
  }
}

/* ── Admin dashboard: KPIs y gráficos ────────────────────────── */

/* Container nunca deja overflow horizontal en mobile. */
.dashboard-admin {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}
.dashboard-admin > *,
.dashboard-admin > section,
.dashboard-admin > section > * {
  min-width: 0;
}

/* KPI grid: 1 col mobile, 2 col @640, 3 col @1024. */
.dashboard-admin .kpi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}
.dashboard-admin .kpi-grid > * { min-width: 0; }
@media (min-width: 480px) {
  .dashboard-admin .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 640px) {
  .dashboard-admin .kpi-grid {
    gap: 1rem;
  }
}
@media (min-width: 1024px) {
  .dashboard-admin .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.kpi-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.92);
  padding: 1.125rem;
  box-shadow: 0 18px 36px rgba(34, 64, 77, 0.08);
  min-width: 0;
  overflow: hidden;
}
.kpi-card-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--slate-500);
  font-weight: 600;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.kpi-card-value {
  font-size: clamp(1.35rem, 6vw, 1.85rem);
  margin-top: 0.5rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 479px) {
  .kpi-card {
    padding: 0.875rem 1rem;
    border-radius: 18px;
  }
  .kpi-card-label {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
  }
}

/* Grid de cards de seccion (graficos + tablas). */
.dashboard-admin .dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
.dashboard-admin .dash-grid > * { min-width: 0; }
@media (min-width: 1024px) {
  .dashboard-admin .dash-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-admin .dash-grid .dash-card-wide {
    grid-column: span 2;
  }
}
/* En pantallas grandes las tablas de wide-cards no se estiran al 100%: se centran. */
@media (min-width: 1280px) {
  .dash-card-wide .table-scroll {
    display: flex;
    justify-content: center;
    overflow-x: auto;
  }
  .dash-card-wide .table-scroll .report-table {
    flex: none;
    width: auto;
    min-width: 560px;
    max-width: 100%;
  }
  .dash-card-wide .chart-scroll {
    max-width: 900px;
    margin: 0 auto;
  }
}

.dash-card {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.95);
  padding: 1.25rem;
  box-shadow: 0 18px 36px rgba(34, 64, 77, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  overflow: hidden;
}
.dash-card-head .eyebrow {
  font-size: 0.75rem;
}
.dash-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}
@media (max-width: 639px) {
  .dash-card {
    padding: 1rem;
    border-radius: 20px;
  }
}

/* Scroll horizontal seguro para tablas y SVGs anchos en mobile. */
.table-scroll, .chart-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dash-card .table-scroll table,
.dash-card .chart-scroll svg {
  display: block;
}
/* Reducimos el min-width interno para que la mayor parte del contenido se vea sin scroll. */
.dash-card .report-table {
  min-width: 560px;
}
.dash-card .chart-scroll svg {
  min-width: 0 !important;
}
.report-table.heatmap-table {
  min-width: 480px;
}
.report-table .num {
  text-align: right;
  white-space: nowrap;
}
.report-table th.num {
  text-align: right;
}

/* Embudo (funnel) */
.funnel {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-width: 0;
}
.funnel-row {
  min-width: 0;
}
.funnel-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
  flex-wrap: wrap;
}
.funnel-row-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  overflow-wrap: anywhere;
  min-width: 0;
  flex: 1;
}
.funnel-row-count {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--slate-950);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Heatmap cell */
.heatmap-cell {
  font-weight: 600;
  color: var(--slate-950);
}

/* Chart legend */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.legend-dot {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
}

/* Rank list (top/bottom colegios) */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0;
  list-style: none;
  min-width: 0;
}
.rank-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.625rem 0.875rem;
  border-radius: 14px;
  background: var(--slate-50);
  border: 1px solid var(--line);
  min-width: 0;
  flex-wrap: wrap;
}
.rank-pos {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
}
.rank-pos-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}
.rank-pos-warn {
  background: var(--warn-bg);
  color: var(--warn-text);
}
.rank-body {
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.rank-body p {
  overflow-wrap: anywhere;
}
.rank-evol {
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Reflexiones (sample) */
.reflection-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}
.reflection-card {
  border-radius: 16px;
  border-left: 3px solid var(--ja-teal);
  background: #f8fbfc;
  padding: 1rem 1.125rem;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.reflection-card header {
  min-width: 0;
}
.reflection-card p {
  overflow-wrap: anywhere;
}

/* ── Wizard ──────────────────────────────────────────────────────────────── */
form[data-wizard] [data-wizard-step] { display: none; }
.wizard-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.wizard-step-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--slate-100);
  color: var(--slate-500);
  transition: background 200ms, color 200ms;
  flex-shrink: 0;
}
.wizard-step-dot.done   { background: var(--ja-teal); color: #fff; }
.wizard-step-dot.active { background: var(--ja-blue); color: #fff; }
.wizard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ── Canvas BMC ──────────────────────────────────────────────────────────── */
.bmc-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: auto auto auto;
  gap: 0.5rem;
}
@media (max-width: 768px) {
  .bmc-grid {
    grid-template-columns: 1fr;
  }
  .bmc-grid .bmc-block {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}
.bmc-block {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bmc-block-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ja-blue);
}
.bmc-block-hint {
  font-size: 0.75rem;
  color: var(--slate-500);
  line-height: 1.5;
}
.bmc-textarea {
  flex: 1;
  min-height: 5rem;
  font-size: 0.8125rem;
  resize: vertical;
}

/* ── Financial Table ─────────────────────────────────────────────────────── */
.fin-section {
  margin-bottom: 1.5rem;
}
.fin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.fin-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-500);
  border-bottom: 2px solid var(--line);
}
.fin-table td {
  padding: 0.375rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.fin-table td input {
  width: 100%;
}
.fin-total-row td {
  font-weight: 700;
  color: var(--slate-700);
  background: var(--slate-50);
  padding: 0.625rem 0.5rem;
}
.fin-summary {
  border-radius: 16px;
  background: var(--slate-50);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--slate-700);
}
.fin-balance-positive { color: var(--ok-text, #15803d); font-weight: 700; }
.fin-balance-negative { color: var(--err-text, #b91c1c); font-weight: 700; }

/* ── Pitch Builder ───────────────────────────────────────────────────────── */
.pitch-deck-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.pitch-deck-card {
  border-radius: 16px;
  background: linear-gradient(135deg, var(--ja-navy) 0%, var(--ja-blue) 60%, var(--ja-teal) 100%);
  padding: 1.25rem 1.5rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pitch-deck-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.55);
}
.pitch-deck-text {
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  white-space: pre-wrap;
  flex: 1;
}
.pitch-deck-num {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.5rem;
}
@media (max-width: 640px) {
  .pitch-deck-grid { grid-template-columns: 1fr !important; }
}

/* ── Hub publico de programas (wiki/DESIGN.md, componentes hub-*) ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-notice { background: var(--warn-bg); color: var(--warn-text); border-bottom: 1px solid var(--line); padding: 0.625rem 1.5rem; text-align: center; font-size: 0.875rem; font-weight: 600; line-height: 1.5; }

.hub-nav-cta { padding: 0.625rem 1.25rem; font-size: 0.875rem; min-height: 2.75rem; }
.hub-target { min-height: 2.75rem; }
.hub-measure { max-width: 38rem; }
/* Los anclas no quedan debajo de la barra sticky. */
.hub-anchor { scroll-margin-top: 5rem; }

.hub-aud { display: inline-flex; align-items: center; align-self: flex-start; border-radius: var(--r-pill); padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 600; color: var(--ja-navy); }
.hub-aud-school { background: var(--ja-teal-soft); }
.hub-aud-adult  { background: var(--ja-yellow); }

.hub-group { margin-top: 2.5rem; }
.hub-group-head { display: flex; flex-direction: column; gap: 0.25rem; border-bottom: 1px solid var(--line); padding-bottom: 0.75rem; }
.hub-group-title { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--slate-950); }
.hub-group-sub { font-size: 0.875rem; color: var(--slate-600); }
.hub-empty { font-size: 0.9375rem; line-height: 1.6; color: var(--slate-600); margin-top: 1.5rem; }
.hub-cards { display: grid; gap: 1.5rem; margin-top: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .hub-cards-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.hub-card { display: flex; flex-direction: column; }
.hub-card h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.25rem; line-height: 1.3; color: var(--slate-950); margin-top: 1rem; }
.hub-card-sub { font-size: 0.9375rem; line-height: 1.6; color: var(--slate-600); margin-top: 0.5rem; }
.hub-facts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.hub-more { display: inline-flex; align-items: center; align-self: flex-start; min-height: 2.75rem; margin-top: 0.5rem; font-weight: 600; color: var(--ja-blue); text-decoration: underline; text-underline-offset: 4px; }
.hub-ingreso { margin-top: auto; padding-top: 1.25rem; }
.hub-ingreso-box { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 1.25rem; }
.hub-ingreso-label { font-family: 'Montserrat', sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate-500); }
.hub-ingreso-where { font-size: 0.9375rem; line-height: 1.55; color: var(--slate-950); margin-top: 0.375rem; }
.hub-ingreso-where strong { font-weight: 700; }
.hub-btn { display: inline-flex; margin-top: 1rem; min-height: 2.75rem; padding: 0.75rem 1.25rem; font-size: 1rem; white-space: normal; text-align: left; }
.hub-host { display: block; font-size: 0.8125rem; color: var(--slate-600); margin-top: 0.5rem; word-break: break-all; }
.hub-host-strong { color: var(--slate-700); }

.hub-progress { margin-top: 2rem; }
.hub-programs-cols { display: grid; gap: 2.5rem; margin-top: 2.5rem; }
@media (min-width: 1024px) { .hub-programs-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; } }
.hub-prog-name { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--slate-950); }
.hub-prog-meta { font-size: 0.875rem; color: var(--slate-600); margin-top: 0.25rem; }
.hub-mods { margin-top: 1.25rem; border-top: 1px solid var(--line); }
.hub-mod { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.75rem; padding: 0.875rem 0; border-bottom: 1px solid var(--line); }
.hub-mod-n { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.875rem; color: var(--slate-500); padding-top: 0.125rem; }
.hub-mod-t { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1rem; line-height: 1.35; color: var(--slate-950); }
.hub-mod-s { font-size: 0.875rem; line-height: 1.6; color: var(--slate-600); margin-top: 0.25rem; }
.hub-note { font-size: 0.875rem; line-height: 1.6; color: var(--slate-600); margin-top: 0.75rem; max-width: 36rem; }
.hub-note-doors { margin-top: 1.5rem; }

.hub-socios { background: var(--ja-teal-soft); border-bottom: none; }
.hub-socios .eyebrow { color: var(--ja-navy); }
.hub-socios .landing-body, .hub-socios .hub-note { color: var(--slate-700); }
.hub-dates { font-size: 1rem; line-height: 1.6; color: var(--ja-navy); border-left: 4px solid var(--ja-navy); padding-left: 1rem; }
.hub-socios-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .hub-socios-grid { grid-template-columns: minmax(0, 1fr) 24rem; gap: 4rem; } }
.hub-lead { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1.125rem; line-height: 1.5; color: var(--ja-navy); margin-top: 1.25rem; }
.hub-aside { background: var(--surface-strong); border-radius: var(--r-xl); padding: 1.5rem; }
.hub-aside h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.0625rem; color: var(--slate-950); }
.hub-list { margin-top: 0.75rem; }
.hub-list li { position: relative; padding-left: 1.25rem; font-size: 0.9375rem; line-height: 1.6; color: var(--slate-700); margin-top: 0.5rem; }
.hub-list li::before { content: ''; position: absolute; left: 0; top: 0.6rem; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ja-blue); }
.hub-allies { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.hub-allies dt { font-family: 'Montserrat', sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate-500); margin-top: 0.875rem; }
.hub-allies dt:first-of-type { margin-top: 0.5rem; }
.hub-allies dd { font-size: 0.9375rem; line-height: 1.5; color: var(--slate-950); margin-top: 0.25rem; }
.hub-steps-title { font-size: 1.375rem; color: var(--slate-950); margin-top: 3rem; }
.hub-steps { display: grid; gap: 1rem; margin-top: 1.25rem; }
@media (min-width: 768px) { .hub-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
.hub-step { background: var(--surface-strong); border-radius: var(--r-xl); padding: 1.5rem; }
.hub-step-n { display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--ja-navy); color: var(--surface-strong); font-family: 'Montserrat', sans-serif; font-weight: 800; }
.hub-step h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.0625rem; color: var(--slate-950); margin-top: 0.875rem; }
.hub-step p { font-size: 0.9375rem; line-height: 1.6; color: var(--slate-700); margin-top: 0.375rem; }
.hub-step .hub-when { font-size: 0.8125rem; font-weight: 600; color: var(--ja-navy); margin-top: 0.75rem; }
.hub-socios-cta { margin-top: 2.5rem; }

.hub-doors { display: grid; gap: 1.5rem; margin-top: 2rem; }
@media (min-width: 768px) { .hub-doors { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.hub-door h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.25rem; line-height: 1.3; color: var(--slate-950); margin-top: 1rem; }
.hub-door p { font-size: 0.9375rem; line-height: 1.6; color: var(--slate-600); margin-top: 0.5rem; }
.hub-door .hub-warn { color: var(--slate-950); font-weight: 600; }

.hub-on-dark-accent { color: var(--ja-yellow); }
.hub-on-dark-title { color: var(--surface-strong); }
.hub-ja-body { color: var(--ja-teal-soft); }
.hub-mv { display: grid; gap: 1.25rem; margin-top: 2rem; }
@media (min-width: 768px) { .hub-mv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.hub-mv dt { font-family: 'Montserrat', sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ja-yellow); }
.hub-mv dd { font-size: 0.9375rem; line-height: 1.65; color: var(--ja-teal-soft); margin-top: 0.375rem; }
.hub-ja-aside { display: flex; flex-direction: column; gap: 1.5rem; }
.hub-stat-value { font-size: 2rem; color: var(--ja-yellow); }
.hub-stat-label { color: var(--ja-teal-soft); }
.hub-contact { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.2); }
.hub-contact h3 { font-family: 'Montserrat', sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ja-yellow); }
.hub-contact ul { display: grid; gap: 0.5rem; margin-top: 0.75rem; }
@media (min-width: 768px) { .hub-contact ul { grid-template-columns: repeat(2, auto); justify-content: start; column-gap: 3rem; } }
.hub-contact li, .hub-contact a { font-size: 0.9375rem; color: var(--surface-strong); }
.hub-contact a { text-decoration: underline; text-underline-offset: 3px; }

.hub-footer-inner { flex-wrap: wrap; gap: 1rem; }
.hub-footer-text { display: flex; flex-direction: column; gap: 0.25rem; color: var(--slate-600); }

/* Tira del hero a 375 px: 3 columnas se aprietan; debajo de 480 px se apila. */
@media (max-width: 479px) {
  .landing-strip { flex-direction: column; }
  .landing-strip-item { flex-direction: row; align-items: center; gap: 0.75rem; }
  .landing-strip-item:not(:last-child) { border-right: none; border-bottom: 1px solid var(--line); }
  .landing-strip-item .strip-icon { margin-bottom: 0; }
  .hub-stat-value { font-size: 1.5rem; }
  .landing-stat { padding: 1.25rem 0.5rem; }
}
/* Sin desborde a 375 px: la pista crecia al ancho minimo de las cifras. */
@media (max-width: 767px) {
  .landing-grid-ja { grid-template-columns: minmax(0, 1fr); }
  .landing-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Cifras en la columna angosta de desktop: una por fila, valor y rotulo lado a lado. */
@media (min-width: 768px) {
  .landing-stats-grid { grid-template-columns: minmax(0, 1fr); }
  .landing-stat { display: flex; align-items: center; gap: 1rem; text-align: left; padding: 1.25rem 1.5rem; }
  .landing-stat .hub-stat-label { margin-top: 0; font-size: 0.875rem; }
}
/* Programas en desktop: una fila de 3 tarjetas (2 de escuelas + 1 de Socios). */
@media (min-width: 1024px) {
  .hub-groups { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
}
