/* ============================================================================
   ConectAT · Interfaz 2026
   ============================================================================

   Hoja unica. Sustituye a app.css + interfaz.css, que siguen en disco: para
   volver atras basta con cambiar las etiquetas <link> de los dos layouts.

   Marca intacta: verde #1e7262, menta #93ccbe, Matter y el imago del Colegio.
   Lo que cambia es el lenguaje:

   · Panel principal "flotante" sobre un lienzo neutro, con el lateral
     integrado en el lienzo. La interfaz se lee como herramienta, no como web.
   · Iconos de trazo (Lucide) en vez de simbolos Unicode.
   · Modo oscuro completo: sigue al sistema y cada cual puede fijarlo.
   · Datos en Geist Mono con cifras tabulares.
   · Movil con barra inferior de pestanas, como una app instalada.

   Todo color sale de las variables de :root. Nada de colores sueltos en los
   componentes: es lo que permite que el modo oscuro funcione sin parches.
   ========================================================================== */

@font-face { font-family:'Matter'; src:url('../fonts/Matter-Light.woff2') format('woff2');    font-weight:300; font-display:swap; }
@font-face { font-family:'Matter'; src:url('../fonts/Matter-Regular.woff2') format('woff2');  font-weight:400; font-display:swap; }
@font-face { font-family:'Matter'; src:url('../fonts/Matter-Medium.woff2') format('woff2');   font-weight:500; font-display:swap; }
@font-face { font-family:'Matter'; src:url('../fonts/Matter-SemiBold.woff2') format('woff2'); font-weight:600; font-display:swap; }
@font-face { font-family:'Matter'; src:url('../fonts/Matter-Bold.woff2') format('woff2');     font-weight:700; font-display:swap; }
/* Geist Mono (OFL), alojada aqui mismo: nada de Google Fonts por RGPD. */
@font-face { font-family:'Geist Mono'; src:url('../fonts/geist-mono-latin-400-normal.woff2') format('woff2'); font-weight:400; font-display:swap; }
@font-face { font-family:'Geist Mono'; src:url('../fonts/geist-mono-latin-500-normal.woff2') format('woff2'); font-weight:500; font-display:swap; }
@font-face { font-family:'Geist Mono'; src:url('../fonts/geist-mono-latin-600-normal.woff2') format('woff2'); font-weight:600; font-display:swap; }

/* ----------------------------------------------------------------------------
   Tokens · claro
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Marca */
  --verde: #1e7262;
  --verde-hover: #185f52;
  --menta: #93ccbe;
  --acento: #1e7262;                 /* enlaces, iconos activos */
  --acento-suave: rgba(30, 114, 98, 0.08);
  --acento-borde: rgba(30, 114, 98, 0.28);
  --sobre-verde: #ffffff;

  /* Superficies */
  --lienzo: #f4f4f3;                 /* fondo de la app y del lateral */
  --panel: #ffffff;                  /* el panel principal */
  --superficie: #ffffff;             /* tarjetas */
  --superficie-2: #f7f7f6;           /* cabeceras de tabla, zonas apagadas */
  --superficie-3: #efefee;           /* hover de filas, pistas de controles */
  --cristal: rgba(255, 255, 255, 0.78);

  /* Bordes */
  --borde: #e8e8e6;
  --borde-fuerte: #d6d6d3;
  --borde-control: #d9d9d6;

  /* Tinta */
  --tinta: #171717;
  --tinta-2: #5f5f5c;
  --tinta-3: #8f8f8b;
  --tinta-invertida: #ffffff;

  /* Estados */
  --ok: #157f3c;      --ok-fondo: #ecfdf3;     --ok-borde: #b7ebc9;
  --peligro: #c4261d; --peligro-fondo: #fef3f2; --peligro-borde: #f6cbc7;
  --atencion: #9a5b13;--atencion-fondo: #fff7ec;--atencion-borde: #f7d9b2;
  --info: #1d5fbf;    --info-fondo: #eff5ff;   --info-borde: #c8dbfb;

  /* Puntos de color por tipo de aviso */
  --t-formacion: #1e7262;
  --t-empleo: #2563eb;
  --t-licitacion: #7c3aed;
  --t-normativa: #d97706;
  --t-evento: #db2777;
  --t-colegio: #0f766e;

  /* Avatares: seis tonos de la familia de la marca */
  --av-1: #d9efe9; --av-1t: #145548;
  --av-2: #e3eefb; --av-2t: #1d4f91;
  --av-3: #f1e8fb; --av-3t: #5b2e91;
  --av-4: #fdeee2; --av-4t: #8a4a16;
  --av-5: #e6f4ea; --av-5t: #24663a;
  --av-6: #eceeef; --av-6t: #3f4649;

  /* Geometria */
  --r-xs: 5px;
  --r-s: 7px;
  --r: 10px;
  --r-l: 14px;

  --sombra-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --sombra-2: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px -8px rgba(0, 0, 0, 0.10);
  --sombra-flota: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 12px 32px -8px rgba(0, 0, 0, 0.18), 0 4px 8px -4px rgba(0, 0, 0, 0.06);
  --anillo: 0 0 0 2px var(--panel), 0 0 0 4px rgba(30, 114, 98, 0.55);
  --velo: rgba(10, 10, 10, 0.40);

  /* Tipografia */
  --sans: 'Matter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --display: var(--sans);
  --texto: var(--sans);

  /* Medidas */
  --ancho-lateral: 248px;
  --alto-barra: 52px;
  --hueco: 8px;                      /* separacion del panel flotante */
  --p-contenido: 32px;

  --curva: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Nombres antiguos que aun usan algunas vistas en linea. Se reapuntan al
     sistema nuevo para que tambien cambien en oscuro. */
  --tinta-suave: var(--tinta-2);
  --navy-300: var(--tinta-2);
  --gris: var(--tinta-3);
  --linea: var(--borde);
  --linea-fuerte: var(--borde-fuerte);
  --blanco: var(--superficie);
  --fondo: var(--lienzo);
  --fondo-suave: var(--superficie-2);
  --rojo: var(--peligro);
  --rojo-fondo: var(--peligro-fondo);
  --ambar: var(--atencion);
  --ambar-fondo: var(--atencion-fondo);
  --verde-suave: var(--acento-suave);
  --verde-oscuro: var(--verde-hover);
  --menta-suave: var(--acento-suave);
  --cian-palido: var(--superficie-2);
}

