/* Interfaz de conciliación: cobros visibles, jerarquía simple y detalle a demanda.
   Se carga al final para renovar también los formularios y el análisis existente. */

:root {
  color-scheme: light;
  --fondo: #f4f6f8;
  --superficie: #ffffff;
  --superficie-2: #edf2f4;
  --borde: #dce4e9;
  --texto: #142b3e;
  --texto-tenue: #647584;
  --acento: #087d67;
  --acento-tenue: #e8f5f0;
  --exito: #08765c;
  --aviso: #946000;
  --error: #bd413a;
  --radio: 12px;
  --cx-navy: #132b3e;
  --cx-green: #16866e;
  --cx-amber: #dda638;
  --cx-shadow: 0 8px 28px rgba(22, 43, 61, .045);
}

html { min-width: 320px; background: var(--fondo); scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;
  font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }
button:not(:disabled), summary, a { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
button, a, input, select, textarea, [tabindex] { scroll-margin: 90px 0; }
:focus-visible { outline: 3px solid #16866e; outline-offset: 3px; }
input[type="date"], select { color-scheme: light; }
h1, h2, h3, h4 { color: var(--texto); }
h1 { font-size: 30px; font-weight: 730; line-height: 1.18; letter-spacing: -.035em; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -.025em; }
h3 { font-size: 16px; line-height: 1.35; font-weight: 680; letter-spacing: -.015em; }
p { text-wrap: pretty; }
svg { vertical-align: middle; }
svg.cx-icon, .cx-nav svg, .cx-operations svg, .cx-topbar svg, .cv-button svg, .cv-icon-button svg {
  width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor;
}
.oculto { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tenue { color: var(--texto-tenue); font-size: 13px; }
.cx-shell { min-height: 100vh; min-height: 100dvh; }
.cx-admin .cx-shell { padding-left: 228px; }
.cx-main { min-width: 0; }
.pantalla, .pantalla.ancha {
  width: 100%; max-width: 1440px; padding: 34px 36px 54px; margin: 0 auto;
}
.pantalla.centrada { max-width: 620px; min-height: 88vh; justify-content: center; }

/* Navegación: una posición para cada pregunta, sin paneles duplicados. */
.cx-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 35; width: 228px;
  display: flex; flex-direction: column; padding: 28px 16px 18px;
  color: #dbe5ec; background: var(--cx-navy); border-right: 1px solid #1f3b4f;
}
.cx-brand {
  display: flex; align-items: center; gap: 11px; min-height: 48px;
  padding: 0 12px; margin-bottom: 32px; color: #fff; text-decoration: none;
}
.cx-brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.18); border-radius: 10px;
  background: #1d5d57; color: #bff2dd; font-size: 21px; font-weight: 800;
}
.cx-brand strong { display: block; color: #fff; font-size: 17px; font-weight: 750; letter-spacing: -.035em; }
.cx-brand small { display: block; color: #9fb3c1; font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.cx-nav { display: grid; gap: 6px; }
.cx-nav-label, .cx-nav-heading {
  display: block; padding: 0 13px; margin: 10px 0; color: #829aa9;
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.cx-nav button, .cx-nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 46px;
  padding: 11px 13px; border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: #bdcdd8; cursor: pointer; font-size: 13px;
  font-weight: 550; text-align: left; line-height: 1.35; transition: background .14s, color .14s;
}
.cx-nav button:hover, .cx-nav-item:hover { background: #1d394c; color: #fff; }
.cx-nav button[aria-current="page"], .cx-nav button.activo, .cx-nav-item.activo {
  background: #254a52; color: #d0f8e9; border-color: #316064; font-weight: 650;
}
.cx-nav button[aria-current="page"] svg { color: #81d9bd; }
.cx-nav button:focus-visible { outline-color: #8ddfc1; }
.cx-nav .insignia { margin-left: auto; background: #355568; color: #fff; }
.cx-operations { display: grid; gap: 5px; margin-top: 25px; padding-top: 19px; border-top: 1px solid #294252; }
.cx-operations button {
  display: flex; align-items: center; gap: 10px; border: 0; min-height: 40px;
  padding: 9px 13px; background: none; color: #9fb6c5; text-align: left; cursor: pointer;
}
.cx-operations button:hover { color: #fff; }
.cx-sidebar-footer, .cx-sidebar > footer {
  margin-top: auto; padding: 20px 12px 0; color: #8fa8b7; font-size: 11px;
  border-top: 1px solid #294252; line-height: 1.6;
}
.cx-sidebar-footer strong, .cx-sidebar > footer strong { display: block; color: #d7e5ee; font-size: 12px; }
.cx-sidebar { overflow-y: auto; }
.cx-brand > span:last-child { font-size: 19px; font-weight: 700; letter-spacing: -.04em; }
.cx-brand-mark svg { width: 27px; height: 27px; }
.cx-nav-caption { display: block; padding: 0 13px; margin: 0 0 12px; color: #9aafbd; font-size: 9px; letter-spacing: .1em; font-weight: 650; }
.cx-nav svg, .cx-operations svg, .cx-topbar svg { stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cx-nav-count { margin-left: auto; padding: 2px 6px; border-radius: 5px; background: #345063; font-size: 10px; color: #dbe8ef; }
.cx-profile { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding-top: 17px; border-top: 1px solid #294252; }
.cx-profile > div { min-width: 0; }
.cx-profile strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-profile small { display: block; font-size: 10px; }
.cx-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #365867; color: #e0f5ed; font-weight: 650; }
.cx-sidebar-footer .cx-live { color: #b1c7d3; }
.cx-sidebar-footer > p { font-size: 10px; color: #97b0bf; }
.cx-legacy-panels { display: none !important; }
.cx-label-mobile { display: none; }

/* Cabecera y filtros del espacio de trabajo. */
.cx-topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 25px;
}
.cx-eyebrow, .cv-eyebrow {
  display: block; color: #6e8190; font-size: 10px; font-weight: 750;
  letter-spacing: .13em; text-transform: uppercase; margin-bottom: 7px;
}
.cx-topbar h1 { margin: 0 0 8px; }
.cx-topbar #rs-sub { max-width: 680px; margin: 0; font-size: 12px; color: #71818f; }
.cx-topbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; padding-top: 9px; }
.cx-button, .cv-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 15px; border: 1px solid var(--borde); border-radius: 8px;
  background: #fff; color: var(--texto); text-decoration: none; font-size: 12px;
  font-weight: 650; cursor: pointer; line-height: 1.4; transition: background .14s, border-color .14s;
}
.cx-button:hover, .cv-button:hover { background: #f4f8f7; border-color: #a5c8bd; }
.cx-button.primary, .cv-button.primary { color: #fff; background: #087d67; border-color: #087d67; }
.cx-button.primary:hover, .cv-button.primary:hover { background: #05624f; border-color: #05624f; }
.cv-button.ghost { background: none; color: #087d67; border-color: transparent; padding: 8px 0; }
.cx-icon-button, .cv-icon-button {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 42px; height: 42px; min-height: 42px; padding: 9px;
  border: 1px solid var(--borde); border-radius: 8px; background: #fff;
  color: #5c7382; cursor: pointer;
}
.cx-icon-button:hover, .cv-icon-button:hover { background: #edf5f2; color: #087d67; }
.cx-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  min-height: 68px; margin-bottom: 26px; padding: 13px 16px;
  border: 1px solid var(--borde); border-radius: 12px; background: #fff;
}
.cx-periods { display: flex; align-items: center; gap: 3px; padding: 3px; background: #f1f4f6; border-radius: 7px; }
.cx-periods button {
  min-height: 34px; padding: 7px 11px; color: #687c8b; background: none;
  border: 1px solid transparent; border-radius: 5px; font-size: 11px; font-weight: 650; cursor: pointer;
}
.cx-periods button.activo, .cx-periods button[aria-pressed="true"] {
  background: #fff; color: #153b46; border-color: #e1e8eb; box-shadow: 0 1px 3px rgba(20,43,62,.06);
}
.cx-filter { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cx-filter > span, .cx-filter > label { font-size: 10px; color: #788995; font-weight: 600; }
.cx-filter select, .cx-filter input {
  min-height: 37px; max-width: 100%; min-width: 0; padding: 8px 10px;
  border: 1px solid var(--borde); border-radius: 7px; color: var(--texto);
  background: #fff; font-size: 12px; font-weight: 550;
}
.cx-date-range { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cx-date-range .cx-filter { flex: 1 1 0; }
.cx-date-range > span { padding-top: 15px; color: #93a2ac; }
.cx-date-toggle { display: none; }
.cx-toolbar #rs-ambito { min-width: 175px; max-width: 240px; }
.cx-live { display: inline-flex; align-items: center; gap: 6px; color: #6b7e8c; font-size: 11px; }
.cx-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1a9977; }

/* Módulos de la nueva vista de conciliación. */
#conciliacion-contenido { min-width: 0; }
.cv-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.cv-hero h2 { margin: 0 0 7px; font-size: 26px; letter-spacing: -.035em; }
.cv-hero p { max-width: 730px; margin: 0; color: #6b7e8c; font-size: 13px; line-height: 1.6; }
.cv-period, .cv-period-badge { flex: 0 0 auto; background: #eaf0f3; color: #5e7586; border-radius: 6px; padding: 6px 9px; font-size: 11px; }
.cv-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 23px; }
.cv-kpi {
  position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 160px;
  padding: 22px 23px 19px; border: 1px solid var(--borde); border-radius: 13px;
  background: #fff; box-shadow: var(--cx-shadow); text-align: left; font: inherit; cursor: pointer;
}
.cv-kpi:hover { border-color: #a3c9b8; box-shadow: 0 9px 27px rgba(22, 64, 47, .09); }
.cv-kpi.is-primary { background: var(--cx-navy); border-color: var(--cx-navy); color: #fff; }
.cv-kpi-action { position: absolute; right: 19px; top: 19px; color: #849c96; font-size: 16px; }
.cv-kpi.is-primary .cv-kpi-action { color: #94cfbc; }
.cv-kpi-label { display: block; font-size: 11px; font-weight: 650; letter-spacing: .025em; color: #5e7484; margin-bottom: 15px; }
.cv-kpi-label { display: flex; align-items: center; gap: 7px; }
.cv-kpi-label svg { width: 17px; height: 17px; }
.cv-kpi-value {
  display: block; font-size: clamp(25px, 2.65vw, 40px); line-height: 1.15; font-weight: 720;
  letter-spacing: -.045em; color: #173b48; font-variant-numeric: tabular-nums; white-space: nowrap; margin: 0;
}
.cv-kpi.ok .cv-kpi-value { color: #08765c; }
.cv-kpi.warn .cv-kpi-value { color: #926120; }
.cv-kpi-note { display: block; margin: 12px 0 0; font-size: 11px; color: #617887; line-height: 1.55; }
.cv-kpi.is-primary .cv-kpi-value { color: #fff; }
.cv-kpi.is-primary .cv-kpi-label { color: #c1d2df; }
.cv-kpi.is-primary .cv-kpi-note { color: #9eb6c4; }
.cv-kpi-icon { display: inline-flex; margin-bottom: 12px; color: #16866e; }
.cv-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; margin-bottom: 22px; }
.cv-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cv-panel {
  min-width: 0; overflow: hidden; padding: 22px; background: #fff; border: 1px solid var(--borde);
  border-radius: 12px; box-shadow: var(--cx-shadow); margin-bottom: 20px;
}
.cv-grid > .cv-panel { margin-bottom: 0; }
.cv-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.cv-panel-head h2, .cv-panel-head h3 { margin: 0; }
.cv-panel-head h2 { font-size: 16px; }
.cv-panel-head p { margin: 5px 0 0; color: #7b8d99; font-size: 11px; }
.cv-panel-body { min-width: 0; }
.cv-panel > p, .cv-note { color: #6b7d8b; font-size: 12px; line-height: 1.6; }
.cv-panel > p:first-child { margin-top: 0; }
.cv-progress { height: 10px; display: flex; overflow: hidden; border-radius: 6px; background: #f2e7d1; margin: 16px 0 12px; }
.cv-progress-fill { height: 100%; background: #16866e; border-radius: 6px 0 0 6px; transition: width .25s; }
.cv-progress-legend, .cv-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; color: #748895; font-size: 11px; }
.cv-legend span, .cv-progress-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cv-legend i, .cv-progress-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: #16866e; }
.cv-legend .warn, .cv-progress-legend .warn { background: #dda638; }
.cv-progress-label { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.cv-progress-label strong { font-size: 28px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.cv-progress-label small { color: #7b8d99; font-size: 11px; }
.cv-receipt-summary { margin: 0 0 27px; padding: 0 2px; }
.cv-section-line { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; }
.cv-receipt-summary > .cv-section-line { color: #466653; font-size: 13px; font-weight: 600; }
.cv-receipt-summary .cv-note { margin: 0; color: #697e89; font-size: 11px; }
.cv-stat { display: block; margin: 13px 0 6px; color: #193a49; font-size: 32px; font-weight: 720; letter-spacing: -.04em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.cv-stat small { color: #90a0aa; font-size: 19px; font-weight: 450; }
.cv-coverage-summary > p:not(.cv-note) { margin: 2px 0 18px; color: #627b8b; font-size: 12px; }
.cv-coverage-summary .cv-legend { gap: 7px; }
.cv-coverage-history { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid #e5ecef; color: #697e8b; font-size: 12px; }
.cv-expected { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 36px; margin: 22px 0; padding: 26px; border: 1px solid #d9e7df; border-radius: 12px; background: #edf4f0; }
.cv-expected h3 { margin: 0; font-size: 17px; }
.cv-expected > div > p:not(.cv-stat) { max-width: 430px; margin: 9px 0 0; color: #617c70; font-size: 12px; }
.cv-expected-details { padding-left: 30px; border-left: 1px solid #d4e1d9; }
.cv-expected-details > div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 7px 0 12px; }
.cv-expected-details span { color: #526d60; font-size: 12px; }
.cv-expected-details strong { flex-shrink: 0; color: #214b3b; font-size: 19px; font-variant-numeric: tabular-nums; }
.cv-supporting { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 25px; align-items: center; margin: 26px 0 5px; padding: 24px 0; border-top: 1px solid var(--borde); }
.cv-supporting span { display: block; color: #6e8190; font-size: 11px; }
.cv-supporting strong { display: block; margin-top: 6px; color: #315264; font-size: 22px; font-variant-numeric: tabular-nums; }
.cv-supporting small { display: block; max-width: 225px; margin-top: 6px; color: #8b6725; font-size: 10px; }
.cv-toolbar .cv-filter { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; max-width: 240px; min-width: 0; font-size: 10px; }
.cv-toolbar .cv-filter select { width: 100%; min-width: 0; }
.cv-check { cursor: pointer; }
.cv-active-filter { display: flex; align-items: center; justify-content: space-between; padding: 8px 13px; margin-bottom: 16px; background: #eaf5ef; color: #456955; border-radius: 8px; font-size: 12px; }
.cv-notice { display: flex; align-items: flex-start; gap: 12px; padding: 17px; margin: 15px 0; background: #fdf7e9; border: 1px solid #f0dfb7; border-radius: 9px; color: #796026; font-size: 12px; }
.cv-notice > svg { flex-shrink: 0; margin-top: 2px; }
.cv-notice p { margin: 5px 0; font-size: 12px; }
.cv-positive { color: #08765c; }
.cv-separated { border-left: 1px solid #e2e9e5; }
.cv-local-link, .cv-account-link, .cv-mov-link { display: inline-flex; align-items: center; gap: 11px; max-width: 100%; padding: 0; border: 0; background: none; color: #234758; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.cv-local-link:hover, .cv-account-link:hover, .cv-mov-link:hover { color: #087d67; }
.cv-account-link, .cv-mov-link { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.cv-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; background: #eaf2ef; color: #477865; font-size: 10px; font-weight: 650; }
.cv-row-action { text-align: right !important; }
.cv-table .cv-row-action .cv-button { font-size: 11px; white-space: nowrap; }
.cv-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 15px; color: #7a8d98; font-size: 11px; }
.cv-pagination > div { display: flex; align-items: center; gap: 16px; }
.cv-pagination button { font-size: 11px; }
.cv-pagination button:disabled { color: #a7b4bc; cursor: default; }
.cv-issue-value { display: block; margin: 7px 0; color: #6f5621; font-size: 18px; font-variant-numeric: tabular-nums; }
.cv-issue-icon { display: grid; place-items: center; flex: 0 0 34px !important; width: 34px; height: 34px; border-radius: 9px; background: #fcf3df; color: #a67a2f; }
.cv-skeleton .cv-kpi { background: #e9eef0; box-shadow: none; animation: cv-pulse 1.4s ease-in-out infinite alternate; }
.cv-skeleton-panel { height: 230px; background: #eef2f4; border-radius: 12px; animation: cv-pulse 1.4s ease-in-out infinite alternate; }
@keyframes cv-pulse { to { opacity: .45; } }
.cv-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cv-search { display: flex; align-items: center; gap: 9px; min-width: 0; width: min(340px, 100%); color: #8a9ca7; }
.cv-search input, input.cv-search, .cv-toolbar select {
  width: 100%; min-width: 0; min-height: 42px; padding: 10px 13px; border: 1px solid var(--borde);
  border-radius: 8px; background: #fff; color: var(--texto); font-size: 13px;
}
.cv-search > svg { width: 18px; height: 18px; }
.cv-toolbar select { width: auto; max-width: 100%; }
.cv-toolbar label { display: flex; align-items: center; gap: 8px; color: #647b8a; font-size: 12px; }
.cv-toolbar input[type="checkbox"] { accent-color: #16866e; width: 18px; height: 18px; }
.cv-tabs, .cv-segments { display: flex; gap: 5px; flex-wrap: wrap; }
.cv-tabs button, .cv-segments button { min-height: 38px; border: 1px solid #dce5ea; border-radius: 7px; background: #fff; color: #637b89; padding: 8px 12px; font-size: 12px; cursor: pointer; }
.cv-tabs button.activo, .cv-tabs button[aria-selected="true"], .cv-segments button.activo { color: #08765c; background: #e8f5f0; border-color: #b7dace; }

/* Tablas: un vocabulario visual y números alineados. */
.cv-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--borde); border-radius: 10px; background: #fff; -webkit-overflow-scrolling: touch; }
.cv-panel .cv-table-wrap { border-left: 0; border-right: 0; border-radius: 0; }
.cv-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cv-table th, .cv-table td { padding: 15px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid #e9eef1; }
.cv-table thead { background: #f7f9fa; }
.cv-table thead th { color: #607887; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .055em; white-space: nowrap; }
.cv-table thead th button { background: none; border: 0; color: inherit; font: inherit; padding: 0; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.cv-table tbody tr:last-child > * { border-bottom: 0; }
.cv-table tbody tr[data-local], .cv-table tbody tr[data-mov], .cv-table tbody tr[tabindex] { cursor: pointer; }
.cv-table tbody tr:hover { background: #f6faf8; }
.cv-table td.num, .cv-table th.num, .cv-table td.money, .cv-table .cv-money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.cv-table .cv-primary-cell { min-width: 150px; text-align: left; font-size: 12px; font-weight: 650; }
.cv-table small, .cv-table .cv-secondary { display: block; margin-top: 3px; color: #667e8d; font-size: 11px; font-weight: 400; line-height: 1.45; }
.cv-table button.cv-row-link { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: #183a4a; padding: 0; text-align: left; font: inherit; font-weight: 650; cursor: pointer; }
.cv-table .cv-chevron { color: #8fa2ae; }
.cv-pill {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 8px;
  border-radius: 5px; background: #edf2f5; color: #677e8d; font-size: 10px;
  font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.cv-pill.ok { color: #087259; background: #e8f5ef; }
.cv-pill.warn { color: #946000; background: #fcf3de; }
.cv-pill.muted { color: #738795; background: #eef3f6; }
.cv-pill.danger, .cv-pill.mal { color: #ad3d36; background: #fcefed; }
.cv-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cv-empty { display: grid; justify-items: center; padding: 52px 24px; color: #7c909d; text-align: center; }
.cv-empty > svg { width: 32px; height: 32px; color: #91aca6; margin-bottom: 12px; }
.cv-empty h3 { margin: 0 0 7px; font-size: 16px; }
.cv-empty p { max-width: 390px; margin: 0; font-size: 12px; }
.cv-count { color: #8394a0; font-size: 11px; font-weight: 400; }

/* Gráficos con los importes reales por día. */
.cv-chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(26px, 1fr); gap: 11px; min-height: 190px; max-width: 100%; overflow-x: auto; padding-top: 15px; padding-bottom: 13px; }
.cv-chart-day { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0; border: 0; background: none; color: #7e909d; font: inherit; font-size: 10px; cursor: pointer; }
.cv-chart-bar { display: flex; flex-direction: column; justify-content: flex-end; width: min(48px, 80%); height: 160px; min-height: 160px; border-radius: 5px 5px 0 0; overflow: hidden; background: #f1f5f5; }
.cv-chart-segment { display: block; flex: 0 0 auto; width: 100%; background: #16866e; min-height: 0; }
.cv-chart-segment.ok { background: #16866e; }
.cv-chart-segment.warn { background: #e6b64f; }
.cv-chart-stack { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; flex: 0 0 auto; }
.cv-chart-day:hover .cv-chart-bar { outline: 2px solid #bedccc; outline-offset: 3px; }
.cv-chart-day > span:last-child, .cv-chart-label { display: block; margin-top: 10px; white-space: nowrap; }
.cv-chart-value { margin: 0 0 5px; font-size: 9px; white-space: nowrap; color: #627f8c; }
.cv-chart-axis { display: flex; justify-content: space-between; color: #8a9ca7; font-size: 10px; }

/* Previsión, cuentas y documentos: cada base tiene su propio espacio. */
.cv-cash-grid, .cv-expected-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cv-cash-grid > div, .cv-expected-grid > div { padding: 4px 0; min-width: 0; }
.cv-cash-grid strong, .cv-expected-grid strong { display: block; margin: 8px 0; font-size: 23px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.cv-cash-grid p, .cv-expected-grid p { margin: 0; color: #7c8e9b; font-size: 11px; }
.cv-account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.cv-account { min-width: 0; padding: 18px; border: 1px solid var(--borde); border-radius: 10px; background: #fff; }
.cv-account h3 { margin: 0 0 4px; font-size: 14px; }
.cv-account p { margin: 6px 0; color: #738995; font-size: 12px; }
.cv-account strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.cv-coverage-grid { display: grid; align-items: stretch; min-width: max-content; gap: 1px; background: #e8eef1; }
.cv-coverage .cv-primary-cell { min-width: 190px; }
.cv-coverage th, .cv-coverage td { padding: 11px 12px; }
.cv-coverage thead th { position: sticky; top: 0; background: #f7f9fa; text-align: center; }
.cv-coverage thead th:first-child { text-align: left; }
.cv-day {
  display: inline-flex; justify-content: center; align-items: center; min-width: 32px;
  width: 32px; height: 32px; padding: 4px; border: 1px solid #dfe7eb;
  border-radius: 6px; background: #f3f6f8; color: #8196a3; font-size: 10px; cursor: pointer;
}
.cv-day.recibido, .cv-day[data-state="recibido"] { background: #e4f4ed; color: #087259; border-color: #c9e5d8; }
.cv-day.no_recibido, .cv-day[data-state="no_recibido"] { background: #fff3d9; color: #946000; border-color: #f3ddaa; }
.cv-day.no_fiable, .cv-day[data-state="no_fiable"] { background: #fcebe9; color: #ad3d36; border-color: #efceca; }
.cv-day.en_espera, .cv-day[data-state="en_espera"] { background: #eef3f6; color: #718895; }
.cv-day.sin_extracto_no_habil, .cv-day[data-state="sin_extracto_no_habil"] { background: #fafbfc; color: #aab7bf; border-style: dashed; }
.cv-issue { display: flex; align-items: flex-start; gap: 13px; padding: 16px 0; border-top: 1px solid #e7edef; }
.cv-issue:first-child { border-top: 0; padding-top: 0; }
.cv-issue:last-child { padding-bottom: 0; }
.cv-issue h3, .cv-issue h4 { margin: 0 0 4px; font-size: 13px; }
.cv-issue p { margin: 0; color: #758995; font-size: 11px; line-height: 1.6; }
.cv-issue > div { min-width: 0; flex: 1; }
.cv-issue > strong { flex: 0 0 auto; font-size: 15px; font-variant-numeric: tabular-nums; }
.cv-issue-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; color: #a57822; background: #fcf4e2; border-radius: 8px; }
.cv-issue-icon svg { width: 16px; height: 16px; }
.cv-detail { border-top: 1px solid #e6edf0; padding: 17px 0; }
.cv-detail h3 { margin: 0 0 10px; font-size: 14px; }
.cv-detail dl { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr); gap: 9px 18px; margin: 0; font-size: 12px; }
.cv-detail dt { color: #7d909d; }
.cv-detail dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.cv-detail-list { list-style: none; padding: 0; margin: 0; }
.cv-detail-list li { padding: 10px 0; border-top: 1px solid #edf2f4; }
.cv-detail-list li:first-child { border-top: 0; }
.cv-detail-list p { color: #718895; font-size: 11px; margin: 4px 0 0; }

/* Detalle lateral, con la misma jerarquía que la vista principal. */
.cv-drawer-backdrop { position: fixed; inset: 0; z-index: 190; background: rgba(14,33,48,.3); backdrop-filter: blur(2px); }
.cv-drawer {
  position: fixed; inset: 0 0 0 auto; z-index: 200; width: min(560px, 100vw);
  height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 30px 28px calc(30px + var(--seguro-abajo)); background: #fff;
  box-shadow: -16px 0 60px rgba(14,33,48,.12); border-left: 1px solid #dce5e9;
}
.cv-drawer > .cv-icon-button { position: absolute; top: 20px; right: 20px; }
.cv-drawer h2 { margin: 9px 45px 10px 0; font-size: 23px; }
.cv-drawer .cv-hero { display: block; padding-right: 35px; }
.cv-drawer .cv-kpi-value { margin: 20px 0; font-size: 38px; }
.cv-drawer .cv-panel { padding: 15px; box-shadow: none; }
.cv-drawer .cv-button { min-height: 44px; }
.cv-drawer { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.cv-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 25px 26px 20px; border-bottom: 1px solid #e5ecef; flex-shrink: 0; }
.cv-drawer-head h2 { margin: 0; font-size: 23px; }
.cv-drawer-head .cv-eyebrow { margin: 0 0 6px; }
.cv-drawer-body { overflow-y: auto; padding: 26px; flex: 1; min-height: 0; }
.cv-detail-amount { padding-bottom: 20px; border-bottom: 1px solid var(--borde); }
.cv-detail-amount > span:first-child { display: block; color: #718794; font-size: 12px; }
.cv-detail-amount > strong { display: block; margin: 10px 0; color: #1d4655; font-size: 34px; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.cv-detail-list { margin: 20px 0 28px; }
.cv-detail-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid #edf1f3; }
.cv-detail-list dt { color: #7b8d99; font-size: 12px; }
.cv-detail-list dd { max-width: 60%; margin: 0; color: #315567; font-size: 13px; font-weight: 550; text-align: right; overflow-wrap: anywhere; }
.cv-references { list-style: none; margin: 15px 0; padding: 0; }
.cv-references li { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 14px 0; border-bottom: 1px solid #e8eef0; }
.cv-references li strong { font-size: 12px; }
.cv-references li > strong:last-child { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.cv-references p { margin: 4px 0 0; font-size: 11px; color: #7a8d99; }
.cv-reference-id { display: inline-block; padding: 5px 9px; margin: 12px 0; border-radius: 6px; background: #f0f4f6; color: #7c919e; font-size: 10px; }
.cv-group { padding: 18px; margin: 20px 0; border: 1px solid #d6e7df; border-radius: 10px; background: #f4f9f6; }
.cv-group h3 { margin: 0; }
.cv-group-total { display: flex; justify-content: space-between; gap: 15px; padding-top: 12px; border-top: 1px solid #d8e7df; color: #466c59; font-size: 12px; }
.cv-group-total strong { font-size: 15px; white-space: nowrap; }
.cv-bank-concept { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--borde); }
.cv-bank-concept h3 { margin: 0 0 9px; }
.cv-bank-concept p { margin: 0; padding: 13px; border-radius: 7px; background: #f4f7f8; color: #637c8a; font-size: 12px; overflow-wrap: anywhere; }

/* Renovación de los flujos existentes: pagos, extractos, permisos y análisis. */
.cabecera { margin: 0 0 26px; gap: 15px; align-items: center; }
.cabecera h1 { font-size: 27px; }
.titulo-seccion { margin-top: 28px; color: #80919c; font-size: 10px; letter-spacing: .1em; }
.boton-principal { background: #087d67; color: #fff; border-radius: 9px; font-size: 14px; min-height: 48px; font-weight: 650; }
.boton-principal:hover { background: #05634f; }
.boton-secundario, .boton-revisar { color: #315264; background: #fff; border: 1px solid var(--borde); border-radius: 9px; font-size: 13px; min-height: 44px; }
.boton-secundario:hover, .boton-revisar:hover { background: #f0f6f3; border-color: #a7c8ba; }
.boton-icono { background: #fff; border: 1px solid var(--borde); border-radius: 9px; color: #597183; width: 40px; height: 40px; }
.boton-texto { color: #087d67; font-size: 13px; }
.control, .cb-filtros select, .rs-cerrar textarea, .nota-cierre textarea { background: #fff; border-color: #d7e1e6; color: #17374a; border-radius: 8px; }
.control { font-size: 16px; min-height: 48px; }
.etiqueta { font-size: 12px; font-weight: 650; color: #526e7f; margin-bottom: 8px; }
.campo { margin-bottom: 22px; }
.ayuda { color: #688775; font-size: 12px; }
#formulario, #extracto, #acceso-editor { max-width: 840px; }
#form, #form-acceso { padding: 28px; border: 1px solid var(--borde); border-radius: 14px; background: #fff; box-shadow: var(--cx-shadow); }
.foto-zona, .zona-archivo { background: #f8fbfa; border: 1px dashed #b9d2c9; border-radius: 11px; }
.foto-zona { min-height: 190px; }
.zona-archivo { padding: 40px 24px; }
.zona-archivo:hover { border-color: #16866e; background: #f0f8f4; }
.cx-upload-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 25px; padding: 0; list-style: none; }
.cx-upload-flow li { display: flex; align-items: center; gap: 9px; color: #698171; font-size: 11px; }
.cx-upload-flow li > span { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: #e4efe9; font-weight: 650; color: #43795f; }
.nombre-archivo { color: #2a534c; }
.icono-grande { font-size: 34px; }
.segmentado { padding: 4px; background: #f3f6f7; border-color: #dce5e8; border-radius: 9px; }
.segmento { font-size: 13px; border-radius: 6px; }
.segmento.activo { color: #087d67; background: #fff; box-shadow: 0 1px 3px rgba(20,43,62,.1); }
.item, .hallazgo { background: #fff; border-color: var(--borde); border-radius: 10px; box-shadow: 0 2px 8px rgba(20,43,62,.018); }
.item { padding: 17px; }
.hallazgo { padding: 19px; margin-bottom: 12px; }
.hallazgo .quien, .item .quien { font-size: 14px; color: #254456; }
.hallazgo .importe, .item .importe { font-size: 15px; letter-spacing: -.015em; }
.hallazgo .meta, .item .meta { color: #7c8d99; font-size: 12px; }
.hallazgo .porque { background: #f3f6f7; color: #667e8e; border-radius: 7px; }
.acciones button { color: #3c5c6c; border-color: #d8e3e7; background: #f9fbfc; }
.acciones .si { color: #fff; background: #087d67; }
.acciones .no { color: #b34740; background: #fff; }
.opcion { color: #315367; border-color: #d8e3e7; }
.opcion.elegida { color: #087d67; background: #edf8f2; border-color: #70b39a; }
.sugerencia { color: #345366; background: #f7faf9; border-color: #dce6e2; border-radius: 8px; }
.sugerencia:hover { background: #eaf5ef; }
.insignia { background: #eaf0f3; color: #597183; font-size: 11px; }
.estado { border-radius: 5px; font-size: 10px; text-transform: none; letter-spacing: 0; }
.estado-pendiente, .e-decidir, .chip.decidir { color: #946000; background: #fcf3de; }
.estado-conciliado, .e-ok, .chip.ok { color: #08765c; background: #e8f5ef; }
.estado-duplicado, .estado-rechazado, .e-mal, .chip.mal { color: #ad3d36; background: #fcefed; }
.error { color: #aa4039; background: #fff1ef; border-color: #efd0cb; border-radius: 9px; font-size: 13px; }
.avisos { color: #8b6820; background: #fff9ea; border-color: #f0dfb6; border-radius: 10px; font-size: 13px; }
.avisos.ok { color: #1a6e55; background: #eff9f2; border-color: #c9e7d3; }
.insignia-rol.admin { color: #08765c; background: #e8f5ef; }
.insignia-rol.aviso { color: #946000; background: #fcf3de; }
.insignia-rol.baja { color: #ad3d36; background: #fcefed; }
.boton-peligro { color: #b34740; background: #fff3f1; border-color: #ebc9c5; border-radius: 9px; }
.casillas { border-radius: 10px; background: #fff; }
.casilla { font-size: 13px; min-height: 46px; border-color: #e7edef; }
.spinner { border-color: #dce8e4; border-top-color: #16866e; }
#inicio:not(.oculto) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
#inicio > .cabecera, #inicio > .seccion { grid-column: 1 / -1; }
#inicio > .cabecera { margin-bottom: 12px; }
#inicio > button { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 13px; min-height: 115px; margin: 0; padding: 22px; text-align: left; }
#inicio > button .icono { font-size: 22px; }
#inicio .lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#inicio .lista:empty { display: block; }
#inicio .item { margin: 0; }
#inicio:not(.oculto) { display: block; }
.cx-tools-intro { color: #6b8190; font-size: 14px; margin: 0 0 24px; }
.cx-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cx-action-grid > button { display: flex; align-items: center; justify-content: flex-start; gap: 15px; min-height: 128px; margin: 0 !important; padding: 24px; text-align: left; }
.cx-action-grid strong { display: block; font-size: 14px; }
.cx-action-grid small { display: block; margin-top: 6px; color: #7b909d; font-size: 11px; font-weight: 400; line-height: 1.6; }
.cx-action-grid .boton-principal small { color: #c2e6da; }
.cx-action-icon { font-size: 28px; font-weight: 400; }
.cx-action-arrow { margin-left: auto; color: #849da6; font-size: 20px; }
.cx-action-grid .boton-principal .cx-action-arrow { color: #c2e6da; }
#accesos { max-width: 1100px; }
#accesos > .boton-principal { width: auto; padding: 12px 19px; }
#accesos .lista-simple { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#accesos .hallazgo { margin: 0; }

/* Análisis detallado conserva sus funciones, con el mismo sistema de superficies. */
.db-menu { background: #fff; border-color: var(--borde); }
.db-menu-cabecera { color: #244456; font-size: 14px; }
.db-grupo-titulo { color: #7c8f9c; font-size: 10px; }
.db-menu-item { color: #537080; font-size: 12px; min-height: 40px; border-radius: 7px; }
.db-menu-item.activo { color: #087d67; background: #e8f5ef; }
.db-mes { border-radius: 9px; }
.db-seccion { background: #fff; border-color: var(--borde); border-radius: 12px; }
.kpi { border-color: var(--borde); border-radius: 10px; background: #fff; padding: 17px; }
.kpi-valor { font-size: 25px; letter-spacing: -.025em; }
.kpi-titulo { font-size: 10px; color: #7a8d99; }
.tabla-envoltura { border-radius: 10px; background: #fff; }
.tabla th { background: #f7f9fa; color: #7d8f9b; }
.tabla td { border-color: #e7edf0; }
.alerta { background: #fff; border-color: var(--borde); }
.integridad.bien { color: #08765c; background: #e8f5ef; }
.integridad.mal { color: #ad3d36; background: #fcefed; }
.db-hoja { z-index: 220; background: rgba(14,33,48,.35); }
.db-hoja-caja { background: #fff; box-shadow: -10px 0 40px rgba(14,33,48,.1); }
.hoja-importe { color: #173b48; font-size: 34px; letter-spacing: -.035em; }
.hoja-datos dt { color: #7a8d99; }
.db-velo { background: rgba(14,33,48,.35); }

@media (min-width: 900px) {
  .cx-admin .db-marco { grid-template-columns: 190px minmax(0, 1fr); gap: 24px; }
  .db-menu { padding-top: 0; background: none; }
}
@media (max-width: 1200px) {
  .pantalla, .pantalla.ancha { padding: 28px 25px 44px; }
  .cv-kpi { padding: 20px 18px; }
  .cv-kpi-value { font-size: clamp(24px, 2.8vw, 34px); }
  .cx-toolbar { gap: 12px; }
  .cx-date-range { margin-left: 0; }
  .cv-grid { grid-template-columns: minmax(0, 1.3fr) minmax(240px, 1fr); }
}
@media (max-width: 1030px) {
  .cv-grid { grid-template-columns: minmax(0, 1fr); }
  .cx-topbar { gap: 15px; }
  .cx-topbar h1 { font-size: 27px; }
  .cx-topbar-actions .cx-button { font-size: 11px; }
  #inicio:not(.oculto) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 840px) {
  .cx-admin .cx-shell { padding-left: 0; padding-bottom: calc(72px + var(--seguro-abajo)); }
  .cx-sidebar {
    inset: auto 0 0; width: 100%; height: auto; z-index: 80;
    padding: 5px 4px calc(5px + var(--seguro-abajo)); background: #fff;
    border-right: 0; border-top: 1px solid #dbe5e9; box-shadow: 0 -5px 20px rgba(20,43,62,.05);
  }
  .cx-sidebar .cx-brand, .cx-sidebar .cx-operations, .cx-sidebar .cx-sidebar-footer,
  .cx-sidebar > footer, .cx-sidebar .cx-nav-label, .cx-sidebar .cx-nav-heading, .cx-sidebar .cx-nav-caption { display: none; }
  .cx-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
  .cx-nav button, .cx-nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    min-height: 57px; padding: 7px 2px; border-radius: 8px; color: #81939f;
    font-size: 10px; font-weight: 600; text-align: center; line-height: 1.2;
  }
  .cx-nav button[aria-current="page"], .cx-nav button.activo, .cx-nav-item.activo { color: #08765c; background: #edf7f2; border-color: transparent; }
  .cx-nav button[aria-current="page"] svg { color: #08765c; }
  .cx-nav button:hover { color: #08765c; background: #edf7f2; }
  .cx-nav button svg { width: 19px; height: 19px; }
  .cx-nav .insignia { position: absolute; top: 2px; right: 2px; min-width: 15px; padding: 1px 4px; background: #f7ebd0; color: #946000; }
  .cx-nav button { position: relative; }
  .cx-nav-count { position: absolute; right: 3px; top: 0; padding: 1px 4px; color: #946000; background: #f7ebd0; font-size: 9px; }
  .cx-label-mobile { display: inline; }
  .cx-label-desktop { display: none; }
  .pantalla, .pantalla.ancha { padding: 26px 24px 35px; }
  .cv-kpi-value { font-size: clamp(25px, 4.2vw, 35px); }
  .cv-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-toolbar { align-items: flex-end; }
  .cx-toolbar #rs-ambito { max-width: none; min-width: 140px; }
  .cx-periods { overflow-x: auto; max-width: 100%; }
  .cx-periods button { white-space: nowrap; }
}
@media (max-width: 640px) {
  h1 { font-size: 27px; }
  .pantalla, .pantalla.ancha { padding: 22px 17px 30px; }
  .cx-topbar { gap: 12px; margin-bottom: 20px; }
  .cx-topbar h1 { font-size: 25px; }
  .cx-topbar #rs-sub { font-size: 10px; max-width: 260px; }
  .cx-eyebrow { font-size: 9px; letter-spacing: .1em; }
  .cx-topbar-actions { padding-top: 7px; gap: 6px; }
  .cx-topbar-actions .cx-button { width: 40px; min-height: 40px; padding: 9px; font-size: 0; gap: 0; }
  .cx-topbar-actions .cx-button svg { width: 19px; height: 19px; }
  .cx-topbar-actions .cx-icon-button { width: 36px; height: 40px; min-height: 40px; }
  .cx-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: end; gap: 11px; padding: 12px; border-radius: 10px; margin-bottom: 22px; }
  .cx-periods { width: 100%; grid-column: 1 / -1; justify-content: space-between; }
  .cx-periods button { flex: 1 0 auto; padding: 8px 8px; font-size: 10px; }
  .cx-filter select, .cx-filter input { font-size: 16px; min-height: 40px; }
  .cx-toolbar #rs-ambito { max-width: 100%; width: 100%; }
  .cx-date-toggle { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; height: 40px; padding: 8px 10px; border: 1px solid var(--borde); border-radius: 7px; background: #fff; color: #365367; font-size: 11px; font-weight: 600; }
  .cx-date-toggle svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.7; }
  .cx-scope { grid-column: 2; grid-row: 2; }
  .cx-toolbar .cx-scope select { min-width: 0 !important; }
  .cx-date-range { display: none; width: 100%; min-width: 0; grid-column: 1 / -1; grid-row: 3; }
  .cx-date-range.is-open { display: flex; }
  .cx-date-range input { padding: 7px 8px; width: 100%; font-size: 13px; }
  .cv-hero { margin-bottom: 17px; gap: 13px; }
  .cv-hero h2 { font-size: 22px; }
  .cv-workspace[data-cv-vista-actual="resumen"] .cv-hero .cv-eyebrow { display: none; }
  .cv-hero p { font-size: 11px; }
  .cv-period, .cv-period-badge { display: none; }
  .cv-hero > .cv-pill { display: none; }
  .cv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-bottom: 18px; }
  .cv-kpi { min-height: 132px; padding: 18px 15px; }
  .cv-kpi:first-child { grid-column: 1 / -1; min-height: 142px; }
  .cv-kpi-label { font-size: 10px; margin-bottom: 12px; }
  .cv-kpi-value { font-size: clamp(17px, 4.8vw, 27px); letter-spacing: -.045em; }
  .cv-kpi:first-child .cv-kpi-value { font-size: 36px; }
  .cv-kpi-note { font-size: 10px; line-height: 1.5; margin-top: 9px; }
  .cv-grid, .cv-grid.equal { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .cv-panel { padding: 18px 16px; border-radius: 10px; margin-bottom: 16px; }
  .cv-panel-head { gap: 10px; margin-bottom: 16px; }
  .cv-panel-head h2, .cv-panel-head h3 { font-size: 14px; }
  .cv-panel-head .cv-button { font-size: 10px; min-height: 36px; padding: 7px 8px; }
  .cv-toolbar { align-items: stretch; gap: 9px; }
  .cv-search { width: 100%; }
  .cv-search input, input.cv-search, .cv-toolbar select { font-size: 16px; }
  .cv-toolbar select { flex: 1 1 auto; width: 100%; }
  .cv-toolbar label { flex-wrap: wrap; }
  .cv-cash-grid, .cv-expected-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cv-cash-grid > div, .cv-expected-grid > div { padding-bottom: 13px; border-bottom: 1px solid #e6edf0; }
  .cv-cash-grid > div:last-child, .cv-expected-grid > div:last-child { padding-bottom: 0; border-bottom: 0; }
  .cv-cash-grid strong, .cv-expected-grid strong { font-size: 25px; }
  .cv-table:not(.cv-coverage) thead { display: none; }
  .cv-table:not(.cv-coverage), .cv-table:not(.cv-coverage) tbody { display: block; width: 100%; }
  .cv-table:not(.cv-coverage) tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 13px; border-bottom: 1px solid #e7edf0; }
  .cv-table:not(.cv-coverage) tr:last-child { border-bottom: 0; }
  .cv-table:not(.cv-coverage) td, .cv-table:not(.cv-coverage) th {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    border: 0; padding: 5px 0; font-size: 12px; min-width: 0;
  }
  .cv-table:not(.cv-coverage) td[data-label]::before { content: attr(data-label); color: #8295a1; font-size: 11px; font-weight: 400; text-align: left; }
  .cv-table:not(.cv-coverage) .cv-primary-cell { display: block; min-width: 0; margin-bottom: 6px; font-size: 13px; }
  .cv-table small { font-size: 11px; color: #647c8b; }
  .cv-table:not(.cv-coverage) td:empty { display: none; }
  .cv-table:not(.cv-coverage) .cv-pill { white-space: normal; text-align: right; }
  .cv-table-wrap { border-radius: 8px; }
  .cv-coverage .cv-primary-cell { min-width: 160px; }
  .cv-coverage th, .cv-coverage td { padding: 10px 8px; }
  .cv-day { min-width: 34px; width: 34px; height: 36px; }
  .cv-chart { gap: 8px; min-height: 176px; }
  .cv-chart-bar { width: min(40px, 84%); min-height: 145px; height: 145px; }
  .cv-chart-value { display: none; }
  .cv-chart-day > span:last-child { font-size: 9px; }
  .cv-issue { gap: 9px; flex-wrap: wrap; }
  .cv-issue > strong { font-size: 14px; }
  .cv-account-grid { grid-template-columns: minmax(0, 1fr); }
  .cv-drawer { padding: 0; }
  .cv-drawer-head { padding: 22px 20px 18px; }
  .cv-drawer-body { padding: 22px 20px calc(30px + var(--seguro-abajo)); }
  .cv-drawer h2 { font-size: 22px; }
  .cv-drawer .cv-kpi-value { font-size: 33px; }
  .cv-detail dl { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px; }
  #form, #form-acceso { padding: 22px 17px; border-radius: 11px; }
  .cabecera h1 { font-size: 24px; }
  #inicio:not(.oculto) { display: block; }
  .cx-action-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cx-action-grid > button { min-height: 100px; padding: 20px; }
  .cx-upload-flow { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .cv-expected { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 22px 18px; }
  .cv-expected-details { padding: 18px 0 0; border-left: 0; border-top: 1px solid #d4e1d9; }
  .cv-expected-details strong { font-size: 17px; }
  .cv-supporting { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cv-supporting > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 15px; align-items: baseline; }
  .cv-supporting small { flex-basis: 100%; max-width: none; }
  .cv-supporting strong { font-size: 18px; margin-top: 0; }
  .cv-supporting .cv-button { justify-content: flex-start; }
  .cv-separated { border-left: 0; }
  .cv-toolbar .cv-filter { max-width: 100%; flex: 1 1 44%; }
  .cv-issue > .cv-button { margin-left: 43px; }
  #inicio > button { min-height: 115px; padding: 16px; font-size: 12px; }
  #inicio .lista, #accesos .lista-simple { grid-template-columns: minmax(0, 1fr); }
  .campo-doble { gap: 10px; }
  .acciones { flex-wrap: wrap; }
  .acciones button { flex: 1 1 100px; }
  .db-cabecera { gap: 8px; }
  .db-titulo h1 { font-size: 20px; }
  .db-filtros .control { font-size: 16px; }
}
@media (max-width: 359px) {
  .pantalla, .pantalla.ancha { padding-left: 12px; padding-right: 12px; }
  .cv-kpi { padding-left: 12px; padding-right: 12px; }
  .cv-kpi-value { font-size: 19px; }
  .cx-topbar h1 { font-size: 23px; }
  .cx-nav button { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
