[hidden] { display: none !important; }
/* Facturador - estilos base (sin compilación) */
:root {
    --fondo: #f4f6f8;
    --panel: #ffffff;
    --texto: #1d2733;
    --suave: #5d6b7a;
    --borde: #dde3ea;
    --primario: #0f5e9c;
    --primario-osc: #0b4876;
    --lateral: #13293d;
    --lateral-txt: #c9d6e3;
    --ok: #1e7f4f;
    --ok-fondo: #e6f4ec;
    --error: #b42318;
    --error-fondo: #fdecea;
    --aviso: #9a6700;
    --aviso-fondo: #fff4d6;
    --radio: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 15px;
    color: var(--texto);
    background: var(--fondo);
}

a { color: var(--primario); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Estructura ---------- */
.app { display: flex; min-height: 100vh; }

.lateral {
    width: 270px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #0d2442 0%, #0a1c34 100%);
    color: #d6e2ef;
    padding: 16px 10px 24px;
    /* El menú se queda fijo y tiene su propio desplazamiento: al abrir una opción no se va arriba */
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
}
.lateral::-webkit-scrollbar { width: 8px; }
.lateral::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }

.marca {
    padding: 4px 10px 16px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 10px;
}
.marca small { display: block; font-size: 12px; font-weight: 400; color: #8fb3c9; margin-top: 4px; }

/* ---------- Menú lateral ---------- */
.icono { width: 20px; height: 20px; flex-shrink: 0; }

.menu { display: flex; flex-direction: column; gap: 2px; }

/* Opciones */
.menu .op {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px 9px 26px;
    color: #d6e2ef;
    font-size: 14.5px;
    border-radius: 8px;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.menu .op:last-child { border-bottom: 0; }
.menu .op > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu .op .icono { color: #c9d9e8; }
.menu a.op:hover { background: rgba(31,181,196,.10); color: #fff; text-decoration: none; }
.menu .op.activo {
    background: linear-gradient(90deg, #14879a, #1aa6b5);
    color: #fff;
    font-weight: 600;
    border-bottom-color: transparent;
    box-shadow: 0 2px 10px rgba(26,166,181,.30);
}
.menu .op.activo .icono { color: #fff; }
.menu .op.inactiva { opacity: .5; cursor: default; }
.menu .op-inicio { padding-left: 14px; font-weight: 600; margin-bottom: 6px; }

.pronto {
    /* Opción aún no disponible: un punto discreto (el texto queda para lectores de pantalla) */
    margin-left: auto;
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    font-size: 0;
    overflow: hidden;
}

/* Módulos: bloque con barra turquesa, ícono y flecha para plegar */
.modulo { margin-top: 8px; }
.modulo > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 10px 14px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(31,181,196,.16), rgba(31,181,196,.04));
    border-left: 4px solid #1fc1d0;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
}
.modulo > summary::-webkit-details-marker { display: none; }
.modulo > summary:hover { background: linear-gradient(90deg, rgba(31,181,196,.24), rgba(31,181,196,.06)); }
.modulo > summary .icono { color: #e6f6f8; }
.modulo > summary .flecha { margin-left: auto; width: 18px; height: 18px; transition: transform .2s; }
.modulo:not([open]) > summary .flecha { transform: rotate(-90deg); }

.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.barra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: var(--panel);
    border-bottom: 1px solid var(--borde);
}
.barra .usuario { color: var(--suave); font-size: 14px; }
.barra form { display: inline; }

.contenido { padding: 24px; max-width: 1200px; width: 100%; }

h1 { font-size: 22px; margin: 0 0 4px; }
.sub { color: var(--suave); margin: 0 0 20px; }

/* ---------- Componentes ---------- */
.tarjeta {
    background: var(--panel);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    padding: 20px;
    margin-bottom: 20px;
}
.tarjeta h2 { font-size: 16px; margin: 0 0 14px; }

.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.cifra { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 16px; }
.cifra .num { font-size: 28px; font-weight: 700; }
.cifra .eti { color: var(--suave); font-size: 13px; }

.encabezado { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.btn {
    display: inline-block;
    border: 1px solid var(--primario);
    background: var(--primario);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}
.btn:hover { background: var(--primario-osc); text-decoration: none; }
.btn.sec { background: #fff; color: var(--primario); }
.btn.sec:hover { background: #eef5fb; }
.btn.chico { padding: 4px 10px; font-size: 13px; }
.btn-link { background: none; border: 0; color: var(--primario); cursor: pointer; font: inherit; padding: 0; }

table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--suave); background: #f8fafc; }
.tabla { border: 1px solid var(--borde); border-radius: var(--radio); overflow-x: auto; }
.acciones { white-space: nowrap; text-align: right; }

.etiqueta { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.etiqueta.verde { background: var(--ok-fondo); color: var(--ok); }
.etiqueta.roja { background: var(--error-fondo); color: var(--error); }
.etiqueta.ambar { background: var(--aviso-fondo); color: var(--aviso); }
.etiqueta.gris { background: #edf0f3; color: var(--suave); }

.alerta { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.alerta.ok { background: var(--ok-fondo); color: var(--ok); }
.alerta.error { background: var(--error-fondo); color: var(--error); }
.alerta.aviso { background: var(--aviso-fondo); color: var(--aviso); }
.alerta ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- Listados ---------- */
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.etiqueta.azul { background: #e3f4f7; color: #0f7c8a; }
.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.filtros input[type=text] { flex: 1 1 280px; width: auto; }
.filtros select { width: auto; flex: 0 1 200px; }
.opciones-radio { display: flex; gap: 18px; padding: 8px 0; }

.lista-categorias { background: var(--panel); }
.fila-form {
    display: grid;
    grid-template-columns: 1fr 90px 110px 90px;
    gap: 12px;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--borde);
}
.fila-form:last-child { border-bottom: 0; }
.encabezado-fila { background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--suave); font-weight: 600; }

/* ---------- Buscador de productos ---------- */
.buscador-productos { position: relative; display: flex; gap: 8px; flex-wrap: wrap; }
.buscador-productos > input { flex: 1 1 320px; }
.resultados {
    position: absolute; top: 100%; left: 0; z-index: 20;
    width: min(640px, 100%); max-height: 320px; overflow-y: auto;
    background: #fff; border: 1px solid var(--borde); border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 35, 60, .15); margin-top: 4px;
}
.resultados button {
    display: block; width: 100%; text-align: left; padding: 9px 12px;
    border: 0; border-bottom: 1px solid var(--borde); background: #fff; cursor: pointer; font: inherit;
}
.resultados button:hover { background: #eef8fa; }
.resultados small { color: var(--suave); }
.resultados .vacio { padding: 10px 12px; color: var(--suave); }
#tabla-lineas input { padding: 6px 8px; }

/* ---------- Elección de almacén ---------- */
.opciones-almacen { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.opcion-almacen { display: block; cursor: pointer; font-weight: 400; }
.opcion-almacen input { position: absolute; opacity: 0; }
.opcion-cuerpo {
    display: flex; flex-direction: column; gap: 6px; height: 100%;
    padding: 18px; border: 2px solid var(--borde); border-radius: 10px; background: var(--panel);
}
.opcion-cuerpo strong { font-size: 16px; }
.opcion-cuerpo small { color: var(--suave); }
.opcion-cuerpo .grande { width: 30px; height: 30px; color: #14879a; }
.opcion-almacen input:checked + .opcion-cuerpo { border-color: #1aa6b5; background: #eef9fb; box-shadow: 0 0 0 3px rgba(26,166,181,.15); }
.opcion-almacen input:focus-visible + .opcion-cuerpo { outline: 2px solid #1aa6b5; }
.opcion-almacen.deshabilitada { opacity: .55; cursor: not-allowed; }

/* ---------- Kardex ---------- */
.kardex { font-size: 13px; }
.kardex th, .kardex td { padding: 7px 8px; }
.kardex .centro { text-align: center; }
.kardex .saldo-inicial td { background: none; }
/* Kardex sin sombreados de color */
.kardex th, .kardex td, .kardex tfoot td { background: none; }
tfoot td { background: #f8fafc; }

/* ---------- Formularios ---------- */
.rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.campo { display: flex; flex-direction: column; gap: 5px; }
.campo.ancho { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=file], input[type=date], input[type=number], input:not([type]), textarea, select {
    padding: 9px 10px;
    border: 1px solid var(--borde);
    border-radius: 6px;
    font: inherit;
    background: #fff;
    width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc9ef; border-color: var(--primario); }
.campo .ayuda { font-size: 12px; color: var(--suave); }
.campo .err { font-size: 12px; color: var(--error); }
.casilla { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.botones { display: flex; gap: 10px; margin-top: 8px; }

.buscador { display: flex; gap: 8px; margin-bottom: 16px; max-width: 480px; }

.consulta-estado { font-size: 12px; }
.consulta-estado.cargando { color: var(--suave); }
.consulta-estado.bien { color: var(--ok); }
.consulta-estado.mal { color: var(--aviso); }

/* ---------- Login ---------- */
.pagina-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; background: linear-gradient(160deg, #13293d, #0f5e9c); }
.caja-login { background: #fff; border-radius: 12px; padding: 32px; width: 100%; max-width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.caja-login h1 { text-align: center; }
.caja-login .sub { text-align: center; }
.caja-login .campo { margin-bottom: 14px; }
.caja-login .btn { width: 100%; padding: 11px; font-size: 15px; }

.cifra .num.izq { text-align: left; }
.kardex-producto { margin-bottom: 22px; break-inside: avoid; }
.kardex-producto h3 { font-size: 15px; margin: 0 0 8px; }

/* ---------- Pestañas Resumido / Detallado ---------- */
.pestanas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pestana {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
    padding: 14px 16px; border: 2px solid var(--borde); border-radius: 10px;
    background: var(--panel); color: var(--texto); font-weight: 700; font-size: 15px;
}
.pestana:hover { text-decoration: none; border-color: #9ad6de; }
.pestana .icono { color: #14879a; }
.pestana small { flex-basis: 100%; font-weight: 400; font-size: 12px; color: var(--suave); }
.pestana.activa { border-color: #1aa6b5; background: #eef9fb; box-shadow: 0 0 0 3px rgba(26,166,181,.15); }
.solo-imprimir { display: none; }

/* ---------- Formatos SUNAT 12.1 / 13.1 ---------- */
.contenedor-sunat { width: 100%; background: none; border-collapse: collapse; }
.contenedor-sunat > thead > tr > td,
.contenedor-sunat > tbody > tr > td,
.contenedor-sunat > tfoot > tr > td { padding: 0; border: 0; background: none; }
.contenedor-sunat > thead > tr > td {
    background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio);
    padding: 16px; display: block; margin-bottom: 16px;
}
.formato-sunat { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 16px; margin-bottom: 18px; break-inside: avoid; }
/* Datos de la existencia: dos líneas (código + descripción / tipo + unidad) */
.existencia-sunat {
    display: grid; grid-template-columns: minmax(230px, max-content) 1fr;
    column-gap: 28px; row-gap: 3px; font-size: 14px; margin-bottom: 10px;
}
.existencia-sunat b { font-weight: 600; }
.titulo-formato { font-weight: 700; font-size: 13px; margin: 0 0 10px; }
.cabecera-sunat { width: auto; background: none; margin-bottom: 12px; font-size: 12.5px; }
.cabecera-sunat th, .cabecera-sunat td { border: 0; padding: 2px 10px 2px 0; background: none; text-transform: none; letter-spacing: 0; color: var(--texto); }
.cabecera-sunat th { font-weight: 600; white-space: nowrap; }
.kardex.sunat th { font-size: 10.5px; text-transform: none; letter-spacing: 0; border: 1px solid var(--borde); }
.kardex.sunat td { border: 1px solid var(--borde); }
.nota-sunat { font-size: 11px; color: var(--suave); margin: 6px 0 0; }

/* ---------- Impresión ---------- */
@media print {
    .lateral, .barra, .no-imprimir, .alerta { display: none !important; }
    .solo-imprimir { display: block; }
    body { background: #fff; font-size: 11px; }
    .contenido { padding: 0; max-width: none; }
    .tabla { border: 0; overflow: visible; }
    .kardex th, .kardex td { padding: 3px 5px; }
    a { color: inherit; text-decoration: none; }
    .cifras { grid-template-columns: repeat(4, 1fr); }
    .formato-sunat { border: 0; padding: 0 0 6px; margin-bottom: 14px; break-inside: avoid; }
    .formato-sunat:last-child { margin-bottom: 0; padding-bottom: 0; }
    html, body { height: auto; margin: 0; }
    .contenedor-sunat > thead { display: table-header-group; }
    .contenedor-sunat > tfoot { display: table-footer-group; }
    .contenedor-sunat > thead > tr > td { display: table-cell; border: 0; border-bottom: 1px solid #999; padding: 0 0 6px; margin: 0; }
    @page { size: A4 landscape; margin: 10mm; }
}

/* ---------- Celular ---------- */
@media (max-width: 800px) {
    .app { flex-direction: column; }
    .lateral { width: 100%; padding: 10px; position: static; height: auto; overflow: visible; }
    .modulo { margin-top: 4px; }
    .contenido { padding: 16px; }
}

/* ---------- Inventario físico y valorado ---------- */
.positivo { color: var(--ok); }
.negativo { color: var(--error); }
table.conteo input.contado { width: 110px; padding: 5px 8px; }
table.a-ciegas .col-sistema { display: none; }
.grupo-categoria td { font-weight: 700; padding-top: 14px; border-bottom: 1px solid var(--borde); }
.subtotal-categoria td { font-weight: 600; }
.ayuda { font-size: 13px; color: var(--suave); }

/* ---------- Compras ---------- */
.elegido { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--borde); border-radius: 6px; background: #f8fafc; }
.serie-numero { display: flex; gap: 6px; align-items: center; }
.serie-numero input:first-child { width: 90px; flex: none; text-transform: uppercase; }
.totales-compra { margin: 14px 0 0 auto; max-width: 380px; }
.totales-compra > div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.totales-compra > div.total { border-top: 1px solid var(--borde); margin-top: 4px; padding-top: 8px; font-size: 18px; }
.totales-compra > div.sub { justify-content: flex-end; }
.datos-documento { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px; }
.datos-documento > div > span { display: block; font-size: 12px; color: var(--suave); }
.datos-documento > div.ancho { grid-column: 1 / -1; }
#tabla-lineas input.cant, #tabla-lineas input.precio { text-align: right; }

/* ---------- Ventana del catálogo ---------- */
.ventana-catalogo { width: min(1000px, 96vw); max-height: 90vh; border: 0; border-radius: var(--radio); padding: 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.ventana-catalogo::backdrop { background: rgba(15, 30, 45, .45); }
.ventana-catalogo[open] { display: flex; flex-direction: column; }
.ventana-cabecera { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ventana-cabecera h2 { margin: 0; font-size: 18px; }
.ventana-cabecera .btn-link { font-size: 20px; }
.ventana-tabla { overflow: auto; flex: 1 1 auto; min-height: 200px; }
.ventana-tabla tbody tr[data-i] { cursor: pointer; }
.ventana-tabla tbody tr[data-i]:hover td { background: #eef8fa; }
.ventana-tabla tr.ya-agregado td { color: var(--suave); cursor: default; }
.ventana-pie { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
#tabla-lineas select.afect { padding: 5px 6px; font-size: 13px; }
#tabla-lineas.sin-igv .col-igv { display: none; }

/* ---------- Punto de venta ---------- */
.contenido:has(.pos) { max-width: none; }
.pos-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pos-cabecera h1 { margin: 0; }
.pos-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .pos-cuerpo { grid-template-columns: 1fr; } }
.pos-productos { margin: 0; }
.pos-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; max-height: calc(100vh - 250px); overflow: auto; padding: 2px; }
.pos-item { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px; border: 1px solid var(--borde); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; min-height: 96px; }
.pos-item:hover { border-color: var(--primario); background: #f2f9fb; }
.pos-item-desc { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.pos-item-pie { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pos-stock { font-size: 11.5px; color: var(--suave); }
.pos-stock.agotado { color: var(--error); font-weight: 600; }
.pos-venta { margin: 0; position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; }
.pos-tipos { display: flex; gap: 6px; align-items: center; }
.pos-tipo { flex: 1; padding: 9px 6px; border: 1px solid var(--borde); background: #fff; border-radius: 6px; cursor: pointer; font: inherit; font-weight: 600; color: var(--suave); }
.pos-tipo.activo { background: var(--primario); border-color: var(--primario); color: #fff; }
.pos-tipos select { width: auto; flex: 0 0 auto; }
.pos-cliente-actual { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--borde); border-radius: 6px; background: #f8fafc; }
.pos-cliente-nuevo { margin-top: 8px; padding: 10px; border: 1px dashed var(--borde); border-radius: 6px; }
.pos-carrito { max-height: 38vh; overflow: auto; }
.pos-carrito table { width: 100%; }
.pos-carrito th, .pos-carrito td { padding: 6px 4px; font-size: 13px; }
.pos-carrito input { padding: 5px 6px; text-align: right; }
.pos-carrito tr.sin-stock td { background: #fdecec; }
.pos-cant { display: flex; align-items: center; gap: 2px; }
.pos-cant button { width: 24px; height: 28px; border: 1px solid var(--borde); background: #fff; border-radius: 4px; cursor: pointer; font-weight: 700; }
.pos-cant input { width: 44px; }
.pos-totales > div { display: flex; justify-content: space-between; padding: 2px 0; font-size: 14px; }
.pos-totales .pos-total { font-size: 24px; font-weight: 800; border-top: 1px solid var(--borde); margin-top: 4px; padding-top: 6px; }
.pos-pago .opciones-radio { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pos-pago .opciones-radio input[type=date] { width: auto; }
.pos-pago-fila { display: grid; grid-template-columns: 130px 1fr 1fr 20px; gap: 6px; margin-top: 6px; align-items: center; }
.pos-pago-fila .pref[hidden] + .pquitar { grid-column: 4; }
.pos-vuelto { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 8px 10px; background: #eef8f1; border-radius: 6px; font-size: 16px; }
.pos-vuelto strong { font-size: 20px; }
.pos-vuelto.falta { background: #fdecec; color: var(--error); }
.pos-cobrar { width: 100%; padding: 14px; font-size: 18px; }
.pos-cobrar:disabled { opacity: .55; cursor: not-allowed; }

/* Ventanas en navegadores sin <dialog> (Edge clásico) */
.sin-dialog dialog { display: none; }
.sin-dialog dialog[open] { display: block; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1000; margin: 0; max-height: 90vh; overflow: auto; background: #fff; }
.sin-dialog .ventana-catalogo[open] { display: flex; }
.fondo-dialogo { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999; background: rgba(15, 30, 45, .45); }

/* Punto de venta minimizado */
.pos-en-espera { position: fixed; right: 18px; bottom: 0; z-index: 900; background: #0d3b66; color: #fff; padding: 10px 16px; border-radius: 8px 8px 0 0; box-shadow: 0 -4px 18px rgba(0,0,0,.25); font-size: 14px; text-decoration: none; }
.pos-en-espera:hover { background: #0d5fa6; text-decoration: none; color: #fff; }
.pos-en-espera span { margin-left: 12px; background: #e0a800; color: #10233a; padding: 3px 8px; border-radius: 4px; font-weight: 700; }
.ventana-tabla tr.foco td { background: #ffe9a6 !important; }

/* ---------- Imagen del producto ---------- */
.imagen-producto { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.imagen-marco { width: 180px; height: 180px; border: 1px dashed var(--borde); border-radius: 10px; background: #f7f9fb;
    display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.imagen-marco img { max-width: 100%; max-height: 100%; object-fit: contain; }
.imagen-vacia { color: #8a98a8; font-size: 13px; }
.imagen-producto .campo { flex: 1; min-width: 240px; }
.miniatura-producto { width: 34px; height: 34px; object-fit: contain; border: 1px solid var(--borde); border-radius: 5px;
    background: #fff; vertical-align: middle; margin-right: 8px; float: left; }

/* ---------- Guía de remisión ---------- */
.buscador-guia { position: relative; display: flex; gap: 8px; }
.buscador-guia input { flex: 1; }
.sugerencias-guia { position: absolute; top: 100%; left: 0; right: 130px; z-index: 20; list-style: none; margin: 2px 0 0; padding: 0;
    background: #fff; border: 1px solid var(--borde); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 320px; overflow-y: auto; }
.sugerencias-guia li { padding: 7px 12px; cursor: default; border-bottom: 1px solid #eef2f6; }
.sugerencias-guia li small { color: #6b7a8a; }
.sugerencias-guia li.activo, .sugerencias-guia li:hover { background: #ffe9a6; }
.sugerencias-guia li.vacio { color: #8a98a8; }
#tabla-lineas input, #tabla-lineas select { width: 100%; }
#tabla-lineas input[readonly] { background: #f4f7fb; }
#tabla-lineas select.solo-lectura { pointer-events: none; background: #f4f7fb; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: default; pointer-events: none; }

/* Guía de remisión minimizada: a la izquierda para no tapar al punto de venta en espera */
.guia-en-espera { right: auto; left: 290px; }
@media (max-width: 800px) { .guia-en-espera { left: 10px; bottom: 46px; border-radius: 8px; } }

/* Ventanas cerradas: siempre ocultas, aunque el navegador no conozca <dialog> (Edge clásico) */
dialog:not([open]) { display: none !important; }

/* Nota de crédito: líneas no incluidas, atenuadas */
#tabla-nota tr.apagada td { color: var(--suave); }
#tabla-nota tr.apagada input.cant, #tabla-nota tr.apagada input.imp { background: #f4f6f8; }
#tabla-nota input.cant, #tabla-nota input.imp { width: 100%; text-align: right; }

/* Nota de débito: conceptos */
#conceptos input, #conceptos select { width: 100%; }
#conceptos input.num { text-align: right; }

/* Registro de ventas (Formato 14.1) */
.registro-ventas table { font-size: 12px; }
.registro-ventas th { text-align: center; white-space: nowrap; font-size: 10.5px; padding: 6px 5px; }
.registro-ventas td { padding: 5px 5px; white-space: nowrap; }
.registro-ventas td.n { text-align: right; font-variant-numeric: tabular-nums; }
.registro-ventas td.c { text-align: center; }
.registro-ventas td.nom { white-space: normal; min-width: 180px; }
.registro-ventas tr.anulada td { color: var(--suave); }
.registro-ventas tfoot td { background: #f2f6fa; border-top: 2px solid var(--borde); }
.tabla.registro-ventas { overflow-x: auto; }
.contenido:has(.registro-ventas) { max-width: none; }
.filtros input[type=date], .filtros input[type=month] { width: auto; flex: 0 0 auto; }

.registro-ventas .col-nota { background: #fff8e6; }
.resumen-registro td, .resumen-registro th { white-space: nowrap; }

/* ---------- Caja ---------- */
.caja-abrir input.grande, .arqueo input.grande { font-size: 22px; font-weight: 700; text-align: right; height: 46px; }
.caja-estado { margin-bottom: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.caja-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.caja-bloque { border: 1px solid var(--borde); border-radius: 10px; padding: 10px 14px; background: #fafcfe; }
.caja-bloque h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--suave); }
.caja-bloque .fila { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 14px; }
.caja-bloque .fila.apagada { color: var(--suave); }
.caja-bloque .fila.total { border-top: 1px solid var(--borde); margin-top: 4px; padding-top: 6px; font-size: 15px; }
.arqueo { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 800px) { .arqueo { grid-template-columns: 1fr; } }
.tabla-arqueo { width: 100%; border-collapse: collapse; }
.tabla-arqueo td, .tabla-arqueo th { padding: 4px 6px; border-bottom: 1px solid #eef2f6; }
.tabla-arqueo input { width: 100px; text-align: right; }
.arqueo-compara { display: grid; gap: 6px; margin: 12px 0; }
.arqueo-compara > div, .caja-cierre > div { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 8px; background: #f2f6fa; font-size: 15px; }
.arqueo-compara .dif.cuadra, .caja-cierre.cuadra > div:last-child { background: #e6f6ec; color: #1b7f3b; }
.arqueo-compara .dif.sobra, .caja-cierre.sobra > div:last-child { background: #e8f1fb; color: #0d5fa6; }
.arqueo-compara .dif.falta, .caja-cierre.falta > div:last-child { background: #fdecea; color: #b3261e; }
.caja-cierre { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.caja-mov.es-ingreso { border-left: 5px solid #1b7f3b; }
.caja-mov.es-egreso { border-left: 5px solid #b3261e; }
.caja-mov .monto-mov { font-size: 20px; font-weight: 700; text-align: right; }

/* Caja → Reporte de caja: ventana de acceso (estilo SIGCO) */
.rep-ventana { max-width: 520px; background: #dfe8f3; border: 1px solid #9fb3c8; border-radius: 4px; padding: 10px; display: grid; gap: 10px; }
.rep-cuerpo { display: grid; grid-template-columns: 1fr 130px; gap: 10px; }
.rep-panel, .rep-fechas { background: #e9f0f8; border: 1px solid #b6c7da; border-radius: 3px; padding: 12px 14px; box-shadow: inset 1px 1px 0 #fff; }
.rep-fila { display: grid; grid-template-columns: 74px 1fr; gap: 6px; align-items: center; margin-bottom: 6px; }
.rep-fila select { height: 32px; padding: 2px 8px; font-size: 13.5px; line-height: 1.2; }
.rep-et { background: #0d5fa6; color: #fff; font-size: 13px; padding: 4px 8px; border-radius: 2px; white-space: nowrap; }
.rep-opciones { display: grid; gap: 8px; margin: 16px 0 4px 60px; }
.rep-opciones label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.rep-opciones input { width: 15px; height: 15px; margin: 0; }
.rep-botones { display: flex; flex-direction: column; gap: 10px; }
.rep-btn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border: 1px solid #9fb3c8; border-radius: 3px;
    background: linear-gradient(#fbfcfd, #e6ebf1); color: #10233a; font-size: 13.5px; cursor: pointer; text-decoration: none; font-family: inherit; }
.rep-btn:hover { border-color: #0d5fa6; background: #fff; }
.rep-btn .ok { color: #1b7f3b; font-size: 18px; font-weight: 900; }
.rep-btn .no { color: #b3261e; font-size: 17px; font-weight: 900; }
.rep-btn .pdf { color: #fff; background: #b3261e; font-size: 9.5px; font-weight: 800; padding: 1px 3px; border-radius: 2px; }
.rep-btn.consolidado { color: #1b7f3b; font-weight: 700; }
.rep-fechas { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-fechas input { width: 150px; height: 32px; padding: 2px 8px; }
.rep-fechas .rep-et:nth-of-type(2) { margin-left: 12px; }
@media (max-width: 560px) { .rep-cuerpo { grid-template-columns: 1fr; } .rep-botones { flex-direction: row; flex-wrap: wrap; } .rep-btn { flex: 1 1 45%; } .rep-opciones { margin-left: 0; } }

/* Reporte de caja en pantalla */
.rep-hoja { background: #fff; border: 1px solid #dfe6ee; border-radius: 6px; padding: 18px 22px; max-width: 1100px; }
.rep-hoja h2.rep-sec { background: #0d5fa6; color: #fff; font-size: 14px; padding: 5px 10px; border-radius: 3px; margin: 18px 0 8px; }
.rep-hoja h2.rep-sec.egr { background: #b3261e; }
.rep-hoja h2.rep-sec.res { background: #1b7f3b; }
.rep-hoja h3.rep-grupo { font-size: 13px; margin: 12px 0 4px; color: #10233a; border-bottom: 2px solid #c8d4e1; padding-bottom: 2px; }
.rep-hoja table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rep-hoja th { text-align: left; background: #f2f6fa; font-size: 11.5px; padding: 4px 6px; border-bottom: 1px solid #c8d4e1; }
.rep-hoja td { padding: 3px 6px; border-bottom: 1px solid #eef2f6; }
.rep-hoja .num { text-align: right; white-space: nowrap; }
.rep-hoja tr.sub td { font-weight: 700; background: #f7f9fb; border-top: 1px solid #c8d4e1; }
.rep-hoja tr.anul td { color: #999; text-decoration: line-through; }
.rep-hoja tr.tot td { font-weight: 800; font-size: 13.5px; background: #e9f0f8; border-top: 2px solid #0d5fa6; }
.rep-cab { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid #10233a; padding-bottom: 8px; }
.rep-cab h1 { margin: 0; font-size: 18px; }
.rep-cab .datos { font-size: 12.5px; line-height: 1.5; }
.rep-saldo { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 10px; }
.rep-saldo > div { background: #f2f6fa; border-radius: 6px; padding: 8px 12px; }
.rep-saldo span { display: block; font-size: 11.5px; color: #5b6b7c; }
.rep-saldo b { font-size: 17px; }
.rep-saldo .verde b { color: #1b7f3b; } .rep-saldo .rojo b { color: #b3261e; } .rep-saldo .azul { background: #0d5fa6; } .rep-saldo .azul span, .rep-saldo .azul b { color: #fff; }
.rep-hoja table.rep-saldos { border-collapse: separate; border-spacing: 8px 0; margin-left: -8px; width: calc(100% + 16px); }
.rep-hoja table.rep-saldos td { background: #f2f6fa; border-radius: 6px; padding: 8px 12px; border: 0; vertical-align: top; }
.rep-hoja table.rep-saldos span { display: block; font-size: 11.5px; color: #5b6b7c; }
.rep-hoja table.rep-saldos b { font-size: 16px; }
.rep-hoja table.rep-saldos td.v b { color: #1b7f3b; } .rep-hoja table.rep-saldos td.r b { color: #b3261e; }
.rep-hoja table.rep-saldos td.a { background: #0d5fa6; } .rep-hoja table.rep-saldos td.a span, .rep-hoja table.rep-saldos td.a b { color: #fff; }
.rep-hoja .rep-cabt td { border: 0; }
@media (max-width: 800px) { .rep-hoja { overflow-x: auto; padding: 12px; } }
.rep-ayuda { margin: 10px 0 0 60px; font-size: 11.5px; color: #5b6b7c; line-height: 1.4; }
@media (max-width: 560px) { .rep-ayuda { margin-left: 0; } }

/* Caja → Cobranzas clientes */
.cob-grid { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .cob-grid { grid-template-columns: 1fr; } }
.cob-buscar { display: flex; gap: 6px; margin-bottom: 8px; }
.cob-buscar input { flex: 1; }
.cob-lista { max-height: 520px; overflow-y: auto; border: 1px solid #e3e9f0; border-radius: 6px; }
.cob-lista table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cob-lista th { position: sticky; top: 0; background: #f2f6fa; text-align: left; padding: 6px 8px; font-size: 11.5px; }
.cob-lista tfoot th { position: sticky; bottom: 0; }
.cob-lista td { padding: 6px 8px; border-top: 1px solid #eef2f6; cursor: pointer; }
.cob-lista tbody tr:hover td { background: #fff8d6; }
.cob-lista tr.activo td { background: #fff1a8; }
.cob-lista .num { text-align: right; white-space: nowrap; }
.cob-paga { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.cob-paga .campo { margin: 0; }
.cob-paga input.grande { font-size: 22px; font-weight: 700; text-align: right; height: 46px; width: 220px; }
.cob-cobro input.mal, .cob-paga input.mal { border-color: var(--error); background: #fdecea; }

/* Aperturas → Personal */
.pers-conteo { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pers-conteo a { display: block; background: #fff; border: 1px solid #dfe6ee; border-radius: 8px; padding: 10px 14px; text-decoration: none; color: inherit; }
.pers-conteo a:hover { border-color: #0d5fa6; }
.pers-conteo a.activo { border-color: #0d5fa6; box-shadow: inset 0 0 0 1px #0d5fa6; }
.pers-conteo span { display: block; font-size: 12px; color: #5b6b7c; }
.pers-conteo b { font-size: 22px; }
.pers-funciones { display: flex; gap: 22px; flex-wrap: wrap; padding: 6px 0; }

/* Botón Modificar comprobante */
.btn.btn-modificar { background: #e0a800; border-color: #e0a800; color: #10233a; }
.btn.btn-modificar:hover { background: #c99700; border-color: #c99700; }
.btn.deshabilitado { opacity: .45; cursor: help; }
/* Comprobantes: los botones de cada fila en dos filas para que no se corten */
td.acciones-venta { white-space: normal; width: 185px; }
td.acciones-venta .btn { margin: 2px 0; }
td.acciones-venta .btn-modificar, td.acciones-venta .deshabilitado { display: block; width: 100%; text-align: center; margin-top: 4px; }

/* Reportes → Ventas por vendedor */
.vv-filtros { align-items: flex-end; }
.vv-filtros .vv-et { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: #3a4b5c; }
.vv-hoja h2.vv-sec { background: #0d5fa6; color: #fff; font-size: 14px; padding: 5px 10px; border-radius: 3px; margin: 18px 0 8px; }
.vv-hoja h2.vv-sec.vend { background: #1b7f3b; }
.vv-hoja h3.vv-grupo { font-size: 13px; margin: 12px 0 4px; color: #10233a; border-bottom: 2px solid #c8d4e1; padding-bottom: 2px; }
.vv-hoja h3.vv-grupo small { font-weight: 400; color: #5b6b7c; }
.vv-hoja table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.vv-hoja th { text-align: left; background: #f2f6fa; font-size: 11.5px; padding: 4px 6px; border-bottom: 1px solid #c8d4e1; }
.vv-hoja td { padding: 3px 6px; border-bottom: 1px solid #eef2f6; }
.vv-hoja .num { text-align: right; white-space: nowrap; }
.vv-hoja tr.sub td { font-weight: 700; background: #f7f9fb; border-top: 1px solid #c8d4e1; }
.vv-hoja tr.anul td { color: #999; text-decoration: line-through; }
.vv-hoja tr.tot td { font-weight: 800; font-size: 13.5px; background: #e9f0f8; border-top: 2px solid #0d5fa6; }
.vv-hoja .vv-cab td { border: 0; }
.vv-filtros .vv-et select, .vv-filtros .vv-et input { flex: none; height: 38px; }
.vv-filtros .vv-et select[name=vendedor] { min-width: 280px; }
.vv-filtros .casilla { align-self: center; }
.vv-filtros > .btn { align-self: flex-end; }
.vv-imprimir { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; align-self: flex-end; }
.vv-hojas { font-size: 11.5px; color: #0d5fa6; font-weight: 600; white-space: nowrap; min-height: 14px; }

/* Cuántas hojas se imprimirán (js/hojas.js) */
.hojas-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 9px; background: rgba(13, 95, 166, .12); color: inherit; font-size: 11px; font-weight: 700; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.hojas-badge:empty { display: none; }
.btn:not(.sec) .hojas-badge { background: rgba(255, 255, 255, .28); }
.rep-btn .hojas-badge { margin-left: 4px; }

/* Reportes → Ventas por producto */
.vp-hoja h2.vp-sec { background: #0d5fa6; color: #fff; font-size: 14px; padding: 5px 10px; border-radius: 3px; margin: 16px 0 8px; }
.vp-hoja h3.vp-prod { font-size: 13px; margin: 16px 0 4px; padding: 5px 8px; background: #e9f3ec; border-left: 4px solid #1b7f3b; border-radius: 2px; }
.vp-hoja h3.vp-prod small { font-weight: 400; color: #3a4b5c; }
.vp-hoja tr.nc td { color: #b3261e; }
.vp-hoja .neg { color: #b3261e; }
.vp-hoja .vp-nota { font-size: 11.5px; color: #5b6b7c; margin: 6px 0 0; }
/* Buscador de productos del reporte */
.vp-buscador { position: relative; }
.vp-caja { position: relative; }
.vp-caja input[type=text] { min-width: 260px; height: 38px; padding-right: 30px; }
.vp-quitar { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #8a96a3; cursor: pointer; font-size: 14px; padding: 2px 4px; }
.vp-quitar:hover { color: var(--error); }
.vp-sugerencias { position: absolute; z-index: 30; left: 0; top: calc(100% + 2px); min-width: 100%; width: 420px; max-height: 320px; overflow-y: auto; margin: 0; padding: 4px 0; list-style: none;
    background: #fff; border: 1px solid #c8d4e1; border-radius: 6px; box-shadow: 0 8px 24px rgba(16, 35, 58, .16); font-weight: 400; color: #10233a; }
.vp-sugerencias li { padding: 6px 10px; cursor: pointer; font-size: 13px; }
.vp-sugerencias li b { color: #0d5fa6; margin-right: 4px; }
.vp-sugerencias li small { color: #5b6b7c; }
.vp-sugerencias li.activo, .vp-sugerencias li:hover { background: #fff1a8; }
.vp-sugerencias li.vacio { color: #5b6b7c; cursor: default; background: none; }
/* Pagos a proveedores: lista de proveedores más angosta para que entre toda la tabla de documentos */
.cob-grid.pagos-grid { grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); }
.pagos-grid .cob-cobro td, .pagos-grid .cob-cobro th { padding-left: 8px; padding-right: 8px; }
/* Fila recién registrada (Cuentas por cobrar / por pagar) */
tr.fila-nueva td { background: #fff8d6; }

/* Reportes → Cuentas por cobrar / por pagar */
.rc-hoja h2.rc-sec { background: #0d5fa6; color: #fff; font-size: 14px; padding: 5px 10px; border-radius: 3px; margin: 16px 0 8px; }
.rc-hoja h3.rc-quien { font-size: 13px; margin: 16px 0 4px; padding: 5px 8px; background: #eef3f8; border-left: 4px solid #0d5fa6; border-radius: 2px; }
.rc-hoja h3.rc-quien small { font-weight: 400; color: #3a4b5c; }
.rc-hoja .neg { color: #b3261e; }
.rc-hoja .rc-nota { font-size: 12.5px; margin: 6px 0 0; }
/* Tallas y colores */
.lista-atributos .fila-form { grid-template-columns: 1fr 150px 90px 110px 90px; }
.muestra-color { display: inline-flex; align-items: center; gap: 8px; }
.punto-color { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #b9c3cf; vertical-align: -1px; margin-right: 4px; }
.lista-marcas .fila-form { grid-template-columns: 1fr 90px 90px 110px 90px; }
.lista-modelos .fila-form { grid-template-columns: 1fr 220px 90px 110px 90px; }
.lista-conceptos .fila-form { grid-template-columns: 1fr 100px 110px 100px 90px; }
/* Configuración → Tipo de empresa */
.tipos-empresa { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tipo-empresa { display: flex; flex-direction: column; gap: 4px; border: 2px solid #d6dee8; border-radius: 8px; padding: 10px 12px; cursor: pointer; background: #fff; }
.tipo-empresa input { margin: 0 0 2px; align-self: flex-start; }
.tipo-empresa strong { font-size: 15px; color: #0d3b66; }
.tipo-empresa small { color: #5b6b7d; line-height: 1.35; }
.tipo-empresa.elegido { border-color: #0d5fa6; background: #eef5fc; }

/* Barra de ventanas en espera (minimizadas) */
.dock-espera { position: fixed; left: 290px; right: 18px; bottom: 0; z-index: 900; display: flex; flex-wrap: wrap-reverse; justify-content: flex-end; align-items: flex-end; gap: 6px; pointer-events: none; }
.dock-espera > * { pointer-events: auto; }
.dock-espera .pos-en-espera { position: static; display: inline-flex; align-items: center; gap: 6px; max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-espera .pos-en-espera span { margin-left: 6px; }
.ventana-espera .restaurar { cursor: pointer; }
.ventana-espera .descartar { background: transparent; border: 0; color: #c9d6e3; font-size: 14px; cursor: pointer; padding: 0 2px; }
.ventana-espera .descartar:hover { color: #fff; }
@media (max-width: 800px) { .dock-espera { left: 10px; right: 10px; } }
@media print { .dock-espera { display: none !important; } }
.btn-minimizar { background: #fff8e1 !important; border-color: #e0a800 !important; color: #6b4e00 !important; }
/* ---------- Inicio: accesos por módulo ---------- */
.inicio-accesos { max-width: 1180px; margin: 0 auto; }
.inicio-saludo { text-align: center; font-size: 30px; margin: 10px 0 4px; letter-spacing: -.5px; }
.inicio-pregunta { text-align: center; margin: 0 0 18px; }
.inicio-buscador { position: relative; max-width: 580px; margin: 0 auto 26px; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #9fc3e8; border-radius: 12px; padding: 0 14px; box-shadow: 0 4px 16px rgba(13, 95, 166, .08); }
.inicio-buscador:focus-within { border-color: #0d5fa6; box-shadow: 0 0 0 3px rgba(13, 95, 166, .15); }
.inicio-buscador .icono { width: 18px; height: 18px; color: #5b6b7d; flex: none; }
.inicio-buscador input { flex: 1; border: 0 !important; box-shadow: none !important; outline: none; font-size: 16px; padding: 14px 0 !important; background: transparent; }
.inicio-buscador kbd { font: 11px ui-monospace, Consolas, monospace; color: #5b6b7d; border: 1px solid #d6dee8; border-radius: 5px; padding: 3px 6px; background: #f7f9fb; }
.inicio-resultados { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid #d6dee8; border-radius: 10px; box-shadow: 0 12px 30px rgba(16, 35, 58, .15); }
.inicio-resultados li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.inicio-resultados li .icono { width: 18px; height: 18px; color: #0d5fa6; }
.inicio-resultados li small { margin-left: auto; color: #5b6b7d; }
.inicio-resultados li.activo, .inicio-resultados li:hover { background: #eef5fc; }
.inicio-resultados li.vacio { color: #5b6b7d; cursor: default; }
.accesos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.acceso { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px 18px; background: #fff; border: 1px solid #e3e9f0; border-radius: 16px; cursor: pointer; font: inherit; color: #10233a; box-shadow: 0 2px 8px rgba(16, 35, 58, .05); transition: transform .15s, box-shadow .15s; }
.acceso:hover, .acceso.abierto { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(16, 35, 58, .12); }
.acceso:disabled { opacity: .5; cursor: default; transform: none; }
.acceso-icono { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.acceso-icono .icono { width: 30px; height: 30px; color: #fff; }
.acceso strong { font-size: 14px; letter-spacing: .3px; }
.acceso small { color: #5b6b7d; font-size: 12px; text-align: center; line-height: 1.3; }
.acceso-opciones { grid-column: 1 / -1; background: #fff; border: 1px solid #e3e9f0; border-radius: 14px; padding: 12px 14px 14px; box-shadow: 0 8px 22px rgba(16, 35, 58, .08); }
.acceso-opciones-cab { display: flex; align-items: center; justify-content: space-between; border-left: 4px solid; padding-left: 10px; margin-bottom: 10px; }
.acceso-opciones-cab .cerrar-opciones { border: 0; background: transparent; font-size: 16px; cursor: pointer; color: #5b6b7d; }
.acceso-opciones-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.acceso-op { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e3e9f0; border-radius: 10px; color: #10233a; text-decoration: none; background: #f9fbfd; }
.acceso-op:hover { border-color: #0d5fa6; background: #eef5fc; text-decoration: none; }
.acceso-op .icono { width: 18px; height: 18px; color: #0d5fa6; flex: none; }

/* Íconos del Inicio: un solo color, azul martillado (metálico con textura de martillado) */
.acceso-icono {
    background:
        radial-gradient(circle at 22% 18%, rgba(255,255,255,.45) 0 6%, transparent 22%),
        radial-gradient(circle at 70% 30%, rgba(255,255,255,.18) 0 4%, transparent 14%),
        radial-gradient(circle at 35% 70%, rgba(0,0,0,.18) 0 5%, transparent 16%),
        radial-gradient(circle at 78% 78%, rgba(255,255,255,.14) 0 5%, transparent 15%),
        radial-gradient(circle at 55% 52%, rgba(0,0,0,.10) 0 6%, transparent 18%),
        linear-gradient(145deg, #6fa8dc 0%, #2f6db3 38%, #1d4f8c 65%, #12345f 100%);
    box-shadow: inset 0 1px 1px rgba(255,255,255,.55), inset 0 -2px 4px rgba(0,0,0,.35), 0 8px 18px rgba(18, 52, 95, .35);
}

/* Logo del desarrollador en el menú lateral */
.marca-logo { display: block; padding: 0 4px 12px; text-decoration: none; }
.marca-logo img { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.marca-logo:hover img { filter: brightness(1.08); }

/* Inicio de sesión: logo del desarrollador a la izquierda, ingreso a la derecha */
.pagina-login.con-logo { gap: 56px; flex-wrap: wrap; padding: 24px; }
.login-logo { flex: 0 1 560px; text-align: center; }
.login-logo img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 0 0 1px rgba(120, 190, 255, .25); }
.login-logo p { margin: 16px 0 0; color: #bcd6ee; font-size: 15px; letter-spacing: .3px; }
@media (max-width: 900px) { .pagina-login.con-logo { gap: 24px; flex-direction: column; } .login-logo { flex-basis: auto; width: min(420px, 100%); } }
.pagina-login.con-logo .caja-login { flex: 0 1 380px; }

/* Indicador de conexión (barra superior) */
.estado-red { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; margin-right: 8px; border-radius: 999px;
    background: #eef2f7; color: #475569; font-size: 12px; font-weight: 600; vertical-align: middle; cursor: default; }
.estado-red i { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.estado-red.ok i { background: #16a34a; }
.estado-red.sin i { background: #dc2626; }
.estado-red.sin { background: #fef2f2; color: #b91c1c; }

/* Fecha y hora del sistema (barra superior) */
.reloj-sistema { display: inline-block; margin-left: 8px; color: var(--suave); font-size: 12px; font-variant-numeric: tabular-nums; vertical-align: middle; }