/* ----------------------------------------------------------------------------
   Tokens · oscuro
   Dos bloques iguales: uno sigue al sistema (salvo que la persona haya fijado
   el claro) y otro se aplica cuando lo fija a mano.
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    color-scheme: dark;
    --acento: #5cc0a6;
    --acento-suave: rgba(92, 192, 166, 0.10);
    --acento-borde: rgba(92, 192, 166, 0.32);
    --verde-hover: #24846f;
    --lienzo: #0a0a0a;
    --panel: #101010;
    --superficie: #151515;
    --superficie-2: #1a1a1a;
    --superficie-3: #222222;
    --cristal: rgba(16, 16, 16, 0.78);
    --borde: #242424;
    --borde-fuerte: #333333;
    --borde-control: #333333;
    --tinta: #ededed;
    --tinta-2: #a3a3a3;
    --tinta-3: #737373;
    --tinta-invertida: #0a0a0a;
    --ok: #4ade80;      --ok-fondo: rgba(74, 222, 128, 0.08);  --ok-borde: rgba(74, 222, 128, 0.25);
    --peligro: #f87171; --peligro-fondo: rgba(248, 113, 113, 0.08); --peligro-borde: rgba(248, 113, 113, 0.28);
    --atencion: #fbbf24;--atencion-fondo: rgba(251, 191, 36, 0.08); --atencion-borde: rgba(251, 191, 36, 0.25);
    --info: #60a5fa;    --info-fondo: rgba(96, 165, 250, 0.08);  --info-borde: rgba(96, 165, 250, 0.25);
    --t-formacion: #5cc0a6; --t-empleo: #60a5fa; --t-licitacion: #a78bfa;
    --t-normativa: #fbbf24; --t-evento: #f472b6; --t-colegio: #2dd4bf;
    --av-1: #12302a; --av-1t: #8fd8c4;
    --av-2: #15233a; --av-2t: #9cc2f7;
    --av-3: #241a35; --av-3t: #c9a8f5;
    --av-4: #33210f; --av-4t: #f3bf8a;
    --av-5: #142a1b; --av-5t: #98dcaa;
    --av-6: #222527; --av-6t: #c2c8cc;
    --sombra-1: none;
    --sombra-2: 0 0 0 1px rgba(255, 255, 255, 0.02);
    --sombra-flota: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px -8px rgba(0, 0, 0, 0.7);
    --anillo: 0 0 0 2px var(--panel), 0 0 0 4px rgba(92, 192, 166, 0.6);
    --velo: rgba(0, 0, 0, 0.62);
  }
}
:root[data-tema="oscuro"] {
  color-scheme: dark;
  --acento: #5cc0a6;
  --acento-suave: rgba(92, 192, 166, 0.10);
  --acento-borde: rgba(92, 192, 166, 0.32);
  --verde-hover: #24846f;
  --lienzo: #0a0a0a;
  --panel: #101010;
  --superficie: #151515;
  --superficie-2: #1a1a1a;
  --superficie-3: #222222;
  --cristal: rgba(16, 16, 16, 0.78);
  --borde: #242424;
  --borde-fuerte: #333333;
  --borde-control: #333333;
  --tinta: #ededed;
  --tinta-2: #a3a3a3;
  --tinta-3: #737373;
  --tinta-invertida: #0a0a0a;
  --ok: #4ade80;      --ok-fondo: rgba(74, 222, 128, 0.08);  --ok-borde: rgba(74, 222, 128, 0.25);
  --peligro: #f87171; --peligro-fondo: rgba(248, 113, 113, 0.08); --peligro-borde: rgba(248, 113, 113, 0.28);
  --atencion: #fbbf24;--atencion-fondo: rgba(251, 191, 36, 0.08); --atencion-borde: rgba(251, 191, 36, 0.25);
  --info: #60a5fa;    --info-fondo: rgba(96, 165, 250, 0.08);  --info-borde: rgba(96, 165, 250, 0.25);
  --t-formacion: #5cc0a6; --t-empleo: #60a5fa; --t-licitacion: #a78bfa;
  --t-normativa: #fbbf24; --t-evento: #f472b6; --t-colegio: #2dd4bf;
  --av-1: #12302a; --av-1t: #8fd8c4;
  --av-2: #15233a; --av-2t: #9cc2f7;
  --av-3: #241a35; --av-3t: #c9a8f5;
  --av-4: #33210f; --av-4t: #f3bf8a;
  --av-5: #142a1b; --av-5t: #98dcaa;
  --av-6: #222527; --av-6t: #c2c8cc;
  --sombra-1: none;
  --sombra-2: 0 0 0 1px rgba(255, 255, 255, 0.02);
  --sombra-flota: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px -8px rgba(0, 0, 0, 0.7);
  --anillo: 0 0 0 2px var(--panel), 0 0 0 4px rgba(92, 192, 166, 0.6);
  --velo: rgba(0, 0, 0, 0.62);
}

/* Iconos de las mascaras CSS (documentos, estados vacios, notificaciones) */
:root {
  --m-pdf: url("data:image/svg+xml,%3Csvg class='lucide lucide-file-text' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' %3E %3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z' /%3E %3Cpath d='M14 2v4a2 2 0 0 0 2 2h4' /%3E %3Cpath d='M10 9H8' /%3E %3Cpath d='M16 13H8' /%3E %3Cpath d='M16 17H8' /%3E %3C/svg%3E");
  --m-hoja: url("data:image/svg+xml,%3Csvg class='lucide lucide-file-spreadsheet' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' %3E %3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z' /%3E %3Cpath d='M14 2v4a2 2 0 0 0 2 2h4' /%3E %3Cpath d='M8 13h2' /%3E %3Cpath d='M14 13h2' /%3E %3Cpath d='M8 17h2' /%3E %3Cpath d='M14 17h2' /%3E %3C/svg%3E");
  --m-diapo: url("data:image/svg+xml,%3Csvg class='lucide lucide-presentation' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' %3E %3Cpath d='M2 3h20' /%3E %3Cpath d='M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3' /%3E %3Cpath d='m7 21 5-5 5 5' /%3E %3C/svg%3E");
  --m-img: url("data:image/svg+xml,%3Csvg class='lucide lucide-image' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' %3E %3Crect width='18' height='18' x='3' y='3' rx='2' ry='2' /%3E %3Ccircle cx='9' cy='9' r='2' /%3E %3Cpath d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21' /%3E %3C/svg%3E");
  --m-zip: url("data:image/svg+xml,%3Csvg class='lucide lucide-file-archive' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' %3E %3Cpath d='M10 12v-1' /%3E %3Cpath d='M10 18v-2' /%3E %3Cpath d='M10 7V6' /%3E %3Cpath d='M14 2v4a2 2 0 0 0 2 2h4' /%3E %3Cpath d='M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01' /%3E %3Ccircle cx='10' cy='20' r='2' /%3E %3C/svg%3E");
  --m-file: url("data:image/svg+xml,%3Csvg class='lucide lucide-file' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' %3E %3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z' /%3E %3Cpath d='M14 2v4a2 2 0 0 0 2 2h4' /%3E %3C/svg%3E");
  --m-inbox: url("data:image/svg+xml,%3Csvg class='lucide lucide-inbox' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' %3E %3Cpolyline points='22 12 16 12 14 15 10 15 8 12 2 12' /%3E %3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z' /%3E %3C/svg%3E");
  --m-check: url("data:image/svg+xml,%3Csvg class='lucide lucide-check' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' %3E %3Cpath d='M20 6 9 17l-5-5' /%3E %3C/svg%3E");
  --m-info: url("data:image/svg+xml,%3Csvg class='lucide lucide-info' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' %3E %3Ccircle cx='12' cy='12' r='10' /%3E %3Cpath d='M12 16v-4' /%3E %3Cpath d='M12 8h.01' /%3E %3C/svg%3E");
  --m-alerta: url("data:image/svg+xml,%3Csvg class='lucide lucide-circle-alert' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' %3E %3Ccircle cx='12' cy='12' r='10' /%3E %3Cline x1='12' x2='12' y1='8' y2='12' /%3E %3Cline x1='12' x2='12.01' y1='16' y2='16' /%3E %3C/svg%3E");
}

/* ----------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--tinta);
  background: var(--lienzo);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01' on;
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: var(--tinta);
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  text-wrap: balance;
}
h1 { font-size: 1.6rem; letter-spacing: -0.03em; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.95rem; letter-spacing: -0.012em; }
h4 { font-size: 0.875rem; }

p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--acento); text-decoration-color: var(--acento-borde); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

img { max-width: 100%; height: auto; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--borde); margin: 20px 0; }

::selection { background: rgba(30, 114, 98, 0.22); }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--anillo); border-radius: var(--r-s); }

kbd {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  padding: 3px 5px;
  border-radius: var(--r-xs);
  border: 1px solid var(--borde);
  background: var(--superficie-2);
  color: var(--tinta-3);
  box-shadow: 0 1px 0 var(--borde);
}

code { font-family: var(--mono); font-size: 0.9em; }

[hidden] { display: none !important; }

.oculto-visual {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Iconos SVG del sprite: <svg class="i"><use href="#i-..."/></svg> */
.i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -3px;
}
.i--s { width: 14px; height: 14px; }
.i--l { width: 20px; height: 20px; }

.saltar {
  position: fixed;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--tinta);
  color: var(--tinta-invertida);
  border-radius: var(--r-s);
  text-decoration: none;
  transition: top 0.15s var(--curva);
}
.saltar:focus-visible { top: 12px; }

/* Transiciones entre paginas (Chrome, Edge, Safari 18.2+). Donde no hay
   soporte, simplemente no pasa nada. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.16s; animation-timing-function: ease; }
.lateral { view-transition-name: lateral; }
.pestanas { view-transition-name: pestanas; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  @view-transition { navigation: none; }
}

/* ----------------------------------------------------------------------------
   Estructura: lateral en el lienzo + panel principal flotante
   -------------------------------------------------------------------------- */
.disposicion {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.lateral {
  width: var(--ancho-lateral);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px 10px;
  background: var(--lienzo);
  color: var(--tinta-2);
  overflow-y: auto;
  scrollbar-width: none;
}
.lateral::-webkit-scrollbar { display: none; }

.lateral__cabeza {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 10px;
}

.marca {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: var(--tinta);
  border-radius: var(--r-s);
  padding: 2px;
}
.marca__imago {
  width: 30px;
  height: 30px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--borde);
}
.marca__texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.marca__nombre { font-size: 14px; font-weight: 600; letter-spacing: -0.015em; }
.marca__sub { font-size: 11.5px; color: var(--tinta-3); }

