/* ============================================================
   GINSA — Gimnasio Integral Santa Ana — Tema "Libreta de matrícula"
   Capa de identidad visual. Se carga DESPUÉS de argon-dashboard
   para poder sobreescribir sus valores. CSS plano, sin @apply.
   ============================================================ */

:root {
  /* Tinta y papel */
  --gx-ink: #4169e1;          /* azul royal — color institucional del colegio */
  --gx-ink-2: #5b82ee;        /* tinta clara (hover, enlaces) */
  --gx-ink-3: #1e2f85;        /* tinta oscura (sombras del sidebar) */
  --gx-paper: #f6f5f1;        /* fondo papel cálido */
  --gx-surface: #ffffff;
  --gx-line: #e5e3dc;         /* filetes */
  --gx-text: #232b3a;
  --gx-muted: #6a7181;

  /* Acento firma */
  --gx-marigold: #e0a422;     /* caléndula — cinta marcador */
  --gx-marigold-soft: #faf1dc;

  /* Semánticos */
  --gx-green: #2e7d53;        --gx-green-soft: #e4f1ea;
  --gx-red: #b23b32;          --gx-red-soft: #f8e7e5;
  --gx-orange: #c06b15;       --gx-orange-soft: #f9eddd;
  --gx-blue: #2f6da0;         --gx-blue-soft: #e5eef5;

  /* Geometría */
  --gx-radius: 12px;
  --gx-radius-sm: 8px;
  --gx-shadow: 0 1px 2px rgba(30, 47, 133, 0.06), 0 4px 12px rgba(30, 47, 133, 0.05);
  --gx-shadow-lg: 0 8px 30px rgba(20, 32, 95, 0.18);

  /* Tipografía */
  --gx-font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --gx-font-ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

[x-cloak] { display: none !important; }

/* ------------------------------------------------------------
   Base
   ------------------------------------------------------------ */
body.gx-body {
  background-color: var(--gx-paper);
  color: var(--gx-text);
  font-family: var(--gx-font-ui);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.gx-body h1,
body.gx-body h2,
body.gx-body h3,
.gx-display {
  font-family: var(--gx-font-display);
  color: var(--gx-ink);
  letter-spacing: -0.01em;
}
/* Bricolage tambien en los titulos/valores h4-h6 (tarjetas, nombre) sin tocar su color. */
body.gx-body h4,
body.gx-body h5,
body.gx-body h6 {
  font-family: var(--gx-font-display);
}

body.gx-body :focus-visible {
  outline: 2px solid var(--gx-marigold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Cifras de dinero: números tabulares, alineación de libro mayor */
.gx-money {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  white-space: nowrap;
}

/* ------------------------------------------------------------
   Rejillas propias (el CSS precompilado de Argon no trae grid-cols)
   ------------------------------------------------------------ */
.gx-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
/* Sin esto, una tabla ancha fuerza el ancho de toda la columna (min-width:auto) */
.gx-grid > * { min-width: 0; }
@media (min-width: 640px) {
  .gx-grid--kpi { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .gx-grid--kpi { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .gx-grid--split { grid-template-columns: 5fr 7fr; align-items: start; }
}
@media (min-width: 768px) {
  .gx-grid--fields { grid-template-columns: repeat(3, 1fr); }
}
.gx-mt { margin-top: 1rem; }

/* Sección apilada dentro de una tarjeta (filete de separación) */
.gx-sec {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--gx-line);
}

/* ------------------------------------------------------------
   Sidebar — lomo de la libreta
   ------------------------------------------------------------ */
.gx-sidenav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 990;
  display: flex;
  flex-direction: column;
  width: 16.5rem;
  background: linear-gradient(180deg, var(--gx-ink) 0%, var(--gx-ink-3) 100%);
  color: rgba(255, 255, 255, 0.86);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.gx-sidenav.gx-open { transform: none; box-shadow: var(--gx-shadow-lg); }
@media (min-width: 1280px) {
  .gx-sidenav { transform: none; }
}
.gx-sidenav::-webkit-scrollbar { width: 6px; }
.gx-sidenav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.22); border-radius: 3px; }

.gx-sidenav__backdrop {
  position: fixed;
  inset: 0;
  z-index: 980;
  background: rgba(20, 32, 95, 0.45);
  backdrop-filter: blur(2px);
}
@media (min-width: 1280px) {
  .gx-sidenav__backdrop { display: none !important; }
}

/* Marca: escudo grande centrado, GINSA y nombre completo debajo */
.gx-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.7rem;
  padding: 1.6rem 1.25rem 1.2rem;
  color: #fff;
  text-decoration: none;
}
.gx-brand:hover { color: #fff; }
.gx-brand__mark { flex: none; display: block; }
.gx-brand__logo {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: #fff;
  padding: 3px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}
.gx-brand__name {
  display: block;
  font-family: var(--gx-font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.1;
}
.gx-brand__tag {
  display: block;
  max-width: 13rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.3rem;
}

.gx-sidenav__rule {
  height: 1px;
  margin: 0 1.25rem;
  border: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.28), rgba(255,255,255,0.04));
}

/* Secciones tipo índice de libreta */
.gx-nav { padding: 0.75rem 0 1.5rem; list-style: none; margin: 0; }
.gx-nav__label {
  padding: 1.15rem 1.5rem 0.35rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.gx-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1px 0.6rem;
  padding: 0.52rem 0.9rem 0.52rem 1rem;
  border-radius: var(--gx-radius-sm);
  font-size: 0.845rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.gx-nav__link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.gx-nav__link i {
  width: 1.15rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.15s ease;
}
.gx-nav__link:hover i { color: var(--gx-marigold); }

/* Estado activo: cinta marcador caléndula (firma de la interfaz) */
.gx-nav__link.is-active {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  font-weight: 600;
}
.gx-nav__link.is-active i { color: var(--gx-marigold); }
.gx-nav__link.is-active::before {
  content: '';
  position: absolute;
  left: -0.6rem;
  top: 4px;
  bottom: 4px;
  width: 9px;
  background: var(--gx-marigold);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  border-radius: 0 1px 1px 0;
}

.gx-sidenav__foot {
  margin-top: auto;
  padding: 1rem 1.5rem 1.2rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Menú de usuario */
.gx-user {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.7rem 0.35rem 0.4rem;
  border: 1px solid var(--gx-line);
  border-radius: 999px;
  background: var(--gx-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gx-user:hover { border-color: var(--gx-ink-2); box-shadow: var(--gx-shadow); }
.gx-user__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--gx-ink);
  color: var(--gx-marigold);
  font-family: var(--gx-font-display);
  font-weight: 700;
  font-size: 0.8rem;
}
.gx-user__text { text-align: left; }
@media (max-width: 639px) {
  .gx-user__text { display: none; }
}
.gx-user__name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gx-text);
  line-height: 1.1;
}
.gx-user__role {
  display: block;
  font-size: 0.66rem;
  font-weight: 500;
  text-transform: capitalize;
  color: var(--gx-muted);
}

.gx-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 13rem;
  padding: 0.4rem;
  background: var(--gx-surface);
  border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius);
  box-shadow: var(--gx-shadow-lg);
  z-index: 60;
}
.gx-menu__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: var(--gx-radius-sm);
  background: transparent;
  font-family: var(--gx-font-ui);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--gx-text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.gx-menu__item i { width: 1rem; text-align: center; color: var(--gx-muted); font-size: 0.8rem; }
