/* crm.css — Capital N CRM. Mismo sistema visual que el bot (carbón slate + bordó, Inter con números tabulares; el tratamiento
   de las cifras y los segmentados, como Aranceles del bot). Rediseño 2026-11: CUMPLIMIENTO_REQUERIMIENTOS_PLAN.md §2.
   Tema claro, como el bot. Sin estilos inline (CSP): todo por clases. Colores de estado validados para daltonismo. */
:root {
  --bg: #F6F7F9; --surface: #FFFFFF; --surface-2: #FAFBFC; --soft: #EEF0F3;
  --ink: #1F2530; --ink-2: #3A4250; --muted: #5F6876; --faint: #8A929E;   /* faint: íconos y bordes, nunca texto para leer */
  --border: #E6E8EC; --border-2: #D6DAE0;
  --red: #8E1B23; --red-dark: #71151B; --red-tint: #FBF6F6;
  --ok: #157048; --ok-bg: #E5F3EC; --ok-line: #B9DFCB;
  --pend: #8A5B00; --pend-bg: #FCF1DA; --pend-line: #E3BE6E;
  --rech: #B3261E; --rech-bg: #FDECEB; --rech-line: #F2BDB9;   /* riesgo / error: distinto del bordó de la marca */
  --com: #2652C9; --com-bg: #EBF0FC; --com-line: #C5D3F5;
  --warn: #8A6400; --warn-bg: #FFF8E6; --warn-line: #F0D98C;
  --s-ok: #3D7A5C; --s-pend: #CDD3DC; --s-com: #3E6FD8; --s-obs: #B8262F;
  --grid: #EDEFF2; --axis: #C9CED6;
  --shadow: 0 12px 32px rgba(31,37,48,.10), 0 2px 6px rgba(31,37,48,.06);
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;   /* solo para código técnico */
  /* escala tipográfica (una sola para todo el CRM) */
  --t-xs: 12px; --t-s: 13px; --t-m: 14px; --t-l: 16px; --t-xl: 20px; --t-xxl: 28px;
  --drawer-w: 460px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.2; text-wrap: balance; }
h1 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 13.5px; font-weight: 600; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .92em; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stack-s { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sub { font-size: 12.5px; color: var(--muted); }
:is(a, button, select, textarea, input, [tabindex]):focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------- login: igual que el del bot (tarjeta blanca, logo de marca, trazo bordó al entrar) ---------- */
.logo-img { display: block; height: 60px; width: auto; max-width: 100%; }
.logo-img--sm { height: 32px; }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.gate__card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 40px rgba(16, 24, 40, .08); padding: 44px 44px 38px; text-align: center; width: min(350px, 100%); }
.gate__card > .logo-img { margin: 0 auto 26px; }
.gate h1 { font-size: 18px; margin: 0 0 6px; }
.gate__txt { color: var(--ink-2); margin: 0 0 24px; font-size: 14px; }
.gate__txt strong { word-break: break-all; }
.gate__aviso { margin: -10px 0 18px; padding: 9px 12px; border-radius: 8px; background: var(--rech-bg); color: var(--rech); font-size: 12.5px; }
.gate__nota { color: var(--muted); margin: -12px 0 20px; font-size: 12.5px; }
.gate__acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gate__card .btn { width: 100%; height: 40px; font-size: 14px; font-weight: 600; }
/* Carga — la misma ruedita del bot: un aro fino gris con un tramo bordó que gira. Sola en el centro mientras se verifica
   la sesión (sin tarjeta, sin logo ni barra); «Cargando…» queda para el lector de pantalla. Aparece con un leve
   retraso: si todo es rápido, no parpadea. */
.gate__card--boot { background: transparent; border-color: transparent; box-shadow: none; }
.boot { display: flex; flex-direction: column; align-items: center; gap: 12px; opacity: 0; animation: boot-in .2s ease .25s forwards; }
.aro { flex: none; display: block; width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--border-2);
  border-top-color: var(--red); animation: aro-gira .8s linear infinite; }
/* Dentro de una pantalla (CRM_UI.cargando): en el lugar de la lista, más chica; `--mini`: en línea (subtítulos,
   botones); `--texto`: con el texto a la vista («Leyendo el archivo…»). */
.cargando { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 44px 0; color: var(--muted); font-size: 13px;
  opacity: 0; animation: boot-in .2s ease .2s forwards; }