.lateral .lateral__cerrar { display: none; }

/* Buscador rapido: abre la paleta de comandos */
.buscar-rapido {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 2px 0 10px;
  padding: 7px 8px 7px 10px;
  border: 1px solid var(--borde);
  border-radius: var(--r-s);
  background: var(--panel);
  color: var(--tinta-3);
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--sombra-1);
  transition: border-color 0.12s, color 0.12s;
}
.buscar-rapido:hover { border-color: var(--borde-fuerte); color: var(--tinta-2); }
.buscar-rapido span { flex: 1; }
.buscar-rapido kbd { background: transparent; box-shadow: none; }

/* Navegacion */
.nav { display: flex; flex-direction: column; gap: 1px; }

.nav__grupo {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--tinta-3);
  padding: 14px 10px 4px;
  margin: 0;
}

.nav__enlace {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--r-s);
  color: var(--tinta-2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 450;
  transition: background 0.1s, color 0.1s;
}
.nav__enlace .i { color: var(--tinta-3); transition: color 0.1s; }
.nav__enlace:hover { background: var(--superficie-3); color: var(--tinta); }
.nav__enlace:hover .i { color: var(--tinta-2); }
.nav__enlace[aria-current="page"] {
  background: var(--panel);
  color: var(--tinta);
  font-weight: 500;
  box-shadow: 0 0 0 1px var(--borde), var(--sombra-1);
}
.nav__enlace[aria-current="page"] .i { color: var(--acento); }

.nav__contador {
  margin-left: auto;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--verde);
  color: var(--sobre-verde);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
}

/* Pie del lateral: apariencia y cuenta */
.lateral__pie {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tema {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
  border-radius: var(--r-s);
  background: var(--superficie-3);
}
.tema__opcion {
  display: grid;
  place-items: center;
  height: 26px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--tinta-3);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.tema__opcion:hover { color: var(--tinta); }
.tema__opcion[aria-pressed="true"] {
  background: var(--panel);
  color: var(--tinta);
  box-shadow: 0 0 0 1px var(--borde), var(--sombra-1);
}

.yo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: var(--r-s);
  border: 1px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}
.yo:hover { background: var(--superficie-3); }
.yo__enlace { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.yo__datos { min-width: 0; flex: 1; }
.yo__nombre { font-size: 13px; font-weight: 500; color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yo__empresa { font-size: 11.5px; color: var(--tinta-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yo form { margin: 0; }
.yo__salir {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border: 0;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--tinta-3);
  cursor: pointer;
}
.yo__salir:hover { background: var(--panel); color: var(--peligro); }

/* Panel principal */
.principal {
  flex: 1;
  min-width: 0;
  margin: var(--hueco) var(--hueco) var(--hueco) 0;
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: var(--r-l);
  box-shadow: var(--sombra-1);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

/* Barra superior, pegada arriba dentro del panel */
.barra {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--alto-barra);
  padding: 0 calc(var(--p-contenido) - 8px) 0 var(--p-contenido);
  background: var(--cristal);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--borde);
}
.barra .barra__marca, .barra .barra__menu, .barra .barra__buscar { display: none; }

.migas {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13.5px;
  color: var(--tinta-3);
}
.migas a { color: var(--tinta-3); text-decoration: none; white-space: nowrap; }
.migas a:hover { color: var(--tinta); }
.migas__sep { color: var(--borde-fuerte); font-size: 16px; line-height: 1; }
.migas [aria-current] { color: var(--tinta); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.barra__acciones { margin-left: auto; display: flex; gap: 6px; align-items: center; }

.boton-icono {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: var(--r-s);
  background: transparent;
  color: var(--tinta-2);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.boton-icono:hover { background: var(--superficie-3); color: var(--tinta); }

.campana__punto {
  position: absolute;
  top: 3px; right: 2px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--verde);
  color: var(--sobre-verde);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--panel);
}

.contenido {
  width: 100%;
  max-width: 1160px;
  padding: 28px var(--p-contenido) 64px;
  flex: 1;
}

/* Pestanas inferiores (solo movil) */
.pestanas { display: none; }

/* Velo del menu en movil */
.velo {
  position: fixed;
  inset: 0;
  z-index: 55;
  border: 0;
  padding: 0;
  background: var(--velo);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  cursor: pointer;
  animation: aparece 0.18s ease;
}

@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes sube { from { opacity: 0; transform: translateY(6px) scale(0.985); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------------------
   Paleta de comandos (Cmd/Ctrl + K)
   -------------------------------------------------------------------------- */
.paleta {
  width: min(620px, calc(100% - 24px));
  max-width: none;
  max-height: min(520px, 76vh);
  margin: 12vh auto auto;
  padding: 0;
  border: 0;
  border-radius: var(--r-l);
  background: var(--panel);
  color: var(--tinta);
  box-shadow: var(--sombra-flota);
  overflow: hidden;
}
.paleta[open] { display: flex; flex-direction: column; animation: sube 0.16s var(--curva); }
.paleta::backdrop { background: var(--velo); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

.paleta__form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--borde);
}
.paleta__form .i { color: var(--tinta-3); }
.paleta .paleta__entrada {
  flex: 1;
  height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  color: var(--tinta);
}
.paleta .paleta__entrada:focus { box-shadow: none; }
.paleta__entrada::-webkit-search-cancel-button { display: none; }

.paleta__lista {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  flex: 1;
}
.paleta__grupo {
  padding: 10px 10px 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--tinta-3);
}
.paleta__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-s);
  color: var(--tinta-2);
  font-size: 13.5px;
  cursor: pointer;
  scroll-margin: 6px;
}
.paleta__item .i { color: var(--tinta-3); }
.paleta__item[aria-selected="true"] { background: var(--superficie-3); color: var(--tinta); }
.paleta__item[aria-selected="true"] .i { color: var(--acento); }
.paleta__item mark { background: transparent; color: var(--tinta); font-weight: 600; }
.paleta__atajo { margin-left: auto; font-size: 11.5px; color: var(--tinta-3); }
.paleta__vacio { padding: 28px 12px; text-align: center; color: var(--tinta-3); font-size: 13px; }

.paleta__pie {
  display: flex;
  gap: 14px;
  padding: 9px 14px;
  border-top: 1px solid var(--borde);
  background: var(--superficie-2);
  font-size: 11.5px;
  color: var(--tinta-3);
}
.paleta__pie kbd { margin-right: 3px; }

/* ----------------------------------------------------------------------------
   Cabeceras de pagina
   -------------------------------------------------------------------------- */
.cabecera {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--borde);
}
.cabecera > div:first-child { min-width: 0; }
.cabecera__texto {
  color: var(--tinta-2);
  font-size: 14px;
  max-width: 64ch;
  margin: 6px 0 0;
}
.cabecera .fila { gap: 8px; }

/* Antetitulos: los que van encima de un titular son decoracion y se quitan.
   Los que hacen de rotulo dentro de una tarjeta se quedan como titulo de
   seccion, en minuscula y sin espaciado. */
.cabecera .antetitulo,
.pantalla .antetitulo,
.documento-legal > .antetitulo,
.centrada .antetitulo { display: none; }
.antetitulo {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--tinta);
  margin: 0 0 4px;
}

/* Titulo de seccion con enlace a la derecha */
.seccion { margin-top: 32px; }
.seccion:first-child { margin-top: 0; }
.seccion__cabeza {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.seccion__cabeza h2 { font-size: 0.98rem; }
.seccion__enlace {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--tinta-2);
  text-decoration: none;
  white-space: nowrap;
}
.seccion__enlace:hover { color: var(--tinta); }
.seccion__enlace .i { width: 14px; height: 14px; transition: transform 0.15s var(--curva); }
.seccion__enlace:hover .i { transform: translateX(2px); }

/* ----------------------------------------------------------------------------
   Tarjetas y rejillas
   -------------------------------------------------------------------------- */
