/* ============================================================
   SIG — interfaz estilo intranet Zulueta
   Riel de iconos oscuro · barra superior azul · hero con degradado
   · fondo claro · tarjetas blancas con sombra suave.
   ============================================================ */

:root {
  --rail:     #0e2340;   /* riel de iconos */
  --rail-2:   #0a1c33;
  --azul:     #2563eb;   /* azul primario (barra) */
  --azul-2:   #1d4ed8;
  --acento:   #f0821e;   /* naranja del logo */
  --acento-2: #d86e0c;
  --bg:       #f2f5f9;
  --panel:    #ffffff;
  --borde:    #e6ebf2;
  --borde-2:  #eef2f7;
  --tinta:    #1a2438;
  --tinta-2:  #5f6b81;
  --tinta-3:  #97a2b6;
  --ok-bg:#e7f7ee; --ok:#0d8a52;
  --warn-bg:#fdf0da; --warn:#b45309;
  --off-bg:#eef1f6; --off:#64748b;
  --rosa:#e5387e;
  --naranja:#f0821e;
  --tenue:#97a2b6;
  --tenue-2:#b7c1d1;
  --texto:#1a2438;
  --azul-0:#f8fafc;
  --linea:#e6ebf2;
  --sombra:   0 1px 2px rgba(16,24,40,.04), 0 2px 6px rgba(16,24,40,.06);
  --sombra-h: 0 8px 24px rgba(16,24,40,.12);
  --radio: 16px;
  --rail-w: 72px;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--tinta); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .42);
  outline-offset: 2px;
}

.salto-contenido {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 10px 16px; background: #fff; color: var(--azul);
  border-radius: 0 0 10px 0; box-shadow: var(--sombra-h);
}
.salto-contenido:focus { left: 0; }

/* ================= RIEL DE ICONOS ================= */
.rail {
  position: fixed; top: 0; left: 0; width: var(--rail-w); height: 100vh; z-index: 50;
  background: linear-gradient(180deg, var(--rail) 0%, var(--rail-2) 100%);
  display: flex; flex-direction: column; align-items: center; padding: 12px 0;
}
.rail-logo { width: 44px; height: 44px; border-radius: 12px; background: var(--acento);
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1.3rem;
  margin-bottom: 18px; box-shadow: 0 4px 12px rgba(240,130,30,.4); }
