/* ============================================================================
   Contafácil — Brand tokens (Manual de Marca, Dic 2022)
   Celeste #1683F0 · Azul #202E5F · Negro #1D1D1B · Tipografía Gantari
   Cargado al final del <head> para ganar a Bootstrap/MDB sin romper nada.
   ============================================================================ */

:root {
    /* Marca */
    --cf-primary:       #1683F0;  /* celeste — CTA, activo, badges, foco */
    --cf-primary-700:   #0F62C0;  /* celeste oscuro — hover y texto-link sobre blanco (AA) */
    --cf-secondary:     #202E5F;  /* azul — headers de tabla, énfasis */
    --cf-ink:           #1D1D1B;  /* texto principal */
    --cf-muted:         #6B7280;  /* texto secundario */
    --cf-bg:            #F5F7FA;  /* fondo página */
    --cf-surface:       #FFFFFF;
    --cf-border:        #E4E8EF;
    --cf-primary-soft:  #EAF3FE;  /* tinte celeste claro — hover de fila */

    /* Semánticos */
    --cf-success:       #16A34A;
    --cf-warning:       #D97706;
    --cf-danger:        #DC2626;

    /* Forma */
    --cf-radius:        10px;
    --cf-radius-sm:     6px;
    --cf-shadow:        0 1px 3px rgba(32, 46, 95, .08);
    --cf-shadow-md:     0 4px 16px rgba(32, 46, 95, .10);
}

/* ── Tipografía de marca ──────────────────────────────────────────────────── */
body,
h1, h2, h3, h4, h5, h6,
.btn, .form-control, .dropdown-item, .nav-link,
input, select, textarea, button, table, .badge {
    font-family: 'Gantari', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}
body { color: var(--cf-ink); }

/* ── Botón primario = celeste ─────────────────────────────────────────────── */
.btn-primary,
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--cf-primary) !important;
    border-color: var(--cf-primary) !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--cf-primary-700) !important;
    border-color: var(--cf-primary-700) !important;
    box-shadow: 0 0 0 .2rem rgba(22, 131, 240, .35) !important;
}
.btn-outline-primary {
    color: var(--cf-primary-700) !important;
    border-color: var(--cf-primary) !important;
    background-color: transparent !important;
}

/* ── Botón secundario outline = gris pizarra de marca (no el violeta de MDB) ── */
.btn-outline-secondary {
    color: var(--cf-secondary) !important;
    border-color: var(--cf-border) !important;
    background-color: transparent !important;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    color: #fff !important;
    background-color: var(--cf-secondary) !important;
    border-color: var(--cf-secondary) !important;
    box-shadow: none !important;
}

/* ── Utilidades "primary" de Bootstrap → marca ─────────────────────────────── */
.text-primary   { color: var(--cf-primary-700) !important; }
.bg-primary     { background-color: var(--cf-primary) !important; }
.badge-primary  { background-color: var(--cf-primary) !important; color: #fff !important; }

/* ── Links de marca (celeste-700 para pasar contraste AA) ──────────────────── */
a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link) {
    color: var(--cf-primary-700);
}
a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):hover {
    color: var(--cf-secondary);
}

/* ── Foco accesible visible ───────────────────────────────────────────────── */
.form-control:focus {
    border-color: var(--cf-primary) !important;
    box-shadow: 0 0 0 .2rem rgba(22, 131, 240, .25) !important;
}

/* ── Fix: Bootstrap pone height explícito en form-control, lo que impide que
       el flex stretch del input-group funcione cuando input-group-text es más
       alto (p.ej. con la fuente Gantari). Forzar height:auto deja que el
       align-items:stretch del padre iguale las alturas. ────────────────────── */
.input-group > .form-control,
.input-group > .custom-select {
    height: auto;
}

/* ── Utilidades ───────────────────────────────────────────────────────────── */
.cf-container {
    width: 90%;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 1024px) {
    .cf-container { width: 96%; max-width: 96%; }
}

.cf-text-secondary { color: var(--cf-secondary) !important; }
.cf-text-muted     { color: var(--cf-muted) !important; }
.cf-tabular        { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* Card de marca */
.cf-card {
    background: var(--cf-surface);
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius);
    box-shadow: var(--cf-shadow);
}

