/* ============================================================
   assets/css/lv.css — Sistema visual único del ERP La Vasquita (rediseño 2026-10)
   Una sola hoja para todas las pantallas migradas. Prefijo lv- para no chocar
   con los estilos viejos (boutique.css) mientras conviven.
   Regla: el color significa algo. Marca solo en la acción principal;
   verde/ámbar/rojo/azul solo para estados; el resto, neutros.
   ============================================================ */

:root {
  /* Marca */
  --lv-espresso: #211A13;      /* menú lateral y cabeceras oscuras */
  --lv-espresso-2: #3A2E22;    /* elemento activo del menú */
  --lv-marca: #7A5A3A;         /* acción principal */
  --lv-marca-h: #634A2F;       /* acción principal al pasar */
  --lv-marca-txt: #6E5235;     /* enlaces y acentos de texto */
  --lv-crema: #F5EFE7;
  /* Neutros */
  --lv-fondo: #FAF8F5;
  --lv-superficie: #FFFFFF;
  --lv-suave: #F6F2EC;         /* cabeceras de grupo en tablas */
  --lv-linea: #E5DED4;
  --lv-linea-2: #EFEAE2;       /* separadores internos */
  --lv-borde-campo: #D6CDC1;
  --lv-texto: #1F1A14;
  --lv-texto-2: #5E554B;       /* secundario (AA sobre blanco) */
  --lv-texto-3: #9A8F82;       /* solo iconos y decoración */
  /* Estados */
  --lv-ok: #2B5F33;    --lv-ok-bg: #E6F0E4;    --lv-ok-borde: #C9DAC4;
  --lv-pend: #7F4A08;  --lv-pend-bg: #FBEFD9;  --lv-pend-borde: #EED6AA;
  --lv-error: #8E2124; --lv-error-bg: #F8E3E1; --lv-error-borde: #EBC9C5;
  --lv-info: #284B73;  --lv-info-bg: #E3EAF3;  --lv-info-borde: #C7D5E6;
  --lv-neutro: #4D453C; --lv-neutro-bg: #EFEBE5;
  /* Forma */
  --lv-radio: 8px;
  --lv-radio-pill: 999px;
  --lv-sombra: 0 1px 2px rgba(33, 26, 19, 0.04);
  --lv-fuente: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --lv-fuente-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --lv-fuente-marca: 'Cinzel', Georgia, serif;
  --lv-menu-ancho: 248px;
}