.gx-menu__item:hover { background: var(--gx-paper); color: var(--gx-ink); }
.gx-menu__item:hover i { color: var(--gx-ink-2); }
.gx-menu__item--danger { color: var(--gx-red); }
.gx-menu__item--danger i { color: var(--gx-red); }
.gx-menu__item--danger:hover { background: var(--gx-red-soft); color: var(--gx-red); }
.gx-menu__item--danger:hover i { color: var(--gx-red); }
.gx-menu__rule { height: 1px; margin: 0.35rem 0.5rem; border: 0; background: var(--gx-line); }

/* ------------------------------------------------------------
   Superficies y tarjetas
   ------------------------------------------------------------ */
.gx-card {
  background: var(--gx-surface);
  border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius);
  box-shadow: var(--gx-shadow);
}
.gx-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem 0;
}
.gx-card__title {
  font-family: var(--gx-font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gx-ink);
  margin: 0;
}
.gx-card__hint { font-size: 0.75rem; color: var(--gx-muted); }
.gx-card__body { padding: 1.1rem 1.35rem 1.25rem; }

/* KPI — asientos del libro mayor */
.gx-kpi {
  position: relative;
  display: block;
  padding: 1.1rem 1.25rem 1rem;
  background: var(--gx-surface);
  border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius);
  box-shadow: var(--gx-shadow);
}
.gx-kpi__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gx-muted);
  margin: 0 0 0.45rem;
}
.gx-kpi__label i { font-size: 0.75rem; }
.gx-kpi__value {
  font-family: var(--gx-font-display);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--gx-ink);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.gx-kpi__meta {
  margin: 0.4rem 0 0;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--gx-line);   /* filete de asiento contable */
  font-size: 0.78rem;
  color: var(--gx-muted);
}
.gx-kpi--green i, .gx-kpi--green .gx-kpi__meta strong { color: var(--gx-green); }
.gx-kpi--marigold i, .gx-kpi--marigold .gx-kpi__meta strong { color: var(--gx-orange); }
.gx-kpi--red i, .gx-kpi--red .gx-kpi__meta strong { color: var(--gx-red); }
.gx-kpi--blue i, .gx-kpi--blue .gx-kpi__meta strong { color: var(--gx-blue); }
.gx-kpi__meta strong { font-weight: 600; }

/* ------------------------------------------------------------
   Tablas de datos
   ------------------------------------------------------------ */
.gx-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.gx-table thead th {
  padding: 0.6rem 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  color: var(--gx-muted);
  border-bottom: 2px solid var(--gx-ink);   /* doble filete de encabezado contable */
  white-space: nowrap;
}
.gx-table tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--gx-line);
  color: var(--gx-text);
  vertical-align: middle;
}
.gx-table tbody tr:hover { background: var(--gx-paper); }
.gx-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.gx-table tbody tr:last-child td { border-bottom: 0; }