/* Header de modal de marca (azul). Aplicar la clase .cf-modal-header al .modal-header */
.cf-modal-header {
    background: var(--cf-secondary);
    color: #fff;
    border-bottom: none;
}
.cf-modal-header .modal-title { color: #fff; font-weight: 600; }
.cf-modal-header .close {
    color: #fff;
    opacity: .85;
    text-shadow: none;
}
.cf-modal-header .close:hover { color: #fff; opacity: 1; }

/* ── Dropzone de marca dentro de modales ──────────────────────────────────── */
.cf-modal-dz {
    border: 1.5px dashed var(--cf-border) !important;
    border-radius: var(--cf-radius-sm);
    color: var(--cf-muted);
    transition: background .15s, border-color .15s;
}
.cf-modal-dz:hover,
.cf-modal-dz.dz-over {
    background: var(--cf-primary-soft);
    border-color: var(--cf-primary) !important;
}

/* ── Tooltips alineados a la izquierda (texto multilínea legible) ──────────── */
.tooltip-inner {
    text-align: left;
}

/* ════════════════════════════════════════════════════════════════════════════
   Modal "Configuración de comprobante" (Debe / Haber)
   Scope: .cf-dh-modal  ·  paneles de columnas + toolbar de marca
   ════════════════════════════════════════════════════════════════════════════ */
/* Eleva visualmente el modal DH por encima del modal padre */
.cf-dh-modal .modal-dialog {
    margin-top: 80px;
    margin-bottom: 30px;
}
.cf-dh-modal .modal-content {
    border: none;
    border-radius: var(--cf-radius);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 10px 30px rgba(32, 46, 95, 0.30);
}
.cf-dh-modal .modal-header.cf-modal-header {
    padding: 13px 20px;
    align-items: flex-start;
    border-left: 4px solid var(--cf-primary);
}
.cf-modal-titlewrap { min-width: 0; }
.cf-modal-eyebrow {
    font-size: 11px; font-weight: 600; letter-spacing: .04em;
    text-transform: uppercase; opacity: .8; margin-bottom: 1px;
}
.cf-modal-eyebrow .fas { margin-right: 5px; }
.cf-dh-modal .modal-title { font-size: 17px !important; line-height: 1.25; font-weight: 600; }
.cf-dh-modal .modal-body { background: var(--cf-bg); padding: 18px 20px; }
.cf-dh-modal .modal-footer { background: var(--cf-surface); border-top: 1px solid var(--cf-border); }

/* ── Toolbar superior: nombre abreviado + ayuda ───────────────────────────── */
.cf-dh-toolbar {
    display: flex; flex-wrap: wrap; gap: 14px;
    align-items: stretch; margin-bottom: 16px;
}
.cf-dh-abrev {
    flex: 0 1 360px;
    background: var(--cf-surface);
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius-sm);
    padding: 11px 14px;
}
.cf-field-label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--cf-secondary); margin-bottom: 5px;
}
.cf-req { color: var(--cf-danger); }
.cf-dh-abrev .form-control { max-width: 220px; }
.cf-field-help { display: block; color: var(--cf-muted); font-size: 11.5px; margin-top: 6px; line-height: 1.4; }
.cf-dh-hint {
    flex: 1 1 280px;
    display: flex; gap: 9px; align-items: flex-start;
    background: var(--cf-primary-soft);
    border: 1px solid #cfe3fb;
    color: var(--cf-secondary);
    border-radius: var(--cf-radius-sm);
    padding: 11px 14px; font-size: 12.5px; line-height: 1.45;
}
.cf-dh-hint .fas { color: var(--cf-primary); margin-top: 2px; font-size: 14px; flex: 0 0 auto; }