/* ---------- Base ---------- */
body.lv { margin: 0; background: var(--lv-fondo); color: var(--lv-texto); font-family: var(--lv-fuente); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body.lv *, body.lv *::before, body.lv *::after { box-sizing: border-box; }
body.lv a { color: var(--lv-marca-txt); }
body.lv a:hover { color: var(--lv-espresso); }
body.lv h1, body.lv h2, body.lv h3 { font-family: var(--lv-fuente); color: var(--lv-texto); margin: 0; line-height: 1.25; }
body.lv h1 { font-size: 22px; font-weight: 600; }
body.lv h2 { font-size: 16px; font-weight: 600; }
body.lv h3 { font-size: 14px; font-weight: 600; }
.lv-num { font-variant-numeric: tabular-nums; }
.lv-mono { font-family: var(--lv-fuente-mono); font-size: 12px; color: var(--lv-texto-2); }
.lv-muted { color: var(--lv-texto-2); }
.lv-i { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.lv-oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:where(body.lv) :focus-visible { outline: 2px solid var(--lv-marca); outline-offset: 2px; }

/* ---------- Estructura: menú lateral + contenido ---------- */
.lv-app { display: flex; min-height: 100vh; }
.lv-side { width: var(--lv-menu-ancho); flex-shrink: 0; background: var(--lv-espresso); color: #E9E1D6; display: flex; flex-direction: column; gap: 20px; padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.lv-marca { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; text-decoration: none; }
.lv-marca b { font-family: var(--lv-fuente-marca); font-weight: 600; letter-spacing: 0.16em; font-size: 16px; color: var(--lv-crema); }
.lv-marca span { font-size: 12px; color: #B7AA98; }
.lv-grupo { display: flex; flex-direction: column; gap: 2px; }
.lv-grupo-t { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #9C8F7E; padding: 0 12px 4px; }
body.lv .lv-side a.lv-item { display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 6px 12px; border-radius: 6px; color: #E9E1D6; text-decoration: none; font-size: 14px; }
body.lv .lv-side a.lv-item:hover { background: #2C2319; color: #FFFFFF; }
body.lv .lv-side a.lv-item.is-activo { background: var(--lv-espresso-2); color: #FFFFFF; font-weight: 600; }
.lv-item .lv-item-t { flex: 1; }
.lv-cuenta { margin-top: auto; border-top: 1px solid var(--lv-espresso-2); padding: 14px 8px 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lv-cuenta b { font-size: 14px; font-weight: 600; color: var(--lv-crema); }
body.lv .lv-cuenta a { font-size: 13px; color: #B7AA98; text-decoration: none; }
body.lv .lv-cuenta a:hover { color: #FFFFFF; }

.lv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lv-top { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 40px; border-bottom: 1px solid var(--lv-linea); background: var(--lv-superficie); }
.lv-top-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lv-top-sub { font-size: 13px; color: var(--lv-texto-2); }
.lv-top-acc { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lv-cont { padding: 28px 40px 40px; display: flex; flex-direction: column; gap: 24px; }
.lv-volver { font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.lv-migas { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lv-migas .lv-volver + .lv-volver:not([hidden])::before { content: '·'; color: var(--lv-texto-3); margin-right: 6px; }
.lv-migas .lv-volver[hidden] + .lv-volver::before { content: none; }

/* Barra superior del móvil (el menú lateral se pliega) */
.lv-movil { display: none; }

/* ---------- Tarjetas y secciones ---------- */
.lv-card { background: var(--lv-superficie); border: 1px solid var(--lv-linea); border-radius: var(--lv-radio); box-shadow: var(--lv-sombra); }
.lv-card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--lv-linea-2); }
.lv-card-b { padding: 16px 20px; }
.lv-card-p { padding: 12px 20px; border-top: 1px solid var(--lv-linea-2); font-size: 13px; color: var(--lv-texto-2); }
.lv-grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.lv-grid-2-igual { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.lv-pila { display: flex; flex-direction: column; gap: 24px; }

/* Cifras del día */
.lv-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
body.lv a.lv-kpi, .lv-kpi { background: var(--lv-superficie); border: 1px solid var(--lv-linea); border-radius: var(--lv-radio); padding: 18px 20px; text-decoration: none; color: var(--lv-texto); display: flex; flex-direction: column; gap: 4px; }
body.lv a.lv-kpi:hover { border-color: var(--lv-borde-campo); }
.lv-kpi-t { font-size: 13px; color: var(--lv-texto-2); font-weight: 500; }
.lv-kpi-n { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.lv-kpi-a { font-size: 13px; font-weight: 600; color: var(--lv-marca-txt); }
.lv-kpi--error { border-color: var(--lv-error-borde); }
.lv-kpi--error .lv-kpi-t, .lv-kpi--error .lv-kpi-n { color: var(--lv-error); }
.lv-kpi--pend { border-color: var(--lv-pend-borde); }
.lv-kpi--ok { border-color: var(--lv-ok-borde); }
.lv-kpi--ok .lv-kpi-n { color: var(--lv-ok); }
.lv-tabla-caja { position: relative; }

/* Listas de filas (tareas, accesos) */
.lv-filas > * { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--lv-linea-2); text-decoration: none; color: var(--lv-texto); }
.lv-filas > *:first-child { border-top: 0; }
body.lv .lv-filas > a:hover { background: var(--lv-fondo); }
.lv-fila-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lv-fila-t b { font-size: 14px; font-weight: 600; }
.lv-fila-t span { font-size: 13px; color: var(--lv-texto-2); }

/* Accesos rápidos (botones con icono) */
.lv-accesos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
body.lv a.lv-acceso, .lv-acceso { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--lv-linea); border-radius: var(--lv-radio); background: var(--lv-superficie); text-decoration: none; color: var(--lv-texto); font-size: 14px; font-weight: 500; }
body.lv a.lv-acceso:hover { border-color: var(--lv-borde-campo); background: var(--lv-fondo); }
.lv-acceso .lv-i { color: var(--lv-marca-txt); }
.lv-acceso .lv-badge { margin-left: auto; }

/* Módulos (hub y paneles): tarjeta con icono, título, descripción y cifra */
.lv-modulos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
body.lv a.lv-modulo, .lv-modulo { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--lv-superficie); border: 1px solid var(--lv-linea); border-radius: var(--lv-radio); text-decoration: none; color: var(--lv-texto); min-height: 96px; }
body.lv a.lv-modulo:hover { border-color: var(--lv-borde-campo); box-shadow: 0 2px 8px rgba(33, 26, 19, 0.06); }
.lv-modulo-ico { width: 40px; height: 40px; border-radius: 8px; background: var(--lv-suave); color: var(--lv-marca-txt); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lv-modulo--prin .lv-modulo-ico { background: var(--lv-marca); color: #FFFFFF; }
.lv-modulo-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lv-modulo-t b { font-size: 15px; font-weight: 600; }
.lv-modulo-t span { font-size: 13px; color: var(--lv-texto-2); line-height: 1.45; }
.lv-modulo-t .lv-modulo-dato { color: var(--lv-texto); font-weight: 600; }
.lv-modulo-t .lv-modulo-dato--error { color: var(--lv-error); font-weight: 600; }
.lv-modulo .lv-badge { position: absolute; top: 14px; right: 14px; }
.lv-modulo--prin { border-color: var(--lv-marca); }

/* ---------- Tablas ---------- */
.lv-tabla-caja { overflow-x: auto; }
.lv-tabla { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.lv-tabla th { text-align: left; font-size: 12px; font-weight: 600; color: var(--lv-texto-2); text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 16px; border-bottom: 1px solid var(--lv-linea); white-space: nowrap; }
.lv-tabla td { padding: 11px 16px; border-top: 1px solid var(--lv-linea-2); vertical-align: middle; }
.lv-tabla tr:first-child td { border-top: 0; }
.lv-tabla .lv-tr-grupo td { background: var(--lv-suave); font-size: 13px; font-weight: 600; color: var(--lv-neutro); }
.lv-tabla .lv-der { text-align: right; }
.lv-tabla tfoot td { background: var(--lv-suave); font-weight: 700; border-top: 1px solid var(--lv-linea); }

/* ---------- Etiquetas de estado ---------- */
.lv-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; line-height: 1.4; padding: 2px 10px; border-radius: var(--lv-radio-pill); white-space: nowrap; background: var(--lv-neutro-bg); color: var(--lv-neutro); }
.lv-badge--ok { background: var(--lv-ok-bg); color: var(--lv-ok); }
.lv-badge--pend { background: var(--lv-pend-bg); color: var(--lv-pend); }
.lv-badge--error { background: var(--lv-error-bg); color: var(--lv-error); }
.lv-badge--info { background: var(--lv-info-bg); color: var(--lv-info); }
.lv-cuenta-n { font-size: 12px; font-weight: 700; background: #C98A3C; color: var(--lv-espresso); border-radius: var(--lv-radio-pill); padding: 1px 8px; line-height: 1.4; }
.lv-cuenta-n--error { background: #A3262A; color: #FFFFFF; }

/* ---------- Botones ---------- */
body.lv .lv-btn, .lv-btn { font-family: inherit; font-size: 15px; font-weight: 600; min-height: 44px; padding: 0 20px; border-radius: var(--lv-radio); border: 1px solid var(--lv-borde-campo); background: var(--lv-superficie); color: var(--lv-texto); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer; line-height: 1.2; }
body.lv .lv-btn:hover { background: var(--lv-fondo); color: var(--lv-texto); }
body.lv .lv-btn--prim, .lv-btn--prim { background: var(--lv-marca); border-color: var(--lv-marca); color: #FFFFFF; }
body.lv .lv-btn--prim:hover { background: var(--lv-marca-h); border-color: var(--lv-marca-h); color: #FFFFFF; }
body.lv .lv-btn--ghost { background: transparent; border-color: transparent; color: var(--lv-marca-txt); padding: 0 12px; }
body.lv .lv-btn--peligro { color: var(--lv-error); border-color: #D9A6A2; }
body.lv .lv-btn--peligro:hover { background: var(--lv-error-bg); color: var(--lv-error); }
body.lv .lv-btn--sm { font-size: 13px; min-height: 34px; padding: 0 14px; }
body.lv .lv-btn[disabled], body.lv .lv-btn.is-off { opacity: 0.5; cursor: not-allowed; }
.lv-btn-icono { width: 40px; min-height: 40px; height: 40px; padding: 0; position: relative; }
.lv-btn-icono .lv-cuenta-n { position: absolute; top: -6px; right: -6px; }

/* ---------- Campos ---------- */
.lv-campo { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--lv-neutro); }
body.lv .lv-input, body.lv .lv-select, body.lv .lv-textarea { font-family: inherit; font-size: 15px; min-height: 44px; padding: 0 12px; border: 1px solid var(--lv-borde-campo); border-radius: var(--lv-radio); background: var(--lv-superficie); color: var(--lv-texto); width: 100%; font-variant-numeric: tabular-nums; }
body.lv .lv-textarea { padding: 10px 12px; min-height: 88px; line-height: 1.5; }
body.lv .lv-input:focus, body.lv .lv-select:focus, body.lv .lv-textarea:focus { border-color: var(--lv-marca); outline: 2px solid rgba(122, 90, 58, 0.18); outline-offset: 0; }
.lv-buscar { display: flex; align-items: center; gap: 8px; min-height: 40px; border: 1px solid var(--lv-borde-campo); border-radius: var(--lv-radio); padding: 0 12px; background: var(--lv-superficie); color: var(--lv-texto-2); min-width: 260px; }
.lv-buscar input { border: 0; outline: 0; font: inherit; font-size: 14px; flex: 1; background: transparent; color: var(--lv-texto); min-width: 0; }
.lv-segmento { display: inline-flex; border: 1px solid var(--lv-borde-campo); border-radius: var(--lv-radio); overflow: hidden; background: var(--lv-superficie); }
.lv-segmento > * { font: inherit; font-size: 14px; min-height: 38px; padding: 0 16px; border: 0; background: transparent; color: var(--lv-texto); text-decoration: none; display: inline-flex; align-items: center; cursor: pointer; }
.lv-segmento > .is-activo { background: var(--lv-espresso); color: #FFFFFF; font-weight: 600; }

/* ---------- Avisos ---------- */
.lv-aviso { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--lv-radio); border: 1px solid var(--lv-linea); background: var(--lv-superficie); font-size: 14px; line-height: 1.5; }
.lv-aviso .lv-i { margin-top: 1px; }
.lv-aviso--ok { background: var(--lv-ok-bg); border-color: var(--lv-ok-borde); color: #1F4626; }
.lv-aviso--pend { background: var(--lv-pend-bg); border-color: var(--lv-pend-borde); color: #5C3606; }
.lv-aviso--error { background: var(--lv-error-bg); border-color: var(--lv-error-borde); color: #6E181B; }
.lv-aviso--info { background: var(--lv-info-bg); border-color: var(--lv-info-borde); color: #1F3B5C; }

/* ---------- Componentes de pantallas de trabajo (fase 1+) ---------- */
/* Pestañas (enlaces o botones). Activa con .is-activo (o .active, que usan los JS viejos) */
.lv-pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--lv-linea); overflow-x: auto; }
.lv-pestanas > * { font: inherit; font-size: 14px; font-weight: 500; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--lv-texto-2); text-decoration: none; white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
body.lv .lv-pestanas > a { color: var(--lv-texto-2); }
.lv-pestanas > *:hover { color: var(--lv-texto); }
body.lv .lv-pestanas > .is-activo, body.lv .lv-pestanas > .active { color: var(--lv-texto); border-bottom-color: var(--lv-marca); font-weight: 600; }

/* Barra de filtros: campos en fila que bajan de línea */
.lv-filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.lv-filtros .lv-campo { min-width: 160px; }
.lv-filtros .lv-input, .lv-filtros .lv-select { min-height: 40px; }
/* Rejilla de formulario */
.lv-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.lv-form .lv-ancho { grid-column: 1 / -1; }
.lv-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lv-ayuda { font-size: 12px; font-weight: 400; color: var(--lv-texto-2); }
/* Casilla / opción con texto */
.lv-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--lv-texto); cursor: pointer; min-height: 32px; }
.lv-check input { width: 18px; height: 18px; accent-color: var(--lv-marca); margin: 0; }
/* Campo numérico corto (cantidades en tablas) */
body.lv .lv-input--num { width: 96px; text-align: right; min-height: 38px; padding: 0 8px; }
body.lv .lv-input--sm, body.lv .lv-select--sm { min-height: 34px; font-size: 14px; padding: 0 8px; }

/* Estado vacío */
.lv-vacio { padding: 32px 20px; text-align: center; color: var(--lv-texto-2); font-size: 14px; }
/* Lista clave → valor */
.lv-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; font-size: 14px; }
.lv-dl dt { color: var(--lv-texto-2); font-weight: 500; }
.lv-dl dd { margin: 0; font-weight: 500; }
/* Barra de progreso */
.lv-progreso { height: 8px; background: var(--lv-linea-2); border-radius: var(--lv-radio-pill); overflow: hidden; }
.lv-progreso > span { display: block; height: 100%; background: var(--lv-marca); border-radius: inherit; }
.lv-progreso--ok > span { background: var(--lv-ok); }
/* Paginación */
.lv-paginacion { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.lv-paginacion > * { min-width: 36px; min-height: 36px; padding: 0 10px; border: 1px solid var(--lv-linea); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; background: var(--lv-superficie); }
.lv-paginacion > .is-activo { background: var(--lv-espresso); border-color: var(--lv-espresso); color: #FFFFFF; font-weight: 600; }
/* Etiqueta neutra pequeña (categorías, códigos) */
.lv-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 4px; background: var(--lv-neutro-bg); color: var(--lv-neutro); white-space: nowrap; }
/* Separador */
.lv-sep { border: 0; border-top: 1px solid var(--lv-linea-2); margin: 8px 0; }

/* Tablas: variantes */
.lv-tabla--compacta th, .lv-tabla--compacta td { padding: 7px 10px; font-size: 13px; }
.lv-tabla-caja--alta { max-height: 70vh; overflow: auto; }
.lv-tabla-caja--alta .lv-tabla th { position: sticky; top: 0; background: var(--lv-superficie); z-index: 1; }
.lv-tabla tr.is-alerta td { background: var(--lv-error-bg); }
.lv-tabla tr.is-pend td { background: var(--lv-pend-bg); }
.lv-tabla tr.is-ok td { background: var(--lv-ok-bg); }
.lv-tabla tr.is-apagado td { color: var(--lv-texto-3); }
body.lv .lv-tabla tbody tr:hover td { background-color: rgba(122, 90, 58, 0.035); }
.lv-tabla .lv-centro { text-align: center; }

/* Ventana modal. Visible con .is-abierto (o .show/.active/.open, que usan los JS viejos), o con style.display='block'/'flex' */
.lv-modal { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(33, 26, 19, 0.45); padding: 16px; overflow-y: auto; }
.lv-modal.is-abierto, .lv-modal.show, .lv-modal.active, .lv-modal.open { display: flex; }
.lv-modal-caja { background: var(--lv-superficie); border-radius: 10px; box-shadow: 0 12px 40px rgba(33, 26, 19, 0.25); width: 100%; max-width: 560px; margin: 8vh auto auto; display: flex; flex-direction: column; max-height: 84vh; }
.lv-modal-caja--ancha { max-width: 900px; }
.lv-modal-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--lv-linea-2); }
.lv-modal-b { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.lv-modal-pie { padding: 12px 20px; border-top: 1px solid var(--lv-linea-2); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* Plegable (details) */
.lv-plegable > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; font-weight: 600; }
.lv-plegable > summary::-webkit-details-marker { display: none; }
.lv-plegable > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--lv-texto-2); border-bottom: 2px solid var(--lv-texto-2); transform: rotate(45deg); transition: transform .15s; flex-shrink: 0; }
.lv-plegable[open] > summary::after { transform: rotate(-135deg); }

/* Selector de archivos (input file): botón con el estilo lv y zona más ancha.
   En las fichas de empleado (.em-docs / .rhs-docs) el parcial común fija max-width:150px en línea: se anula aquí. */
body.lv input[type=file] { font-family: var(--lv-fuente); color: var(--lv-texto-2); }
body.lv input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: 13px; margin-right: 10px; padding: 7px 14px; border: 1px solid var(--lv-borde-campo); border-radius: 6px; background: var(--lv-superficie); color: var(--lv-texto); cursor: pointer; }
body.lv input[type=file]::file-selector-button:hover { border-color: var(--lv-marca); background: var(--lv-fondo); }
body.lv :is(.em-docs, .rhs-docs) input[type=file] { font-size: 13px !important; max-width: none !important; width: 340px; padding: 4px; border: 1px dashed var(--lv-borde-campo); border-radius: 8px; background: var(--lv-fondo); cursor: pointer; vertical-align: middle; }
body.lv :is(.em-docs, .rhs-docs) input[type=file]:hover { border-color: var(--lv-marca); }
body.lv :is(.em-docs, .rhs-docs) form .btn-primary { padding: 7px 22px !important; font-size: 13px !important; min-width: 110px; justify-content: center; }
body.lv :is(.em-docs, .rhs-docs) form { gap: 8px; }

/* ---------- Móvil y tableta ---------- */
@media (max-width: 900px) {
  .lv-app { flex-direction: column; }
  .lv-side { display: none; }
  .lv-movil { display: block; background: var(--lv-espresso); color: var(--lv-crema); position: sticky; top: 0; z-index: 50; }
  .lv-movil-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; }
  .lv-movil-bar .lv-marca { padding: 0; }
  .lv-movil summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid #4A3C2E; border-radius: var(--lv-radio); font-size: 14px; font-weight: 600; }
  .lv-movil summary::-webkit-details-marker { display: none; }
  .lv-movil-menu { padding: 4px 12px 16px; display: flex; flex-direction: column; gap: 14px; max-height: 75vh; overflow-y: auto; }
  body.lv .lv-movil-menu a.lv-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 12px; border-radius: 6px; color: #E9E1D6; text-decoration: none; font-size: 15px; }
  body.lv .lv-movil-menu a.lv-item.is-activo { background: var(--lv-espresso-2); color: #FFFFFF; font-weight: 600; }
  .lv-top { padding: 14px 16px; min-height: 0; }
  .lv-cont { padding: 16px 16px 32px; gap: 16px; }
  .lv-grid-2, .lv-grid-2-igual { grid-template-columns: minmax(0, 1fr); }
  .lv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lv-kpi-n { font-size: 24px; }
  .lv-buscar { min-width: 0; width: 100%; }
  .lv-filas > * { padding: 12px 16px; }
  .lv-filtros .lv-campo { min-width: 0; flex: 1 1 140px; }
  .lv-form { grid-template-columns: minmax(0, 1fr); }
  .lv-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lv-dl dd { margin-bottom: 8px; }
  .lv-modal-caja { margin-top: 4vh; max-height: 92vh; }
  .lv-tabla th, .lv-tabla td { padding-left: 10px; padding-right: 10px; }
  body.lv :is(.em-docs, .rhs-docs) input[type=file] { width: 100%; }
}

/* ---------- Impresión ---------- */
@media print {
  .lv-side, .lv-movil, .lv-top-acc { display: none !important; }
  body.lv { background: #FFFFFF; }
  .lv-cont { padding: 0; }
  .lv-card { box-shadow: none; }
}
