/* Gestiontrak · Cuentas por cobrar */
.cxc { --cx-rojo: var(--bad); --cx-verde: var(--ok); --cx-logo-bg: transparent; }
@media (prefers-color-scheme: dark) { .cxc { --cx-logo-bg: #f4f4f5; } }
.cxc .encabezado.chico { margin: 18px 0 10px; }
.cxc .encabezado.chico h2 { font-size: 17px; }
.cxc .cx-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 4px 0 18px; }
.cxc .cx-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.cxc .cx-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.cxc .cx-badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; margin-left: 4px; }
.cxc .cx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--r); overflow: hidden; }
.cxc .cx-kpi { background: var(--surface); padding: 12px 14px; min-width: 0; }
.cxc .cx-kpi .l, .cxc .cx-resumen .l { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cxc .cx-kpi .v { font-family: var(--f-mono); font-size: 20px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cxc .cx-kpi .n { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .cxc .cx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cxc .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.cxc .seg button { border: 0; background: var(--surface); color: var(--muted); font-weight: 600; font-size: 13px; padding: 7px 11px; cursor: pointer; }
.cxc .seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.cxc .chk { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.cxc input.num { font-family: var(--f-mono); text-align: right; }
.cxc td.m, .cxc th.m { text-align: right; white-space: nowrap; }
.cxc td.m { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.cxc td.d { text-align: right; white-space: nowrap; }
.cxc td .sec, .cxc .sec { color: var(--muted); font-size: 12px; }
.cxc .rojo { color: var(--cx-rojo); }
.cxc .haber { color: var(--cx-verde); }
.cxc tr.grp td { background: var(--accent-soft); font-weight: 600; cursor: pointer; }
.cxc tr.grp td:first-child::before { content: "▸"; display: inline-block; width: 16px; color: var(--accent); transition: transform .15s; }
.cxc tr.grp.open td:first-child::before { transform: rotate(90deg); }
.cxc tr.emp td:first-child { padding-left: 30px; }
.cxc tr.tot td { font-weight: 700; border-top: 2px solid var(--accent); }
.cxc .cx-tinta { background: var(--accent-soft); }
.cxc .cx-alerta { background: var(--bad-bg); }
.cxc .cx-edit input { width: 100%; }
.cxc .enlace { align-self: auto; font-size: inherit; }
.cxc .cx-overlay { position: fixed; inset: 0; background: rgba(10, 10, 12, .55); display: flex; align-items: flex-start; justify-content: center; padding: max(24px, env(safe-area-inset-top)) 12px 24px; z-index: 30; overflow-y: auto; }
.cxc .cx-modal { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; width: min(1000px, 100%); padding: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); min-width: 0; }
.cxc .cx-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 3px solid var(--accent); }
.cxc .cx-brand-t { font-family: var(--f-display); font-weight: 700; font-size: 17px; color: var(--ink); }
.cxc .cx-logo { width: auto; display: block; background: var(--cx-logo-bg); border-radius: 6px; padding: 3px; }
.cxc .cx-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cxc .cx-resumen > div { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.cxc .cx-resumen .v { font-family: var(--f-mono); font-size: 15px; }