.tarjeta {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--sombra-1);
}
.tarjeta--enlace {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.tarjeta--enlace:hover { border-color: var(--borde-fuerte); box-shadow: var(--sombra-2); }
.tarjeta--destacada { border-color: var(--acento-borde); box-shadow: inset 0 2px 0 var(--verde), var(--sombra-1); }
.tarjeta h3 + p, .tarjeta h3 + .pequeno { margin-top: 4px; }

.rejilla { display: grid; gap: 12px; }
.rejilla--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rejilla--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rejilla--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rejilla--principal { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.rejilla--red { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.rejilla--ficha { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }

/* Indicadores */
.dato, .metrica {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--sombra-1);
}
.dato__etiqueta, .metrica__etiqueta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 450;
  color: var(--tinta-2);
  text-transform: none;
  letter-spacing: 0;
  margin: 0 0 8px;
}
.dato__etiqueta .i, .metrica__etiqueta .i { color: var(--tinta-3); width: 14px; height: 14px; }
.dato__cifra, .metrica__cifra, .cifra {
  font-family: var(--mono);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--tinta);
  margin: 0;
}
.dato__cifra--texto { font-family: var(--sans); font-size: 1.15rem; letter-spacing: -0.02em; }
.metrica__pie, .cifra__pie { font-size: 12px; color: var(--tinta-3); margin: 8px 0 0; }
.metrica--enlace { display: block; text-decoration: none; color: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.metrica--enlace:hover { border-color: var(--borde-fuerte); box-shadow: var(--sombra-2); }
.metrica--acento .metrica__cifra { color: var(--acento); }
.cifra--s { font-size: 1.1rem; }
.metricas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

/* ----------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--borde-control);
  border-radius: var(--r-s);
  background: var(--superficie);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--sombra-1);
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s, transform 0.06s;
  -webkit-tap-highlight-color: transparent;
}
.boton:hover:not(:disabled) { background: var(--superficie-2); border-color: var(--borde-fuerte); }
.boton:active:not(:disabled) { transform: translateY(0.5px); }
.boton:disabled { opacity: 0.5; cursor: not-allowed; }
.boton .i { width: 15px; height: 15px; }

.boton--principal, .boton--navy {
  background: var(--verde);
  border-color: var(--verde);
  color: var(--sobre-verde);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 2px rgba(0, 0, 0, 0.12);
}
.boton--principal:hover:not(:disabled), .boton--navy:hover:not(:disabled) { background: var(--verde-hover); border-color: var(--verde-hover); }
.boton--navy { background: var(--tinta); border-color: var(--tinta); color: var(--tinta-invertida); }
.boton--navy:hover:not(:disabled) { background: var(--tinta-2); border-color: var(--tinta-2); }

.boton--suave { background: var(--superficie); color: var(--tinta); }
.boton--fantasma { background: transparent; border-color: transparent; box-shadow: none; color: var(--tinta-2); }
.boton--fantasma:hover:not(:disabled) { background: var(--superficie-3); border-color: transparent; color: var(--tinta); }
.boton--peligro { background: var(--superficie); color: var(--peligro); border-color: var(--peligro-borde); }
.boton--peligro:hover:not(:disabled) { background: var(--peligro-fondo); border-color: var(--peligro); }
.boton--pequeno { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }
.boton--ancho { width: 100%; }

.enlace-sutil {
  background: none;
  border: 0;
  padding: 0 0 0 8px;
  font: inherit;
  font-size: 12px;
  color: var(--tinta-3);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--borde-fuerte);
  text-underline-offset: 3px;
}
.enlace-sutil:hover { color: var(--peligro); }

/* ----------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */
.campo { margin-bottom: 16px; }
.campo__etiqueta {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--tinta);
  margin-bottom: 6px;
}
.campo__etiqueta input[type="checkbox"] { margin-right: 6px; }
.campo__ayuda { font-size: 12px; color: var(--tinta-3); margin-top: 5px; }

input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="tel"], input[type="date"], input[type="datetime-local"], input[type="number"],
input[type="search"], input[type="time"], select, textarea, .campo__control {
  width: 100%;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--borde-control);
  border-radius: var(--r-s);
  background: var(--superficie);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 16px;                 /* en movil evita el zoom de iOS */
  line-height: 1.4;
  box-shadow: var(--sombra-1);
  transition: border-color 0.12s, box-shadow 0.12s;
  -webkit-appearance: none;
  appearance: none;
}
@media (min-width: 861px) {
  input[type="text"], input[type="email"], input[type="password"], input[type="url"],
  input[type="tel"], input[type="date"], input[type="datetime-local"], input[type="number"],
  input[type="search"], input[type="time"], select, textarea, .campo__control { font-size: 13.5px; }
}
input::placeholder, textarea::placeholder { color: var(--tinta-3); }
input:hover, select:hover, textarea:hover { border-color: var(--borde-fuerte); }
input:focus, select:focus, textarea:focus, .campo__control:focus {
  outline: none;
  border-color: var(--acento);
  box-shadow: 0 0 0 3px var(--acento-suave);
}
select {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8f8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}
textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--verde); width: 16px; height: 16px; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.55; cursor: pointer; }

input[type="file"] { width: 100%; font-size: 13px; color: var(--tinta-2); padding: 4px 0; }
input[type="file"]::file-selector-button {
  margin-right: 12px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--borde-control);
  border-radius: var(--r-s);
  background: var(--superficie);
  color: var(--tinta);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.formulario-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* Interruptores de privacidad: la casilla se pinta como un switch */
.interruptor {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--borde);
  border-radius: var(--r);
  background: var(--superficie);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.interruptor:hover { border-color: var(--borde-fuerte); }
.interruptor:has(input:checked) { border-color: var(--acento-borde); background: var(--acento-suave); }
.interruptor input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 18px;
  margin: 1px 0 0;
  border-radius: 99px;
  background: var(--borde-fuerte);
  cursor: pointer;
  transition: background 0.18s var(--curva);
}
.interruptor input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s var(--curva);
}
.interruptor input[type="checkbox"]:checked { background: var(--verde); }
.interruptor input[type="checkbox"]:checked::after { transform: translateX(14px); }
.interruptor__titulo { font-size: 13.5px; font-weight: 500; color: var(--tinta); }
.interruptor__ayuda { font-size: 12.5px; color: var(--tinta-2); margin-top: 2px; line-height: 1.5; }

/* ----------------------------------------------------------------------------
   Etiquetas, puntos y avatares
   -------------------------------------------------------------------------- */
.etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--borde);
  border-radius: 99px;
  background: var(--superficie-2);
  color: var(--tinta-2);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
}
.etiqueta .i { width: 12px; height: 12px; }
.etiqueta--verde, .etiqueta--menta { background: var(--acento-suave); border-color: var(--acento-borde); color: var(--acento); }
.etiqueta--navy  { background: var(--tinta); border-color: var(--tinta); color: var(--tinta-invertida); }
.etiqueta--ambar { background: var(--atencion-fondo); border-color: var(--atencion-borde); color: var(--atencion); }
.etiqueta--roja  { background: var(--peligro-fondo); border-color: var(--peligro-borde); color: var(--peligro); }

/* Punto de color delante de una etiqueta (tipo de aviso, estado) */
.punto { width: 6px; height: 6px; border-radius: 50%; background: var(--tinta-3); flex-shrink: 0; }
.punto--formacion  { background: var(--t-formacion); }
.punto--empleo     { background: var(--t-empleo); }
.punto--licitacion { background: var(--t-licitacion); }
.punto--normativa  { background: var(--t-normativa); }
.punto--evento     { background: var(--t-evento); }
.punto--colegio    { background: var(--t-colegio); }

.avatar {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  object-fit: cover;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: var(--av-1);
  color: var(--av-1t);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.avatar--t2 { background: var(--av-2); color: var(--av-2t); }
.avatar--t3 { background: var(--av-3); color: var(--av-3t); }
.avatar--t4 { background: var(--av-4); color: var(--av-4t); }
.avatar--t5 { background: var(--av-5); color: var(--av-5t); }
.avatar--t6 { background: var(--av-6); color: var(--av-6t); }
.avatar--s  { width: 26px; height: 26px; font-size: 10.5px; border-radius: 6px; }
.avatar--l  { width: 52px; height: 52px; font-size: 17px; border-radius: 12px; }
.avatar--xl { width: 84px; height: 84px; font-size: 26px; border-radius: 18px; }

/* ----------------------------------------------------------------------------
   Listas en filas y tablas
   -------------------------------------------------------------------------- */
.lista, .lista-filas {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--r);
  box-shadow: var(--sombra-1);
  overflow: hidden;
}
.lista > * + *, .lista-filas > * + * { border-top: 1px solid var(--borde); }
.lista__item, .fila-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: inherit;
  text-decoration: none;
  transition: background 0.1s;
}
a.lista__item:hover, .fila-item:hover { background: var(--superficie-2); }
.lista__cuerpo { flex: 1; min-width: 0; }
.lista__titulo { font-size: 13.5px; font-weight: 500; color: var(--tinta); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--tinta-3); margin: 2px 0 0; }
.lista__lado { display: flex; align-items: center; gap: 10px; flex-shrink: 0; font-size: 12.5px; color: var(--tinta-3); }
.lista__vacio { padding: 18px 16px; font-size: 13px; color: var(--tinta-3); }
.lista__icono {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--superficie-2);
  border: 1px solid var(--borde);
  color: var(--tinta-2);
  flex-shrink: 0;
}