/* ── Columnas como paneles ─────────────────────────────────────────────────── */
.cf-dh-cols { margin-left: -7px; margin-right: -7px; }
.cf-dh-cols > [class^="col-"] { padding-left: 7px; padding-right: 7px; }
.cf-dh-col {
    background: var(--cf-surface);
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius-sm);
    box-shadow: var(--cf-shadow);
    display: flex; flex-direction: column;
    height: 100%; overflow: hidden;
}
.cf-dh-col-debe  { border-top: 3px solid var(--cf-primary); }
.cf-dh-col-haber { border-top: 3px solid var(--cf-secondary); }
.cf-dh-col-pool  { border-top: 3px solid var(--cf-border); }
.cf-dh-col-head {
    padding: 9px 13px;
    border-bottom: 1px solid var(--cf-border);
}
.cf-dh-col-debe  .cf-dh-col-head { background: var(--cf-primary-soft); }
.cf-dh-col-haber .cf-dh-col-head { background: #eef1f8; }
.cf-dh-col-pool  .cf-dh-col-head { background: #f2f4f8; }
.cf-dh-col-title {
    font-size: 13.5px; font-weight: 700; color: var(--cf-secondary);
    display: inline-flex; align-items: center; gap: 6px;
}
.cf-dh-col-title .fas { font-size: 12px; color: var(--cf-primary); }
.cf-dh-col-haber .cf-dh-col-title .fas { color: var(--cf-secondary); }
.cf-dh-col-subhead {
    padding: 6px 13px; font-size: 10.5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .03em; color: var(--cf-muted);
    border-bottom: 1px solid var(--cf-border); background: #fbfcfe;
}
.cf-dh-col .div_table_cols_no,
.cf-dh-col .div_table_cols_debe_haber {
    flex: 1 1 auto;
    padding: 2px 6px 8px;
    height: auto; max-height: 340px;
    overflow-y: auto; overflow-x: hidden;
}

/* Filas dentro de los paneles */
.cf-dh-modal .table_debe,
.cf-dh-modal .table_haber,
.cf-dh-modal .table_cols_no { margin-bottom: 0; }
.cf-dh-modal .table_debe tbody tr,
.cf-dh-modal .table_haber tbody tr,
.cf-dh-modal .table_cols_no tbody tr {
    border-bottom: 1px solid #eef1f6;
}
.cf-dh-modal .table_debe tbody tr:last-child td,
.cf-dh-modal .table_haber tbody tr:last-child td,
.cf-dh-modal .table_cols_no tbody tr:last-child td { border-bottom: 0; }
.cf-dh-modal .table_debe td,
.cf-dh-modal .table_haber td,
.cf-dh-modal .table_cols_no td { vertical-align: middle; }
.cf-dh-modal .table_debe_haber_val,
.cf-dh-modal .not_use_val {
    font-size: 12.5px; color: var(--cf-ink);
    vertical-align: middle;
}
/* Nombre de columna (línea principal) */
.cf-col-name {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--cf-ink);
    line-height: 1.3;
}
/* Texto de ejemplo inline — idéntico al de los dropdowns del panel */
.cf-col-sample {
    display: block;
    font-size: 10.5px;
    color: var(--cf-muted);
    line-height: 1.3;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
    font-variant-numeric: tabular-nums;
}
.cf-dh-modal .table_debe_haber_cuenta { text-align: right; }

/* Flechas para mover columnas */
.cf-dh-modal .column_move_left,
.cf-dh-modal .column_move_right { color: var(--cf-primary); font-size: 16px; line-height: 1; }
.cf-dh-modal .column_move_left:hover,
.cf-dh-modal .column_move_right:hover { color: var(--cf-primary-700); }
.cf-dh-modal .table_debe_haber_remove { color: var(--cf-danger); }
.cf-dh-modal .table_debe_haber_remove:hover { color: #a91b1b; }

/* Scrollbars sutiles (los globales se ocultan; acá los mostramos finos) */
.cf-dh-modal .div_table_cols_no,
.cf-dh-modal .div_table_cols_debe_haber { scrollbar-width: thin; scrollbar-color: #c2cbdb transparent; }
.cf-dh-modal .div_table_cols_no::-webkit-scrollbar,
.cf-dh-modal .div_table_cols_debe_haber::-webkit-scrollbar { display: block; width: 8px; }
.cf-dh-modal .div_table_cols_no::-webkit-scrollbar-thumb,
.cf-dh-modal .div_table_cols_debe_haber::-webkit-scrollbar-thumb {
    background: #c2cbdb; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box;
}
.cf-dh-modal .div_table_cols_no::-webkit-scrollbar-thumb:hover,
.cf-dh-modal .div_table_cols_debe_haber::-webkit-scrollbar-thumb:hover { background: #9aa6bf; background-clip: padding-box; }

/* Apilado vertical en pantallas chicas */
@media (max-width: 991.98px) {
    .cf-dh-cols > [class^="col-"] { flex: 0 0 100%; max-width: 100%; margin-bottom: 12px; }
    .cf-dh-col .div_table_cols_no,
    .cf-dh-col .div_table_cols_debe_haber { max-height: 240px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Panel de configuración de procesador (proc_config_panel.hbs)
   Cards con acento de marca consistente con el modal DH
   ════════════════════════════════════════════════════════════════════════════ */
.cf-panel-card { border-top: 3px solid var(--cf-secondary) !important; }
.cf-panel-card-header {
    display: flex; align-items: center; gap: 10px;
    background: var(--cf-surface);
    border-bottom: 1px solid var(--cf-border);
    padding: 9px 16px;
    font-size: 13px !important; font-weight: 600 !important;
    color: var(--cf-secondary) !important;
    text-transform: none !important;
}
.cf-panel-step {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; flex: 0 0 22px;
    background: var(--cf-secondary); color: #fff;
    font-size: 11px; font-weight: 700;
    border-radius: 50%;
}

/* Texto de ejemplo debajo del selector de columna */
.pc-col-sample-text {
    display: block;
    font-size: 11px;
    color: var(--cf-muted);
    min-height: 1.2em;
    margin-top: 3px;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ════════════════════════════════════════════════════════════════════════════
   Página Cotizaciones  ·  /tablero/cotizaciones
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Tira de descargas rápidas Conti ─────────────────────────────────────── */
.cf-cot-quick-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--cf-surface);
    border: 1px solid var(--cf-border);
    border-left: 4px solid var(--cf-secondary);
    border-radius: var(--cf-radius-sm);
    padding: 9px 16px;
}
.cf-cot-quick-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--cf-secondary); flex: 0 0 auto;
}
.cf-cot-quick-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.cf-cot-quick-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: #fff; border: 1px solid var(--cf-border);
    border-radius: 6px; padding: 4px 10px;
    font-size: 12px; color: var(--cf-ink);
    cursor: pointer; transition: background .12s, border-color .12s, color .12s;
}
.cf-cot-quick-chip:hover {
    background: var(--cf-primary-soft);
    border-color: var(--cf-primary);
    color: var(--cf-primary);
}
.cf-cot-quick-chip:hover .cf-cot-quick-mes { color: var(--cf-primary); opacity: .7; }
.cf-cot-quick-moneda { font-weight: 700; font-size: 12px; }
.cf-cot-quick-mes    { color: var(--cf-muted); font-size: 11px; }
.cf-cot-quick-icon   { font-size: 10px; color: var(--cf-primary); opacity: .8; }
.cf-cot-quick-vermas {
    font-size: 11.5px; color: var(--cf-primary); font-weight: 600;
    white-space: nowrap; flex: 0 0 auto; text-decoration: none;
}
.cf-cot-quick-vermas:hover { color: var(--cf-primary-700); text-decoration: underline; }

/* ── Barra de últimas cotizaciones ──────────────────────────────────────── */
.cf-cot-rates-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: var(--cf-surface);
    border: 1px solid var(--cf-border);
    border-left: 4px solid var(--cf-primary);
    border-radius: var(--cf-radius-sm);
    padding: 10px 16px;
}
.cf-cot-rates-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--cf-secondary); flex: 0 0 auto;
}
.cf-cot-rates-pills { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }
.cf-cot-rate-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--cf-primary-soft); border: 1px solid #cfe3fb;
    color: var(--cf-secondary); border-radius: 20px;
    padding: 3px 11px; font-size: 12.5px; font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.cf-cot-rate-date {
    font-size: 10.5px; font-weight: 400; color: var(--cf-muted); margin-left: 2px;
}
.cf-cot-rates-source {
    font-size: 10.5px; color: var(--cf-muted); flex: 0 0 auto; margin-left: auto;
}