/* Badges de estado */
.gx-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.gx-badge::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.gx-badge--green { background: var(--gx-green-soft); color: var(--gx-green); }
.gx-badge--red { background: var(--gx-red-soft); color: var(--gx-red); }
.gx-badge--orange { background: var(--gx-orange-soft); color: var(--gx-orange); }
.gx-badge--blue { background: var(--gx-blue-soft); color: var(--gx-blue); }
.gx-badge--marigold { background: var(--gx-marigold-soft); color: #8a6410; }
.gx-badge--slate { background: #eef0f3; color: var(--gx-muted); }
/* Anulado: fuera de cartera. Apagado y tachado para que no se lea como un
   estado de cobro mas (antes salia del mismo gris que "sin vencer"). */
.gx-badge--void {
  background: transparent;
  color: var(--gx-muted);
  border: 1px dashed #c9ced8;
  text-decoration: line-through;
}
.gx-badge--void::before { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
/* "Revisar" es una alerta, no un estado de cobro: se le marca el borde para que
   salte en una tabla llena de cuotas normales. */
.gx-badge--marigold { border: 1px solid #e0a42255; }

/* Leyenda de colores. Va junto a cualquier tabla o cuadro de cuotas: el color
   solo es un lenguaje si esta escrito en alguna parte. */
.gx-leyenda {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  margin: 0.5rem 0 0.9rem;
  font-family: var(--gx-font-ui);
  font-size: 0.72rem;
  color: var(--gx-muted);
}
.gx-leyenda__titulo { font-weight: 700; color: var(--gx-text); letter-spacing: 0.02em; }
.gx-leyenda__item { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; cursor: help; }
.gx-leyenda__dot { width: 10px; height: 10px; border-radius: 999px; flex: 0 0 auto; }
.gx-leyenda__dot--green { background: var(--gx-green); }
.gx-leyenda__dot--red { background: var(--gx-red); }
.gx-leyenda__dot--orange { background: var(--gx-orange); }
.gx-leyenda__dot--blue { background: var(--gx-blue); }
.gx-leyenda__dot--marigold { background: var(--gx-marigold); }
/* Hueco, no relleno: la celda "sin vencer" tampoco lleva color. */
.gx-leyenda__dot--slate { background: transparent; box-shadow: inset 0 0 0 1px #c2c8d2; }
.gx-leyenda__dot--void { background: transparent; box-shadow: inset 0 0 0 1px #c9ced8; }

/* Reparto de ancho del cuadro por grupo: el nombre manda, el mes solo tiene
   que caber. El nombre en una sola linea (si se parte, tres renglones por fila
   y la tabla se vuelve ilegible) y las columnas de mes lo mas apretadas que
   permita la cifra. */
.gx-cuadro__nombre { white-space: nowrap; }
.gx-cuadro__mes { padding-left: 0.15rem; padding-right: 0.15rem; }

/* Celda de cuota del cuadro por grupo. Mismos seis tonos que los badges: la
   pastilla de una celda y el badge de una tabla tienen que significar lo mismo. */
.gx-cuota {
  display: inline-block;
  /* Justo lo que ocupa "1.364.364" (la cifra mas larga que se ve) mas el aire
     de la pastilla. Estaba en 5.4rem y sobraba casi un centimetro por columna. */
  min-width: 4.2rem;
  padding: 0.2rem 0.35rem;
  border-radius: var(--gx-radius-sm, 6px);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}
.gx-cuota--green { background: var(--gx-green-soft); color: var(--gx-green); }
.gx-cuota--red { background: var(--gx-red-soft); color: var(--gx-red); }
.gx-cuota--orange { background: var(--gx-orange-soft); color: var(--gx-orange); }
/* "Sin vencer" = todavia NO le toca pagar. Va en blanco a proposito: si en
   agosto la cuota de septiembre se pinta de un color, el ojo la cuenta como
   anomalia y el cuadro deja de servir para encontrarlas. Lo que no exige nada
   no lleva color; asi el verde (pago) y el rojo (mora) son lo unico que salta.
   Sin relleno, pero con la cifra legible: "sin color" no puede significar "sin
   poder leerlo", que la plata igual hay que consultarla. */
.gx-cuota--slate { background: transparent; color: var(--gx-muted); font-weight: 600; }
.gx-cuota--marigold { background: var(--gx-marigold-soft); color: #8a6410; box-shadow: inset 0 0 0 1px #e0a42288; }
.gx-cuota--void { background: transparent; color: #aab0bb; text-decoration: line-through; }
/* Marca de "falta plata pero ya hay un abono encima": el color sigue diciendo
   la urgencia, el subrayado punteado dice que la cuota esta a medias. */
.gx-cuota--parcial { border-bottom: 2px dotted currentColor; }
.gx-cuota__aviso { font-weight: 900; }
.gx-cuota[data-gx-tip] { cursor: help; }
.gx-cuota[data-gx-tip]:hover,
.gx-cuota[data-gx-tip]:focus-visible { box-shadow: inset 0 0 0 1.5px currentColor; }

/* ------------------------------------------------------------
   Globo de detalle de una cuota (hover sobre la celda)
   ------------------------------------------------------------
   El contenido lo escribe Blade dentro de la celda y queda oculto; el motor
   (<x-cuota-tooltip>) clona ese nodo dentro de UN host pegado al <body>. Va en
   `fixed` a proposito: el cuadro por grupo vive dentro de un contenedor con
   scroll horizontal, que recortaria cualquier globo posicionado en `absolute`. */
.gx-tip { display: none; }

.gx-tip-host {
  position: fixed;
  top: -9999px;
  left: -9999px;
  z-index: 9999;
  max-width: 22rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius, 12px);
  background: var(--gx-surface, #fff);
  box-shadow: var(--gx-shadow-lg, 0 8px 30px rgba(20, 32, 95, 0.18));
  color: var(--gx-text);
  font-family: var(--gx-font-ui);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;      /* el globo nunca se roba el mouse de la celda */
  transition: opacity 0.12s ease;
}
.gx-tip-host.is-visible { opacity: 1; }
.gx-tip-host .gx-tip { display: block; }

.gx-tip__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--gx-line);
}
.gx-tip__titulo { font-family: var(--gx-font-display); font-weight: 700; color: var(--gx-ink); }
.gx-tip__estado {
  flex: none;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}
.gx-tip__estado--green { background: var(--gx-green-soft); color: var(--gx-green); }
.gx-tip__estado--red { background: var(--gx-red-soft); color: var(--gx-red); }
.gx-tip__estado--orange { background: var(--gx-orange-soft); color: var(--gx-orange); }
.gx-tip__estado--slate { background: #eef0f3; color: var(--gx-muted); }
.gx-tip__estado--marigold { background: var(--gx-marigold-soft); color: #8a6410; }
.gx-tip__estado--void { background: #f1f2f4; color: #8b919c; }

.gx-tip__detalle { display: block; margin: 0.4rem 0; color: var(--gx-muted); }

.gx-tip__cifras { display: block; }
.gx-tip__fila {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.gx-tip__k { color: var(--gx-muted); }
.gx-tip__v { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.gx-tip__fila--fuerte .gx-tip__k,
.gx-tip__fila--fuerte .gx-tip__v { color: var(--gx-text); font-weight: 700; }

.gx-tip__pagos {
  display: block;
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--gx-line);
}
.gx-tip__seccion {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gx-muted);
}
.gx-tip__pago {
  display: block;
  padding: 0.35rem 0 0.35rem 0.5rem;
  border-left: 2px solid var(--gx-line);
}
.gx-tip__pago + .gx-tip__pago { margin-top: 0.35rem; }
.gx-tip__meta { display: block; color: var(--gx-muted); font-size: 0.72rem; }
/* Lo que hay que mirar dos veces: plata aplicada tarde o pago no aprobado. */
.gx-tip__meta--ojo { color: var(--gx-red); font-weight: 600; }
.gx-tip__mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Botones — DEFINICIÓN ÚNICA.
   Hubo un segundo bloque `.gx-btn` más abajo (sección de módulos nuevos) que,
   por venir después con la misma especificidad, ganaba: dejaba el botón en
   ~33 px de alto, en `inline-block` (anulando el centrado) y en VERDE, así que
   el botón «Pagar» salía verde en vez del azul institucional. Lo que ese bloque
   sí aportaba —las variantes blue/danger y el :disabled— se conservó aquí. */
.gx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;          /* 44 px: mínimo para tocar con el pulgar */
  padding: 0.6rem 1.2rem;
  border: 1px solid transparent;
  border-radius: var(--gx-radius-sm);
  font-family: var(--gx-font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.gx-btn--blue { background: var(--gx-blue); color: #fff; }
.gx-btn--danger { background: var(--gx-red); color: #fff; }
.gx-btn:disabled { opacity: 0.6; cursor: default; }
.gx-btn:active { transform: translateY(1px); }
.gx-btn--primary { background: var(--gx-ink); color: #fff; }
.gx-btn--primary:hover { background: var(--gx-ink-2); color: #fff; box-shadow: var(--gx-shadow); }
.gx-btn--ghost { background: transparent; border-color: var(--gx-line); color: var(--gx-ink); }
.gx-btn--ghost:hover { border-color: var(--gx-ink-2); background: var(--gx-surface); }

/* ------------------------------------------------------------
   Pie de página
   ------------------------------------------------------------ */
.gx-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 1.1rem 0.5rem 1.4rem;
  border-top: 1px solid var(--gx-line);
  font-size: 0.75rem;
  color: var(--gx-muted);
}
.gx-footer a { color: var(--gx-ink-2); font-weight: 600; text-decoration: none; }
.gx-footer a:hover { text-decoration: underline; }

/* ------------------------------------------------------------
   Login — portada de la libreta
   ------------------------------------------------------------ */
.gx-auth {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--gx-paper);
}
@media (min-width: 1024px) {
  .gx-auth { grid-template-columns: minmax(420px, 5fr) 7fr; }
}

.gx-auth__form-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}
.gx-auth__card {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
}
.gx-auth__eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gx-orange);
  margin: 0 0 0.6rem;
}
.gx-auth__title {
  font-family: var(--gx-font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--gx-ink);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}
.gx-auth__sub { font-size: 0.9rem; color: var(--gx-muted); margin: 0 0 2rem; }

.gx-field { margin-bottom: 1.15rem; }
.gx-field__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gx-text);
  margin-bottom: 0.35rem;
}
.gx-field__input {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--gx-surface);
  border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius-sm);
  font-family: var(--gx-font-ui);
  font-size: 0.9rem;
  color: var(--gx-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gx-field__input::placeholder { color: #9aa5a0; }
.gx-field__input:focus,
body.gx-body .gx-field__input:focus-visible {
  outline: none;
  border-color: var(--gx-ink-2);
  box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.18);
}
.gx-field__error {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--gx-red);
}
.gx-field--invalid .gx-field__input { border-color: var(--gx-red); }
.gx-field--invalid .gx-field__input:focus { box-shadow: 0 0 0 3px rgba(178, 59, 50, 0.12); }

.gx-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--gx-text);
  cursor: pointer;
  user-select: none;
}
.gx-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--gx-ink);
}

.gx-auth__foot {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--gx-muted);
}

/* Panel de marca (lado derecho) */
.gx-auth__brand-col {
  position: relative;
  display: none;
  overflow: hidden;
  /* Foto del colegio (fachada con el nombre) bajo un velo azul institucional:
     se reconoce el lugar y el texto blanco sigue legible. */
  background:
    linear-gradient(160deg, rgba(65, 105, 225, 0.78) 0%, rgba(30, 47, 133, 0.9) 85%),
    url('../img/ginsa-fachada.webp') center / cover no-repeat,
    var(--gx-ink-3);
  color: #fff;
}
@media (min-width: 1024px) {
  .gx-auth__brand-col { display: flex; align-items: center; }
}
/* renglones de libreta, muy sutiles */
.gx-auth__brand-col::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 46px,
    rgba(255, 255, 255, 0.045) 46px,
    rgba(255, 255, 255, 0.045) 47px
  );
}
/* cinta marcador colgando — firma */
.gx-auth__ribbon {
  position: absolute;
  top: 0;
  left: 4.5rem;
  width: 52px;
  height: 168px;
  background: linear-gradient(180deg, #f0b52e, var(--gx-marigold));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.gx-auth__brand-inner {
  position: relative;
  padding: 4rem 4.5rem;
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
}
.gx-auth__logo {
  display: block;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: #fff;
  padding: 7px;
  margin: 0 auto 1.75rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
body.gx-body .gx-auth__wordmark {
  font-family: var(--gx-font-display);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
  line-height: 1.05;
}
.gx-auth__wordmark span { color: var(--gx-marigold); }
.gx-auth__claim {
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 2.25rem auto 0;
  max-width: 26rem;
}
.gx-auth__school {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.35rem;
}

/* ------------------------------------------------------------
   Portal de pagos (dashboard estudiante)
   ------------------------------------------------------------ */
.gx-sec-title {
  font-family: var(--gx-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gx-ink);
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

/* Casilla de selección en tablas.
   Es el gesto del que depende todo el pago: si el dedo no la acierta, la
   familia no puede seleccionar la cuota. Medía 1,1 rem (17,6 px), un 40 % del
   mínimo táctil, así que la casilla crece y además se envuelve en `.gx-tick-hit`,
   que le da 44x44 reales sin ensanchar la fila (los márgenes negativos comen el
   padding de la celda). */
.gx-tick {
  width: 1.35rem;
  height: 1.35rem;
  accent-color: var(--gx-ink);
  cursor: pointer;
}
.gx-tick-hit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: -0.7rem -0.4rem;
  cursor: pointer;
}
.gx-table--cargos td:first-child { padding-left: 0.35rem; padding-right: 0.35rem; }

.gx-field__input:disabled {
  background: var(--gx-paper);
  color: var(--gx-muted);
  cursor: not-allowed;
}

.gx-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.gx-btn:disabled:active { transform: none; }

/* Contenedor con scroll para tablas largas */
.gx-scroll {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gx-line) transparent;
}
/* Tabla completa sin recorte vertical (conserva scroll horizontal en movil). */
.gx-scroll--full { max-height: none; overflow-y: visible; }
.gx-table--sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--gx-surface);
}
.gx-table .is-center { text-align: center; }