.mono, .aviso__precio, .filtro__n, .dato-mono {
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.tabla-envoltorio {
  overflow-x: auto;
  border: 1px solid var(--borde);
  border-radius: var(--r);
  background: var(--superficie);
  box-shadow: var(--sombra-1);
}
table.tabla { width: 100%; border-collapse: collapse; }
.tabla th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--tinta-2);
  text-transform: none;
  letter-spacing: 0;
  padding: 9px 16px;
  background: var(--superficie-2);
  border-bottom: 1px solid var(--borde);
  white-space: nowrap;
}
.tabla td { padding: 11px 16px; border-bottom: 1px solid var(--borde); vertical-align: middle; font-size: 13.5px; }
.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla tbody tr { transition: background 0.1s; }
.tabla tbody tr:hover { background: var(--superficie-2); }
.tabla .derecha { text-align: right; }

.persona { display: flex; align-items: center; gap: 11px; min-width: 0; }
.persona__nombre { font-weight: 500; font-size: 13.5px; color: var(--tinta); }
.persona__meta { font-size: 12.5px; color: var(--tinta-3); }

/* ----------------------------------------------------------------------------
   Filtros como pestanas
   -------------------------------------------------------------------------- */
.filtros {
  display: flex;
  gap: 2px;
  margin: -8px 0 20px;
  padding: 0;
  border-bottom: 1px solid var(--borde);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filtros::-webkit-scrollbar { display: none; }
.filtro {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 11px;
  border: 0;
  background: transparent;
  color: var(--tinta-3);
  font-size: 13.5px;
  font-weight: 450;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.12s;
}
.filtro::before {
  content: '';
  position: absolute;
  inset: 5px 2px;
  border-radius: var(--r-s);
  background: transparent;
  z-index: -1;
  transition: background 0.12s;
}
.filtro:hover { color: var(--tinta); }
.filtro:hover::before { background: var(--superficie-3); }
.filtro[aria-current="true"] { color: var(--tinta); font-weight: 500; }
.filtro[aria-current="true"]::after {
  content: '';
  position: absolute;
  left: 8px; right: 8px; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--tinta);
}
.filtro__n { color: var(--tinta-3); font-size: 11.5px; }

.buscador { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.buscador > input[type="search"], .buscador > input[type="text"] { flex: 1; width: auto; min-width: 200px; }
.buscador .campo { margin-bottom: 0; flex: 1; min-width: 200px; }

/* ----------------------------------------------------------------------------
   Mensajes de aviso (flash e informativos)
   -------------------------------------------------------------------------- */
.aviso {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 11px 14px;
  border: 1px solid;
  border-radius: var(--r);
  font-size: 13.5px;
  line-height: 1.5;
  animation: sube 0.22s var(--curva);
}
.aviso > span[aria-hidden="true"]:first-child {
  flex-shrink: 0;
  width: 16px; height: 16px;
  margin-top: 1.5px;
  font-size: 0;
  background: currentColor;
  -webkit-mask: var(--m-info) center / contain no-repeat;
  mask: var(--m-info) center / contain no-repeat;
}
.aviso a { color: inherit; font-weight: 500; text-decoration-color: currentColor; }
.aviso--ok    { background: var(--ok-fondo); border-color: var(--ok-borde); color: var(--ok); }
.aviso--ok > span[aria-hidden="true"]:first-child { -webkit-mask-image: var(--m-check); mask-image: var(--m-check); }
.aviso--error { background: var(--peligro-fondo); border-color: var(--peligro-borde); color: var(--peligro); }
.aviso--error > span[aria-hidden="true"]:first-child { -webkit-mask-image: var(--m-alerta); mask-image: var(--m-alerta); }
.aviso--info  { background: var(--atencion-fondo); border-color: var(--atencion-borde); color: var(--atencion); }

/* Estado vacio */
.vacio {
  text-align: center;
  padding: 44px 24px;
  border: 1px dashed var(--borde-fuerte);
  border-radius: var(--r);
  background: var(--superficie-2);
}
.vacio__icono {
  width: 40px; height: 40px;
  margin: 0 auto 14px;
  border-radius: 10px;
  border: 1px solid var(--borde);
  background: var(--superficie);
  box-shadow: var(--sombra-1);
  font-size: 0;
  position: relative;
}
.vacio__icono::after {
  content: '';
  position: absolute;
  inset: 11px;
  background: var(--tinta-3);
  -webkit-mask: var(--m-inbox) center / contain no-repeat;
  mask: var(--m-inbox) center / contain no-repeat;
}
.vacio h2, .vacio h3 { font-size: 0.95rem; }
.vacio p { color: var(--tinta-2); font-size: 13px; max-width: 46ch; margin: 6px auto 0; }
.vacio .boton { margin-top: 16px; }

/* ----------------------------------------------------------------------------
   Ventanas modales
   -------------------------------------------------------------------------- */
dialog {
  width: calc(100% - 32px);
  max-width: 600px;
  padding: 0;
  border: 0;
  border-radius: var(--r-l);
  background: var(--panel);
  color: var(--tinta);
  box-shadow: var(--sombra-flota);
}
dialog[open] { animation: sube 0.18s var(--curva); }
dialog::backdrop { background: var(--velo); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal__cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--borde);
}
.modal__cabecera h2 { font-size: 1rem; }
.modal__cuerpo { padding: 18px 20px 6px; max-height: 70vh; overflow-y: auto; }
.modal__pie {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--borde);
  background: var(--superficie-2);
  border-radius: 0 0 var(--r-l) var(--r-l);
}
.cerrar {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  padding: 0;
  border: 0;
  border-radius: var(--r-s);
  background: transparent;
  color: var(--tinta-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.cerrar:hover { background: var(--superficie-3); color: var(--tinta); }

/* ----------------------------------------------------------------------------
   Documentos
   -------------------------------------------------------------------------- */
.documento__icono {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
  font-size: 0;
  background: var(--superficie-2);
  border: 1px solid var(--borde);
  --tono: var(--tinta-2);
  --mask: var(--m-file);
}
.documento__icono::after {
  content: '';
  position: absolute;
  inset: 8px;
  background: var(--tono);
  -webkit-mask: var(--mask) center / contain no-repeat;
  mask: var(--mask) center / contain no-repeat;
}
.documento__icono--pdf   { --tono: #dc4a3d; --mask: var(--m-pdf); }
.documento__icono--hoja  { --tono: #1f9254; --mask: var(--m-hoja); }
.documento__icono--slide { --tono: #d97706; --mask: var(--m-diapo); }
.documento__icono--img   { --tono: #3b6fd8; --mask: var(--m-img); }

/* ----------------------------------------------------------------------------
   Foro (el codigo PHP es de Laura: aqui solo se viste)
   -------------------------------------------------------------------------- */
.hilo {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--borde);
  transition: background 0.1s;
}
.hilo:last-child { border-bottom: 0; }
.hilo:hover { background: var(--superficie-2); }
.hilo .avatar { flex-shrink: 0; }
.hilo__titulo { font-weight: 500; font-size: 14px; color: var(--tinta); margin: 2px 0; overflow-wrap: anywhere; }
.hilo__extracto { font-size: 13px; color: var(--tinta-2); overflow-wrap: anywhere; }
.hilo__meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--tinta-3); margin-top: 6px; }
.hilo__etiquetas { display: flex; gap: 6px; flex-wrap: wrap; }
.hilo__etiquetas:empty { display: none; }

.mensaje {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--sombra-1);
}
.mensaje__cabecera { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.mensaje__cuerpo { white-space: pre-wrap; line-height: 1.65; overflow-wrap: anywhere; color: var(--tinta); }
.mensaje__acciones { display: flex; gap: 14px; margin-top: 12px; font-size: 12.5px; }
.mensaje__acciones form { display: inline; margin: 0; }
.mensaje--inicial { border-color: var(--acento-borde); }
.mensaje--inicial .mensaje__cuerpo { font-size: 15px; }
.mensaje--nuevo { box-shadow: inset 2px 0 0 var(--verde), var(--sombra-1); }
.mensaje--del-autor { background: var(--superficie-2); }
.mensaje [id^="r-"], .mensaje[id^="r-"] { scroll-margin-top: 80px; }
#responder textarea { width: 100%; }

.foro-hilo { max-width: 820px; }
.foro-hilo__titulo { font-size: 1.5rem; margin: 8px 0 18px; overflow-wrap: anywhere; }
.foro-hilo__contador { font-size: 0.95rem; margin: 26px 0 12px; color: var(--tinta-2); }
.foro-hilo__nuevas {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--acento);
}
.foro-hilo__nuevas::after { content: ''; flex: 1; height: 1px; background: var(--acento-borde); }

.paginacion { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; }

/* ----------------------------------------------------------------------------
   Agenda
   -------------------------------------------------------------------------- */
.evento { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.evento__fecha {
  flex-shrink: 0;
  width: 56px;
  padding: 7px 0 8px;
  text-align: center;
  border: 1px solid var(--borde);
  border-radius: 10px;
  background: var(--superficie);
  box-shadow: var(--sombra-1);
  overflow: hidden;
}
.evento__mes {
  order: -1;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--peligro);
  margin: 0 0 1px;
}
.evento__dia {
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--tinta);
}
.evento__fecha { display: flex; flex-direction: column; align-items: center; }
.evento__hora { font-family: var(--mono); font-size: 11.5px; color: var(--tinta-3); margin-top: 4px; }
.evento__cuerpo { flex: 1; min-width: 220px; }
.evento__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--tinta-3); margin-top: 8px; }