/* ── Tabla de resultados ─────────────────────────────────────────────────── */
.cf-cot-table thead th {
    background: var(--cf-secondary); color: #fff;
    font-size: 11.5px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .03em; border: none; padding: 8px 12px;
}
.cf-cot-table tbody tr:hover { background: var(--cf-primary-soft); }
.cf-cot-date { font-size: 12.5px; }
.cf-cot-currency-badge {
    display: inline-block; background: var(--cf-secondary); color: #fff;
    border-radius: 4px; font-size: 11px; font-weight: 700;
    padding: 1px 7px; font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}
.cf-cot-rate-val {
    font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px;
    color: var(--cf-ink);
}

/* ── Botones de exportar CSV/Excel ───────────────────────────────────────── */
.cf-cot-export-btn { font-size: 13px; white-space: nowrap; }

/* ── Sección Conti: título de sub-panel ──────────────────────────────────── */
.cf-cot-sub-title {
    font-size: 13.5px; font-weight: 700; color: var(--cf-secondary);
    display: flex; align-items: center; gap: 7px;
    padding-bottom: 9px; border-bottom: 2px solid var(--cf-border);
    margin-bottom: 14px;
}
.cf-cot-sub-title .fas { color: var(--cf-primary); font-size: 14px; }

/* Separador entre los dos sub-paneles (izq/der) en pantalla grande */
.cf-cot-conti-left { padding-right: 28px; }
.cf-cot-conti-right { padding-left: 28px; border-left: 1px solid var(--cf-border); }
@media (max-width: 767.98px) {
    .cf-cot-conti-left { padding-right: 15px; border-right: none; }
    .cf-cot-conti-right { padding-left: 15px; border-left: none; border-top: 1px solid var(--cf-border); padding-top: 20px; }
}

