﻿/* ==========================================================================
   Nazan ERP · hoja de estilos
   Tokens → base → layout → componentes → páginas → impresión
   ========================================================================== */

:root {
    --fondo: #ECEDEF;
    --panel: #F6F6F7;
    --tarjeta: #F9F9FA;
    --superficie: #FFFFFF;
    --hover: #F6F6F9;
    --borde: #E5E5E9;
    --borde-suave: #EDEDF0;
    --texto: #18181B;
    --texto-2: #3F3F46;
    --suave: #71717A;
    --tenue: #A1A1AA;
    --acento: #5B5FE0;
    --acento-hover: #4C50D4;
    --acento-suave: #EEEFFD;
    --acento-texto: #4F46E5;
    --barra-gris: #E4E4E7;
    --verde: #16A34A;
    --verde-fondo: #ECFDF3;
    --verde-borde: #BBF7D0;
    --rojo: #DC2626;
    --rojo-fondo: #FEF2F2;
    --rojo-borde: #FECACA;
    --ambar: #B45309;
    --ambar-fondo: #FFFBEB;
    --ambar-borde: #FDE68A;
    --azul: #2563EB;
    --azul-fondo: #EFF6FF;
    --azul-borde: #BFDBFE;
    --indigo-fondo: #EEF2FF;
    --indigo-borde: #C7D2FE;
    --sombra: 0 1px 2px rgba(24, 24, 27, .05);
    --sombra-alta: 0 12px 32px -8px rgba(24, 24, 27, .18), 0 2px 6px rgba(24, 24, 27, .06);
    --radio: 14px;
    --radio-int: 11px;
    --radio-ctl: 9px;
    --fuente: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: light;
}

[data-tema="oscuro"] {
    --fondo: #0C0D10;
    --panel: #141519;
    --tarjeta: #18191E;
    --superficie: #1F2026;
    --hover: #26272E;
    --borde: #2A2B33;
    --borde-suave: #26272E;
    --texto: #ECECEF;
    --texto-2: #C9C9D1;
    --suave: #9A9AA6;
    --tenue: #6B6B76;
    --acento: #6E72F0;
    --acento-hover: #8084F5;
    --acento-suave: #25264A;
    --acento-texto: #A5A8FF;
    --barra-gris: #34353E;
    --verde: #4ADE80;
    --verde-fondo: rgba(34, 197, 94, .12);
    --verde-borde: rgba(34, 197, 94, .3);
    --rojo: #F87171;
    --rojo-fondo: rgba(239, 68, 68, .12);
    --rojo-borde: rgba(239, 68, 68, .3);
    --ambar: #FBBF24;
    --ambar-fondo: rgba(245, 158, 11, .12);
    --ambar-borde: rgba(245, 158, 11, .3);
    --azul: #60A5FA;
    --azul-fondo: rgba(59, 130, 246, .12);
    --azul-borde: rgba(59, 130, 246, .3);
    --indigo-fondo: rgba(99, 102, 241, .14);
    --indigo-borde: rgba(99, 102, 241, .35);
    --sombra: 0 1px 2px rgba(0, 0, 0, .4);
    --sombra-alta: 0 16px 40px -8px rgba(0, 0, 0, .6);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: var(--fuente);
    font-size: 14px;
    line-height: 1.45;
    color: var(--texto);
    background: var(--fondo);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 21px; }