/* ----------------------------------------------------------------------------
   Notificaciones
   -------------------------------------------------------------------------- */
.notificacion {
  display: flex;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--borde);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.notificacion:last-child { border-bottom: 0; }
.notificacion:hover { background: var(--superficie-2); }
.notificacion--nueva { background: var(--acento-suave); }
.notificacion--nueva:hover { background: var(--acento-suave); }
.notificacion__icono {
  position: relative;
  width: 32px; height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  font-size: 0;
  background: var(--superficie-2);
  border: 1px solid var(--borde);
}
.notificacion__icono::after {
  content: '';
  position: absolute;
  inset: 8px;
  background: var(--tinta-2);
  -webkit-mask: var(--m-info) center / contain no-repeat;
  mask: var(--m-info) center / contain no-repeat;
}
.notificacion--nueva .notificacion__icono { background: var(--verde); border-color: var(--verde); }
.notificacion--nueva .notificacion__icono::after { background: var(--sobre-verde); }
.notificacion__punto { width: 7px; height: 7px; border-radius: 50%; background: var(--verde); flex-shrink: 0; margin-top: 8px; }

/* ----------------------------------------------------------------------------
   Redes y conversacion
   -------------------------------------------------------------------------- */
.red--dentro { box-shadow: inset 2px 0 0 var(--verde), var(--sombra-1); }
.red__datos { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; font-size: 12.5px; color: var(--tinta-3); }

.sin-subrayado { color: inherit; text-decoration: none; }
.sin-subrayado:hover { color: var(--acento); }

.conversacion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 560px;
  padding: 18px;
  overflow-y: auto;
  background: var(--superficie-2);
  border: 1px solid var(--borde);
  border-radius: var(--r);
}
.conversacion__dia {
  align-self: center;
  margin: 6px 0 2px;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--superficie);
  border: 1px solid var(--borde);
  font-size: 11.5px;
  color: var(--tinta-3);
  text-transform: none;
  letter-spacing: 0;
}
.mensaje-chat { display: flex; gap: 8px; align-items: flex-end; }
.mensaje-chat--mio { flex-direction: row-reverse; }
.mensaje-chat__burbuja {
  max-width: 78%;
  padding: 9px 13px;
  border: 1px solid var(--borde);
  border-radius: 14px 14px 14px 4px;
  background: var(--superficie);
  box-shadow: var(--sombra-1);
}
.mensaje-chat--mio .mensaje-chat__burbuja {
  background: var(--verde);
  border-color: var(--verde);
  border-radius: 14px 14px 4px 14px;
}
.mensaje-chat__quien { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--acento); }
.mensaje-chat__texto { font-size: 14px; line-height: 1.55; color: var(--tinta); overflow-wrap: anywhere; }
.mensaje-chat__hora { margin: 3px 0 0; font-family: var(--mono); font-size: 10.5px; color: var(--tinta-3); }
.mensaje-chat--mio .mensaje-chat__texto,
.mensaje-chat--mio .mensaje-chat__quien { color: var(--sobre-verde); }
.mensaje-chat--mio .mensaje-chat__hora { color: rgba(255, 255, 255, 0.7); }
.mensaje-chat--mio .enlace-sutil { color: rgba(255, 255, 255, 0.75); }

/* Burbujas de la mensajeria uno a uno */
.burbuja {
  max-width: 78%;
  padding: 9px 13px;
  border: 1px solid var(--borde);
  border-radius: 14px 14px 14px 4px;
  background: var(--superficie);
  box-shadow: var(--sombra-1);
  color: var(--tinta);
}
.burbuja--mia { background: var(--verde); border-color: var(--verde); color: var(--sobre-verde); border-radius: 14px 14px 4px 14px; }
.burbuja__cuerpo { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; }
.burbuja__hora { font-family: var(--mono); font-size: 10.5px; opacity: 0.65; margin-top: 3px; }

.escribir { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.escribir textarea { flex: 1; margin: 0; min-height: 44px; }

/* Directorio: especialidades */
.especialidades { display: flex; flex-wrap: wrap; gap: 6px; }
.especialidad {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 99px;
  background: var(--superficie);
  border: 1px solid var(--borde);
  font-size: 12.5px;
  color: var(--tinta-2);
  text-decoration: none;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.especialidad:hover { border-color: var(--borde-fuerte); color: var(--tinta); }
.especialidad[aria-current="true"] { background: var(--tinta); border-color: var(--tinta); color: var(--tinta-invertida); }
.especialidad-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--borde);
  border-radius: var(--r-s);
  background: var(--superficie);
  cursor: pointer;
  font-size: 13.5px;
  transition: border-color 0.12s, background 0.12s;
}
.especialidad-check:hover { border-color: var(--borde-fuerte); }
.especialidad-check:has(input:checked) { border-color: var(--acento-borde); background: var(--acento-suave); }
.especialidad-check input { margin: 0; flex-shrink: 0; }

/* Entrevistas */
.entrevista__cuerpo { font-size: 15.5px; line-height: 1.75; color: var(--tinta); }
.entrevista__cuerpo p { margin: 0 0 18px; }
.entrevista__pregunta { font-weight: 600; font-size: 16.5px; line-height: 1.4; color: var(--acento); margin: 30px 0 12px !important; }
.entrevista__pregunta:first-child { margin-top: 0 !important; }

/* ----------------------------------------------------------------------------
   Inicio
   -------------------------------------------------------------------------- */
.saludo {
  position: relative;
  margin: -4px 0 28px;
  padding: 16px 0 0;
  isolation: isolate;
}
/* Rejilla tenue con un halo verde arriba a la derecha: el unico adorno */
.saludo::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -28px; right: calc(-1 * var(--p-contenido));
  width: min(560px, 70%);
  height: 230px;
  background-image:
    linear-gradient(to right, var(--borde) 1px, transparent 1px),
    linear-gradient(to bottom, var(--borde) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: right top;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 100% 0%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 80% 90% at 100% 0%, #000 10%, transparent 72%);
  pointer-events: none;
}
.saludo::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: -150px; right: -80px;
  width: 520px; height: 320px;
  background: radial-gradient(closest-side, rgba(30, 114, 98, 0.13), transparent);
  pointer-events: none;
}
.saludo__fecha { font-family: var(--mono); font-size: 12px; color: var(--tinta-3); margin: 0 0 8px; }
.saludo__fecha::first-letter { text-transform: uppercase; }
.saludo h1 { font-size: 1.85rem; }
.saludo p { color: var(--tinta-2); margin: 6px 0 0; max-width: 60ch; }
.saludo .metricas { margin-top: 22px; }

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px 20px; }
.bento > * { grid-column: span 12; min-width: 0; }
.bento__6 { grid-column: span 6; }
.bento__7 { grid-column: span 7; }
.bento__5 { grid-column: span 5; }
.bento__8 { grid-column: span 8; }
.bento__4 { grid-column: span 4; }

