:root {
  --tinta: #14213d;
  --tinta-2: #1f3a5f;
  --texto: #1d2430;
  --suave: #5b6576;
  --linea: #dfe3ea;
  --fondo: #f4f6f9;
  --panel: #ffffff;
  --acento: #1f6feb;
  --acento-suave: #e8f0fe;
  --ok: #1a7f4b;
  --ok-suave: #e3f4ea;
  --alerta: #b54708;
  --alerta-suave: #fef0e1;
  --error: #c0362c;
  --error-suave: #fde8e6;
  --radio: 8px;
  --sombra: 0 1px 2px rgba(20, 33, 61, .06), 0 4px 16px rgba(20, 33, 61, .06);
  font-size: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acento); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--tinta); margin: 0 0 .6rem; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.cargando { padding: 4rem; text-align: center; color: var(--suave); }

/* ---------- layout ---------- */
.marco { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.lateral {
  background: var(--tinta); color: #c9d3e3; padding: 1rem .75rem; position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
}
.marca { color: #fff; font-weight: 700; font-size: 1.05rem; padding: .25rem .5rem 1rem; letter-spacing: .01em; }
.marca small { display: block; font-weight: 400; color: #8fa0bb; font-size: .78rem; margin-top: .15rem; }
.empresa-actual {
  background: rgba(255,255,255,.07); border-radius: var(--radio); padding: .6rem .7rem; margin-bottom: 1rem;
  font-size: .85rem; cursor: pointer;
}
.empresa-actual b { color: #fff; display: block; font-size: .9rem; }
.empresa-actual:hover { background: rgba(255,255,255,.12); }
.nav-grupo { margin: .9rem 0 .3rem; padding: 0 .5rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #7f90ad; }
.nav a {
  display: block; color: #c9d3e3; padding: .42rem .6rem; border-radius: 6px; font-size: .9rem;
}
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.nav a.activo { background: var(--acento); color: #fff; }
.principal { padding: 1.4rem 2rem 3rem; min-width: 0; }
.barra {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap;
}
.barra .acciones { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.usuario { color: var(--suave); font-size: .85rem; }

/* ---------- componentes ---------- */
.tarjeta { background: var(--panel); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.tarjeta.sin-relleno { padding: 0; overflow: hidden; }
.grilla { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { padding: 1rem 1.1rem; }
.kpi .etq { color: var(--suave); font-size: .8rem; }
.kpi .val { font-size: 1.35rem; font-weight: 650; color: var(--tinta); margin-top: .25rem; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: .78rem; color: var(--suave); margin-top: .2rem; }
.kpi .sub.mal { color: var(--error); }

button, .boton {
  font: inherit; border: 1px solid var(--linea); background: #fff; color: var(--texto); padding: .45rem .85rem;
  border-radius: 6px; cursor: pointer; font-weight: 550; display: inline-flex; align-items: center; gap: .35rem;
}
button:hover, .boton:hover { border-color: #b8c1cf; text-decoration: none; }
button.primario, .boton.primario { background: var(--acento); border-color: var(--acento); color: #fff; }
button.primario:hover { background: #1960d0; }
button.peligro { color: var(--error); border-color: #f1c4bf; }
button.peligro:hover { background: var(--error-suave); }
button.mini { padding: .2rem .5rem; font-size: .8rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.enlace { border: 0; background: none; color: var(--acento); padding: 0; }

input, select, textarea {
  font: inherit; color: var(--texto); border: 1px solid var(--linea); border-radius: 6px; padding: .42rem .55rem;
  background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acento-suave); border-color: var(--acento); }
input[type=checkbox] { width: auto; }
input.num { text-align: right; font-variant-numeric: tabular-nums; }
label { display: block; font-size: .8rem; color: var(--suave); margin-bottom: .2rem; font-weight: 550; }
.campo { margin-bottom: .75rem; }
.fila-campos { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.check { display: flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--texto); }
.filtros { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1rem; }
.filtros .campo { margin: 0; min-width: 140px; }

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-weight: 600; color: var(--suave); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
     padding: .55rem .7rem; border-bottom: 1px solid var(--linea); background: #fafbfc; white-space: nowrap; position: sticky; top: 0; }
td { padding: .5rem .7rem; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
tr.clic { cursor: pointer; }
tr.clic:hover td { background: #f7f9fc; }
tr.sel td { background: var(--acento-suave) !important; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.neg { color: var(--error); }
tr.titulo td { font-weight: 650; color: var(--tinta); background: #f7f9fc; }
tr.subtotal td { font-weight: 600; border-top: 1px solid var(--linea); }
tr.total td { font-weight: 700; background: #eef3fa; border-top: 2px solid var(--tinta-2); }
tfoot td { font-weight: 700; background: #eef3fa; border-top: 2px solid var(--tinta-2); }
.tabla-scroll { overflow-x: auto; max-height: 70vh; }
.vacio { text-align: center; color: var(--suave); padding: 2rem; }

.etiqueta { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eef1f5; color: var(--suave); }
.etiqueta.ok { background: var(--ok-suave); color: var(--ok); }
.etiqueta.alerta { background: var(--alerta-suave); color: var(--alerta); }
.etiqueta.error { background: var(--error-suave); color: var(--error); }
.etiqueta.info { background: var(--acento-suave); color: var(--acento); }
.nota { background: var(--alerta-suave); color: #7a3306; padding: .6rem .8rem; border-radius: 6px; font-size: .85rem; margin-bottom: 1rem; }
.nota.info { background: var(--acento-suave); color: #18407f; }
.nota.ok { background: var(--ok-suave); color: #11532f; }
.suave { color: var(--suave); }
.derecha { text-align: right; }
.pestanas { display: flex; gap: .25rem; border-bottom: 1px solid var(--linea); margin-bottom: 1rem; flex-wrap: wrap; }
.pestanas button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--suave); padding: .5rem .8rem; }
.pestanas button.activo { color: var(--acento); border-bottom-color: var(--acento); }

/* ---------- comprobantes ---------- */
.comp-marco { display: grid; grid-template-columns: 190px 1fr; align-items: start; }
.comp-lateral { display: flex; flex-direction: column; margin-top: .6rem; }
.comp-lateral button { border: 0; border-left: 4px solid transparent; border-radius: 0; background: #eceff3; text-align: left; padding: .75rem .9rem; color: var(--suave); justify-content: flex-start; }
.comp-lateral button.activo { background: #fff; border-left-color: #f08a24; color: var(--texto); font-weight: 650; }
.comp-panel { padding: 0; overflow: hidden; }
.comp-cab { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--linea); font-size: 1rem; }
.comp-tabla td { padding: .6rem .7rem; }
.comp-pag { display: flex; gap: .4rem; justify-content: center; align-items: center; padding: .8rem; }
.comp-acciones { display: flex; gap: .5rem; flex-wrap: wrap; padding: .2rem 1rem 1rem; }
.comp-acciones button { letter-spacing: .03em; }
.menu-exp { position: absolute; right: 0; top: 110%; background: #fff; border: 1px solid var(--linea); border-radius: 8px; box-shadow: var(--sombra); z-index: 20; min-width: 290px; padding: .3rem; }
.menu-exp button { display: block; width: 100%; text-align: left; border: 0; padding: .55rem .7rem; font-weight: 500; }
.menu-exp button:hover { background: var(--acento-suave); }

/* ---------- modal ---------- */
.fondo-modal { position: fixed; inset: 0; background: rgba(20, 33, 61, .45); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 10px; width: min(640px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.ancho { width: min(1100px, 100%); }
.modal-cab { padding: 1rem 1.2rem; border-bottom: 1px solid var(--linea); display: flex; justify-content: space-between; align-items: center; }
.modal-cab h2 { margin: 0; }
.modal-cuerpo { padding: 1.1rem 1.2rem; }
.modal-pie { padding: .8rem 1.2rem; border-top: 1px solid var(--linea); display: flex; gap: .5rem; justify-content: flex-end; background: #fafbfc; border-radius: 0 0 10px 10px; }

/* ---------- avisos ---------- */
#avisos { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 100; }
.aviso { background: var(--tinta); color: #fff; padding: .7rem 1rem; border-radius: 8px; box-shadow: var(--sombra); max-width: 420px; font-size: .9rem; }
.aviso.error { background: var(--error); }
.aviso.ok { background: var(--ok); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--tinta) 0%, var(--tinta-2) 100%); }
.login .tarjeta { width: min(380px, 92vw); padding: 2rem; }
.login h1 { margin-bottom: .2rem; }

/* ---------- gráfico ---------- */
.grafico { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: .5rem; }
.grafico .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.grafico .barras { display: flex; gap: 2px; align-items: flex-end; height: 140px; width: 100%; justify-content: center; }
.grafico .b { width: 42%; border-radius: 3px 3px 0 0; min-height: 1px; }
.grafico .b.v { background: var(--acento); }
.grafico .b.c { background: #9fb3d1; }
.grafico .mes { font-size: .68rem; color: var(--suave); }
.leyenda { display: flex; gap: 1rem; font-size: .8rem; color: var(--suave); }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }

/* ---------- liquidación imprimible ---------- */
.liquidacion { font-size: .9rem; }
.liquidacion table td { padding: .3rem .4rem; }
.liquidacion .cab { display: flex; justify-content: space-between; border-bottom: 2px solid var(--tinta); padding-bottom: .6rem; margin-bottom: .8rem; }
.firma { margin-top: 3rem; display: flex; justify-content: space-around; }
.firma div { border-top: 1px solid #555; padding-top: .3rem; width: 40%; text-align: center; font-size: .8rem; }

@media print {
  body * { visibility: hidden; }
  .imprimible, .imprimible * { visibility: visible; }
  .imprimible { position: absolute; left: 0; top: 0; width: 100%; }
  .fondo-modal { background: none; padding: 0; }
  .modal { box-shadow: none; }
  .modal-pie, .modal-cab button, .no-imprimir { display: none !important; }
}
@media (max-width: 900px) {
  .marco { grid-template-columns: 1fr; }
  .lateral { position: static; height: auto; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principal { padding: 1rem; }
}

/* editor de comprobantes */
.modal.modal-editor { width: min(1460px, 76vw); min-height: 66vh; max-height: 90vh; display: flex; flex-direction: column; }
.fondo-editor { padding: 1rem; overflow: hidden; align-items: center; }
.modal-editor .modal-cuerpo { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.modal-editor .modal-cuerpo > div { flex: 1; display: flex; flex-direction: column; }
.modal-editor .tabla-scroll { max-height: none; }
.modal-editor .modal-cuerpo > div > button { align-self: flex-start; }
.modal-editor .modal-pie { flex-shrink: 0; }
.editor-lineas td { padding: .3rem .35rem; }
.editor-lineas input, .editor-lineas select { padding: .35rem .45rem; }
input.invalido { border-color: var(--error); background: var(--error-suave); }
.mod-link { margin-left: .6rem; font-size: .8rem; opacity: 0; }
tr:hover .mod-link, tr.sel .mod-link { opacity: 1; }

/* comprobantes a pantalla completa */
.comp-marco { min-height: calc(100vh - 175px); }
.comp-panel { display: flex; flex-direction: column; height: calc(100vh - 175px); margin-bottom: 0; }
.comp-cuerpo { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.comp-scroll { flex: 1; max-height: none; overflow: auto; }
.comp-pag, .comp-acciones { flex-shrink: 0; border-top: 1px solid var(--linea); }
.comp-acciones { padding-top: .8rem; }

/* menú lateral oculto: aparece al llevar el mouse al borde izquierdo */
.marco { display: block; }
.lateral { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; height: 100vh; z-index: 45;
  transform: translateX(calc(-100% + 10px)); transition: transform .22s ease, box-shadow .22s ease; }
.lateral::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 10px; background: var(--tinta);
  border-right: 3px solid var(--acento); opacity: .9; }
.lateral:hover, .lateral.abierto { transform: translateX(0); box-shadow: 8px 0 30px rgba(20, 33, 61, .35); }
.lateral:hover::after, .lateral.abierto::after { opacity: 0; }
.principal { padding-left: 3.2rem; }
.menu-btn { position: fixed; left: 18px; top: 14px; z-index: 44; padding: .25rem .55rem; font-size: 1.1rem; background: #fff; }
.principal > div > .barra:first-child h1, .principal .barra h1 { margin-left: 1.6rem; }
@media (max-width: 900px) {
  .lateral { position: fixed; height: 100vh; }
  .principal { padding-left: 2.4rem; }
}

/* carga masiva de archivos */
.zona-soltar { border: 2px dashed var(--linea); border-radius: 8px; padding: .9rem 1rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; background: #fafbfc; }
.zona-soltar.activa { border-color: var(--acento); background: var(--acento-suave); }

/* menú plegable estilo Nubox */
.nav-inicio { margin-bottom: .4rem; font-weight: 600; }
.nav-bloque.nivel0 { border-bottom: 1px solid rgba(255,255,255,.07); }
.nav-cab { all: unset; box-sizing: border-box; width: 100%; display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; color: #e3e9f3; padding: .55rem .6rem; border-radius: 6px; font-size: .9rem; font-weight: 600; }
.nav-cab:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-cab.con-activo { color: #fff; }
.nav-cab.nivel1 { font-weight: 500; font-size: .86rem; color: #c9d3e3; padding-left: 1rem; }
.nav-signo { font-size: 1rem; opacity: .75; width: 1rem; text-align: center; }
.nav-items { padding-bottom: .35rem; }
.nav-bloque.nivel0 > .nav-items > a { padding-left: 1rem; font-size: .86rem; }
.nav-bloque.nivel1 > .nav-items > a { padding-left: 1.6rem; font-size: .83rem; }
.lateral { width: 260px; }

/* honorarios estilo Nubox */
.comp-marco.sin-lateral { grid-template-columns: 1fr; }
.comp-cab { display: flex; justify-content: space-between; align-items: center; }
tr.fila-nula td { color: #9aa3b2; background: #fbf7f7; }
tr.fila-nula.sel td { background: var(--acento-suave); }
.nota.alerta { background: #fff4e0; color: #7a4a00; border: 1px solid #f3d29a; }

/* ------------------------------------------------ reportes en formato hoja */
.hoja-marco { padding: 0; overflow: hidden; }
.hoja-barra { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--linea); background: #fff; }
.hoja-zona { background: #eef1f5; padding: 1.4rem; max-height: calc(100vh - 230px); overflow: auto; }
.hoja { background: #fff; max-width: 1150px; margin: 0 auto; padding: 2rem 2.6rem 2.4rem; box-shadow: 0 2px 10px rgba(16,24,40,.12);
  border-radius: 2px; font-size: .78rem; color: #1b2430; position: relative; }
.hoja-enc { position: relative; margin-bottom: 1.1rem; }
.hoja-emp { font-size: .74rem; line-height: 1.35; }
.hoja-emp-nom { font-weight: 600; }
.hoja-rep { font-weight: 700; }
.hoja-pag { position: absolute; right: 0; top: 0; font-size: .74rem; }
.hoja-titulo { text-align: center; font-size: 1.15rem; font-weight: 800; letter-spacing: .02em; margin-top: .9rem; }
.hoja-sub { text-align: center; font-weight: 700; font-size: .78rem; margin-top: .35rem; }
.hoja-cuenta { font-weight: 700; margin: .4rem 0 .5rem; }
.hoja-tabla { width: 100%; border-collapse: collapse; }
.hoja-tabla th { font-weight: 700; font-size: .72rem; padding: .3rem .45rem; border-bottom: 1px solid #1b2430; white-space: nowrap; text-transform: none; color: #1b2430; background: none; }
.hoja-tabla thead tr:first-child th { border-top: 1px solid #1b2430; }
.hoja-tabla .hoja-grupos th { text-align: center; border-bottom: 1px solid #1b2430; font-size: .7rem; letter-spacing: .03em; }
.hoja-tabla .hoja-grupos th:first-child { border-bottom: none; }
.hoja-tabla td { padding: .28rem .45rem; border: none; white-space: nowrap; }
.hoja-tabla td.n, .hoja-tabla th.n { text-align: right; font-variant-numeric: tabular-nums; }
.hoja-tabla tbody tr:hover td { background: #f4f7fb; }
.hoja-cta { text-align: left; width: 34%; white-space: normal !important; }
.hoja-link { color: inherit; cursor: pointer; text-decoration: none; }
.hoja-link:hover { color: var(--acento); text-decoration: underline; }
.hoja-sumas td { font-weight: 700; border-top: 1px solid #1b2430 !important; }
.hoja-totales td { font-weight: 700; border-top: 1px solid #1b2430 !important; border-bottom: 1px solid #1b2430 !important; }
.hoja-totales.final td { border-top: 2px solid #1b2430 !important; border-bottom: 3px double #1b2430 !important; font-size: .82rem; }
.hoja-seccion td { font-weight: 800; padding-top: .9rem !important; letter-spacing: .03em; }
.hoja-grupo td { font-weight: 700; padding-top: .45rem !important; }
.hoja-subt td { font-weight: 600; }
.hoja-estado .niv1 { padding-left: .9rem !important; } .hoja-estado .niv2 { padding-left: 1.8rem !important; } .hoja-estado .niv3 { padding-left: 2.7rem !important; }
.hoja-estado td.n { width: 13%; }
.hoja-aux { font-size: .7rem; color: #4a5568; }
.hoja-mayor td { vertical-align: top; }
.hoja-mayor tr.clic { cursor: pointer; }
.hoja-pie { margin-top: 2.2rem; text-align: center; font-size: .78rem; }
.hoja-pie p { max-width: 560px; margin: 0 auto; }
.hoja-firmas { display: flex; justify-content: space-around; margin-top: 3.2rem; gap: 2rem; }
.hoja-firmas > div { width: 240px; font-size: .74rem; }
.hoja-linea { border-top: 1px solid #1b2430; margin-bottom: .3rem; }
@media print {
  body.imprimiendo-hoja * { visibility: hidden; }
  body.imprimiendo-hoja .hoja, body.imprimiendo-hoja .hoja * { visibility: visible; }
  body.imprimiendo-hoja .hoja { position: absolute; left: 0; top: 0; width: 100%; max-width: none; box-shadow: none; padding: 0; }
  body.imprimiendo-hoja .hoja-zona { max-height: none; overflow: visible; }
  @page { size: landscape; margin: 12mm; }
}

/* campo de fecha dd-mm-aaaa con calendario */
.fecha-wrap { position: relative; display: block; width: 100%; }
.fecha-wrap > input.fecha-txt { width: 100%; padding-right: 2rem; }
.fecha-btn { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); border: none !important; background: none !important;
  box-shadow: none !important; cursor: pointer; padding: 0 .2rem !important; font-size: .95rem; line-height: 1; min-height: 0 !important; }
.fecha-nat { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
input.fecha-ajustada { background: #fff4e0 !important; transition: background .3s; }

.solo-lectura { padding: .45rem .6rem; background: #f3f5f8; border: 1px solid var(--linea); border-radius: 6px; color: #4a5568; min-height: 2.2rem; }

/* ---------- selector de productos (como Nubox) */
.selector-prod { min-height: 100vh; background: #a9a9a9; padding: 2.5rem 1rem; }
.selector-prod > .tarjeta { max-width: 900px; margin: 0 auto; padding: 1.4rem 1.2rem; }
.selector-prod h1 { color: #2f6ca3; font-size: 1.35rem; margin: 0 0 1rem; }
.prod-barra { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.prod-barra .acciones { display: flex; align-items: center; gap: .5rem; }
.buscar-prod { flex: 1 1 260px; max-width: 420px; }
.prod-lista { border: 1px solid #e3e3e3; }
.prod-titulo { background: #e9e9e9; color: #666; font-weight: 700; font-size: .78rem; letter-spacing: .03em; padding: .9rem 1.1rem; }
.prod-empresa { border-top: 1px solid #e3e3e3; }
.prod-cab { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1.1rem; cursor: pointer; }
.prod-cab:hover { background: #f6f8fb; }
.prod-acc { display: flex; align-items: center; gap: .8rem; }
.prod-flecha { background: #2f6ca3; color: #fff; border-radius: 4px; padding: 0 .55rem; font-size: .8rem; line-height: 1.3rem; }
.prod-fila { display: flex; align-items: center; gap: .6rem; padding: .6rem 1.1rem .6rem 3.2rem; border-top: 1px solid #efefef; color: inherit; text-decoration: none; }
.prod-fila:hover { background: #eef4fb; }
.prod-sigla { display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem; border-radius: 4px;
  color: #fff; font-weight: 700; font-size: .72rem; margin-right: .45rem; vertical-align: middle; }
.cambiar-prod { display: block; font-size: .74rem; color: #8fb3e0; margin-top: .3rem; }
a.boton { display: inline-flex; align-items: center; padding: .45rem .9rem; border: 1px solid var(--linea); border-radius: 6px;
  text-decoration: none; color: inherit; background: #fff; }
a.boton.primario { background: var(--acento); color: #fff; border-color: transparent; }

/* ---------- remuneraciones (Nubox) */
.migas { font-size: .78rem; color: var(--suave); margin: 0 0 .1rem 1.6rem; }
.vacio-rem { text-align: center; padding: 3rem 1rem; color: var(--texto); }
.vacio-rem .vacio-ico { font-size: 3.2rem; opacity: .55; margin-bottom: .6rem; }
.vacio-rem b { display: block; font-size: 1.05rem; font-weight: 600; margin-bottom: .3rem; }
.hoja-doc { background: #fff; padding: 1.4rem 1.8rem; line-height: 1.55; font-size: .92rem; }
.doc-cab { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.doc-titulo { text-align: center; font-size: 1.1rem; letter-spacing: .03em; margin: .6rem 0 1rem; }
.doc-tabla { width: 100%; border-collapse: collapse; margin: .6rem 0 1rem; }
.doc-tabla td { padding: .35rem .5rem; border-bottom: 1px solid var(--linea); }
.doc-tabla td.n { text-align: right; white-space: nowrap; }
.doc-tabla tr.total td { font-weight: 700; border-top: 2px solid var(--texto); border-bottom: none; }
.doc-texto { white-space: pre-wrap; font-family: Georgia, "Times New Roman", serif; }
.doc-editor { width: 100%; font-family: Georgia, "Times New Roman", serif; font-size: .9rem; line-height: 1.5; padding: .8rem; box-sizing: border-box; }
.variables-doc { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin: .6rem 0; }
.chip { font-size: .72rem; padding: .15rem .5rem; border-radius: 999px; background: var(--acento-suave); color: var(--acento); border: 1px solid transparent; cursor: pointer; }
.chip:hover { border-color: var(--acento); }
.lista-marcas { max-height: 260px; overflow: auto; border: 1px solid var(--linea); border-radius: 6px; padding: .4rem .7rem; display: grid; gap: .2rem; }
.solo-imprimir { display: none; }
.fin-prev { background: var(--fondo); border-radius: 8px; padding: .5rem 1rem; }
.ind-grilla { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .8rem; }
.ind-grilla > div { display: grid; gap: 1rem; align-content: start; }
.ind-tarjeta { background: #fff; border: 1px solid var(--linea); border-radius: 8px; padding: .3rem 1rem .8rem; }
.ind-tit { display: inline-block; background: var(--fondo); font-weight: 600; font-size: .82rem; padding: .35rem .7rem; border-radius: 4px; margin: .5rem 0 .5rem -.4rem; }
.ind-fila { display: flex; justify-content: space-between; padding: .3rem 0; font-size: .86rem; }
.ind-tabla { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ind-tabla th { font-size: .74rem; color: var(--suave); text-align: left; font-weight: 600; padding: .25rem .3rem; }
.ind-tabla td { padding: .3rem; }
.ind-tabla .n { text-align: right; }
@media (max-width: 900px) { .ind-grilla { grid-template-columns: 1fr; } }
@media print {
  .solo-imprimir { display: block !important; }
  .doc-editor { display: none !important; }
}

/* ---------- liquidación de sueldo (formato tipo Nubox, sobrio) */
.lq-marco { background: #eef1f5; margin: -1rem; padding: 1.2rem; }
.lq-ajustes { background: #fff; border: 1px solid var(--linea); border-radius: 8px; padding: .6rem 1rem; margin: 0 auto 1rem; max-width: 816px; }
.lq-ajustes summary { cursor: pointer; font-weight: 600; }
.lq-hoja { background: #fff; max-width: 816px; margin: 0 auto; padding: 40px 48px 30px; color: #000; font-size: 12px; line-height: 1.35; }
.lq-hoja b, .lq-hoja strong { font-weight: 700; }
.lq-titulo { text-align: center; font-size: 15px; font-weight: 700; letter-spacing: .04em; margin-bottom: 12px; }
.lq-mes { font-size: 11.5px; padding-bottom: 6px; }
.lq-datos { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #000; }
.lq-dato { padding: 6px 12px 6px 0; border-bottom: 1px solid #000; min-width: 0; }
.lq-dato.ancho2 { grid-column: span 2; }
.lq-dato small { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.lq-dato div { text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lq-kpis { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid #000; padding: 6px 0; }
.lq-kpi { text-align: center; }
.lq-kpi small { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.lq-kpi b { font-weight: 400; font-size: 12px; }
.lq-nota { margin-top: 4px; font-size: 11px; }
.lq-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; min-height: 330px; }
.lq-col-tit { font-size: 11px; font-weight: 700; text-align: center; border-bottom: 1px solid #000; padding-bottom: 3px; margin-bottom: 4px; }
.lq-linea { display: flex; justify-content: space-between; gap: 10px; padding: 1px 0; text-transform: uppercase; }
.lq-linea span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lq-sub { font-weight: 700; }
.lq-sep { height: 10px; }
.lq-resumen { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; margin-top: 14px; padding: 4px 0; border-top: 1px solid #000; border-bottom: 1px solid #000; }
.lq-resumen .lq-linea { padding: 2px 0; }
.lq-son { padding: 6px 0; border-bottom: 1px solid #000; font-size: 11.5px; text-transform: uppercase; }
.lq-recibi { margin: 14px 0 0; font-size: 11.5px; }
.lq-firmas { display: flex; justify-content: space-around; margin-top: 80px; }
.lq-firmas div { width: 36%; border-top: 1px solid #000; padding-top: 4px; text-align: center; font-size: 10.5px; font-weight: 700; }
.lq-pie { margin-top: 24px; font-size: 9px; color: #555; }
/* hoja tamaño carta: el contenido se reparte en toda la página y las firmas van al pie */
.lq-hoja.hoja-carta { display: flex; flex-direction: column; min-height: 1000px; box-sizing: border-box; }
.lq-hoja.hoja-carta .lq-cols { flex: 1 0 auto; }
.lq-hoja.hoja-carta .lq-firmas.al-pie { margin-top: 90px; margin-bottom: 30px; }
/* comprobante de vacaciones (formato Nubox, dos copias) */
.fv-copias { display: grid; gap: 1.2rem; }
.fv-hoja { font-size: 15px; line-height: 1.6; }
.fv-hoja .fv-cuerpo { flex: 1 0 auto; }
.fv-cab { display: flex; justify-content: space-between; font-size: 12px; line-height: 1.45; }
.fv-cab-der { text-align: right; }
.fv-titulo { text-align: center; font-weight: 700; font-size: 15.5px; letter-spacing: .03em; margin: 40px 0 80px; }
.fv-cuerpo p { margin: 18px 0; max-width: 640px; }
.fv-par { display: flex; gap: 12px; margin: 3px 0; }
.fv-etq { width: 86px; }
.fv-comp { display: flex; gap: 20px; margin: 2px 0; }
.fv-comp span:first-child { min-width: 225px; }
.fv-firmas div { font-weight: 400; font-size: 14px; }
.fv-copia { margin-top: 10px; font-size: 14px; }

/* ---------- inicio de sesión */
.lg { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1.1fr) 1fr; background: #fff; }
.lg-marca { position: relative; overflow: hidden; color: #e8edf5; padding: 48px 56px; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 110% 110%, rgba(56, 120, 220, .35), transparent 60%), linear-gradient(160deg, #0f1b33 0%, #172a4d 100%); }
.lg-marca::before { content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 44px 44px; }
.lg-marca > * { position: relative; }
.lg-logo { display: flex; align-items: center; gap: 12px; }
.lg-logo b { display: block; font-size: 17px; letter-spacing: .01em; }
.lg-logo small { display: block; font-size: 12.5px; opacity: .7; }
.lg-mono { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 20px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; box-shadow: 0 6px 18px rgba(29, 78, 216, .35); }
.lg-mensaje { margin: auto 0; max-width: 460px; }
.lg-mensaje h2 { font-size: 30px; line-height: 1.25; font-weight: 700; color: #fff; margin: 0 0 28px; letter-spacing: -.01em; }
.lg-mensaje ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.lg-mensaje li { display: flex; gap: 14px; align-items: flex-start; }
.lg-mensaje li b { display: block; color: #fff; font-size: 15px; margin-bottom: 2px; }
.lg-mensaje li span:not(.lg-check) { font-size: 13.5px; opacity: .72; }
.lg-check { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: rgba(59, 130, 246, .22); color: #93c5fd; border: 1px solid rgba(147, 197, 253, .35); }
.lg-pie { font-size: 12px; opacity: .55; }
.lg-panel { display: grid; place-items: center; padding: 40px 24px; background: #f7f9fc; }
.lg-caja { width: min(400px, 100%); }
.lg-caja h1 { font-size: 26px; margin: 0 0 6px; color: #0f1b33; letter-spacing: -.01em; }
.lg-sub { color: #5b6576; margin: 0 0 28px; font-size: 14.5px; }
.lg-form .campo { margin-bottom: 16px; }
.lg-form .campo label { font-size: 13px; font-weight: 600; color: #344054; }
.lg-form input { height: 44px; font-size: 15px; border-radius: 8px; border: 1px solid #d0d5dd; background: #fff; width: 100%; box-sizing: border-box; padding: 0 12px; }
.lg-form input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 4px rgba(59, 130, 246, .15); }
.lg-pass { position: relative; }
.lg-pass input { padding-right: 78px; }
.lg-ojo { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #1d4ed8;
  font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 6px 8px; }
.lg-boton { width: 100%; height: 46px; justify-content: center; font-size: 15px; font-weight: 600; border-radius: 8px; margin-top: 6px;
  background: #1d4ed8; border-color: #1d4ed8; }
.lg-boton:hover { background: #1e40af; }
.lg-seguro { margin-top: 22px; font-size: 12.5px; color: #6b7280; text-align: center; }
.lg-logo-movil { display: none; color: #0f1b33; margin-bottom: 28px; }
@media (max-width: 860px) {
  .lg { grid-template-columns: 1fr; }
  .lg-marca { display: none; }
  .lg-logo-movil { display: flex; }
  .lg-logo-movil small { color: #5b6576; opacity: 1; }
}
/* documentos laborales impresos (contratos, anexos, cartas) */
.doc-carta { white-space: pre-wrap; font-size: 13px; line-height: 1.6; text-align: justify; tab-size: 6; display: block !important; }
/* finiquito (formato del usuario) */
.fq-doc { font-size: 13px; line-height: 1.75; text-align: justify; }
.fq-doc p { margin: 0 0 22px; }
.fq-titulo { text-align: center; font-weight: 700; font-size: 14.5px; margin: 8px 0 34px; }
.fq-conceptos { margin: 14px 0 34px 36px; max-width: 580px; }
.fq-fila { display: grid; grid-template-columns: 1fr 90px 18px 110px; font-weight: 700; padding: 2px 0; }
.fq-fila span:nth-child(2) { text-align: center; }
.fq-fila span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.fq-total span:last-child { text-decoration: underline; }
.fq-esp { height: 22px; }
.fq-son { margin: 20px 0 0 12px; }
.fq-constancia { margin-top: 40px !important; }
.fq-cierre { break-inside: avoid; page-break-inside: avoid; }
.fq-firmas { display: flex; justify-content: space-between; gap: 70px; margin-top: 130px; padding: 0 10px; }
.fq-firmas div { flex: 1; border-top: 1px solid #000; padding-top: 4px; text-align: center; display: flex; flex-direction: column; font-size: 12px; }
.fq-doc p, .fq-conceptos { break-inside: avoid; page-break-inside: avoid; orphans: 4; widows: 4; }
/* editor de cláusulas del finiquito */
.cl-lista { display: grid; gap: .8rem; margin-top: .6rem; }
.cl-item { border: 1px solid var(--linea); border-radius: 8px; padding: .5rem .7rem .7rem; background: #fff; }
.cl-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; }
.cl-cab span { display: flex; gap: .8rem; }
.cl-texto { width: 100%; box-sizing: border-box; font-size: .9rem; line-height: 1.5; padding: .5rem; }
/* propuesta F29 */
.f29-tabla { width: 100%; border-collapse: collapse; font-size: .9rem; }
.f29-tabla th { text-align: left; font-size: .74rem; color: var(--suave); border-bottom: 1px solid var(--linea); padding: .4rem .5rem; }
.f29-tabla td { padding: .38rem .5rem; border-bottom: 1px solid #eef1f5; }
.f29-tabla .n { text-align: right; font-variant-numeric: tabular-nums; }
.f29-lin { color: var(--suave); width: 3rem; }
.f29-cod { font-weight: 700; color: var(--acento); width: 3.5rem; }
.f29-signo { width: 1.5rem; color: var(--suave); text-align: center; }
.f29-grupo td { background: var(--fondo); font-weight: 700; font-size: .75rem; letter-spacing: .05em; color: var(--texto); }
.f29-fuerte td { font-weight: 700; }
/* certificados DJ */
.cert { font-size: 11.5px; }
.cert-cab { display: flex; justify-content: space-between; margin-bottom: 18px; line-height: 1.45; }
.cert-texto { text-align: justify; line-height: 1.6; margin: 12px 0; }
.cert-tabla { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: 10.5px; }
.cert-tabla { table-layout: fixed; }
.cert-tabla th { border: 1px solid #000; padding: 4px 3px; font-size: 9px; text-align: center; font-weight: 700; white-space: normal; text-transform: none; letter-spacing: 0; color: #000; background: none; line-height: 1.2; }
.cert-tabla th:first-child, .cert-tabla td:first-child { width: 78px; }
.cert-tabla td { border: 1px solid #000; padding: 3px 5px; }
.cert-tabla .n { text-align: right; font-variant-numeric: tabular-nums; }
.cert-tabla tfoot td { font-weight: 700; }
.cert-firma { justify-content: center !important; }
.cert-firma > div { display: flex; flex-direction: column; width: 45% !important; }
.dj-totales { padding: .7rem 1rem; border-top: 1px solid var(--linea); font-size: .9rem; }
/* renta anual */
.rt-aj { display: grid; grid-template-columns: 9.5rem 1.4fr 1fr 8.5rem 1.6rem; gap: .4rem; margin-bottom: .35rem; align-items: center; }
.rt-aj input[name=monto] { text-align: right; }
/* control mensual de clientes */
.selector-prod > .tarjeta.ctrl-pagina { max-width: 1280px; }
.ctrl-vencs { display: flex; gap: .6rem; flex-wrap: wrap; margin: .2rem 0 1rem; }
.ctrl-venc { flex: 1 1 200px; border: 1px solid var(--linea); border-left: 4px solid #b8c1cf; border-radius: 6px; padding: .5rem .7rem; display: flex; flex-direction: column; gap: .1rem; font-size: .85rem; }
.ctrl-venc b { font-size: 1rem; }
.ctrl-venc.cerca { border-left-color: var(--alerta); }
.ctrl-venc.pasado { border-left-color: #c8ced8; opacity: .75; }
.ctrl-resumen { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-weight: 600; margin-bottom: .5rem; font-size: .9rem; }
.ctrl-tabla { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ctrl-tabla th { font-size: .72rem; text-transform: uppercase; color: var(--suave); padding: .5rem .4rem; border-bottom: 1px solid var(--linea); text-align: left; white-space: nowrap; }
.ctrl-tabla th.c { text-align: center; }
.ctrl-tabla td { padding: .45rem .4rem; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.ctrl-celda { text-align: center; font-weight: 700; width: 4.2rem; }
.ctrl-celda.ok, .ctrl-item.ok .ctrl-ico { color: var(--ok); }
.ctrl-celda.pendiente, .ctrl-item.pendiente .ctrl-ico { color: var(--suave); }
.ctrl-celda.atrasado, .ctrl-item.atrasado .ctrl-ico { color: var(--error); }
.ctrl-celda.no_aplica, .ctrl-item.no_aplica { color: #c3c9d2; }
.ctrl-abierta td { background: #f6f8fb; }
.ctrl-detalle > td { background: #fafbfc; padding: .8rem 1rem 1rem; }
.ctrl-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .45rem .9rem; margin-bottom: .7rem; }
.ctrl-item { display: flex; gap: .5rem; align-items: flex-start; font-size: .86rem; }
.ctrl-item small { display: block; }
.ctrl-ico { width: 1rem; text-align: center; font-weight: 700; }
.ctrl-item.atrasado { color: var(--error); }
/* portal de clientes */
.portal { min-height: 100vh; background: var(--fondo); }
.portal-cab { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: #fff; border-bottom: 1px solid var(--linea); padding: .7rem 1.5rem; }
.portal-cab .lg-logo { color: var(--tinta); }
.portal-cab .lg-logo small { color: var(--suave); }
.portal-cuerpo { max-width: 1150px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.portal-cab > select { width: auto; }