/* Resumen de totales — asiento del libro mayor */
.gx-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 2.5rem;
  margin-top: 1.25rem;
  padding: 0.9rem 1.25rem;
  background: var(--gx-marigold-soft);
  border: 1px solid #eedfb9;
  border-radius: var(--gx-radius);
}
.gx-totals__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6410;
  margin-bottom: 0.15rem;
}
.gx-totals__value {
  font-family: var(--gx-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gx-ink);
}
.gx-totals__item--grand .gx-totals__value { font-size: 1.3rem; }

/* Sublistas dentro de celdas (cargos asociados a un pago) */
.gx-sublist { list-style: none; margin: 0; padding: 0; }
.gx-sublist li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.18rem 0;
  font-size: 0.82rem;
}
.gx-sublist li + li { border-top: 1px dashed var(--gx-line); }

/* Avatar de iniciales (cuando no hay foto de perfil) */
.gx-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--gx-ink) 0%, var(--gx-ink-3) 100%);
  color: var(--gx-marigold);
  font-family: var(--gx-font-display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
  box-shadow: var(--gx-shadow);
  user-select: none;
}
/* Sin foto: silueta gris neutra (en vez de iniciales). */
.gx-avatar--empty { background: #eef0f3; color: #aab1bf; box-shadow: none; }
/* Titulos/labels en mayuscula tambien con la fuente display (Bricolage). */
body.gx-body .font-sans.uppercase { font-family: var(--gx-font-display); }

/* Estados vacíos y avisos */
.gx-empty {
  padding: 1.1rem 1.25rem;
  border: 1px dashed var(--gx-line);
  border-radius: var(--gx-radius-sm);
  background: var(--gx-paper);
  color: var(--gx-muted);
  font-size: 0.85rem;
}
.gx-alert {
  margin-top: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--gx-radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
}
.gx-alert--error {
  background: var(--gx-red-soft);
  color: var(--gx-red);
  border: 1px solid rgba(178, 59, 50, 0.25);
}

/* Toast flotante (confirmaciones de pago, errores de formulario).
   Estilos propios: el CSS de Argon viene precompilado y no trae las
   utilidades que usaba el componente, asi que el aviso salia sin fondo
   y se leia encima de la tabla. */
.gx-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1080;
  width: min(400px, calc(100vw - 2rem));
}
.gx-toast__card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--gx-surface);
  border: 1px solid var(--gx-line);
  border-left: 4px solid var(--gx-muted);
  border-radius: var(--gx-radius-sm);
  box-shadow: var(--gx-shadow-lg);
  font-family: var(--gx-font-ui);
}
.gx-toast--success .gx-toast__card { border-left-color: var(--gx-green); }
.gx-toast--error   .gx-toast__card { border-left-color: var(--gx-red); }

