/* CONANE · Control de Asistencia y Nómina Electrónica · Una solución CISTI */
:root {
  --cn-navy: #0F1B33;
  --cn-navy-2: #16264A;
  --cn-navy-3: #1D3160;
  --cn-cyan: #22C5F0;
  --cn-blue: #1F5FE0;
  --cn-yellow: #F5B52E;
  --cn-grad: linear-gradient(135deg, #22C5F0 0%, #1F5FE0 100%);
  --cn-bg: #F3F6FB;
  --cn-ink: #0F1B33;
  --cn-muted: #64748B;
  --cn-line: #E3E9F2;
  --cn-radius: 14px;
  --bs-body-font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-primary: #1F5FE0;
  --bs-primary-rgb: 31, 95, 224;
  --bs-link-color: #1F5FE0;
  --bs-link-color-rgb: 31, 95, 224;
}
body { font-family: var(--bs-body-font-family); background: var(--cn-bg); color: var(--cn-ink); font-size: .92rem; }
h1, h2, h3, h4, h5, .fw-head { font-weight: 700; letter-spacing: -.01em; }
.text-muted { color: var(--cn-muted) !important; }
a { text-decoration: none; }

/* ---------- Botones ---------- */
.btn { border-radius: 10px; font-weight: 600; }
.btn-brand { background: var(--cn-grad); color: #fff; border: 0; box-shadow: 0 6px 18px -8px rgba(31, 95, 224, .7); }
.btn-brand:hover, .btn-brand:focus { color: #fff; filter: brightness(1.07); }
.btn-primary { background: var(--cn-blue); border-color: var(--cn-blue); }
.btn-soft { background: #EAF1FE; color: var(--cn-blue); border: 0; }
.btn-soft:hover { background: #D9E6FD; color: var(--cn-blue); }
.btn-yellow { background: var(--cn-yellow); color: var(--cn-navy); border: 0; }

/* ---------- Estructura ---------- */
.cn-shell { display: flex; min-height: 100vh; }
.cn-side { width: 252px; flex: 0 0 252px; background: var(--cn-navy); color: #C9D5EA; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background-image: radial-gradient(600px 300px at -20% -10%, rgba(34, 197, 240, .18), transparent 60%), radial-gradient(500px 400px at 120% 110%, rgba(31, 95, 224, .25), transparent 60%); }
.cn-side .brand { padding: 22px 22px 14px; display: flex; align-items: center; gap: 10px; }
.cn-side .brand img { height: 34px; }
.cn-side .company { margin: 0 14px 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); font-size: .78rem; }
.cn-side .company b { color: #fff; display: block; font-size: .85rem; }
.cn-side .company select { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .2); font-size: .8rem; }
.cn-side .company select option { color: #000; }
.cn-nav { padding: 6px 10px 20px; flex: 1; }
.cn-nav .sec { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: #6F86AE; padding: 14px 12px 6px; font-weight: 700; }
.cn-nav a { display: flex; align-items: center; gap: 11px; color: #C9D5EA; padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: .87rem; margin-bottom: 1px; }
.cn-nav a i { font-size: 1.05rem; width: 20px; text-align: center; opacity: .85; }
.cn-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.cn-nav a.active { background: var(--cn-grad); color: #fff; box-shadow: 0 8px 22px -10px rgba(34, 197, 240, .8); }
.cn-nav a .badge { margin-left: auto; }
.cn-side .foot { padding: 14px 22px 20px; font-size: .7rem; color: #6F86AE; border-top: 1px solid rgba(255, 255, 255, .06); }
.cn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cn-top { height: 64px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--cn-line); display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.cn-top h1 { font-size: 1.12rem; margin: 0; }
.cn-top .crumb { font-size: .75rem; color: var(--cn-muted); }
.cn-top .user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--cn-grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex: 0 0 36px; }
.avatar.sm { width: 30px; height: 30px; flex-basis: 30px; font-size: .7rem; }
.cn-content { padding: 26px 28px 40px; }
.cn-burger { display: none; }

/* ---------- Tarjetas ---------- */
.card { border: 1px solid var(--cn-line); border-radius: var(--cn-radius); box-shadow: 0 1px 2px rgba(15, 27, 51, .04); }
.card-header { background: transparent; border-bottom: 1px solid var(--cn-line); padding: 14px 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-header .ms-auto { font-weight: 500; }
.card-body { padding: 18px; }
.kpi { position: relative; overflow: hidden; padding: 18px; }
.kpi .lbl { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cn-muted); font-weight: 700; }
.kpi .num { font-size: 2rem; font-weight: 800; line-height: 1.1; margin-top: 6px; }
.kpi .sub { font-size: .78rem; color: var(--cn-muted); }
.kpi .ico { position: absolute; right: 16px; top: 16px; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.ico-blue { background: #E7EFFE; color: var(--cn-blue); }
.ico-green { background: #E3F7EC; color: #15925A; }
.ico-yellow { background: #FEF4DC; color: #B57F07; }
.ico-red { background: #FDE8E8; color: #D33A3A; }
.ico-cyan { background: #E0F7FD; color: #0B95BA; }
.hero { background: var(--cn-navy); color: #fff; border: 0; overflow: hidden; position: relative;
  background-image: radial-gradient(500px 260px at 100% 0, rgba(34, 197, 240, .35), transparent 60%), radial-gradient(400px 260px at 0 100%, rgba(31, 95, 224, .45), transparent 60%); }
.hero .text-muted { color: #A9B9D6 !important; }
.hero .clock { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.grad-text { background: var(--cn-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Tablas ---------- */
.table { --bs-table-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: .62rem .8rem; border-bottom-color: var(--cn-line); vertical-align: middle; }
.table thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--cn-muted); font-weight: 700; background: #F8FAFD; white-space: nowrap; }
.table-hover > tbody > tr:hover > * { background: #F5F8FE; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }

/* ---------- Estados ---------- */
.st { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-success { background: #E3F7EC; color: #15925A; }
.st-warning { background: #FEF4DC; color: #A87403; }
.st-danger { background: #FDE8E8; color: #D33A3A; }
.st-orange { background: #FFEEDD; color: #C2610C; }
.st-info { background: #E0F7FD; color: #0B88AA; }
.st-primary { background: #E7EFFE; color: var(--cn-blue); }
.st-purple { background: #F0E9FE; color: #7044D6; }
.st-teal { background: #DDF6F1; color: #0E8C74; }
.st-secondary { background: #EEF1F5; color: #55657E; }
.st-dark { background: #1F2937; color: #fff; }
.st-light { background: #F3F5F8; color: #8492A6; }

/* Tarjeta de asistencia (matriz) */
.matrix { font-size: .74rem; }
.matrix th, .matrix td { padding: 4px 3px !important; text-align: center; min-width: 30px; }
.matrix td.name, .matrix th.name { text-align: left; min-width: 190px; position: sticky; left: 0; background: #fff; z-index: 1; }
.cell { display: block; border-radius: 6px; padding: 3px 0; font-weight: 700; font-size: .7rem; }
.cell.c-success { background: #D7F3E3; color: #0F7A4A; }
.cell.c-warning { background: #FDEBBE; color: #8A5F00; }
.cell.c-danger { background: #FBD5D5; color: #B42323; }
.cell.c-orange { background: #FFE0C2; color: #A8520A; }
.cell.c-info, .cell.c-teal { background: #D3F2FA; color: #0A7C9B; }
.cell.c-primary { background: #DCE7FD; color: #1A4FC0; }
.cell.c-purple { background: #E7DCFD; color: #5B33B8; }
.cell.c-secondary, .cell.c-dark { background: #E5E9EF; color: #4B5A70; }
.cell.c-light { background: #F4F6F9; color: #A3AEC0; }

/* Monitor en vivo */
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #18B26B; box-shadow: 0 0 0 0 rgba(24, 178, 107, .6); animation: pulse 1.8s infinite; display: inline-block; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(24, 178, 107, .55); } 70% { box-shadow: 0 0 0 10px rgba(24, 178, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(24, 178, 107, 0); } }
.feed { max-height: 430px; overflow-y: auto; }
.feed-item { display: flex; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--cn-line); }
.feed-item.new { animation: flash 2.4s ease-out; }
@keyframes flash { from { background: #E3F4FF; } to { background: transparent; } }
.feed-item .t { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }

/* Formularios */
.form-control, .form-select { border-radius: 10px; border-color: #D5DEEA; }
.form-control:focus, .form-select:focus { border-color: var(--cn-cyan); box-shadow: 0 0 0 .2rem rgba(34, 197, 240, .2); }
.form-label { font-weight: 600; font-size: .8rem; color: #334155; margin-bottom: .3rem; }
.nav-pills .nav-link { border-radius: 10px; font-weight: 600; color: #475569; }
.nav-pills .nav-link.active { background: var(--cn-navy); }

/* Chat del asistente */
.chat { height: calc(100vh - 290px); min-height: 380px; overflow-y: auto; padding: 18px; background: #FAFCFF; }
.msg { max-width: 82%; margin-bottom: 14px; display: flex; gap: 10px; }
.msg .b { padding: 12px 15px; border-radius: 16px; white-space: pre-wrap; line-height: 1.5; }
.msg.user { margin-left: auto; flex-direction: row-reverse; }
.msg.user .b { background: var(--cn-grad); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot .b { background: #fff; border: 1px solid var(--cn-line); border-bottom-left-radius: 4px; }
.chip { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--cn-line); background: #fff; font-size: .78rem; margin: 0 6px 6px 0; cursor: pointer; color: #334155; }
.chip:hover { border-color: var(--cn-cyan); color: var(--cn-blue); }
.typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: #9FB0C9; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* Acceso */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--cn-navy); font-family: 'Montserrat', system-ui, sans-serif; padding: 24px;
  background-image: radial-gradient(800px 500px at 0 0, rgba(34, 197, 240, .25), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(31, 95, 224, .4), transparent 60%); }
.auth-card { width: 100%; max-width: 410px; background: #fff; border-radius: 20px; padding: 34px 32px 26px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
.auth-logo { height: 46px; display: block; margin: 0 auto 6px; }
.auth-foot { text-align: center; font-size: .72rem; color: var(--cn-muted); margin: 22px 0 0; }
.auth-split { display: grid; grid-template-columns: 1.1fr 1fr; max-width: 1040px; width: 100%; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
.auth-split .pitch { color: #fff; padding: 48px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-right: 0; border-radius: 24px 0 0 24px; }
.auth-split .pitch .auth-brand { display: block; width: 100%; max-width: 400px; height: auto; margin-left: -6px; }
.auth-brand-movil { display: none; }
.auth-split .pitch h2 { font-size: 2rem; font-weight: 800; line-height: 1.15; }
.auth-split .pitch li { margin-bottom: 10px; color: #C9D5EA; }
.auth-split .pitch li i { color: var(--cn-cyan); margin-right: 8px; }
.auth-split .auth-card { max-width: none; border-radius: 0 24px 24px 0; padding: 48px 44px; box-shadow: none; }

/* Recibo imprimible */
.recibo { background: #fff; max-width: 900px; margin: 0 auto; padding: 32px; border-radius: 14px; border: 1px solid var(--cn-line); }
.recibo .hd { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--cn-navy); padding-bottom: 14px; margin-bottom: 16px; }
.recibo .tot { background: var(--cn-navy); color: #fff; border-radius: 12px; padding: 14px 18px; }
.qr { width: 110px; height: 110px; flex: 0 0 110px; }
.qr svg { width: 100%; height: 100%; display: block; }
@media print {
  .cn-side, .cn-top, .no-print { display: none !important; }
  body, .cn-content { background: #fff; padding: 0; }
  .recibo { border: 0; padding: 0; }
}
@media (max-width: 992px) {
  .cn-side { position: fixed; left: -260px; z-index: 50; transition: left .2s; }
  .cn-side.open { left: 0; }
  .cn-burger { display: inline-flex; }
  .cn-content { padding: 18px 14px 30px; }
  .cn-top { padding: 0 14px; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-split .pitch { display: none; }
  .auth-split .auth-card { border-radius: 20px; padding: 34px 28px; }
  .auth-brand-movil { display: block; width: 100%; max-width: 240px; height: auto; margin: 0 auto 18px; }
}

/* ---------- Páginas públicas (pre-registro, firma) ---------- */
body.pub { background: var(--cn-bg); }
.pub-top { background: var(--cn-navy); padding: 14px 0; background-image: radial-gradient(500px 200px at 0% 0%, rgba(34, 197, 240, .25), transparent 60%); }
.pub-main { max-width: 860px; padding-top: 24px; padding-bottom: 24px; }
.pub-hero { background: var(--cn-navy); color: #fff; border-radius: var(--cn-radius); padding: 22px; margin-bottom: 18px; background-image: var(--cn-grad); }
.pub-hero h1 { font-size: 1.35rem; margin: 0 0 4px; }
.progress-cn { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .25); }
.progress-cn > div { height: 100%; border-radius: 8px; background: #fff; transition: width .4s; }
.sec-card { border: 0; border-radius: var(--cn-radius); box-shadow: 0 1px 2px rgba(15, 27, 51, .06); margin-bottom: 14px; }
.sec-card .card-header { background: #fff; font-weight: 700; border-bottom: 1px solid var(--cn-line); border-radius: var(--cn-radius) var(--cn-radius) 0 0; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--cn-line); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .ico { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #EAF1FE; color: var(--cn-blue); font-size: 1.1rem; flex: 0 0 38px; }
.doc-row.ok .ico { background: #E6F7EE; color: #138A4B; }
.firma-box { position: relative; border: 2px dashed #B9C6DB; border-radius: 12px; background: #fff; height: 190px; }
.firma-box canvas { width: 100%; height: 100%; display: block; border-radius: 12px; }
.firma-box .linea { position: absolute; left: 8%; right: 8%; bottom: 42px; border-top: 1px solid #CBD5E1; pointer-events: none; }
.firma-box .ayuda { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: .75rem; color: #94A3B8; pointer-events: none; }
.aviso-texto { white-space: pre-wrap; font-size: .82rem; max-height: 300px; overflow: auto; background: #F8FAFD; border: 1px solid var(--cn-line); border-radius: 10px; padding: 14px; }
.guardado { font-size: .75rem; color: #138A4B; }
.is-invalid ~ .invalid-feedback { display: block; }

/* ---------- Organigrama ---------- */
.org-wrap { overflow-x: auto; padding: 24px; }
.org, .org ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.org { min-width: max-content; }
.org ul { padding-top: 22px; position: relative; }
.org li { position: relative; padding: 22px 6px 0; display: flex; flex-direction: column; align-items: center; }
.org > li { padding-top: 0; }
.org li::before, .org li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 2px solid #C9D5EA; }
.org li::after { right: auto; left: 50%; border-left: 2px solid #C9D5EA; }
.org li:only-child::before, .org li:only-child::after { display: none; }
.org li:only-child { padding-top: 22px; }
.org > li:only-child { padding-top: 0; }
.org li:first-child::before, .org li:last-child::after { border: 0 none; }
.org li:last-child::before { border-right: 2px solid #C9D5EA; border-radius: 0 8px 0 0; }
.org li:first-child::after { border-radius: 8px 0 0 0; }
.org ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid #C9D5EA; }
.org li:only-child > .org-card::before { content: ''; position: absolute; top: -22px; left: 50%; height: 22px; border-left: 2px solid #C9D5EA; }
.org > li:only-child > .org-card::before { display: none; }
.org-card { position: relative; display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--cn-line); border-radius: 12px; padding: 9px 12px; width: 210px; box-shadow: 0 4px 14px -8px rgba(15, 27, 51, .25); cursor: pointer; text-align: left; }
.org-card:hover { border-color: var(--cn-cyan); }
.org-card .avatar { overflow: hidden; }
.org-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.org-card .n { font-weight: 700; font-size: .8rem; line-height: 1.15; }
.org-card .p { font-size: .72rem; color: var(--cn-blue); font-weight: 600; line-height: 1.2; }
.org-card .d { font-size: .68rem; color: var(--cn-muted); }
.org-print-title { display: none; }
@media print {
  .cn-side, .cn-top, .no-print { display: none !important; }
  .cn-content { padding: 0; } .card { border: 0; box-shadow: none; }
  .org-print-title { display: block; margin-bottom: 14px; }
  .org-wrap { overflow: visible; zoom: .6; }
}
.mapa { height: 340px; background: #E3E9F2; } .leaflet-container { font-family: inherit; }
/* ---------- Solicitudes ---------- */
.tipos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tipo input { position: absolute; opacity: 0; }
.tipo span { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 10px 6px; border: 1px solid var(--cn-line); border-radius: 12px; font-size: .74rem; font-weight: 600; cursor: pointer; background: #fff; min-height: 72px; justify-content: center; }
.tipo span i { font-size: 1.3rem; }
.tipo input:checked + span { border-color: var(--cn-blue); background: #EAF1FE; box-shadow: 0 0 0 2px rgba(31, 95, 224, .2); }
.ico-sq { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; flex: 0 0 40px; }
.bg-teal-subtle { background: #DDF6F1; } .text-teal { color: #0F8A75; } .bg-purple-subtle { background: #EFE7FD; } .text-purple { color: #6D3FD8; } .bg-orange-subtle { background: #FDEBDD; } .text-orange { color: #C25A10; }
@media (max-width: 575px) { .tipos { grid-template-columns: repeat(2, 1fr); } }
.foto-emp { position: relative; }
.foto-emp .cam { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--cn-blue); display: flex; align-items: center; justify-content: center; font-size: .75rem; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); pointer-events: none; }
.min-w-0 { min-width: 0; }
/* Instalador de actualizaciones (barra superior) */
.upd-drop{border:2px dashed #C9D6EA;border-radius:14px;padding:28px 16px;text-align:center;cursor:pointer;background:#F7FAFE;transition:.15s}
.upd-drop i{font-size:2.2rem;color:#1E88E5;display:block;margin-bottom:6px}
.upd-drop.drag,.upd-drop:hover{border-color:#1E88E5;background:#EEF5FD}
/* Calculadora de la barra superior */
.calc-pop{position:fixed;z-index:1080;width:300px;max-width:calc(100vw - 16px);background:#fff;border:1px solid #E3E9F2;border-radius:16px;padding:12px;display:none}
.calc-pop.show{display:block}
.calc-head{display:flex;align-items:center;cursor:move;user-select:none;margin-bottom:10px;font-size:.9rem}
.calc-tabs{display:flex;background:#F3F6FB;border-radius:9px;padding:2px}
.calc-tabs button{border:0;background:transparent;padding:3px 10px;font-size:.78rem;border-radius:7px;color:#44526A;font-weight:600}
.calc-tabs button.on{background:#1E88E5;color:#fff}
.calc-hist{min-height:0;font-size:.75rem;color:#6B7A90;text-align:right}
.calc-hist div{cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.calc-hist div:hover{color:#1E88E5}
.calc-exp{text-align:right;color:#6B7A90;font-size:.85rem;min-height:1.2em;word-break:break-all}
.calc-res{text-align:right;font-size:1.9rem;font-weight:700;color:#0F1B33;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis;cursor:copy;border-radius:8px;transition:.2s}
.calc-res.copiado{background:#E8F5E9;color:#2E7D32}
.calc-keys{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:8px}
.calc-keys button{border:0;border-radius:10px;padding:10px 0;font-size:1.05rem;font-weight:600;background:#F3F6FB;color:#0F1B33}
.calc-keys button:hover{filter:brightness(.95)}
.calc-keys .op{background:#E3EEFB;color:#1565C0}
.calc-keys .cl{background:#FDECEC;color:#C62828}
.calc-keys .eq{background:linear-gradient(135deg,#29B6F6,#1E63D6);color:#fff}
.calc-out{background:#F7FAFE;border-radius:10px;padding:10px;font-size:.9rem;line-height:1.6}
/* Buscador general */
.cn-search{position:relative;flex:1;max-width:460px;margin:0 16px 0 auto;display:flex;align-items:center;background:#F3F6FB;border:1px solid #E3E9F2;border-radius:12px;padding:0 10px;height:40px}
.cn-search:focus-within{background:#fff;border-color:#1E88E5;box-shadow:0 0 0 3px rgba(30,136,229,.12)}
.cn-search>i{color:#6B7A90}
.cn-search input[name=q]{border:0;background:transparent;outline:0;flex:1;padding:0 8px;font-size:.92rem;min-width:0}
.cn-search kbd{background:#fff;color:#6B7A90;border:1px solid #E3E9F2;font-size:.68rem;padding:2px 6px}
.cn-search-res{position:absolute;top:46px;left:0;right:0;background:#fff;border:1px solid #E3E9F2;border-radius:14px;max-height:70vh;overflow:auto;display:none;z-index:1070;padding:6px}
.cn-search-res.show{display:block}
.cn-search-res .g{font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#6B7A90;padding:8px 10px 4px}
.cn-search-res a{display:flex;gap:10px;align-items:flex-start;padding:7px 10px;border-radius:10px;color:#0F1B33;text-decoration:none}
.cn-search-res a>i{color:#1E88E5;margin-top:2px}
.cn-search-res a span{min-width:0;display:flex;flex-direction:column}
.cn-search-res a b{font-weight:600;font-size:.88rem}
.cn-search-res a small{color:#6B7A90;font-size:.76rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cn-search-res a:hover,.cn-search-res a.on{background:#EEF5FD}
.cn-search-res a.todo{border-top:1px solid #EEF2F7;margin-top:4px;border-radius:0 0 10px 10px}
@media (max-width:767.98px){.cn-search{display:none;position:absolute;left:12px;right:12px;top:64px;max-width:none;margin:0;z-index:1065;background:#fff}.cn-search.abierto{display:flex}}
/* Ayuda */
.ayuda h3{margin-top:1.6rem;padding-top:.4rem;border-top:1px solid #EEF2F7;color:#0F1B33}
.ayuda p,.ayuda li{color:#33415C;line-height:1.6}
.ayuda-toc{position:sticky;top:84px}
.ayuda-sec.resalta h3{color:#1E88E5}
@media print{.cn-side,.cn-top,.ayuda-toc,.col-lg-3,#aq{display:none!important}.col-lg-9{width:100%}}
/* Dispersión bancaria */
.disp-pre{background:#0f172a;color:#e2e8f0;font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;padding:12px 14px;overflow:auto;max-height:320px;white-space:pre;border-radius:0 0 .5rem .5rem}
.disp-pre .sp{color:#475569}.disp-pre .regla{color:#64748b}
.lay-t td,.lay-t th{white-space:nowrap}.lay-t select,.lay-t input{min-width:90px}
/* Datos llenados desde un documento leído */
.form-control.leido,.form-select.leido{background-color:#E8F3FF;border-color:#5AA9F0}
.aviso-lectura{position:fixed;left:50%;bottom:20px;transform:translate(-50%,140%);max-width:min(560px,calc(100% - 32px));background:#0F172A;color:#fff;padding:12px 16px;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.25);font-size:.9rem;z-index:2000;transition:transform .3s;cursor:pointer}
.aviso-lectura.show{transform:translate(-50%,0)}.aviso-lectura.alerta{background:#8A4B00}.aviso-lectura i{margin-right:6px}
.eq-hero{background:linear-gradient(120deg,#0B1B3F,#1565C0);color:#fff}
.autollenado{background-color:#E6F7EF!important;transition:background-color .6s}
/* Nómina única: logos y colores de empresa, botones de filtro, orden y detalle de pagos */
.emp-logo{display:inline-flex;align-items:center;justify-content:center;background:#fff;border:1px solid #E3E8F0;border-radius:8px;padding:3px 8px;vertical-align:middle;min-width:64px}
.emp-logo img{height:22px;max-width:140px;object-fit:contain}
.emp-cell{display:flex;align-items:center;gap:.6rem}.emp-cell .emp-logo{width:150px}
.emp-badge{display:inline-block;font-size:.75rem;font-weight:700;padding:.15rem .5rem;border-radius:6px;color:var(--ec);background:color-mix(in srgb,var(--ec) 12%,#fff);border:1px solid color-mix(in srgb,var(--ec) 45%,#fff)}
.uchip{--ec:var(--cn-navy);border:1.5px solid color-mix(in srgb,var(--ec) 55%,#fff);background:#fff;color:var(--ec);border-radius:999px;padding:.25rem .8rem;font-size:.82rem;font-weight:600;line-height:1.4}
.uchip.on{background:var(--ec);color:#fff;border-color:var(--ec)}
.uchip-emp{padding:.2rem .7rem;border-width:2px;border-color:var(--ec)}.uchip-emp img{height:22px;max-width:120px;object-fit:contain;display:block}
.uchip-emp.on{background:#fff;box-shadow:0 0 0 3px color-mix(in srgb,var(--ec) 35%,transparent)}
.tuni th[data-s]{cursor:pointer;user-select:none;white-space:nowrap}
.tuni th[data-s]::after{content:"\2195";opacity:.3;margin-left:.3rem;font-size:.8em}
.tuni th.s-asc::after{content:"\25B2";opacity:.8}.tuni th.s-desc::after{content:"\25BC";opacity:.8}
.tuni .ufila-r{cursor:pointer}.tuni .uchev{font-size:.75em;transition:transform .15s;display:inline-block}
.tuni .abierto .uchev{transform:rotate(90deg)}.tuni .udet>td{background:#F6F8FC;padding:.8rem 1rem}
.upago{display:inline-block;font-size:.75rem;font-weight:600;padding:.1rem .5rem;border-radius:6px}
.upago-ok{background:#E3F6EA;color:#17733A}.upago-par{background:#FFF4DB;color:#8A5A00}.upago-pen{background:#EEF1F6;color:#4B5A70}
.tuni .ufila-r>td:first-child{min-width:240px}.tuni .ufila-r>td:not(:first-child){white-space:nowrap}