/* Avisos en filas */
.fila-aviso {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  color: inherit;
  text-decoration: none;
  transition: background 0.1s;
}
.fila-aviso:hover { background: var(--superficie-2); }
.fila-aviso__tipo { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tinta-2); white-space: nowrap; }
.fila-aviso__titulo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--tinta);
  line-height: 1.35;
}
.fila-aviso__titulo .i { color: var(--atencion); fill: var(--atencion); width: 13px; height: 13px; flex-shrink: 0; }
.fila-aviso__resumen { font-size: 13px; color: var(--tinta-2); margin: 3px 0 0; }
.fila-aviso__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: 12.5px; color: var(--tinta-3); }
.fila-aviso__lado { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; }
.fila-aviso__fecha { font-family: var(--mono); font-size: 12px; color: var(--tinta-2); white-space: nowrap; }
.fila-aviso__precio { font-family: var(--mono); font-size: 12px; color: var(--acento); white-space: nowrap; }
.sep { color: var(--borde-fuerte); }

/* Franja del historico: la prueba de lo que hace el Colegio */
.constancia {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--borde);
  border-radius: var(--r);
  background: var(--superficie-2);
}
.constancia__cifra { font-family: var(--mono); font-size: 1.6rem; font-weight: 500; letter-spacing: -0.04em; color: var(--tinta); line-height: 1; }
.constancia p { flex: 1; min-width: 220px; margin: 0; font-size: 13px; color: var(--tinta-2); }
.constancia .boton { margin-left: auto; }

/* ----------------------------------------------------------------------------
   Pantallas sin navegacion: acceso, registro, estados
   -------------------------------------------------------------------------- */
.pantalla {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  gap: var(--hueco);
  padding: var(--hueco);
  background: var(--lienzo);
}
.pantalla__marca {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 40px;
  border-radius: var(--r-l);
  overflow: hidden;
  isolation: isolate;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(8, 36, 30, 0.15) 0%, rgba(8, 36, 30, 0.85) 100%),
    linear-gradient(135deg, rgba(30, 114, 98, 0.78) 0%, rgba(14, 58, 49, 0.72) 100%),
    url('../img/acceso.jpg') center 38% / cover no-repeat;
}
.pantalla__marca::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%);
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
.pantalla__marca .marca { color: #ffffff; }
.pantalla__marca .marca__sub { color: rgba(255, 255, 255, 0.6); }
.pantalla__marca .marca__imago { box-shadow: none; }
.pantalla__marca .marca > span { display: flex; flex-direction: column; line-height: 1.15; }
.pantalla__marca .marca__nombre { font-size: 15px; }
.pantalla__titular {
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  max-width: 14ch;
  color: #ffffff;
}
.pantalla__titular em { font-style: normal; color: var(--menta); }
.pantalla__entradilla { color: rgba(255, 255, 255, 0.72); max-width: 44ch; margin-top: 16px; font-size: 15px; }
.hitos { display: flex; gap: 28px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.hito__cifra { font-family: var(--mono); font-size: 1.7rem; font-weight: 500; letter-spacing: -0.04em; color: #ffffff; line-height: 1; }
.hito__etiqueta { font-size: 12.5px; color: rgba(255, 255, 255, 0.62); margin-top: 6px; text-transform: none; letter-spacing: 0; }

.pantalla__panel {
  width: min(100%, 500px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px clamp(24px, 5vw, 64px);
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: var(--r-l);
  overflow-y: auto;
}
.pantalla__panel--ancho { width: min(100%, 680px); }
.pantalla__panel h1, .pantalla__panel h2 { font-size: 1.6rem; letter-spacing: -0.03em; }
.pantalla__pie {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--borde);
  font-size: 12px;
  color: var(--tinta-3);
  text-align: center;
}

.centrada {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--lienzo);
  background-image: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(30, 114, 98, 0.12), transparent);
}
.centrada__caja {
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: var(--r-l);
  box-shadow: var(--sombra-2);
}
.centrada__caja h1 { font-size: 1.35rem; }
.centrada__icono {
  position: relative;
  width: 44px; height: 44px;
  margin: 0 auto 18px;
  border-radius: 12px;
  border: 1px solid var(--borde);
  background: var(--superficie-2);
  font-size: 0;
}
.centrada__icono::after {
  content: '';
  position: absolute;
  inset: 12px;
  background: var(--tinta-2);
  -webkit-mask: var(--m-info) center / contain no-repeat;
  mask: var(--m-info) center / contain no-repeat;
}

/* Documentos legales */
.cabecera-legal { background: var(--panel); border-bottom: 1px solid var(--borde); padding: 12px 24px; position: sticky; top: 0; z-index: 10; }
.cabecera-legal__interior { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cabecera-legal .marca__imago { width: 28px; height: 28px; }
.documento-legal { max-width: 760px; margin: 0 auto; padding: 44px 24px 80px; font-size: 15px; line-height: 1.7; }
.documento-legal h1 { font-size: 2rem; margin-bottom: 6px; }
.documento-legal h2 { margin: 34px 0 10px; font-size: 1.15rem; }
.documento-legal h3 { margin: 22px 0 8px; font-size: 1rem; }
.documento-legal ul { padding-left: 22px; margin: 0 0 16px; }
.documento-legal li { margin-bottom: 7px; }
.documento-legal .tarjeta { margin: 20px 0 24px; }
body:has(.documento-legal), body:has(.cabecera-legal) { background: var(--panel); }

/* ----------------------------------------------------------------------------
   Utilidades
   -------------------------------------------------------------------------- */
.pila > * + * { margin-top: 12px; }
.pila-s > * + * { margin-top: 8px; }
.pila-l > * + * { margin-top: 24px; }
.fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fila--fin { justify-content: flex-end; }
.fila--entre { justify-content: space-between; }
.crece { flex: 1; }
.tenue { color: var(--tinta-3); }
.pequeno { font-size: 13px; }
.centro { text-align: center; }
.sin-margen { margin: 0; }
.mt-s { margin-top: 10px; }
.mt-m { margin-top: 20px; }
.mt-l { margin-top: 32px; }
.mb-m { margin-bottom: 16px; }
h2.mb-m { margin-bottom: 12px; }

.g-xs { gap: 5px; } .g-s { gap: 9px; } .g-m { gap: 14px; } .g-l { gap: 22px; }
.envuelve { flex-wrap: wrap; }
.arriba { align-items: flex-start; }
.centrado { align-items: center; }
.base { align-items: baseline; }
.corta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.medida { max-width: 62ch; }
.medida-corta { max-width: 46ch; }
.t-2 { color: var(--tinta-2); }
.t-3 { color: var(--tinta-3); }
.t-verde { color: var(--acento); }
.fuerte { font-weight: 600; }
.normal { font-weight: 450; }

/* Tarjeta de peligro (zona de administracion en red, hilo y perfil): el
   borde venia en linea con un color fijo; se le gana aqui para el oscuro. */
.tarjeta[style*="#f3c9c4"] { border-color: var(--peligro-borde) !important; }
.dato[style*="31,232,112"] { border-color: var(--acento-borde) !important; background: var(--acento-suave) !important; }

/* ----------------------------------------------------------------------------
   Pantallas medianas
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  :root { --p-contenido: 24px; }
  .metricas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento__7, .bento__5, .bento__8, .bento__4 { grid-column: span 12; }
}
@media (max-width: 1020px) {
  .rejilla--3, .rejilla--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rejilla--principal { grid-template-columns: minmax(0, 1fr); }
}

/* ----------------------------------------------------------------------------
   Movil: sin panel flotante, lateral como cajon y pestanas abajo
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  :root { --p-contenido: 16px; --alto-barra: 54px; }

  body { font-size: 15px; background: var(--panel); }

  .disposicion { display: block; height: auto; overflow: visible; overflow-x: clip; }

  .principal {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    min-height: 100vh;
  }

  .lateral {
    position: fixed;
    z-index: 60;
    inset: 0 auto 0 0;
    width: min(320px, 86vw);
    padding: 14px 12px max(14px, env(safe-area-inset-bottom));
    background: var(--panel);
    border-right: 1px solid var(--borde);
    box-shadow: var(--sombra-flota);
    transform: translateX(-104%);
    transition: transform 0.28s var(--curva);
    view-transition-name: none;
  }
  .lateral[data-abierto="true"] { transform: translateX(0); }
  .lateral .lateral__cerrar { display: inline-grid; }
  .nav__enlace { padding: 9px 10px; font-size: 15px; }
  .nav__enlace[aria-current="page"] { background: var(--superficie-2); }
  .buscar-rapido kbd { display: none; }

  .barra {
    position: sticky;
    top: 0;
    padding: 0 8px 0 12px;
    padding-top: env(safe-area-inset-top);
    min-height: calc(var(--alto-barra) + env(safe-area-inset-top));
  }
  .barra .barra__marca { display: inline-flex; flex-shrink: 0; border-radius: 8px; }
  .barra__marca .marca__imago { width: 30px; height: 30px; }
  .barra .barra__buscar { display: inline-grid; }
  .migas { font-size: 15px; }
  .migas > a, .migas__sep { display: none; }

  .contenido { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }

  /* Barra inferior de pestanas */
  .pestanas {
    position: fixed;
    z-index: 50;
    left: 0; right: 0; bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px max(6px, env(safe-area-inset-bottom));
    background: var(--cristal);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--borde);
  }
  .pestana {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 2px 4px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--tinta-3);
    font: inherit;
    font-size: 10.5px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .pestana .i { width: 22px; height: 22px; stroke-width: 1.6; }
  .pestana[aria-current="page"] { color: var(--tinta); }
  .pestana[aria-current="page"] .i { color: var(--acento); stroke-width: 2; }
  .pestana:active { background: var(--superficie-3); }
  .pestana__punto {
    position: absolute;
    top: 3px; left: calc(50% + 6px);
    min-width: 15px;
    padding: 0 4px;
    border-radius: 99px;
    background: var(--verde);
    color: var(--sobre-verde);
    font-family: var(--mono);
    font-size: 9px;
    line-height: 15px;
    box-shadow: 0 0 0 2px var(--panel);
  }

  h1 { font-size: 1.45rem; }
  .cabecera { padding-bottom: 16px; margin-bottom: 18px; }
  .cabecera > .boton, .cabecera > form, .cabecera > button { width: 100%; }
  .cabecera > .fila { width: 100%; }
  .cabecera > .fila > .boton { flex: 1; }

  .saludo { margin: 0 0 22px; padding: 4px 0 0; }
  .saludo::before { right: -16px; width: 80%; }
  .saludo h1 { font-size: 1.5rem; }
  .saludo .metricas { margin-top: 18px; gap: 8px; }
  .metrica { padding: 12px; }
  .metrica__cifra { font-size: 1.45rem; }

  .rejilla--2, .rejilla--3, .rejilla--4, .rejilla--principal,
  .rejilla--red, .rejilla--ficha { grid-template-columns: minmax(0, 1fr); }
  .formulario-fila { grid-template-columns: 1fr; }
  .bento { gap: 24px; }
  .bento__6 { grid-column: span 12; }

  .fila-aviso { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 13px 14px; }
  .fila-aviso__lado { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 10px; text-align: left; }

  .filtros { margin-left: -16px; margin-right: -16px; padding: 0 10px; }
  .tabla th, .tabla td { padding: 10px 12px; }
  .hilo { padding: 13px 14px; gap: 11px; }
  .hilo .avatar { display: none; }
  .foro-hilo__titulo { font-size: 1.3rem; }
  .mensaje-chat__burbuja, .burbuja { max-width: 86%; }
  .escribir { flex-direction: column; align-items: stretch; }

  dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--r-l) var(--r-l) 0 0; max-height: 92dvh; }
  dialog[open] { animation: hoja 0.24s var(--curva); }
  .modal__cuerpo { max-height: calc(92dvh - 130px); }
  .modal__pie { border-radius: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .paleta { margin: max(12px, env(safe-area-inset-top)) auto auto; width: calc(100% - 16px); border-radius: var(--r-l); max-height: 70dvh; }
  .paleta[open] { animation: sube 0.16s var(--curva); }
  .paleta__pie { display: none; }

  .pantalla { flex-direction: column; padding: 0; gap: 0; background: var(--panel); }
  .pantalla__marca { display: none; }
  .pantalla__panel { width: 100%; min-height: 100dvh; border: 0; border-radius: 0; padding: 32px 20px max(32px, env(safe-area-inset-bottom)); justify-content: flex-start; }
  .pantalla__panel::before {
    content: '';
    display: block;
    width: 40px; height: 40px;
    margin: 12px 0 28px;
    border-radius: 10px;
    background: #ffffff url('../img/imago-coat.png') center / 30px no-repeat;
    box-shadow: 0 0 0 1px var(--borde);
  }
}