/* Preview nombre .DAT */
.cf-cot-dat-preview {
    background: var(--cf-primary-soft); border: 1px solid #cfe3fb;
    color: var(--cf-secondary); font-size: 12px; border-radius: var(--cf-radius-sm);
    padding: 7px 12px;
}

/* ── Tabs de años (archivos guardados) ───────────────────────────────────── */
.cf-cot-year-tabs { border-bottom: 2px solid var(--cf-border); flex-wrap: wrap; gap: 2px; }
.cf-cot-year-tabs .nav-link {
    font-size: 12px; font-weight: 600; color: var(--cf-muted);
    padding: 5px 14px; border: 1px solid transparent; border-radius: var(--cf-radius-sm) var(--cf-radius-sm) 0 0;
    line-height: 1.5;
}
.cf-cot-year-tabs .nav-link:hover { color: var(--cf-secondary); background: var(--cf-primary-soft); }
.cf-cot-year-tabs .nav-link.active {
    color: var(--cf-primary); background: var(--cf-surface);
    border-color: var(--cf-border) var(--cf-border) var(--cf-surface);
    margin-bottom: -2px;
}

/* Wrap del contenido de tabs */
.cf-cot-templates-wrap {
    border: 1px solid var(--cf-border); border-top: none;
    border-radius: 0 0 var(--cf-radius-sm) var(--cf-radius-sm);
}
.cf-cot-templates-scroll { max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.cf-cot-templates-scroll::-webkit-scrollbar { width: 6px; }
.cf-cot-templates-scroll::-webkit-scrollbar-thumb { background: #c2cbdb; border-radius: 6px; }

/* Tabla de templates */
.cf-cot-tmpl-table thead th {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .03em; color: var(--cf-muted);
    background: #f8f9fb; border-bottom: 1px solid var(--cf-border);
    padding: 6px 10px;
}
.cf-cot-tmpl-table tbody td { font-size: 12.5px; padding: 5px 10px; vertical-align: middle; }
.cf-cot-tmpl-table tbody tr:hover { background: var(--cf-primary-soft); }

/* Hint en el card-header */
.cf-panel-card-header-hint { font-weight: 400; font-size: 11px; color: var(--cf-muted); }

/* ============================================================================
   Bot DGI page  (cf-bot-*)
   ============================================================================ */

/* ── Tabs principales del bot ─────────────────────────────────────────────── */
.cf-bot-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--cf-border); }
.cf-bot-tab-link {
    display: inline-block; background: none; border: none; cursor: pointer;
    font-size: 13px; font-weight: 600; color: var(--cf-muted);
    padding: 10px 16px 8px; border-bottom: 2px solid transparent;
    margin-bottom: -2px; text-decoration: none;
    transition: color .15s, border-color .15s;
}
.cf-bot-tab-link:hover { color: var(--cf-secondary); text-decoration: none; }
.cf-bot-tab-link.active { color: var(--cf-primary); border-bottom-color: var(--cf-primary); }