.rail-nav { display: flex; flex-direction: column; gap: 6px; width: 100%; align-items: center; flex: 1; }
.rail-nav a, .rail-salir {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  color: #8aa0c0; transition: all .14s; position: relative;
}
.rail-nav a svg, .rail-salir svg { width: 21px; height: 21px; }
.rail-nav a:hover, .rail-salir:hover { background: rgba(255,255,255,.08); color: #fff; }
.rail-nav a.activo { background: var(--acento); color: #fff; box-shadow: 0 4px 12px rgba(240,130,30,.4); }
.rail-salir { margin-top: auto; color: #7d90ad; }

/* ================= MARCO PRINCIPAL ================= */
.marco { margin-left: var(--rail-w); min-height: 100vh; display: flex; flex-direction: column; }

.barra {
  position: sticky; top: 0; z-index: 40; background: var(--azul);
  color: #fff; display: flex; align-items: center; gap: 14px; padding: 0 26px; height: 62px;
}
.hamburguesa { display: none; background: rgba(255,255,255,.15); border: 0; cursor: pointer;
  color: #fff; width: 38px; height: 38px; border-radius: 10px; place-items: center; }
.barra .saludo { font-size: 1rem; }
.barra .saludo b { font-weight: 700; }
.barra .der { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.barra .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--acento);
  color: #fff; display: grid; place-items: center; font-weight: 700; }
.btn-salir-barra { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px;
  border-radius: 10px; color: #fff; background: rgba(255,255,255,.13);
  font-size: .84rem; font-weight: 600; transition: background .14s; }
.btn-salir-barra svg { width: 18px; height: 18px; }
.btn-salir-barra:hover { background: rgba(255,255,255,.24); }
@media (max-width: 560px) { .btn-salir-barra span { display: none; } }

.contenido { padding: 24px 26px 48px; width: 100%; max-width: none; margin: 0 auto; flex: 1; }

/* ================= HERO ================= */
.hero {
  border-radius: 22px; padding: 30px 34px;
  background: linear-gradient(115deg, #2f6fe6 0%, #1f7ecf 42%, #16a79b 100%);
  color: #fff; box-shadow: 0 12px 34px rgba(31,111,221,.28); margin-bottom: 24px;
}
.hero h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.hero p { color: rgba(255,255,255,.9); font-size: .98rem; margin-top: 6px; }
.hero-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px; margin-top: 26px; }
.hero-kpi { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 14px;
  transition: background .14s, border-color .14s, transform .14s; }
.hero-kpi:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.34); transform: translateY(-1px); }
.hero-kpi .ic { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.2);
  display: grid; place-items: center; flex: none; }
.hero-kpi .ic svg { width: 22px; height: 22px; color: #fff; }
.hero-kpi .n { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.hero-kpi .et { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: rgba(255,255,255,.85); margin-top: 3px; }

/* ================= GRID 2 COLUMNAS ================= */
.grid-2 { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
@media (max-width: 980px) { .grid-2 { grid-template-columns: 1fr; } }

/* ================= TARJETAS ================= */
.tarjeta { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio);
  box-shadow: var(--sombra); overflow: hidden; }
.tarjeta-cab { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; }
.tarjeta-cab .tic { width: 38px; height: 38px; border-radius: 11px; background: #eaf1ff; color: var(--azul);
  display: grid; place-items: center; flex: none; }
.tarjeta-cab .tic svg { width: 20px; height: 20px; }
.tarjeta-cab h2 { margin: 0; font-size: 1rem; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--tinta); }
.tarjeta-cab .tsub { font-size: .74rem; color: var(--tinta-3); text-transform: uppercase; letter-spacing: .05em; }
.tarjeta-cuerpo { padding: 6px 14px 16px; }

/* ================= TÍTULOS ================= */
h1 { font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; color: var(--tinta); }
h2 { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tinta-2); margin: 26px 0 12px; }
.sub { color: var(--tinta-2); font-size: .94rem; margin: 4px 0 20px; }

/* ================= BUSCADOR ================= */
.buscador { position: relative; margin-bottom: 22px; }
.buscador input { width: 100%; padding: 13px 16px 13px 44px; font-size: .96rem; color: var(--tinta);
  background: #fff; border: 1px solid var(--borde); border-radius: 12px; outline: none; box-shadow: var(--sombra);
  transition: border-color .13s, box-shadow .13s; }
.buscador input:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.buscador::before { content: ""; position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397a2b6' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); }
.buscador.consultando input { padding-right: 42px; }
.buscador.consultando::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 16px; height: 16px;
  margin-top: -8px; border: 2px solid rgba(37,99,235,.22); border-top-color: var(--azul);
  border-radius: 50%; animation: girar .7s linear infinite;
}
.buscador input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
#resultados-vivo { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff;
  border: 1px solid var(--borde); border-radius: 12px; box-shadow: var(--sombra-h); padding: 6px; z-index: 30; max-height: 62vh; overflow-y: auto; }
.estado-vivo { padding: 12px 14px; color: var(--tinta-3); font-size: .88rem; text-align: center; }

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

/* ================= LISTA DOCUMENTOS ================= */
.lista { display: grid; gap: 10px; }
.doc { display: flex; align-items: center; gap: 14px; padding: 13px 15px; background: var(--panel);
  border: 1px solid var(--borde); border-radius: 13px; box-shadow: var(--sombra);
  transition: box-shadow .13s, transform .05s, border-color .13s; }
