/* ==========================================================================
   Licencias profesionales · Centro de Formación y Evaluación de Choferes
   Profesionales "La Argentina"
   Paleta tomada directamente del logo de la organización: azul marino y
   azul medio, sobre blanco. Los colores de estado (ok/error/alerta) se
   mantienen como convención funcional, no como identidad de marca.
   Identidad visual propia: señalética vial (ruta, cartel de pórtico,
   postes kilométricos) + credencial de licencia.
   Compartido por inscripcion.html y perfil.html.
   ========================================================================== */
:root {
  /* ---- paleta de marca (tomada del logo) ---- */
  --teal:          #10558f;   /* azul medio del logo: links, iconos, acentos */
  --teal-deep:     #07355e;   /* azul marino del logo: botones sólidos, bg con texto blanco */
  --teal-deepest:  #05223d;   /* variante más oscura: gradientes / fondos profundos */
  --teal-tint:     #e7eef4;   /* banda clara derivada del azul medio */
  --magenta:       #07355e;   /* identidad curso "1ª licencia" — azul marino del logo */
  --magenta-deep:  #05223d;
  --magenta-tint:  #e6ebef;
  --amarillo:      #fcc525;   /* amarillo: solo "por confirmar" (convención, no marca) */
  --ink:           #2f2f31;   /* titulares — gris neutro, no navy */
  --text:          #444444;   /* cuerpo de texto (color real de gba.gob.ar) */
  --muted:         #6b6b6b;
  --line:          #e2e2e2;
  --line-strong:   #c7c7c7;
  --paper:         #f7f7f7;
  --card:          #ffffff;
  --ok:            #1e7a46;
  --ok-tint:       #e7f5ec;
  --err:           #c23b2e;
  --err-tint:      #fbeae8;
  --footer-bg:     #eaeaea;   /* footer real de gba.gob.ar: gris claro, no azul */

  /* alias de compatibilidad con marcado anterior */
  --azul-ruta: var(--ink);
  --azul-senial: var(--teal-deep);
  --azul-senial-d: var(--teal-deepest);
  --celeste: var(--teal);
  --celeste-tint: var(--teal-tint);
  --violeta: var(--magenta);
  --violeta-tint: var(--magenta-tint);
  --azul: var(--ink);
  --primary: var(--teal-deep);
  --primary-dark: var(--teal-deepest);
  --celeste-bg: var(--teal-tint);
  --bg: var(--paper);
  --ok-bg: var(--ok-tint);
  --warn: #6b4e00;
  --warn-bg: #fff3d0;
  --err-bg: var(--err-tint);
  --info: var(--teal-deep);
  --info-bg: var(--teal-tint);

  --radius: 6px;              /* superficies de formulario: papel, no burbuja */
  --radius-lg: 14px;          /* credencial, sello */
  --shadow: 0 10px 28px rgba(0, 0, 0, .13);  /* solo para lo que flota */
  --font-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font: "Public Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--azul-ruta); line-height: 1.15; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--azul-senial); }
a:hover { color: var(--azul-senial-d); }
:focus-visible { outline: 3px solid var(--celeste); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
svg { display: block; }

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

/* ---------- Barra superior + header ---------- */
.topbar { background: var(--teal-deep); color: #fff; font-size: .8125rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.topbar nav { display: flex; }
.topbar a { color: #fff; text-decoration: none; opacity: .85; padding: 2px 14px; border-left: 1px solid rgba(255,255,255,.22); }
.topbar a:first-child { border-left: 0; padding-left: 0; }
.topbar a:hover { opacity: 1; text-decoration: underline; }

.header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header .container { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--azul-ruta); }
.brand-mark { width: 40px; height: 40px; flex: none; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.brand-text span { font-size: .78rem; color: var(--celeste); font-weight: 600; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a {
  padding: 10px 14px; border-radius: 999px; color: var(--azul-ruta);
  text-decoration: none; font-weight: 600; font-size: .95rem;
}
.nav a:hover { background: var(--celeste-tint); }
.nav a[aria-current="page"] { background: var(--azul-senial); color: #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; margin-left: 8px; padding-left: 14px; border-left: 1px solid var(--line); font-size: .9rem; text-decoration: none; color: inherit; border-radius: var(--radius); }
.user-chip:hover { color: var(--teal-deep); }
.user-chip .avatar { width: 34px; height: 34px; font-size: .8rem; border-radius: 6px; }
#userSlot { display: flex; align-items: center; gap: 6px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; font-size: 1rem; cursor: pointer; color: var(--azul-ruta); }

/* ---------- Hero ---------- */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: 32px 0; position: relative; overflow: hidden; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: center; }
.hero p { color: var(--muted); max-width: 52ch; margin: 0; }
.hero-copy .btn { margin-top: 18px; }

main { padding: 32px 0 56px; }
main.home { padding-top: 0; }

/* ---------- Botones para fondos oscuros (banner) ---------- */
.btn-invert { background: #fff; color: var(--teal-deepest); }
.btn-invert:hover { background: #eaf6f7; color: var(--teal-deepest); }
.btn-outline-invert { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline-invert:hover { background: rgba(255,255,255,.14); border-color: #fff; color: #fff; }

/* ---------- Banner principal (home) ---------- */
.banner { position: relative; background: linear-gradient(115deg, var(--azul-ruta) 0%, var(--teal-deepest) 100%); color: #fff; overflow: hidden; }
.banner::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: repeating-linear-gradient(100deg, rgba(255,255,255,.04) 0 2px, transparent 2px 22px);
}
.banner-slides { position: relative; min-height: 360px; display: flex; align-items: center; padding: 52px 0; }
.banner-slide { display: none; width: 100%; }
.banner-slide.is-active { display: block; }
.banner-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: center; }
.banner-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 6px 16px; font-size: .82rem; font-weight: 700; margin-bottom: 18px; }
.banner h1 { color: #fff; margin-bottom: .35em; }
.banner p { color: #d9ecef; max-width: 52ch; margin: 0 0 22px; font-size: 1.02rem; }
.banner-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.banner-art { display: flex; align-items: center; justify-content: center; }
.banner-art svg, .banner-art img { width: 100%; max-width: 280px; height: auto; }
.banner-dots { display: flex; gap: 8px; justify-content: center; padding-bottom: 22px; position: relative; }
.banner-dots button { width: 9px; height: 9px; border-radius: 999px; background: rgba(255,255,255,.35); border: 0; padding: 0; cursor: pointer; transition: width .2s, background .2s; }
.banner-dots button.is-on { background: #fff; width: 24px; }
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2;
}
.banner-arrow:hover { background: rgba(255,255,255,.24); }
.banner-arrow.prev { left: 8px; } .banner-arrow.next { right: 8px; }

/* ---------- Franja informativa ---------- */
.info-strip { background: var(--teal-tint); border-bottom: 1px solid var(--line); padding: 16px 0; }
.info-strip .container { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.info-strip .who { display: flex; align-items: center; gap: 14px; }
.info-strip .ic { width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--teal-deep); display: grid; place-items: center; flex: none; }
.info-strip strong { display: block; color: var(--azul-ruta); }
.info-strip span { color: var(--muted); font-size: .9rem; }

/* ---------- Accesos directos ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--teal-tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 16px; text-align: center; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform .15s, box-shadow .15s, background .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); background: #fff; }
.tile .ic { width: 46px; height: 46px; border-radius: 50%; background: var(--teal-deep); color: #fff; display: grid; place-items: center; flex: none; }
.tile .label { font-weight: 700; color: var(--azul-ruta); font-size: .92rem; }

/* ---------- Noticias ---------- */
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.section-title h2 { margin: 0; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.news-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.news-card .art { height: 140px; position: relative; flex: none; }
.news-card .art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.news-card .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.18) 100%); }
.news-card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card .date { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.news-card h3 { margin: 0; font-size: 1.05rem; }
.news-card p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.news-card a.more { font-weight: 700; font-size: .9rem; text-decoration: none; }
.news-card a.more:hover { text-decoration: underline; }

/* ---------- Cartel de pórtico (destinos = cursos) ---------- */
.gantry {
  background: var(--teal-deep); border-radius: var(--radius-lg); padding: 18px 20px;
  border: 3px solid var(--teal-deepest); box-shadow: 0 12px 30px rgba(0,75,85,.32);
}
.gantry-head { display: flex; align-items: center; gap: 8px; color: #bfe9ee; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px dashed rgba(255,255,255,.3); }
.gantry-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; text-decoration: none; color: #fff; border-radius: 8px; }
.gantry-row:hover { background: rgba(255,255,255,.1); }
.gantry-row + .gantry-row { border-top: 1px dashed rgba(255,255,255,.2); }
.gantry-row svg { flex: none; color: #fff; }
.gantry-row .r-name { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; }
.gantry-row .r-sub { font-size: .8rem; color: #bfe9ee; }
.gantry-row .r-price { margin-left: auto; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.gantry-row.is-renov .r-sub { color: #bfe9ee; }
.gantry-row.is-primera .r-sub { color: #ffc2dd; }

/* ---------- Tarjetas ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card + .card { margin-top: 20px; }
.grid + .card, .grid + .alert { margin-top: 20px; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title h2, .card-title h3 { margin: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.sticky { position: sticky; top: 96px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid transparent; border-radius: 999px; padding: 11px 24px;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s; line-height: 1.2;
}
.btn-primary { background: var(--azul-senial); color: #fff; }
.btn-primary:hover { background: var(--azul-senial-d); color: #fff; }
.btn-outline { background: #fff; color: var(--azul-senial); border-color: var(--azul-senial); }
.btn-outline:hover { background: var(--celeste-tint); color: var(--azul-senial-d); }
.btn-ghost { background: transparent; color: var(--azul-senial); padding-left: 10px; padding-right: 10px; }
.btn-ghost:hover { background: var(--celeste-tint); }
.btn-danger { background: #fff; color: var(--err); border-color: var(--err); }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-sm { padding: 6px 14px; font-size: .875rem; font-weight: 600; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; justify-content: space-between; margin-top: 24px; flex-wrap: wrap; }
.btn .chev { flex: none; }
.btn-back .chev { order: -1; transform: scaleX(-1); }

/* ---------- Chips y alertas ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 700; white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.chip-ok { background: var(--ok-tint); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-err { background: var(--err-tint); color: var(--err); }
.chip-info { background: var(--celeste-tint); color: var(--azul-senial); }
.chip-off { background: #eceff3; color: #4b5a6b; }
.chip-renov { background: var(--celeste-tint); color: var(--teal-deep); }
.chip-primera { background: var(--violeta-tint); color: var(--magenta-deep); }

.alert { border-radius: var(--radius); padding: 14px 18px; border-left: 4px solid; margin-bottom: 18px; font-size: .95rem; background: #fff; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.alert p:last-child { margin-bottom: 0; }
.alert strong { display: block; margin-bottom: 2px; font-family: var(--font-display); font-weight: 800; color: var(--ink); }
.alert-info { border-left-color: var(--celeste); }
.alert-warn { border-left-color: var(--amarillo); }
.alert-err { border-left-color: var(--err); }
.alert-ok { border-left-color: var(--ok); }
.alert .btn { margin-top: 10px; }

/* ---------- Paso a paso: la ruta ---------- */
.stepper { display: flex; list-style: none; margin: 0 0 28px; padding: 0; gap: 8px; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 600; color: var(--muted); position: relative; }
.stepper li::before {
  counter-increment: s; content: counter(s);
  width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line-strong); font-family: var(--font-display); font-weight: 800; color: var(--muted);
  box-shadow: 0 0 0 3px var(--paper);
}
.stepper { counter-reset: s; }
.stepper li::after {
  content: ""; flex: 1; height: 3px; margin-left: 2px; align-self: center;
  background-image: repeating-linear-gradient(90deg, var(--line-strong) 0 7px, transparent 7px 13px);
}
.stepper li:last-child::after { display: none; }
.stepper li.is-active { color: var(--azul-ruta); }
.stepper li.is-active::before { border-color: var(--azul-senial); background: var(--azul-senial); color: #fff; }
.stepper li.is-done { color: var(--ok); }
.stepper li.is-done::before { content: "✓"; border-color: var(--ok); background: var(--ok); color: #fff; }
.stepper li.is-done::after { background-image: repeating-linear-gradient(90deg, var(--ok) 0 7px, transparent 7px 13px); }

/* ---------- Tarjetas de curso ---------- */
.course { display: flex; flex-direction: column; border: 1px solid var(--line); border-top: 5px solid var(--line-strong); border-radius: var(--radius); padding: 22px; background: #fff; transition: border-color .15s, transform .15s; }
.course:hover { transform: translateY(-2px); }
.course.type-renovacion { border-top-color: var(--celeste); }
.course.type-primera { border-top-color: var(--violeta); }
.course.is-selected { outline: 2px solid var(--azul-senial); outline-offset: -1px; }
.course .tag { align-self: flex-start; border-radius: 999px; padding: 3px 12px; font-size: .8rem; font-weight: 700; margin-bottom: 12px; }
.course.type-renovacion .tag { background: var(--celeste-tint); color: var(--teal-deep); }
.course.type-primera .tag { background: var(--violeta-tint); color: var(--magenta-deep); }
.course .price { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--azul-ruta); margin: 8px 0 2px; }
.course ul { padding-left: 20px; margin: 10px 0 18px; color: var(--ink); }
.course ul li { margin-bottom: 4px; }
.course .btn { margin-top: auto; }

/* ---------- Filtro por categoría ---------- */
.cat-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.pill { border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 7px 16px; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--azul-ruta); }
.pill:hover { border-color: var(--teal); }
.pill.is-on { background: var(--azul-senial); border-color: var(--azul-senial); color: #fff; }
.chip-cat { background: var(--teal-tint); color: var(--teal-deep); font-family: var(--font-display); }

/* ---------- Calendario de selección de fecha ---------- */
.cal-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 20px; }
.cal-picker { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 14px; max-width: 360px; background: #fcfdfd; }
.cal-results-head { font-family: var(--font-display); font-weight: 800; color: var(--azul-ruta); margin: 0 0 12px; font-size: 1.02rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font-family: var(--font-display); color: var(--ink); font-size: .98rem; }
.cal-nav { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--azul-senial); display: grid; place-items: center; cursor: pointer; padding: 0; }
.cal-nav:hover { background: var(--celeste-tint); border-color: var(--teal); }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-day {
  aspect-ratio: 1; display: grid; place-items: center; font: inherit; font-size: .85rem; font-weight: 600;
  border: 1.5px solid transparent; border-radius: 8px; background: none; color: var(--line-strong); cursor: default; padding: 0;
}
.cal-day.is-empty { visibility: hidden; }
.cal-day.is-available { color: var(--azul-ruta); border-color: var(--line); background: #fff; cursor: pointer; }
.cal-day.is-available:hover { border-color: var(--teal); background: var(--celeste-tint); }
.cal-day.is-available.is-today { border-color: var(--teal); }
.cal-day.is-selected, .cal-day.is-selected:hover { background: var(--azul-senial); border-color: var(--azul-senial); color: #fff; }
.cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.cal-legend { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid var(--line); background: #fff; display: inline-block; }

/* ---------- Ediciones (fecha y horario) ---------- */
.editions { display: grid; gap: 12px; }
.edition { display: block; position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.edition:hover { border-color: var(--celeste); }
.edition input { position: absolute; opacity: 0; }
.edition .ed-body { padding: 16px 18px 16px 52px; position: relative; }
.edition .ed-body::before {
  content: ""; position: absolute; left: 18px; top: 20px; width: 20px; height: 20px;
  border: 2px solid var(--line-strong); border-radius: 50%; background: #fff;
}
.edition input:checked + .ed-body::before { border-color: var(--azul-senial); box-shadow: inset 0 0 0 5px var(--azul-senial); }
.edition:has(input:checked) { border-color: var(--azul-senial); background: var(--celeste-tint); }
.edition:has(input:focus-visible) { outline: 3px solid var(--celeste); outline-offset: 2px; }
.edition.is-full { opacity: .58; cursor: not-allowed; background: #f6f7f9; }
.ed-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.ed-title { font-family: var(--font-display); font-weight: 800; color: var(--azul-ruta); font-size: 1.02rem; }
.ed-meta { color: var(--muted); font-size: .9rem; }
.ed-note { font-size: .875rem; margin-top: 8px; }
.meter { margin-top: 10px; }
.meter-bar { height: 8px; border-radius: 999px; background: #e6ecf1; overflow: hidden; position: relative; }
.meter-bar > span { display: block; height: 100%; background: var(--celeste); border-radius: 999px; }
.meter-bar > i { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--azul-ruta); font-style: normal; }
.meter-txt { display: flex; justify-content: space-between; font-size: .8125rem; color: var(--muted); margin-top: 4px; flex-wrap: wrap; gap: 4px 12px; }
.sched { margin-top: 10px; }
.sched summary { cursor: pointer; color: var(--azul-senial); font-size: .9rem; font-weight: 600; }
.sched ol { margin: 8px 0 0; padding-left: 20px; font-size: .875rem; color: var(--muted); columns: 2; column-gap: 24px; }

/* ---------- Formularios ---------- */
.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 18px; }
.col-2 { grid-column: span 2; } .col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; } .col-6 { grid-column: span 6; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; color: var(--azul-ruta); }
.field label .req { color: var(--err); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: 11px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--azul-senial); outline: 3px solid rgba(0,154,174,.28); }
.field .hint { font-size: .8125rem; color: var(--muted); margin-top: 4px; }
.field .msg { display: none; font-size: .8125rem; color: var(--err); margin-top: 4px; font-weight: 600; }
.field.has-error input, .field.has-error select { border-color: var(--err); background: #fff9f8; }
.field.has-error .msg { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--azul-senial); flex: none; }
.check.has-error { color: var(--err); }
.seg { display: inline-flex; border: 1.5px solid var(--azul-senial); border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.seg label { padding: 9px 20px; cursor: pointer; font-weight: 600; color: var(--azul-senial); }
.seg input { position: absolute; opacity: 0; }
.seg label:has(input:checked) { background: var(--azul-senial); color: #fff; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--celeste); outline-offset: -3px; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-family: var(--font-display); font-weight: 800; color: var(--azul-ruta); padding: 0; margin-bottom: 12px; font-size: 1.02rem; }
.section-sep { border-top: 1px solid var(--line); margin: 22px 0 18px; padding-top: 18px; }
.section-sep h3 { font-size: 1.02rem; margin-bottom: 12px; }

/* ---------- Pago ---------- */
.mp-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: #fff; margin-bottom: 18px; }
.mp-brand { display: flex; align-items: center; margin-bottom: 10px; }
.mp-logo { height: 40px; width: auto; max-width: 100%; display: block; }
.mp-panel p { margin: 0; color: var(--muted); font-size: .92rem; }
.summary { box-shadow: var(--shadow); border-color: transparent; }
.summary dl { margin: 0; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.summary .row dt { color: var(--muted); }
.summary .row dd { margin: 0; text-align: right; font-weight: 600; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; font-weight: 800; color: var(--azul-ruta); }
.summary .total b { font-family: var(--font-display); font-size: 1.6rem; }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; }

/* ---------- Sello de trámite (confirmación) ---------- */
.stamp-wrap { display: flex; justify-content: center; margin: 4px 0 18px; }
.stamp { width: 128px; height: 128px; transform: rotate(-8deg); color: var(--ok); }
.stamp.is-pending { color: var(--warn); }
.stamp text { font-family: var(--font-display); font-weight: 800; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; background: #fff; }
th { text-align: left; background: var(--celeste-tint); color: var(--azul-ruta); font-weight: 700; padding: 11px 14px; white-space: nowrap; }
td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #fafcfe; }
tr.is-today td { background: #fff8e1; }
tfoot td { font-weight: 700; background: #fafcfe; }

/* ---------- Portal docente: asistencia y evaluación ---------- */
.roster th.att-col, .roster td.att-col { text-align: center; }
.roster th:last-child, .roster td:last-child {
  position: sticky; right: 0; z-index: 1;
  background: #fff; box-shadow: -8px 0 10px -8px rgba(0,0,0,.2);
}
.roster thead th:last-child { background: var(--celeste-tint); z-index: 2; }
.roster tbody tr:hover td:last-child { background: #fafcfe; }
.att-btn {
  width: 36px; height: 32px; border-radius: 6px; border: 1.5px solid var(--line-strong);
  background: #fff; color: var(--muted); font-family: var(--font-display); font-weight: 800;
  font-size: .85rem; cursor: pointer; line-height: 1;
}
.att-btn:hover:not([disabled]) { border-color: var(--teal); }
.att-btn.is-p { background: var(--ok-tint); border-color: var(--ok); color: var(--ok); }
.att-btn.is-a { background: var(--err-tint); border-color: var(--err); color: var(--err); }
.att-btn[disabled] { opacity: .4; cursor: not-allowed; background: #f2f2f2; }
.att-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8125rem; color: var(--muted); margin: 10px 0 0; }
.att-legend span { display: inline-flex; align-items: center; gap: 6px; }
.att-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1.5px solid var(--line-strong); }
.att-legend i.is-p { background: var(--ok-tint); border-color: var(--ok); }
.att-legend i.is-a { background: var(--err-tint); border-color: var(--err); }
.eval-group { display: flex; gap: 6px; white-space: nowrap; }
.btn-eval { border-width: 2px; }
.btn-eval-ok { color: var(--ok); border-color: var(--ok); background: #fff; }
.btn-eval-ok.is-on { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-eval-bad { color: var(--err); border-color: var(--err); background: #fff; }
.btn-eval-bad.is-on { background: var(--err); border-color: var(--err); color: #fff; }
.eval-pending { font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.course-btn { display: flex; flex-direction: column; align-items: stretch; gap: 2px; text-align: left; }
.course-btn .cb-top { display: flex; justify-content: space-between; gap: 8px; width: 100%; }
.course-btn .cb-sub { font-size: .78rem; font-weight: 500; opacity: .8; }

/* ---------- Perfil ---------- */
.profile { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.side { position: sticky; top: 96px; }
.side nav { display: grid; gap: 2px; }
.side nav button { text-align: left; background: none; border: 0; font: inherit; font-weight: 600; padding: 11px 14px; border-radius: var(--radius); cursor: pointer; color: var(--azul-ruta); display: flex; justify-content: space-between; gap: 8px; }
.side nav button:hover { background: var(--celeste-tint); }
.side nav button.is-on { background: var(--azul-senial); color: #fff; }
.side nav .badge { background: var(--celeste-tint); color: var(--azul-senial); border-radius: 999px; font-size: .75rem; padding: 1px 8px; font-weight: 800; }
.side nav button.is-on .badge { background: rgba(255,255,255,.25); color: #fff; }

/* credencial de licencia — el widget insignia del perfil */
.id-card {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 16px 18px 14px;
  color: #fff; background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal-deepest) 100%);
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.id-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(closest-side, rgba(16,85,143,.45), rgba(16,85,143,0) 70%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.06) 0 2px, transparent 2px 14px);
  background-position: 115% -35%, 0 0;
  background-size: 140px 140px, auto;
  background-repeat: no-repeat, repeat;
}
.id-card-head { display: flex; align-items: center; justify-content: space-between; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #bfe9ee; position: relative; }
.id-card-body { display: flex; gap: 12px; align-items: center; margin: 12px 0; position: relative; }
.id-card .avatar { width: 52px; height: 52px; border-radius: 8px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: none; }
.id-card .n { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; line-height: 1.15; }
.id-card .d { font-size: .82rem; color: #bfe9ee; }
.id-card-band { height: 9px; border-radius: 3px; background: rgba(0,0,0,.28); position: relative; margin-top: 4px; }
.id-card-foot { display: flex; justify-content: space-between; font-size: .74rem; color: #bfe9ee; margin-top: 8px; position: relative; }
.id-card-foot b { color: #fff; }

.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.kpi .v { font-family: var(--font-display); font-size: 1.55rem; font-weight: 800; color: var(--azul-ruta); line-height: 1.1; }
.kpi .l { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.class-row { display: flex; gap: 16px; align-items: center; }
.date-box { flex: none; width: 62px; text-align: center; border-radius: var(--radius); background: var(--celeste-tint); color: var(--azul-ruta); padding: 8px 0; line-height: 1.1; border-top: 3px solid var(--celeste); }
.date-box b { display: block; font-family: var(--font-display); font-size: 1.5rem; }
.date-box span { font-size: .72rem; font-weight: 700; }
.att { display: inline-flex; align-items: center; gap: 6px; }
.login-card { max-width: 460px; margin: 20px auto; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 22px; position: relative; font-size: .92rem; margin-left: 6px; border-left: 0; background-image: repeating-linear-gradient(180deg, var(--line-strong) 0 6px, transparent 6px 11px); background-position: -1px 0; background-size: 2px 100%; background-repeat: repeat-y; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--celeste); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); }
.timeline li.is-past { background-image: repeating-linear-gradient(180deg, var(--ok) 0 6px, transparent 6px 11px); background-position: -1px 0; background-size: 2px 100%; background-repeat: repeat-y; }
.timeline li.is-past::before { background: var(--ok); box-shadow: 0 0 0 1px var(--ok); }

/* ---------- Footer ---------- */
.footer { background: var(--footer-bg); color: var(--text); padding: 40px 0 20px; margin-top: 20px; position: relative; }
.footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background-image: repeating-linear-gradient(90deg, var(--magenta) 0 10px, transparent 10px 20px); opacity: .6; }
.footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font-family: var(--font-display); color: var(--ink); font-size: 1rem; margin-bottom: 10px; }
.footer a { color: var(--teal-deep); text-decoration: none; display: block; padding: 3px 0; }
.footer a:hover { color: var(--teal-deepest); text-decoration: underline; }
.footer .legal { border-top: 1px solid #d5d5d5; margin-top: 28px; padding-top: 16px; font-size: .8125rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); }
.footer .legal a { display: inline; color: var(--teal-deep); }
.footer a.brand { color: var(--ink); margin-bottom: 12px; display: flex; padding: 0; }
.footer .brand-text span { color: var(--teal-deep); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--teal-deep); color: #fff; padding: 12px 22px; border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.25); z-index: 100; font-size: .95rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .layout-2 { grid-template-columns: 1fr; }
  .cal-layout { grid-template-columns: 1fr; }
  .sticky, .side { position: static; }
  .profile { grid-template-columns: minmax(0, 1fr); }
  .side nav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
  .gantry { max-width: 480px; }
  .banner-grid { grid-template-columns: 1fr; }
  .banner-art { display: none; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px 16px; flex-direction: column; align-items: stretch; margin: 0; }
  .nav.is-open { display: flex; }
  .user-chip { border-left: 0; padding-left: 0; margin: 8px 0 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .col-2, .col-3, .col-4, .col-6 { grid-column: span 2; }
  .stepper li span { display: none; }
  .stepper li.is-active span { display: inline; }
  .stepper li.is-active { flex: 3; }
  .sched ol { columns: 1; }
  .footer .cols { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .banner-slides { min-height: 0; padding: 40px 0; }
  .banner-arrow { width: 34px; height: 34px; }
  .info-strip .container { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 460px) {
  .form-grid { grid-template-columns: 1fr; }
  .col-2, .col-3, .col-4, .col-6 { grid-column: span 1; }
  .grid-3 { grid-template-columns: 1fr; }
  .class-row { flex-direction: column; align-items: flex-start; }
  .news-grid, .tiles { grid-template-columns: 1fr; }
}
@media print {
  .topbar, .header, .footer, .btn, .side { display: none !important; }
}