.gx-toast__body { flex: 1; min-width: 0; }
.gx-toast__title {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.gx-toast--success .gx-toast__title { color: var(--gx-green); }
.gx-toast--error   .gx-toast__title { color: var(--gx-red); }

.gx-toast__text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--gx-text);
  overflow-wrap: anywhere;   /* el comprobante MAN_… es una cadena larga sin espacios */
}
.gx-toast__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--gx-text);
  overflow-wrap: anywhere;
}
.gx-toast__close {
  flex: none;
  background: none;
  border: 0;
  padding: 0;
  line-height: 1;
  font-size: 1rem;
  color: var(--gx-muted);
  cursor: pointer;
}
.gx-toast__close:hover { color: var(--gx-text); }

/* Fila de acciones (Pagar / Regresar) */
.gx-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Móvil — los acudientes pagan desde el teléfono */
@media (max-width: 639px) {
  /* La tabla de cuotas muestra solo lo esencial: casilla, Concepto, SALDO y
     Estado. Las 9 columnas son: 1 casilla · 2 Concepto · 3 Días de Mora ·
     4 Capital · 5 Interés · 6 Total · 7 Abonado · 8 Saldo · 9 Estado.
     Antes se ocultaban solo 3-5, y quedaban seis columnas —tres de ellas de
     dinero, con `white-space:nowrap`— que no caben en 390 px: Saldo y Estado,
     las dos últimas, se salían de la pantalla. Y Saldo es justo la cifra que la
     familia va a pagar, así que se conserva esa y no Total. */
  .gx-table--cargos th:nth-child(n+3):nth-child(-n+7),
  .gx-table--cargos td:nth-child(n+3):nth-child(-n+7) { display: none; }

  .gx-table thead th,
  .gx-table tbody td {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  /* Sin scroll interno anidado: la página desplaza completa */
  .gx-scroll { max-height: none; overflow-y: visible; }
  .gx-table--sticky thead th { position: static; }

  /* Totales en rejilla 2x2, con el total a pagar a lo ancho */
  .gx-totals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
  }
  .gx-totals__item--grand {
    grid-column: 1 / -1;
    padding-top: 0.6rem;
    border-top: 1px dashed #dfc98f;
  }

  /* Botones a lo ancho del pulgar, Pagar de primero */
  .gx-actions {
    width: 100%;
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .gx-actions .gx-btn { width: 100%; min-height: 3rem; }

  /* Campos a 16 px: por debajo de eso Safari iOS AMPLÍA la página al enfocar el
     campo y no la devuelve, y la primera víctima es el login. Aquí estaban en
     0,9 rem = 14,4 px. */
  .gx-field__input,
  .gx-input,
  .gx-select { font-size: 1rem; }

  /* La leyenda de colores y los rótulos de totales eran de 11 px: ilegibles. */
  .gx-table { font-size: 0.95rem; }
  .gx-leyenda { font-size: 0.8rem; }
  .gx-totals__label { font-size: 0.75rem; }
  .gx-badge { font-size: 0.75rem; }

  /* Una cifra de 8 dígitos desbordaba su celda y se montaba sobre la vecina. */
  .gx-totals__item { min-width: 0; }
}

@media (max-width: 480px) {
  /* En pantallas angostas, los totales en una sola columna: dos no caben sin
     que las cifras se toquen. */
  .gx-totals { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   Accesibilidad y movimiento
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .gx-sidenav,
  .gx-btn,
  .gx-nav__link,
  .gx-user { transition: none; }
}

/* ─────────────────────────────────────────────────────────────
   Utilidades de formulario / botón / scroll — móvil-primero.
   Usadas por los módulos nuevos (académico, etc.). Evitan estilos
   inline y garantizan que los controles se adapten al ancho.
   ───────────────────────────────────────────────────────────── */
.gx-input,
.gx-select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius-sm, 0.5rem);
  background: var(--gx-surface);
  color: var(--gx-text);
  font-size: 0.9rem;
  font-family: var(--gx-font-ui);
}
.gx-input:focus,
.gx-select:focus { outline: 2px solid var(--gx-green); outline-offset: 1px; }
.gx-input--nota { width: 3.4rem; text-align: center; padding: 0.28rem 0.2rem; }

.gx-field { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.gx-field__label { font-size: 0.8rem; font-weight: 600; color: var(--gx-text); }
.gx-field__error { font-size: 0.78rem; color: var(--gx-red); }

.gx-form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.gx-form > .gx-field { flex: 1 1 14rem; }

/* (El segundo bloque `.gx-btn` vivía aquí y pisaba al de arriba: dejaba el
   botón verde, en inline-block y de 33 px. Se fusionó con la definición única
   de la sección «Botones»; sus variantes blue/danger y el :disabled se
   conservaron allá, y `.gx-btn--ghost` volvió a tener borde y altura.) */

.gx-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gx-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin-bottom: 0.9rem; }

@media (max-width: 639px) {
  .gx-form > .gx-btn,
  .gx-form > .gx-field { flex-basis: 100%; }
  .gx-form > .gx-btn { width: 100%; text-align: center; }
}

/* Escudo del colegio dentro de la tarjeta de login — visible en móvil
   (la columna de marca lateral se oculta por debajo de 1024px). */
.gx-auth__logo-inline {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 0.9rem;
  object-fit: contain;
}
@media (min-width: 1024px) {
  .gx-auth__logo-inline { display: none; }
}

/* ── Portal del acudiente: Home de noticias (canal de información) ── */
.gx-portal-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.35rem;
}
.gx-portal-hero__text { min-width: 0; }
.gx-portal-hero__pay { font-size: 1rem; padding: 0.7rem 1.4rem; white-space: nowrap; }

.gx-news { overflow: hidden; }
.gx-news__img { width: 100%; height: 180px; object-fit: cover; display: block; }
.gx-news--feature .gx-news__img { height: 260px; }

