/* ==========================================================================
   PORTAL DE CLIENTES — RE-SKIN VISUAL (referencia: borrador-kimik3-payg.html)

   Dirección: "tinta / marfil / latón". Tipografía de contraste:
     · Cormorant Garamond (serif) → titulares editoriales
     · Inter (sans)              → cuerpo y formularios
     · IBM Plex Mono (mono)      → eyebrows, labels, cifras, metadatos
   Fuentes AUTOHOSPEDADAS en /fonts (el CSP de vercel.json prohíbe CDNs y
   font-src cae a default-src 'self'; mismo origen, sin tocar el CSP).
   Cada familia es servida por Google Fonts como woff2 (latin); Cormorant e
   Inter son variables (se declaran con rangos de peso), IBM Plex Mono es
   estático (400 y 500).

   Esquema de fondos (fiel al borrador):
     · Login y "Solicitar acceso" → oscuros (tinta).
     · Panel del cliente           → claro (marfil), con el bloque del
       "proceso colectivo" tratado como panel oscuro institucional.
   Este CSS mantiene INTACTA la mecánica que dependen auth.js / dashboard.js
   / solicitar.js: reveal gated por .js, ::after del .btn como flecha (los
   scripts reescriben textContent del botón al enviar), línea dorada de
   .field por focus-within, .card[hidden], y las clases que dashboard.js
   genera (proceso-*, estado-badge, reporte-*, fecha-meta, vacio, loading).
   ========================================================================== */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond.woff2') format('woff2');
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/plex-mono-regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/plex-mono-medium.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* tinta — fondos oscuros (login, solicitud, bloque colectivo) */
  --ink: #0B0E13;
  --ink-2: #10141B;
  --ink-3: #171C25;
  /* marfil — fondos claros (panel de cliente) */
  --paper: #F2EFE7;
  --paper-2: #E9E5D9;
  --paper-3: #E0DBCC;
  /* latón */
  --gold: #AE8B57;
  --gold-2: #C9A86A;
  --gold-dim: rgba(174, 139, 87, 0.35);
  --gold-deep: #6B4A1F;
  /* filetes (hairlines) */
  --line-d: rgba(238, 232, 216, 0.13);   /* sobre oscuro */
  --line-l: rgba(15, 18, 24, 0.15);       /* sobre claro */
  --line-l-strong: rgba(15, 18, 24, 0.28);
  /* texto sobre oscuro */
  --tx-d: #ECE7DA;
  --tx-d2: #8F8A7C;
  --tx-d3: #5C584E;
  /* texto sobre claro */
  --tx-l: #14171D;
  --tx-l2: #6E695B;
  /* estados */
  --error-d: #E29A93;
  --error-l: #9C3A2D;
  --ok-d: #8FC79A;
  --ok-l: #2F6B3C;
  /* tipografía */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-slide: cubic-bezier(0.7, 0, 0.2, 1);
  --radius: 3px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  background: var(--ink);
  color: var(--tx-d);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* El panel de cliente invierte a fondo marfil. */
body.dash-body {
  background: var(--paper);
  color: var(--tx-l);
  color-scheme: light;
}

/* Grano global muy sutil (feTurbulence como data URI — permitido por
   img-src … data: del CSP). */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .04 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: var(--ink); }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  text-wrap: balance;
  margin: 0;
}
h1 em, h2 em { font-style: italic; color: var(--gold-2); }

/* ---------- Utilidades tipográficas ---------- */

.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin: 0;
}
body.dash-body .eyebrow { color: var(--gold); }

.mono { font-family: var(--mono); font-weight: 500; letter-spacing: 0.08em; }