/* ── Tabla de runs ───────────────────────────────────────────────────────── */
.cf-bot-run-table thead th {
    background: var(--cf-secondary); color: #fff;
    font-size: 11.5px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .03em; border: none; padding: 8px 12px;
}
.cf-bot-run-table tbody tr:hover { background: var(--cf-primary-soft); }
.cf-bot-prog-track { height: 5px; border-radius: 3px; background: var(--cf-border); overflow: hidden; min-width: 80px; }
.cf-bot-prog-bar   { height: 100%; border-radius: 3px; transition: width .4s ease, background .3s ease; }

/* ── Modales de log — dark theme intencional (look terminal) ─────────────── */
.cf-bot-modal-dark .modal-content { background: #161b22; border: 1px solid #30363d; border-radius: var(--cf-radius); color: #e6edf3; }
.cf-bot-modal-dark .modal-body    { background: #0d1117; padding: 14px 16px; }
.cf-bot-modal-dark .modal-footer  { border-top: 1px solid #21262d; background: #161b22; padding: 10px 20px; }

/* ── Info bar en modales ─────────────────────────────────────────────────── */
.cf-bot-info-bar {
    background: #161b22; border: 1px solid #21262d;
    border-radius: var(--cf-radius-sm); padding: 10px 14px; margin-bottom: 10px;
}
.cf-bot-empresa-chip {
    background: #21262d; color: #8b949e; border-radius: 4px;
    padding: 1px 7px; font-size: 11.5px; font-family: monospace;
}
.cf-bot-log-prog-track { width: 100%; height: 3px; background: #21262d; border-radius: 2px; margin-top: 8px; overflow: hidden; }
.cf-bot-log-prog-bar   { height: 100%; border-radius: 2px; transition: width .4s ease, background .3s ease; background: #238636; }
.cf-bot-current-task   { font-size: 11px; color: #6e7681; margin-top: 4px; font-family: monospace; min-height: 16px; }

/* ── Tabs dentro del modal ───────────────────────────────────────────────── */
.cf-bot-log-tabs { border-bottom: 1px solid #21262d; margin-bottom: 12px; display: flex; gap: 4px; }
.cf-bot-log-tab {
    background: none; border: none; cursor: pointer;
    color: #6e7681; font-size: 12.5px; font-weight: 500;
    padding: 6px 14px 8px; border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
    font-family: 'Gantari', sans-serif;
}
.cf-bot-log-tab.active { color: #e6edf3; border-bottom-color: #1f6feb; }

/* ── Terminal ────────────────────────────────────────────────────────────── */
.cf-bot-terminal {
    background: #0d1117; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12.5px; line-height: 1.65; padding: 14px 16px;
    border-radius: var(--cf-radius-sm); height: 400px; overflow-y: auto;
    white-space: pre-wrap; word-break: break-all; border: 1px solid #21262d;
}
.cf-bot-log-line { display: flex; align-items: baseline; gap: 8px; }
.cf-bot-log-t    { color: #3d444d; font-size: 10.5px; flex-shrink: 0; user-select: none; }
.cf-bot-log-info { color: #8b949e; }
.cf-bot-log-ok   { color: #3fb950; font-weight: 600; }
.cf-bot-log-warn { color: #d29922; }
.cf-bot-log-err  { color: #f85149; font-weight: 600; }

/* ── Resumen tab ─────────────────────────────────────────────────────────── */
.cf-bot-resumen  { height: 400px; overflow-y: auto; padding: 4px 2px; }
.cf-bot-res-row  { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; }
.cf-bot-res-time { width: 62px; font-size: 10.5px; color: #3d444d; font-family: monospace; flex-shrink: 0; text-align: right; }
.cf-bot-res-label { font-size: 12.5px; white-space: nowrap; }
.cf-bot-res-val  { font-size: 13px; flex-shrink: 0; }
.cf-bot-res-emp  { font-size: 13px; font-weight: 600; color: #c9d1d9; margin-top: 8px; }
.cf-bot-res-file { padding-left: 20px; color: #8b949e; }
.cf-bot-res-links { margin-top: 16px; padding: 12px 14px; background: #161b22; border: 1px solid #21262d; border-radius: var(--cf-radius-sm); }

/* Respetar preferencia de movimiento reducido (a11y) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}
