/* APC Web — diseño A2 "Menú compacto + vuelto" (CM Tech) */
:root {
  /* Paleta Procu360 */
  --azul: #0B1220;          /* barra lateral y fondos oscuros */
  --azul-2: #1C2940;        /* hover sobre el oscuro */
  --azul-borde: #33415C;
  --azul-linea: #22304A;
  --accion: #1D4ED8;        /* botones y pestaña elegida */
  --accion-osc: #1740AE;
  --celeste: #7DD3FC;       /* acento */
  --rojo: #DC2626;
  --rojo-osc: #B21D1D;
  --fondo: #F4F6FA;
  --blanco: #FFFFFF;
  --borde: #E2E8F0;
  --borde-input: #CBD5E1;
  --texto: #0F172A;
  --texto-2: #475569;
  --muted: #64748B;
  --claro: #A5B4CB;
  --ok-fondo: #E3F3EA;
  --ok-texto: #14532D;
  --aviso-fondo: #FFF4DB;
  --aviso-texto: #6B4A00;
  --error-fondo: #FFF0F2;
  --sel: #EEF3FD;
  /* Comprobantes no fiscales y notas de crédito: colores propios para no confundirlos con la factura */
  --presu: #B4600F;
  --presu-osc: #8A4808;
  --presu-claro: #FDEFDF;
  --nc: #6B3FA0;
  --nc-osc: #52307C;
  --nc-claro: #F1E9FA;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, system-ui, sans-serif; color: var(--texto); background: var(--fondo); font-size: 15px; }
h1, h2, h3 { font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif; letter-spacing: -0.01em; }
h1 { margin: 0; font-size: 22px; font-weight: 700; }
h2 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
a { color: var(--accion); }
a:hover { color: var(--accion-osc); }
.mono { font-family: var(--mono); }
.sub { font-size: 13px; color: var(--muted); }
.sub-claro { font-size: 14px; color: var(--claro); }
.der { text-align: right; }
.fuerte { font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accion); outline-offset: 2px; }

/* ---------- estructura ---------- */
.app { display: flex; min-height: 100vh; }
.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.page-pad { padding: 22px 28px; display: flex; flex-direction: column; gap: 16px; }