/* ==========================================================================
   BOTONES
   Mecánica preservada: ::before es el panel que entra desde la izquierda;
   ::after es la flecha (pseudo-elemento, no <span>, porque solicitar.js
   reescribe textContent del botón al enviar y un hijo se perdería).
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 26px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.4s ease;
  will-change: transform;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateX(-101%);
  transition: transform 0.5s var(--ease-slide);
}
.btn:hover::before,
.btn:focus-visible::before { transform: translateX(0); }
.btn::after {
  content: '→';
  font-family: var(--mono);
  transition: transform 0.4s var(--ease-slide);
}
.btn:hover::after,
.btn:focus-visible::after { transform: translateX(5px); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:disabled::before { display: none; }

/* Latón (claro→oscuro): tinta sobre latón, en hover panel profundo + marfil. */
.btn-gold {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 12px 30px -14px rgba(174, 139, 87, 0.6);
}
.btn-gold::before { background: var(--gold-deep); }
.btn-gold:hover,
.btn-gold:focus-visible { color: var(--paper); }

/* Ghost adaptado por contexto (oscuro vs claro). */
.btn-ghost {
  background: transparent;
  color: var(--tx-d);
  border: 1px solid var(--line-d);
}
.btn-ghost::before { background: var(--tx-d); }
.btn-ghost:hover,
.btn-ghost:focus-visible { color: var(--ink); border-color: var(--tx-d); }

body.dash-body .btn-ghost {
  color: var(--tx-l);
  border-color: var(--line-l);
}
body.dash-body .btn-ghost::before { background: var(--tx-l); }
body.dash-body .btn-ghost:hover,
body.dash-body .btn-ghost:focus-visible { color: var(--paper); border-color: var(--tx-l); }

.btn-sm { padding: 8px 14px; font-size: 0.62rem; letter-spacing: 0.1em; }
.btn-sm::after { content: none; }
.btn-block { width: 100%; }

/* ==========================================================================
   AUTH (index.html · solicitar-acceso.html)
   ========================================================================== */

.auth-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vh, 64px) 24px;
  position: relative;
}

/* Sello ornamental giratorio (solo solicitar-acceso). Decorativo. */
.bg-seal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 130vmin;
  height: 130vmin;
  transform: translate(-50%, -50%);
  color: var(--gold);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
  animation: seal-spin 140s linear infinite;
}
@keyframes seal-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.auth-head {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: clamp(26px, 4vh, 40px);
}

/* Sello / monograma (se dibuja solo vía .mark .draw en auth.js/solicitar.js). */
.mark-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 50%;
}
.mark { width: 64px; height: 64px; display: block; }
.mark-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 25%, rgba(201, 168, 106, 0.8) 50%, transparent 75%);
  mix-blend-mode: soft-light;
  transform: translateX(-220%) skewX(-12deg);
  pointer-events: none;
}

.auth-head h1 {
  font-size: clamp(2rem, 5vw, 2.7rem);
  letter-spacing: -0.01em;
  line-height: 1.08;
  color: var(--tx-d);
  margin-top: 14px;
}

.auth-rule {
  width: 56px;
  height: 1px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ==========================================================================
   LOGIN — pantalla partida (brand a la izquierda · formulario a la derecha)
   ========================================================================== */

.screen-login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background:
    radial-gradient(1100px 700px at 12% -10%, rgba(174, 139, 87, 0.10), transparent 60%),
    radial-gradient(900px 600px at 110% 115%, rgba(174, 139, 87, 0.07), transparent 55%),
    var(--ink);
}

.login-brand {
  display: flex;
  flex-direction: column;
  padding: clamp(40px, 6vw, 64px);
  border-right: 1px solid var(--line-d);
  position: relative;
}

.brandmark {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brandmark .mark-wrap { width: 44px; height: 44px; margin: 0; }
.brandmark .mark { width: 44px; height: 44px; }
.brand-name {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--tx-d);
}

.brand-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0;
}
.login-brand .auth-head { text-align: left; margin-bottom: 0; }
.login-brand .auth-head h1 {
  font-size: clamp(2.6rem, 4.6vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  max-width: 13ch;
  margin-top: 26px;
}
.login-brand .auth-rule { margin-left: 0; }

.login-sub {
  margin: 24px 0 0;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--tx-d2);
  max-width: 44ch;
}