@keyframes hoja { from { transform: translateY(24px); opacity: 0.4; } to { transform: none; opacity: 1; } }

@media (max-width: 520px) {
  .modal__pie { flex-direction: column-reverse; }
  .modal__pie .boton { width: 100%; height: 40px; }
  .boton { height: 38px; }
  .boton--pequeno { height: 32px; }
}

/* ----------------------------------------------------------------------------
   Impresion
   -------------------------------------------------------------------------- */
@media print {
  .lateral, .barra, .pestanas, .boton, .filtros, .paleta { display: none !important; }
  body, .principal { background: #ffffff; color: #000000; }
  .disposicion { display: block; height: auto; overflow: visible; overflow-x: clip; }
  .principal { margin: 0; border: 0; overflow: visible; }
  .contenido { padding: 0; }
  .tarjeta { break-inside: avoid; box-shadow: none; }
}

/* Detalles */
.lista__titulo, .yo__nombre, .yo__empresa { display: block; }
.contenido:focus-visible { box-shadow: none; }

/* Mensajeria uno a uno (antes en un <style> dentro de la vista) */
.conv {
  height: 56vh;
  min-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--superficie-2);
  border: 1px solid var(--borde);
  border-radius: var(--r);
}
.conv .burbuja { align-self: flex-start; }
.conv .burbuja--mia { align-self: flex-end; }
.conv-escribir { display: flex; gap: 8px; align-items: flex-end; padding-top: 12px; }
.conv-escribir textarea { flex: 1; resize: vertical; min-height: 44px; margin: 0; }
@media (max-width: 860px) {
  .conv { height: calc(100dvh - 300px); margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
}

/* Balance del historico: el total manda y cada tipo lleva su barra */
.balance {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px 32px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--borde);
  border-radius: var(--r);
  background: var(--superficie);
  box-shadow: var(--sombra-1);
}
.balance__total { display: flex; flex-direction: column; gap: 6px; padding-right: 32px; border-right: 1px solid var(--borde); }
.balance__cifra { font-family: var(--mono); font-size: 2.6rem; font-weight: 500; letter-spacing: -0.05em; line-height: 0.9; color: var(--tinta); }
.balance__pie { font-size: 12.5px; color: var(--tinta-3); }
.balance__tipos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px 20px; }
.balance__tipo { display: grid; gap: 3px; }
.balance__n { font-family: var(--mono); font-size: 1.15rem; font-weight: 500; letter-spacing: -0.03em; color: var(--tinta); }
.balance__etiqueta { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--tinta-2); }
.balance__barra { display: block; height: 3px; margin-top: 4px; border-radius: 2px; background: var(--superficie-3); overflow: hidden; }
.balance__barra > span { display: block; width: var(--parte); height: 100%; border-radius: 2px; background: var(--tinta-3); }
.balance__barra > .punto--formacion  { background: var(--t-formacion); }
.balance__barra > .punto--empleo     { background: var(--t-empleo); }
.balance__barra > .punto--licitacion { background: var(--t-licitacion); }
.balance__barra > .punto--normativa  { background: var(--t-normativa); }
.balance__barra > .punto--evento     { background: var(--t-evento); }
.balance__barra > .punto--colegio    { background: var(--t-colegio); }
@media (max-width: 860px) {
  .balance { grid-template-columns: minmax(0, 1fr); }
  .balance__total { padding: 0 0 16px; border-right: 0; border-bottom: 1px solid var(--borde); flex-direction: row; align-items: baseline; gap: 10px; }
  .balance__tipos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ----------------------------------------------------------------------------
   Dentro de la app movil: la barra de pestanas y el cajon son nativos
   -------------------------------------------------------------------------- */
.app-nativa .pestanas { display: none; }
.app-nativa .contenido { padding-bottom: 32px; }
.app-nativa .barra { padding-top: 0; min-height: var(--alto-barra); }
.app-nativa .saltar { display: none; }
.app-nativa body { -webkit-touch-callout: none; }
.app-nativa .pantalla__panel { min-height: 100%; }

/* Boton de compartir: solo aparece donde hay hoja de compartir nativa */
[data-compartir][hidden] { display: none !important; }
