:root {
  --fondo: #f4f5f7;
  --panel: #ffffff;
  --texto: #1d2430;
  --suave: #5f6b7a;
  --borde: #dde1e7;
  /* Colores Requiero: verde principal (logo), rojo para acciones y alertas */
  --acento: #e11e1d;          /* rojo Requiero: botones de acción */
  --acento-osc: #b51818;
  --azul: #0a7a34;            /* verde Requiero (antes azul): títulos, selección, enlaces */
  --verde: #009d3d;
  --oscuro: #17191d;          /* barra superior */
  --ok: #0a7a34;
  --peligro: #c62828;
  --radio: 10px;
  --sombra: 0 1px 2px rgba(20, 30, 50, .06), 0 2px 8px rgba(20, 30, 50, .05);
  /* colores por categoría */
  --c0: #3b6ea8; --c1: #d99a00; --c2: #6a4fb3; --c3: #2e8b57; --c4: #5b7083;
  --c5: #c0582b; --c6: #4a4a4a; --c7: #b3261e; --c8: #9aa600; --c9: #8a5a9e; --c10: #7a7f87;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
       background: var(--fondo); color: var(--texto); font-size: 15px; line-height: 1.45; }
a { color: var(--azul); }
h1 { font-size: 1.6rem; margin: .2rem 0 .3rem; }
h2 { font-size: 1.15rem; margin: 0 0 .8rem; }
h3 { font-size: 1rem; margin: 0; }
small { color: var(--suave); }

/* barra superior */
.barra { background: var(--oscuro); color: #fff; display: flex; align-items: center;
         justify-content: space-between; padding: 0 24px; height: 58px; position: sticky; top: 0; z-index: 10; }
