/* ═══ Portal de Pagos — Clientes Vikar GPS ═══════════════════════════
   Reutiliza el sistema de diseño del panel admin (app.css): mismas
   variables (--primary, --sidebar-bg, --surface, etc.), tipografía
   Plus Jakarta Sans, sidebar navy, tarjetas, tablas y badges. Las clases
   cp-* del portal cliente se mapean al lenguaje visual del admin. */
:root {
    --vikar-blue: #005B9F;
    --vikar-blue-dark: #003F70;
    --vikar-bg: #F8F8F8;
    --vikar-surface: #FFFFFF;
    --vikar-text: #333333;
    --vikar-muted: #666666;
    --vikar-border: #E2E8F0;
    --vikar-radius: 12px;
    --vikar-radius-sm: 8px;
}

body.client-portal-active {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg, #F0F4FA);
    color: var(--text, #1A2332);
}

/* Login alineado con vikargps.cl */
body.portal-public .login-screen {
    grid-template-columns: 1fr 1fr;
    background: var(--vikar-bg);
}
body.portal-public .login-left {
    background: linear-gradient(135deg, var(--vikar-blue-dark), var(--vikar-blue));
}
body.portal-public .login-logo {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,.3);
}
body.portal-public .login-right { background: var(--vikar-surface); }
body.portal-public .login-forgot {
    margin-top: .9rem;
    font-size: .875rem;
    color: var(--text-muted, #6B7C93);
    text-align: center;
}
body.portal-public .login-forgot a {
    color: var(--primary, #2B4EB4);
    font-weight: 600;
    text-decoration: none;
}
body.portal-public .login-forgot a:hover { text-decoration: underline; }

/* ═══ Shell: sidebar navy + contenido (igual al admin) ═══════════════
   Escala de spacing consistente (4 / 8 / 12 / 16 / 24px) y una grilla de
   2 columnas: sidebar de ancho fijo + contenido fluido (minmax(0,1fr) evita
   que el contenido o las tablas provoquen scroll horizontal). */
/* Alto fijo del viewport: el shell ocupa exactamente la pantalla y NO scrollea;
   solo el área de contenido (.cp-content) tiene scroll propio, manteniendo la
   barra lateral siempre visible y fija. 100dvh corrige el alto dinámico móvil. */
.client-app {
    --cp-sidebar-w: 284px;
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-columns: var(--cp-sidebar-w) minmax(0, 1fr);
    align-items: stretch;
    max-width: 100%;
    overflow: hidden;
}

/* Barra lateral fija a alto completo: llena su columna (100vh/100dvh) y, como el
   shell no scrollea, queda anclada sin moverse. Flex column de alto total para
   que la navegación (flex:1) empuje la tarjeta de usuario + Salir al fondo. */
.cp-sidebar {
    background: var(--sidebar-bg, #152847);
    box-shadow: 4px 0 24px rgba(21, 40, 71, .18);
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}
.cp-sidebar::-webkit-scrollbar { display: none; }

/* El formato interno del sidebar (brand, greeting, nav, badges, footer y
   botón Salir) reutiliza tal cual las clases del panel admin definidas en
   app.css (.sidebar-brand, .sidebar-logo, .sidebar-greeting, .avatar,
   .greeting-hi/.greeting-role, .sidebar-nav, .nav-section-label, .nav-item,
   .nav-badge, .sidebar-footer, .sidebar-user, .btn-logout). Aquí solo vive el
   contenedor del sidebar y lo específico del portal cliente. */
.cp-wordmark { font-weight: 800; font-size: 1.5rem; color: #fff; letter-spacing: -.03em; line-height: 1; }

/* Más aire alrededor de la navegación para que respire en una sidebar ancha. */
.cp-sidebar .sidebar-nav { padding: .5rem 1rem 1.25rem; }
.cp-sidebar .nav-section-label { padding: 1rem .65rem .35rem; }
.cp-sidebar .nav-section-label:first-child { margin-top: 0; padding-top: .25rem; }
.cp-sidebar .sidebar-greeting strong { max-width: 190px; }

/* La navegación ocupa el espacio libre (flex:1) y el pie (tarjeta de usuario +
   Salir) se ancla al fondo con margin-top:auto, sin huecos ni desalineaciones. */
.cp-sidebar .sidebar-nav { flex: 1 1 auto; }
.cp-sidebar .sidebar-footer { margin-top: auto; flex-shrink: 0; }
.cp-sidebar .sidebar-brand, .cp-sidebar .sidebar-greeting { flex-shrink: 0; }

/* Ítems del menú: filas de igual altura, ícono en una columna fija (20px),
   etiqueta en una sola línea (sin cortes ni envolturas) y badge numérico
   alineado a la derecha y centrado verticalmente, idéntico en todos los ítems. */
.cp-sidebar .nav-item {
    min-height: 46px; padding: .6rem .75rem; gap: .7rem;
    margin-bottom: 2px; border-radius: 10px;
}
.cp-sidebar .nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.cp-sidebar .nav-item .cp-nav-label {
    flex: 1; min-width: 0; text-align: left; font-size: .875rem; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-sidebar .nav-item.active .cp-nav-label { font-weight: 600; }
/* El padding 1rem del nav desplaza ~2px la barrita de acento; pegarla al borde. */
.cp-sidebar .nav-item.active::before { left: -1rem; }
.cp-sidebar .nav-item .nav-badge {
    margin-left: .5rem; flex-shrink: 0; text-align: center;
    padding: .15rem .45rem; min-width: 22px; font-size: .6875rem; line-height: 1.3;
}

/* Único contenedor scrollable: alto del viewport con scroll vertical propio,
   de modo que SOLO el contenido scrollee mientras la barra lateral queda fija. */
.cp-content { display: flex; flex-direction: column; min-width: 0; height: 100vh; height: 100dvh; overflow-y: auto; overflow-x: hidden; background: var(--bg, #F0F4FA); }
.cp-mobile-bar { display: none; }
.cp-mobile-nav { display: none; }
.cp-view.hidden { display: none; }
.client-main { padding: 1.75rem 2.25rem 3rem; flex: 1; min-width: 0; max-width: 1180px; width: 100%; }
.cp-footer { padding: 1.25rem 2.25rem; font-size: .8125rem; color: var(--text-muted, #6B7C93); border-top: 1px solid var(--border-light, #EEF2F8); text-align: center; }
.cp-footer a { color: var(--primary, #2B4EB4); text-decoration: none; font-weight: 600; }
.cp-footer a:hover { text-decoration: underline; }

/* El panel admin inyecta un botón de búsqueda flotante en <body> (fuera de #app);
   se oculta en el portal del cliente para que no quede superpuesto sobre la
   navegación. */
body.client-portal-active #mobile-search-fab { display: none !important; }

/* ═══ Encabezados ════════════════════════════════════════════════════ */
.cp-section-head { margin-bottom: 1.25rem; }
.cp-section-title { font-size: 1.5rem; font-weight: 800; color: var(--text, #1A2332); letter-spacing: -.02em; line-height: 1.15; }
.cp-section-sub { font-size: .875rem; color: var(--text-muted, #6B7C93); margin-top: .25rem; }
/* Encabezado con acción a la derecha (p. ej. botón de monitoreo en Mi Flota). */
.cp-section-head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cp-section-head-text { min-width: 0; }
.cp-monitor-btn { flex-shrink: 0; }
.cp-welcome { margin-bottom: 1.5rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cp-welcome-title { font-size: 1.65rem; font-weight: 800; color: var(--text, #1A2332); letter-spacing: -.025em; line-height: 1.12; }
.cp-welcome-date { font-size: .875rem; color: var(--text-muted, #6B7C93); margin-top: .3rem; max-width: 60ch; }
.cp-status-pill { flex-shrink: 0; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .4rem .8rem; border-radius: 999px; border: 1px solid transparent; }
.cp-status-pill.is-ok { background: var(--success-bg, #ECFDF5); color: var(--success-text, #047857); border-color: var(--success-soft, #A7F3D0); }
.cp-status-pill.is-warn { background: var(--warning-bg, #FFFBEB); color: var(--warning-text, #B45309); border-color: var(--warning-soft, #FDE68A); }
.cp-status-pill.is-danger { background: var(--danger-bg, #FEF2F2); color: var(--danger-text, #DC2626); border-color: var(--danger-soft, #FECACA); }

/* Grilla principal del dashboard de Inicio: saldo (más ancho) + transferencia
   (más angosta), ambas columnas con la MISMA altura para que la fila calce. */
.cp-dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }
.cp-dash-main { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.cp-dash-side { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
/* Cada columna tiene una sola tarjeta que debe llenar la altura de la fila. */
.cp-dash-main > *, .cp-dash-side > * { flex: 1 1 auto; }
.cp-dash-main .cp-balance-hero { margin-bottom: 0; }
/* El aviso de corte / estado va a lo ancho debajo de la fila saldo+transferencia. */
.cp-dash-notice { margin-top: 1.25rem; }
.cp-dash-notice .cp-status, .cp-dash-notice .cp-cut { margin-bottom: 0; }
.cp-dash-notice:empty { display: none; }
.cp-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 1rem; }
.cp-block-title { font-size: 1.0625rem; font-weight: 800; color: var(--text, #1A2332); letter-spacing: -.01em; }
.cp-link-btn { background: none; border: none; cursor: pointer; color: var(--primary, #2B4EB4); font-family: inherit; font-size: .8125rem; font-weight: 600; }
.cp-link-btn:hover { text-decoration: underline; }

/* ═══ Layout en grilla (main + lateral) ═════════════════════════════ */
.cp-col-main { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }

/* ═══ Tarjetas (page-card del admin) ════════════════════════════════ */
.cp-card {
    background: var(--surface, #fff);
    border-radius: var(--radius, 16px);
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(26, 35, 50, .04));
    border: 1px solid var(--border-light, #EEF2F8);
    overflow: hidden;
}
.cp-card + .cp-card { margin-top: 0; }
.cp-card-head {
    padding: 1rem 1.375rem; border-bottom: 1px solid var(--border-light, #EEF2F8);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.cp-card-head h2 { font-size: .9375rem; font-weight: 700; color: var(--text, #1A2332); letter-spacing: -.01em; }
.cp-card-head-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cp-card-body { padding: 1.25rem 1.375rem; }

/* ═══ Botones (btn del admin) ═══════════════════════════════════════ */
.cp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .7rem 1.25rem; border: none; border-radius: var(--radius-sm, 10px);
    font-family: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer;
    text-decoration: none; white-space: nowrap; line-height: 1.2;
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
}
.cp-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.cp-btn-sm svg { width: 16px; height: 16px; }
.cp-btn-primary { background: var(--primary, #2B4EB4); color: #fff; box-shadow: 0 2px 8px var(--primary-glow, rgba(43,78,180,.14)); }
.cp-btn-primary:hover { background: var(--primary-dark, #1A3278); box-shadow: 0 4px 16px var(--primary-glow, rgba(43,78,180,.14)); transform: translateY(-1px); }
.cp-btn-outline { background: var(--surface, #fff); color: var(--text-2, #3D4F66); border: 1.5px solid var(--border, #DDE4EF); }
.cp-btn-outline:hover { background: var(--surface-2, #F8FAFD); border-color: #CBD5E1; }
.cp-btn-sm { padding: .5rem 1rem; font-size: .8125rem; border-radius: 8px; }
.cp-btn-block { width: 100%; }
.cp-btn-light { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.cp-btn-light:hover { background: rgba(255, 255, 255, .26); color: #fff; }
.cp-btn-onlight { background: #fff; color: var(--primary-dark, #1A3278); }
.cp-btn-onlight:hover { background: #EEF2FB; color: var(--primary-dark, #1A3278); }
.cp-btn-wa { background: #25d366; color: #0b3d1f; }
.cp-btn-wa:hover { background: #1ebe5a; color: #07331a; }
.cp-wa-icon { display: inline-flex; }
.cp-wa-icon svg { width: 20px; height: 20px; }

/* ═══ Hero de saldo (period-hero-bar del admin) ═════════════════════ */
.cp-balance-hero {
    position: relative; overflow: hidden;
    border-radius: var(--radius, 16px); padding: 1.75rem; margin-bottom: 1.25rem;
    color: #fff;
    background: linear-gradient(120deg, var(--primary-dark, #1A3278), var(--primary, #2B4EB4) 80%, var(--primary-mid, #3366CC));
    box-shadow: 0 4px 20px rgba(43, 78, 180, .22);
    display: flex; flex-direction: column;
    min-height: 100%;
}
.cp-balance-hero::after {
    content: ""; position: absolute; right: -70px; top: -70px; width: 240px; height: 240px;
    border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
}
/* El contenido (monto, subtítulo y botones) se centra verticalmente para
   ocupar el alto de la tarjeta de forma equilibrada y quedar a la misma altura
   visual que la tarjeta de transferencia de al lado. */
.cp-balance-main { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cp-balance-top { display: flex; align-items: center; gap: .75rem; }
.cp-balance-eyebrow { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.cp-balance-pill {
    font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: .2rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .2); color: #fff;
}
.cp-balance-pill.is-ok { background: #fff; color: var(--success-text, #047857); }
.cp-balance-pill.is-danger { background: #fff; color: var(--danger-text, #DC2626); }
.cp-balance-amount { font-size: 2.6rem; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; margin: .5rem 0; }
.cp-balance-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .875rem; opacity: .92; }
.cp-balance-meta .cp-dot { opacity: .5; }
.cp-balance-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }

/* ═══ Datos de transferencia (panel expandido por defecto) ══════════ */
.cp-bank-fields { padding: .4rem 1.25rem 1rem; display: flex; flex-direction: column; gap: .1rem; }
/* Datos de transferencia como texto plano (sin cajas), discreto y compacto:
   es información de apoyo, el saldo es el protagonista. */
.cp-bank-row {
    margin: 0; padding: .1rem 0; background: none; border: 0;
    font-size: .8125rem; line-height: 1.55; color: var(--text, #1A2332);
    overflow-wrap: anywhere;
}
.cp-bank-label { font-weight: 600; color: var(--text-muted, #6B7C93); }
.cp-bank-value { font-weight: 600; color: var(--text, #1A2332); }
.cp-bank-copyall { margin-top: .7rem; }
.cp-side-note { padding: 1rem 1.375rem 1.25rem; font-size: .8125rem; color: var(--text-muted, #6B7C93); }
.cp-side-note a, .cp-help-mail a { color: var(--primary, #2B4EB4); }

/* ═══ Widgets KPI con sparkline / gauge (dashboard) ═════════════════ */
.cp-value-cards[hidden] { display: none; }
.cp-vcards-head { margin-bottom: .75rem; }
.cp-vcards-eyebrow { font-size: .75rem; font-weight: 600; color: var(--text-muted, #6B7C93); text-transform: uppercase; letter-spacing: .05em; }
.cp-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; margin-bottom: 1.25rem; }

.cp-kpi {
    --cp-accent: var(--primary, #2B4EB4);
    --cp-accent-bg: #E8EEFB;
    display: flex; flex-direction: column; min-width: 0;
    background: var(--surface, #fff); border: 1px solid var(--border-light, #EEF2F8);
    border-radius: var(--radius, 16px); box-shadow: var(--shadow-xs, 0 1px 2px rgba(26,35,50,.04));
    padding: 1.15rem 1.25rem 0; overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.cp-kpi:hover { box-shadow: var(--shadow, 0 4px 24px rgba(26,35,50,.07)); transform: translateY(-2px); }
.cp-kpi-km { --cp-accent: var(--primary, #2B4EB4); --cp-accent-bg: #E8EEFB; }
.cp-kpi-veh { --cp-accent: #059669; --cp-accent-bg: #D1FAE5; }
.cp-kpi-speed { --cp-accent: #D97706; --cp-accent-bg: #FEF3C7; }
.cp-kpi-grade { --cp-accent: #7C3AED; --cp-accent-bg: #EDE9FE; }

.cp-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.cp-kpi-icon {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--cp-accent); background: var(--cp-accent-bg);
}
.cp-kpi-icon svg { width: 21px; height: 21px; }
.cp-kpi-trend { display: inline-flex; align-items: center; gap: .15rem; font-size: .75rem; font-weight: 700; padding: .2rem .5rem; border-radius: 999px; }
.cp-kpi-trend.is-up { background: var(--success-bg, #ECFDF5); color: var(--success-text, #047857); }
.cp-kpi-trend.is-down { background: var(--danger-bg, #FEF2F2); color: var(--danger-text, #DC2626); }
.cp-kpi-value { font-size: 1.85rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.05; color: var(--text, #1A2332); margin-top: .85rem; overflow-wrap: anywhere; }
.cp-kpi-unit { font-size: .875rem; font-weight: 700; color: var(--text-muted, #6B7C93); }
.cp-kpi-label { font-size: .8125rem; color: var(--text-muted, #6B7C93); font-weight: 600; margin-top: .25rem; }
.cp-kpi-sublabel {
    font-size: .75rem; color: var(--text-muted, #6B7C93); font-weight: 500;
    line-height: 1.4; margin-top: .3rem; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* El mini-gráfico/medidor se ancla al fondo (margin-top:auto) para que en las 4
   tarjetas quede a la misma altura, sin importar el alto del valor/etiqueta. */
.cp-kpi-chart { margin: auto -1.25rem 0; padding-top: .9rem; }
.cp-spark { display: block; width: 100%; height: 60px; }
.cp-kpi-gauge { position: relative; display: flex; align-items: flex-end; justify-content: center; margin-top: auto; padding-top: .9rem; padding-bottom: .25rem; min-height: 60px; }
.cp-gauge-svg { width: 100%; max-width: 132px; height: auto; }
.cp-kpi-gauge-val { position: absolute; bottom: .1rem; left: 50%; transform: translateX(-50%); font-size: 1.35rem; font-weight: 800; color: var(--cp-accent); letter-spacing: -.02em; }
.cp-kpi-skeleton .cp-kpi-icon { background: #E8EEF6; }

/* Estados vacíos honestos (sin gráfico falso cuando no hay datos) */
.cp-kpi.is-empty { --cp-accent: var(--text-muted, #6B7C93); --cp-accent-bg: #EEF2F8; }
.cp-kpi.is-empty .cp-kpi-value { color: var(--text-muted, #6B7C93); }
.cp-kpi-chart-empty, .cp-kpi-gauge-empty { display: flex; align-items: center; justify-content: center; }
.cp-kpi-chart-empty { height: 60px; margin: auto 0 0; border-top: 1px dashed var(--border, #DDE4EF); }
.cp-kpi-empty-tag { font-size: .75rem; font-weight: 600; color: var(--text-muted, #9AA7B8); }
.cp-kpi-gauge-empty .cp-kpi-empty-tag { position: absolute; bottom: .35rem; left: 50%; transform: translateX(-50%); }
.cp-kpi-note { margin: -.4rem 0 1.25rem; padding: .85rem 1.1rem; background: var(--info-bg, #F0F9FF); border: 1px solid #cfe9fb; border-radius: var(--radius-sm, 10px); font-size: .8125rem; color: var(--info-text, #0369A1); }

/* Tabla de posiciones (Top conductores) */
.cp-card-hint { font-size: .75rem; color: var(--text-muted, #6B7C93); }
/* Lista con scroll: con la flota completa (130+ conductores) limitamos el alto
 * y dejamos overflow vertical para no romper el alto de la tarjeta. */
.cp-lb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 460px; overflow-y: auto; overscroll-behavior: contain; }
.cp-lb-list::-webkit-scrollbar { width: 8px; }
.cp-lb-list::-webkit-scrollbar-thumb { background: var(--border-light, #EEF2F8); border-radius: 999px; }
.cp-lb-list::-webkit-scrollbar-thumb:hover { background: var(--text-muted, #6B7C93); }
.cp-lb-item { border-bottom: 1px solid var(--border-light, #EEF2F8); }
.cp-lb-item:last-child { border-bottom: none; }
.cp-lb-row { display: flex; align-items: center; gap: .75rem; padding: .65rem .25rem; }
.cp-lb-pos { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 800; font-size: .8125rem; border-radius: 50%; background: var(--surface-2, #F8FAFD); color: var(--text-muted, #6B7C93); }
.cp-lb-pos-1, .cp-lb-pos-2, .cp-lb-pos-3 { background: transparent; font-size: 1.15rem; }
.cp-lb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.cp-lb-plate { font-weight: 600; color: var(--text, #1A2332); }
.cp-lb-meta { font-size: .75rem; line-height: 1.3; color: var(--text-muted, #6B7C93); }

/* Nota clickeable (botón) que despliega el "por qué de la nota". */
.cp-lb-grade { display: inline-flex; align-items: center; gap: .3rem; border: none; cursor: pointer; font-family: inherit; -webkit-appearance: none; appearance: none; transition: filter .15s ease, box-shadow .15s ease; }
.cp-lb-grade:hover { filter: brightness(.96); }
.cp-lb-grade:focus-visible { outline: 2px solid var(--cp-accent, #2563EB); outline-offset: 2px; }
.cp-lb-chev { font-size: .65rem; line-height: 1; opacity: .7; transition: transform .18s ease; }
.cp-lb-grade[aria-expanded="true"] .cp-lb-chev { transform: rotate(180deg); }

/* Panel de detalle inline (acordeón) bajo la fila, con expansión suave. */
.cp-lb-detail { max-height: 0; opacity: 0; overflow: hidden; padding: 0 .25rem 0 2.5rem; transition: max-height .3s ease, opacity .22s ease, padding .3s ease; }
.cp-lb-item.is-open .cp-lb-detail { max-height: 900px; opacity: 1; padding: .25rem .25rem .9rem 2.5rem; }
.cp-lb-detail-inner { padding-top: .1rem; }

/* Encabezado del bloque de análisis + ícono de info con tooltip. */
.cp-lb-an-head { display: flex; align-items: center; gap: .4rem; margin: 0 0 .5rem; }
.cp-lb-an-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted, #6B7C93); }
.cp-lb-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; color: var(--text-muted, #6B7C93); cursor: help; outline: none; }
.cp-lb-tip svg { width: 14px; height: 14px; }
.cp-lb-tip:hover, .cp-lb-tip:focus-visible { color: var(--cp-accent, #2563EB); }
.cp-lb-tip:focus-visible { outline: 2px solid var(--cp-accent, #2563EB); outline-offset: 2px; border-radius: 50%; }
.cp-lb-tip-bubble { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; width: max-content; max-width: 260px; padding: .5rem .65rem; border-radius: 8px; background: var(--text, #1A2332); color: #fff; font-size: .72rem; font-weight: 500; line-height: 1.35; letter-spacing: 0; text-transform: none; box-shadow: 0 6px 20px rgba(16, 24, 40, .18); opacity: 0; visibility: hidden; transform: translateY(-3px); transition: opacity .15s ease, transform .15s ease, visibility .15s; pointer-events: none; }
.cp-lb-tip-bubble::before { content: ""; position: absolute; bottom: 100%; left: 9px; border: 5px solid transparent; border-bottom-color: var(--text, #1A2332); }
.cp-lb-tip:hover .cp-lb-tip-bubble, .cp-lb-tip:focus-visible .cp-lb-tip-bubble { opacity: 1; visibility: visible; transform: translateY(0); }

/* Grilla de badges del análisis (icono + valor + etiqueta), responsive. */
.cp-lb-badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: .5rem; }
.cp-lb-badge { display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem; border: 1px solid var(--border-light, #EEF2F8); border-radius: 10px; background: var(--surface, #FFFFFF); }
.cp-lb-badge-ic { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--surface-2, #F8FAFD); color: var(--text-muted, #6B7C93); }
.cp-lb-badge-ic svg { width: 17px; height: 17px; }
.cp-lb-badge-body { display: flex; flex-direction: column; min-width: 0; }
.cp-lb-badge-val { font-weight: 800; font-size: .95rem; line-height: 1.1; color: var(--text, #1A2332); font-variant-numeric: tabular-nums; }
.cp-lb-badge-u { font-weight: 600; font-size: .7rem; color: var(--text-muted, #6B7C93); }
.cp-lb-badge-lbl { font-size: .7rem; line-height: 1.25; color: var(--text-muted, #6B7C93); margin-top: 1px; }
.cp-lb-badge.is-zero { opacity: .58; }
.cp-lb-badge.is-alert .cp-lb-badge-ic { background: var(--warning-bg, #FFFBEB); color: var(--warning-text, #B45309); }
.cp-lb-badge.is-danger .cp-lb-badge-ic { background: var(--danger-bg, #FEF2F2); color: var(--danger-text, #DC2626); }

/* Badge clickeable (botón) que abre la auditoría de eventos. */
.cp-lb-badge-btn { width: 100%; text-align: left; font-family: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease; }
.cp-lb-badge-btn:hover { border-color: var(--cp-accent, #2563EB); box-shadow: 0 2px 8px rgba(37, 99, 235, .12); }
.cp-lb-badge-btn:focus-visible { outline: 2px solid var(--cp-accent, #2563EB); outline-offset: 2px; }
.cp-lb-badge-btn:active { transform: translateY(1px); }
.cp-lb-badge-go { margin-left: auto; font-size: 1.1rem; line-height: 1; color: var(--text-muted, #6B7C93); flex-shrink: 0; }

/* Modal de auditoría de eventos del conductor. */
.cp-ev-state { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 2rem 1rem; color: var(--text-muted, #6B7C93); font-size: .9rem; }
.cp-ev-error { color: var(--danger-text, #DC2626); }
.cp-ev-empty { padding: 2rem 1rem; text-align: center; color: var(--text-muted, #6B7C93); font-size: .9rem; }
.cp-ev-spinner { width: 18px; height: 18px; border: 2px solid var(--border-light, #EEF2F8); border-top-color: var(--cp-accent, #2563EB); border-radius: 50%; animation: cp-ev-spin .7s linear infinite; }
@keyframes cp-ev-spin { to { transform: rotate(360deg); } }
.cp-ev-wrap { overflow-x: auto; }
.cp-ev-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.cp-ev-table th { text-align: left; font-weight: 700; color: var(--text-muted, #6B7C93); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; padding: .5rem .7rem; border-bottom: 1px solid var(--border-light, #EEF2F8); }
.cp-ev-table td { padding: .6rem .7rem; border-bottom: 1px solid var(--border-light, #EEF2F8); vertical-align: middle; }
.cp-ev-table tbody tr:last-child td { border-bottom: none; }
.cp-ev-when { color: var(--text, #1A2332); white-space: nowrap; }
.cp-ev-spd { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text, #1A2332); white-space: nowrap; }
.cp-ev-map { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .65rem; border-radius: 8px; border: 1px solid var(--border-light, #EEF2F8); background: var(--surface-2, #F8FAFD); color: var(--cp-accent, #2563EB); font-weight: 600; font-size: .8rem; text-decoration: none; white-space: nowrap; transition: background .15s ease, border-color .15s ease; }
.cp-ev-map:hover { background: #EEF4FF; border-color: var(--cp-accent, #2563EB); }
.cp-ev-map svg { width: 15px; height: 15px; }
.cp-ev-nomap { color: var(--text-muted, #6B7C93); }

/* Caja de recomendación: color suave según la nota del conductor. */
.cp-lb-rec { display: flex; align-items: flex-start; gap: .6rem; margin-top: .65rem; padding: .7rem .85rem; border-radius: 10px; border: 1px solid transparent; }
.cp-lb-rec-ic { flex-shrink: 0; display: flex; margin-top: 1px; }
.cp-lb-rec-ic svg { width: 18px; height: 18px; }
.cp-lb-rec-txt { margin: 0; font-size: .82rem; line-height: 1.45; }
.cp-lb-rec-ok { background: var(--success-bg, #ECFDF5); border-color: #A7F3D0; color: var(--success-text, #047857); }
.cp-lb-rec-warn { background: var(--warning-bg, #FFFBEB); border-color: #FDE68A; color: var(--warning-text, #B45309); }
.cp-lb-rec-danger { background: var(--danger-bg, #FEF2F2); border-color: #FECACA; color: var(--danger-text, #DC2626); }
.cp-lb-rec-na { background: var(--surface-2, #F8FAFD); border-color: var(--border-light, #EEF2F8); color: var(--text-muted, #6B7C93); }

.cp-lb-dt-grid { display: grid; grid-template-columns: 1fr; gap: .35rem; background: var(--surface-2, #F8FAFD); border: 1px solid var(--border-light, #EEF2F8); border-radius: 10px; padding: .65rem .8rem; }
.cp-lb-dt-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: .8125rem; }
.cp-lb-dt-k { color: var(--text-muted, #6B7C93); }
.cp-lb-dt-v { font-weight: 700; color: var(--text, #1A2332); font-variant-numeric: tabular-nums; text-align: right; }
.cp-lb-dt-note { margin: .55rem 0 0; font-size: .8125rem; line-height: 1.4; color: var(--text, #1A2332); }
.cp-lb-dt-list { margin: .55rem 0 0; padding-left: 1.1rem; font-size: .8125rem; line-height: 1.45; color: var(--text, #1A2332); }
.cp-lb-dt-empty { margin: 0; font-size: .8125rem; color: var(--text-muted, #6B7C93); font-style: italic; }
.cp-lb-grade { font-weight: 800; font-variant-numeric: tabular-nums; padding: .15rem .55rem; border-radius: 999px; font-size: .8125rem; }
.cp-lb-grade-ok { background: var(--success-bg, #ECFDF5); color: var(--success-text, #047857); }
.cp-lb-grade-warn { background: var(--warning-bg, #FFFBEB); color: var(--warning-text, #B45309); }
.cp-lb-grade-danger { background: var(--danger-bg, #FEF2F2); color: var(--danger-text, #DC2626); }
.cp-lb-grade-na { background: var(--surface-2, #F8FAFD); color: var(--text-muted, #6B7C93); }
.cp-empty-inline { padding: 1.25rem; text-align: center; color: var(--text-muted, #6B7C93); font-size: .875rem; }

/* ═══ Tablas (table-wrap del admin) ═════════════════════════════════ */
.cp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cp-table-wrap::-webkit-scrollbar { display: none; }
.cp-invoice-table { width: 100%; min-width: 100%; border-collapse: collapse; font-size: .8125rem; }
.cp-invoice-table th, .cp-invoice-table td {
    padding: .7rem .75rem; text-align: left; border-bottom: 1px solid var(--border-light, #EEF2F8); line-height: 1.4;
}
.cp-invoice-table th {
    background: var(--surface-2, #F8FAFD); font-weight: 600; color: var(--text-muted, #6B7C93);
    font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em;
}
.cp-invoice-table tbody tr { transition: background .2s; }
.cp-invoice-table tbody tr:hover td { background: var(--primary-soft, #F0F4FC); }
.cp-invoice-table tbody tr:last-child td { border-bottom: none; }
.cp-cell-sub { font-size: .6875rem; color: var(--text-muted, #6B7C93); }
.cp-td-check { width: 40px; }
.cp-check { width: 18px; height: 18px; accent-color: var(--primary, #2B4EB4); cursor: pointer; }
.cp-td-action { white-space: nowrap; }

/* ═══ Badges de estado (pay-badge del admin) ════════════════════════ */
.cp-badge {
    display: inline-flex; align-items: center; padding: .25rem .625rem; border-radius: 999px;
    font-size: .6875rem; font-weight: 600; letter-spacing: .02em;
}
.cp-badge-paid { background: var(--success-bg, #ECFDF5); color: var(--success-text, #047857); }
.cp-badge-overdue { background: var(--danger-bg, #FEF2F2); color: var(--danger-text, #DC2626); }
.cp-badge-due-soon { background: var(--warning-bg, #FFFBEB); color: var(--warning-text, #B45309); }
.cp-badge-pending { background: var(--info-bg, #F0F9FF); color: var(--info-text, #0369A1); }

/* Barra de pago */
.cp-pay-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: 1rem 1.375rem; background: var(--surface-2, #F8FAFD); border-top: 1px solid var(--border-light, #EEF2F8);
}
.cp-pay-lbl { font-size: .75rem; color: var(--text-muted, #6B7C93); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.cp-pay-total { font-size: 1.5rem; font-weight: 800; color: var(--primary, #2B4EB4); letter-spacing: -.02em; }
.cp-pay-hint { font-size: .75rem; color: var(--text-muted, #6B7C93); }
.cp-pay-actions { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }
.cp-pay-actions .cp-btn { white-space: nowrap; }

/* ═══ Banners de estado ═════════════════════════════════════════════ */
.cp-status {
    display: flex; align-items: flex-start; gap: .85rem; padding: 1rem 1.25rem; margin-bottom: 1.25rem;
    border-radius: var(--radius, 16px); border: 1px solid transparent;
}
.cp-status strong { display: block; font-weight: 700; }
.cp-status span { font-size: .8125rem; }
.cp-status-icon {
    width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff;
}
.cp-status-ok { background: var(--success-bg, #ECFDF5); border-color: var(--success-soft, #A7F3D0); color: var(--success-text, #047857); }
.cp-status-ok .cp-status-icon { background: var(--success, #10B981); }
.cp-status-warn { background: var(--warning-bg, #FFFBEB); border-color: var(--warning-soft, #FDE68A); color: var(--warning-text, #B45309); }
.cp-status-warn .cp-status-icon { background: var(--warning, #F59E0B); }
.cp-status-danger { background: var(--danger-bg, #FEF2F2); border-color: var(--danger-soft, #FECACA); color: var(--danger-text, #DC2626); }
.cp-status-danger .cp-status-icon { background: var(--danger, #EF4444); }

/* ═══ Aviso de corte de servicio ════════════════════════════════════ */
.cp-cut {
    display: flex; gap: 1rem; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem;
    border-radius: var(--radius, 16px); border: 1px solid var(--warning-soft, #FDE68A);
    background: var(--warning-bg, #FFFBEB);
}
.cp-cut-urgent, .cp-cut-overdue { border-color: var(--danger-soft, #FECACA); background: var(--danger-bg, #FEF2F2); }
.cp-cut-icon {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 800;
    background: var(--warning, #F59E0B); color: #fff;
}
.cp-cut-urgent .cp-cut-icon, .cp-cut-overdue .cp-cut-icon { background: var(--danger, #EF4444); }
.cp-cut-body { min-width: 0; }
.cp-cut-title { font-size: 1.0625rem; font-weight: 800; color: var(--text, #1A2332); }
.cp-cut-lead { font-size: .9375rem; color: var(--text-2, #3D4F66); margin-top: .35rem; line-height: 1.5; }
.cp-cut-sub { font-size: .8125rem; color: var(--text-muted, #6B7C93); margin-top: .35rem; line-height: 1.45; }
.cp-cut-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* ═══ Ayuda ═════════════════════════════════════════════════════════ */
.cp-help-body p { font-size: .875rem; color: var(--text-2, #3D4F66); margin-bottom: .85rem; line-height: 1.5; }
.cp-help-mail { font-size: .8125rem; color: var(--text-muted, #6B7C93); margin-top: .85rem; margin-bottom: 0 !important; }

/* ═══ Configuración (datos de contacto + clave + ayuda) ═════════════ */
.cp-config { display: flex; flex-direction: column; gap: 1.25rem; max-width: 960px; }
.cp-config-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: stretch; }
.cp-config-row > .cp-card { display: flex; flex-direction: column; min-width: 0; margin: 0; }
.cp-config-row > .cp-card .cp-card-body { flex: 1; display: flex; flex-direction: column; }
.cp-config-intro { font-size: .875rem; color: var(--text-2, #3D4F66); line-height: 1.5; margin-bottom: 1rem; }
.cp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; }
.cp-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.cp-field-full { grid-column: 1 / -1; }
.cp-field label { font-size: .75rem; font-weight: 700; color: var(--text-2, #3D4F66); letter-spacing: .01em; }
.cp-field input {
    width: 100%; padding: .7rem .85rem; font-family: inherit; font-size: .9375rem;
    border: 1.5px solid var(--border, #DDE4EF); border-radius: var(--radius-sm, 10px);
    color: var(--text, #1A2332); background: var(--surface, #fff); transition: border-color .15s, box-shadow .15s;
}
.cp-field input:focus { outline: none; border-color: var(--primary, #2B4EB4); box-shadow: 0 0 0 3px var(--primary-glow, rgba(43,78,180,.14)); }
.cp-field input:disabled { background: var(--surface-2, #F8FAFD); color: var(--text-muted, #6B7C93); cursor: not-allowed; }
.cp-form-actions { display: flex; justify-content: flex-end; margin-top: 1.1rem; }
.cp-form-msg { margin-top: 1rem; padding: .7rem .9rem; border-radius: var(--radius-sm, 10px); font-size: .875rem; font-weight: 600; }
.cp-form-msg.is-ok { background: var(--ok-soft, #E7F7EF); color: var(--ok-text, #157347); border: 1px solid var(--ok-border, #B7E4C7); }
.cp-form-msg.is-error { background: var(--danger-soft, #FDECEC); color: var(--danger-text, #DC2626); border: 1px solid var(--danger-border, #F5C2C2); }

/* ═══ Documentos ════════════════════════════════════════════════════ */
.cp-doc-list { display: flex; flex-direction: column; gap: .75rem; }
.cp-doc {
    display: flex; align-items: center; gap: 1rem; padding: 1rem 1.15rem;
    background: var(--surface, #fff); border: 1px solid var(--border-light, #EEF2F8);
    border-radius: var(--radius, 16px); box-shadow: var(--shadow-xs, 0 1px 2px rgba(26,35,50,.04));
    transition: box-shadow .2s, transform .2s;
}
.cp-doc:hover { box-shadow: var(--shadow-sm, 0 2px 8px rgba(26,35,50,.06)); transform: translateY(-1px); }
.cp-doc-icon {
    width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px;
    background: var(--primary-light, #E8EEFB); display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.cp-doc-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cp-doc-name { font-weight: 700; color: var(--text, #1A2332); overflow-wrap: anywhere; }
.cp-doc-sub { font-size: .8125rem; color: var(--text-muted, #6B7C93); margin-top: .15rem; }
.cp-doc-dl { flex-shrink: 0; }

/* ═══ Buscador ══════════════════════════════════════════════════════ */
.cp-search {
    display: flex; align-items: center; gap: .5rem;
    background: var(--bg, #F0F4FA); border: 1.5px solid var(--border, #DDE4EF);
    border-radius: 999px; padding: .4rem 1rem;
}
.cp-search:focus-within { border-color: var(--primary, #2B4EB4); box-shadow: 0 0 0 4px var(--primary-glow, rgba(43,78,180,.14)); background: var(--surface, #fff); }
.cp-search svg { width: 16px; height: 16px; color: var(--text-muted, #6B7C93); flex-shrink: 0; }
.cp-search input { border: none; background: transparent; outline: none; font-family: inherit; font-size: .8125rem; color: var(--text, #1A2332); width: 200px; max-width: 100%; }

/* ═══ Estados vacíos + skeleton ═════════════════════════════════════ */
.cp-empty { text-align: center; padding: 2.5rem 1.25rem; color: var(--text-muted, #6B7C93); }
.cp-empty p { font-size: .875rem; margin-top: .25rem; }
.cp-empty-icon { font-size: 2rem; margin-bottom: .5rem; }
.cp-sk { position: relative; overflow: hidden; background: #E8EEF6; border-radius: 6px; }
.cp-sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: cpShimmer 1.3s infinite; }
.cp-sk-line { height: 12px; }
.cp-sk-short { width: 40%; }
@keyframes cpShimmer { 100% { transform: translateX(100%); } }

/* ═══ Formulario cambio de clave ════════════════════════════════════ */
.cp-pass-form { display: flex; flex-direction: column; gap: .85rem; }
.cp-pass-form input {
    width: 100%; padding: .65rem .85rem; font-family: inherit; font-size: .875rem;
    border: 1.5px solid var(--border, #DDE4EF); border-radius: var(--radius-sm, 10px); color: var(--text, #1A2332);
}
.cp-pass-form input:focus { outline: none; border-color: var(--primary, #2B4EB4); box-shadow: 0 0 0 3px var(--primary-glow, rgba(43,78,180,.14)); }
.cp-pass-error { color: var(--danger-text, #DC2626); font-size: .8125rem; }

/* ═══ Selector de empresa (login con varias empresas) ═══════════════ */
.cp-company-switch {
    display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .9rem;
    margin-bottom: 1.25rem; padding: .8rem 1rem;
    background: var(--surface, #fff); border: 1px solid var(--border-light, #EEF2F8);
    border-left: 4px solid var(--primary, #2B4EB4);
    border-radius: var(--radius, 16px); box-shadow: var(--shadow-xs, 0 1px 2px rgba(26,35,50,.04));
}
.cp-company-switch-label {
    font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-muted, #6B7C93);
}
.cp-company-switch-control {
    display: flex; align-items: center; gap: .55rem; flex: 1; min-width: 0;
    padding: .15rem .7rem; background: var(--surface-2, #F8FAFD);
    border: 1.5px solid var(--border, #DDE4EF); border-radius: var(--radius-sm, 10px);
}
.cp-company-switch-control:focus-within { border-color: var(--primary, #2B4EB4); box-shadow: 0 0 0 3px var(--primary-glow, rgba(43,78,180,.14)); }
.cp-company-switch-control svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--primary, #2B4EB4); }
.cp-company-select {
    flex: 1; min-width: 0; border: none; background: transparent; cursor: pointer;
    font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--text, #1A2332);
    padding: .5rem 0; text-overflow: ellipsis;
}
.cp-company-select:focus { outline: none; }

/* ═══ Responsive ════════════════════════════════════════════════════ */
/* Laptops/desktop angosto: sidebar algo más compacta y KPIs en 2 columnas. */
@media (max-width: 1280px) {
    .client-app { --cp-sidebar-w: 256px; }
}
@media (max-width: 1200px) {
    .cp-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Tablet: el contenido pasa a una sola columna (saldo arriba, transferencia
   debajo) para no comprimir; la sidebar se mantiene pero más angosta. */
@media (max-width: 1024px) {
    .client-app { --cp-sidebar-w: 236px; }
    .cp-dash-grid { grid-template-columns: minmax(0, 1fr); }
    .cp-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp-balance-hero { min-height: 0; }
}

@media (max-width: 768px) {
    /* Móvil: se restaura el flujo normal (la página scrollea) para conservar la
       barra superior sticky y la barra inferior fija como hasta ahora. */
    .client-app { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 100vh; overflow: visible; }
    .cp-sidebar { display: none; }
    .cp-content { height: auto; overflow: visible; }
    .client-main { padding: 1.1rem 1rem 5.5rem; }

    .cp-mobile-bar {
        display: flex; align-items: center; justify-content: space-between;
        padding: .85rem 1.1rem; background: var(--sidebar-bg, #152847); position: sticky; top: 0; z-index: 60;
    }
    .cp-mobile-bar .cp-wordmark { font-size: 1.25rem; }
    .cp-mobile-logout {
        display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.12);
        border: 1px solid rgba(255,255,255,.22); color: #fff; border-radius: 8px;
        padding: .4rem .7rem; font-family: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer;
    }
    .cp-mobile-logout svg { width: 16px; height: 16px; }

    .cp-mobile-nav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
        background: var(--surface, #fff); border-top: 1px solid var(--border, #DDE4EF);
        box-shadow: 0 -2px 12px rgba(21, 40, 71, .12); padding-bottom: env(safe-area-inset-bottom);
    }
    .cp-tab {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
        min-height: 62px; padding: .5rem .25rem; border: none; background: transparent;
        color: var(--text-muted, #6B7C93); font-family: inherit; font-size: .6875rem; font-weight: 600; cursor: pointer;
    }
    .cp-tab svg { width: 24px; height: 24px; }
    .cp-tab.active { color: var(--primary, #2B4EB4); }

    .cp-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
    .cp-kpi-value { font-size: 1.5rem; }
    .cp-balance-amount { font-size: 2.1rem; }
    .cp-balance-actions .cp-btn { flex: 1 1 auto; }
    /* Barra de pago: los botones ocupan el ancho y se apilan sin desbordar. */
    .cp-pay-actions { width: 100%; }
    .cp-pay-actions .cp-btn { flex: 1 1 auto; }
    .cp-section-head-row .cp-monitor-btn { width: 100%; }
    .cp-section-title, .cp-welcome-title { font-size: 1.35rem; }
    .cp-search input { width: 100%; }
    .cp-card-head-actions { width: 100%; }
    .cp-form-grid { grid-template-columns: 1fr; }
    .cp-config-row { grid-template-columns: 1fr; }
    .cp-footer { padding: 1rem 1rem 5.5rem; }
}

/* Móviles angostos: una sola columna de KPIs y botones del saldo a lo ancho
   para evitar comprimir el contenido o provocar scroll horizontal. */
@media (max-width: 520px) {
    .cp-kpi-grid { grid-template-columns: minmax(0, 1fr); }
    .cp-balance-amount { font-size: 1.9rem; }
    .cp-balance-actions .cp-btn { flex: 1 1 100%; }
}

/* ═══ Medios de pago / sellos de confianza ══════════════════════════
   Fila de chips uniformes (SVG inline / texto estilado, sin imágenes
   externas). Se ajusta y hace wrap en pantallas chicas sin desbordar. */
.cp-paymethods {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: .85rem 1.5rem;
    margin-top: 1.25rem; padding: 1.1rem 1.375rem;
    background: var(--surface, #fff); border: 1px solid var(--border-light, #EEF2F8);
    border-radius: var(--radius, 16px); box-shadow: var(--shadow-xs, 0 1px 2px rgba(26, 35, 50, .04));
}
.cp-paymethods-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.cp-paymethods-lead {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .9375rem; font-weight: 700; color: var(--text, #1A2332); letter-spacing: -.01em;
}
.cp-pm-lock { width: 16px; height: 16px; color: var(--success, #10B981); flex-shrink: 0; }
.cp-paymethods-sub { font-size: .8125rem; color: var(--text-muted, #6B7C93); }
.cp-paymethods-note { font-size: .6875rem; color: var(--text-muted, #9AA7B8); }
.cp-paymethods-icons { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }

/* Insignias coherentes: todas mismo alto, borde y peso visual; solo cambia el
   color/marca de cada medio de pago. Ninguna se ve como "texto suelto". */
.cp-pm {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    height: 34px; min-width: 48px; padding: 0 .6rem;
    background: #fff; border: 1.5px solid var(--border, #DDE4EF); border-radius: 8px;
    box-shadow: 0 1px 1px rgba(26, 35, 50, .05); white-space: nowrap;
}
.cp-pm-logo { height: 17px; width: auto; display: block; flex-shrink: 0; }
.cp-pm-logo-mc { height: 22px; }
.cp-pm-logo-qr { height: 19px; }
.cp-pm-wm { font-weight: 800; font-size: .8rem; line-height: 1; letter-spacing: .01em; }
/* Marca por medio de pago (color del wordmark y, en las tarjetas, del SVG). */
.cp-pm-visa .cp-pm-wm { color: #1A1F71; font-style: italic; font-size: .95rem; letter-spacing: .04em; }
.cp-pm-be .cp-pm-wm { color: #E2001A; font-size: .8rem; }
.cp-pm-credito { color: #1A3278; }
.cp-pm-credito .cp-pm-wm { color: #1A3278; }
.cp-pm-prepago { color: #0E7490; }
.cp-pm-prepago .cp-pm-wm { color: #0E7490; }
.cp-pm-qr { color: #1A2332; }
.cp-pm-qr .cp-pm-wm { color: #1A2332; }

/* Variante compacta (modal "preparar pago"): centrada y apilada. */
.cp-paymethods-compact {
    flex-direction: column; align-items: center; gap: .55rem;
    margin-top: 1.25rem; padding: .9rem 1rem; text-align: center;
}
.cp-paymethods-compact .cp-paymethods-icons { justify-content: center; }

@media (max-width: 600px) {
    .cp-paymethods { gap: .75rem; }
    .cp-paymethods-icons { gap: .4rem; }
}

/* ═══ CTA "Pagar con tarjeta" (vista Inicio) ════════════════════════
   Protagonista del pago en línea, a la derecha de la tarjeta de saldo. */
.cp-pay-cta { display: flex; }
.cp-pay-cta-body {
    display: flex; flex-direction: column; justify-content: center; gap: .3rem;
    padding: 1.5rem; flex: 1; min-width: 0;
}
.cp-pay-cta-eyebrow {
    font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    color: var(--primary, #2B4EB4);
}
.cp-pay-cta-title { font-size: 1.25rem; font-weight: 800; color: var(--text, #1A2332); letter-spacing: -.02em; line-height: 1.15; }
.cp-pay-cta-text { font-size: .875rem; color: var(--text-muted, #6B7C93); line-height: 1.5; }
.cp-pay-cta-body .cp-btn-lg { margin-top: .9rem; }
.cp-pay-cta-body .cp-paymethods-icons { margin-top: 1rem; justify-content: center; }
.cp-pay-cta-body .cp-paymethods-note { text-align: center; margin-top: .2rem; }

/* ═══ Acceso discreto a transferencia (Facturas y Pagos) ════════════ */
.cp-transfer-mini {
    border: 1px solid var(--border-light, #EEF2F8); border-radius: var(--radius, 16px);
    background: var(--surface, #fff); box-shadow: var(--shadow-xs, 0 1px 2px rgba(26, 35, 50, .04));
    overflow: hidden;
}
.cp-transfer-mini-summary {
    display: flex; align-items: center; gap: .6rem; cursor: pointer; list-style: none;
    padding: .85rem 1.125rem; font-size: .875rem; color: var(--text-2, #3D4F66); font-weight: 600;
}
.cp-transfer-mini-summary::-webkit-details-marker { display: none; }
.cp-transfer-mini-summary:hover { background: var(--surface-2, #F8FAFD); }
.cp-transfer-mini-icon { font-size: 1.05rem; flex-shrink: 0; line-height: 1; }
.cp-transfer-mini-label { flex: 1; min-width: 0; }
.cp-transfer-mini-label strong { color: var(--primary, #2B4EB4); font-weight: 700; }
.cp-transfer-mini-chev { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-muted, #6B7C93); transition: transform .2s; }
.cp-transfer-mini[open] .cp-transfer-mini-chev { transform: rotate(180deg); }
.cp-transfer-mini-body { padding: 0 1.125rem 1.125rem; border-top: 1px solid var(--border-light, #EEF2F8); }
.cp-transfer-mini-body .cp-bank-fields { padding: .85rem 0 0; }
.cp-transfer-mini-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .85rem; }

/* ═══ Modo demo "Preparar pago" (confirmación legible 40–60+) ════════ */
.cp-btn-lg { padding: .95rem 1.75rem; font-size: 1.0625rem; border-radius: 12px; }
.cp-demo-overlay {
    position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
    padding: 1.25rem; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px);
    animation: cpDemoFade .15s ease-out;
}
@keyframes cpDemoFade { from { opacity: 0; } to { opacity: 1; } }
.cp-demo-card {
    width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
    background: var(--surface, #fff); border-radius: var(--radius, 16px);
    box-shadow: 0 20px 60px rgba(15, 23, 42, .35); padding: 2rem 1.75rem 1.75rem;
    text-align: center;
}
.cp-demo-icon {
    width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 800; color: #fff;
}
.cp-demo-icon-ok { background: var(--success, #10B981); }
.cp-demo-icon-err { background: var(--danger, #EF4444); }
.cp-demo-title { font-size: 1.5rem; font-weight: 800; color: var(--text, #1A2332); letter-spacing: -.02em; line-height: 1.2; }
.cp-demo-total-lbl {
    margin-top: 1rem; font-size: .8125rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-muted, #6B7C93);
}
.cp-demo-total { font-size: 2.5rem; font-weight: 800; color: var(--primary, #2B4EB4); letter-spacing: -.03em; line-height: 1.1; }
.cp-demo-inv-list { list-style: none; margin: 1.25rem 0 0; padding: 0; text-align: left; }
.cp-demo-inv {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .7rem .9rem; border: 1px solid var(--border-light, #EEF2F8); border-radius: var(--radius-sm, 10px);
    margin-bottom: .5rem; background: var(--surface-2, #F8FAFD);
}
.cp-demo-inv-name { font-size: .9375rem; color: var(--text, #1A2332); font-weight: 600; }
.cp-demo-inv-amt { font-size: .9375rem; color: var(--text, #1A2332); font-weight: 700; white-space: nowrap; }
.cp-demo-note {
    margin-top: 1.25rem; font-size: .9375rem; line-height: 1.5; color: var(--text-2, #3D4F66);
    background: var(--surface-2, #F8FAFD); border-radius: var(--radius-sm, 10px); padding: .9rem 1rem;
}
.cp-demo-actions { margin-top: 1.5rem; display: flex; justify-content: center; }
.cp-demo-actions .cp-btn { min-width: 200px; }
.cp-demo-ref { margin-top: 1rem; font-size: .75rem; color: var(--text-muted, #6B7C93); }

/* ═══ Mi Flota — Drawer, historial GPS (mapa) y reporte forense ══════ */
.cp-kpi-clickable { cursor: pointer; text-align: left; font: inherit; width: 100%; -webkit-appearance: none; appearance: none; position: relative; transition: transform .12s ease, box-shadow .15s ease; }
.cp-kpi-clickable:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15, 23, 42, .12); }
.cp-kpi-clickable:focus-visible { outline: 2px solid var(--cp-accent, #2563EB); outline-offset: 2px; }
.cp-kpi-cta { position: absolute; bottom: .9rem; right: 1.1rem; font-size: .72rem; font-weight: 700; color: var(--cp-accent, #2563EB); background: rgba(255,255,255,.85); padding: .1rem .35rem; border-radius: 6px; opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.cp-kpi-clickable:hover .cp-kpi-cta, .cp-kpi-clickable:focus-visible .cp-kpi-cta { opacity: 1; }

/* Drawer lateral */
.cp-drawer { position: fixed; inset: 0; z-index: 1200; }
.cp-drawer[hidden] { display: none; }
.cp-drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); opacity: 0; transition: opacity .25s ease; backdrop-filter: blur(2px); }
.cp-drawer.is-open .cp-drawer-backdrop { opacity: 1; }
.cp-drawer-panel { position: absolute; top: 0; right: 0; height: 100%; width: min(560px, 100%); background: var(--bg, #F0F4FA); box-shadow: -16px 0 48px rgba(15, 23, 42, .25); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s cubic-bezier(.22,.61,.36,1); }
.cp-drawer.is-open .cp-drawer-panel { transform: translateX(0); }
.cp-drawer-head { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-light, #EEF2F8); background: var(--surface, #fff); }
.cp-drawer-title { flex: 1; margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--text, #1A2332); letter-spacing: -.01em; }
.cp-drawer-back { border: none; background: var(--surface-2, #F8FAFD); color: var(--text-2, #3D4F66); font-weight: 700; font-size: .82rem; padding: .35rem .65rem; border-radius: 8px; cursor: pointer; }
.cp-drawer-back:hover { background: #EEF2F8; }
.cp-drawer-x { border: none; background: transparent; color: var(--text-muted, #6B7C93); font-size: 1.1rem; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
.cp-drawer-x:hover { background: var(--surface-2, #F8FAFD); color: var(--text, #1A2332); }
.cp-drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem 1.5rem; }
body.cp-drawer-lock { overflow: hidden; }

/* Lista de flota */
.cp-fleet-list { display: flex; flex-direction: column; gap: .5rem; }
.cp-fleet-row { display: flex; align-items: center; gap: .75rem; width: 100%; text-align: left; padding: .7rem .85rem; border: 1px solid var(--border-light, #EEF2F8); border-radius: 12px; background: var(--surface, #fff); cursor: pointer; font: inherit; transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease; }
.cp-fleet-row:hover { border-color: var(--cp-accent, #2563EB); box-shadow: 0 4px 14px rgba(37, 99, 235, .12); }
.cp-fleet-row:focus-visible { outline: 2px solid var(--cp-accent, #2563EB); outline-offset: 2px; }
.cp-fleet-row.is-disabled { opacity: .55; cursor: not-allowed; }
.cp-fleet-ic { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: #D1FAE5; color: #059669; }
.cp-fleet-ic svg { width: 18px; height: 18px; }
.cp-fleet-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-fleet-plate { font-weight: 700; color: var(--text, #1A2332); }
.cp-fleet-sub { font-size: .74rem; color: var(--text-muted, #6B7C93); }
.cp-fleet-go { font-size: 1.2rem; color: var(--text-muted, #6B7C93); flex-shrink: 0; }

/* Historial GPS */
.cp-hist-veh { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .85rem; }
.cp-hist-plate { font-size: 1.1rem; font-weight: 800; color: var(--text, #1A2332); }
.cp-hist-imei { font-size: .72rem; color: var(--text-muted, #6B7C93); }
.cp-hist-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .65rem; margin-bottom: .85rem; }
.cp-hist-field { display: flex; flex-direction: column; gap: .25rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted, #6B7C93); }
.cp-hist-field input { font: inherit; text-transform: none; letter-spacing: 0; padding: .5rem .6rem; border: 1px solid var(--border, #DDE4EF); border-radius: 9px; background: var(--surface, #fff); color: var(--text, #1A2332); }
.cp-hist-go { align-self: flex-end; }
.cp-hist-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.cp-hist-xls { font-size: .8rem; }
.cp-hist-xls:disabled { opacity: .5; cursor: not-allowed; }
.cp-dl { position: relative; }
.cp-dl-toggle { font-size: .8rem; }
.cp-dl-toggle:disabled { opacity: .5; cursor: not-allowed; }
.cp-dl-menu { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 20; min-width: 11rem; padding: .35rem; background: var(--surface, #fff); border: 1px solid var(--border, #DDE4EF); border-radius: 11px; box-shadow: 0 10px 28px rgba(16,24,40,.16); display: flex; flex-direction: column; gap: .15rem; }
.cp-dl-menu[hidden] { display: none; }
.cp-dl-item { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; width: 100%; padding: .5rem .65rem; font: inherit; font-size: .82rem; font-weight: 600; text-align: left; color: var(--text, #1A2332); background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.cp-dl-item span { font-size: .7rem; font-weight: 500; color: var(--text-muted, #6B7C93); }
.cp-dl-item:hover:not(:disabled), .cp-dl-item:focus-visible { background: var(--border-light, #EEF2F8); }
.cp-dl-item:disabled { opacity: .5; cursor: not-allowed; }
.cp-dl-item.cp-dl-rec { color: var(--brand, #2F6DF0); }
.cp-dl-item.cp-dl-rec span { color: var(--brand, #2F6DF0); font-weight: 700; }
.cp-dl-menu .cp-dl-rec { border-bottom: 1px solid var(--border-light, #EEF2F8); margin-bottom: .15rem; padding-bottom: .55rem; }
.cp-hist-status { min-height: 1.2rem; margin-bottom: .6rem; font-size: .8rem; }
.cp-hist-ok { color: var(--text-muted, #6B7C93); font-size: .76rem; }
.cp-map-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-light, #EEF2F8); }
.cp-map { width: 100%; height: 360px; background: #E8EEF5; }
.cp-map-legend { position: absolute; bottom: 8px; left: 8px; z-index: 500; display: flex; flex-direction: column; gap: 2px; background: rgba(255,255,255,.92); border-radius: 8px; padding: .4rem .55rem; font-size: .68rem; color: var(--text-2, #3D4F66); box-shadow: 0 2px 8px rgba(15,23,42,.12); }
.cp-map-legend span { display: flex; align-items: center; gap: .35rem; }
.cp-map-legend i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.cp-forensic-btn { width: 100%; margin-top: .95rem; justify-content: center; background: linear-gradient(120deg, #7C3AED, #2563EB); color: #fff; border: none; font-weight: 700; box-shadow: 0 8px 24px rgba(124, 58, 237, .28); }
.cp-forensic-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(124, 58, 237, .35); }
.cp-forensic-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.cp-forensic-spark { animation: cpSparkPulse 1.8s ease-in-out infinite; }
@keyframes cpSparkPulse { 0%,100% { opacity: .6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); } }

/* Modal forense */
.cp-fr-modal { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.cp-fr-modal[hidden] { display: none; }
.cp-fr-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .6); opacity: 0; transition: opacity .2s ease; backdrop-filter: blur(3px); }
.cp-fr-modal.is-open .cp-fr-backdrop { opacity: 1; }
.cp-fr-card { position: relative; width: 100%; max-width: 620px; max-height: 88vh; overflow-y: auto; background: var(--surface, #fff); border-radius: 18px; box-shadow: 0 24px 70px rgba(15, 23, 42, .4); transform: translateY(14px) scale(.98); opacity: 0; transition: transform .26s cubic-bezier(.22,.61,.36,1), opacity .26s ease; }
.cp-fr-modal.is-open .cp-fr-card { transform: translateY(0) scale(1); opacity: 1; }
.cp-fr-head { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--border-light, #EEF2F8); position: sticky; top: 0; background: var(--surface, #fff); border-radius: 18px 18px 0 0; }
.cp-fr-head h2 { flex: 1; margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--text, #1A2332); }
.cp-fr-x { border: none; background: transparent; color: var(--text-muted, #6B7C93); font-size: 1.1rem; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
.cp-fr-x:hover { background: var(--surface-2, #F8FAFD); }
.cp-fr-body { padding: 1.25rem 1.35rem 1.5rem; }
.cp-fr-map-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-light, #EEF2F8); margin-bottom: 1rem; }
.cp-fr-map { width: 100%; height: 260px; background: #E8EEF5; }
.cp-fr-route { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1.1rem; }
.cp-fr-route-i { background: var(--surface-2, #F8FAFD); border: 1px solid var(--border-light, #EEF2F8); border-radius: 10px; padding: .5rem .55rem; display: flex; flex-direction: column; gap: .15rem; }
.cp-fr-route-k { font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted, #6B7C93); }
.cp-fr-route-v { font-size: .92rem; font-weight: 700; color: var(--primary-dark, #1A3278); }
.cp-fr-foot { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--border-light, #EEF2F8); display: flex; justify-content: flex-end; }
.cp-fr-dl { font-size: .85rem; }
.cp-fr-dl:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 520px) { .cp-fr-route { grid-template-columns: repeat(2, 1fr); } .cp-fr-map { height: 220px; } }
.cp-fr-verdict { border-radius: 14px; padding: 1.1rem 1.2rem; margin-bottom: 1.1rem; border: 1px solid transparent; animation: cpFrRise .3s ease both; }
.cp-fr-sev { display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .2rem .55rem; border-radius: 999px; margin-bottom: .55rem; background: rgba(255,255,255,.6); }
.cp-fr-vtitle { margin: 0 0 .4rem; font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.cp-fr-vbody { margin: 0; font-size: .9rem; line-height: 1.5; }
.cp-fr-ok { background: var(--success-bg, #ECFDF5); border-color: #A7F3D0; color: var(--success-text, #047857); }
.cp-fr-warn { background: var(--warning-bg, #FFFBEB); border-color: #FDE68A; color: var(--warning-text, #B45309); }
.cp-fr-danger { background: var(--danger-bg, #FEF2F2); border-color: #FECACA; color: var(--danger-text, #DC2626); }
.cp-fr-na { background: var(--surface-2, #F8FAFD); border-color: var(--border-light, #EEF2F8); color: var(--text, #1A2332); }
.cp-fr-sec { margin-top: 1.1rem; animation: cpFrRise .35s ease both; }
.cp-fr-sec-t { display: flex; align-items: center; gap: .45rem; margin: 0 0 .55rem; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted, #6B7C93); }
.cp-fr-sec-t svg { width: 16px; height: 16px; }
.cp-fr-text { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--text, #1A2332); }
.cp-fr-ul { margin: 0; padding-left: 1.1rem; font-size: .88rem; line-height: 1.5; color: var(--text, #1A2332); }
.cp-fr-na-state { display: flex; align-items: center; gap: .55rem; padding: .75rem .85rem; border-radius: 10px; background: var(--surface-2, #F8FAFD); border: 1px dashed var(--border, #DDE4EF); color: var(--text-muted, #6B7C93); font-size: .82rem; }
.cp-fr-na-state svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .7; }
.cp-fr-kvs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.cp-fr-kv { display: flex; flex-direction: column; gap: .1rem; background: var(--surface-2, #F8FAFD); border: 1px solid var(--border-light, #EEF2F8); border-radius: 10px; padding: .55rem .7rem; }
.cp-fr-k { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted, #6B7C93); }
.cp-fr-v { font-size: .92rem; font-weight: 700; color: var(--text, #1A2332); }
@keyframes cpFrRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 560px) { .cp-fr-kvs { grid-template-columns: 1fr; } .cp-map { height: 300px; } }

/* ── Corte de servicio: Mi Flota suspendida ──────────────────────────── */
.cp-suspended {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: .85rem; padding: 2.5rem 1.5rem;
    border: 1px solid color-mix(in srgb, #DC2626 22%, var(--border-light, #EEF2F8));
    background:
        radial-gradient(120% 120% at 50% -10%, color-mix(in srgb, #DC2626 8%, transparent), transparent 60%),
        var(--surface, #fff);
}
.cp-suspended-compact { padding: 1.75rem 1.25rem; }
.cp-suspended-badge {
    width: 64px; height: 64px; border-radius: 50%;
    display: grid; place-items: center;
    color: #DC2626; background: color-mix(in srgb, #DC2626 12%, transparent);
}
.cp-suspended-compact .cp-suspended-badge { width: 52px; height: 52px; }
.cp-suspended-badge svg { width: 30px; height: 30px; }
.cp-suspended-title { margin: 0; font-size: 1.3rem; font-weight: 800; color: var(--text, #1A2332); letter-spacing: -.01em; }
.cp-suspended-compact .cp-suspended-title { font-size: 1.1rem; }
.cp-suspended-text { margin: 0; max-width: 44ch; color: var(--text, #1A2332); line-height: 1.5; }
.cp-suspended-text-muted { color: var(--text-muted, #6B7C93); font-size: .92rem; }
.cp-suspended-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: .35rem; }
.cp-suspended-help { margin: .4rem 0 0; font-size: .85rem; color: var(--text-muted, #6B7C93); }
.cp-suspended-help a { color: var(--cp-accent, var(--primary, #2B4EB4)); font-weight: 600; }