.cargando .aro { width: 22px; height: 22px; border-width: 2px; }
.cargando__txt { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cargando--texto { justify-content: flex-start; padding: 6px 0; }
.cargando--texto .cargando__txt { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
.cargando--mini { display: inline-flex; padding: 0; vertical-align: -2px; margin-left: 6px; }
.cargando--mini .aro, .aro--btn { width: 12px; height: 12px; border-width: 1.5px; }
.aro--btn { display: inline-block; vertical-align: -1px; margin-right: 6px; border-color: currentColor; border-top-color: transparent; opacity: .8; }
@keyframes boot-in { to { opacity: 1; } }
@keyframes aro-gira { to { transform: rotate(360deg); } }
/* trazo: una línea finita bordó recorre el borde de la tarjeta (CRM_UI.trazo) */
.trazo { position: absolute; top: -1px; left: -1px; pointer-events: none; overflow: visible; z-index: 2; }
.trazo rect { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100;
  animation: trazo-draw .6s cubic-bezier(.65, 0, .35, 1) forwards, trazo-fade .45s ease-out .6s forwards; }
@keyframes trazo-draw { to { stroke-dashoffset: 0; } }
@keyframes trazo-fade { to { opacity: 0; } }

/* ---------- barra ---------- */
.brand { display: flex; align-items: center; white-space: nowrap; text-decoration: none; color: var(--ink); padding: 6px 0; }
.brand__tag { padding-left: 12px; margin-left: 12px; border-left: 1px solid var(--border-2); font-size: 10.5px; font-weight: 600; letter-spacing: .2em; color: var(--muted); line-height: 22px; }
.appbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px; padding: 0 36px; min-height: 52px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tab { font-size: 13px; padding: 16px 12px 13px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--red); font-weight: 600; }
.badge { font-size: 11px; font-weight: 600; min-width: 20px; padding: 0 6px; line-height: 18px; text-align: center; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tab.on .badge { background: var(--red); color: #fff; }
.savestate { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.savestate__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.savestate.saving .savestate__dot { background: var(--com); animation: pulse 1s infinite; }
.savestate.error .savestate__dot, .savestate.offline .savestate__dot { background: var(--warn); }
.savestate.error { color: var(--rech); }
@keyframes pulse { 50% { opacity: .35; } }
.me { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.me__ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--red); background: var(--red-tint); border: 1px solid #EED9DB; flex: none; }
.me__ico svg { width: 14px; height: 14px; }
.offbar { position: sticky; top: 52px; z-index: 19; background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--warn-line); font-size: 12.5px; padding: 7px 20px; font-weight: 500; }

/* ---------- página ---------- */
.page { padding: 26px 36px 32px; display: flex; flex-direction: column; gap: 14px; max-width: 1680px; margin: 0 auto; min-width: 0; transition: margin-right .2s ease; }
@media (min-width: 1180px) { .app.has-drawer .page { margin-right: var(--drawer-w); } }
.page-h { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: space-between; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; text-align: left; font: inherit; color: inherit; }
button.kpi { cursor: pointer; }
button.kpi:hover { border-color: var(--border-2); background: var(--surface-2); }
button.kpi.on { border-color: var(--red); box-shadow: inset 0 -3px 0 var(--red); }
.kpi__v { font-size: 26px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi__v small { margin-left: 5px; font-size: var(--t-s); font-weight: 500; letter-spacing: 0; color: var(--muted); }
.kpi__l { order: -1; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi__h { font-size: var(--t-xs); color: var(--muted); }
.kpi.bad .kpi__v { color: var(--rech); } .kpi.warn .kpi__v { color: var(--warn); } .kpi.good .kpi__v { color: var(--ok); }
.kpi.skel .kpi__v { color: transparent; background: var(--soft); border-radius: 6px; width: 60%; animation: skel 1.4s ease-in-out infinite; }
.kpi.skel .kpi__l { color: transparent; background: var(--soft); border-radius: 4px; width: 80%; height: 10px; margin-top: 6px; animation: skel 1.4s ease-in-out .15s infinite; }
@keyframes skel { 50% { opacity: .5; } }
.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { font: inherit; font-size: var(--t-s); font-weight: 500; padding: 0 12px; height: 32px; border: 0; background: none; color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--border); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--red); color: #fff; font-weight: 600; }
.seg svg { width: 14px; height: 14px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.field__ico { width: 15px; height: 15px; flex: none; color: var(--faint); }
.field { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 8px; padding: 0 10px; height: 32px; font-size: var(--t-s); color: var(--muted); }
.field:focus-within { border-color: var(--ink-2); }
.field input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); width: 240px; max-width: 46vw; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; background: var(--surface); max-width: 100%; }
.chips:empty { display: none; }
.chip { font: inherit; font-size: var(--t-s); font-weight: 500; height: 32px; padding: 0 12px; border: 0; border-right: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip:last-child { border-right: 0; }
.chip:hover { background: var(--surface-2); }
.chip__c { font-variant-numeric: tabular-nums; font-size: var(--t-xs); color: var(--muted); font-weight: 500; }
.chip.on { background: var(--red); color: #fff; font-weight: 600; }
.chip.on .chip__c { color: inherit; opacity: .8; }
.btn { font: inherit; font-size: var(--t-s); font-weight: 500; height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn--primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn--link { border: 0; background: none; color: var(--red); padding: 0; height: auto; font-weight: 500; }
.nota-aviso { margin: 0; padding: 8px 10px; border: 1px solid var(--warn-line); border-radius: 8px; background: var(--warn-bg); color: var(--ink-2); font-size: 12.5px; }
.nota-aviso .btn--link { font-size: inherit; text-decoration: underline; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card--flush { padding: 0; overflow: hidden; }
.card-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.card-h p { font-size: 12.5px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 12px; }
.card--span { grid-column: 1 / -1; }
.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-2); border-radius: 10px; }
.empty--err { color: var(--rech); border-color: var(--rech-line); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 4px; font-size: 12.5px; color: var(--muted); }

/* ---------- días y tabla ---------- */
.day { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; flex: none; }
.day__h { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 14px; background: var(--surface-2); cursor: pointer; user-select: none; width: 100%; border: 0; font: inherit; color: inherit; text-align: left; }
.day:not(.closed) .day__h { border-bottom: 1px solid var(--border); }
.day__d { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.day__w { color: var(--muted); font-size: 12.5px; text-transform: capitalize; }
.caret { transition: transform .15s; color: var(--muted); display: inline-block; width: 12px; }
.day.closed .caret { transform: rotate(-90deg); }
.progress { width: 120px; height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; display: flex; }
.progress svg { width: 100%; height: 100%; display: block; }
.progress .p-ok { fill: var(--s-ok); } .progress .p-obs { fill: var(--s-obs); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.pill { font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--surface); white-space: nowrap; }
.pill.bad { color: var(--rech); background: var(--rech-bg); border-color: var(--rech-line); }
.pill.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.pill.good { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.tbl-wrap { overflow-x: auto; }
/* tabla larga con encabezado fijo (todos los instrumentos del período) */
.tbl-scroll { max-height: 620px; overflow-y: auto; }
.tbl-scroll thead th { position: sticky; top: 0; z-index: 1; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
/* órdenes: anchos fijos para que las columnas de todos los días queden alineadas; el titular toma el resto */
.ord-tbl { table-layout: fixed; width: max(100%, 1340px); }
.ord-tbl .c-chk { width: 44px; } .ord-tbl .c-hora { width: 66px; } .ord-tbl .c-cta { width: 104px; } .ord-tbl .c-lado { width: 84px; }
.ord-tbl .c-ins { width: 172px; } .ord-tbl .c-cant { width: 96px; } .ord-tbl .c-pre { width: 92px; } .ord-tbl .c-com { width: 88px; }
.ord-tbl .c-ctl { width: 150px; } .ord-tbl .c-foto { width: 90px; }
.ord-tbl td { overflow: hidden; text-overflow: ellipsis; }
/* órdenes: columnas de ancho fijo con el relleno de antes (el general de tablas es más amplio y acá cortaba lado y controles) */
.ord-tbl th, .ord-tbl td { padding-left: 9px; padding-right: 9px; }
th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
th button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
th button.on { color: var(--ink); }
td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; color: var(--ink-2); }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sub-cell { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.row { cursor: pointer; }
.row:hover td { background: var(--surface-2); }
.row.sel td { background: var(--red-tint); }
.row td:first-child { box-shadow: inset 3px 0 0 var(--stripe, transparent); }
.row.g-ok { --stripe: var(--s-ok); } .row.g-obs { --stripe: var(--s-obs); } .row.g-pend { --stripe: var(--border-2); }
.row.saving td { opacity: .7; }
.chk { width: 16px; height: 16px; accent-color: var(--red); cursor: pointer; margin: 0; }
.cli { max-width: 260px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 500; }
.side { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; }
.side.compra { color: var(--ok); background: var(--ok-bg); }
.side.venta { color: var(--rech); background: var(--rech-bg); }
/* cuenta e instrumento: misma letra que el resto (Inter), con números de ancho fijo para que alineen */
.cod { font-variant-numeric: tabular-nums; font-size: 12.5px; letter-spacing: .02em; color: var(--muted); }
.ins { font-weight: 500; color: var(--ink); letter-spacing: .005em; }
select.st { appearance: none; -webkit-appearance: none; font: inherit; font-size: 12px; font-weight: 600; padding: 4px 24px 4px 10px; border-radius: 999px; border: 1px solid var(--border-2); cursor: pointer; color: var(--muted); min-width: 128px;
  background-color: var(--surface); background-repeat: no-repeat;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-size: 4px 4px, 4px 4px; background-position: right 12px center, right 8px center; }
select.st:disabled { cursor: not-allowed; opacity: .55; }
select.st[data-v="ok"] { color: var(--ok); background-color: var(--ok-bg); border-color: var(--ok-line); }
select.st[data-v="pend_confirm"] { color: var(--pend); background-color: var(--pend-bg); border-color: var(--pend-line); }
select.st[data-v="rechazada"] { color: var(--rech); background-color: var(--rech-bg); border-color: var(--rech-line); }
select.st[data-v="rev_comision"] { color: var(--com); background-color: var(--com-bg); border-color: var(--com-line); }
select.st.due { border-style: dashed; border-color: var(--warn); color: var(--warn); background-color: var(--warn-bg); }
.duehint { display: block; font-size: 10.5px; color: var(--warn); margin-top: 2px; font-weight: 600; }
.foto { display: inline-flex; align-items: center; gap: 6px; }
.foto img { width: 36px; height: 27px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border-2); background: var(--soft); }
.foto__n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.foto__pdf { font-size: 10px; font-weight: 700; color: var(--rech); border: 1px solid var(--rech-line); background: var(--rech-bg); border-radius: 4px; padding: 5px 6px; }
.nofoto { font-size: 11.5px; font-weight: 600; color: var(--rech); background: var(--rech-bg); border: 1px solid var(--rech-line); padding: 2px 8px; border-radius: 999px; }
.nota-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: inline-block; margin-left: 6px; vertical-align: middle; }
.flag { font-size: 10.5px; color: var(--warn); font-weight: 600; margin-left: 6px; }
.bulk { position: sticky; bottom: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); z-index: 5; }
.bulk select { font: inherit; font-size: 12.5px; border-radius: 6px; border: 1px solid var(--muted); background: var(--ink); color: #fff; padding: 4px 8px; }
.bulk .btn { background: transparent; color: #fff; border-color: var(--muted); }
.acc-row { cursor: pointer; }
.acc-row:hover td { background: var(--surface-2); }
.acc-row.sel td { background: var(--red-tint); }

/* ---------- calendario ---------- */
.cal { position: fixed; z-index: 40; width: 316px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cal .seg { width: 100%; }
.cal .seg button { flex: 1; justify-content: center; padding: 0 6px; }
.cal__nav { display: flex; align-items: center; justify-content: space-between; }
.cal__nav b { font-size: 13.5px; text-transform: capitalize; }
.cal__nav button { font: inherit; width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 15px; }
.cal__nav button:disabled { opacity: .35; cursor: default; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal__wd { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: center; padding-block: 4px; font-weight: 600; }
.cal__d { position: relative; font: inherit; font-size: 12.5px; height: 34px; border: 0; border-radius: 7px; background: none; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.cal__d:hover:not(:disabled) { background: var(--soft); }
.cal__d.finde { color: var(--faint); }
.cal__d:disabled { color: var(--faint); opacity: .45; cursor: default; }
.cal__d.hoy { box-shadow: inset 0 0 0 1px var(--border-2); }
.cal__d.in { background: var(--red-tint); border-radius: 0; }
.cal__d.sel, .cal__d.sel:hover:not(:disabled) { background: var(--red); color: #fff; font-weight: 600; }
.cal__foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 10px; }
.cal__foot span { font-size: 12px; color: var(--muted); flex: 1 1 100%; }
.cal__foot div { display: flex; gap: 6px; margin-left: auto; }

/* ---------- métricas ---------- */
.chart { position: relative; width: 100%; min-height: 150px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { fill: var(--muted); font-family: var(--sans); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .ax { stroke: var(--axis); stroke-width: 1; }
.f-ok { fill: var(--s-ok); } .f-pend { fill: var(--s-pend); } .f-obs { fill: var(--s-obs); }
.chart .seg-g { stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; outline: none; }
.chart .hov rect, .chart .hov path { filter: brightness(1.08); }
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border-2); border-radius: 8px; box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px; min-width: 160px; z-index: 4; }
.tip__t { color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
.tip__r { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip__r span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.tip__r i { width: 10px; height: 2px; border-radius: 2px; display: inline-block; }
.tip__r b { color: var(--ink); font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bg-ok { background: var(--s-ok); } .bg-pend { background: var(--s-pend); } .bg-com { background: var(--s-com); } .bg-obs { background: var(--s-obs); }
.ibar { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.ibar svg { flex: 1; height: 8px; display: block; }
.ibar .ibar__bg { fill: var(--soft); } .ibar .ibar__fg { fill: var(--red); }
.ibar__v { min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.unit { font-size: 11.5px; color: var(--muted); }
.neg { color: var(--rech); }
.more { font-size: 12.5px; color: var(--muted); text-align: center; padding: 6px; }

/* ---------- panel lateral ---------- */
.drawer { position: fixed; top: 52px; right: 0; bottom: 0; width: min(var(--drawer-w), 100%); background: var(--surface); border-left: 1px solid var(--border-2); box-shadow: var(--shadow); display: flex; flex-direction: column; z-index: 30; }
.drawer__h { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: start; }
.drawer__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.drawer__t b { font-size: 15.5px; }
.drawer__t span { font-size: 12px; color: var(--muted); }
.x { font: inherit; border: 1px solid var(--border-2); background: var(--surface); color: var(--ink-2); border-radius: 6px; width: 30px; height: 30px; cursor: pointer; font-size: 16px; line-height: 1; flex: none; }
.drawer__b { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 20px; }
.drawer__f { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.kv div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kv span, .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kv b { font-weight: 500; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; width: fit-content; white-space: nowrap; }
.status.g-ok { color: var(--ok); background: var(--ok-bg); } .status.g-pend { color: var(--warn); background: var(--warn-bg); } .status.g-obs { color: var(--rech); background: var(--rech-bg); }
.ctrls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ctrl { border: 1px solid var(--border); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.ctrl select.st { width: 100%; }
.ctrl__when { font-size: 11.5px; color: var(--muted); }
textarea { width: 100%; min-height: 66px; font: inherit; font-size: 13px; border: 1px solid var(--border-2); border-radius: 8px; padding: 8px 10px; background: var(--surface); color: var(--ink); resize: vertical; }
textarea:disabled { opacity: .6; }
.drop { border: 1.5px dashed var(--border-2); border-radius: 10px; padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; color: var(--muted); font-size: 12.5px; background: var(--surface-2); transition: border-color .15s, background .15s; }
.drop.hot { border-color: var(--red); background: var(--red-tint); }
.drop.off { opacity: .55; }
.drop b { color: var(--ink); font-size: 13px; }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.shot { position: relative; border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; background: var(--soft); }
.shot__img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; border: 0; padding: 0; background: var(--soft); }
.shot__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot__pdf { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; font-weight: 700; color: var(--rech); background: var(--rech-bg); border: 0; cursor: pointer; font: inherit; }
.shot__meta { font-size: 10.5px; color: var(--muted); padding: 4px 6px; display: flex; justify-content: space-between; gap: 4px; }
.shot__meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot__rm { position: absolute; top: 4px; right: 4px; height: 22px; padding: 0 7px; border-radius: 5px; border: 0; background: rgba(15,23,32,.72); color: #fff; cursor: pointer; font-size: 11px; }
.shot.quitada { opacity: .5; }
.shot.subiendo .shot__meta span:last-child { color: var(--com); font-weight: 600; }
.shot.fallo { border-color: var(--rech-line); }
.hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-2); }
.hist li { display: flex; gap: 10px; }
.hist time { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 98px; flex: none; }
.mini-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.mini-list button { font: inherit; text-align: left; background: var(--surface); border: 0; border-bottom: 1px solid var(--border); padding: 8px 10px; display: grid; grid-template-columns: 82px 58px 1fr auto; gap: 8px; align-items: center; cursor: pointer; color: var(--ink-2); font-size: 12.5px; }
.mini-list button:last-child { border-bottom: 0; }
.mini-list button:hover { background: var(--surface-2); }
.mini-list .ins { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ---------- comitentes: lista de personas ---------- */
.clist { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: clip; }
.clist__letra { position: sticky; top: 52px; z-index: 1; padding: 6px 20px; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--red);
  background: var(--surface-2); border-bottom: 1px solid var(--border); }
.crow { font: inherit; width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 16px; align-items: center; gap: 14px; padding: 12px 20px;
  background: var(--surface); border: 0; border-bottom: 1px solid var(--border); text-align: left; cursor: pointer; color: var(--ink); }
.crow:last-child { border-bottom: 0; }
.crow:hover { background: var(--surface-2); }
.crow.sel { background: var(--red-tint); box-shadow: inset 3px 0 0 var(--red); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--red); background: var(--red-tint); border: 1px solid #EED9DB; }
.crow__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.crow__name { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow__meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.crow__meta .cod { font-size: 12.5px; }
.dot { color: var(--faint); }
.crow__last { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; white-space: nowrap; }
.crow__last b { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.crow__last span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.crow__last--sin b { font-weight: 500; color: var(--faint); }
.crow__chev { width: 16px; height: 16px; color: var(--faint); }
.crow:hover .crow__chev { color: var(--ink-2); }
.ficha__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ficha__kpis div { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ficha__kpis b { font-size: 18px; font-weight: 600; color: var(--ink); }
.ficha__kpis span { font-size: 11.5px; color: var(--muted); }
.soon { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.soon div { border: 1px dashed var(--border-2); border-radius: 8px; padding: 10px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.soon b { color: var(--ink-2); font-weight: 600; }
.lightbox { position: fixed; inset: 0; background: rgba(10,14,20,.84); display: grid; place-items: center; z-index: 60; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #fff; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 13px; padding: 9px 14px; border-radius: 8px; z-index: 70; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast.err { background: var(--rech); }

/* ---------------------------------------------------------------------------- Cumplimiento (PLD) · Movimientos */
.pld-barra { gap: 8px 10px; }
.pld-barra__fin { margin-left: auto; }
.pld-sub { display: inline-flex; align-items: center; min-height: 20px; }
.pld-sub .cargando--mini { margin-left: 0; }
.pld-avisos { display: flex; flex-direction: column; gap: 2px; }
.pld-kpis { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pld-tbl td { vertical-align: top; padding-top: 10px; padding-bottom: 10px; }
.pld-tbl th { background: var(--surface-2); }
.pld-tit { display: block; color: var(--ink); font-weight: 500; white-space: normal; max-width: 360px; }
.pld-cta { font-size: var(--t-xs); font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--muted); }
.pld-in { color: var(--ok); font-weight: 600; }
.pld-out { color: var(--rech); font-weight: 600; }
.pld-warn { color: var(--warn); }
.pld-tachado td { color: var(--faint); }
.pld-tachado .pld-tit { color: var(--faint); }
.pld-tachado .pld-in, .pld-tachado .pld-out { color: var(--faint); text-decoration: line-through; }
.pld-or { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--surface); }
.pld-or--propio { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.pld-or--tercero { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.pld-or--revisar { color: var(--com); background: var(--com-bg); border-color: var(--com-line); }
.pld-mas { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; }
.pld-dl { display: grid; grid-template-columns: minmax(120px, auto) minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 13px; }
.pld-dl dt { color: var(--muted); }
.pld-dl dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .page { padding: 16px; }
  .appbar { padding: 0 16px; gap: 10px; }
  .ctrls, .kv { grid-template-columns: 1fr; }
  .crow { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 12px; gap: 10px; } .crow__chev { display: none; } .avatar { width: 36px; height: 36px; }
  .clist__letra { top: 0; }
  .ficha__kpis { grid-template-columns: 1fr; }
  .savestate__txt { display: none; }
  .field { width: 100%; } .field input { width: 100%; max-width: none; }
  .appbar { position: static; }
  .offbar { top: 0; }
  .drawer { top: 0; }
  .progress { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .page, .caret { transition: none; } .savestate.saving .savestate__dot { animation: none; }
  /* la ruedita queda quieta: para que no parezca trabada, ahí sí se ve «Cargando…» (la entrada conserva su retraso) */
  .aro { animation: none; } .kpi.skel .kpi__v, .kpi.skel .kpi__l { animation: none; } .trazo { display: none; }
  .boot .sr, .cargando__txt { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; font-size: 12.5px; color: var(--muted); }
}

/* ---------- lectura de la captura con IA (mig 202): insignia en la fila y revisión en el panel ---------- */
.rev { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; border-radius: 50%; font-size: 11px; font-weight: 700;
  line-height: 1; vertical-align: middle; border: 1px solid var(--border-2); color: var(--muted); background: var(--surface); }
.rev--coincide { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.rev--incompleta { color: var(--pend); background: var(--pend-bg); border-color: var(--pend-line); }
.rev--no_coincide { color: var(--surface); background: var(--rech); border-color: var(--rech); }
.rev--ilegible, .rev--error { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.rev--pendiente { color: var(--com); background: var(--com-bg); border-color: var(--com-line); }
.revc { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.revc__h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.revc__h b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 120px; font-weight: 600; }
.revc__h .rev { margin-left: 0; }
.revc__e { font-size: 12px; font-weight: 600; color: var(--muted); }
.revc__e--coincide { color: var(--ok); } .revc__e--no_coincide { color: var(--rech); } .revc__e--incompleta { color: var(--pend); }
.revtbl { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
.revtbl th:nth-child(1) { width: 27%; } .revtbl th:nth-child(4) { width: 72px; }
.revtbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 4px 6px; border-bottom: 1px solid var(--border); }
.revtbl td { padding: 5px 6px; border-bottom: 1px solid var(--soft); vertical-align: top; overflow-wrap: anywhere; white-space: normal; text-overflow: clip; overflow: visible; }
.revtbl tr.revtbl--distinto td { background: var(--rech-bg); }
.revtbl tr.revtbl__nota td { font-size: 12px; color: var(--ink-2); padding-top: 0; border-bottom-color: var(--border); }
.revr { font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--muted); }
.revr--ok { color: var(--ok); } .revr--distinto { color: var(--rech); } .revr--dudoso, .revr--falta { color: var(--pend); }

/* ---------- Cumplimiento · casos (etapa 2): bandeja y ficha ---------- */

.pld-seccion { display: flex; flex-direction: column; gap: 12px; }
.app.has-drawer--ancho { --drawer-w: 760px; }
.cs-num { font-size: var(--t-s); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.cs-dias { white-space: nowrap; color: var(--ink-2); }
/* estado: punto + texto. El color fuerte queda para lo que de verdad espera algo (escalado, para aprobar, respaldo recibido, revisar). */
.cs-est { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-s); font-weight: 500; color: var(--ink-2); white-space: nowrap; margin: 0 10px 2px 0; }
.cs-est::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--faint); flex: none; }
.cs-est--nuevo::before { background: var(--com); }
.cs-est--curso::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); }
.cs-est--ok { color: var(--muted); } .cs-est--ok::before { background: var(--ok); }
.cs-est--respaldo_recibido, .cs-est--revisar { color: var(--pend); font-weight: 600; } .cs-est--respaldo_recibido::before, .cs-est--revisar::before { background: #D29A1E; }
.cs-est--para_aprobar { color: var(--red); font-weight: 600; } .cs-est--para_aprobar::before { background: var(--red); }
.cs-est--escalado, .cs-est--ros { color: var(--rech); font-weight: 600; } .cs-est--escalado::before, .cs-est--ros::before { background: var(--rech); }
.cs-regla { display: inline-block; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 0 6px; line-height: 18px; border-radius: 4px; border: 1px solid var(--border-2); background: var(--surface); color: var(--ink-2); margin-right: 6px; }
.cs-bloque { display: flex; flex-direction: column; gap: 10px; }
.cs-bloque h3 { font-size: 13.5px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.cs-bloque h4 { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.cs-estado { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.cs-estado__l { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cs-faltan { margin: 0; padding-left: 18px; color: var(--pend); font-size: 12.5px; }
.cs-conclusion { font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
.cs-acc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cs-mas { position: relative; }
.cs-mas > summary { list-style: none; cursor: pointer; }
.cs-mas > summary::-webkit-details-marker { display: none; }
.cs-mas__menu { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; align-items: stretch; }
.cs-mas__menu .btn--link { text-align: left; padding: 7px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.cs-mas__menu .btn--link:hover { background: var(--soft); }
.cs-form { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); }
.cs-f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.cs-f textarea, .cs-f input, .cs-f select, .cs-subir input, .cs-nota textarea, .cs-quitar input, .cs-asig select { font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; }
.cs-f textarea, .cs-nota textarea { resize: vertical; }
.cs-radios { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.cs-radios label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.cs-err { color: var(--rech); font-size: 12.5px; }
.cs-mov { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.cs-mov--falta { border-left: 3px solid var(--pend-line); }
.cs-mov__h { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.cs-mov__alertas { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; }
.cs-mov__app, .cs-mov__or { font-size: 12.5px; color: var(--ink-2); }
/* Lo reportado en la app, conectado al movimiento, y la apertura de la cuenta (mig 243) */
.cs-rep { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--ink-2); padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.cs-rep__t { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cs-rep__dif { color: var(--pend); }
.cs-rep__dif--ok { color: var(--ok); }
.cs-mov__ap { font-size: 12.5px; color: var(--ok); }
.cs-mov__ap .btn--link, .cs-rep .btn--link { font-size: inherit; }
.pld-rep-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pld-rep-lista li { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--ink-2); padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.pld-rep-grupo { font-size: 12px; font-weight: 600; color: var(--ink); margin: 8px 0 2px; }
.cs-origen { background: var(--surface-2); }
.cs-resp, .cs-hist, .cs-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cs-resp li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.cs-resp--quitado { opacity: .65; }
.cs-resp--quitado .btn--link { text-decoration: line-through; }
.cs-quitar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.cs-quitar input { flex: 1; min-width: 160px; width: auto; }
.cs-subir { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cs-subir input { flex: 1; min-width: 200px; width: auto; }
.cs-nota { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.cs-hist li { display: grid; grid-template-columns: 112px 1fr; gap: 2px 10px; font-size: 12.5px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.cs-hist time { color: var(--muted); font-variant-numeric: tabular-nums; grid-row: span 2; }
.cs-hist--nota span:first-of-type { color: var(--ink); font-weight: 500; }
.cs-lista li { font-size: 12.5px; color: var(--ink-2); }
.cs-cuenta > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.cs-cuenta > summary::-webkit-details-marker { display: none; }
.cs-cuenta > summary h3::after { content: "▾"; color: var(--muted); font-size: 11px; }
.cs-cuenta[open] > summary h3::after { content: "▴"; }
.cs-asig { display: inline-flex; align-items: center; gap: 8px; }
.cs-asig select { width: auto; min-width: 180px; }
.pld-caso { font-size: var(--t-s); font-weight: 500; white-space: nowrap; color: var(--red); text-decoration: none; }
.pld-caso:hover { text-decoration: underline; }
@media (max-width: 640px) { .cs-hist li { grid-template-columns: 1fr; } .cs-hist time { grid-row: auto; } }
@media (min-width: 1180px) and (max-width: 1499px) { .app.has-drawer--ancho .page { margin-right: 0; } }
.cs-lote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--com-line); border-radius: 10px; background: var(--com-bg); font-size: 13px; }
.cs-lote .cs-form { flex: 1 1 100%; }
.cs-chk { width: 16px; height: 16px; cursor: pointer; }
.cs-tbl td:first-child:has(.cs-chk), .cs-tbl th:first-child:has(.cs-chk) { width: 34px; }
.cs-cp { font-size: 12.5px; color: var(--ok); }
.cs-cp .btn--link { font-size: inherit; }
/* el nombre de un respaldo largo corta línea (no desborda el panel en el celular) */
.cs-resp .btn--link { white-space: normal; overflow-wrap: anywhere; text-align: left; }

/* ---------- Cumplimiento · Paso 2: Importar, Reglas, Códigos y Estado (CUMPLIMIENTO_PASO2.md) ---------- */
/* sub-navegación de Cumplimiento: una sola fila, texto subrayado. El trabajo diario a la izquierda; «Ajustes», más quieto, a la
   derecha con sus marcas (Códigos sin clasificar, Estado con algo para mirar) y la guía «?». Mismos data-s que antes. */
.pld-cab { position: relative; margin-bottom: 6px; }
.pld-secs { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 4px 24px; border-bottom: 1px solid var(--border-2); }
.pld-secs__g { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.pld-secs__l { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-right: 6px; }
.pld-secs [data-s] { font: inherit; font-size: var(--t-m); font-weight: 500; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px; padding: 10px 12px 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.pld-secs__g--aj [data-s] { font-size: var(--t-s); padding-inline: 10px; }
.pld-secs [data-s]:hover { color: var(--ink); }
.pld-secs [data-s].on { color: var(--ink); font-weight: 600; border-bottom-color: var(--red); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.pld-guia-btn { font: inherit; width: 32px; height: 32px; margin: 0 0 4px 6px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pld-guia-btn:hover, .pld-guia-btn[aria-expanded="true"] { background: var(--soft); color: var(--ink); }
.pld-guia-btn svg { width: 17px; height: 17px; }
/* «Cómo trabajar» flota bajo el botón, encima de la lista: no corre la página. Debajo del panel lateral (z 30). */
.pld-guia { position: absolute; top: calc(100% + 8px); right: 0; z-index: 25; width: min(560px, 100%); max-height: min(72vh, 640px);
  overflow-y: auto; overscroll-behavior: contain; box-shadow: var(--shadow); font-size: 13px; color: var(--ink-2); margin: 0; }
.pld-guia h2 { font-size: 15px; } .pld-guia h3 { font-size: 13px; font-weight: 600; margin-top: 4px; color: var(--ink); }
.pld-guia ol, .pld-guia ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
/* reglas, códigos y estado */
.aj-reglas { display: flex; flex-direction: column; gap: 10px; }
.aj-regla { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: 12px 24px; align-items: start; }
.aj-regla > .aj-motivo, .aj-regla > .cs-err { grid-column: 1 / -1; }
.aj-regla--off .aj-regla__t h3, .aj-regla--off .aj-params { opacity: .6; }
.aj-regla--edit { border-color: var(--com-line); box-shadow: 0 0 0 1px var(--com-line); }
.aj-regla__t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.aj-regla__t h3 { font-size: 14px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aj-desc { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.aj-sinef { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.aj-quien { font-size: 11.5px; color: var(--muted); }
.aj-estado { font-size: 12.5px; font-weight: 600; color: var(--muted); } .aj-estado--on { color: var(--ok); }
.aj-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 16px; align-items: end; min-width: 0; }
.aj-param { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 12.5px; }
.aj-param--edit .aj-in { border-color: var(--com); box-shadow: 0 0 0 2px var(--com-bg); }
.aj-param__n { font-weight: 600; color: var(--ink); }
.aj-param__d { color: var(--muted); font-size: 11.5px; }
.aj-val { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.aj-in { font: inherit; font-size: 13px; padding: 6px 9px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; max-width: 220px; }
.aj-sw { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.aj-sw input { width: 16px; height: 16px; cursor: pointer; }
.aj-motivo { background: var(--surface-2); }
.aj-cods .aj-in { max-width: 200px; }
.aj-cods .aj-motivo { margin-top: 8px; }
.aj-fila--edit td { background: var(--com-bg); }
.aj-previa { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); border: 1px solid var(--com-line); background: var(--com-bg); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.aj-previa p { margin: 0; }
/* «Prender…» de B1/B2/B3 (mig 240): fecha, vista previa con la lista y motivo, dentro de la tarjeta de la regla */
.aj-pv { gap: 10px; }
.aj-pv .aj-params { margin: 0; }
.aj-pv .card { background: var(--surface); }
.aj-pv .aj-motivo { background: transparent; padding: 0; }
.aj-pv .cs-acc { justify-content: flex-end; }
.aj-pv__res b { color: var(--ink); }
.aj-regla__sw .btn { margin-left: 6px; }
/* Riesgo PLD de la cuenta (mig 242) */
.cs-riesgo { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.cs-riesgo--alto { background: var(--rech-bg); color: var(--rech); }
.cs-cuenta summary .cs-riesgo { margin-left: 8px; vertical-align: middle; }
.cs-riesgo-form { margin-top: 8px; }
.cs-riesgo-form .cs-fila { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; }
.cs-chk-l { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.cs-riesgo-hist { margin-top: 6px; font-size: 12px; color: var(--muted); }
.aj-alerta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: space-between; }
.aj-sec { display: flex; flex-direction: column; gap: 8px; }
.aj-sec h3 { font-size: 13.5px; font-weight: 600; }
.aj-sec > .sub { margin: 0; }
/* Estado · evaluación automática y posibles duplicados (mig 239) */
.aj-cron { margin: 4px 0 0; font-size: 12px; color: var(--ink-2); } .aj-cron--on b { color: var(--ok); }
.aj-cron .sub { display: block; margin-top: 2px; }
.aj-dup-lista { display: flex; flex-direction: column; gap: 10px; }
.aj-dup { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.aj-dup--on { border-color: var(--ink-2); }
.aj-dup__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.aj-dup__par { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
.aj-dup__lado { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; min-width: 0; overflow-wrap: anywhere; }
.aj-dup__t { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.aj-dup__dif { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.aj-dup .cs-acc { justify-content: flex-end; }
.aj-imp { cursor: pointer; }
/* importar */
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 28px 20px; border: 2px dashed var(--border-2); border-radius: 12px; background: var(--surface); color: var(--ink-2); }
.imp-drop p { margin: 0; } .imp-drop .sub { max-width: 620px; font-size: 12.5px; }
.imp-drop__ic { width: 34px; height: 34px; color: var(--muted); }
.imp-drop--sobre { border-color: var(--red); background: var(--red-tint); }
.imp-drop--leyendo { border-style: solid; }
.imp-cab .card-h h3 { font-size: 14.5px; overflow-wrap: anywhere; }
.imp-trae { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 16px; }
.imp-kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.imp-kv__k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.imp-kv__v { font-size: 13.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.imp-kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
button.imp-kpi { cursor: pointer; }
.imp-kpi.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.imp-kpi--nuevo .kpi__v { color: var(--ok); } .imp-kpi--dudoso .kpi__v, .imp-kpi--cambia .kpi__v { color: var(--pend); } .imp-kpi--error .kpi__v { color: var(--rech); }
.imp-kpi--ignorado, .imp-kpi--igual { background: var(--surface-2); }
.imp-dias { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); }
.imp-dias p { margin: 0; }
.imp-sec { display: flex; flex-direction: column; gap: 10px; }
.imp-sec h3 { font-size: 13.5px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.imp-sec > .sub { margin: 0; font-size: 12.5px; }
.imp-fin { margin-left: auto; }
.imp-dud { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 12px 18px; padding: 12px; border: 1px solid var(--pend-line); border-left: 3px solid var(--pend); border-radius: 10px; background: var(--surface); }
.imp-dud--ok { border-color: var(--ok-line); border-left-color: var(--ok); }
.imp-dud__x, .imp-dud__c { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 13px; }
.imp-dud__x .sub { font-size: 12px; overflow-wrap: anywhere; }
.imp-dud__t { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.imp-cand { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.imp-cand--on { border-color: var(--ok-line); background: var(--ok-bg); }
.imp-cand .btn { margin-left: auto; }
.imp-difs { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.imp-dif { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.imp-dif--no { background: var(--pend-bg); color: var(--pend); }
.imp-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.imp-pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.imp-pill--nuevo { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.imp-pill--dudoso, .imp-pill--cambia, .imp-pill--omitido { color: var(--pend); background: var(--pend-bg); border-color: var(--pend-line); }
.imp-pill--error { color: var(--rech); background: var(--rech-bg); border-color: var(--rech-line); }
.imp-tbl td { white-space: normal; }
.imp-tbl .sub-cell { display: block; }
.imp-confirmar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 14px;
  border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); box-shadow: 0 -4px 14px rgba(31,37,48,.06); font-size: 13px; color: var(--ink-2); }
.imp-confirmar p { margin: 0; flex: 1 1 320px; }
.imp-hecho h3 { font-size: 14.5px; color: var(--ok); }
.imp-ev { margin: 0; font-size: 13px; color: var(--ink-2); }
.imp-rec { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.imp-rec__b { font: inherit; width: 100%; text-align: left; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
.imp-rec__b:hover { border-color: var(--ink-2); }
.imp-rec__b > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .aj-regla, .imp-dud { grid-template-columns: 1fr; }
  .aj-dup__par { grid-template-columns: minmax(0, 1fr); }
  .aj-dup__dif { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .pld-secs { justify-content: flex-start; }
  .pld-secs__g { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .aj-in { max-width: none; }
}

/* ---------- Cumplimiento · Paso 2, estética: encabezados, bloques de Reglas, interruptores, Importar más compacto ---------- */
.pld-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 16px; padding-bottom: 2px; }
.pld-h h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }
.pld-h p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); max-width: 860px; line-height: 1.5; }
.aj-bloque { display: flex; flex-direction: column; gap: 10px; }
.aj-bloque__h h3 { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.aj-bloque__h p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.aj-bloque + .aj-bloque { margin-top: 10px; }
.aj-prox { border: 1px dashed var(--border-2); border-radius: 10px; padding: 12px 14px; background: var(--surface-2); }
.aj-prox > summary { cursor: pointer; list-style: none; }
.aj-prox > summary::-webkit-details-marker { display: none; }
.aj-prox > summary h3::after { content: "▾"; color: var(--muted); font-size: 11px; }
.aj-prox[open] > summary h3::after { content: "▴"; }
.aj-prox[open] > summary { margin-bottom: 10px; }
.aj-regla--prox { background: var(--surface); }
.aj-regla__t h3 { font-size: 14px; }
.aj-solo { align-self: center; }
/* interruptor: el mismo checkbox, dibujado como un switch (sin JS) */
.aj-sw input { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--border-2); position: relative; margin: 0;
  transition: background .15s ease; flex: none; }
.aj-sw input::before { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(31,37,48,.25); transition: transform .15s ease; }
.aj-sw input:checked { background: var(--ok); }
.aj-sw input:checked::before { transform: translateX(14px); }
.aj-sw input:focus-visible { outline: 2px solid var(--com); outline-offset: 2px; }
.aj-sw input:disabled { opacity: .5; }
.aj-sw span { color: var(--ink-2); }
.aj-sw input:checked + span { color: var(--ok); }
/* importar: tarjetas de resultado más bajas (número y etiqueta en una línea) */
.imp-kpis .kpi { flex-direction: row; align-items: baseline; gap: 8px; padding: 10px 14px; }
.imp-kpis .kpi__v { font-size: 20px; }
@media (prefers-reduced-motion: reduce) { .aj-sw input, .aj-sw input::before { transition: none; } }

/* ---------- Cumplimiento · bandeja de casos (rediseño 2026-11, plan §2.2) ---------- */
.cs-resumen { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cs-resumen .kpi { border: 0; border-right: 1px solid var(--border); border-radius: 0; padding: 16px 20px 14px; }
.cs-resumen .kpi:last-child { border-right: 0; }
.cs-resumen .kpi.on { border-color: var(--border); box-shadow: inset 0 -3px 0 var(--red); background: var(--surface); }
.cs-kpi--main .kpi__l { color: var(--red); }
.kpi.kpi--rojo .kpi__v { color: var(--rech); }
.cs-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 14px; border: 1px solid var(--ok-line); background: var(--ok-bg); border-radius: 10px; font-size: var(--t-s); color: var(--ink-2); }
.cs-sug p { margin: 0; flex: 1 1 320px; } .cs-sug b { color: var(--ink); }
.cs-buscar { margin-left: auto; } .cs-buscar input { width: 210px; }
.cs-filtros { display: flex; flex-wrap: wrap; gap: 8px; }
/* desplegable de filtro (UI.desplegables) */
.dd { position: relative; }
.dd__b { font: inherit; font-size: var(--t-s); height: 32px; padding: 0 10px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--surface); color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dd__b b { font-weight: 600; color: var(--ink); }
.dd__b svg { width: 12px; height: 12px; color: var(--muted); }
.dd__b:hover { border-color: var(--ink-2); }
.dd--activo .dd__b { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.dd__m { position: absolute; z-index: 26; top: calc(100% + 4px); left: 0; min-width: 220px; max-height: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
.dd__m button { font: inherit; font-size: var(--t-s); text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; cursor: pointer; color: var(--ink-2); display: flex; gap: 8px; white-space: nowrap; }
.dd__m button:hover, .dd__m button:focus-visible { background: var(--soft); outline: none; }
.dd__m button.on { color: var(--ink); font-weight: 600; }
.dd__m button.on::after { content: "✓"; margin-left: auto; color: var(--red); }
/* tabla: anchos fijos, el titular toma el resto; filas centradas */
.cs-tbl { table-layout: fixed; min-width: 1080px; }
.cs-tbl td { vertical-align: middle; padding-top: 10px; padding-bottom: 10px; }
.cs-tbl th button { display: inline-flex; gap: 4px; }
.cs-tbl th button.on { color: var(--ink); }
.cs-c-chk { width: 44px; } .cs-c-id { width: 76px; } .cs-c-reg { width: 150px; } .cs-c-tipo { width: 96px; } .cs-c-monto { width: 140px; }
.cs-c-age { width: 170px; } .cs-c-est { width: 190px; } .cs-c-asig { width: 160px; } .cs-c-notas { width: 88px; } .cs-c-chev { width: 36px; }
.cs-tbl td.cs-c-tit { white-space: normal; }
.cs-c-tit .pld-tit { font-weight: 600; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-c-tit .sub-cell { display: flex; align-items: center; gap: 10px; }
.cs-sugtag { font-size: 11px; font-weight: 600; color: var(--ok); background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: 4px; padding: 0 6px; line-height: 17px; white-space: nowrap; }
.cs-reglas { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.cs-reglas .cs-regla { margin: 0; cursor: help; }
.cs-c-monto b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cs-age { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); white-space: normal; font-variant-numeric: tabular-nums; }
.cs-age i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); flex: none; }
.cs-age--ambar { color: var(--pend); } .cs-age--ambar i { background: #D29A1E; }
.cs-age--rojo { color: var(--rech); font-weight: 600; } .cs-age--rojo i { background: var(--rech); }
.cs-asig-p { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); white-space: nowrap; max-width: 100%; vertical-align: middle; }
.cs-av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 10.5px; font-weight: 600; background: var(--soft); border: 1px solid var(--border-2); color: var(--ink-2); }
.cs-asig-p--no { color: var(--faint); } .cs-asig-p--no .cs-av { background: none; border-style: dashed; }
.cs-chev { width: 16px; height: 16px; color: var(--border-2); display: block; }
.cs-tbl .row:hover .cs-chev { color: var(--ink-2); }
.cs-pie { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: var(--t-xs); color: var(--muted); }
/* «Cerrar varios»: barra flotante abajo al centro (no corre la lista) */
.cs-lote { position: fixed; z-index: 28; left: 50%; transform: translateX(-50%); bottom: 20px; width: min(680px, calc(100vw - 32px)); border: 1px solid var(--border-2); background: var(--surface); box-shadow: var(--shadow); }
.app.has-drawer .cs-lote { display: none; }
@media (max-width: 760px) {
  .cs-resumen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-resumen .kpi:nth-child(2n) { border-right: 0; } .cs-resumen .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .cs-resumen .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* una cifra impar, a lo ancho */
  .cs-resumen .kpi { padding: 12px 14px; } .cs-resumen .kpi__v { font-size: 22px; }
  .cs-buscar { margin-left: 0; width: 100%; } .cs-buscar input { width: 100%; }
  /* cada caso, una tarjeta (sin scroll de costado) */
  .cs-tbl { min-width: 0; table-layout: auto; }
  .cs-tbl thead { display: none; }
  .cs-tbl, .cs-tbl tbody { display: block; }
  .cs-tbl tr.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .cs-tbl tr.row td { display: block; padding: 0; border: 0; white-space: normal; width: auto; }
  .cs-tbl td.cs-c-id { grid-column: 1 / -1; font-size: var(--t-xs); }
  .cs-tbl td.cs-c-tit { grid-column: 1; } .cs-tbl td.cs-c-monto { grid-column: 2; grid-row: 2; }
  .cs-tbl td.cs-c-reg, .cs-tbl td.cs-c-tipo, .cs-tbl td.cs-c-age, .cs-tbl td.cs-c-est, .cs-tbl td.cs-c-asig, .cs-tbl td.cs-c-notas { grid-column: 1 / -1; }
  .cs-tbl td.cs-c-notas:empty { display: none; }
  .cs-tbl td.cs-c-chk { grid-column: 1 / -1; } .cs-tbl td.cs-c-chev { display: none; }
  .cs-tbl--chk td.cs-c-monto { grid-row: 3; }   /* con la casilla arriba, el monto va al lado del titular */
}

/* ---------- Cumplimiento · ficha del caso (rediseño 2026-11, plan §2.2) ---------- */
.drawer__t b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.btn--l { height: 36px; padding: 0 16px; font-size: var(--t-m); }
.cs-cab { display: flex; flex-direction: column; gap: 10px; }
.cs-hechos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .7fr) minmax(0, 1.8fr) minmax(0, 1fr); border: 1px solid var(--border); border-radius: 10px; }
.cs-hechos > div { padding: 11px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; border-right: 1px solid var(--border); }
.cs-hechos > div:last-child { border-right: 0; }
.cs-hechos > div > span { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cs-hechos b { font-size: var(--t-l); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cs-hechos b small { font-size: var(--t-xs); font-weight: 500; color: var(--muted); margin-left: 3px; }
.cs-hechos__rl { display: flex; flex-direction: column; gap: 1px; }
.cs-hechos__rl span { font-size: var(--t-s); font-weight: 500; color: var(--ink); }
.cs-hechos__rl i { font-style: normal; font-weight: 700; margin-right: 6px; }
.cs-cab .cs-asig { font-size: var(--t-s); color: var(--muted); }
/* pasos para dar por controlado */
.cs-pasos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cs-paso { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.cs-paso__i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 700; border: 1.5px solid var(--border-2); color: var(--muted); }
.cs-paso--ok .cs-paso__i { background: var(--ok); border-color: var(--ok); color: #fff; }
.cs-paso b { display: block; font-size: var(--t-s); font-weight: 600; color: var(--ink); }
.cs-paso span { font-size: var(--t-xs); color: var(--muted); }
.cs-barra { display: block; height: 4px; margin-top: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.cs-barra i { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.cs-barra--0 { width: 0%; } .cs-barra--5 { width: 5%; } .cs-barra--10 { width: 10%; } .cs-barra--15 { width: 15%; } .cs-barra--20 { width: 20%; } .cs-barra--25 { width: 25%; } .cs-barra--30 { width: 30%; } .cs-barra--35 { width: 35%; } .cs-barra--40 { width: 40%; } .cs-barra--45 { width: 45%; } .cs-barra--50 { width: 50%; } .cs-barra--55 { width: 55%; } .cs-barra--60 { width: 60%; } .cs-barra--65 { width: 65%; } .cs-barra--70 { width: 70%; } .cs-barra--75 { width: 75%; } .cs-barra--80 { width: 80%; } .cs-barra--85 { width: 85%; } .cs-barra--90 { width: 90%; } .cs-barra--95 { width: 95%; } .cs-barra--100 { width: 100%; }
/* pestañas de la ficha */
.cs-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border-2); }
.cs-tabs [data-tab] { font: inherit; font-size: var(--t-s); font-weight: 500; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 9px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cs-tabs [data-tab]:hover { color: var(--ink); }
.cs-tabs [data-tab].on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.cs-panel { display: flex; flex-direction: column; gap: 16px; }
.cs-panel[hidden] { display: none; }
/* el título del primer bloque repite el de la pestaña: queda para el lector de pantalla */
.cs-panel > .cs-bloque:first-child > h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* movimiento: «De quién es la plata» con un segmentado */
.cs-mov { padding: 12px 14px; gap: 8px; }
.cs-mov__h { font-size: var(--t-m); } .cs-mov__h b { font-variant-numeric: tabular-nums; }
.cs-mov__or { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-top: 8px; margin-top: 2px; border-top: 1px dashed var(--border); font-size: var(--t-s); }
.cs-mov__or-l { font-size: var(--t-xs); color: var(--muted); }
.cs-mov__or-t { color: var(--ink-2); }
.cs-orseg { display: inline-flex; border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; }
.cs-orseg button { font: inherit; font-size: var(--t-s); border: 0; border-right: 1px solid var(--border-2); background: var(--surface); color: var(--ink-2); padding: 4px 11px; cursor: pointer; }
.cs-orseg button:last-child { border-right: 0; }
.cs-orseg button:hover { background: var(--surface-2); }
.cs-orseg .on--propio { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.cs-orseg .on--tercero { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.cs-orseg .on--desconocido { background: var(--soft); color: var(--ink); font-weight: 600; }
.cs-orseg button:disabled { cursor: not-allowed; opacity: .6; }
/* pie fijo: «Más» · qué falta · botón principal */
.cs-acc--pie { width: 100%; flex-wrap: nowrap; }
.cs-pie__hint { flex: 1; min-width: 0; text-align: right; font-size: var(--t-xs); color: var(--muted); }
.drawer__f .cs-mas__menu { top: auto; bottom: calc(100% + 6px); }
.cs-mas__sep { border: 0; border-top: 1px solid var(--border); margin: 4px 2px; }
.cs-mas__menu .cs-mas__peligro { color: var(--rech); }
@media (max-width: 760px) {
  .cs-hechos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-hechos > div:nth-child(2) { border-right: 0; } .cs-hechos > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .cs-pasos { grid-template-columns: 1fr; }
  .cs-acc--pie { flex-wrap: wrap; } .cs-pie__hint { flex-basis: 100%; order: -1; text-align: left; }
}

/* ---------- Cumplimiento · Movimientos y Ajustes (rediseño 2026-11, plan §2.2) ---------- */
/* avisos: una línea por aviso con su nivel */
.pld-avisos--lista { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pld-aviso { display: flex; align-items: baseline; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: var(--t-s); color: var(--ink-2); }
.pld-aviso:last-child { border-bottom: 0; }
.pld-aviso > i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; transform: translateY(-1px); }
.pld-aviso--rojo > i { background: var(--rech); } .pld-aviso--ambar > i { background: #D29A1E; }
.pld-aviso--rojo { color: var(--ink); font-weight: 500; }
.pld-aviso .btn--link { font-size: inherit; }
/* tarjetas de Movimientos: una sola pieza con divisiones, como el resumen de Casos */
.pld-kpis { gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.pld-kpis .kpi { border: 0; border-right: 1px solid var(--border); border-radius: 0; padding: 16px 20px 14px; }
.pld-kpis .kpi:last-child { border-right: 0; }
.pld-kpis .kpi.on { border-color: var(--border); background: var(--surface); }
/* Ajustes: la línea de ayuda arriba, sin título repetido */
.pld-h { padding-bottom: 0; }
.pld-h p { margin: 0; font-size: var(--t-s); color: var(--muted); }
.aj-fila--falta td { background: var(--warn-bg); }
.aj-regla { padding: 16px 18px; }
.aj-regla__t h3, .aj-bloque__h h3 { color: var(--ink); }
.aj-val { font-size: var(--t-l); font-weight: 700; }
.imp-drop { border-width: 1.5px; }
@media (max-width: 760px) {
  .pld-kpis .kpi { border-right: 0; border-bottom: 1px solid var(--border); }
  .pld-kpis .kpi:last-child { border-bottom: 0; }
}

/* ---------- Cumplimiento · pedidos a Administración (mig 247) ---------- */
.cs-reqfila { color: var(--muted); }
.cs-reqfila--vencido { color: var(--rech); font-weight: 600; }
.cs-reqfila--listo { color: var(--ok); font-weight: 600; }
.cs-reqs { gap: 8px; }
.cs-req { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.cs-req--enviado { border-color: var(--ok-line); background: var(--ok-bg); }
.cs-req--vencido { border-color: var(--rech-line); }
.cs-req--aceptado, .cs-req--cancelado, .cs-req--no_conseguido { background: var(--surface-2); }
.cs-req__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: var(--t-s); }
.cs-req__h b { font-variant-numeric: tabular-nums; }
.cs-req__est { font-weight: 600; color: var(--ink); }
.cs-req__plazo { margin-left: auto; font-size: var(--t-xs); color: var(--muted); }
.cs-req--vencido .cs-req__plazo { color: var(--rech); font-weight: 600; }
.cs-req__txt { font-size: var(--t-m); color: var(--ink); }
.cs-req__arch { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cs-req__arch li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: var(--t-s); }
.cs-req__arch .btn--link { white-space: normal; overflow-wrap: anywhere; text-align: left; }

/* ---- mig 251: notas del caso (bandeja, pestaña y comentarios) y comprobantes de los avisos ---- */
.cs-notas { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cs-notas__ico { width: 14px; height: 14px; flex: none; }
.cs-notas--nueva { color: var(--ink); font-weight: 600; }
.cs-notas--nueva .cs-notas__ico { fill: var(--warn-bg); stroke: var(--warn); }
.cs-notas__nueva, .cs-tab__nueva { font-size: 11px; font-weight: 600; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 4px; padding: 0 5px; line-height: 16px; }
.cs-kpi--notas .kpi__v { color: var(--warn); }
.cs-notas-l { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cs-notas-l__i { border: 1px solid var(--border); border-left: 3px solid var(--border-2); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
.cs-notas-l__i--administracion, .cs-notas-l__i--oficial { border-left-color: var(--com-line); }
.cs-notas-l__i--nueva { border-color: var(--warn-line); border-left-color: var(--warn); background: var(--warn-bg); }
.cs-notas-l__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 12.5px; }
.cs-notas-l__de { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cs-notas-l__t { margin: 4px 0 0; font-size: 13px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.cs-estado__req { margin: 4px 0 0; }
.cs-cerrarreq { margin-bottom: 10px; }
.cs-rep__adj { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; color: var(--ink-2); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); }
.cs-rep__adj-t { font-weight: 600; color: var(--ink); }
.cs-rep__a { white-space: nowrap; }
.pld-adj { display: inline-flex; flex-wrap: wrap; gap: 2px 12px; }
.pld-adj__i { white-space: nowrap; }
.pld-rep-adj { color: var(--ink-2); }
/* el historial de cambios (⚙ en la barra de Ajustes): más ancho que la guía */
.pld-hist { width: min(980px, 100%); }
.pld-hist__tbl td { white-space: normal; } .pld-hist__tbl td:nth-child(-n+2) { white-space: nowrap; }