.doc:hover { box-shadow: var(--sombra-h); border-color: #d6e0ee; transform: translateY(-1px); }
.tarjeta-cuerpo .doc { box-shadow: none; border-color: var(--borde-2); }
.doc-icono { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px;
  background: #eef4ff; color: var(--azul); font-weight: 800; font-size: .72rem; }
.doc-icono.t-DC { background:#eaf1ff; color:#2563eb; }
.doc-icono.t-F  { background:#fdf0da; color:#b45309; }
.doc-icono.t-I  { background:#e7f7ee; color:#0d8a52; }
.doc-icono.t-P  { background:#f2ecfe; color:#7c3aed; }
.doc-icono.t-M  { background:#ffe9e6; color:#c2410c; }
.doc-icono.t-PG { background:#e6f5f8; color:#0e7490; }
.doc-cuerpo { flex: 1; min-width: 0; }
.doc-codigo { font-size: .73rem; color: var(--azul-2); font-weight: 700; letter-spacing: .02em; }
.doc-titulo { font-size: .95rem; color: var(--tinta); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta { font-size: .77rem; color: var(--tinta-3); margin-top: 2px; }
.doc-lado { flex: none; }

/* ================= LISTA LATERAL (áreas / accesos) ================= */
.mini { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; transition: background .13s; }
.mini:hover { background: var(--bg); }
.mini + .mini { border-top: 1px solid var(--borde-2); border-radius: 0; }
.mini-ic { width: 34px; height: 34px; border-radius: 9px; background: #eef4ff; color: var(--azul);
  display: grid; place-items: center; font-weight: 800; font-size: .7rem; flex: none; }
.mini-txt { flex: 1; min-width: 0; }
.mini-txt b { display: block; font-size: .88rem; font-weight: 600; color: var(--tinta); }
.mini-txt small { font-size: .74rem; color: var(--tinta-3); }

/* ================= BADGES ================= */
.badge { font-size: .69rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge-ok{background:var(--ok-bg);color:var(--ok);} .badge-warn{background:var(--warn-bg);color:var(--warn);} .badge-off{background:var(--off-bg);color:var(--off);}

/* ================= FICHA ================= */
.ficha { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 28px; box-shadow: var(--sombra); }
.ficha-codigo { font-size: .82rem; color: var(--azul-2); font-weight: 700; letter-spacing: .03em; }
.ficha h1 { margin: 8px 0 16px; }
.ficha-datos { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--tinta-2); font-size: .88rem; padding-bottom: 20px; border-bottom: 1px solid var(--borde-2); }
.ficha-datos strong { color: var(--tinta); font-weight: 600; }
.versiones { display: grid; gap: 8px; margin-top: 16px; }
.version { display: flex; align-items: center; gap: 14px; padding: 13px 16px; background: #fbfcfe; border: 1px solid var(--borde); border-radius: 11px; }
.version.vig { background: #f3fbf7; border-color: #cdeeda; }
.version-num { flex: none; font-weight: 800; color: var(--tinta); min-width: 34px; }
.version-info { flex: 1; min-width: 0; font-size: .82rem; color: var(--tinta-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ================= BOTONES ================= */
.btn { display: inline-flex; position: relative; align-items: center; gap: 8px; padding: 9px 17px; border-radius: 10px; font-size: .88rem; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all .13s; }
.btn-primario { background: var(--azul); color: #fff; }
.btn-primario:hover { background: var(--azul-2); }
.btn-naranja { background: var(--acento); color: #fff; }
.btn-naranja:hover { background: var(--acento-2); }
.btn-fantasma { background: #fff; border-color: var(--borde); color: var(--tinta); box-shadow: var(--sombra); }
.btn-fantasma:hover { border-color: #cdd7e5; background: var(--bg); }
.btn-bloque { width: 100%; justify-content: center; }
.btn:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.btn.cargando { color: transparent !important; pointer-events: none; }
.btn.cargando::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px;
  margin: -9px 0 0 -9px; border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff; border-radius: 50%; animation: girar .7s linear infinite;
}

.cab-accion { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cab-accion h1 { margin-bottom: 4px; }
.cab-accion .sub { margin-top: 0; }
.acciones-celda { white-space: nowrap; }
.mini-accion { display: inline-block; padding: 5px 9px; margin: 0 5px 0 0; border: 1px solid var(--borde);
  border-radius: 8px; background: #fff; color: var(--azul); font-size: .78rem; font-weight: 600; cursor: pointer; }
.mini-accion:hover { border-color: #b9c7d9; color: var(--azul-2); }
.mini-accion.peligro { color: #b42318; border-color: #f4c9c9; background: #fff7f7; }
.form-inline { display: inline; }
.acciones-documento { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.acciones-documento .btn svg { width: 18px; height: 18px; }

.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 620px) { .grid-form { grid-template-columns: 1fr; } }
.campo-check { margin: 4px 0 16px; }
.campo-check label { display: flex; align-items: center; gap: 8px; color: var(--tinta-2); font-size: .9rem; }
.campo-check input { width: auto; }
.campo-areas { border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px 14px; margin-bottom: 20px; }
.campo-areas legend { padding: 0 8px; color: var(--tinta-2); font-size: .82rem; font-weight: 600; }
.areas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; margin-top: 8px; }
@media (max-width: 620px) { .areas-grid { grid-template-columns: 1fr 1fr; } }
.areas-grid label { display: flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--tinta); }
.areas-grid input { width: auto; }
.acciones-form { display: flex; gap: 10px; flex-wrap: wrap; }

.formatos-exportar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 620px) { .formatos-exportar { grid-template-columns: 1fr; } }
.formato-card input { position: absolute; opacity: 0; pointer-events: none; }
.formato-card span { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px;
  border: 1px solid var(--borde); border-radius: 14px; background: #fff; cursor: pointer; transition: all .14s; }
.formato-card span svg { width: 22px; height: 22px; color: var(--azul); }
.formato-card span b { color: var(--tinta); }
.formato-card span small { color: var(--tinta-3); }
.formato-card input:checked + span { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.formato-card input:focus-visible + span { outline: 3px solid rgba(37,99,235,.42); outline-offset: 2px; }

.dropzone { position: relative; border: 1.5px dashed #b8c6d9; border-radius: 14px; background: #fbfcfe;
  min-height: 118px; display: grid; place-items: center; cursor: pointer; transition: all .14s; }
.dropzone:hover, .dropzone.arrastrando { border-color: var(--azul); background: #f4f8ff; }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-texto { text-align: center; color: var(--tinta-2); pointer-events: none; }
.dropzone-texto svg { width: 26px; height: 26px; color: var(--azul); margin-bottom: 5px; }
.dropzone-texto b { display: block; font-size: .9rem; color: var(--tinta); }
.dropzone-texto small { display: block; margin-top: 2px; font-size: .78rem; color: var(--tinta-3); }

/* ================= CAMBIO DE CLAVE ================= */
.cambiar-clave { min-height: calc(100vh - 62px); display: grid; place-items: center; padding: 24px; }
.cambiar-clave-caja { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--borde);
  border-radius: 22px; padding: 32px; box-shadow: var(--sombra-h); }
.cambiar-clave-logo { width: 54px; height: 54px; border-radius: 16px; background: var(--acento);
  color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 1.4rem;
  margin: 0 auto 14px; box-shadow: 0 6px 16px rgba(240,130,30,.4); }
.cambiar-clave h1 { text-align: center; }
.cambiar-clave .sub { text-align: center; }
.cambiar-clave-salir { display: block; margin-top: 18px; text-align: center; font-size: .86rem;
  color: var(--tinta-2); transition: color .13s; }
.cambiar-clave-salir:hover { color: var(--azul); }

/* ================= CHIPS ================= */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { padding: 6px 14px; font-size: .82rem; border-radius: 999px; background: #fff; border: 1px solid var(--borde); color: var(--tinta-2); cursor: pointer; box-shadow: var(--sombra); transition: all .13s; }
.chip:hover { border-color: #cdd7e5; color: var(--tinta); }
.chip.activo { background: var(--azul); border-color: var(--azul); color: #fff; font-weight: 600; }

/* ================= LOGIN ================= */
.login-fondo { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(120deg, #2f6fe6 0%, #1f7ecf 45%, #16a79b 100%); }
.login-caja { width: 100%; max-width: 390px; background: #fff; border-radius: 20px; padding: 38px 34px; box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.login-caja .lg { width: 58px; height: 58px; border-radius: 16px; background: var(--acento); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 1.5rem; margin: 0 auto 14px; box-shadow: 0 6px 16px rgba(240,130,30,.4); }
.login-caja h1 { text-align: center; font-size: 1.25rem; }
.login-caja .sub { text-align: center; }
.campo { margin-bottom: 15px; }
.campo label { display: block; font-size: .82rem; color: var(--tinta-2); margin-bottom: 6px; font-weight: 500; }
.campo input, .campo select { width: 100%; padding: 11px 13px; font-size: .95rem; color: var(--tinta); background: #fff; border: 1px solid var(--borde); border-radius: 10px; outline: none; transition: border-color .13s; }
.campo input:focus, .campo select:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.campo input[type="file"] { padding: 9px; color: var(--tinta-2); font-size: .9rem; }
.ayuda { display: block; margin-top: 6px; font-size: .78rem; color: var(--tinta-3); }

/* ================= FLASH ================= */
.flash { padding: 12px 16px; border-radius: 11px; margin-bottom: 20px; font-size: .9rem; border: 1px solid; }
.flash-ok{background:var(--ok-bg);border-color:#bfe6cf;color:var(--ok);} .flash-error{background:#fdecec;border-color:#f4c9c9;color:#b42318;} .flash-info{background:#eaf1fb;border-color:#cddef5;color:#1d4785;}
.flash { position: relative; padding-right: 44px; animation: aparecer .18s ease-out; }
.flash-cierre { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px;
  border: 0; background: transparent; color: currentColor; border-radius: 7px; cursor: pointer; }
.flash-cierre:hover { background: rgba(0,0,0,.06); }
@keyframes aparecer { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ================= TABLA ================= */
.tabla-contenedor { overflow-x: auto; border: 1px solid var(--borde); border-radius: 12px;
  background: var(--panel); box-shadow: var(--sombra); }
.tabla { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tabla th, .tabla td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--borde-2); }
.tabla th { color: var(--tinta-2); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; background: #f8fafc; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr:hover td { background: #f8fafc; }
@media (max-width: 720px) { .tabla { min-width: 620px; } }

/* ================= VARIOS ================= */
.vacio { text-align: center; padding: 56px 20px; color: var(--tinta-3); }
.paginacion { display: flex; justify-content: center; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.paginacion a, .paginacion span { padding: 8px 13px; border-radius: 9px; font-size: .86rem; border: 1px solid var(--borde); color: var(--tinta-2); background: #fff; box-shadow: var(--sombra); }
.paginacion a:hover { border-color: #cdd7e5; color: var(--tinta); }
.paginacion .actual { background: var(--azul); border-color: var(--azul); color: #fff; font-weight: 600; }
.overlay { display: none; position: fixed; inset: 0; background: rgba(8,18,32,.5); z-index: 45; }

/* ================= RESPONSIVE ================= */
@media (max-width: 860px) {
  .rail { transform: translateX(-100%); transition: transform .22s ease; }
  .rail.abierto { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .marco { margin-left: 0; }
  .overlay.visible { display: block; }
  .hamburguesa { display: grid; }
  .contenido { padding: 18px 16px 40px; }
  .barra { padding: 0 16px; }
  .hero { padding: 24px; }
  .hero h1 { font-size: 1.5rem; }
}
@media (max-width: 620px) {
  .doc { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px 12px; align-items: start; }
  .doc-icono { grid-row: 1 / span 2; }
  .doc-cuerpo { min-width: 0; }
  .doc-lado { grid-column: 2; }
  .doc-titulo { white-space: normal; }
}

/* ---- Home 2.0: accesos y paneles por proceso ---- */
.grid-2.iguales { grid-template-columns: 1fr 1fr; }
@media (max-width: 980px) { .grid-2.iguales { grid-template-columns: 1fr; } }

.accesos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 22px 0; }
@media (max-width: 900px) { .accesos { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .accesos { grid-template-columns: 1fr; } }

.acceso { display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio);
  box-shadow: var(--sombra); transition: transform .13s, box-shadow .13s, border-color .13s; }
.acceso:hover { transform: translateY(-2px); box-shadow: var(--sombra-h); border-color: #d6e0ee; }
.acceso-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.acceso-ic svg { width: 24px; height: 24px; }
.acceso-txt b { display: block; font-size: .92rem; color: var(--tinta); line-height: 1.2; }
.acceso-txt small { color: var(--tinta-3); font-size: .78rem; }
.acceso.a-docs .acceso-ic { background: #eaf1ff; color: var(--azul); }
.acceso.a-form .acceso-ic { background: #fdf0da; color: var(--acento-2); }
.acceso.a-ant  .acceso-ic { background: #fef6e7; color: var(--warn); }
.acceso.a-baja .acceso-ic { background: #eef1f6; color: var(--off); }

.seccion-explorar { margin: 20px 0 24px; padding: 20px 22px; background: #f8fafc;
  border: 1px solid var(--borde); border-left: 4px solid var(--azul); border-radius: 14px; }
.seccion-explorar-cab { margin-bottom: 16px; }
.seccion-explorar-cab h2 { margin: 0; font-size: 1rem; font-weight: 700; text-transform: none;
  letter-spacing: 0; color: var(--tinta); }
.seccion-explorar-cab p { margin: 3px 0 0; color: var(--tinta-2); font-size: .86rem; }
.seccion-explorar .accesos { margin: 0 0 18px; }
.seccion-explorar .grid-2 { gap: 16px; }

.proceso { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border-radius: 10px; transition: background .13s; text-decoration: none; }
.proceso:hover { background: #f4f8ff; }
.proceso-nom { color: var(--tinta); font-weight: 600; font-size: .9rem; }
.proceso-num { min-width: 30px; text-align: center; padding: 2px 9px; border-radius: 999px;
  background: #eef4ff; color: var(--azul-2); font-weight: 700; font-size: .78rem; }

.badge-form { background: var(--warn-bg); color: var(--warn);
  padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }

/* ================= RESUMEN / TABLERO ================= */
.resumen-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 900px) { .resumen-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .resumen-grid { grid-template-columns: 1fr; } }
.resumen-card { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: 18px; display: flex; align-items: center; gap: 14px; }
.resumen-card .ric { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: #eef4ff; color: var(--azul); }
.resumen-card .ric svg { width: 22px; height: 22px; }
.resumen-card .n { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.resumen-card .et { color: var(--tinta-3); font-size: .78rem; margin-top: 3px; }

.grafico-barras { display: grid; gap: 10px; margin-top: 12px; }
.grafico-fila { display: grid; grid-template-columns: 160px 1fr 44px; align-items: center; gap: 10px; }
@media (max-width: 620px) { .grafico-fila { grid-template-columns: 110px 1fr 34px; } }
.grafico-nombre { font-size: .82rem; color: var(--tinta-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grafico-pista { height: 9px; border-radius: 999px; background: #edf1f7; overflow: hidden; }
.grafico-relleno { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--azul), #16a79b); }
.grafico-num { font-size: .78rem; color: var(--tinta-2); text-align: right; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