.login-foot {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tx-d3);
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 6vw, 64px);
}
.login-form-wrap .card { max-width: 400px; }

/* ==========================================================================
   TARJETA / FORMULARIO
   ========================================================================== */

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--ink-2), var(--ink-3));
  border: 1px solid var(--line-d);
  border-radius: var(--radius);
  padding: 40px 38px 32px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7);
}
.card[hidden] { display: none; }
/* Filete dorado superior */
.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.card .eyebrow { font-size: 0.6rem; letter-spacing: 0.26em; color: var(--tx-d2); margin-bottom: 8px; }

.card-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.05;
  color: var(--tx-d);
  margin: 0 0 30px;
}

/* Campo: línea inferior editorial (no cajas). La línea dorada barre con
   focus-within y el label pasa a dorado. */
.field { position: relative; margin-bottom: 26px; }

.field label {
  display: block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tx-d2);
  margin: 0 0 4px;
  transition: color 0.3s ease;
}
.field:focus-within label { color: var(--gold-2); }

.field input,
.field textarea {
  width: 100%;
  padding: 9px 2px 11px;
  border: none;
  border-bottom: 1px solid var(--line-d);
  border-radius: 0;
  background: transparent;
  color: var(--tx-d);
  font-family: var(--sans);
  font-size: 1.02rem;
  outline: none;
  resize: none;
  transition: border-color 0.3s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--tx-d3); }
.field input:hover,
.field textarea:hover { border-bottom-color: rgba(238, 232, 216, 0.35); }
.field input:focus,
.field textarea:focus { border-bottom-color: var(--gold); outline: none; }

.field::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-slide);
}
.field:focus-within::after { transform: scaleX(1); }

.card .btn { margin-top: 8px; }

.msg {
  margin: 18px 0 0;
  min-height: 1.2em;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-align: center;
  color: var(--tx-d2);
}
.msg.error { color: var(--error-d); }
.msg.ok { color: var(--ok-d); }
/* Estados en contexto claro (errores de descarga en el panel) */
.section .msg.error { color: var(--error-l); }
.section .msg.ok { color: var(--ok-l); }

.footnote {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line-d);
  text-align: center;
}
.footnote a {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tx-d2);
  border-bottom: 1px solid var(--line-d);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footnote a:hover { color: var(--gold-2); border-color: var(--gold-dim); }

/* ==========================================================================
   DASHBOARD (panel claro, con el bloque colectivo en panel oscuro)
   ========================================================================== */

.dash {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(44px, 7vh, 72px) 24px 96px;
  position: relative;
}

.dash-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(34px, 5vh, 52px);
}
.dash-header .eyebrow { display: block; margin-bottom: 10px; }
.dash-header h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--tx-l);
}
.dash-header .logout { flex-shrink: 0; margin-bottom: 4px; }

/* Regla que se dibuja (scaleX) bajo el header. */
.dash-rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(174, 139, 87, 0.55), var(--line-l) 55%, transparent);
  margin: 0 0 clamp(30px, 4.5vh, 46px);
  transform-origin: left;
}

/* ---------- Secciones (panel claro por defecto) ---------- */

.section {
  background: #F6F3EB;
  border: 1px solid var(--line-l);
  border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 34px) clamp(22px, 3.4vw, 36px);
  margin-bottom: 22px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 20px 48px -30px rgba(15, 18, 24, 0.18);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}
.section-idx {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.section-head h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tx-l2);
  margin: 0;
}
.tag-compartido {
  margin-left: auto;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}

/* ---------- Proceso colectivo (panel oscuro institucional) ---------- */

.section--colectivo {
  border-color: rgba(238, 232, 216, 0.1);
  background:
    radial-gradient(800px 400px at 85% -20%, rgba(174, 139, 87, 0.12), transparent 60%),
    var(--ink-2);
  color: var(--tx-d);
  box-shadow: 0 20px 48px -30px rgba(0, 0, 0, 0.6);
}
.section--colectivo .section-head h2 { color: var(--tx-d2); }
.section--colectivo .section-idx { color: var(--gold-2); }
.section--colectivo .tag-compartido { color: var(--gold-2); border-color: var(--gold-dim); }