.logo { color: #fff; text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.logo-marca { background: var(--verde); border-radius: 6px; padding: 3px 8px; font-weight: 800; letter-spacing: .5px; }
.barra nav { display: flex; gap: 4px; }
.barra nav a { color: #cfd8e6; text-decoration: none; padding: 8px 14px; border-radius: 8px; }
.barra nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.barra nav a.activo { background: rgba(255,255,255,.15); color: #fff; }
.contenido { max-width: 1280px; margin: 0 auto; padding: 24px; }

/* avisos */
.aviso { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.aviso-ok { background: #e6f4ec; color: var(--ok); }
.aviso-error { background: #fbe9e7; color: var(--peligro); }

/* botones */
.boton { display: inline-block; background: var(--acento); color: #fff; border: 0; border-radius: 8px;
         padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.boton:hover { background: var(--acento-osc); }
.boton.secundario { background: #fff; color: var(--azul); border: 1px solid var(--borde); }
.boton.secundario:hover { background: #eef1f5; }
.boton.peligro { background: var(--peligro); }
.boton.chico { padding: 6px 12px; font-size: .9rem; }
.boton-texto { background: none; border: 0; color: var(--azul); cursor: pointer; font: inherit; padding: 2px 6px; }
.boton-texto.peligro { color: var(--peligro); }
.acciones { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.acciones form { margin: 0; }

/* formularios */
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--borde); border-radius: 8px;
                          background: #fff; color: var(--texto); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acento); outline-offset: -1px; }
.formulario { background: var(--panel); padding: 24px; border-radius: var(--radio); box-shadow: var(--sombra);
              max-width: 760px; display: grid; gap: 14px; }
.formulario label { display: grid; gap: 5px; font-weight: 600; font-size: .9rem; }
.formulario input, .formulario select, .formulario textarea { font-weight: 400; }
.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label.check { display: flex !important; gap: 8px; align-items: center; font-weight: 400 !important; }
.foto-actual { display: flex; gap: 14px; align-items: center; }
.filtros { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 20px; }
.filtros label { display: grid; gap: 4px; font-size: .85rem; color: var(--suave); }
.filtros input[type=search] { min-width: 340px; }

/* utilidades */
.subtitulo { color: var(--suave); margin: 0 0 20px; }
.nota { color: var(--suave); font-size: .9rem; }
.titulo-pagina { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.migas { font-size: .9rem; color: var(--suave); margin-bottom: 6px; }
.panel { background: var(--panel); border-radius: var(--radio); box-shadow: var(--sombra); padding: 20px; margin: 24px 0; }
.vacio { background: var(--panel); border-radius: var(--radio); padding: 48px; text-align: center; box-shadow: var(--sombra); }
.vacio .acciones { justify-content: center; margin: 20px 0; }
.vacio-chico { background: var(--panel); padding: 20px; border-radius: var(--radio); color: var(--suave); }
.derecha { margin-left: auto; text-align: right; }
.centro { text-align: center; }
code { background: #eef1f5; padding: 1px 5px; border-radius: 4px; }

/* indicadores */
.indicadores { align-items: start; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 22px; }
.indicadores div { background: var(--panel); border-radius: var(--radio); padding: 14px 16px; box-shadow: var(--sombra); }
.indicadores strong { display: block; font-size: 1.7rem; color: var(--azul); }
.indicadores span { color: var(--suave); font-size: .85rem; }
.indicadores .alerta strong { color: var(--acento); }

/* pestañas de plantas */
.pestanas { display: flex; gap: 6px; border-bottom: 2px solid var(--borde); margin-bottom: 20px; align-items: end; flex-wrap: wrap; }
.pestanas > a:not(.boton) { padding: 10px 18px; text-decoration: none; color: var(--suave); border-radius: 8px 8px 0 0;
                            font-weight: 600; margin-bottom: -2px; border-bottom: 3px solid transparent; }
.pestanas > a.activo { color: var(--azul); border-bottom-color: var(--acento); background: var(--panel); }
.pestanas small { display: block; font-weight: 400; font-size: .75rem; }
.pestanas .boton { margin-bottom: 8px; }

/* gerencias y subáreas */
.gerencia { margin-bottom: 26px; }
.gerencia h2 { color: var(--azul); border-left: 4px solid var(--acento); padding-left: 10px; }
.grilla-subareas { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.tarjeta-subarea { background: var(--panel); border-radius: var(--radio); padding: 14px; box-shadow: var(--sombra);
                   text-decoration: none; color: inherit; border: 1px solid transparent; transition: border-color .15s, transform .15s; }
.tarjeta-subarea:hover { border-color: var(--acento); transform: translateY(-1px); }
.tarjeta-subarea.sin-epp { border: 1px dashed #e0b48f; }
.ts-cabecera { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.contador { background: var(--azul); color: #fff; border-radius: 999px; min-width: 28px; text-align: center;
            font-size: .85rem; font-weight: 700; padding: 2px 8px; }
.ts-minis { display: flex; flex-wrap: wrap; gap: 5px; min-height: 36px; align-items: center; }

/* miniaturas */
.mini, .foto, .foto-grande { object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.mini { width: 36px; height: 36px; }
.foto { width: 100%; height: 100%; }
.foto-grande { width: 100%; aspect-ratio: 1; }
.sin-foto { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700;
            text-transform: uppercase; letter-spacing: .5px; }
.mini.sin-foto { font-size: .75rem; }
.foto.sin-foto { font-size: 1.6rem; }
.foto-grande.sin-foto { font-size: 4rem; }
.mini.mas { background: #e8ebf0; color: var(--suave); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.c0 { background: var(--c0); } .c1 { background: var(--c1); } .c2 { background: var(--c2); } .c3 { background: var(--c3); }
.c4 { background: var(--c4); } .c5 { background: var(--c5); } .c6 { background: var(--c6); } .c7 { background: var(--c7); }
.c8 { background: var(--c8); } .c9 { background: var(--c9); } .c10 { background: var(--c10); }

/* tarjetas de ítem */
.titulo-categoria { font-size: 1rem; color: var(--suave); text-transform: uppercase; letter-spacing: .6px; margin: 22px 0 10px; }
.grilla-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.tarjeta-item { background: var(--panel); border-radius: var(--radio); box-shadow: var(--sombra); display: flex; overflow: hidden; }
.tarjeta-foto { width: 110px; flex-shrink: 0; display: block; padding: 10px; }
.tarjeta-foto .foto { height: 90px; }
.tarjeta-cuerpo { padding: 12px 14px 12px 4px; flex: 1; min-width: 0; }
.tarjeta-cuerpo h3 { margin: 6px 0; }
.tarjeta-cuerpo h3 a { color: var(--texto); text-decoration: none; }
.tarjeta-cuerpo dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 6px; font-size: .88rem; }
.tarjeta-cuerpo dt { color: var(--suave); }
.tarjeta-cuerpo dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tarjeta-cuerpo form { margin: 0; }
.etiqueta { display: inline-block; color: #fff; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.usos { font-size: .82rem; color: var(--suave); margin: 0; }

/* detalle ítem */
.detalle-item { display: grid; grid-template-columns: 280px 1fr; gap: 28px; background: var(--panel);
                padding: 24px; border-radius: var(--radio); box-shadow: var(--sombra); }
.tabla-datos { border-collapse: collapse; margin: 12px 0 20px; }
.tabla-datos th { text-align: left; color: var(--suave); font-weight: 400; padding: 5px 20px 5px 0; }

/* panel agregar */
.panel-columnas { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
.panel-columnas form { display: grid; gap: 10px; align-content: start; }
.lista-check { max-height: 320px; overflow-y: auto; border: 1px solid var(--borde); border-radius: 8px; }
.lista-check label { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid #f0f2f5; cursor: pointer; }
.lista-check label:hover { background: #f7f8fa; }
.lista-check small { display: block; }

/* tablas */
.tabla { width: 100%; border-collapse: collapse; background: var(--panel); }
.tabla th { text-align: left; font-size: .85rem; color: var(--suave); border-bottom: 2px solid var(--borde); padding: 8px 10px; }
.tabla td { border-bottom: 1px solid #eef0f3; padding: 8px 10px; vertical-align: middle; }
.tabla .en-linea input { padding: 4px 8px; }
.tabla-scroll { overflow-x: auto; background: var(--panel); border-radius: var(--radio); box-shadow: var(--sombra); }
.matriz th.centro a { text-decoration: none; color: var(--azul); font-weight: 700; }
.celda-item { display: flex; gap: 10px; align-items: center; }
.celda-item small { display: block; }
.matriz .si { color: var(--ok); font-size: 1.3rem; }
.matriz .no { color: #c4c9d1; }
.matriz tr.diferente { background: #fff5f5; }
.matriz tr.diferente td:first-child { box-shadow: inset 4px 0 0 var(--acento); }
body.solo-dif .matriz tr.igual { display: none; }
.resumen-dif { padding: 10px 14px; border-radius: 8px; background: #e6f4ec; color: var(--ok); }
.resumen-dif.hay { background: #fdeceb; color: var(--acento-osc); }

/* estructura */
.tres-columnas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tres-columnas .panel { margin: 12px 0 0; }
.lista-editable { list-style: none; padding: 0; margin: 0 0 14px; }
.lista-editable li { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-bottom: 1px solid #eef0f3; padding: 5px 0; }
.lista-editable form { margin: 0; }
.en-linea { display: flex; align-items: center; gap: 6px; flex: 1; }
.en-linea input { flex: 1 1 0; width: 0; min-width: 0; padding: 5px 8px; }
.alta { display: grid; gap: 8px; }
.alta input:not([type=checkbox]), .alta select { width: 100%; min-width: 0; }
.lista-editable small { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-editable .boton-texto { white-space: nowrap; font-size: .88rem; padding: 2px 4px; }
.alta label { display: grid; gap: 4px; font-size: .85rem; color: var(--suave); }
.zona-peligro { border-left: 4px solid var(--peligro); }

/* ficha imprimible */
.modo-ficha { background: #e9ecf0; }
.barra-impresion { position: sticky; top: 0; background: var(--azul); color: #fff; padding: 12px 24px;
                   display: flex; justify-content: space-between; align-items: center; z-index: 5; }
.ficha { background: #fff; width: 210mm; min-height: 297mm; margin: 20px auto; padding: 16mm 14mm;
         box-shadow: var(--sombra); display: flex; flex-direction: column; }
.ficha-cabecera { display: flex; justify-content: space-between; align-items: center;
                  border-bottom: 4px solid var(--acento); padding-bottom: 10px; margin-bottom: 18px; }
.ficha-cabecera h1 { font-size: 2rem; margin: 0; color: var(--azul); }
.ficha-planta { margin: 0; color: var(--suave); font-weight: 600; }
.ficha-sello { background: var(--azul); color: #fff; font-weight: 800; text-align: center; padding: 10px 14px;
               border-radius: 8px; font-size: .85rem; letter-spacing: 1px; }
.ficha-grilla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ficha-item { display: flex; gap: 12px; border: 1px solid var(--borde); border-radius: 8px; padding: 10px; break-inside: avoid; }
.ficha-item .foto { width: 72px; height: 72px; }
.ficha-item div { display: flex; flex-direction: column; font-size: .9rem; }
.ficha-item strong { font-size: 1rem; }
.ficha-norma { color: var(--suave); font-size: .8rem; }
.ficha-pie { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--borde); color: var(--suave); font-size: .85rem; }

@media print {
  @page { size: A4; margin: 0; }
  .no-imprimir { display: none !important; }
  .modo-ficha { background: #fff; }
  .ficha { margin: 0; box-shadow: none; page-break-after: always; }
  .ficha:last-child { page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (max-width: 900px) {
  .indicadores { grid-template-columns: repeat(2, 1fr); }
  .tres-columnas, .panel-columnas, .detalle-item, .dos-columnas { grid-template-columns: 1fr; }
  .barra { height: auto; flex-direction: column; padding: 10px; gap: 6px; }
  .filtros input[type=search] { min-width: 0; width: 100%; }
}

/* ---------- v2 ---------- */
.texto-alerta { color: var(--acento-osc); font-weight: 600; }
.bloque { display: block; }
.enlace-chico { font-size: .85rem; margin-left: 8px; white-space: nowrap; }
.pie-form { margin-top: 16px; }
.pasos { text-align: left; display: inline-block; margin: 0 auto; line-height: 1.9; }
.ts-pend { margin: 8px 0 0; font-size: .82rem; color: var(--acento-osc); font-weight: 600; }
.sin-foto.pendiente { background: #fff !important; color: var(--acento-osc); border: 2px dashed var(--acento); }
.mini-med { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; font-size: .9rem; }
.mini-grande { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; }

.paso-cabecera { display: flex; gap: 14px; align-items: flex-start; }
.paso-cabecera h2 { margin: 2px 0 2px; }
.paso-cabecera p { margin: 0 0 6px; }
.paso-num { background: var(--acento); color: #fff; font-weight: 800; border-radius: 50%; width: 34px; height: 34px;
            display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.form-a { display: none; margin-top: 10px; }
.form-a.abierto { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; border: 1px solid var(--borde); border-radius: 999px; padding: 6px 14px; background: #fff;
             transition: background .1s, border-color .1s; }
.chip span small { color: var(--suave); }
.chip:hover span { border-color: var(--azul); }
.chip input:checked + span { background: var(--azul); color: #fff; border-color: var(--azul); }
.chip input:checked + span small { color: #cfd8e6; }
.chip input:focus-visible + span { outline: 2px solid var(--acento); }

.tabla-asignacion { margin-top: 14px; }
.tabla-asignacion select { min-width: 220px; }
.tabla-asignacion .col-foto { width: 64px; }
.fila-pendiente { background: #fff5f5; }
select.falta { border-color: var(--acento); }

.dos-paneles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dos-paneles .panel { margin: 0 0 8px; }
.grilla-articulos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tarjeta-articulo { background: var(--panel); border-radius: var(--radio); box-shadow: var(--sombra); padding: 14px 16px; }
.tarjeta-articulo header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.tarjeta-articulo h3 a { color: var(--texto); text-decoration: none; }
.tarjeta-articulo h3 a:hover { color: var(--azul); text-decoration: underline; }
.lista-modelos { list-style: none; padding: 0; margin: 0 0 8px; }
.lista-modelos li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid #f0f2f5; flex-wrap: wrap; }
.lista-modelos li a { color: var(--texto); text-decoration: none; }
.lista-modelos li a:hover { text-decoration: underline; }
.lista-modelos small { margin-left: auto; }
.lista-modelos .mini { width: 28px; height: 28px; font-size: .65rem; }
.en-linea-ancha { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.en-linea-ancha input, .en-linea-ancha select { min-width: 260px; }
.lista-colores { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); column-gap: 24px; }
.matriz td small.bloque { color: var(--suave); }
.matriz td .no { color: #b7bdc6; }
.ficha-item b { color: var(--azul); }
@media (max-width: 900px) { .dos-paneles { grid-template-columns: 1fr; } }

/* ---------- v2.1: acordeón paso A y categorías ---------- */
.barra-a { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 12px; }
.barra-a input[type=search] { min-width: 280px; }
.total-a { margin-left: auto; color: var(--suave); font-weight: 600; }
.acordeon { border: 1px solid var(--borde); border-radius: 10px; margin-bottom: 10px; background: #fff; overflow: hidden; }
.acordeon > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
                      padding: 12px 16px; background: #f1f4f8; user-select: none; }
.acordeon > summary::-webkit-details-marker { display: none; }
.acordeon > summary:hover { background: #e8edf4; }
.acordeon[open] > summary { border-bottom: 1px solid var(--borde); }
.acordeon-barra { width: 6px; height: 26px; border-radius: 4px; flex-shrink: 0; display: inline-block; }
.acordeon-titulo { font-weight: 700; font-size: 1.05rem; color: var(--azul); text-transform: uppercase; letter-spacing: .5px; }
.acordeon-cont { margin-left: auto; background: #fff; border: 1px solid var(--borde); color: var(--suave);
                 border-radius: 999px; padding: 2px 12px; font-size: .85rem; white-space: nowrap; }
.acordeon-cont.con { background: var(--azul); color: #fff; border-color: var(--azul); }
.acordeon-flecha { width: 10px; height: 10px; border-right: 2px solid var(--suave); border-bottom: 2px solid var(--suave);
                   transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
.acordeon[open] .acordeon-flecha { transform: rotate(45deg); }
.lista-art { columns: 3 260px; column-gap: 10px; padding: 14px 16px 8px; }
.ficha-art { display: block; break-inside: avoid; margin-bottom: 8px; cursor: pointer; }
.ficha-art input { position: absolute; opacity: 0; pointer-events: none; }
.fa-caja { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--borde);
           border-radius: 8px; background: #fff; transition: background .1s, border-color .1s; }
.ficha-art:hover .fa-caja { border-color: var(--azul); }
.fa-check { width: 18px; height: 18px; border: 2px solid #b9c1cc; border-radius: 4px; flex-shrink: 0; position: relative; }
.fa-nombre { flex: 1; }
.fa-aviso { font-size: .72rem; color: var(--acento-osc); background: #fdeceb; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.ficha-art input:checked + .fa-caja { background: var(--azul); border-color: var(--azul); color: #fff; font-weight: 600; }
.ficha-art input:checked + .fa-caja .fa-check { border-color: #fff; background: #fff; }
.ficha-art input:checked + .fa-caja .fa-check::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px;
           border: solid var(--azul); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.ficha-art input:checked + .fa-caja .fa-aviso { background: rgba(255,255,255,.18); color: #f9cfcd; }
.ficha-art input:focus-visible + .fa-caja { outline: 2px solid var(--acento); outline-offset: 1px; }

.panel-categorias > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; }
.panel-categorias > summary::-webkit-details-marker { display: none; }
.panel-categorias > summary h2 { margin: 0; }
.panel-categorias > summary::after { content: "▸"; margin-left: auto; color: var(--suave); }
.panel-categorias[open] > summary::after { content: "▾"; }
.panel-categorias[open] > summary { margin-bottom: 12px; }
.lista-cats li { gap: 10px; justify-content: flex-start; }
.lista-cats li small { min-width: 48px; }
.lista-cats li .en-linea { flex: 0 1 460px; }
.lista-cats button[disabled] { opacity: .3; cursor: default; }
.titulo-cat-color { display: flex; align-items: center; gap: 10px; color: var(--azul); }
.titulo-cat-color .acordeon-barra { height: 18px; }

/* ---------- v2.2: árbol de estructura ---------- */
.titulo-seccion { margin: 30px 0 4px; color: var(--azul); }
.arbol-cabecera { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.arbol-cabecera h2 { margin: 0; }
.nodo > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; user-select: none; }
.nodo > summary::-webkit-details-marker { display: none; }
.nodo > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--suave); border-bottom: 2px solid var(--suave);
                          transform: rotate(-45deg); transition: transform .15s; flex-shrink: 0; margin: 0 4px 0 2px; }
.nodo[open] > summary::before { transform: rotate(45deg); }
.nodo-planta { border: 1px solid var(--borde); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.nodo-planta > summary { background: var(--azul); color: #fff; padding: 12px 16px; }
.nodo-planta > summary::before { border-color: #fff; }
.nodo-planta > summary small { color: #cfd8e6; }
.nodo-planta > summary .pill { margin-left: auto; background: rgba(255,255,255,.15); color: #fff; }
.nodo-nombre { font-weight: 700; }
.nodo-planta .nodo-nombre { font-size: 1.1rem; }
.nodo-ico { width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
            font-size: .75rem; font-weight: 800; flex-shrink: 0; }
.ico-planta { background: var(--acento); color: #fff; }
.ico-gerencia { background: #e3e9f2; color: var(--azul); }
.pill { background: #eef1f5; color: var(--suave); border-radius: 999px; padding: 1px 10px; font-size: .8rem; font-weight: 600; }
.pill.vacia { background: #fdeceb; color: var(--acento-osc); }
.hijos { padding: 8px 12px 10px 26px; position: relative; }
.hijos::before { content: ""; position: absolute; left: 22px; top: 0; bottom: 14px; border-left: 2px solid #e1e6ee; }
.nodo-gerencia { position: relative; margin: 6px 0; }
.nodo-gerencia::before { content: ""; position: absolute; left: -4px; top: 19px; width: 14px; border-top: 2px solid #e1e6ee; }
.nodo-gerencia > summary { padding: 8px 12px 8px 14px; border-radius: 8px; background: #f6f8fb; }
.nodo-gerencia > summary:hover { background: #edf1f7; }
.nodo-gerencia[open] > summary { background: #e9eef6; }
.orden-gerencia { margin-left: auto; display: inline-flex; gap: 2px; }
.orden-gerencia form, .hoja form { margin: 0; }
.flecha { font-size: .8rem; padding: 2px 6px; }
.flecha[disabled] { opacity: .25; cursor: default; }
.hojas { list-style: none; margin: 4px 0 6px 30px; padding: 0 0 0 16px; border-left: 2px solid #e1e6ee; }
.hoja { display: flex; align-items: center; gap: 8px; padding: 5px 0; position: relative; flex-wrap: wrap; }
.hoja::before { content: ""; position: absolute; left: -16px; top: 50%; width: 12px; border-top: 2px solid #e1e6ee; }
.hoja-nombre { flex: 0 1 380px; }
.pill-art { min-width: 128px; text-align: center; font-size: .78rem; color: var(--suave); background: #eef1f5; border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.pill-art.cero { background: #fdeceb; color: var(--acento-osc); }
.pill-art b { color: var(--acento-osc); }
.hoja-nueva input { border-style: dashed; }
.aplicar-orden { margin: 2px 0 8px 46px; }

/* ---------- v2.3: certificados, avisos, árbol de artículos ---------- */
.indicadores { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.indicadores a { background: var(--panel); border-radius: var(--radio); padding: 14px 16px; box-shadow: var(--sombra);
                 text-decoration: none; color: inherit; border: 1px solid transparent; }
.indicadores a:hover { border-color: var(--acento); }
.indicadores a strong { display: block; font-size: 1.7rem; color: var(--azul); }
.indicadores a span { color: var(--suave); font-size: .85rem; }
.indicadores a.alerta strong { color: var(--acento); }
.aviso-chip, .ok-chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 600;
                        white-space: nowrap; text-decoration: none; }
.aviso-chip { background: #fdeceb; color: var(--acento-osc); border: 1px solid #f3b9b6; }
.ok-chip { background: #e6f4ec; color: var(--ok); border: 1px solid #b9e0c9; }
a.ok-chip:hover, a.aviso-chip:hover { filter: brightness(.96); text-decoration: underline; }
.aviso-chip.chico, .ok-chip.chico { font-size: .72rem; padding: 1px 8px; }
.avisos-modelo { display: flex; gap: 8px; margin: 0 0 14px; }
.col-norma { min-width: 170px; }
.col-norma > * { display: inline-block; margin: 2px 4px 2px 0; }

.formulario-modelo { max-width: 900px; }
.formulario-modelo fieldset { border: 1px solid var(--borde); border-radius: 10px; padding: 14px 18px 18px; display: grid; gap: 12px; margin: 0; }
.formulario-modelo legend { font-weight: 700; color: var(--azul); padding: 0 6px; }
.bloque-archivo { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; }
.vista-foto { width: 200px; height: 200px; border: 1px dashed var(--borde); border-radius: 10px; display: flex; flex-direction: column;
              align-items: center; justify-content: center; gap: 6px; background: #fafbfc; overflow: hidden; text-align: center; }
.vista-foto img { max-width: 100%; max-height: 170px; object-fit: contain; }
.opciones-archivo { display: grid; gap: 12px; }
.zona-pegar { border: 2px dashed var(--acento); border-radius: 10px; padding: 16px; text-align: center; background: #fff7f7;
              display: grid; gap: 4px; cursor: text; outline: none; }
.zona-pegar span { color: var(--suave); font-size: .85rem; font-weight: 400; }
.zona-pegar:focus { background: #fdeceb; box-shadow: 0 0 0 3px rgba(225,30,29, .2); }
.zona-pegar.arrastrando { background: #fde1e0; }
.zona-pegar.lista { border-color: var(--ok); background: #eef8f2; }
.zona-pegar.lista strong { color: var(--ok); }
.cert-actual { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.barra-avisos { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.filtro-chip { border: 1px solid var(--borde); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer; color: var(--texto); }
.filtro-chip b { margin-left: 4px; }
.filtro-chip.alerta b { color: var(--acento-osc); }
.filtro-chip.activo { background: var(--azul); border-color: var(--azul); color: #fff; }
.filtro-chip.activo b { color: #fff; }
#buscar-arbol { min-width: 320px; }
.nodo-cat { border: 1px solid var(--borde); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.nodo-cat > summary { background: #f1f4f8; padding: 12px 16px; }
.nodo-cat > summary .nodo-nombre { text-transform: uppercase; letter-spacing: .5px; color: var(--azul); font-size: 1.02rem; }
.nodo-art > summary .mini { width: 28px; height: 28px; font-size: .68rem; }
.nodo-art > summary { flex-wrap: wrap; }
.nodo-usos { font-size: .8rem; }
.hoja-modelo { display: grid; grid-template-columns: 52px minmax(200px, 1fr) auto auto; gap: 12px; align-items: center;
               padding: 7px 0; border-bottom: 1px solid #f0f2f5; }
.hoja-modelo .hm-datos { display: flex; flex-direction: column; min-width: 0; }
.hoja-modelo .hm-datos a { color: var(--texto); text-decoration: none; }
.hoja-modelo .hm-datos a:hover { text-decoration: underline; }
.hm-estado { display: flex; gap: 6px; flex-wrap: wrap; }
.hm-acciones { display: flex; gap: 4px; align-items: center; }
.hm-acciones form { margin: 0; }
.nuevo-art { margin: 8px 0 2px 4px; max-width: 460px; }
.nuevo-art input { border-style: dashed; }
@media (max-width: 900px) {
  .bloque-archivo { grid-template-columns: 1fr; }
  .hoja-modelo { grid-template-columns: 52px 1fr; }
}

/* ---------- v2.4: dashboard de inicio ---------- */
:root { --azul-500: #0a8a3a; --azul-250: #8fd3a8; --azul-100: #d6efdf; --gris-pista: #e6e8ec; }
.dash { margin-bottom: 10px; }
.dash-cabecera h1 { margin-bottom: 2px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--panel); border-radius: 12px; box-shadow: var(--sombra); padding: 18px 20px 16px; display: flex; flex-direction: column; }
.kpi-titulo { font-size: .92rem; font-weight: 600; color: var(--suave); margin: 0 0 8px; }
.kpi-valor { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.kpi-pct { font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--texto); letter-spacing: -.5px; }
.kpi-frac { color: var(--suave); font-size: .95rem; }
.medidor { height: 10px; border-radius: 999px; background: var(--azul-100); overflow: hidden; }
.medidor span { display: block; height: 100%; background: var(--azul-500); border-radius: 999px; min-width: 0; }
.kpi-detalle { margin: 10px 0 6px; font-size: .88rem; color: var(--suave); }
.kpi-estado { margin: auto 0 0; font-size: .85rem; font-weight: 600; color: var(--suave); display: flex; gap: 6px; align-items: center; }
.kpi-estado span { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; color: #fff; }
.kpi-estado.ok { color: var(--ok); } .kpi-estado.ok span { background: var(--ok); }
.kpi-estado.falta { color: var(--acento-osc); } .kpi-estado.falta span { background: var(--acento); font-weight: 800; }

.panel-dash { background: var(--panel); border-radius: 12px; box-shadow: var(--sombra); padding: 18px 20px; margin-bottom: 16px; }
.pd-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pd-cabecera h2 { margin: 0; }
.leyenda { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; font-size: .85rem; color: var(--suave); }
.leyenda li { display: flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw-comp, .seg-comp { background: var(--azul-500); }
.sw-prog, .seg-prog { background: var(--azul-250); }
.sw-sin, .seg-sin, .seg-vacio { background: var(--gris-pista); }
.barras-planta { display: grid; gap: 10px; margin-top: 10px; }
.fila-planta { display: grid; grid-template-columns: 200px 1fr 110px; gap: 14px; align-items: center; text-decoration: none; color: inherit;
               padding: 6px 8px; border-radius: 8px; }
.fila-planta:hover { background: #f4f6f9; }
.fp-nombre small { color: var(--suave); }
.fp-barra { display: flex; gap: 2px; height: 20px; }
.seg { height: 100%; min-width: 6px; }
.fp-barra .seg:first-child { border-radius: 4px 0 0 4px; }
.fp-barra .seg:last-child { border-radius: 0 4px 4px 0; }
.fp-barra .seg:only-child { border-radius: 4px; }
.fp-valor { text-align: right; }
.fp-valor small { color: var(--suave); margin-left: 4px; }
.tooltip-dash { position: fixed; z-index: 50; background: var(--texto); color: #fff; font-size: .82rem; padding: 6px 10px;
                border-radius: 6px; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,.18); }

.pendientes > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pendientes > summary::-webkit-details-marker { display: none; }
.pendientes > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--suave); border-bottom: 2px solid var(--suave);
                                transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
.pendientes[open] > summary::before { transform: rotate(45deg); }
.pendientes > summary h2 { margin: 0; }
.pend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.pend-grupo { border: 1px solid var(--borde); border-radius: 10px; padding: 12px 14px; }
.pend-grupo h3 { font-size: .95rem; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.pend-grupo ul { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
.pend-grupo li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f0f2f5; font-size: .9rem; }
.pend-grupo li a { color: var(--texto); text-decoration: none; }
.pend-grupo li a:hover { color: var(--azul); text-decoration: underline; }
.pend-n { color: var(--acento-osc); font-weight: 600; white-space: nowrap; font-size: .82rem; }
@media (max-width: 900px) {
  .kpis, .pend-grid { grid-template-columns: 1fr; }
  .fila-planta { grid-template-columns: 1fr; gap: 4px; }
  .fp-valor { text-align: left; }
}

/* ---------- v2.5: accesos ---------- */
.caja-acceso { max-width: 440px; margin: 40px auto; background: var(--panel); border-radius: 12px; box-shadow: var(--sombra); padding: 28px; }
.caja-acceso h1 { margin-top: 0; }
.caja-acceso .alta label { display: grid; gap: 4px; font-size: .9rem; color: var(--suave); }
.menu-usuario { display: flex; align-items: center; gap: 4px; margin-left: 14px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.2); }
.mu-nombre { color: #fff; font-size: .88rem; display: flex; flex-direction: column; line-height: 1.15; margin-right: 6px; }
.mu-nombre small { color: #cfd8e6; font-size: .72rem; }
.form-usuario { display: flex; gap: 10px; flex-wrap: wrap; }
.form-usuario input, .form-usuario select { min-width: 180px; }
.fila-usuario { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.fila-usuario input[name=nombre] { width: 180px; }
.fila-usuario input[name=clave] { width: 220px; }
.tabla-usuarios tr.inactivo td { opacity: .55; }
/* perfil consulta: se ocultan los controles de edición */
.solo-lectura form[method=post]:not(.permitido),
.solo-lectura .hoja-nueva, .solo-lectura .nuevo-art, .solo-lectura .solo-admin,
.solo-lectura .orden-gerencia form,
.solo-lectura .hm-acciones, .solo-lectura .panel-categorias { display: none !important; }

/* ---------- v2.6: figura EPP ---------- */
.figura-epp { display: block; width: 100%; height: auto; overflow: visible; }
.figura-epp .zona { transition: opacity .2s, filter .2s; cursor: pointer; }
.figura-epp .p { stroke: rgba(0,0,0,.18); stroke-width: .8; }
.figura-epp .ropa-pant { fill: #26466e; } .figura-epp .ropa-cam { fill: #2f5a8c; }
.figura-epp .costura { stroke: rgba(255,255,255,.25); stroke-width: 1; fill: none; }
.figura-epp .chal { fill: #f07a1f; }
.figura-epp .cinta { fill: #e9eef4; stroke: #c9d2dd; stroke-width: .5; }
.figura-epp .t { fill: none; stroke: #b3261e; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.figura-epp .t-anillo { fill: #cfd6de; stroke: #8a96a3; stroke-width: 1.5; }
.figura-epp .guan { fill: #9c6b3d; } .figura-epp .rod { fill: #3b3f45; }
.figura-epp .calz { fill: #3a2f28; } .figura-epp .suela { stroke: #f2b705; stroke-width: 2; }
.figura-epp .fono { fill: #2e8b57; } .figura-epp .masc { fill: #f6f8fa; }
.figura-epp .cordon { stroke: #cfd6de; stroke-width: 1.2; fill: none; }
.figura-epp .lente { fill: #2b3a4a; fill-opacity: .82; } .figura-epp .brillo { stroke: #fff; stroke-opacity: .6; stroke-width: 1.2; }
.figura-epp .casco { fill: #f2b705; } .figura-epp .nervio { stroke: rgba(0,0,0,.15); stroke-width: 2; }
/* resaltado al pasar / seleccionar */
.figura-epp.enfoque .zona { opacity: .22; }
.figura-epp.enfoque .zona.foco { opacity: 1; filter: drop-shadow(0 0 4px rgba(225,30,29,.75)); }
/* modo subárea: lo no exigido en gris, lo pendiente con borde naranjo */
.figura-epp.modo-sub .zona { cursor: default; }
.figura-epp.modo-sub .off .p, .figura-epp.modo-sub .off .cinta { fill: #e3e7ec; stroke: #d3d9e0; }
.figura-epp.modo-sub .off .t { stroke: #dde2e8; } .figura-epp.modo-sub .off .t-anillo { fill: #e3e7ec; stroke: #d3d9e0; }
.figura-epp.modo-sub .off .costura, .figura-epp.modo-sub .off .suela, .figura-epp.modo-sub .off .brillo,
.figura-epp.modo-sub .off .cordon, .figura-epp.modo-sub .off .nervio { stroke: transparent; }
.figura-epp.modo-sub .on.pend .p { stroke: #e11e1d; stroke-width: 2; stroke-dasharray: 3 2; }

/* mapa EPP en Artículos */
.mapa-epp { display: grid; grid-template-columns: 260px 1fr; gap: 0 28px; align-items: start; }
.mapa-figura { position: relative; }
.mapa-cats { position: relative; height: 100%; min-height: 534px; }
.mapa-lineas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.mapa-lineas path { fill: none; stroke: #b9c3cf; stroke-width: 1.2; }
.mapa-lineas path.foco { stroke: var(--acento); stroke-width: 2; }
.mapa-lineas circle { fill: #b9c3cf; } .mapa-lineas circle.foco { fill: var(--acento); }
.cat-btn { position: absolute; left: 70px; transform: translateY(-50%); display: flex; align-items: center; gap: 10px;
           background: #fff; border: 1px solid var(--borde); border-radius: 10px; padding: 7px 14px 7px 10px; font: inherit;
           cursor: pointer; min-width: 300px; text-align: left; box-shadow: 0 1px 2px rgba(20,30,50,.05); transition: border-color .15s, box-shadow .15s; }
.cat-btn:hover, .cat-btn.foco { border-color: var(--acento); box-shadow: 0 2px 10px rgba(225,30,29,.15); }
.cat-btn.sel { background: var(--azul); border-color: var(--azul); color: #fff; }
.cat-btn.sel small { color: #cfd8e6; }
.cat-btn .acordeon-barra { height: 28px; }
.cat-btn strong { display: block; font-size: .95rem; }
.cat-btn small { color: var(--suave); }
.cat-btn .cb-n { margin-left: auto; font-weight: 700; font-size: 1.05rem; }
.mapa-otras { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.mapa-otras .cat-btn { position: static; transform: none; min-width: 0; }
.mapa-ayuda { grid-column: 1 / -1; margin: 6px 0 0; }
.filtro-cat { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }

/* figura en la subárea */
.panel-figura { display: grid; grid-template-columns: 170px 1fr; gap: 26px; align-items: center; }
.zonas-sub { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.zonas-sub li { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--borde); border-radius: 10px; padding: 10px 12px; background: #fff; }
.zonas-sub li.pend { border-color: #f3b9b6; background: #fff7f7; }
.zonas-sub .zs-estado { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
                        color: #fff; font-size: .75rem; font-weight: 800; background: var(--ok); margin-top: 1px; }
.zonas-sub li.pend .zs-estado { background: var(--acento); }
.zonas-sub strong { display: block; font-size: .92rem; }
.zonas-sub small { color: var(--suave); display: block; line-height: 1.35; }

/* árbol de gerencias en el inicio */
.arbol-ger { display: grid; gap: 10px; }
.ger-nodo { background: var(--panel); border-radius: 12px; box-shadow: var(--sombra); overflow: hidden; }
.ger-nodo > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 18px 1fr 220px 120px; gap: 14px; align-items: center; padding: 14px 18px; }
.ger-nodo > summary::-webkit-details-marker { display: none; }
.ger-nodo > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--suave); border-bottom: 2px solid var(--suave);
                              transform: rotate(-45deg); transition: transform .15s; }
.ger-nodo[open] > summary::before { transform: rotate(45deg); }
.ger-nodo > summary:hover { background: #f7f9fb; }
.ger-nombre { font-weight: 700; color: var(--azul); font-size: 1.05rem; }
.ger-nombre small { display: block; font-weight: 400; color: var(--suave); font-size: .82rem; }
.ger-pct { text-align: right; font-weight: 700; font-size: 1.1rem; }
.ger-pct small { display: block; font-weight: 400; color: var(--suave); font-size: .78rem; }
.barra-av { height: 8px; border-radius: 999px; background: var(--azul-100); overflow: hidden; }
.barra-av span { display: block; height: 100%; background: var(--azul-500); border-radius: 999px; }
.barra-av.vacia { background: var(--gris-pista); }
.sub-lista { border-top: 1px solid var(--borde); }
.sub-fila { display: grid; grid-template-columns: 18px 1fr 90px 220px 120px 20px; gap: 14px; align-items: center; padding: 11px 18px;
            text-decoration: none; color: inherit; border-bottom: 1px solid #f0f2f5; }
.sub-fila:last-child { border-bottom: 0; }
.sub-fila:hover { background: #f7f9fb; }
.sub-fila .sf-nombre { font-weight: 600; }
.sub-fila .sf-items { color: var(--suave); font-size: .88rem; }
.sub-fila .sf-pend { font-size: .82rem; font-weight: 600; color: var(--acento-osc); text-align: right; }
.sub-fila .sf-pend.ok { color: var(--ok); }
.sub-fila .sf-ir { color: var(--suave); }
.sub-fila .sf-sin { color: var(--suave); font-size: .88rem; font-style: italic; }
.punto { width: 10px; height: 10px; border-radius: 50%; background: var(--gris-pista); }
.punto.comp { background: var(--azul-500); } .punto.prog { background: var(--azul-250); }
@media (max-width: 900px) {
  .mapa-epp, .panel-figura { grid-template-columns: 1fr; }
  .mapa-cats { min-height: 0; display: grid; gap: 8px; } .mapa-lineas { display: none; }
  .cat-btn { position: static; transform: none; min-width: 0; }
  .ger-nodo > summary { grid-template-columns: 18px 1fr 90px; } .ger-nodo > summary .barra-av { display: none; }
  .sub-fila { grid-template-columns: 18px 1fr 70px; } .sub-fila .barra-av, .sub-fila .sf-ir, .sub-fila .sf-items { display: none; }
}
.mapa-epp { position: relative; }
.sin-margen { margin-top: 0; }
/* ajustes v2.6b */
.cat-btn { padding: 6px 12px 6px 9px; min-width: 330px; gap: 9px; }
.cat-btn .acordeon-barra { height: 20px; }
.cat-btn strong { display: inline; font-size: .92rem; font-weight: 600; }
.cat-btn .cb-n { margin-left: auto; font-weight: 600; font-size: .78rem; color: var(--suave); background: #f1f4f8; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.cat-btn.sel .cb-n { background: rgba(255,255,255,.15); color: #fff; }
/* subárea: la figura lleva puesto solo lo exigido */
.figura-epp.modo-sub .off.z-cabeza, .figura-epp.modo-sub .off.z-ojos, .figura-epp.modo-sub .off.z-oidos,
.figura-epp.modo-sub .off.z-resp, .figura-epp.modo-sub .off.z-chaleco, .figura-epp.modo-sub .off.z-caidas,
.figura-epp.modo-sub .off.z-rodillas { display: none; }
.figura-epp.modo-sub .off.z-manos .p { fill: #e2b48c; stroke: rgba(0,0,0,.12); }
.figura-epp.modo-sub .off.z-ropa .ropa-cam { fill: #c9d1db; } .figura-epp.modo-sub .off.z-ropa .ropa-pant { fill: #b7c0cc; }
.figura-epp.modo-sub .off.z-pies .p { fill: #8a929c; }
.figura-epp.modo-sub .on.pend .p { stroke: #e11e1d; stroke-width: 1.4; stroke-dasharray: 2.5 1.8; }
.sub-fila .sf-pend:not(.ok):empty, .sub-fila .sf-sin + .sf-pend { color: var(--suave); font-weight: 400; }
#filtro-cat { scroll-margin-top: 80px; } #mapa-epp { scroll-margin-top: 80px; }

/* ---------- v2.7: estilo «hero» oscuro (referencia del usuario) ---------- */
:root { --hero-1: #0f1722; --hero-2: #1b2635; --ambar: #f5b301; --ambar-osc: #d99a00; }
.titulo-oculto { display: none; }
.hero-epp { position: relative; display: grid; grid-template-columns: minmax(240px, 34%) 1fr; gap: 10px 40px; align-items: start;
            background: radial-gradient(120% 90% at 18% 30%, #2b3a4f 0%, var(--hero-2) 38%, var(--hero-1) 100%);
            color: #fff; border-radius: 16px; padding: 34px 40px 30px; margin: 0 0 22px; overflow: hidden;
            box-shadow: 0 10px 30px rgba(10, 18, 30, .25); scroll-margin-top: 80px; }
.hero-epp::after { content: ""; position: absolute; inset: 0; pointer-events: none;
                   background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 40%), repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 1px, transparent 1px 80px); }
.hero-figura { position: relative; z-index: 1; }
.hero-info { position: relative; z-index: 1; }
.hero-eyebrow { margin: 4px 0 6px; color: var(--ambar); font-size: .78rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.hero-titulo { margin: 0; font-size: 2.7rem; line-height: 1; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #fff; }
.hero-linea { display: block; width: 64px; height: 4px; border-radius: 2px; background: var(--ambar); margin: 16px 0 14px; }
.hero-sub { margin: 0 0 18px; color: #c9d3df; max-width: 560px; line-height: 1.5; }
.hero-sub strong { color: #fff; }
.hero-alerta, .hero-ok { display: inline-block; margin-left: 6px; padding: 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.hero-alerta { background: rgba(225,30,29,.18); color: #ff9d9b; } .hero-ok { background: rgba(46,160,90,.2); color: #8ee0ad; }
.hero-config { display: inline-block; margin-top: 14px; color: var(--ambar); font-size: .86rem; text-decoration: none; }
.hero-config:hover { text-decoration: underline; }

.cat-lista { display: grid; gap: 8px; }
.cat-fila { display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: left;
            background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 7px 14px 7px 8px;
            color: #fff; font: inherit; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.cat-fila:hover, .cat-fila.foco { background: rgba(245,179,1,.10); border-color: rgba(245,179,1,.55); }
.cat-fila.sel { background: var(--ambar); border-color: var(--ambar); color: #111; }
.cat-fila.sel small, .cat-fila.sel .cf-flecha { color: #3a2c00; } .cat-fila.sel .cf-ico { border-color: #111; color: #111; background: rgba(0,0,0,.06); }
.cf-ico { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ambar); color: var(--ambar);
          display: inline-flex; align-items: center; justify-content: center; background: rgba(245,179,1,.06); }
.cf-ico .ico-zona { width: 22px; height: 22px; }
.cf-txt strong { display: block; font-size: .84rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }
.cf-txt small { display: block; color: #9fb0c3; font-size: .8rem; margin-top: 1px; }
.cf-flecha { color: #7f90a5; font-size: 1.3rem; }
.cat-fila.estatica { cursor: default; }
.cat-fila.estatica:hover { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.cat-fila.estatica .cf-txt small { line-height: 1.4; }
.cf-estado { font-weight: 800; font-size: .8rem; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.cat-fila.ok .cf-estado { background: rgba(46,160,90,.22); color: #8ee0ad; }
.cat-fila.pend .cf-estado { background: rgba(225,30,29,.22); color: #ff9d9b; }
.cat-fila.pend .cf-ico { border-color: #e11e1d; color: #ff7a78; }

.hero-epp .mapa-lineas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; }
.hero-epp .mapa-lineas path { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 1; }
.hero-epp .mapa-lineas path.foco { stroke: var(--ambar); stroke-width: 1.8; }
.hero-epp .hero-figura, .hero-epp .hero-info { z-index: 1; }

/* figura: contenedor, foto y puntos */
.figura-caja { position: relative; margin: 0 auto; max-width: 300px; }
.figura-caja::before { content: ""; position: absolute; left: 8%; right: 8%; top: 4%; bottom: 0; border-radius: 50%;
                       background: radial-gradient(closest-side, rgba(245,179,1,.10), transparent); pointer-events: none; }
.figura-foto { display: block; width: 100%; height: auto; border-radius: 12px; position: relative;
               -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent); mask-image: linear-gradient(to bottom, #000 82%, transparent); }
.hero-epp .figura-epp { filter: drop-shadow(0 12px 18px rgba(0,0,0,.45)); position: relative; }
.punto-zona { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--ambar);
              border: 2px solid #fff; box-shadow: 0 0 0 3px rgba(245,179,1,.25); cursor: pointer; z-index: 2; transition: transform .15s, box-shadow .15s; }
.punto-zona.foco { transform: scale(1.35); box-shadow: 0 0 0 6px rgba(245,179,1,.35); }
.figura-caja:not(.con-foto) .punto-zona { opacity: 0; }
.figura-caja:not(.con-foto) .punto-zona.foco { opacity: 1; }
.modo-sub .punto-zona { cursor: default; opacity: 1 !important; width: 14px; height: 14px; margin: -7px 0 0 -7px; }
.modo-sub .punto-zona.ok { background: #2ea05a; box-shadow: 0 0 0 4px rgba(46,160,90,.3); }
.modo-sub .punto-zona.pend { background: #e11e1d; box-shadow: 0 0 0 4px rgba(225,30,29,.3); animation: latido 1.8s infinite; }
.figura-caja:not(.con-foto).modo-sub .punto-zona { display: none; }
@keyframes latido { 50% { box-shadow: 0 0 0 9px rgba(225,30,29,0); } }
/* ilustración sobre fondo oscuro: la parte no exigida en tono oscuro */
.hero-epp .figura-epp.modo-sub .off.z-ropa .ropa-cam { fill: #3a4656; } .hero-epp .figura-epp.modo-sub .off.z-ropa .ropa-pant { fill: #323d4b; }
.hero-epp .figura-epp.modo-sub .off.z-pies .p { fill: #4a5361; }
.hero-epp .figura-epp.enfoque .zona { opacity: .18; }
.hero-subarea .figura-caja { max-width: 230px; }

/* pantalla de calibración */
.config-figura { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.config-figura .panel { margin: 0; }
.calibrar { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 22px; align-items: start; }
.calibrar-foto { background: var(--hero-2); border-radius: 12px; padding: 14px; }
.calibrar-foto .figura-caja { cursor: crosshair; }
.calibrar-foto .punto-zona { opacity: 1 !important; }
.calibrar-foto.previa { max-width: 260px; }
.lista-calibrar { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lista-calibrar button { display: flex; align-items: center; gap: 10px; width: 100%; background: #fff; border: 1px solid var(--borde);
                         border-radius: 10px; padding: 6px 12px 6px 6px; font: inherit; cursor: pointer; text-align: left; }
.lista-calibrar button .cf-ico { width: 32px; height: 32px; color: var(--ambar-osc); border-color: var(--ambar); }
.lista-calibrar button .cf-ico .ico-zona { width: 18px; height: 18px; }
.lista-calibrar button.activo { border-color: var(--acento); box-shadow: 0 0 0 3px rgba(225,30,29,.15); font-weight: 700; }
.lista-calibrar button.listo::after { content: "✓"; margin-left: auto; color: var(--ok); font-weight: 800; }

/* inicio: árbol con el mismo estilo que Artículos */
.arbol-ger { gap: 12px; }
.ger-nodo { border: 1px solid var(--borde); box-shadow: none; border-radius: 10px; }
.ger-nodo > summary { background: #f1f4f8; padding: 12px 16px; position: relative; }
.ger-nodo > summary:hover { background: #e8edf4; }
.ger-nodo[open] > summary { border-bottom: 1px solid var(--borde); }
.ger-nombre { text-transform: uppercase; letter-spacing: .5px; font-size: 1.02rem; padding-left: 14px; position: relative; }
.ger-nombre::before { content: ""; position: absolute; left: 0; top: 2px; width: 5px; height: 20px; border-radius: 3px; background: var(--acento); }
.ger-nombre small { text-transform: none; letter-spacing: 0; }
.sub-lista { border-top: 0; padding: 8px 12px 10px 26px; position: relative; }
.sub-lista::before { content: ""; position: absolute; left: 22px; top: 0; bottom: 18px; border-left: 2px solid #e1e6ee; }
.sub-fila { position: relative; margin: 6px 0 0 14px; border: 0; border-radius: 8px; background: #f6f8fb; padding: 10px 14px; }
.sub-fila::before { content: ""; position: absolute; left: -18px; top: 50%; width: 14px; border-top: 2px solid #e1e6ee; }
.sub-fila:hover { background: #edf1f7; }
.sub-fila:last-child { border-bottom: 0; }
@media (max-width: 900px) {
  .hero-epp { grid-template-columns: 1fr; padding: 24px 20px; } .hero-titulo { font-size: 2rem; }
  .hero-epp .mapa-lineas { display: none; } .figura-caja { max-width: 220px; }
  .config-figura, .calibrar { grid-template-columns: 1fr; }
}
.hero-epp .figura-epp.enfoque .zona.foco { opacity: 1; filter: drop-shadow(0 0 6px rgba(245,179,1,.9)); }

/* ---------- v2.7b: el bloque «hero» con los colores originales de la app (claro) ---------- */
.hero-epp { background: var(--panel); color: var(--texto); box-shadow: var(--sombra); border-radius: var(--radio); }
.hero-epp::after { display: none; }
.hero-eyebrow { color: var(--acento-osc); }
.hero-titulo { color: var(--azul); font-size: 2.3rem; }
.hero-linea { background: var(--acento); }
.hero-sub { color: var(--suave); } .hero-sub strong { color: var(--texto); }
.hero-alerta { background: #fdeceb; color: var(--acento-osc); } .hero-ok { background: #e6f4ec; color: var(--ok); }
.hero-config { color: var(--azul); }
.cat-fila { background: #fff; border: 1px solid var(--borde); color: var(--texto); }
.cat-fila:hover, .cat-fila.foco { background: #fff7f7; border-color: var(--acento); }
.cat-fila.sel { background: var(--azul); border-color: var(--azul); color: #fff; }
.cat-fila.sel small, .cat-fila.sel .cf-flecha { color: #cfd8e6; }
.cat-fila.sel .cf-ico { border-color: #fff; color: #fff; background: rgba(255,255,255,.1); }
.cf-ico { border-color: var(--azul); color: var(--azul); background: #f1f4f8; }
.cf-txt strong { color: inherit; }
.cf-txt small { color: var(--suave); }
.cf-flecha { color: #b0b9c4; }
.cat-fila.estatica:hover { background: #fff; border-color: var(--borde); }
.cat-fila.ok .cf-estado { background: #e6f4ec; color: var(--ok); }
.cat-fila.pend .cf-estado { background: #fdeceb; color: var(--acento-osc); }
.cat-fila.pend .cf-ico { border-color: var(--acento); color: var(--acento-osc); background: #fff7f7; }
.hero-epp .mapa-lineas path { stroke: #c7cfd9; }
.hero-epp .mapa-lineas path.foco { stroke: var(--acento); }
.figura-caja::before { background: radial-gradient(closest-side, rgba(31,58,95,.06), transparent); }
.hero-epp .figura-epp { filter: none; }
.hero-epp .figura-epp.enfoque .zona { opacity: .22; }
.hero-epp .figura-epp.enfoque .zona.foco { opacity: 1; filter: drop-shadow(0 0 4px rgba(225,30,29,.75)); }
.hero-epp .figura-epp.modo-sub .off.z-ropa .ropa-cam { fill: #c9d1db; } .hero-epp .figura-epp.modo-sub .off.z-ropa .ropa-pant { fill: #b7c0cc; }
.hero-epp .figura-epp.modo-sub .off.z-pies .p { fill: #8a929c; }
.punto-zona { background: var(--acento); box-shadow: 0 0 0 3px rgba(225,30,29,.2); }
.punto-zona.foco { box-shadow: 0 0 0 6px rgba(225,30,29,.3); }
.calibrar-foto { background: #f1f4f8; }
.lista-calibrar button .cf-ico { color: var(--azul); border-color: var(--azul); }
/* subárea sin figura: una columna, categorías en dos columnas */
.hero-subarea { grid-template-columns: 1fr; padding: 28px 32px 26px; }
.hero-subarea .cat-lista { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
@media (max-width: 900px) { .hero-subarea .cat-lista { grid-template-columns: 1fr; } }
/* respaldo */
.respaldo-caja { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: #f1f4f8; border-radius: 10px; padding: 14px 18px; margin-bottom: 12px; }
.respaldo-caja p { margin: 4px 0 0; }
#zona-cert { margin-top: 4px; }

/* ---------- v2.8: ventana emergente para elegir artículos ---------- */
.paso-cabecera .derecha { margin-left: auto; align-self: center; }
.modal { width: min(1040px, 94vw); max-height: 88vh; padding: 0; border: 0; border-radius: 14px;
         box-shadow: 0 24px 60px rgba(10, 20, 35, .35); display: none; flex-direction: column; overflow: hidden; }
.modal[open] { display: flex; }
.modal::backdrop { background: rgba(15, 25, 40, .55); }
body.con-modal { overflow: hidden; }
.modal-cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 22px 10px; border-bottom: 1px solid var(--borde); }
.modal-cabecera h2 { margin: 0 0 2px; }
.modal-cabecera .nota { margin: 0; }
.modal-cerrar { background: none; border: 0; font-size: 1.2rem; color: var(--suave); cursor: pointer; border-radius: 8px; padding: 4px 9px; }
.modal-cerrar:hover { background: #eef1f5; color: var(--texto); }
.modal-pestanas { display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--borde); background: #fafbfc; }
.modal-pestanas button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 11px 14px; font: inherit; font-weight: 600; color: var(--suave); cursor: pointer; margin-bottom: -1px; }
.modal-pestanas button.activo { color: var(--azul); border-bottom-color: var(--acento); }
.modal-cuerpo { padding: 6px 22px 16px; overflow-y: auto; flex: 1; }
.modal-cuerpo .barra-a { position: sticky; top: 0; background: #fff; z-index: 2; padding: 10px 0; margin: 0 0 8px; }
.modal-pie { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--borde); background: #fafbfc; }
.modal-pie .derecha { margin-left: auto; }
.col-quitar { width: 40px; text-align: center; }
.boton-quitar { background: none; border: 1px solid transparent; color: #a3acb7; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: .9rem; }
.boton-quitar:hover { color: var(--peligro); border-color: #f1c4c0; background: #fdf1f0; }
.vacio-sub { text-align: center; padding: 26px 10px 14px; }
.vacio-sub p { color: var(--suave); margin: 0 0 14px; }
.vacio-sub .boton { margin: 0 4px; }
.modal [hidden] { display: none !important; }

/* ===== v4: aprobación (Vº Bº), actas y ficha técnica ===== */
.badge-nav { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px;
             background: var(--acento); color: #fff; font-size: .75rem; font-weight: 700; text-align: center; line-height: 20px; }
.chip-estado { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem;
               background: #eef1f5; color: var(--suave); border: 1px solid var(--borde); }
.chip-estado.revision { background: #fdeceb; color: var(--acento-osc); border-color: #f3b9b6; }
.chip-estado.vigente { background: #e6f4ec; color: var(--ok); border-color: #b5dcc6; }
.chip-estado.chico { padding: 1px 8px; font-size: .72rem; vertical-align: middle; margin-left: 6px; }
.chip-gris { display: inline-block; background: #eef1f5; color: var(--suave); border-radius: 999px; padding: 2px 8px; font-size: .78rem; }
.estado-vb { border-left: 4px solid var(--borde); }
.estado-vb.estado-revision { border-left-color: var(--acento); }
.estado-vb.estado-vigente { border-left-color: var(--ok); }
.ev-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.ev-cabecera > div:first-child { display: flex; gap: 12px; align-items: center; }
.ev-firmas { display: flex; gap: 12px; flex-wrap: wrap; }
.ev-firma { border: 1px solid var(--borde); border-radius: 8px; padding: 8px 12px; min-width: 190px; display: grid; gap: 1px; }
.ev-firma.ok { border-color: #b5dcc6; background: #f2faf5; }
.ev-firma small { font-size: .78rem; }
.ev-firma.ok small { color: var(--ok); font-weight: 600; }
.ev-rol { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--suave); }
.ev-acciones { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.ev-acciones .nota { margin: 0; max-width: 680px; }
.estado-vb .aviso { margin: 14px 0 0; }
.ev-decidir { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--borde); display: grid; gap: 10px; }
.ev-decidir h3 { margin: 0; font-size: 1rem; color: var(--azul); }
.ev-decidir .aviso { margin: 0; }
.ev-decidir textarea { width: 100%; box-sizing: border-box; }
.boton.peligro-texto { color: var(--peligro); }
.campo-motivo { display: grid; gap: 4px; flex: 1 1 100%; font-size: .85rem; color: var(--acento-osc); font-weight: 600; margin-bottom: 4px; }
.campo-motivo textarea { font-weight: 400; width: 100%; box-sizing: border-box; border-color: #f3b9b6; background: #fff7f7; }
.modal .campo-motivo { margin: 0 0 12px; }
.historial summary { cursor: pointer; display: flex; align-items: center; gap: 10px; list-style: none; }
.historial summary::-webkit-details-marker { display: none; }
.historial summary h2 { margin: 0; }
.historial h3 { font-size: .95rem; color: var(--azul); margin: 18px 0 8px; }
.lista-actas { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.lista-actas li { display: flex; gap: 10px; align-items: center; }
.linea-tiempo { list-style: none; margin: 18px 0 0; padding: 0 0 0 18px; border-left: 2px solid var(--borde); display: grid; gap: 12px; }
.linea-tiempo li { position: relative; }
.linea-tiempo li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 10px; height: 10px; border-radius: 50%;
                           background: var(--borde); border: 2px solid #fff; }
.linea-tiempo .lt-vb::before, .linea-tiempo .lt-vigente::before { background: var(--ok); }
.linea-tiempo .lt-rechazo::before { background: var(--peligro); }
.linea-tiempo .lt-envio::before, .linea-tiempo .lt-correccion::before, .linea-tiempo .lt-reinicio::before { background: var(--acento); }
.lt-det { white-space: pre-line; color: var(--suave); font-size: .9rem; margin-top: 2px; }
.lista-simple { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lista-simple .nota { margin-top: 2px; }
.lista-pend { display: grid; }
.fila-pend { grid-template-columns: 18px 1fr 70px 160px 80px 20px !important; text-decoration: none; color: inherit; }
.tabla-scroll { overflow-x: auto; }
.tabla-resp th:first-child { text-align: left; white-space: nowrap; }
.tabla-resp select { min-width: 150px; width: 100%; }
.tabla-resp .fila-prev { background: #f6f8fb; }
select.falta { border-color: #f3b9b6; background: #fff7f7; }
/* acta */
.acta .acta-sub { margin: 4px 0 0; color: var(--suave); }
.acta h2 { font-size: 1.05rem; color: var(--azul); margin: 22px 0 8px; }
.acta-reemplazada { background: #fbe9e7; color: var(--peligro); font-weight: 700; text-align: center; padding: 8px; border-radius: 6px; margin: 0 0 12px; }
.acta-datos { display: flex; gap: 32px; margin: 16px 0 0; flex-wrap: wrap; }
.acta-datos dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--suave); }
.acta-datos dd { margin: 0; font-weight: 600; }
.acta-tabla { width: 100%; font-size: .9rem; }
.acta-docs span { display: inline-block; font-size: .72rem; padding: 1px 6px; border-radius: 999px; margin: 1px; }
.acta-docs .si { background: #e6f4ec; color: var(--ok); }
.acta-docs .si::before { content: "✓ "; }
.acta-docs .no { background: #fbe9e7; color: var(--peligro); }
.acta-docs .no::before { content: "✕ "; }
.acta-faltan { margin-top: 14px; border: 1px solid #f3b9b6; background: #fff7f7; border-radius: 8px; padding: 10px 14px; font-size: .9rem; }
.acta-faltan ul { margin: 6px 0 0; }
.acta-correcciones { font-size: .9rem; }
.acta-correcciones ul { color: var(--suave); }
.acta-firmas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.acta-firma { border: 1px solid var(--borde); border-radius: 8px; padding: 12px 14px; display: grid; gap: 2px; font-size: .9rem; }
.acta-firma em { color: var(--suave); }
@media print { .acta-firma, .acta-tabla tr { break-inside: avoid; } }
@media (max-width: 760px) { .ev-firma { min-width: 0; flex: 1 1 100%; } .acta-firmas { grid-template-columns: 1fr; }
  .fila-pend { grid-template-columns: 18px 1fr 70px !important; } .fila-pend .nota { display: none; } }
.ev-nota { margin: 14px 0 0; }
.fila-pend { margin-left: 0 !important; margin-top: 6px; }
.fila-pend::before { display: none; }
/* v4.1: Artículos y modelos — título arriba, categorías compactas junto a la figura */
.hero-compacto { grid-template-columns: minmax(220px, 300px) 1fr; gap: 0 36px; }
.hero-compacto .hero-cab { grid-column: 1 / -1; margin-bottom: 18px; }
.hero-compacto .hero-sub { margin-bottom: 0; }
.hero-compacto .cat-lista { gap: 5px; }
.hero-compacto .cat-fila { grid-template-columns: 30px 1fr auto; gap: 10px; padding: 3px 12px 3px 5px; border-radius: 9px; }
.hero-compacto .cf-ico { width: 28px; height: 28px; border-width: 1.5px; }
.hero-compacto .cf-ico .ico-zona { width: 16px; height: 16px; }
.hero-compacto .cf-txt strong { font-size: .74rem; letter-spacing: .8px; }
.hero-compacto .cf-txt small { font-size: .72rem; margin-top: 0; line-height: 1.25; }
.hero-compacto .cf-flecha { font-size: 1rem; }
.hero-compacto .hero-config { margin-top: 10px; }
@media (max-width: 760px) { .hero-compacto { grid-template-columns: 1fr; } }
.logo-icono { display: block; width: 34px; height: 34px; border-radius: 8px; flex: none; }


/* =====================================================================
   REQUIERO · estilos nuevos
   ===================================================================== */
.logo-requiero { display: block; height: 30px; width: auto; }
.barra { gap: 16px; }
.barra nav { margin-left: auto; align-items: center; }
.barra nav a.activo { background: rgba(0,157,61,.28); }
.nombre-modulo { color: #cfd8e6; font-size: .9rem; border-left: 1px solid rgba(255,255,255,.2); padding-left: 14px; }
.cambio-modulo { position: relative; }
.cambio-modulo summary { list-style: none; cursor: pointer; color: #fff; font-size: .92rem; padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 8px; }
.cambio-modulo summary::-webkit-details-marker { display: none; }
.cambio-modulo summary::after { content: " ▾"; color: #9fb0c4; }
.cm-menu { position: absolute; top: 42px; left: 0; background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  min-width: 230px; padding: 6px; z-index: 30; }
.cm-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--texto); text-decoration: none; }
.cm-menu a:hover { background: #eef6f0; }
.cm-menu a.activo { background: #e3f3e8; color: var(--azul); font-weight: 600; }

/* selector de módulos */
.selector { max-width: 860px; margin: 40px auto; }
.selector-grilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.selector-tarjeta { background: var(--panel); border-radius: 14px; box-shadow: var(--sombra); padding: 24px; display: grid; gap: 8px;
  text-decoration: none; color: var(--texto); border: 2px solid transparent; transition: border-color .15s, transform .1s; }
.selector-tarjeta:hover { border-color: var(--verde); transform: translateY(-2px); }
.selector-tarjeta strong { font-size: 1.2rem; color: var(--azul); }
.st-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem;
  background: #e3f3e8; color: var(--verde); }
.mod-catalogo .st-ico { background: #fde8e8; color: var(--acento); }
.st-ir { color: var(--acento); font-weight: 600; margin-top: 6px; }

/* login (distribución de la app de compras) */
body.pagina-login { margin: 0; background: radial-gradient(ellipse 1300px 900px at 50% -10%, #16233a 0%, #0b0c10 55%); color: #f4f3f0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; min-height: 100vh; }
.login-split { display: flex; min-height: 100vh; }
.login-imagen { flex: 1 1 50%; position: relative; background-size: cover; background-position: left center; }
.login-imagen::before { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,8,12,.35) 0%, rgba(8,8,12,.75) 55%, rgba(8,8,12,.96) 100%); }
.login-imagen-contenido { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column;
  justify-content: center; padding: 4rem 3rem; max-width: 560px; }
.login-imagen-contenido h2 { font-size: 2.1rem; font-weight: 700; color: #fff; line-height: 1.25; margin: 0 0 1rem; }
.login-imagen-subt { color: rgba(255,255,255,.82); font-size: 1rem; line-height: 1.5; margin-bottom: 2.2rem; }
.beneficios-login { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.beneficios-login li { display: flex; align-items: center; gap: .65rem; color: #fff; font-weight: 500; }
.beneficios-login li::before { content: "✓"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--acento); color: #fff; font-size: .75rem; font-weight: 700; flex: none; }
.login-formulario { flex: 1 1 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; }
.login-tarjeta { background: #19191c; border: 1px solid #2c2a2c; border-radius: 12px; padding: 28px 26px; width: 100%; max-width: 400px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.login-marca { text-align: center; margin-bottom: 22px; }
.login-marca img { height: 46px; width: auto; }
.login-marca p { color: #9c9a97; font-size: .9rem; margin: 6px 0 0; }
.login-h1 { font-size: 1.15rem; margin: 0 0 8px; }
.login-form { display: grid; gap: 14px; }
.login-form label { display: grid; gap: 6px; color: #9c9a97; font-size: .85rem; }
.login-form input { background: #221f22; border: 1px solid #2c2a2c; color: #f4f3f0; padding: 10px 12px; }
.login-form input:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px rgba(225,30,29,.18); }
.boton-ingresar { width: 100%; padding: 12px; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px;
  box-shadow: 0 4px 14px rgba(225,30,29,.35); }
.login-olvido { margin-top: 16px; text-align: center; color: #9c9a97; font-size: .85rem; }
.login-olvido summary { cursor: pointer; text-decoration: underline; list-style: none; }
.login-olvido summary::-webkit-details-marker { display: none; }
.login-version { color: #6d6b68; font-size: .72rem; margin-top: 14px; }
.pagina-login .aviso-error { background: rgba(198,40,40,.18); color: #ffb4ab; }
.pagina-login .aviso-ok { background: rgba(0,157,61,.18); color: #9be3b4; }
.pagina-login .nota { color: #9c9a97; }
@media (max-width: 767px) { .login-imagen { display: none; } }

/* usuarios y permisos */
.panel-plegable > summary { cursor: pointer; list-style: none; }
.panel-plegable > summary h2 { display: inline; margin: 0; color: var(--azul); }
.panel-plegable > summary::-webkit-details-marker { display: none; }
.form-usuario-completo { display: grid; gap: 16px; margin-top: 16px; }
.form-usuario-completo label:not(.check) { display: grid; gap: 5px; font-weight: 600; font-size: .9rem; }
.permisos-grupos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.perm-grupo { border: 1px solid var(--borde); border-radius: 10px; padding: 10px 14px 12px; display: grid; gap: 10px; margin: 0; align-content: start; }
.perm-grupo legend { font-weight: 700; color: var(--azul); padding: 0 6px; }
.perm-grupo label.check { align-items: flex-start !important; }
.perm-grupo label.check input { margin-top: 3px; }
.perm-global { background: #f7faf8; }
.chips-permisos { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-perm { background: #eef1f5; border-radius: 999px; padding: 2px 10px; font-size: .8rem; color: var(--texto); }
.chip-perm.admin { background: var(--azul); color: #fff; }
.chip-perm.consulta { background: #fff4d6; color: #7a5a00; }
.fila-edicion td { padding-top: 0 !important; border-top: 0 !important; }
.editar-usuario > summary { display: none; }
.editar-usuario[open] { background: #fafbfc; border: 1px solid var(--borde); border-radius: 10px; padding: 4px 16px 12px; margin-bottom: 10px; }
.tabla-usuarios tr.inactivo td { opacity: .6; }

/* matriz: varios modelos por artículo, etiquetas y excepciones */
.tabla-multi .grupo-art { border-top: 2px solid var(--borde); }
.tabla-multi .cab-art td { background: #f7f9fb; padding-top: 10px; padding-bottom: 10px; }
.tabla-multi .cab-art.fila-pendiente td { background: #fff6f4; }
.acciones-art { display: inline-flex; gap: 10px; align-items: center; float: right; }
.campo-etiqueta { width: 130px; }
.campo-motivo-exc { display: block; margin-top: 6px; width: 100%; min-width: 220px; border-color: #e7b0ad; }
.campo-motivo-exc[hidden] { display: none; }
tr.fila-excepcion td { background: #fff8e6; }
.chip-etiqueta { display: inline-block; background: #e3f3e8; color: var(--azul); border-radius: 999px; padding: 2px 10px; font-size: .82rem; font-weight: 600; }
.chip-excepcion { display: inline-block; background: #fff1cc; color: #8a5a00; border: 1px solid #f0d27a; border-radius: 999px;
  padding: 1px 9px; font-size: .8rem; font-weight: 700; }
.celda-exc { color: #8a5a00; }
.matriz td > div + div { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--borde); }
.boton-quitar.chico { width: 26px; height: 26px; font-size: 1rem; }

.paso-cabecera .boton { white-space: nowrap; }
.fila-edicion:not(:has(details[open])) { display: none; }