.gx-grid--news { grid-template-columns: 1fr; }
@media (min-width: 640px)  { .gx-grid--news { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gx-grid--news { grid-template-columns: repeat(3, 1fr); } }

@media (max-width: 639px) {
  .gx-portal-hero { justify-content: center; text-align: center; }
  .gx-portal-hero__pay { width: 100%; text-align: center; }
}

/* ── Formulario público de actualización de datos (sin login) ── */
.gx-public-wrap {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem 1rem 3rem;
  background: var(--gx-paper);
}
.gx-public { width: 100%; max-width: 680px; }
.gx-public__card { overflow: hidden; }

/* ── Toma de asistencia (móvil-primero, botones táctiles) ── */
.gx-att { display: flex; flex-direction: column; gap: 0.4rem; }
.gx-att__row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.45rem 0.6rem; border: 1px solid var(--gx-line); border-radius: 0.6rem;
}
.gx-att__name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-att__opts { display: flex; gap: 0.3rem; flex-shrink: 0; }
.gx-att__opt {
  width: 2.3rem; height: 2.3rem; border-radius: 0.5rem; border: 1px solid var(--gx-line);
  background: var(--gx-surface); color: var(--gx-muted); font-weight: 700; cursor: pointer; font-size: 0.95rem;
}
.gx-att__opt--on { color: #fff; border-color: transparent; }
.gx-att__opt--green  { background: var(--gx-green); }
.gx-att__opt--red    { background: var(--gx-red); }
.gx-att__opt--orange { background: var(--gx-orange); }
.gx-att__opt--blue   { background: var(--gx-blue); }

/* ------------------------------------------------------------------
   Barra superior del back-office (components/navbar.blade.php).
   Reemplaza el navbar de Argon: título de la pantalla a la izquierda,
   ficha del usuario a la derecha, sobre la franja azul del colegio.
------------------------------------------------------------------- */
body.gx-body > .bg-blue-500.min-h-75 {
  background: linear-gradient(120deg, #2b48a8 0%, var(--gx-ink) 55%, #5b7fe6 100%);
}
.gx-topbar {
  position: relative; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 12px; padding: 22px 12px 26px;
  color: #fff;
}
.gx-topbar__titulo { min-width: 0; }
.gx-topbar__h1 {
  margin: 0; color: #fff !important;
  font-family: var(--gx-font-display); font-size: 1.55rem; font-weight: 700; line-height: 1.15;
  letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gx-topbar__sub { margin: .3rem 0 0; font-size: .8rem; color: rgba(255,255,255,.78); }
.gx-topbar__acciones { display: flex; align-items: center; gap: 8px; flex: none; }
.gx-topbar__usuario { position: relative; }
.gx-topbar__chip {
  display: flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 5px 12px 5px 5px;
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px;
  background: rgba(255,255,255,.14); color: #fff; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.gx-topbar__chip:hover, .gx-topbar__chip[aria-expanded="true"] { background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.45); }
.gx-topbar__avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: none; border-radius: 999px;
  background: var(--gx-marigold); color: #3b2a05;
  font-family: var(--gx-font-display); font-size: .82rem; font-weight: 700; letter-spacing: .02em;
}
.gx-topbar__quien { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.gx-topbar__nombre { font-size: .86rem; font-weight: 600; max-width: 14rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-topbar__rol { font-size: .7rem; color: rgba(255,255,255,.75); }
.gx-topbar__flecha { flex: none; opacity: .85; transition: transform .15s ease; }
.gx-topbar__menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 240px;
  padding: 6px; background: var(--gx-surface);
  border: 1px solid var(--gx-line); border-radius: var(--gx-radius);
  box-shadow: var(--gx-shadow-lg);
}
.gx-topbar__menu-cab {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--gx-line);
}
.gx-topbar__menu-cab strong { font-size: .86rem; color: var(--gx-text); }
.gx-topbar__menu-cab span { font-size: .74rem; color: var(--gx-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-topbar__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 40px; padding: 8px 12px; border: 0; border-radius: var(--gx-radius-sm);
  background: transparent; color: var(--gx-text); font-size: .86rem; text-align: left; text-decoration: none; cursor: pointer;
}
.gx-topbar__item svg { color: var(--gx-muted); flex: none; }
.gx-topbar__item:hover { background: var(--gx-paper); color: var(--gx-text); }
.gx-topbar__salir { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--gx-line); }
.gx-topbar__item--peligro, .gx-topbar__item--peligro svg { color: var(--gx-red); }
.gx-topbar__item--peligro:hover { background: var(--gx-red-soft); color: var(--gx-red); }
.gx-topbar__hamburguesa {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px;
  background: rgba(255,255,255,.14); color: #fff; cursor: pointer;
}
@media (min-width: 1200px) { .gx-topbar__hamburguesa { display: none; } }
@media (max-width: 640px) {
  .gx-topbar { margin: 0; padding: 16px 4px 20px; }
  .gx-topbar__h1 { font-size: 1.2rem; }
  .gx-topbar__sub { display: none; }
  .gx-topbar__quien, .gx-topbar__flecha { display: none; }
  .gx-topbar__chip { padding: 4px; }
}

/* ------------------------------------------------------------------
   Ficha consolidada del estudiante (livewire/estudiantes/ficha).
------------------------------------------------------------------- */
.gx-ficha__cab { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.gx-ficha__avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--gx-ink); color: #fff;
  font-family: var(--gx-font-display); font-size: 1.35rem; font-weight: 700;
}
.gx-ficha__id { flex: 1 1 280px; min-width: 0; }
.gx-ficha__nombre { margin: 0; font-family: var(--gx-font-display); font-size: 1.35rem; font-weight: 700; color: var(--gx-text); }
.gx-ficha__meta { margin: .2rem 0 .55rem; font-size: .85rem; color: var(--gx-muted); }
.gx-ficha__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.gx-ficha__acciones { flex: none; }
.gx-ficha__tabs {
  display: flex; gap: 4px; padding: 4px; overflow-x: auto;
  background: var(--gx-surface); border: 1px solid var(--gx-line); border-radius: var(--gx-radius);
}
.gx-ficha__tab {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 8px 14px; border: 0; border-radius: var(--gx-radius-sm);
  background: transparent; color: var(--gx-muted); font-size: .86rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.gx-ficha__tab:hover { background: var(--gx-paper); color: var(--gx-text); }
.gx-ficha__tab--on, .gx-ficha__tab--on:hover { background: var(--gx-ink); color: #fff; }
.gx-ficha__n { padding: 0 7px; border-radius: 999px; background: rgba(0,0,0,.08); font-size: .72rem; }
.gx-ficha__tab--on .gx-ficha__n { background: rgba(255,255,255,.22); }
.gx-ficha__dos { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .gx-ficha__dos { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
.gx-ficha__dl { display: grid; grid-template-columns: 9rem 1fr; gap: .45rem 1rem; margin: 0; font-size: .88rem; }
.gx-ficha__dl dt { color: var(--gx-muted); }
.gx-ficha__dl dd { margin: 0; color: var(--gx-text); min-width: 0; overflow-wrap: anywhere; }
.gx-ficha__mono { font-family: ui-monospace, Consolas, monospace; }
.gx-ficha__sub { display: block; font-size: .76rem; color: var(--gx-muted); }
.gx-ficha__ojo { margin: .9rem 0 0; padding: .6rem .8rem; border-radius: var(--gx-radius-sm); background: var(--gx-orange-soft); color: var(--gx-orange); font-size: .8rem; }
.gx-ficha__familia { padding: .6rem 0; border-bottom: 1px solid var(--gx-line); }
.gx-ficha__familia:last-child { border-bottom: 0; }
.gx-ficha__rol { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gx-muted); }
.gx-ficha__form { display: grid; gap: .8rem 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (max-width: 640px) { .gx-ficha__dl { grid-template-columns: 1fr; } .gx-ficha__dl dt { margin-top: .3rem; } }

/* Listado de estudiantes (livewire/estudiantes/estudiante-index). */
.gx-fila-link { cursor: pointer; }
.gx-fila-link:hover td { background: var(--gx-paper); }
.gx-alumno { display: flex; align-items: center; gap: 12px; color: var(--gx-text); text-decoration: none; }
.gx-alumno:hover strong { color: var(--gx-ink); }
.gx-alumno__foto, .gx-alumno__ini {
  width: 38px; height: 38px; flex: none; border-radius: 10px; object-fit: cover;
}
.gx-alumno__ini {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gx-blue-soft); color: var(--gx-ink);
  font-family: var(--gx-font-display); font-size: .8rem; font-weight: 700;
}
.gx-alumno__sub { display: block; font-size: .76rem; color: var(--gx-muted); font-weight: 400; }
.gx-cargando { opacity: .55; transition: opacity .15s; }

/* Foto tipo documento en la ficha (3×4). */
.gx-ficha__foto { position: relative; display: block; flex: none; width: 84px; height: 112px; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--gx-blue-soft); }
.gx-ficha__foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gx-ficha__foto .gx-ficha__avatar { width: 100%; height: 100%; border-radius: 0; }
.gx-ficha__subir {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 0;
  background: rgba(20, 32, 95, .72); color: #fff; font-size: .66rem; font-weight: 600; text-align: center;
  opacity: 0; transition: opacity .15s;
}
.gx-ficha__foto:hover .gx-ficha__subir, .gx-ficha__foto:focus-within .gx-ficha__subir { opacity: 1; }
@media (hover: none) { .gx-ficha__subir { opacity: 1; } }
.gx-topbar__migas { margin: 0 0 .15rem; font-size: .72rem; color: rgba(255,255,255,.7); letter-spacing: .02em; }
.gx-topbar__buscar {
  display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; width: 260px;
  border-radius: var(--gx-radius-sm); background: #fff; color: var(--gx-muted);
}
.gx-topbar__buscar input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: .86rem; color: var(--gx-text); background: transparent; }
.gx-topbar__boton {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: var(--gx-radius-sm);
  background: #12407e; color: #fff; font-size: .86rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.gx-topbar__boton:hover { background: #0d3266; color: #fff; }
@media (max-width: 900px) { .gx-topbar__buscar { display: none; } }
@media (max-width: 640px) { .gx-topbar__boton span { display: none; } }

/* Panel de tesorería (livewire/dashboard/tesoreria). */
.gx-tes__kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.gx-tes__kpi { padding: 1.1rem 1.2rem; background: var(--gx-surface); border: 1px solid var(--gx-line); border-radius: var(--gx-radius); box-shadow: var(--gx-shadow); display: flex; flex-direction: column; gap: .45rem; }
.gx-tes__kpi-cab { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; font-weight: 600; color: var(--gx-muted); }
.gx-tes__ico { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; font-style: normal; font-size: .8rem; font-weight: 700; }
.gx-tes__ico--green { background: var(--gx-green-soft); color: var(--gx-green); }
.gx-tes__ico--blue { background: var(--gx-blue-soft); color: var(--gx-ink); }
.gx-tes__ico--red { background: var(--gx-red-soft); color: var(--gx-red); }
.gx-tes__ico--marigold { background: var(--gx-marigold-soft); color: var(--gx-orange); }
.gx-tes__valor { margin: 0; font-family: var(--gx-font-display); font-size: 1.75rem; font-weight: 700; color: var(--gx-text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.gx-tes__valor small { font-size: .85rem; font-weight: 500; color: var(--gx-muted); }
.gx-tes__barra { height: 6px; border-radius: 999px; background: #eceae4; overflow: hidden; }
.gx-tes__barra span { display: block; height: 100%; border-radius: 999px; }
.gx-tes__meta { margin: 0; font-size: .78rem; color: var(--gx-muted); }
.gx-tes__link { font-size: .8rem; font-weight: 700; text-decoration: none; margin-top: auto; }
.gx-tes__link--red { color: var(--gx-red); }
.gx-tes__link--marigold { color: var(--gx-orange); }
.gx-tes__cartera { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; background: #eceae4; }
.gx-tes__cartera span { display: block; min-width: 2px; }
.gx-tes__leyenda { display: flex; flex-wrap: wrap; gap: .8rem 2.4rem; margin-top: .9rem; }
.gx-tes__leyenda > div { display: grid; grid-template-columns: auto 1fr; column-gap: .45rem; align-items: center; }
.gx-tes__leyenda strong { grid-column: 2; font-family: var(--gx-font-display); font-size: 1.05rem; color: var(--gx-text); }
.gx-tes__punto { width: 10px; height: 10px; border-radius: 3px; }
.gx-tes__leyenda-n { font-size: .78rem; color: var(--gx-muted); }
.gx-tes__tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--gx-paper); border: 1px solid var(--gx-line); border-radius: var(--gx-radius-sm); }
.gx-tes__tab { padding: .35rem .8rem; border: 0; border-radius: 6px; background: transparent; color: var(--gx-muted); font-size: .8rem; font-weight: 600; cursor: pointer; }
.gx-tes__tab--on { background: var(--gx-surface); color: var(--gx-text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.gx-alumno__ini--sm { width: 30px; height: 30px; border-radius: 999px; font-size: .7rem; }
.gx-card__head { gap: .8rem; flex-wrap: wrap; }

/* Panel académico (livewire/academico/panel-academico). */
.gx-aca__cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem; }
.gx-aca__sub { margin: 0; font-size: .85rem; color: var(--gx-muted); }
.gx-aca__periodo { display: flex; flex-direction: column; gap: 2px; font-size: .7rem; font-weight: 700; color: var(--gx-muted); }
.gx-aca__dos { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .gx-aca__dos { grid-template-columns: 1fr 1fr; } }
.gx-aca__rank { display: grid; grid-template-columns: 1.4rem minmax(7rem, 11rem) 1fr auto; align-items: center; gap: .6rem; padding: .3rem 0; font-size: .84rem; }
.gx-aca__rank-n { color: var(--gx-muted); }
.gx-aca__rank-mat { color: var(--gx-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-aca__rank-barra { height: 8px; border-radius: 999px; background: #eceae4; overflow: hidden; }
.gx-aca__rank-barra span { display: block; height: 100%; border-radius: 999px; }
.gx-aca__rank-v { font-size: .75rem; color: var(--gx-muted); white-space: nowrap; }
.gx-aca__rank-v strong { color: var(--gx-text); }
.gx-aca__barras { display: flex; align-items: flex-end; gap: 6px; height: 220px; padding-top: 1rem; }
.gx-aca__col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.gx-aca__col-b { width: 100%; max-width: 38px; border-radius: 6px 6px 0 0; background: #12407e; transition: opacity .15s; }
.gx-aca__col-v { font-size: .75rem; font-weight: 700; color: var(--gx-text); }
.gx-aca__col-g { font-size: .7rem; color: var(--gx-muted); border-top: 1px solid var(--gx-line); width: 100%; padding-top: 3px; }
.gx-aca__col:hover .gx-aca__col-b { opacity: .8; }
.gx-aca__col--on .gx-aca__col-b { background: var(--gx-marigold); }
.gx-aca__col--off .gx-aca__col-b { opacity: .35; }
.gx-aca__n { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; background: var(--gx-orange-soft); color: var(--gx-orange); font-size: .72rem; font-weight: 700; margin-right: 4px; }
.gx-aca__n--rojo { background: var(--gx-red); color: #fff; }

/* Ficha del estudiante, diseño 2027 (livewire/estudiantes/ficha). */
.gx-fx__cab { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.gx-fx__foto-col { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.gx-fx__foto { display: block; width: 96px; height: 96px; border-radius: 999px; overflow: hidden; cursor: pointer; border: 3px solid var(--gx-blue-soft); background: #e6f2ef; }
.gx-fx__foto--fija { cursor: default; }
.gx-fx__foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.gx-fx__ini { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #12407e; font-family: var(--gx-font-display); font-size: 1.7rem; font-weight: 700; }
.gx-fx__subir { font-size: .72rem; font-weight: 600; color: #12407e; }
.gx-fx__id { flex: 1 1 320px; min-width: 0; }
.gx-fx__nombre { margin: 0 0 .45rem; font-family: var(--gx-font-display); font-size: 1.5rem; font-weight: 700; color: var(--gx-text); }
.gx-fx__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.gx-fx__chip { padding: .18rem .55rem; border-radius: 6px; border: 1px solid var(--gx-line); background: var(--gx-paper); font-size: .74rem; color: var(--gx-text); }
.gx-fx__chip--azul { background: var(--gx-blue-soft); border-color: transparent; color: #12407e; font-weight: 700; }
.gx-fx__chip--verde { background: var(--gx-green-soft); border-color: transparent; color: var(--gx-green); font-weight: 700; }
.gx-fx__chip--rojo { background: var(--gx-red-soft); border-color: transparent; color: var(--gx-red); font-weight: 700; }
.gx-fx__avance { margin-top: .7rem; max-width: 420px; }
.gx-fx__avance-txt { display: flex; justify-content: space-between; gap: 1rem; font-size: .74rem; color: var(--gx-muted); }
.gx-fx__avance-txt strong { color: var(--gx-text); }
.gx-fx__avance-barra { height: 5px; margin-top: 4px; border-radius: 999px; background: #eceae4; overflow: hidden; }
.gx-fx__avance-barra span { display: block; height: 100%; background: var(--gx-green); border-radius: 999px; }
.gx-fx__acciones { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; flex: none; }
.gx-fx__mas { display: flex; gap: .9rem; font-size: .78rem; }
.gx-fx__mas a, .gx-fx__mas button { color: var(--gx-muted); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.gx-fx__mas a:hover, .gx-fx__mas button:hover { color: var(--gx-ink); }
.gx-fx__cuenta { display: inline-flex; align-items: center; padding: 0 7px; min-height: 18px; border-radius: 999px; background: var(--gx-marigold-soft); color: #8a6410; font-size: .7rem; font-weight: 700; }
.gx-fx__cuenta--rojo { background: var(--gx-red); color: #fff; }
.gx-ficha__tab--on .gx-fx__cuenta { background: rgba(255,255,255,.25); color: #fff; }
.gx-fx__cuerpo { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1200px) { .gx-fx__cuerpo { grid-template-columns: minmax(0, 1fr) 300px; } .gx-fx__lateral { position: sticky; top: 1rem; } }
.gx-fx__grid { display: grid; gap: .9rem 1.1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.gx-fx__ancho { grid-column: 1 / -1; }
.gx-fx__input--vacio { border-color: var(--gx-marigold) !important; background: #fffdf6 !important; }
.gx-fx__input:disabled { background: var(--gx-paper) !important; color: var(--gx-text); }
.gx-fx__falta { margin-left: .35rem; padding: 0 .4rem; border-radius: 999px; background: var(--gx-marigold-soft); color: #8a6410; font-size: .6rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.gx-fx__falta--req { background: var(--gx-red-soft); color: var(--gx-red); }
.gx-fx__nota { margin: 0 0 .8rem; font-size: .82rem; color: var(--gx-muted); }
.gx-fx__lat-cab { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.gx-fx__lat-cab h3 { margin: 0; font-size: .95rem; font-weight: 700; color: var(--gx-text); }
.gx-fx__lat-k { display: block; font-size: .74rem; color: var(--gx-muted); }
.gx-fx__lat-v { margin: .1rem 0 .7rem; font-family: var(--gx-font-display); font-size: 1.5rem; font-weight: 700; color: var(--gx-text); }
.gx-fx__lat-v small { font-size: .8rem; font-weight: 500; color: var(--gx-muted); }
.gx-fx__lat-dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .8rem; margin: 0 0 .7rem; font-size: .8rem; }
.gx-fx__lat-dl dt { color: var(--gx-muted); }
.gx-fx__lat-dl dd { margin: 0; text-align: right; color: var(--gx-text); font-weight: 600; }
.gx-fx__lat-link { background: none; border: 0; padding: 0; color: #12407e; font-size: .8rem; font-weight: 700; cursor: pointer; }
.gx-fx__pend { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: .5rem 0; border: 0; border-bottom: 1px solid var(--gx-line); background: none; font-size: .84rem; color: var(--gx-text); cursor: pointer; text-align: left; }
.gx-fx__pend:last-child { border-bottom: 0; }

/* Barras de filtros: en una sola fila. .gx-input/.gx-select traen width:100%
   (para formularios), y dentro de una barra con flex-wrap eso apilaba cada
   filtro en su propia línea. El buscador se estira; los selects, a su medida. */
@media (min-width: 640px) {
  .gx-toolbar > .gx-input,
  .gx-toolbar > input[type="search"] { width: auto; flex: 1 1 260px; min-width: 200px; }
  .gx-toolbar > .gx-select { width: auto; flex: 0 1 210px; min-width: 150px; }
  .gx-toolbar > .gx-btn { flex: none; }
}

/* Roles y permisos (livewire/roles/role-index). */
.gx-rol__cards { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.gx-rol__card { display: flex; flex-direction: column; gap: 2px; padding: .8rem 1rem; border: 1px solid var(--gx-line); border-radius: var(--gx-radius-sm); background: var(--gx-paper); text-decoration: none; color: var(--gx-text); }
.gx-rol__card:hover { border-color: var(--gx-ink); }
.gx-rol__card span { font-size: .78rem; color: var(--gx-muted); }
.gx-rol__area td { background: var(--gx-paper); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gx-muted); }
.gx-rol__si { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 999px; background: var(--gx-green-soft); color: var(--gx-green); font-weight: 700; font-size: .8rem; }
.gx-rol__no { color: #c9ccd2; }