.proceso-progreso {
  display: flex;
  gap: 8px;
  margin: 6px 0 20px;
}
.proceso-seg {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line-d);
  transform-origin: left center;
}
.proceso-seg.activo {
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  box-shadow: 0 0 12px -2px var(--gold-dim);
}

.proceso-fase {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: var(--tx-d);
  max-width: 26ch;
}
.proceso-desc {
  color: var(--tx-d2);
  font-size: 0.98rem;
  line-height: 1.75;
  margin: 14px 0 0;
  max-width: 66ch;
}

/* ---------- Estado individual ---------- */

.estado-badge {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--gold-dim);
  background: rgba(174, 139, 87, 0.08);
  color: var(--gold);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.notas {
  color: var(--tx-l2);
  font-size: 1rem;
  line-height: 1.7;
  margin: 18px 0 0;
  max-width: 62ch;
}

/* ---------- Fecha / metadatos (reloj + texto) ---------- */

.fecha-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-l2);
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-l);
}
.fecha-meta svg { flex-shrink: 0; }
.section--colectivo .fecha-meta { color: var(--tx-d3); border-top-color: var(--line-d); }

/* ---------- Reportes mensuales ---------- */

.reporte-item {
  padding: 15px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid var(--line-l);
  border-radius: var(--radius);
  transition: background 0.25s ease;
}
.reporte-item:last-child { border-bottom: none; }
.reporte-item:hover { background: rgba(174, 139, 87, 0.05); }

.reporte-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.reporte-left { display: flex; align-items: center; gap: 14px; min-width: 0; }

.reporte-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-l);
  border-radius: var(--radius);
  background: #FBF9F3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.reporte-text { min-width: 0; }
.reporte-nombre {
  font-size: 0.98rem;
  color: var(--tx-l);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reporte-fecha {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tx-l2);
  margin-top: 3px;
}

.reporte-acciones { display: flex; gap: 8px; flex-shrink: 0; }
.reporte-item .msg { margin-top: 10px; text-align: left; }

/* ---------- Estados vacíos / carga ---------- */

.vacio {
  color: var(--tx-l2);
  font-size: 0.96rem;
  line-height: 1.65;
  margin: 0;
  max-width: 56ch;
}
.section--colectivo .vacio { color: var(--tx-d2); }

.loading {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-l2);
  margin: 0;
}
.section--colectivo .loading { color: var(--tx-d2); }
.loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 10px;
  vertical-align: -2px;
  border: 1.5px solid var(--line-l-strong);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.section--colectivo .loading::after {
  border-color: var(--line-d);
  border-top-color: var(--gold-2);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Reveals (patrón preservado: estados ocultos SOLO bajo .js) ---------- */

.js .reveal { opacity: 0; transform: translateY(28px); }
.reveal {
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

.js .dash-rule { transform: scaleX(0); transition: transform 1.2s var(--ease-out); }
.js .dash-rule.is-visible { transform: scaleX(1); }

/* ==========================================================================
   RESPONSIVE + ACCESIBILIDAD
   ========================================================================== */

@media (max-width: 960px) {
  .screen-login { grid-template-columns: 1fr; }
  .login-brand { border-right: none; border-bottom: 1px solid var(--line-d); padding: 44px 32px; }
  .login-form-wrap { padding: 48px 32px; }
}

@media (max-width: 560px) {
  .card { padding: 32px 24px 26px; }
  .dash { padding: 36px 18px 72px; }
  .dash-header h1 { font-size: 1.9rem; }
  .reporte-row { align-items: flex-start; }
  .reporte-acciones { width: 100%; }
  .reporte-acciones .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-seal { animation: none; }
  .loading::after { animation-duration: 1.6s; }
  .reveal,
  .dash-rule,
  .btn,
  .btn::before,
  .btn::after,
  .field::after,
  .reporte-item {
    transition: none;
    animation: none;
  }
}