h1:focus { outline: none; }
p { margin: 0; }
table { border-collapse: collapse; }
kbd { font-family: var(--fuente); }
.icono { flex-shrink: 0; }
.texto-suave { color: var(--suave); }
.texto-tenue { color: var(--tenue); }
.negativo { color: var(--rojo) !important; }
.positivo { color: var(--verde) !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.fuerte { font-weight: 600; }
.relleno { padding: 14px 16px; }
.oculto { display: none !important; }
.mt { margin-top: 12px; }
.mt-l { margin-top: 18px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-entre { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.crece { flex: 1; min-width: 0; }
.cargando { padding: 40px; text-align: center; color: var(--suave); }

/* ---------- Layout ---------- */
.app {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    min-height: 100vh;
}
.app-principal { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.app-velo { display: none; }
.contenido {
    flex: 1;
    background: var(--panel);
    border: 1px solid var(--borde);
    border-radius: 16px;
    padding: 20px 20px 28px;
    min-width: 0;
}

/* Barra lateral */
.lateral {
    position: sticky;
    top: 10px;
    height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--borde);
    border-radius: 16px;
    padding: 14px 10px 10px;
    overflow-y: auto;
}
.lateral-marca { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 8px; }
.marca { display: flex; align-items: center; gap: 10px; }
.marca-logo {
    width: 30px; height: 30px; border-radius: 8px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #7477F0, var(--acento));
    color: #fff; font-weight: 700; font-size: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 6px rgba(91, 95, 224, .35);
}
.marca-nombre { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.lateral-seccion {
    margin: 16px 10px 6px;
    font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
    color: var(--suave);
}
.lateral-nav { display: flex; flex-direction: column; gap: 2px; }
.menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; border-radius: 9px;
    color: var(--texto-2); font-size: 13.5px;
    border: 1px solid transparent; background: none; cursor: pointer; text-align: left; width: 100%;
    transition: background .15s, color .15s;
}
.menu-item:hover { background: var(--hover); color: var(--texto); }
.menu-item.activo {
    background: var(--superficie); color: var(--texto); font-weight: 500;
    border-color: var(--borde-suave); box-shadow: var(--sombra);
}
.menu-item.activo .icono { color: var(--acento); }
.menu-texto { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-contador {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    background: var(--rojo-fondo); color: var(--rojo); border: 1px solid var(--rojo-borde);
    font-size: 11px; font-weight: 600; display: grid; place-items: center;
}
.menu-tema { color: var(--suave); display: grid; place-items: center; }
.lateral-promo {
    margin-top: auto;
    background: var(--superficie);
    border: 1px solid var(--borde-suave);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}
.lateral-promo h4 { font-size: 16px; margin: 6px 0 4px; }
.lateral-promo p { font-size: 12.5px; color: var(--suave); margin-bottom: 12px; }
.promo-etiqueta {
    display: inline-block; font-size: 11px; font-weight: 600; color: var(--acento-texto);
    background: var(--acento-suave); padding: 2px 8px; border-radius: 99px;
}
.app.compacta { grid-template-columns: 68px minmax(0, 1fr); }
.app.compacta .marca-nombre, .app.compacta .menu-texto, .app.compacta .lateral-seccion,
.app.compacta .lateral-promo, .app.compacta .menu-tema, .app.compacta .menu-contador { display: none; }
.app.compacta .lateral-marca { flex-direction: column; gap: 8px; }
.app.compacta .menu-item { justify-content: center; padding: 9px; }

/* Barra superior */
.superior {
    display: flex; align-items: center; gap: 10px;
    background: var(--panel);
    border: 1px solid var(--borde);
    border-radius: 16px;
    padding: 8px 10px;
    position: relative;
    z-index: 20;
}
.buscador {
    display: flex; align-items: center; gap: 8px;
    width: min(320px, 100%);
    height: 38px; padding: 0 8px 0 12px;
    background: var(--superficie); border: 1px solid var(--borde); border-radius: 10px;
    color: var(--suave);
}
.buscador:focus-within { border-color: var(--acento); box-shadow: 0 0 0 3px rgba(91, 95, 224, .15); }
.buscador input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--texto); }
.buscador input::-webkit-search-cancel-button { display: none; }
.buscador kbd {
    font-size: 11px; color: var(--suave); border: 1px solid var(--borde); border-radius: 6px;
    padding: 1px 6px; background: var(--panel);
}
.superior-acciones { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.campana { position: relative; }
.campana-punto {
    position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%;
    background: var(--rojo); box-shadow: 0 0 0 2px var(--superficie);
}
.usuario {
    display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer;
    padding: 3px 6px 3px 3px; border-radius: 12px; color: var(--suave);
}
.usuario:hover { background: var(--hover); }
.usuario-textos { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.usuario-textos strong { font-size: 13.5px; font-weight: 500; color: var(--texto); }
.usuario-textos small { font-size: 12px; color: var(--suave); }

/* Desplegables */
.desplegable { position: relative; }
.desplegable-velo { position: fixed; inset: 0; z-index: 30; }
.desplegable-panel {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 31;
    min-width: 230px; background: var(--superficie);
    border: 1px solid var(--borde); border-radius: 12px; box-shadow: var(--sombra-alta);
    padding: 6px; animation: aparecer .12s ease-out;
}
.desplegable-panel.ancho { width: 340px; }
.desplegable-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 10px; border-bottom: 1px solid var(--borde-suave); margin-bottom: 4px; }
.desplegable-opcion {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px;
    background: none; border: 0; cursor: pointer; font-size: 13.5px; color: var(--texto-2); text-align: left;
}
.desplegable-opcion:hover { background: var(--hover); color: var(--texto); }
.desplegable-pie { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 9px; font-size: 13px; color: var(--acento-texto); font-weight: 500; border-top: 1px solid var(--borde-suave); margin-top: 4px; }
.aviso-item { display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.aviso-item:hover { background: var(--hover); }
.aviso-icono { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--rojo-fondo); color: var(--rojo); flex-shrink: 0; }
.aviso-texto { display: flex; flex-direction: column; min-width: 0; }
.aviso-texto strong { font-size: 13px; font-weight: 500; }
.aviso-texto small { font-size: 12px; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes aparecer { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Cabecera de página ---------- */
.cabecera-pagina { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.cabecera-textos h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cabecera-textos p { margin-top: 3px; font-size: 13.5px; }
.cabecera-acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.volver { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--suave); margin-bottom: 6px; }
.volver:hover { color: var(--acento-texto); }
.chip-fecha {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
    background: var(--superficie); border: 1px solid var(--borde); border-radius: 10px; font-size: 13.5px;
}

/* ---------- Tarjetas (dos capas) ---------- */
.tarjeta {
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    padding: 4px;
    min-width: 0;
    display: flex; flex-direction: column;
}
.tarjeta-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 8px 12px 8px 14px; }
.tarjeta-titulo { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 500; }
.tarjeta-titulo .icono { color: var(--suave); }
.tarjeta-acciones { display: flex; align-items: center; gap: 6px; }
.tarjeta-cuerpo {
    flex: 1;
    background: var(--superficie);
    border: 1px solid var(--borde-suave);
    border-radius: var(--radio-int);
    padding: 14px 16px;
    min-width: 0;
}
.tarjeta-cuerpo.sin-relleno { padding: 0; overflow: hidden; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpis.cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi .tarjeta-cab { min-height: 40px; padding: 6px 10px 6px 12px; }
.kpi .tarjeta-titulo { font-size: 13.5px; }
.kpi-icono { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.kpi-icono.ambar { color: #D97706; background: #FEF3C7; }
.kpi-icono.indigo { color: var(--acento); background: var(--acento-suave); }
.kpi-icono.violeta { color: #9333EA; background: #F3E8FF; }
.kpi-icono.verde { color: var(--verde); background: var(--verde-fondo); }
.kpi-icono.rojo { color: var(--rojo); background: var(--rojo-fondo); }
[data-tema="oscuro"] .kpi-icono.ambar { background: rgba(245, 158, 11, .15); }
[data-tema="oscuro"] .kpi-icono.violeta { background: rgba(147, 51, 234, .18); color: #C084FC; }
.kpi-valor { font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi-valor.medio { font-size: 22px; }
.kpi-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--suave); }
.variacion { font-size: 11px; font-weight: 600; white-space: nowrap; }
.variacion.sube { color: var(--verde); }
.variacion.baja { color: var(--rojo); }
.variacion.neutra { color: var(--tenue); }

/* ---------- Panel ---------- */
.panel-rejilla { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 12px; align-items: start; }
.panel-izq, .panel-der { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.grafico-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.grafico-total { display: flex; align-items: center; gap: 10px; }
.grafico-total strong { font-size: 27px; font-weight: 600; letter-spacing: -.02em; }
.leyenda { display: flex; gap: 16px; font-size: 13px; color: var(--texto-2); }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.punto { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.punto.ing { background: var(--acento); }
.punto.gas { background: var(--barra-gris); }

.grafico { display: grid; grid-template-columns: 50px minmax(0, 1fr); grid-template-rows: 220px auto; }
.grafico-eje { position: relative; }
.grafico-eje span { position: absolute; right: 10px; transform: translateY(50%); font-size: 11.5px; color: var(--suave); white-space: nowrap; }
.grafico-area { position: relative; }
.grafico-linea { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--borde); }
.grafico-columnas { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.grafico-col {
    flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 5px;
    position: relative; outline: none; cursor: default;
}
.grafico-col::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px dashed transparent;
}
.grafico-col:hover::before, .grafico-col:focus::before { border-color: var(--tenue); }
.barra { width: clamp(6px, 1.3vw, 15px); border-radius: 4px 4px 2px 2px; transition: height .5s ease, opacity .15s; position: relative; z-index: 1; }
.barra.ing { background: var(--acento); }
.barra.gas { background: var(--barra-gris); }
.grafico-col:hover .barra.ing { background: var(--acento-hover); }
.grafico-tip {
    position: absolute; top: 4px; left: 50%; transform: translateX(-50%) translateY(4px);
    background: var(--superficie); border: 1px solid var(--borde); border-radius: 10px; box-shadow: var(--sombra-alta);
    padding: 8px 12px; font-size: 12px; white-space: nowrap; z-index: 5;
    opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s;
}
.grafico-tip.izq { left: auto; right: 50%; transform: translateY(4px); }
.grafico-col:hover .grafico-tip, .grafico-col:focus .grafico-tip { opacity: 1; transform: translateX(-50%); }
.grafico-col:hover .grafico-tip.izq, .grafico-col:focus .grafico-tip.izq { transform: none; }
.grafico-tip strong { display: block; font-size: 12px; margin-bottom: 4px; }
.grafico-tip-fila { display: flex; align-items: center; gap: 6px; color: var(--suave); }
.grafico-tip-fila b { margin-left: auto; padding-left: 14px; color: var(--texto); font-weight: 600; }
.grafico-tip-fila.sep { border-top: 1px solid var(--borde-suave); margin-top: 4px; padding-top: 4px; }
.grafico-meses { display: flex; padding-top: 8px; }
.grafico-meses span { flex: 1; text-align: center; font-size: 12px; color: var(--suave); }
.grafico-meses span.actual { color: var(--texto); font-weight: 600; }

/* Tarjeta destacada en degradado */
.destacada-pila { position: relative; padding-top: 8px; }
.destacada-pila::before {
    content: ""; position: absolute; top: 0; left: 6%; right: 6%; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, #A5A8F7, #8B8EF2); opacity: .45;
}
.destacada {
    position: relative; overflow: hidden; border-radius: 13px; padding: 16px 18px 15px; color: #fff;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .18) 0%, transparent 55%),
        linear-gradient(140deg, #7A7DF3 0%, #5B5FE0 48%, #4245CC 100%);
    box-shadow: 0 10px 24px -10px rgba(76, 80, 212, .7);
}
.destacada::before, .destacada::after {
    content: ""; position: absolute; border-radius: 50%; border: 28px solid rgba(255, 255, 255, .07);
}
.destacada::before { width: 220px; height: 220px; right: -90px; bottom: -120px; }
.destacada::after { width: 160px; height: 160px; left: -70px; top: -90px; }
.destacada > * { position: relative; z-index: 1; }
.destacada-sup { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; opacity: .9; }
.destacada-valor { font-size: 31px; font-weight: 600; letter-spacing: -.02em; margin: 6px 0 14px; font-variant-numeric: tabular-nums; }
.destacada-inf { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.destacada-nombre { font-size: 15px; font-weight: 500; white-space: nowrap; }
.destacada-datos b { white-space: nowrap; }
.destacada-datos { display: flex; gap: 16px; text-align: right; }
.destacada-datos small { display: block; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; opacity: .75; }
.destacada-datos b { font-size: 14px; font-weight: 600; }
.botonera { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; margin-top: 12px; }

/* Progreso */
.progreso { height: 9px; border-radius: 99px; background: var(--acento-suave); overflow: hidden; }
.progreso > div { height: 100%; border-radius: 99px; background: var(--acento); transition: width .6s ease; }
.progreso.verde > div { background: var(--verde); }
.progreso-cab { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; color: var(--suave); }
.progreso-cab b { color: var(--acento-texto); font-weight: 600; }
.progreso-pie { display: flex; justify-content: space-between; font-size: 13px; margin-top: 10px; color: var(--suave); }
.progreso-pie b { color: var(--texto); font-weight: 600; }

/* Actividad */
.actividad { list-style: none; margin: 0; padding: 0; }
.actividad li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--borde-suave); }
.actividad li:last-child { border-bottom: 0; padding-bottom: 2px; }
.actividad li:first-child { padding-top: 2px; }
.actividad-textos { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.actividad-textos strong { font-size: 13.5px; font-weight: 500; }
.actividad-textos span { font-size: 12px; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actividad time { font-size: 12px; color: var(--suave); white-space: nowrap; align-self: flex-start; padding-top: 2px; }
.avatar {
    display: inline-grid; place-items: center; border-radius: 50%; flex-shrink: 0;
    background: color-mix(in srgb, var(--avatar) 16%, var(--superficie));
    color: var(--avatar); font-weight: 600; letter-spacing: .02em;
    border: 1px solid color-mix(in srgb, var(--avatar) 28%, transparent);
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 36px; padding: 0 13px; border-radius: var(--radio-ctl);
    border: 1px solid var(--borde); background: var(--superficie); color: var(--texto);
    font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.btn:hover { background: var(--hover); }
.btn:focus-visible, .btn-icono:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primario { background: var(--acento); border-color: var(--acento); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(76, 80, 212, .3); }
.btn-primario:hover { background: var(--acento-hover); border-color: var(--acento-hover); }
.btn-suave { background: var(--superficie); }
.btn-peligro { color: var(--rojo); }
.btn-peligro:hover { background: var(--rojo-fondo); border-color: var(--rojo-borde); }
.btn-exito { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn-exito:hover { filter: brightness(.95); background: var(--verde); }
.btn-p { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn-bloque { width: 100%; }
.btn-icono {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radio-ctl);
    border: 1px solid var(--borde); background: var(--superficie); color: var(--texto-2); cursor: pointer;
}
.btn-icono:hover { background: var(--hover); color: var(--texto); }
.btn-icono.fantasma { border-color: transparent; background: none; }
.btn-icono.fantasma:hover { background: var(--hover); }
.btn-icono.p { width: 30px; height: 30px; border-radius: 8px; }
.grupo-btn { display: inline-flex; border: 1px solid var(--borde); border-radius: var(--radio-ctl); overflow: hidden; background: var(--superficie); }
.grupo-btn button { border: 0; background: none; padding: 0 12px; height: 34px; font-size: 13px; color: var(--suave); cursor: pointer; border-right: 1px solid var(--borde-suave); }
.grupo-btn button:last-child { border-right: 0; }
.grupo-btn button.activo { background: var(--acento-suave); color: var(--acento-texto); font-weight: 600; }

/* ---------- Formularios ---------- */
.campo { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.campo > label, .etiqueta { font-size: 12.5px; font-weight: 500; color: var(--texto-2); }
.campo small { font-size: 12px; color: var(--suave); }
.control, .campo input:not([type=checkbox]):not([type=radio]), .campo select, .campo textarea,
.filtros input, .filtros select, .tabla input, .tabla select {
    height: 36px; width: 100%; padding: 0 10px;
    border: 1px solid var(--borde); border-radius: var(--radio-ctl);
    background: var(--superficie); color: var(--texto); font: inherit; font-size: 13.5px;
    transition: border-color .15s, box-shadow .15s;
}
.campo textarea { height: auto; min-height: 80px; padding: 8px 10px; resize: vertical; }
.control:focus, .campo input:focus, .campo select:focus, .campo textarea:focus,
.filtros input:focus, .filtros select:focus, .tabla input:focus, .tabla select:focus {
    outline: 0; border-color: var(--acento); box-shadow: 0 0 0 3px rgba(91, 95, 224, .15);
}
.tabla input, .tabla select { height: 32px; font-size: 13px; }
.rejilla-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.rejilla-form.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rejilla-form.cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ancho-completo { grid-column: 1 / -1; }
.casilla { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.casilla input { width: 16px; height: 16px; accent-color: var(--acento); }
.validation-message { color: var(--rojo); font-size: 12px; }
.invalid { border-color: var(--rojo) !important; }
.validation-errors { margin: 0 0 12px; padding: 10px 14px 10px 30px; background: var(--rojo-fondo); border: 1px solid var(--rojo-borde); border-radius: 10px; color: var(--rojo); font-size: 13px; }
.filtros { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filtros .buscar { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.filtros .buscar input { padding-left: 34px; }
.filtros .buscar .icono { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--suave); }
.filtros select { width: auto; min-width: 150px; }
.filtros input[type=date] { width: auto; }

/* ---------- Tablas ---------- */
.tabla-scroll { overflow-x: auto; }
.tabla { width: 100%; font-size: 13.5px; }
.tabla th {
    text-align: left; font-weight: 500; font-size: 12.5px; color: var(--suave);
    padding: 10px 14px; border-bottom: 1px solid var(--borde-suave); white-space: nowrap; background: var(--superficie);
}
.tabla th .icono { vertical-align: -3px; margin-right: 5px; }
.tabla td { padding: 10px 14px; border-bottom: 1px solid var(--borde-suave); vertical-align: middle; }
.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla tbody tr { transition: background .1s; }
.tabla tbody tr:hover td { background: var(--hover); }
.tabla tbody tr.clicable { cursor: pointer; }
.tabla tfoot td { font-weight: 600; border-top: 1px solid var(--borde); border-bottom: 0; background: var(--tarjeta); }
.tabla .principal { font-weight: 500; color: var(--texto); }
.tabla .secundario { display: block; font-size: 12px; color: var(--suave); margin-top: 1px; }
.tabla .acciones { text-align: right; white-space: nowrap; }
.tabla .acciones > * + * { margin-left: 4px; }
.tabla.compacta td { padding: 7px 12px; }
.tabla.lineas td { padding: 6px 8px; }
.tabla.lineas th { padding: 8px; }
.tabla td.vacia { text-align: center; color: var(--suave); padding: 30px; }
.enlace { color: var(--acento-texto); font-weight: 500; }
.enlace:hover { text-decoration: underline; }

/* Pastillas */
.pastilla {
    display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 7px;
    font-size: 12px; font-weight: 500; border: 1px solid; white-space: nowrap;
}
.pastilla-verde { color: var(--verde); background: var(--verde-fondo); border-color: var(--verde-borde); }
.pastilla-rojo { color: var(--rojo); background: var(--rojo-fondo); border-color: var(--rojo-borde); }
.pastilla-ambar { color: var(--ambar); background: var(--ambar-fondo); border-color: var(--ambar-borde); }
.pastilla-azul { color: var(--azul); background: var(--azul-fondo); border-color: var(--azul-borde); }
.pastilla-indigo { color: var(--acento-texto); background: var(--indigo-fondo); border-color: var(--indigo-borde); }
.pastilla-gris { color: var(--suave); background: var(--hover); border-color: var(--borde); }

/* Barra de margen horizontal */
.barra-margen { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.barra-margen .pista { flex: 1; height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.barra-margen .pista > div { height: 100%; border-radius: 99px; background: var(--verde); }
.barra-margen .pista > div.neg { background: var(--rojo); }
.barra-margen .pista > div.bajo { background: #F59E0B; }

/* ---------- Rejillas de página ---------- */
.rejilla-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rejilla-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rejilla-lateral { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 12px; align-items: start; }
.pila { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ficha-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.ficha-datos dt { font-size: 12px; color: var(--suave); }
.ficha-datos dd { margin: 2px 0 0; font-size: 13.5px; font-weight: 500; }
.dato-linea { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--texto-2); padding: 3px 0; }
.dato-linea .icono { color: var(--suave); }
.resumen-filas { display: flex; flex-direction: column; }
.resumen-filas > div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--borde-suave); font-size: 13.5px; }
.resumen-filas > div:last-child { border-bottom: 0; }
.resumen-filas > div.total { font-size: 16px; font-weight: 600; border-top: 1px solid var(--borde); border-bottom: 0; margin-top: 4px; padding-top: 10px; }
.mini-kpi { display: flex; flex-direction: column; gap: 2px; }
.mini-kpi small { font-size: 12px; color: var(--suave); }
.mini-kpi strong { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Pestañas */
.pestanas { display: flex; gap: 4px; padding: 4px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; margin-bottom: 14px; overflow-x: auto; }
.pestana { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px; font-size: 13.5px; color: var(--suave); white-space: nowrap; border: 1px solid transparent; background: none; cursor: pointer; }
.pestana:hover { color: var(--texto); }
.pestana.activa { background: var(--superficie); color: var(--texto); font-weight: 500; border-color: var(--borde-suave); box-shadow: var(--sombra); }
.pestana.activa .icono { color: var(--acento); }

/* Vacío, avisos inline */
.vacio { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 20px; color: var(--suave); }
.vacio h3 { color: var(--texto); font-size: 15px; font-weight: 600; }
.vacio .icono { color: var(--tenue); }
.alerta { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 11px; font-size: 13.5px; border: 1px solid; }
.alerta .icono { margin-top: 1px; }
.alerta-rojo { background: var(--rojo-fondo); border-color: var(--rojo-borde); color: var(--rojo); }
.alerta-ambar { background: var(--ambar-fondo); border-color: var(--ambar-borde); color: var(--ambar); }
.alerta-azul { background: var(--azul-fondo); border-color: var(--azul-borde); color: var(--azul); }
.alerta-verde { background: var(--verde-fondo); border-color: var(--verde-borde); color: var(--verde); }
.alerta strong { font-weight: 600; }
.adjunto { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--acento-texto); background: var(--acento-suave); border-radius: 6px; padding: 2px 7px; margin: 2px 4px 2px 0; }

/* Modal */
.modal-fondo {
    position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
    background: rgba(15, 15, 20, .45); backdrop-filter: blur(2px); animation: aparecer .15s ease-out;
}
.modal {
    width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column;
    background: var(--superficie); border: 1px solid var(--borde); border-radius: 16px; box-shadow: var(--sombra-alta);
}
.modal-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--borde-suave); }
.modal-cab h3 { font-size: 16.5px; }
.modal-cab p { font-size: 13px; margin-top: 2px; }
.modal-cuerpo { padding: 16px 18px; overflow-y: auto; }
.modal-pie { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--borde-suave); background: var(--tarjeta); border-radius: 0 0 16px 16px; }

/* Toasts */
.avisos { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.aviso {
    display: flex; align-items: flex-start; gap: 10px; padding: 11px 10px 11px 14px; border-radius: 12px;
    background: var(--superficie); border: 1px solid var(--borde); box-shadow: var(--sombra-alta); font-size: 13.5px;
    animation: aparecer .18s ease-out;
}
.aviso span { flex: 1; padding-top: 1px; }
.aviso .btn-icono { width: 24px; height: 24px; }
.aviso-exito > .icono { color: var(--verde); }
.aviso-error > .icono { color: var(--rojo); }
.aviso-info > .icono { color: var(--acento); }

/* ---------- Demo guiada ---------- */
.guia-fab {
    position: fixed; right: 20px; bottom: 20px; z-index: 260;
    display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px;
    border: 0; border-radius: 99px; cursor: pointer; color: #fff; font-weight: 600; font-size: 14px;
    background: linear-gradient(135deg, #7A7DF3, var(--acento) 55%, #4245CC);
    box-shadow: 0 10px 26px -8px rgba(76, 80, 212, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .15s, box-shadow .15s;
}
.guia-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(76, 80, 212, .85), inset 0 1px 0 rgba(255, 255, 255, .25); }
.guia-fab:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; }
.guia-fab.activa { opacity: .55; }
.guia-fab.pulso::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: 0 0 0 0 rgba(91, 95, 224, .55); animation: pulso 1.8s ease-out infinite;
}
@keyframes pulso { 70% { box-shadow: 0 0 0 14px rgba(91, 95, 224, 0); } 100% { box-shadow: 0 0 0 0 rgba(91, 95, 224, 0); } }
.guia-panel {
    position: fixed; right: 20px; bottom: 80px; z-index: 261; width: min(380px, calc(100vw - 40px));
    background: var(--superficie); border: 1px solid var(--borde); border-radius: 16px; box-shadow: var(--sombra-alta);
    padding: 8px; animation: aparecer .15s ease-out;
}
.guia-panel-cab { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid var(--borde-suave); margin-bottom: 6px; }
.guia-panel-cab strong { display: block; font-size: 15px; }
.guia-panel-cab small { color: var(--suave); font-size: 12.5px; }
.guia-panel-icono, .guia-opcion-icono {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
    background: var(--acento-suave); color: var(--acento-texto);
}
.guia-opcion {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 11px;
    border: 1px solid transparent; background: none; cursor: pointer; text-align: left;
}
.guia-opcion:hover { background: var(--hover); border-color: var(--borde-suave); }
.guia-opcion-textos { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.guia-opcion-textos strong { font-weight: 500; font-size: 13.5px; }
.guia-opcion-textos small { color: var(--suave); font-size: 12px; }
.guia-opcion-meta { font-size: 11.5px; color: var(--tenue); white-space: nowrap; align-self: flex-start; padding-top: 2px; }
.guia-velo { position: fixed; inset: 0; z-index: 240; background: rgba(15, 15, 25, .45); animation: aparecer .2s ease-out; }
.guia-foco {
    position: fixed; z-index: 241; display: none; border-radius: 14px; pointer-events: none;
    box-shadow: 0 0 0 3px var(--acento), 0 0 0 9999px rgba(15, 15, 25, .42);
    transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
}
.guia-popover {
    /* Posición por defecto (abajo a la derecha) hasta que el script la coloca junto al elemento. */
    position: fixed; z-index: 250; width: min(360px, calc(100vw - 24px)); top: calc(100vh - 300px); left: calc(100vw - 384px);
    background: var(--superficie); border: 1px solid var(--borde); border-radius: 16px; box-shadow: var(--sombra-alta);
    padding: 12px 16px 14px; transition: top .25s ease, left .25s ease;
}
.guia-popover.centrado { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 24px)); }
.guia-pop-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.guia-pop-recorrido { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--acento-texto); text-transform: uppercase; letter-spacing: .04em; }
.guia-popover h4 { font-size: 16px; margin-bottom: 6px; }
.guia-popover p { font-size: 13.5px; color: var(--texto-2); line-height: 1.55; }
.guia-progreso { display: flex; gap: 4px; margin: 14px 0 12px; }
.guia-progreso i { flex: 1; height: 4px; border-radius: 99px; background: var(--hover); }
.guia-progreso i.hecho { background: var(--indigo-borde); }
.guia-progreso i.actual { background: var(--acento); }
.guia-pop-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.girando { animation: girar 1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.avisos { bottom: 82px; }
@media (max-width: 700px) {
    .guia-fab { right: 14px; bottom: 14px; padding: 0 14px; }
    .guia-fab-texto { display: none; }
    .guia-panel { right: 12px; bottom: 72px; }
    .guia-popover:not(.centrado) { left: 12px !important; right: 12px; bottom: 74px; top: auto !important; width: auto; }
}

/* ---------- Login ---------- */
.login-fondo { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--fondo); }
.login { width: min(480px, 100%); }
.login-cab { text-align: center; margin-bottom: 18px; }
.login-cab .marca { justify-content: center; margin-bottom: 14px; }
.login-cab p { color: var(--suave); margin-top: 4px; }
.login-opciones { display: flex; flex-direction: column; gap: 8px; }
.login-opcion {
    display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--borde-suave); background: var(--superficie); transition: border-color .15s, box-shadow .15s;
}
.login-opcion:hover { border-color: var(--indigo-borde); }
.login-opcion:has(input:checked) { border-color: var(--acento); box-shadow: 0 0 0 3px rgba(91, 95, 224, .15); }
.login-opcion input { accent-color: var(--acento); width: 16px; height: 16px; }
.login-opcion .textos { flex: 1; display: flex; flex-direction: column; }
.login-opcion .textos strong { font-weight: 500; }
.login-opcion .textos small { color: var(--suave); font-size: 12.5px; }
.login-nota { font-size: 12.5px; color: var(--suave); text-align: center; margin-top: 14px; }

/* ---------- Documento imprimible (factura / presupuesto) ---------- */
.documento {
    background: #fff; color: #18181B; max-width: 820px; margin: 0 auto; padding: 44px 48px;
    border: 1px solid var(--borde); border-radius: 12px; box-shadow: var(--sombra); font-size: 13px;
}
.doc-cab { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 2px solid #5B5FE0; }
.doc-empresa .marca-nombre { font-size: 20px; }
.doc-empresa p { color: #52525B; font-size: 12px; margin-top: 2px; }
.doc-tipo { text-align: right; }
.doc-tipo h2 { font-size: 24px; letter-spacing: .04em; text-transform: uppercase; color: #5B5FE0; }
.doc-tipo dl { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 10px 0 0; font-size: 12.5px; }
.doc-tipo dt { color: #71717A; text-align: right; }
.doc-tipo dd { margin: 0; font-weight: 600; text-align: right; }
.doc-partes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0; }
.doc-caja { background: #F7F7F9; border-radius: 10px; padding: 12px 14px; }
.doc-caja h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #71717A; margin-bottom: 6px; font-weight: 600; }
.doc-caja p { font-size: 12.5px; color: #3F3F46; }
.doc-caja p.nombre { font-size: 14px; font-weight: 600; color: #18181B; }
.doc-lineas { width: 100%; font-size: 12.5px; }
.doc-lineas th { text-align: left; font-weight: 600; color: #52525B; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding: 8px; border-bottom: 1px solid #E4E4E7; }
.doc-lineas td { padding: 9px 8px; border-bottom: 1px solid #F0F0F2; vertical-align: top; }
.doc-totales { display: flex; justify-content: space-between; gap: 24px; margin-top: 18px; }
.doc-iva { font-size: 12px; }
.doc-iva th, .doc-iva td { padding: 4px 10px 4px 0; text-align: right; }
.doc-iva th { color: #71717A; font-weight: 500; }
.doc-suma { min-width: 250px; }
.doc-suma > div { display: flex; justify-content: space-between; padding: 4px 0; }
.doc-suma > div.total { font-size: 17px; font-weight: 700; border-top: 2px solid #18181B; margin-top: 6px; padding-top: 8px; }
.doc-notas { margin-top: 26px; font-size: 12px; color: #52525B; border-top: 1px solid #E4E4E7; padding-top: 12px; }
.doc-notas p + p { margin-top: 4px; }
.doc-sello { display: inline-block; margin-top: 8px; padding: 4px 10px; border: 2px solid #16A34A; color: #16A34A; border-radius: 6px; font-weight: 700; transform: rotate(-4deg); letter-spacing: .06em; }
.doc-sello.rojo { border-color: #DC2626; color: #DC2626; }

/* Ayuda */
.ayuda-lista { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--texto-2); }
.paso { display: flex; gap: 12px; padding: 10px 0; }
.paso-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--acento-suave); color: var(--acento-texto); font-weight: 600; font-size: 13px; flex-shrink: 0; }

/* Error de Blazor */
#blazor-error-ui {
    color-scheme: light only; background: #FFFBEB; border-top: 1px solid #FDE68A; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .1);
    box-sizing: border-box; display: none; left: 0; padding: .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .6rem; }
.blazor-error-boundary { background: var(--rojo-fondo); color: var(--rojo); padding: 1rem; border-radius: 10px; }
.blazor-error-boundary::after { content: "Ha ocurrido un error al mostrar este bloque."; }

/* ---------- Responsive ---------- */
.solo-movil { display: none !important; }
@media (max-width: 1280px) {
    .panel-rejilla { grid-template-columns: minmax(0, 1fr) 280px; }
    .kpis.cuatro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
    .panel-rejilla, .rejilla-lateral { grid-template-columns: minmax(0, 1fr); }
    .panel-der { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
    .rejilla-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .app, .app.compacta { grid-template-columns: minmax(0, 1fr); padding: 8px; gap: 8px; }
    .lateral {
        position: fixed; z-index: 60; left: 8px; top: 8px; bottom: 8px; height: auto; width: 260px;
        transform: translateX(-110%); transition: transform .2s ease; box-shadow: var(--sombra-alta);
    }
    .app.menu-abierto .lateral { transform: none; }
    .app.menu-abierto .app-velo { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .35); }
    .lateral-plegar { display: none !important; }
    .solo-movil { display: inline-grid !important; }
    .oculto-movil { display: none !important; }
    .contenido { padding: 16px 14px 22px; }
    .kpis, .rejilla-2, .rejilla-3, .rejilla-form, .rejilla-form.tres, .rejilla-form.cuatro { grid-template-columns: minmax(0, 1fr); }
    .buscador { width: auto; flex: 1; min-width: 0; }
    .buscador kbd, .usuario > .icono { display: none; }
    .superior { gap: 6px; padding: 6px; }
    .superior-acciones { gap: 4px; }
    .usuario { padding: 2px; }
    .documento { padding: 24px 18px; }
    .doc-cab, .doc-totales { flex-direction: column; }
    .doc-tipo { text-align: left; }
    .doc-partes { grid-template-columns: 1fr; }
}

/* ---------- Impresión ---------- */
@media print {
    @page { size: A4; margin: 14mm; }
    body { background: #fff !important; }
    .lateral, .superior, .no-imprimir, .cabecera-pagina, .avisos, #blazor-error-ui, .pestanas, .app-velo,
    .guia-fab, .guia-panel, .guia-popover, .guia-foco, .guia-velo { display: none !important; }
    .app { display: block; padding: 0; }
    .contenido { border: 0; padding: 0; background: #fff; }
    .rejilla-lateral { display: block; }
    .documento { border: 0; box-shadow: none; padding: 0; max-width: none; }
    .doc-cab { border-bottom-color: #5B5FE0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .doc-caja { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