.rail { flex: 0 0 194px; background: var(--azul); display: flex; flex-direction: column; padding: 12px 10px; gap: 2px; position: sticky; top: 0; height: 100vh; overflow: hidden; }
/* El menú se desplaza por dentro si la pantalla es baja, pero nunca se dibuja la barra de scroll. */
.rail-nav { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.rail-nav::-webkit-scrollbar { width: 0; height: 0; display: none; }
.rail form { margin: 0; }
.rail-logo { width: 36px; height: 36px; border-radius: 10px; background: var(--accion); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex: none; }
.rail-btn { width: 100%; min-height: 38px; padding: 0 10px; border-radius: 9px; color: #CBD5E1; display: flex; flex-direction: row; align-items: center; gap: 10px; text-decoration: none; font-size: 13.5px; background: transparent; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
.rail-btn svg { flex: none; }
.rail form { width: 100%; }
.rail-btn:hover { background: var(--azul-2); color: #fff; }
.rail-btn.active { background: var(--azul-2); color: #fff; }
.rail-spacer { flex: 1; }

/* ---------- controles ---------- */
.input { height: 44px; border: 1px solid var(--borde-input); border-radius: 8px; padding: 0 12px; font: inherit; font-size: 15px; background: #fff; color: var(--texto); width: 100%; }
.input-buscar { height: 54px; border: 2px solid var(--accion); border-radius: 10px; font-size: 17px; padding: 0 16px; }
.input-chico { height: 36px; width: 140px; }
.input-oscuro { height: 50px; border-radius: 8px; border: 1px solid var(--azul-borde); background: var(--azul-2); color: #fff; padding: 0 14px; font-size: 20px; width: 100%; }
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.campo label { font-size: 13px; color: var(--muted); font-weight: 500; }
.campo.crece, .crece { flex: 1 1 220px; }
.fila-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fila-btns .input { width: auto; }
.fila-campos { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.check { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; }

.btn { min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--borde-input); background: #fff; color: var(--texto-2); font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; gap: 6px; }
.btn:hover { border-color: var(--accion); color: var(--accion); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primario { background: var(--accion); border-color: var(--accion); color: #fff; font-weight: 600; }
.btn-primario:hover { background: var(--accion-osc); color: #fff; }
.btn-rojo { background: var(--rojo); border-color: var(--rojo); color: #fff; font-weight: 600; }
.btn-rojo:hover { background: var(--rojo-osc); color: #fff; }
.btn-grande { min-height: 52px; font-size: 16px; width: 100%; }
.btn-chico { min-height: 36px; padding: 0 10px; font-size: 14px; }

.panel { background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 18px; }
.alerta { margin: 0; padding: 12px 14px; border-radius: 8px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.alerta-error { background: var(--error-fondo); color: var(--rojo-osc); }
.alerta-aviso { background: var(--aviso-fondo); color: var(--aviso-texto); }
.alerta-ok { background: var(--ok-fondo); color: var(--ok-texto); }
.etiqueta { font-size: 12px; padding: 3px 8px; border-radius: 999px; }
.etiqueta-falta { background: var(--error-fondo); color: var(--rojo-osc); }

/* ---------- facturar (A2) ---------- */
.fact { display: flex; flex-wrap: wrap; min-height: 100vh; }
.fact-main { flex: 999 1 560px; min-width: 0; padding: 22px 28px; display: flex; flex-direction: column; gap: 16px; }
.fact-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.fact-titulo { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.cliente { display: flex; flex-wrap: wrap; gap: 12px; }

.buscador { position: relative; }
.resultados { list-style: none; margin: 4px 0 0; padding: 6px; position: absolute; left: 0; right: 0; z-index: 5; background: #fff; border: 1px solid var(--borde); border-radius: 10px; box-shadow: 0 12px 30px rgba(11, 18, 32, .14); max-height: 360px; overflow-y: auto; }
.resultado { width: 100%; display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 0; background: transparent; border-radius: 8px; font: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.resultado:hover, .resultado:focus { background: var(--sel); }
.resultado .r-nombre { flex: 1; font-weight: 600; }
.resultado .r-cod { color: var(--muted); font-size: 13px; }
.resultado .r-precio { font-weight: 700; min-width: 110px; text-align: right; }

.renglones { display: flex; flex-direction: column; gap: 8px; }
.vacio { color: var(--muted); padding: 32px 0; text-align: center; }
.renglon { background: #fff; border: 1px solid var(--borde); border-radius: 10px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.renglon.activo { border: 2px solid var(--accion); padding: 11px 15px; }
.r-info { flex: 1 1 220px; display: flex; flex-direction: column; min-width: 0; }
.r-info .r-nombre { font-weight: 600; }
.cantidad { display: flex; align-items: center; gap: 6px; }
.btn-cant { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--borde-input); background: #fff; font: inherit; font-size: 18px; cursor: pointer; }
.btn-cant:hover { border-color: var(--accion); }
.input-cant { width: 80px; height: 44px; text-align: center; font: inherit; font-weight: 600; border: 1px solid var(--borde-input); border-radius: 8px; }
.r-pu { min-width: 130px; text-align: right; color: var(--muted); }
.precio-libre { display: flex; align-items: center; gap: 6px; min-width: 130px; justify-content: flex-end; }
.input-precio { width: 120px; height: 44px; text-align: right; font-size: 16px; border: 2px solid var(--accion); border-radius: 8px; padding: 0 10px; }
.input-precio.falta { border-color: var(--rojo); background: var(--error-fondo); }
.r-total { min-width: 120px; text-align: right; font-weight: 700; }
.btn-quitar { width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.btn-quitar:hover { background: var(--error-fondo); color: var(--rojo); }

.ticket { flex: 1 1 340px; max-width: 420px; background: var(--azul); color: #fff; padding: 24px; display: flex; flex-direction: column; gap: 16px; min-height: 100vh; position: sticky; top: 0; align-self: flex-start; }
.t-filas { display: flex; flex-direction: column; gap: 8px; color: #D7E0EB; }
.t-fila { display: flex; justify-content: space-between; gap: 12px; }
.t-total { border-top: 1px solid var(--azul-linea); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.t-total-num { font-size: 42px; line-height: 1.1; }
.t-pagos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.btn-pago { min-height: 48px; border-radius: 8px; border: 1px solid var(--azul-borde); background: var(--azul-2); color: #fff; font: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; padding: 0 8px; }
.btn-pago:hover { color: #fff; border-color: #fff; }
.btn-pago.activo { background: #fff; color: var(--accion); border-color: #fff; font-weight: 600; }
.t-vuelto { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 8px; background: var(--ok-fondo); color: var(--ok-texto); font-weight: 600; }
.t-vuelto .mono { font-size: 24px; }
.t-vuelto.falta { background: var(--error-fondo); color: var(--rojo-osc); }
.t-spacer { flex: 1; }
.btn-emitir { min-height: 60px; border-radius: 10px; border: 0; background: var(--accion); color: #fff; font: inherit; font-size: 18px; font-weight: 600; cursor: pointer; }
.btn-emitir:hover { background: var(--accion-osc); }
.btn-emitir:disabled { opacity: .5; cursor: not-allowed; }
.btn-emitir-sec { min-height: 48px; border-radius: 10px; border: 1px solid var(--azul-borde); background: var(--azul-2); color: #fff; font: inherit; font-size: 16px; cursor: pointer; }
.btn-emitir-sec:hover { border-color: #fff; }
.btn-emitir-sec:disabled { opacity: .5; cursor: not-allowed; }
.btn-pedido { min-height: 44px; border-radius: 10px; border: 1px dashed var(--azul-borde); background: transparent; color: #D7E0EB; font: inherit; font-size: 15px; cursor: pointer; }
.btn-pedido:hover { border-color: #fff; color: #fff; }
.btn-pedido:disabled { opacity: .5; cursor: not-allowed; }
.t-exito { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 10px; background: var(--azul-2); }
.t-exito-tit { font-size: 20px; font-weight: 600; }
.ticket .alerta-error { background: #FFE3E7; }

/* ---------- arqueo ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.kpi-num { font-size: 22px; }
.kpi-oscuro { background: var(--azul); border-color: var(--azul); color: #fff; }
.kpi.falta .kpi-num { color: var(--rojo-osc); }
.kpi.sobra .kpi-num { color: var(--aviso-texto); }
.arqueo-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.arqueo-cols > .crece { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cierre { flex: 1 1 320px; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.apertura { max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.dif { display: flex; justify-content: space-between; align-items: baseline; padding: 12px; border-radius: 8px; font-weight: 600; }
.dif .mono { font-size: 22px; }
.dif.ok { background: var(--ok-fondo); color: var(--ok-texto); }
.dif.falta { background: var(--error-fondo); color: var(--rojo-osc); }
.dif.sobra { background: var(--aviso-fondo); color: var(--aviso-texto); }

/* ---------- tablas ---------- */
.tabla-scroll { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; min-width: 560px; }
.tabla th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 10px 12px; background: #F7F9FB; }
.tabla td { padding: 12px; border-top: 1px solid #EEF1F5; }
.tabla th.der, .tabla td.der { text-align: right; }
.acciones { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- ingreso ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--azul); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.login-card label { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 6px; }
.login-card input { height: 48px; border: 1px solid var(--borde-input); border-radius: 8px; padding: 0 12px; font: inherit; font-size: 16px; }
.login-card button { margin-top: 14px; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.login-brand .rail-logo { margin: 0; }
.login-brand p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- impresión ---------- */
.impresion { background: #fff; color: #000; margin: 0 auto; font-size: 12px; display: flex; flex-direction: column; gap: 8px; }
.ticket-80 { width: 80mm; padding: 4mm; }
.hoja-a4 { width: 210mm; min-height: 296mm; padding: 9mm 10mm; font-size: 11px; font-family: Arial, Helvetica, sans-serif; gap: 0; color: #000; }
.imp-cab { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; border-bottom: 1px dashed #000; padding-bottom: 6px; }
.ticket-80 .imp-cab { flex-direction: column; }
.imp-emisor, .imp-nro, .imp-cliente, .imp-cae { display: flex; flex-direction: column; gap: 2px; }
.imp-razon { font-size: 15px; }
.imp-logo { display: block; object-fit: contain; margin-bottom: 4px; }
.hoja-a4 .imp-logo { max-width: 60mm; max-height: 24mm; }
.ticket-80 .imp-logo { max-width: 50mm; max-height: 20mm; margin: 0 auto 4px; filter: grayscale(1) contrast(1.4); }
.imp-tipo { display: flex; flex-direction: column; align-items: center; border: 1px solid #000; padding: 4px 10px; align-self: flex-start; }
.imp-letra { font-size: 26px; font-weight: 700; line-height: 1; }
.imp-renglones { width: 100%; border-collapse: collapse; }
.imp-renglones th { text-align: left; border-bottom: 1px solid #000; padding: 3px 2px; font-size: 11px; }
.imp-renglones td { padding: 3px 2px; vertical-align: top; }
.imp-renglones .der { text-align: right; }
.imp-totales { border-top: 1px dashed #000; padding-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.imp-totales > div { display: flex; justify-content: space-between; }
.imp-total { font-size: 15px; font-weight: 700; }
.imp-chico { font-size: 10px; }
.imp-pie { display: flex; gap: 10px; align-items: center; border-top: 1px dashed #000; padding-top: 6px; }
.ticket-80 .imp-pie { flex-direction: column; align-items: flex-start; }
.imp-qr { width: 30mm; height: 30mm; }
.imp-acciones { display: flex; gap: 8px; margin-top: 16px; }

@media print {
  body { background: #fff; }
  .no-imprimir { display: none !important; }
  .impresion { margin: 0; }
  @page { margin: 0; }
}

.error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 20px; background: var(--aviso-fondo); color: var(--aviso-texto); z-index: 100; }
.error-ui .reload { margin-left: 8px; }

/* ---------- celular / tablet ---------- */
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .rail { flex-direction: row; height: auto; width: 100%; position: static; padding: 8px; overflow-x: auto; }
  .rail-nav { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .rail-logo { margin: 0 8px 0 0; }
  .rail-spacer { display: none; }
  .ticket { max-width: none; min-height: 0; position: static; }
  .fact { min-height: 0; }
  .fact-main, .page-pad { padding: 16px; }
  .r-pu { display: none; }
}

/* ---------- productos ---------- */
.entre { justify-content: space-between; }
.entre h2 { margin: 0; }
.pestanias { display: flex; gap: 4px; background: var(--fondo); padding: 4px; border-radius: 10px; }
.pestania { flex: 1; min-height: 40px; border: 0; border-radius: 8px; background: transparent; font: inherit; color: var(--texto-2); cursor: pointer; }
.pestania.activa { background: #fff; color: var(--accion); font-weight: 600; box-shadow: 0 1px 3px rgba(11, 18, 32, .15); }
.fila-sel td { background: var(--sel); }
.fila-baja td { color: var(--muted); }
.filtros-comp { padding: 12px 14px; }
.panel-detalle { flex: 1 1 100%; width: 100%; max-width: none; }
.link-empresa { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 12px; margin-bottom: 12px;
                background: var(--sel); border: 1px solid var(--borde); border-radius: 9px; }
.link-empresa a { color: var(--accion); word-break: break-all; }
.panel-detalle .fila-btns.entre h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.centro { text-align: center; }
.tabla-modulos input[type="checkbox"] { width: 18px; height: 18px; }
.tabla-modulos .modulo-nombre { display: block; font-weight: 600; }
.tabla-modulos .sub { display: block; }
.modulos-lista { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.modulo-item { align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--borde); border-radius: 9px; background: #fff; }
.modulo-item .modulo-nombre { display: block; font-weight: 600; }
.modulo-item .sub { display: block; }
.link-fila { border: 0; background: transparent; font: inherit; color: var(--accion); text-decoration: underline; cursor: pointer; padding: 6px 0; min-height: 32px; text-align: left; }
.link-fila:hover { color: var(--accion-osc); }
.stock-bajo { color: var(--rojo-osc); font-weight: 600; }
.tabla-chica { min-width: 520px; font-size: 13px; }
.tabla-chica td { padding: 8px; }
.btn-pu { border: 1px dashed transparent; background: transparent; font: inherit; color: var(--muted); cursor: pointer; border-radius: 6px; padding: 6px 8px; }
.btn-pu:hover { border-color: var(--borde-input); color: var(--accion); }

/* ---------- usuarios ---------- */
.tipo-usuario { align-items: stretch; margin-top: 12px; }
.opcion-tipo { flex: 1 1 220px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--borde-input); background: #fff; font: inherit; text-align: left; cursor: pointer; min-height: 60px; }
.opcion-tipo.activa { border: 2px solid var(--accion); background: var(--sel); padding: 11px 13px; }
.etiqueta-admin { background: var(--accion); color: #fff; }
.etiqueta-empleado { background: var(--sel); color: var(--accion); }

/* ---------- panel CM Tech ---------- */
.panel-ancho { max-width: 560px; flex-basis: 460px; }
.input-area { height: auto; padding: 10px 12px; font-size: 13px; resize: vertical; }
.texto-ok { color: var(--ok-texto); font-size: 14px; }
.texto-error { color: var(--rojo-osc); font-size: 14px; }
.input-file { height: auto; padding: 8px; }
.cert-info { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 8px; font-size: 14px; }
.cert-info.ok { background: var(--ok-fondo); color: var(--ok-texto); }
.cert-info.falta { background: var(--error-fondo); color: var(--rojo-osc); }
details.sub summary { cursor: pointer; }

.logo-fila { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.logo-preview { width: 160px; height: 80px; border: 1px dashed var(--borde-input); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #fff; padding: 6px; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- ticket 80 mm (diseño de la térmica actual) ---------- */
.ticket-80 { width: 80mm; padding: 3mm 4mm; font-family: Arial, Helvetica, sans-serif; font-size: 11.5px; line-height: 1.35; gap: 0; color: #000; }
.ticket-80 .imp-logo { margin: 0 auto 6px; }
.tk-razon { text-align: center; font-style: italic; font-size: 12.5px; margin-bottom: 4px; }
.tk-dato { display: grid; grid-template-columns: 22mm 1fr; }
.tk-fuerte { font-weight: 700; margin-top: 2px; }
.tk-linea { border: 0; border-top: 1px solid #000; margin: 5px 0; }
.tk-fila { display: flex; justify-content: space-between; gap: 6px; }
.tk-der { text-align: right; justify-content: flex-end; gap: 14px; }
.tk-comprobante { display: flex; flex-direction: column; gap: 1px; font-size: 12px; }
.tk-renglones > div:nth-child(odd) { margin-top: 3px; }
.tk-desc { flex: 1; min-width: 0; word-break: break-word; }
.tk-sep { margin-top: 8px; }
.tk-total { font-weight: 700; font-size: 16px; margin: 12px 0 2px; }
.tk-ley { font-weight: 700; font-style: italic; text-align: center; margin-bottom: 4px; }
.tk-pie { display: flex; gap: 8px; align-items: flex-start; margin-top: 4px; }
.tk-qr { width: 34mm; height: 34mm; image-rendering: pixelated; }
.tk-pie-datos { display: flex; flex-direction: column; font-size: 11px; }
.tk-espacio { margin-top: 6px; }
.campo-obs { margin-top: 10px; max-width: 640px; }
.tk-obs { font-size: 12px; white-space: pre-wrap; margin-top: 4px; }
.tk-gracias { text-align: center; font-weight: 700; font-style: italic; font-size: 13px; margin-top: 8px; }
.imp-ley { font-weight: 700; font-style: italic; margin-top: 8px; }

/* ---------- factura A4 (diseño de la factura actual de APC) ---------- */
.fa-caja { border: 1px solid #555; border-radius: 3px; }
.fa-et { color: #444; }
.fa-sep { margin-left: 18mm; }
.fa-cab { display: grid; grid-template-columns: 1fr 22mm 1fr; position: relative; min-height: 50mm; }
.fa-emisor { padding: 4mm; display: flex; flex-direction: column; gap: 3mm; border-right: 1px solid #555; }
.fa-emisor .imp-logo { max-width: 70mm; max-height: 20mm; margin: 0; }
.fa-nombre-grande { font-size: 20px; font-weight: 700; }
.fa-datos { display: flex; flex-direction: column; gap: 1.5mm; }
.fa-letra { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; border-right: 1px solid #555; }
.fa-letra-l { margin-top: -1px; border: 1px solid #555; border-top: 0; width: 15mm; text-align: center; font-size: 30px; font-weight: 700; line-height: 1.2; padding-top: 1mm; }
.fa-letra-c { border: 1px solid #555; border-top: 0; width: 15mm; text-align: center; font-size: 8px; padding: 0.5mm 0; }
.fa-comp { padding: 4mm; display: flex; flex-direction: column; gap: 3mm; }
.fa-titulo { text-align: center; font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.fa-grid { display: grid; grid-template-columns: auto 1fr; column-gap: 4mm; row-gap: 1.5mm; }
.fa-grid-baja { margin-top: auto; }
.fa-cliente { margin-top: 3mm; padding: 3mm 4mm; display: grid; grid-template-columns: 1.6fr 1fr; row-gap: 2mm; column-gap: 6mm; }
.fa-renglones { width: 100%; border-collapse: collapse; margin-top: 3mm; }
.fa-renglones th { background: #d9d9d9; font-weight: 700; padding: 1.5mm 2mm; text-align: left; border-top: 1px solid #555; border-bottom: 1px solid #555; }
.fa-renglones td { padding: 1mm 2mm; vertical-align: top; }
.fa-renglones .der { text-align: right; white-space: nowrap; }
.fa-medio { display: flex; justify-content: space-between; gap: 10mm; margin-top: 4mm; align-items: flex-start; }
.fa-izq { flex: 1; padding-top: 18mm; }
.fa-ley { font-weight: 700; border-bottom: 1px solid #000; padding-bottom: 1mm; margin-bottom: 2mm; display: inline-block; }
.fa-ley-fila { display: grid; grid-template-columns: 62mm 25mm; justify-content: start; }
.fa-ley-fila span:last-child { text-align: right; }
.fa-totales { width: 85mm; border-top: 1px solid #000; padding-top: 2mm; display: flex; flex-direction: column; gap: 2.5mm; }
.fa-totales > div { display: flex; justify-content: space-between; font-weight: 700; }
.fa-total { font-size: 12px; }
.fa-obs { margin-top: auto; padding-top: 6mm; }
.fa-pie { display: grid; grid-template-columns: 32mm 1fr auto; gap: 6mm; align-items: center; margin-top: 4mm; padding-top: 3mm; }
.fa-qr { width: 30mm; height: 30mm; image-rendering: pixelated; }
.fa-autorizado { display: flex; flex-direction: column; gap: 2mm; }
.fa-autorizado-tit { font-style: italic; font-size: 12px; }
.fa-chico { font-size: 8px; }
.fa-cae { align-self: center; }
.anular { border: 2px solid var(--rojo); display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.anular p { margin: 0; }

.pedido-fila { display: flex; flex-direction: column; gap: 6px; }
.pedido-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pedido-btns .btn-pedido { font-size: 13px; padding: 0 4px; }

.fila-grupo td { font-weight: 600; background: #F7F9FB; }
.fila-total td { font-weight: 700; border-top: 2px solid var(--accion); }
.sangria { padding-left: 28px !important; color: var(--texto-2); }

/* Panel lateral de Productos: más ancho para el historial y los precios */
.panel-producto { flex: 1 1 600px; max-width: 760px; }
.panel-producto .tabla-chica { min-width: 620px; }
.panel-producto .tabla-chica td:nth-child(5) { min-width: 180px; }
@media (min-width: 1500px) { .panel-producto { max-width: 860px; } }

.kpis-chicos { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.kpis-chicos .kpi { padding: 10px; }
.kpis-chicos .kpi-num { font-size: 18px; }
.lista-reglas { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.login-link { text-align: center; font-size: 14px; padding: 10px 0 0; }

/* ---- Presupuestos (ámbar) y notas de crédito (violeta) ---- */
.chip-tipo { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.chip-presu { background: var(--presu-claro); color: var(--presu-osc); border: 1px solid var(--presu); }
.chip-nc { background: var(--nc-claro); color: var(--nc-osc); border: 1px solid var(--nc); }
.cab-presu { border-left: 6px solid var(--presu); padding-left: 14px; }
.pagina-presu { background: var(--presu-claro); min-height: 100vh; }
.page-pad.pagina-presu { flex: 1 1 auto; }
.rail-btn.rail-presu.active, .rail-btn.rail-presu:hover { background: var(--presu); color: #fff; }

.btn-presupuesto { min-height: 48px; border-radius: 10px; border: 0; background: var(--presu); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn-presupuesto:hover { background: var(--presu-osc); }
.btn-presupuesto:disabled { opacity: .5; cursor: not-allowed; }
.t-exito-presu { background: var(--presu); }
.alerta-presu { background: var(--presu-claro); color: var(--presu-osc); border-left: 4px solid var(--presu); }

.etiqueta-presu { background: var(--presu-claro); color: var(--presu-osc); }
.etiqueta-nc { background: var(--nc-claro); color: var(--nc-osc); }
.num-presu { font-weight: 600; }
.btn-nc { background: var(--nc); border-color: var(--nc); color: #fff; font-weight: 600; }
.btn-nc:hover { background: var(--nc-osc); color: #fff; }
.anular-nc { border-color: var(--nc); }
.anular-nc h2 { color: var(--nc-osc); }

/* ---- Descuento / incremento por renglón y sobre el total ---- */
.btn-ajuste { min-width: 64px; min-height: 40px; padding: 0 10px; border-radius: 8px; border: 1px dashed var(--borde-input); background: #fff; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.btn-ajuste:hover { border-color: var(--accion); color: var(--accion); }
.btn-ajuste.desc { border-style: solid; border-color: #1C6B3E; color: #14532D; background: var(--ok-fondo); font-weight: 600; }
.btn-ajuste.rec { border-style: solid; border-color: var(--presu); color: var(--presu-osc); background: var(--presu-claro); font-weight: 600; }
.btn-ajuste:disabled { opacity: .5; cursor: not-allowed; }
.ajuste { display: flex; align-items: center; gap: 4px; }
.input-ajuste { height: 40px; border: 1px solid var(--borde-input); border-radius: 8px; padding: 0 6px; font: inherit; font-size: 14px; background: #fff; }
input.input-ajuste { width: 72px; text-align: right; }
.ajuste-total { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ajuste-total .input-oscuro { width: 100%; }
.t-fila-desc span:last-child { color: #8FE0B0; }
.t-fila-rec span:last-child { color: #FFD08A; }

/* ---- Registro del sistema ---- */
.registro { margin: 0; padding: 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; }

/* ---- Estado del certificado de ARCA en la lista de empresas ---- */
.cert-chip { display: inline-block; margin-left: 8px; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.cert-bien { background: var(--ok-fondo); color: var(--ok-texto); }
.cert-aviso { background: var(--aviso-fondo); color: var(--aviso-texto); font-weight: 600; }
.cert-mal { background: var(--error-fondo); color: var(--rojo-osc); font-weight: 600; }
.lista-avisos { margin: 6px 0 0; padding-left: 18px; }
.lista-avisos li { margin: 2px 0; }

/* ---- Reportes ---- */
.kpi-fuerte { border-color: var(--accion); border-width: 2px; }
.kpi-fuerte .kpi-num { color: var(--accion); }

/* ---- Buscador de clientes ---- */
.buscador-cliente { position: relative; }
.buscador-cliente .resultados { top: 100%; }

/* ---- Sucursales ---- */
.negativo { color: var(--rojo-osc); }
.sub-titulo { margin: 10px 0 4px; font-size: 15px; font-weight: 600; }

/* ---- Abono y verificación en dos pasos ---- */
.aviso-abono { margin: 0; padding: 10px 28px; background: var(--aviso-fondo); color: var(--aviso-texto); font-weight: 600; border-bottom: 1px solid #E8D29A; }
.qr-2fa { width: 200px; height: 200px; margin: 8px 0; image-rendering: pixelated; border: 1px solid var(--borde); border-radius: 8px; background: #fff; }
.pasos { display: flex; flex-direction: column; gap: 14px; padding-left: 20px; margin: 0 0 14px; }

/* ---- Enviar por WhatsApp ---- */
.btn-whatsapp { display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; min-height: 36px; border-radius: 8px; background: #128C4B; border: 1px solid #128C4B; color: #fff; font-weight: 600; text-decoration: none; }
.btn-whatsapp:hover { background: #0E6E3B; color: #fff; }
.wa-fila { display: flex; gap: 8px; }
.wa-fila .btn-whatsapp { min-height: 44px; }
.input-oscuro.wa-tel { height: 44px; font-size: 15px; }

/* ---- Cobranzas: cada solapa con su color ---- */
:root {
  --cobro: #0E7C86;        /* Cobros del mes */
  --cobro-claro: #E3F3F5;
  --factu: #4A4FA6;        /* Quién factura */
  --factu-claro: #ECEDF8;
}
.pes-punto { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.pes-cobros .pes-punto { background: var(--cobro); }
.pes-factu .pes-punto { background: var(--factu); }
/* Sin seleccionar: el color apenas insinuado. Seleccionada: el color pleno. */
.pes-cobros { background: var(--cobro-claro); color: #2E6A70; }
.pes-factu { background: var(--factu-claro); color: #474B86; }
.pes-cobros.activa { background: var(--cobro); color: #fff; }
.pes-factu.activa { background: var(--factu); color: #fff; }
.pestania.activa .pes-punto { background: #fff; }
.pes-cobros:hover:not(.activa) { background: #CFE9EC; color: var(--cobro); }
.pes-factu:hover:not(.activa) { background: #DCDEF2; color: var(--factu); }

.panel-cobros { border-top: 3px solid var(--cobro); }
.panel-factu { border-top: 3px solid var(--factu); }
.titulo-cobros { color: var(--cobro); }
.titulo-factu { color: var(--factu); }

/* ---- Tablero de trabajo (tipo Trello) ---- */
.tablero { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.columna { background: var(--sel); border: 1px solid var(--borde); border-radius: 12px; display: flex; flex-direction: column; min-height: 160px; }
.columna-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 8px; border-bottom: 3px solid transparent; }
.columna-cab h2 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.columna-cuenta { background: #fff; border: 1px solid var(--borde); border-radius: 999px; min-width: 26px; text-align: center; font-size: 12px; font-weight: 600; padding: 1px 7px; }
.col-pendiente .columna-cab { border-color: var(--muted); }
.col-en_curso .columna-cab { border-color: var(--accion); }
.col-testing .columna-cab { border-color: #B45309; }
.col-esperando .columna-cab { border-color: var(--presu); }
.col-listo .columna-cab { border-color: #1C6B3E; }
.columna-cuerpo { display: flex; flex-direction: column; gap: 8px; padding: 10px; flex-grow: 1; }
.columna-vacia { margin: 4px 4px 8px; }
.columna-agregar { border: 0; border-top: 1px solid var(--borde); background: transparent; color: var(--muted); font: inherit; padding: 10px; cursor: pointer; border-radius: 0 0 12px 12px; text-align: left; }
.columna-agregar:hover { background: #fff; color: var(--accion); }

.tarjeta { background: #fff; border: 1px solid var(--borde); border-left: 4px solid var(--borde-input); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.tarjeta-sel { border-color: var(--accion); box-shadow: 0 0 0 2px rgba(29, 78, 216, .2); }
.prio-alta { border-left-color: var(--rojo); }
.prio-normal { border-left-color: var(--azul-borde); }
.prio-baja { border-left-color: var(--borde-input); }
.tarjeta-titulo { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; text-align: left; cursor: pointer; color: var(--texto); }
.tarjeta-titulo:hover { color: var(--accion); text-decoration: underline; }
.tarjeta-nro { color: var(--muted); font-weight: 400; margin-right: 6px; font-size: 12px; }
.tarjeta-datos { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; }
.tarjeta-botones { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; border-top: 1px solid #EEF1F5; padding-top: 7px; }
.btn-mover { min-height: 26px; padding: 0 7px; border: 1px solid var(--borde); border-radius: 6px; background: #fff; color: var(--muted); font: inherit; font-size: 11.5px; cursor: pointer; }
.btn-mover:hover { border-color: var(--accion); color: var(--accion); }
.btn-mover-col { background: var(--sel); }

.etiqueta-tipo { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.tipo-error { background: var(--error-fondo); color: var(--rojo-osc); }
.tipo-pedido { background: var(--sel); color: var(--accion); }
.tipo-mejora { background: var(--ok-fondo); color: var(--ok-texto); }
.tipo-tarea { background: var(--aviso-fondo); color: var(--aviso-texto); }
.venc-tarde { color: var(--rojo-osc); font-weight: 600; }
.venc-hoy { color: var(--aviso-texto); font-weight: 600; }
.nota { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid #EEF1F5; }

/* Columna de ideas y prioridad visible en la tarjeta */
.col-idea { background: #F3F0FA; }
.col-idea .columna-cab { border-color: var(--nc); }
.etiqueta-prio { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.etiqueta-prio.prio-alta { background: var(--error-fondo); color: var(--rojo-osc); }
.etiqueta-prio.prio-baja { background: var(--fondo); color: var(--muted); }

/* Configuración: el encabezado y las pestañas van juntos, sin aire extra abajo */
.config-cab { padding-bottom: 0; gap: 12px; }

/* ---- Pestañas: que se vean como pestañas aunque no estén elegidas ---- */
.pestanias { background: transparent; padding: 0; gap: 8px; flex-wrap: wrap; }
.pestania { flex: 1 1 auto; min-width: 140px; padding: 0 16px; background: #fff; border: 1px solid var(--borde); color: var(--texto-2); font-weight: 500; }
.pestania:hover:not(.activa) { border-color: var(--azul-borde); color: var(--accion); }
.pestania.activa { background: var(--accion); border-color: var(--accion); color: #fff; font-weight: 600; box-shadow: none; }

/* Las de Cobranzas conservan su color propio */
.pes-cobros { border-color: #9FCFD5; }
.pes-factu { border-color: #B6B9E0; }
.pes-cobros.activa { background: var(--cobro); border-color: var(--cobro); }
.pes-factu.activa { background: var(--factu); border-color: var(--factu); }

/* ---- Ventana emergente (detalle de una tarjeta) ---- */
.modal-fondo { position: fixed; inset: 0; z-index: 50; background: rgba(15, 42, 74, .55); display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow-y: auto; }
.modal-caja { width: 100%; max-width: 760px; max-height: calc(100vh - 64px); overflow-y: auto; box-shadow: 0 20px 60px rgba(10, 25, 45, .35); }
.modal-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.modal-cab h2 { margin: 0; }
.modal-cerrar { width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--borde-input); border-radius: 8px; background: #fff; font: inherit; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-cerrar:hover { border-color: var(--rojo); color: var(--rojo); }
@media (max-width: 640px) { .modal-fondo { padding: 12px 8px; } }

/* ---- Cobro con QR de Mercado Pago ---- */
.modal-qr { width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(10, 25, 45, .35); }
.qr-caja { text-align: center; padding: 8px 0 16px; }
.qr-img { width: 240px; height: 240px; image-rendering: pixelated; border: 1px solid var(--borde-input); border-radius: 12px; background: #fff; padding: 8px; }
.qr-monto { font-size: 26px; font-weight: 700; margin: 12px 0 2px; }
.qr-estado { color: var(--muted); font-size: 14px; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Halo que late mientras se espera el pago */
.qr-marco { position: relative; display: inline-block; line-height: 0; }
.qr-latido::before, .qr-latido::after {
  content: ""; position: absolute; inset: -8px; border-radius: 20px;
  border: 2px solid var(--accion); opacity: 0; pointer-events: none;
  animation: qr-latir 2.2s cubic-bezier(.2, .6, .3, 1) infinite;
}
.qr-latido::after { animation-delay: 1.1s; }
@keyframes qr-latir {
  0%   { transform: scale(1); opacity: .5; }
  70%  { opacity: 0; }
  100% { transform: scale(1.16); opacity: 0; }
}
.qr-punto { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--accion); animation: qr-respirar 1.4s ease-in-out infinite; }
@keyframes qr-respirar {
  0%, 100% { opacity: .25; transform: scale(.8); }
  50%      { opacity: 1;   transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .qr-latido::before, .qr-latido::after, .qr-punto { animation: none; }
}
.qr-tecnico { font-size: 11px; opacity: .6; margin-top: 6px; }
.qr-fijo { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.qr-exito { padding: 24px 0 18px; }
.qr-exito-tit { font-size: 20px; font-weight: 600; margin: 14px 0 0; }
.qr-tilde { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; background: var(--ok-fondo); color: var(--ok-texto); font-size: 46px; line-height: 84px; animation: qr-pop .35s ease-out; }
.qr-reloj { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; border: 4px solid var(--borde-input); border-top-color: var(--accion); animation: qr-gira .9s linear infinite; }
@keyframes qr-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes qr-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .qr-tilde, .qr-reloj { animation: none; } }
.fila-cancelar { align-items: center; gap: 10px; margin: 8px 0 0; }

/* ---- Panel de base de datos ---- */
.fila-mal td { background: var(--error-fondo); }
.fila-detalle td { background: #F6F8FB; padding: 10px 12px; }
.fila-grupo td { background: #EEF2F7; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 7px 12px; }
.fila-sistema td { background: #FAFBFD; }
.fila-sistema .link-fila { font-weight: 600; }

/* ---- Consulta de precio ---- */
.buscador-fila { display: flex; gap: 8px; align-items: stretch; }
.buscador-fila .input-buscar { flex: 1; min-width: 0; }
.btn-consulta { flex: none; white-space: nowrap; }
@media (max-width: 720px) { .buscador-fila { flex-wrap: wrap; } .btn-consulta { width: 100%; } }
.modal-consulta { width: 100%; max-width: 560px; max-height: calc(100vh - 64px); overflow-y: auto; box-shadow: 0 20px 60px rgba(10, 25, 45, .35); }
.resultados-consulta { position: static; margin-top: 8px; max-height: 320px; overflow-y: auto; }
.consulta-ficha { padding: 14px 0 6px; }
.consulta-nombre { display: block; font-size: 18px; font-weight: 600; }
.consulta-precio { font-size: 34px; font-weight: 700; margin: 8px 0 2px; }

/* ---- Barra lateral ---- */
.rail-marca { display: flex; align-items: center; gap: 10px; padding: 2px 2px 10px; }
.rail-plegar { flex: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--azul-linea); background: var(--azul-2); color: #CBD5E1; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rail-plegar:hover { color: #fff; border-color: var(--accion); }
.rail-marca-txt { color: #fff; font-family: 'Plus Jakarta Sans', Inter, sans-serif; font-weight: 700; font-size: 18px; white-space: nowrap; }
.rail-marca-dos { color: #60A5FA; }

.rail-grupo { margin: 10px 0 4px; padding: 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #64748B; }
.rail-btn.active { background: #16233A; color: #fff; font-weight: 600; }
.rail-btn.active svg { color: #60A5FA; }

.rail-quien { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 8px 8px; margin-top: 4px; border-top: 1px solid var(--azul-linea); }
.rail-quien-fila { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 4px; }
.rail-avatar { flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--azul-2); border: 1px solid var(--azul-linea); color: #93C5FD; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }

.rail-quien-nombre { color: #fff; font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.rail-quien-dato { color: var(--claro); font-size: 11.5px; line-height: 1.35; overflow-wrap: anywhere; }
.rail-quien-suc { color: var(--celeste); }

/* Menú plegado: quedan solo los iconos */
.rail-plegada .rail { flex-basis: 68px; padding: 16px 10px; }
.rail-plegada .rail-marca { justify-content: center; }
.rail-plegada .rail-marca-txt,
.rail-plegada .rail-btn span,
.rail-plegada .rail-quien-nombre,
.rail-plegada .rail-quien-dato { display: none; }
.rail-plegada .rail-grupo { height: 1px; margin: 12px 6px; padding: 0; overflow: hidden; color: transparent; background: var(--azul-linea); }
.rail-plegada .rail-btn { justify-content: center; padding: 0; min-height: 44px; }
.rail-plegada .rail-quien { align-items: center; padding: 12px 0; }
.rail-plegada .rail-quien-fila { margin: 0; }

/* En pantallas angostas se pliega sola */
@media (max-width: 900px) {
  .rail { flex-basis: 68px; padding: 16px 10px; }
  .rail-marca { justify-content: center; }
  .rail-marca-txt, .rail-btn span, .rail-quien-nombre, .rail-quien-dato, .rail-plegar { display: none; }
  .rail-grupo { height: 1px; margin: 12px 6px; padding: 0; overflow: hidden; color: transparent; background: var(--azul-linea); }
  .rail-btn { justify-content: center; padding: 0; min-height: 44px; }
  .rail-quien { align-items: center; padding: 12px 0; }
  .rail-quien-fila { margin: 0; }
}

/* ---------- Pantalla de ingreso (mismo diseño que Procu360) ---------- */
.acceso { display: flex; min-height: 100vh; background: var(--fondo); }

/* Panel oscuro de la izquierda */
.acceso-marca { flex: 1 1 52%; position: relative; overflow: hidden; background: var(--azul); color: #E2E8F0; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; gap: 36px; }
.resplandor { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; }
.resplandor.uno { width: 420px; height: 420px; top: -120px; right: -80px; background: rgba(29, 78, 216, .55); }
.resplandor.dos { width: 360px; height: 360px; bottom: -140px; left: -60px; background: rgba(125, 211, 252, .22); }
.acceso-marca > div, .acceso-virtudes, .acceso-pie { position: relative; z-index: 1; }

.logo-acceso { display: inline-flex; align-items: center; gap: 10px; font-family: 'Plus Jakarta Sans', Inter, sans-serif; font-size: 26px; font-weight: 700; color: #fff; }
.logo-chip { background: var(--accion); border-radius: 10px; padding: 6px 10px; font-size: 18px; letter-spacing: .02em; }
.lema { margin: 24px 0 10px; font-family: 'Plus Jakarta Sans', Inter, sans-serif; font-size: 34px; line-height: 1.15; font-weight: 700; color: #fff; letter-spacing: -0.02em; max-width: 16ch; }
.bajada { margin: 0; font-size: 17px; line-height: 1.5; color: var(--claro); max-width: 46ch; }

.acceso-virtudes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; max-width: 48ch; }
.acceso-virtudes li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.45; color: #CBD5E1; }
.icono-tono { flex: none; width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: rgba(125, 211, 252, .12); border: 1px solid rgba(125, 211, 252, .25); color: var(--celeste); }
.acceso-pie { margin: 0; font-size: 13px; color: #64748B; }

/* Panel claro con la tarjeta */
.acceso-formulario { flex: 1 1 48%; display: flex; align-items: center; justify-content: center; padding: 64px 48px; }
.tarjeta-acceso { width: 100%; max-width: 420px; background: var(--blanco); border: 1px solid var(--borde); border-radius: 24px; padding: 36px 34px; box-shadow: 0 30px 60px rgba(15, 23, 42, .10); display: flex; flex-direction: column; gap: 14px; }
.tarjeta-acceso h1 { font-size: 26px; }
.acceso-bienvenida { margin: -6px 0 6px; color: var(--texto-2); font-size: 14.5px; }

.campo-acceso { display: flex; flex-direction: column; gap: 6px; }
.campo-acceso label { font-size: 14px; font-weight: 600; color: #334155; }
.input-icono { position: relative; display: flex; align-items: center; }
.input-icono svg { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.input-icono input { width: 100%; height: 50px; border: 1px solid var(--borde-input); border-radius: 14px; background: #F8FAFC; padding: 0 14px 0 44px; font: inherit; font-size: 16px; color: var(--texto); }
.input-icono input:focus { border-color: var(--accion); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(29, 78, 216, .15); }

.boton-acceso { margin-top: 6px; min-height: 52px; border: 0; border-radius: 14px; background: var(--accion); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.boton-acceso:hover { background: var(--accion-osc); }
.tarjeta-acceso .login-link { align-self: center; font-size: 14px; color: var(--accion); }
.tarjeta-acceso .alerta { margin: 0; }

@media (max-width: 980px) {
  .acceso { flex-direction: column; }
  .acceso-marca { flex: none; padding: 40px 28px; gap: 24px; }
  .lema { font-size: 26px; max-width: none; }
  .acceso-virtudes { display: none; }
  .acceso-formulario { padding: 28px 16px 48px; }
}
