﻿/*
 * sff-theme.css — Identidad visual de SuFacturaFacil sobre el tema SmartAdmin (variante A: azul continuo).
 * Misma línea del login: azul #0E3D52, verde #94BE15.
 * Se carga en _Layout.cshtml DESPUÉS de smartadmin-production.min.css para ganar sobre el tema.
 * Todas las reglas se limitan a páginas con sesión: html:not(#extr-page) (el login usa id "extr-page").
 * Para revertir: quitar el <link> de este archivo en _Layout.cshtml.
 */

/* ---------- Encabezado ---------- */
html:not(#extr-page) #header {
    background: #0E3D52 !important;
    border-bottom: 0;
}

/* Logo en placa blanca */
html:not(#extr-page) #header #logo img {
    width: 110px !important;
    height: auto;
    padding: 4px 10px;
    background: #fff;
    border-radius: 8px;
}

/* Celular: el tema fija #logo-group en 360px !important (320-479 px) y centra el logo en ese ancho;
   a 320 px la página se desplazaba de lado y el logo tapaba los botones. Logo a la izquierda, botones a la derecha */
@media (max-width: 479px) {
    html:not(#extr-page) #header #logo-group {
        width: auto !important;
    }

    html:not(#extr-page) #header #logo.logo-margin {
        width: auto !important;
        text-align: left !important;
        margin-left: 10px !important;
    }

    /* El tema sube los botones (micrófono, salir, menú) con margin-top: -45px porque, con el logo a 360 px,
       caían a una segunda línea. Ahora caben junto al logo: sin ese margen quedarían fuera del encabezado */
    html:not(#extr-page) #header .pull-right2 {
        margin-top: 0 !important;
    }
}

/* Botones: pantalla completa, cerrar sesión, micrófono móvil y contraer menú */
html:not(#extr-page) #header .btn-header > :first-child > a {
    background: rgba(255, 255, 255, .08) !important;
    background-image: none !important;
    border: 1px solid rgba(255, 255, 255, .45) !important;
    border-radius: 6px;
    color: #fff !important;
}

    html:not(#extr-page) #header .btn-header > :first-child > a:hover,
    html:not(#extr-page) #header .btn-header > :first-child > a:focus {
        background: rgba(255, 255, 255, .2) !important;
        border-color: #94BE15 !important;
        box-shadow: none;
    }

html:not(#extr-page) #header .btn-header a i {
    color: #fff !important;
}

/* Caja de búsqueda */
html:not(#extr-page) #header #search-form .form-control {
    border-color: transparent;
    border-radius: 6px;
}

/* ---------- Menú lateral ---------- */
html:not(#extr-page) aside,
html:not(#extr-page) #left-panel {
    background: #0B3242 !important;
    background-image: none !important;
}

/* Usuario */
html:not(#extr-page) .login-info {
    border-bottom: 1px solid #1D4A5C;
}

    html:not(#extr-page) .login-info > span {
        border-bottom: 1px solid #082836;
    }

    html:not(#extr-page) .login-info a {
        color: #D6E2E7;
    }

        html:not(#extr-page) .login-info a:hover {
            color: #fff;
        }

    html:not(#extr-page) .login-info img.online {
        border-left-color: #94BE15 !important;
    }

/* Opciones */
html:not(#extr-page) nav ul li a,
html:not(#extr-page) nav ul li a:focus {
    color: #C9D8DF;
}

    html:not(#extr-page) nav ul li a:hover {
        color: #fff;
        background-color: rgba(255, 255, 255, .06);
    }

    html:not(#extr-page) nav ul li a:active {
        background: #15475C !important;
    }

/* Opción activa: fondo azul claro + barra verde */
html:not(#extr-page) nav > ul > li.active > a {
    background-color: #15475C;
    box-shadow: inset 4px 0 0 #94BE15;
}

html:not(#extr-page) nav ul li.active > a:before {
    color: #F5F7F8;
}

/* Submenús */
html:not(#extr-page) nav ul ul {
    background: #082836;
}

    html:not(#extr-page) nav ul ul ul {
        background: 0 0;
    }

    html:not(#extr-page) nav ul ul li > a:hover {
        background-color: rgba(255, 255, 255, .08);
        color: #fff;
    }

    html:not(#extr-page) nav ul ul ul li a {
        color: #A9BFC9;
    }

html:not(#extr-page) nav > ul > li > ul::before,
html:not(#extr-page) nav > ul ul li::before {
    border-color: #2F5F72;
}

/* Títulos de grupo del menú (Facturación, Catálogos, ...) */
html:not(#extr-page) nav > ul > li.sff-menu-grupo {
    padding: 14px 12px 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: normal;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #7FA3B3;
}

html:not(#extr-page) .minified nav > ul > li.sff-menu-grupo {
    display: none;
}

/* "Cambiar clave" junto al usuario (el tema fija .login-info en 100px; se deja crecer para que el enlace no quede tapado) */
html:not(#extr-page) .login-info {
    height: auto;
    padding-bottom: 8px;
}

html:not(#extr-page) .minified .login-info {
    height: 38px;
    padding-bottom: 0;
}

html:not(#extr-page) .login-info a.sff-cambiar-clave {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #94BE15;
}

    html:not(#extr-page) .login-info a.sff-cambiar-clave:hover,
    html:not(#extr-page) .login-info a.sff-cambiar-clave:focus {
        color: #fff;
    }

html:not(#extr-page) .minified .login-info a.sff-cambiar-clave {
    display: none;
}

/* Novedades del menú: punto verde al final del texto con tooltip "Nueva funcionalidad" (se arma en _Aside.cshtml).
   El punto no tiene texto, así que no se cuela en el título de la página ni en la barra de ruta. */
html:not(#extr-page) #left-panel .sff-punto-nuevo {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 3px;
    border-radius: 50%;
    background: #94BE15;
    box-shadow: 0 0 0 3px rgba(148, 190, 21, .25);
    vertical-align: 1px;
    cursor: help;
}

.tooltip.sff-tip-nuevo.in {
    opacity: 1;
}

.tooltip.sff-tip-nuevo .tooltip-inner {
    padding: 6px 10px;
    border-radius: 6px;
    background: #0E3D52;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.tooltip.sff-tip-nuevo.right .tooltip-arrow {
    border-right-color: #0E3D52;
}

/* Badges "Nuevo" */
html:not(#extr-page) #left-panel .label-success {
    background-color: #94BE15;
    color: #0E3D52;
}

/* ---------- Menú contraído ---------- */
html:not(#extr-page) .minified .login-info {
    border-bottom: 1px solid #082836;
}

html:not(#extr-page) .minified nav > ul > li > a > .menu-item-parent {
    background-color: #0E3D52;
    color: #fff;
    border-left: 1px solid #0E3D52;
    border-top: 1px solid #0E3D52;
    border-bottom: 1px solid #0E3D52;
}

html:not(#extr-page) .minified nav > ul > li > ul {
    background: #0B3242;
    border-color: #1D4A5C;
}

    html:not(#extr-page) .minified nav > ul > li > ul > li {
        background-color: #082836;
    }

/* ---------- Barras de título de paneles (solo las grises del tema; los paneles de otros colores se respetan) ---------- */
html:not(#extr-page) .jarviswidget-color-blueDark > header,
html:not(#extr-page) .jarviswidget-color-darken > header {
    background: #0E3D52;
    border-color: #0E3D52 !important;
    color: #fff;
}

/* ---------- Pie de formularios ---------- */
html:not(#extr-page) .smart-form footer,
html:not(#extr-page) .client-form header {
    background: #0E3D52 !important;
    border-top-color: #0E3D52;
    color: #fff;
}

/* Botones dentro del pie (el resto de botones del sistema no cambia; Ayuda conserva su naranja) */
html:not(#extr-page) .smart-form footer .btn-primary {
    background-color: #94BE15;
    border-color: #94BE15;
    color: #0E3D52;
    font-weight: 600;
}

    html:not(#extr-page) .smart-form footer .btn-primary:hover,
    html:not(#extr-page) .smart-form footer .btn-primary:focus {
        background-color: #A6D11F;
        border-color: #A6D11F;
        color: #0E3D52;
    }

html:not(#extr-page) .smart-form footer .btn-success {
    background-color: #fff;
    border-color: #fff;
    color: #0E3D52;
    font-weight: 600;
}

    html:not(#extr-page) .smart-form footer .btn-success:hover,
    html:not(#extr-page) .smart-form footer .btn-success:focus {
        background-color: #E6EEF1;
        border-color: #E6EEF1;
        color: #0E3D52;
    }

html:not(#extr-page) .smart-form footer .btn-info,
html:not(#extr-page) .smart-form footer .btn-default {
    background-color: transparent;
    border-color: rgba(255, 255, 255, .6);
    color: #fff;
}

    html:not(#extr-page) .smart-form footer .btn-info:hover,
    html:not(#extr-page) .smart-form footer .btn-info:focus,
    html:not(#extr-page) .smart-form footer .btn-default:hover,
    html:not(#extr-page) .smart-form footer .btn-default:focus {
        background-color: rgba(255, 255, 255, .15);
        border-color: #fff;
        color: #fff;
    }

/* ---------- Pie de página (variante C: azul del encabezado con línea verde) ---------- */
html:not(#extr-page) .page-footer {
    background: #0E3D52;
    border-top: 3px solid #94BE15;
}

    /* margen derecho: deja libre el botón flotante de WhatsApp */
    html:not(#extr-page) .page-footer .sff-footer-lema {
        color: #C9D8DF;
        margin-right: 70px;
    }

/* ---------- Lista de facturas (factura/IndexFactura): solo la tabla con clase propia ---------- */
html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td {
    vertical-align: middle;
}

/* Fecha y monto en una sola línea; monto alineado a la derecha para comparar */
html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(2),
html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(4) {
    white-space: nowrap;
}

html:not(#extr-page) .sff-tabla-facturas > thead > tr > th:nth-child(4),
html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(4) {
    text-align: right;
}

html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(1) {
    font-weight: 600;
    color: #0E3D52;
}

/* Estado con color: aceptado verde, pendiente ámbar, rechazado rojo, proforma/simplificado azul */
html:not(#extr-page) .sff-tabla-facturas .label {
    display: inline-block;
    border-radius: 10px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

    html:not(#extr-page) .sff-tabla-facturas .label::first-letter {
        text-transform: uppercase;
    }

html:not(#extr-page) .sff-tabla-facturas .label-success {
    background: #EAF3DE;
    color: #27500A;
}

html:not(#extr-page) .sff-tabla-facturas .label-default {
    background: #FAEEDA;
    color: #633806;
}

html:not(#extr-page) .sff-tabla-facturas .label-danger {
    background: #FCEBEB;
    color: #791F1F;
}

html:not(#extr-page) .sff-tabla-facturas .label-primary {
    background: #E6F1FB;
    color: #0C447C;
}

/* Documento emitido por una factura recurrente (lo agrega DevuelveEstadoDoc junto al estado) */
html:not(#extr-page) .sff-tabla-facturas .sff-chip-rec {
    display: inline-block;
    margin: 3px 0 0 4px;
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #E2F0F3;
    color: #0B5568;
    white-space: nowrap;
    vertical-align: middle;
    cursor: default;
}

    html:not(#extr-page) .sff-tabla-facturas .sff-chip-rec i {
        margin-right: 3px;
    }

/* Acciones: "Descargar" + menú "⋯" (lo arma fnAgruparAcciones en buscarFacturas.js) */
html:not(#extr-page) .sff-contenedor-facturas {
    overflow: visible; /* el contenedor recortaba el menú desplegable */
}

html:not(#extr-page) .sff-tabla-facturas > thead > tr > th:last-child,
html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:last-child {
    white-space: nowrap;
    text-align: right;
}

html:not(#extr-page) .sff-tabla-facturas .sff-acc {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

    /* Editar y Descargar conservan su color y estilo original; solo se ajusta el margen */
    html:not(#extr-page) .sff-tabla-facturas .sff-acc .botonesAcciones {
        margin: 0;
    }

    html:not(#extr-page) .sff-tabla-facturas .sff-mas > .btn {
        width: 32px;
        height: 32px; /* misma altura que Editar y Descargar */
        margin: 0;
        padding: 0;
        background: #fff !important;
        border: 1px solid #cfd8dc !important;
        color: #0E3D52 !important;
    }

        html:not(#extr-page) .sff-tabla-facturas .sff-mas > .btn:hover,
        html:not(#extr-page) .sff-tabla-facturas .sff-mas.open > .btn {
            border-color: #94BE15 !important;
            background: #F4F8EA !important;
        }

html:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu {
    min-width: 210px;
    padding: 4px 0;
    border-color: #E1E7EA;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(14, 61, 82, .15);
}

    html:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button {
        display: flex;
        gap: 9px;
        align-items: center;
        width: 100%;
        margin: 0;
        padding: 7px 14px;
        border: 0 !important;
        border-radius: 0;
        background: none !important;
        box-shadow: none;
        color: #1f2d33 !important;
        font-size: 13px;
        text-align: left;
    }

        html:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button:hover,
        html:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button:focus {
            background: #F1F5F7 !important;
        }

        html:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button i {
            width: 16px;
            text-align: center;
            color: #5B6B72;
        }

        html:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button.btnMotivoRechazo,
        html:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button.btnEliminarProforma {
            color: #A32D2D !important;
        }

/* Móvil: una tarjeta por documento */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-tabla-facturas > thead {
        display: none;
    }

    html:not(#extr-page) .sff-tabla-facturas,
    html:not(#extr-page) .sff-tabla-facturas > tbody {
        display: block;
        border: 0 !important;
    }

        html:not(#extr-page) .sff-tabla-facturas > tbody > tr {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 4px 10px;
            margin-bottom: 10px;
            padding: 10px 12px;
            border: 1px solid #E1E7EA;
            border-radius: 10px;
            background: #fff !important;
        }

            html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td {
                display: block;
                padding: 0 !important;
                border: 0 !important;
                background: none !important;
                text-align: left;
            }

                html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(1) { grid-column: 1 / span 2; grid-row: 1; }
                html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(1):not(.dataTables_empty)::before { content: "N.º "; }
                html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(5) { grid-column: 1 / span 2; grid-row: 2; }
                html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(3) { grid-column: 1 / span 2; grid-row: 3; color: #5B6B72; }
                html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(2) { grid-column: 1; grid-row: 4; color: #5B6B72; }
                html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(4) { grid-column: 2; grid-row: 4; font-size: 14px; font-weight: 600; }
                html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(6) { grid-column: 1 / span 2; grid-row: 5; padding-top: 6px !important; }

    /* Fila vacía ("No hay documentos…") */
    html:not(#extr-page) .sff-tabla-facturas > tbody > tr > td.dataTables_empty {
        grid-column: 1 / span 2;
        text-align: center;
    }

    html:not(#extr-page) .sff-tabla-facturas .sff-acc {
        display: flex;
        width: 100%;
    }

    html:not(#extr-page) .sff-tabla-facturas .responsiveExpander {
        display: none;
    }
}

/* ---------- Crear factura: títulos de bloque (1 Documento, 2 Cliente, 3 Detalle, 4 Totales) ---------- */
html:not(#extr-page) .sff-bloque-t {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 13px;
    padding-bottom: 6px;
    border-bottom: 1px solid #E1E7EA;
    color: #0E3D52;
    font-size: 14px;
    font-weight: 700;
}

    html:not(#extr-page) .sff-bloque-t span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #0E3D52;
        color: #fff;
        font-size: 12px;
    }

/* Botones "+ Nuevo cliente" (antes "Incluir Cliente") y "Actualizar cliente" (subastas) */
html:not(#extr-page) #incluirCliente.sff-nuevo-cli,
html:not(#extr-page) #actualizarCliente.sff-nuevo-cli {
    margin-top: 6px;
    padding: 5px 12px;
    border: 1px solid #0E3D52;
    border-radius: 6px;
    background: #fff;
    color: #0E3D52;
    font-size: 12px;
    font-weight: 600;
}

html:not(#extr-page) #actualizarCliente.sff-nuevo-cli {
    margin-left: 6px;
}

    html:not(#extr-page) #incluirCliente.sff-nuevo-cli:hover,
    html:not(#extr-page) #incluirCliente.sff-nuevo-cli:focus,
    html:not(#extr-page) #actualizarCliente.sff-nuevo-cli:hover,
    html:not(#extr-page) #actualizarCliente.sff-nuevo-cli:focus {
        border-color: #94BE15;
        background: #F4F8EA;
    }

/* ---------- Modales "Registrar cliente" (#modalClientes) y "Actualizar cliente" (#modalClientesAct) de Crear factura ---------- */
html:not(#extr-page) #modalClientes .modal-header,
html:not(#extr-page) #modalClientesAct .modal-header {
    border-radius: 6px 6px 0 0;
    background: #0E3D52;
}

    html:not(#extr-page) #modalClientes .modal-header .modal-title,
    html:not(#extr-page) #modalClientes .modal-header label,
    html:not(#extr-page) #modalClientesAct .modal-header .modal-title,
    html:not(#extr-page) #modalClientesAct .modal-header label {
        color: #fff;
        font-weight: 700;
    }

    html:not(#extr-page) #modalClientes .modal-header .close,
    html:not(#extr-page) #modalClientesAct .modal-header .close {
        color: #fff;
        opacity: .8;
        text-shadow: none;
    }

html:not(#extr-page) #modalClientes .sff-modal-sec {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #E1E7EA;
    color: #0E3D52;
    font-size: 14px;
    font-weight: 700;
}

    html:not(#extr-page) #modalClientes .sff-modal-sec i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #0E3D52;
        color: #fff;
        font-size: 11px;
    }

html:not(#extr-page) #modalClientes .sff-req {
    margin-left: 2px;
    color: #A32D2D;
}

/* Tarjetas de los modales de cliente (igual que Nuevo cliente: .sff-ec-tarjeta) */
html:not(#extr-page) #modalClientes .modal-body,
html:not(#extr-page) #modalClientesAct .modal-body {
    background: #F4F7F8;
}

html:not(#extr-page) #modalClientes .sff-mc-form,
html:not(#extr-page) #modalClientesAct .sff-mc-form {
    padding: 12px 12px 2px;
    background: transparent;
}

html:not(#extr-page) #modalClientes .sff-mc-tarjeta,
html:not(#extr-page) #modalClientesAct .sff-mc-tarjeta {
    margin: 0 0 12px;
    background: #fff;
    border: 1px solid #B9C7CE;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(14, 61, 82, .12);
}

    html:not(#extr-page) #modalClientes .sff-mc-tarjeta > .sff-bloque-t,
    html:not(#extr-page) #modalClientesAct .sff-mc-tarjeta > .sff-bloque-t {
        margin: 0;
        padding: 10px 14px;
        border-bottom: 1px solid #D3DCE1;
        font-size: 15px;
        font-weight: 600;
    }

        html:not(#extr-page) #modalClientes .sff-mc-tarjeta > .sff-bloque-t span,
        html:not(#extr-page) #modalClientesAct .sff-mc-tarjeta > .sff-bloque-t span {
            width: 24px;
            height: 24px;
            background: #94BE15;
        }

    html:not(#extr-page) #modalClientes .sff-mc-tarjeta > fieldset,
    html:not(#extr-page) #modalClientesAct .sff-mc-tarjeta > fieldset {
        padding: 12px 14px 0;
        border: 0;
        background: transparent;
    }

    /* Interruptor "Es proveedor" a la derecha del encabezado de la tarjeta */
    html:not(#extr-page) #modalClientes .sff-mc-tarjeta > .sff-bloque-t .sff-mc-toggle {
        margin: 0 0 0 auto;
        padding-right: 58px;
        font-size: 13px;
        font-weight: 400;
        line-height: 22px;
        color: #3A4A52;
    }

    /* Proveedor sin marcar: la tarjeta queda solo con el encabezado */
    html:not(#extr-page) #modalClientes #Provedores > fieldset {
        padding-top: 0;
    }

        html:not(#extr-page) #modalClientes #Provedores > fieldset > .ccscontenidoProveedor:first-child {
            padding-top: 12px;
        }

html:not(#extr-page) #modalClientes #btnBuscarNombre,
html:not(#extr-page) #modalClientes #BuscarCodigoActividad {
    margin-top: 6px;
    padding: 4px 12px;
    border: 1px solid #0E3D52 !important;
    border-radius: 6px;
    background: #fff !important;
    color: #0E3D52 !important;
    font-size: 12px;
    font-weight: 600;
}

/* Estado de la consulta de identificación y nombre autocompletado (fase 2) */
html:not(#extr-page) #modalClientes .sff-estado-id {
    min-height: 16px;
    margin-top: 4px;
    font-size: 12px;
}

    html:not(#extr-page) #modalClientes .sff-estado-id.sff-est-consultando { color: #5B6B72; }
    html:not(#extr-page) #modalClientes .sff-estado-id.sff-est-ok { color: #3B6D11; }
    html:not(#extr-page) #modalClientes .sff-estado-id.sff-est-aviso { color: #854F0B; }
    html:not(#extr-page) #modalClientes .sff-estado-id.sff-est-error { color: #A32D2D; }

html:not(#extr-page) #modalClientes .sff-spin {
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 2px solid #cfd8dc;
    border-top-color: #0E3D52;
    border-radius: 50%;
    vertical-align: -1px;
    animation: sff-girar .8s linear infinite;
}

@keyframes sff-girar {
    to { transform: rotate(360deg); }
}

html:not(#extr-page) #modalClientes .sff-estado-id.sff-est-info { color: #5B6B72; }

/* Buscador único de actividad (fase 3) */
/* jQuery UI inserta un span oculto antes del input y rompe la regla del tema ".icon-prepend + input":
   se da el espacio del icono directamente para que el texto no se monte sobre la lupa */
html:not(#extr-page) #modalClientes #sffBuscarActividad {
    padding-left: 37px;
}

html:not(#extr-page) #modalClientes .ui-autocomplete {
    z-index: 1060;
    max-height: 260px;
    overflow-y: auto;
    padding: 0;
    border: 1px solid #E1E7EA;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(14, 61, 82, .12);
}

    html:not(#extr-page) #modalClientes .ui-autocomplete .sff-act-item a {
        display: flex;
        gap: 10px;
        align-items: baseline;
        padding: 6px 10px;
        border: 0 !important;
        border-bottom: 1px solid #F0F3F5 !important;
        border-radius: 0 !important;
        color: #1f2d33 !important;
        font-size: 13px;
        white-space: normal;
    }

        html:not(#extr-page) #modalClientes .ui-autocomplete .sff-act-item a.ui-state-focus,
        html:not(#extr-page) #modalClientes .ui-autocomplete .sff-act-item a:hover {
            background: #F4F8EA !important;
        }

    html:not(#extr-page) #modalClientes .sff-act-cod {
        min-width: 58px;
        color: #0E3D52;
        font-weight: 600;
    }

    html:not(#extr-page) #modalClientes .sff-act-cod-match,
    html:not(#extr-page) #modalClientes .sff-act-desc mark {
        padding: 0 1px;
        border-radius: 2px;
        background: #FAEEDA;
        color: inherit;
    }

html:not(#extr-page) #modalClientes .sff-actividad-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid #7FA512;
    border-radius: 8px;
    background: #F4F8EA;
    color: #0E3D52;
    font-size: 13px;
}

    html:not(#extr-page) #modalClientes .sff-actividad-chip > .fa-check-circle {
        color: #3B6D11;
    }

html:not(#extr-page) #modalClientes .sff-actividad-quitar {
    margin-left: auto;
    padding: 0 4px;
    border: 0;
    background: none;
    color: #5B6B72;
    font-size: 14px;
}

    html:not(#extr-page) #modalClientes .sff-actividad-quitar:hover {
        color: #A32D2D;
    }

html:not(#extr-page) #modalClientes input.sff-autollenado {
    background-color: #F4F8EA !important;
}

html:not(#extr-page) #modalClientes em.invalid,
html:not(#extr-page) #modalClientes .note-error {
    color: #A32D2D;
}

html:not(#extr-page) #modalClientes .modal-footer,
html:not(#extr-page) #modalClientesAct .modal-footer {
    border-radius: 0 0 6px 6px;
    background: #0E3D52;
}

    html:not(#extr-page) #modalClientes .modal-footer footer,
    html:not(#extr-page) #modalClientesAct .modal-footer footer {
        padding: 0;
        background: transparent !important;
    }

html:not(#extr-page) #modalClientes #ClientesGuardar,
html:not(#extr-page) #modalClientesAct #ClientesActualizar {
    border-color: #94BE15;
    background: #94BE15;
    color: #0E3D52;
    font-weight: 600;
}

html:not(#extr-page) #modalClientes #Closeclientes,
html:not(#extr-page) #modalClientesAct #Closeclientes {
    border-color: rgba(255, 255, 255, .6);
    background: transparent;
    color: #fff;
}

/* ---------- Campos de formulario: verde en lugar del azul del tema ----------
   Mouse encima: verde de marca #94BE15. Foco/marcado: verde más oscuro #7FA512 (el de marca sobre blanco tiene poco contraste). */
html:not(#extr-page) .smart-form .input:hover input,
html:not(#extr-page) .smart-form .select:hover select,
html:not(#extr-page) .smart-form .textarea:hover textarea,
html:not(#extr-page) .smart-form .checkbox:hover i,
html:not(#extr-page) .smart-form .radio:hover i,
html:not(#extr-page) .smart-form .toggle:hover i,
html:not(#extr-page) .form-control:hover {
    border-color: #94BE15;
}

html:not(#extr-page) .smart-form .input input:focus,
html:not(#extr-page) .smart-form .select select:focus,
html:not(#extr-page) .smart-form .textarea textarea:focus,
html:not(#extr-page) .form-control:focus {
    border-color: #7FA512 !important;
    box-shadow: 0 0 0 3px rgba(148, 190, 21, .25) !important;
    outline: 0;
}

html:not(#extr-page) .smart-form .checkbox input:focus + i,
html:not(#extr-page) .smart-form .radio input:focus + i,
html:not(#extr-page) .smart-form .toggle input:focus + i,
html:not(#extr-page) .smart-form .checkbox input:checked + i,
html:not(#extr-page) .smart-form .radio input:checked + i,
html:not(#extr-page) .smart-form .toggle input:checked + i {
    border-color: #7FA512;
}

html:not(#extr-page) .smart-form .radio input + i:after,
html:not(#extr-page) .smart-form .toggle i:before {
    background-color: #7FA512;
}

html:not(#extr-page) .smart-form .checkbox input + i:after {
    color: #7FA512;
}

html:not(#extr-page) .smart-form .toggle input:checked + i {
    background-color: #EAF3DE;
}

/* ---------- Barra de ruta ---------- */
html:not(#extr-page) #ribbon {
    background: #fff;
    border-bottom: 1px solid #E1E7EA;
}

    html:not(#extr-page) #ribbon .breadcrumb,
    html:not(#extr-page) #ribbon .breadcrumb > li,
    html:not(#extr-page) #ribbon .breadcrumb > li > a {
        color: #5B6B72;
    }

        html:not(#extr-page) #ribbon .breadcrumb > li:last-child,
        html:not(#extr-page) #ribbon .breadcrumb > .active {
            color: #0E3D52;
            font-weight: 600;
        }


/* ===== Crear factura: tarjeta del cliente elegido (#sffTarjetaCliente) ===== */
html:not(#extr-page) .sff-tarjeta-cli {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #D7E2E7;
    border-left: 4px solid #94BE15;
    border-radius: 8px;
    padding: 12px 16px;
}

html:not(#extr-page) .sff-tc-av {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0E3D52;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

html:not(#extr-page) .sff-tc-cuerpo { flex: 1; min-width: 0; position: relative; padding-right: 110px; }
html:not(#extr-page) .sff-tc-nombre { font-size: 15px; font-weight: 700; color: #0E3D52; word-break: break-word; }
html:not(#extr-page) .sff-tc-correo { font-size: 12px; color: #5B6B72; margin-top: 2px; word-break: break-all; }
html:not(#extr-page) .sff-tc-chips { margin-top: 6px; }

html:not(#extr-page) .sff-tarjeta-cli .sff-chip {
    display: inline-block;
    font-size: 11px;
    padding: 2px 9px;
    margin: 0 4px 4px 0;
    border-radius: 10px;
    background: #EEF3F5;
    color: #0E3D52;
}

    html:not(#extr-page) .sff-tarjeta-cli .sff-chip.sff-chip-verde { background: #EEF6D6; color: #4C6308; }
    html:not(#extr-page) .sff-tarjeta-cli .sff-chip.sff-chip-naranja { background: #FFF1DC; color: #8A5200; }

html:not(#extr-page) .sff-tc-cambiar {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 12px;
    color: #0E3D52;
    text-decoration: underline;
}

@media (max-width: 767px) {
    html:not(#extr-page) .sff-tarjeta-cli { padding: 10px 12px; gap: 12px; }
    html:not(#extr-page) .sff-tc-av { width: 38px; height: 38px; font-size: 14px; }
    html:not(#extr-page) .sff-tc-cuerpo { padding-right: 0; }
    html:not(#extr-page) .sff-tc-cambiar { position: static; display: inline-block; margin-top: 4px; }
}

/* ===== Crear factura: pestañas Servicios/Productos y buscador del detalle ===== */
html:not(#extr-page) .sff-oculto { display: none !important; }
html:not(#extr-page) .sff-detalle-origen .dataTables_filter { display: none; } /* reemplazado por #sffBuscarDetalle */

html:not(#extr-page) .sff-seg {
    display: inline-flex;
    border: 1px solid #0E3D52;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

    html:not(#extr-page) .sff-seg button {
        border: 0;
        background: #fff;
        color: #0E3D52;
        padding: 7px 20px;
        font-size: 13px;
        cursor: pointer;
    }

        html:not(#extr-page) .sff-seg button + button { border-left: 1px solid #0E3D52; }
        html:not(#extr-page) .sff-seg button:hover { background: #EEF3F5; }
        html:not(#extr-page) .sff-seg button.sff-on { background: #0E3D52; color: #fff; font-weight: 600; }

html:not(#extr-page) .sff-busca-det { position: relative; margin-bottom: 8px; }

    html:not(#extr-page) .sff-busca-det > i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #7A8A91;
        pointer-events: none;
    }

    html:not(#extr-page) .smart-form .sff-busca-det > input {
        box-sizing: border-box;
        width: 100%;
        height: 38px;
        padding: 6px 12px 6px 36px;
        border: 1px solid #BDBDBD;
        border-radius: 6px;
        font-size: 13px;
        outline: none;
    }

        html:not(#extr-page) .smart-form .sff-busca-det > input:hover { border-color: #94BE15; }
        html:not(#extr-page) .smart-form .sff-busca-det > input:focus { border-color: #7FA512; box-shadow: 0 0 0 3px rgba(148,190,21,.2); }

@media (max-width: 767px) {
    html:not(#extr-page) .sff-seg { display: flex; }
    html:not(#extr-page) .sff-seg button { flex: 1; padding: 9px 0; font-size: 14px; }
    html:not(#extr-page) .smart-form .sff-busca-det > input { height: 42px; font-size: 14px; }
}


/* ===== Crear factura: tabla de servicios/productos como tarjetas en móvil (solo .sff-detalle-origen) ===== */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-detalle-origen { height: auto !important; max-height: 340px; margin-left: -8px !important; margin-right: -8px !important; width: auto !important; }
    html:not(#extr-page) .sff-detalle-origen > section { padding-left: 0 !important; padding-right: 0 !important; } /* mismo ancho que las tarjetas de la factura (352px en 375px) */

    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle,
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody { display: block; width: 100% !important; border: 0; }

    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle thead { display: none; }

    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody tr {
        display: grid;
        grid-template-columns: auto auto 1fr auto;
        grid-template-areas: "desc desc desc monto" "cab mon imp imp" "com com com com" "btn btn btn btn";
        gap: 2px 10px;
        margin: 0 0 8px;
        padding: 10px 12px;
        background: #fff !important;
        border: 1px solid #D7E2E7;
        border-left: 4px solid #94BE15; /* verde (antes azul) */
        border-radius: 8px;
    }

    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td { display: block; border: 0 !important; padding: 0 !important; background: none !important; }
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td.hide_me { display: none !important; }

    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(2) { grid-area: desc; font-weight: 700; color: #0E3D52; font-size: 14px; }
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(7) { grid-area: monto; font-weight: 700; font-size: 15px; color: #0E3D52; text-align: right; white-space: nowrap; }
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(4) { grid-area: cab; }
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(5) { grid-area: mon; }
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(6) { grid-area: imp; }
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(8) { grid-area: com; }

    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(4),
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(5),
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(6),
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(8) { font-size: 11.5px; color: #5B6B72; }

    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(4)::before { content: "Cabys "; color: #8A989E; }
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(6)::before { content: "IVA "; color: #8A989E; }
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(8)::before { content: "Cód. comercial "; color: #8A989E; }
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(8).sff-vacio,
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(8):empty { display: none !important; }

    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(1) { grid-area: btn; margin-top: 6px !important; }
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(1) .btn,
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(1) button { width: 100%; padding: 8px 0; font-size: 13px; }

    /* Fila "No existen datos para mostrar" */
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td.dataTables_empty { grid-column: 1 / -1; grid-area: auto; text-align: center; font-weight: normal; }
    html:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td.dataTables_empty::before { content: none; }
}


/* ===== Crear factura: botón Seleccionar (productos/servicios) en el azul de la pantalla ===== */
html:not(#extr-page) .sff-detalle-origen .btnselect {
    background-color: #0E3D52 !important;
    border-color: #0E3D52 !important;
    color: #fff !important;
}

    html:not(#extr-page) .sff-detalle-origen .btnselect:hover,
    html:not(#extr-page) .sff-detalle-origen .btnselect:focus {
        background-color: #15475C !important;
        border-color: #15475C !important;
        color: #fff !important;
    }

/* ===== Crear factura: botón Eliminar de las líneas en rojo, igual que el botón de papelera (btn-danger del tema) ===== */
html:not(#extr-page) .sff-detalle-factura .bntdeleteitem {
    background-color: #A90329 !important;
    border-color: #900323 !important;
    color: #fff !important;
}

    html:not(#extr-page) .sff-detalle-factura .bntdeleteitem:hover,
    html:not(#extr-page) .sff-detalle-factura .bntdeleteitem:focus {
        background-color: #900323 !important;
        border-color: #77021D !important;
        color: #fff !important;
    }


/* ===== Crear factura: tabla "Detalle Factura" (opción B: encabezado claro con línea azul) =====
   Columnas en el DOM (las ocultas siguen presentes): 1 No. · 2 Descripción · 3 Cantidad · 4 Precio unit. · 5 Impuesto unit.
   · 6 Precio c/impuesto · 7 Monto total · 8 NumLote y 9 FechaExp (visibles solo para un emisor) · 10 Acciones · 11+ ocultas */
html:not(#extr-page) .sff-detalle-factura {
    height: auto !important;
    max-height: 360px;
    overflow-y: auto !important;
}

    html:not(#extr-page) .sff-detalle-factura > section > label.label {
        font-weight: 700;
        color: #0E3D52;
        font-size: 13px;
        margin: 4px 0 6px;
    }

html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle {
    width: 100% !important;
    border: 1px solid #D7E2E7 !important;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
}

    /* Encabezado */
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle thead th {
        background: #EEF3F5 !important;
        color: #0E3D52 !important;
        border: 0 !important;
        border-bottom: 2px solid #0E3D52 !important;
        font-weight: 700;
        font-size: 12px;
        vertical-align: middle !important;
        padding: 9px 8px !important;
        white-space: normal;
    }

    /* Anchos: No. 5 %, Descripción el sobrante (35 %), el resto 10 % */
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle thead th:nth-child(1) { width: 5% !important; text-align: center; }
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle thead th:nth-child(2) { width: 35% !important; }
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle thead th:nth-child(n+3):nth-child(-n+10) { width: 10% !important; }
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle thead th:nth-child(3),
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle thead th:nth-child(10) { text-align: center; }
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle thead th:nth-child(n+4):nth-child(-n+7) { text-align: right; }

    /* Filas */
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td {
        vertical-align: middle !important;
        padding: 6px 8px !important;
        border-left: 0 !important;
        border-right: 0 !important;
        border-color: #E6ECEF !important;
        background: #fff !important;
    }

    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody tr:hover td { background: #F5F9FA !important; }

    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody input {
        width: 100% !important;
        height: 30px;
        border: 1px solid #C9D5DA;
        border-radius: 4px;
        padding: 2px 8px;
        background: #fff;
    }

    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(1) { text-align: center; color: #5B6B72; }
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(3) input { text-align: center !important; }
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(4) input,
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(6) input { text-align: right !important; }
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(5),
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(7) { text-align: right; white-space: nowrap; }
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(7) { font-weight: 700; color: #0E3D52; }
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(10) { text-align: center; white-space: nowrap; }

    /* Fila "No existen datos para mostrar" */
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td.dataTables_empty { text-align: center; color: #5B6B72; font-weight: normal; }


/* ===== Crear factura: líneas de "Detalle Factura" como tarjetas en móvil (<768px) =====
   Solo presentación: los campos, su lectura y el recálculo de totales no cambian. Columnas: ver bloque anterior. */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-detalle-factura {
        max-height: none !important;
        overflow: visible !important;
        margin-left: -8px !important;
        margin-right: -8px !important;
        width: auto !important;
    }

        html:not(#extr-page) .sff-detalle-factura > section { padding-left: 0 !important; padding-right: 0 !important; }

    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        border: 0 !important;
        background: transparent;
    }

        html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle thead { display: none; }
        html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody { display: block; }

        html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody tr {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
            grid-template-areas: "num num acc" "desc desc desc" "cant pu pf" "imp tot tot";
            gap: 6px 8px;
            margin: 0 0 10px;
            padding: 10px 12px;
            background: #fff !important;
            border: 1px solid #D7E2E7;
            border-left: 4px solid #0E3D52;
            border-radius: 8px;
        }

        html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td {
            display: block;
            border: 0 !important;
            padding: 0 !important;
            background: transparent !important;
            min-width: 0;
            width: auto !important;
        }

            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td.hide_me { display: none !important; }

            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(1) { grid-area: num; align-self: center; font-size: 12px; color: #5B6B72; text-align: left !important; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(1)::before { content: "Línea "; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(2) { grid-area: desc; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(3) { grid-area: cant; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(4) { grid-area: pu; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(6) { grid-area: pf; }

            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(3)::before,
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(4)::before,
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(6)::before,
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(8)::before,
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(9)::before { display: block; font-size: 11px; color: #5B6B72; margin-bottom: 2px; }

            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(3)::before { content: "Cantidad"; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(4)::before { content: "Precio"; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(6)::before { content: "Precio c/IVA"; }

            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(5) { grid-area: imp; align-self: center; font-size: 12px; color: #5B6B72; text-align: left !important; white-space: nowrap; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(5)::before { content: "IVA unit."; display: block; font-size: 11px; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(7) { grid-area: tot; align-self: center; text-align: right; font-size: 16px; font-weight: 700; color: #0E3D52; white-space: nowrap; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(7)::before { content: "Total"; display: block; font-size: 11px; font-weight: 400; color: #5B6B72; }

            /* Num. lote y Fecha exp.: solo visibles para un emisor; en su propia fila */
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(8) { grid-row: 5; grid-column: 1 / span 2; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(9) { grid-row: 5; grid-column: 3; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(8)::before { content: "Num. lote"; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(9)::before { content: "Fecha exp."; }

            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(10) { grid-area: acc; text-align: right; white-space: nowrap; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(10) button { padding: 5px 10px; }

        html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody input { box-sizing: border-box !important; width: 100% !important; min-width: 0; height: 34px; font-size: 14px; }
        html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(3) input { text-align: center !important; }
        html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(4) input,
        html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(6) input { text-align: right !important; padding: 2px 6px; }

        /* Fila "No existen datos para mostrar" */
        html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody tr:has(td.dataTables_empty) { display: block; border-left-width: 1px; }
        html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td.dataTables_empty { text-align: center !important; font-size: 13px; }
            html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td.dataTables_empty::before { content: none; }
}


/* ===== Crear factura: descripción de las líneas en campo de varias líneas que crece (textarea.textosDetalle; altura por JS) ===== */
html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody textarea.textosDetalle {
    display: block;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 0 !important;
    height: 30px;
    max-height: 92px; /* ~5 líneas; después aparece barra de desplazamiento */
    resize: none;
    overflow-y: hidden;
    border: 1px solid #C9D5DA;
    border-radius: 4px;
    padding: 5px 8px;
    line-height: 18px;
    font-size: 13px;
    background: #fff;
    text-align: left;
}

html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(2) { vertical-align: top !important; }

@media (max-width: 767px) {
    html:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody textarea.textosDetalle { font-size: 14px; max-height: 110px; }
}


/* ===== Editar factura (nota de crédito/débito): tabla "Detalle Factura" (.sff-detalle-nota) =====
   Columnas: 1 No. · 2 Descripción · 3 Cant. original · 4 Cantidad a retornar (input) · 5 Precio unit. · 6 Impuesto
   · 7 Monto a rebajar (input) · 8 Monto total · 9 Opciones (oculta) · 10+ ocultas */
html:not(#extr-page) .sff-detalle-nota {
    height: auto !important;
    max-height: 360px;
    overflow-y: auto !important;
}

    html:not(#extr-page) .sff-detalle-nota > section > label.label { font-weight: 700; color: #0E3D52; font-size: 13px; margin: 4px 0 6px; }

html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle {
    width: 100% !important;
    border: 1px solid #D7E2E7 !important;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
}

    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle thead th {
        background: #EEF3F5 !important;
        color: #0E3D52 !important;
        border: 0 !important;
        border-bottom: 2px solid #0E3D52 !important;
        font-weight: 700;
        font-size: 12px;
        vertical-align: middle !important;
        padding: 9px 8px !important;
        white-space: normal;
    }

    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle thead th:nth-child(1) { width: 5% !important; text-align: center; }
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle thead th:nth-child(2) { width: 35% !important; }
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle thead th:nth-child(n+3):nth-child(-n+8) { width: 10% !important; }
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle thead th:nth-child(3),
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle thead th:nth-child(4) { text-align: center; }
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle thead th:nth-child(n+5):nth-child(-n+8) { text-align: right; }

    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td {
        vertical-align: middle !important;
        padding: 6px 8px !important;
        border-left: 0 !important;
        border-right: 0 !important;
        border-color: #E6ECEF !important;
        background: #fff !important;
    }

    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody tr:hover td { background: #F5F9FA !important; }
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td label { display: inline; font-weight: inherit; margin: 0; }
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(1) { text-align: center; color: #5B6B72; }
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(2) { white-space: normal; color: #0E3D52; font-weight: 600; }
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(3) { text-align: center; }
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(5),
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(6),
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(8) { text-align: right; white-space: nowrap; }
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(8) { font-weight: 700; color: #0E3D52; }

    /* Campos editables (Cantidad a retornar / Monto a rebajar): borde verde; deshabilitados en gris */
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody input {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100%;
        height: 32px;
        border: 1px solid #94BE15;
        border-radius: 4px;
        padding: 2px 8px;
        background: #fff;
        text-align: right !important;
        font-weight: 600;
    }

    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(4) input { text-align: center !important; }
    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody input:disabled { border-color: #D7E2E7; background: #F1F4F5 !important; color: #8A989E; font-weight: 400; }

    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td.dataTables_empty { text-align: center; color: #5B6B72; font-weight: normal; }

/* Móvil: cada línea como tarjeta de 352px en 375px */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-detalle-nota {
        max-height: none !important;
        overflow: visible !important;
        margin-left: -8px !important;
        margin-right: -8px !important;
        width: auto !important;
    }

        html:not(#extr-page) .sff-detalle-nota > section { padding-left: 0 !important; padding-right: 0 !important; }

    html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle { display: block; border: 0 !important; background: transparent; min-width: 0 !important; }
        html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle thead { display: none; }
        html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody { display: block; }

        html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody tr {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            grid-template-areas: "num num" "desc desc" "orig cant" "pu imp" "reb tot";
            gap: 6px 10px;
            margin: 0 0 10px;
            padding: 10px 12px;
            background: #fff !important;
            border: 1px solid #D7E2E7;
            border-left: 4px solid #0E3D52;
            border-radius: 8px;
        }

        html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td {
            display: block;
            border: 0 !important;
            padding: 0 !important;
            background: transparent !important;
            min-width: 0;
            width: auto !important;
            text-align: left !important;
        }

            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td.hide_me { display: none !important; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(1) { grid-area: num; font-size: 12px; color: #5B6B72; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(1)::before { content: "Línea"; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(2) { grid-area: desc; font-size: 14px; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(3) { grid-area: orig; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(4) { grid-area: cant; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(5) { grid-area: pu; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(6) { grid-area: imp; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(7) { grid-area: reb; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(8) { grid-area: tot; text-align: right !important; font-size: 16px; align-self: end; }

            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(n+3):nth-child(-n+8)::before { display: block; font-size: 11px; color: #5B6B72; font-weight: 400; margin-bottom: 2px; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(3)::before { content: "Cant. original"; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(4)::before { content: "Cantidad a retornar"; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(5)::before { content: "Precio unit."; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(6)::before { content: "Impuesto"; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(7)::before { content: "Monto a rebajar"; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(8)::before { content: "Monto total"; }

        html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody input { height: 36px; font-size: 14px; }

        html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody tr:has(td.dataTables_empty) { display: block; }
        html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td.dataTables_empty { text-align: center !important; }
            html:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td.dataTables_empty::before { content: none; }
}


/* ===== Editar factura (nota): encabezado "Nota sobre la factura N.º …" (#sffNotaEncabezado) ===== */
html:not(#extr-page) .sff-nota-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 14px 14px 4px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #D7E2E7;
    border-left: 4px solid #94BE15;
    border-radius: 8px;
}

    html:not(#extr-page) .sff-nota-head .sff-nh-ic {
        flex: none;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: #0E3D52;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }

    html:not(#extr-page) .sff-nota-head .sff-nh-cuerpo { flex: 1; min-width: 0; }
    html:not(#extr-page) .sff-nota-head .sff-nh-titulo { font-size: 16px; font-weight: 700; color: #0E3D52; }
    html:not(#extr-page) .sff-nota-head .sff-nh-cliente { font-size: 12px; color: #5B6B72; margin: 3px 0 6px; word-break: break-word; }
    html:not(#extr-page) .sff-nota-head .sff-nh-chip { display: inline-block; font-size: 11px; padding: 2px 9px; margin: 0 4px 4px 0; border-radius: 10px; background: #EEF3F5; color: #0E3D52; }
    html:not(#extr-page) .sff-nota-head .sff-nh-saldo { flex: none; text-align: right; }
        html:not(#extr-page) .sff-nota-head .sff-nh-saldo span { display: block; font-size: 11px; color: #5B6B72; }
        html:not(#extr-page) .sff-nota-head .sff-nh-saldo b { font-size: 20px; color: #0E3D52; }

/* ===== Editar factura (nota): totales como tarjetas lado a lado (.sff-totales-nota) ===== */
html:not(#extr-page) .sff-totales-nota { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0; }

    html:not(#extr-page) .sff-totales-nota > .row {
        flex: 1 1 240px;
        margin: 0 !important;
        background: #fff;
        border: 1px solid #D7E2E7;
        border-radius: 8px;
        padding: 10px 14px;
    }

        html:not(#extr-page) .sff-totales-nota > .row > section { width: 100%; padding: 0 !important; margin: 0 !important; float: none; }
        html:not(#extr-page) .sff-totales-nota > .row.sff-tot-nota { border-left: 4px solid #94BE15; }

        html:not(#extr-page) .sff-totales-nota .label-center { display: block; text-align: left !important; font-size: 12px; color: #5B6B72; font-weight: 400; margin: 0 0 2px; }
            html:not(#extr-page) .sff-totales-nota .label-center b { font-weight: 400; }

        html:not(#extr-page) .smart-form .sff-totales-nota .input input {
            height: auto !important;
            border: 0 !important;
            background: transparent !important;
            padding: 0 !important;
            text-align: left !important;
            font-size: 22px !important;
            font-weight: 700;
            color: #0E3D52;
            box-shadow: none !important;
        }

        html:not(#extr-page) .smart-form .sff-totales-nota .sff-tot-nota .input input { color: #4C6308; }

@media (max-width: 767px) {
    html:not(#extr-page) .sff-nota-head { margin: 10px 6px; flex-wrap: wrap; }
        html:not(#extr-page) .sff-nota-head .sff-nh-cuerpo { flex: 1 1 calc(100% - 56px); }
        html:not(#extr-page) .sff-nota-head .sff-nh-saldo { flex: 1 1 100%; margin-left: 56px; text-align: left; }
}


/* ===== Editar factura (nota): tarjeta "Otros cargos" dentro de Totales (#idMuestraOtrosCargos, a la izquierda del saldo) ===== */
html:not(#extr-page) .sff-totales-nota > .sff-oc-nota {
    flex: 1 1 240px;
    min-width: 0;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #D7E2E7;
    border-radius: 8px;
    padding: 10px 14px;
}

    html:not(#extr-page) .sff-oc-nota .sff-oc-titulo { display: block; font-size: 12px; color: #5B6B72; margin-bottom: 4px; }

    html:not(#extr-page) .sff-oc-nota .sff-oc-fila {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 10px;
        padding: 4px 0;
        border-bottom: 1px dashed #E1E7EA;
    }

    html:not(#extr-page) .sff-oc-nota .sff-oc-desc { flex: 1; min-width: 0; font-size: 12px; color: #0E3D52; }

    html:not(#extr-page) .smart-form .sff-oc-nota .sff-oc-fila input.itemOtrosCargos {
        flex: none;
        width: 110px;
        border: 0;
        background: transparent;
        padding: 0;
        height: auto;
        text-align: right;
        font-size: 13px;
        font-weight: 600;
        color: #0E3D52;
        box-shadow: none;
    }

    html:not(#extr-page) .sff-oc-nota .sff-oc-total {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 10px;
        margin-top: 6px;
    }

        html:not(#extr-page) .sff-oc-nota .sff-oc-total .label-center { display: inline; white-space: nowrap; font-size: 12px; color: #5B6B72; margin: 0; }
            html:not(#extr-page) .sff-oc-nota .sff-oc-total .label-center b { font-weight: 400; }
        html:not(#extr-page) .sff-oc-nota .sff-oc-total .input { flex: none; }

        html:not(#extr-page) .smart-form .sff-oc-nota .sff-oc-total .input input {
            width: 150px;
            max-width: 100%;
            border: 0 !important;
            background: transparent !important;
            padding: 0 !important;
            height: auto !important;
            text-align: right !important;
            font-size: 22px !important;
            font-weight: 700;
            color: #0E3D52;
            box-shadow: none !important;
        }


/* ===== Editar factura (nota): tarjetas "Saldo restante" y "Monto de la nota" — etiqueta arriba (14px) y monto centrado en el espacio restante (opción B ajustada) ===== */
html:not(#extr-page) .smart-form .sff-totales-nota > .row { display: flex; }

    html:not(#extr-page) .smart-form .sff-totales-nota > .row > section { display: flex; flex-direction: column; width: 100%; }

    html:not(#extr-page) .smart-form .sff-totales-nota > .row .label-center { font-size: 14px !important; }

    html:not(#extr-page) .smart-form .sff-totales-nota > .row .input {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

        html:not(#extr-page) .smart-form .sff-totales-nota > .row .input input {
            width: 100% !important;
            box-sizing: border-box;
            text-align: center !important;
            font-size: 26px !important;
        }


/* ===== Crear factura: tarjeta "Otros cargos" (#aplicaOtrosCargosConfig, bloque 5) — misma línea que la de notas; conserva los toggles SI/NO y no muestra total ===== */
html:not(#extr-page) .smart-form .sff-oc-factura {
    margin: 6px 0 0;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #D7E2E7;
    border-radius: 8px;
    padding: 10px 14px;
}

    html:not(#extr-page) .smart-form .sff-oc-factura .sff-oc-titulo { display: block; font-size: 12px; color: #5B6B72; margin-bottom: 4px; }

    html:not(#extr-page) .smart-form .sff-oc-factura > #iditemOtrosCargos { float: none; width: auto; padding: 0; }

    html:not(#extr-page) .smart-form .sff-oc-factura #iditemOtrosCargos > .row {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0;
        padding: 6px 0;
        border-bottom: 1px dashed #E1E7EA;
    }

        html:not(#extr-page) .smart-form .sff-oc-factura #iditemOtrosCargos > .row:last-child { border-bottom: 0; }

        html:not(#extr-page) .smart-form .sff-oc-factura #iditemOtrosCargos > .row > section {
            float: none;
            width: auto;
            padding: 0;
            margin: 0;
        }

            html:not(#extr-page) .smart-form .sff-oc-factura #iditemOtrosCargos > .row > section:first-child { flex: 1; min-width: 0; }

            html:not(#extr-page) .smart-form .sff-oc-factura #iditemOtrosCargos > .row > section:first-child .toggle { margin: 0; font-size: 13px; color: #0E3D52; }

            html:not(#extr-page) .smart-form .sff-oc-factura #iditemOtrosCargos > .row > section.form-group { flex: none; }

        /* Valor configurado (% o monto fijo) como pastilla; el input sigue siendo el mismo (readonly) */
        html:not(#extr-page) .smart-form .sff-oc-factura #iditemOtrosCargos input#monto {
            width: 76px;
            height: 24px;
            padding: 0 8px;
            border: 0;
            border-radius: 12px;
            background-color: #EEF3F5 !important;
            color: #0E3D52 !important;
            font-size: 12px;
            font-weight: 600;
            text-align: center;
            box-shadow: none;
        }

        /* Monto calculado del cargo (solo visual) */
        html:not(#extr-page) .smart-form .sff-oc-factura .sff-oc-monto {
            flex: none;
            min-width: 90px;
            text-align: right;
            font-size: 13px;
            font-weight: 700;
            color: #0E3D52;
            white-space: nowrap;
        }

@media (max-width: 767px) {
    /* Móvil: nombre + toggle en la primera línea; pastilla y monto debajo */
    html:not(#extr-page) .smart-form .sff-oc-factura #iditemOtrosCargos > .row { flex-wrap: wrap; row-gap: 6px; }

        html:not(#extr-page) .smart-form .sff-oc-factura #iditemOtrosCargos > .row > section:first-child { flex: 1 1 100%; }

        html:not(#extr-page) .smart-form .sff-oc-factura .sff-oc-monto { margin-left: auto; }
}


/* ===== Crear factura: tarjeta "Otros contenidos" (#otrosContenidos, bloque 5) — mismo marco que "Detalle otros cargos".
   Columnas con float: jQuery .show()/.hide() pone display en línea, por eso no se usa flex/grid en el contenedor. ===== */
html:not(#extr-page) .smart-form .sff-otc-factura {
    margin: 6px 0 0;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #D7E2E7;
    border-radius: 8px;
    padding: 10px 7px 4px;
}

    html:not(#extr-page) .smart-form .sff-otc-factura::after { content: ""; display: table; clear: both; }

    html:not(#extr-page) .smart-form .sff-otc-factura .sff-oc-titulo { display: block; font-size: 12px; color: #5B6B72; margin: 0 7px 4px; }

    html:not(#extr-page) .smart-form .sff-otc-factura > section {
        float: left;
        width: 33.333%;
        box-sizing: border-box;
        padding: 0 7px;
        margin: 0 0 10px;
    }

        html:not(#extr-page) .smart-form .sff-otc-factura > section .label { font-size: 12px; color: #0E3D52; margin-bottom: 4px; }

        /* Contenido principal (primer campo, viene lleno) */
        html:not(#extr-page) .smart-form .sff-otc-factura > section:first-of-type input { background: #EEF3F5; font-weight: 600; color: #0E3D52; }

@media (max-width: 767px) {
    html:not(#extr-page) .smart-form .sff-otc-factura > section { float: none; width: 100%; }
}


/* ===== Crear factura: tarjeta "Detalle exoneración" (#sffExoTarjeta, bloque 5) — mismo marco que otros cargos/contenidos; 2 columnas con float ===== */
html:not(#extr-page) .smart-form .sff-exo-factura {
    margin: 6px 0 0;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #D7E2E7;
    border-radius: 8px;
    padding: 10px 7px 4px;
}

    html:not(#extr-page) .smart-form .sff-exo-factura::after { content: ""; display: table; clear: both; }

    html:not(#extr-page) .smart-form .sff-exo-factura .sff-oc-titulo { display: block; font-size: 12px; color: #5B6B72; margin: 0 7px 4px; }

    html:not(#extr-page) .smart-form .sff-exo-factura > .row { margin: 0; }

        html:not(#extr-page) .smart-form .sff-exo-factura > .row > section {
            float: left;
            width: 50%;
            box-sizing: border-box;
            padding: 0 7px;
            margin: 0 0 10px;
        }

            html:not(#extr-page) .smart-form .sff-exo-factura > .row > section.col-md-12 { width: 100%; }

    html:not(#extr-page) .smart-form .sff-exo-factura .label { font-size: 12px; color: #0E3D52; margin-bottom: 4px; }

    html:not(#extr-page) .smart-form .sff-exo-factura .input,
    html:not(#extr-page) .smart-form .sff-exo-factura .input input,
    html:not(#extr-page) .smart-form .sff-exo-factura .input select { width: 100% !important; box-sizing: border-box; }

    /* Íconos: grises, verdes al enfocar el campo */
    html:not(#extr-page) .smart-form .sff-exo-factura .input .icon-prepend,
    html:not(#extr-page) .smart-form .sff-exo-factura .input .icon-append { color: #5B6B72; }

    html:not(#extr-page) .smart-form .sff-exo-factura .input:focus-within .icon-prepend,
    html:not(#extr-page) .smart-form .sff-exo-factura .input:focus-within .icon-append { color: #7FA512; }

    /* "%" del porcentaje: texto, no glifo de Font Awesome */
    html:not(#extr-page) .smart-form .sff-exo-factura .input .sff-exo-pct { font-family: inherit; font-style: normal; font-weight: 700; font-size: 13px; }

    /* Aviso del 2 de julio de 2020 */
    html:not(#extr-page) .smart-form .sff-exo-factura .sff-exo-aviso {
        display: block;
        margin: 0;
        padding: 8px 10px;
        background: #FFF8E6;
        border-left: 3px solid #CC7014;
        border-radius: 4px;
        font-size: 12px;
        line-height: 1.45;
        color: #5B4A2B;
    }

@media (max-width: 767px) {
    html:not(#extr-page) .smart-form .sff-exo-factura > .row > section { float: none; width: 100%; }
}


/* ===== Crear factura: tarjeta "Detalle Walmart" (#sffWalTarjeta, bloque 5) — mismo marco que las demás; 3 columnas parejas con float ===== */
html:not(#extr-page) .smart-form .sff-wal-factura {
    margin: 6px 0 0;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #D7E2E7;
    border-radius: 8px;
    padding: 10px 7px 4px;
}

    html:not(#extr-page) .smart-form .sff-wal-factura::after { content: ""; display: table; clear: both; }

    html:not(#extr-page) .smart-form .sff-wal-factura .sff-oc-titulo { display: block; font-size: 12px; color: #5B6B72; margin: 0 7px 4px; }

    html:not(#extr-page) .smart-form .sff-wal-factura > .row { margin: 0; }

        html:not(#extr-page) .smart-form .sff-wal-factura > .row > section {
            float: left;
            width: 33.333%;
            box-sizing: border-box;
            padding: 0 7px;
            margin: 0 0 10px;
        }

    html:not(#extr-page) .smart-form .sff-wal-factura .label { font-size: 12px; color: #0E3D52; margin-bottom: 4px; }

    html:not(#extr-page) .smart-form .sff-wal-factura .input,
    html:not(#extr-page) .smart-form .sff-wal-factura .input input { width: 100% !important; box-sizing: border-box; }

    html:not(#extr-page) .smart-form .sff-wal-factura .input .icon-prepend { color: #5B6B72; }

    html:not(#extr-page) .smart-form .sff-wal-factura .input:focus-within .icon-prepend { color: #7FA512; }

@media (max-width: 767px) {
    html:not(#extr-page) .smart-form .sff-wal-factura > .row > section { float: none; width: 100%; }
}


/* ===== Avisos (SweetAlert2) — global en TODAS las páginas (login incluido), opción C: encabezado de color con ícono y título en blanco =====
   Prefijo html:not(#sff-avisos): ese id no existe; solo da la misma especificidad que el resto del tema sin excluir #extr-page.
   El tipo sale de la clase que SweetAlert2 pone en el popup (swal2-icon-warning/error/success/info/question).
   Sin ícono (espera/cargando) → encabezado azul. Los toasts no se tocan. Textos "Aceptar"/"Cancelar": sff-avisos.js. */
html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) {
    width: 28em;
    max-width: calc(100% - 32px);
    padding: 0 0 18px;
    border-radius: 10px;
    overflow: hidden;
    font-family: inherit;
}

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-icon { display: none !important; }

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-title {
        margin: 0;
        padding: 14px 20px;
        background: #0E3D52;
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.3;
        text-align: left;
    }

        html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-title:before { font-family: FontAwesome; font-size: 18px; font-weight: 400; margin-right: 10px; vertical-align: -1px; }

    html:not(#sff-avisos) .swal2-popup.swal2-icon-warning:not(.swal2-toast) .swal2-title { background: #CC7014; }
        html:not(#sff-avisos) .swal2-popup.swal2-icon-warning:not(.swal2-toast) .swal2-title:before { content: "\f071"; }

    html:not(#sff-avisos) .swal2-popup.swal2-icon-error:not(.swal2-toast) .swal2-title { background: #A90329; }
        html:not(#sff-avisos) .swal2-popup.swal2-icon-error:not(.swal2-toast) .swal2-title:before { content: "\f057"; }

    html:not(#sff-avisos) .swal2-popup.swal2-icon-success:not(.swal2-toast) .swal2-title { border-bottom: 4px solid #94BE15; }
        html:not(#sff-avisos) .swal2-popup.swal2-icon-success:not(.swal2-toast) .swal2-title:before { content: "\f058"; color: #94BE15; }

    html:not(#sff-avisos) .swal2-popup.swal2-icon-info:not(.swal2-toast) .swal2-title:before { content: "\f05a"; }

    html:not(#sff-avisos) .swal2-popup.swal2-icon-question:not(.swal2-toast) .swal2-title:before { content: "\f059"; }

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-html-container {
        margin: 16px 20px 0;
        padding: 0;
        text-align: left;
        font-size: 14px;
        line-height: 1.5;
        color: #3E4D54;
    }

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-input,
    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-select,
    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-textarea { margin: 12px 20px 0; }

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-validation-message { margin: 12px 0 0; }

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-actions {
        justify-content: flex-end;
        gap: 8px;
        width: 100%;
        margin: 18px 0 0;
        padding: 0 20px;
        box-sizing: border-box;
    }

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-styled { margin: 0; padding: 7px 20px; border-radius: 6px; font-size: 13px; font-weight: 600; }

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-styled.swal2-confirm { background-color: #0E3D52 !important; color: #fff; }

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-styled.swal2-cancel,
    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-styled.swal2-deny { background-color: #fff !important; color: #0E3D52; border: 1px solid #D7E2E7; }

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-styled:focus { box-shadow: 0 0 0 3px rgba(148, 190, 21, .45); }

    /* Espera: el indicador de carga ocupa el centro */
    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-loading { justify-content: center; }

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-loader { border-color: #0E3D52 transparent #94BE15 transparent; }

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-footer {
        margin: 16px 20px 0;
        padding: 10px 0 0;
        justify-content: center;
        border-top: 1px solid #E1E7EA;
        font-size: 12px;
        color: #5B6B72;
        text-align: center;
    }

    html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-timer-progress-bar { background: rgba(14, 61, 82, .35); }

/* Resumen dentro de un aviso (ej. factura enviada: consecutivo, cliente, total) */
html:not(#sff-avisos) .sff-av-res { margin: 12px 0 0; padding: 10px 12px; background: #F5F7F8; border: 1px solid #E1E7EA; border-radius: 8px; font-size: 13px; }

    html:not(#sff-avisos) .sff-av-res > div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }

    html:not(#sff-avisos) .sff-av-res span { color: #5B6B72; white-space: nowrap; }

    html:not(#sff-avisos) .sff-av-res b { color: #0E3D52; text-align: right; overflow-wrap: anywhere; }

/* Títulos con tamaño fijo en línea (login.js DialogWarning: <span style="font-size: 20px">) → tamaño de la barra */
html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-title span[style] { font-size: inherit !important; }

/* Etiqueta de sección dentro de un aviso (ej. "Walmart", "Exoneración") */
html:not(#sff-avisos) .sff-av-sec { display: inline-block; margin: 0 0 8px; padding: 2px 10px; border-radius: 12px; background: #FDF1E4; color: #A45A10; font-size: 12px; font-weight: 700; }


/* ===== Crear factura: campo marcado por una validación (fnMarcarCampoValidacion); se quita al corregirlo ===== */
html:not(#extr-page) .smart-form .sff-campo-error input,
html:not(#extr-page) .smart-form .sff-campo-error select,
html:not(#extr-page) .smart-form .sff-campo-error textarea,
html:not(#extr-page) .smart-form .sff-campo-error .select2-container .select2-choice {
    border-color: #A90329 !important;
    background-color: #FFF7F8 !important;
    box-shadow: 0 0 0 3px rgba(169, 3, 41, .15) !important;
}

html:not(#extr-page) .smart-form .sff-campo-error-msg { display: block; margin-top: 4px; font-size: 12px; color: #A90329; }

    html:not(#extr-page) .smart-form .sff-campo-error-msg:before { content: "\f06a"; font-family: FontAwesome; margin-right: 5px; }


/* ===== Notificación pequeña (SweetAlert2 toast) — global: tarjeta blanca arriba a la derecha con borde de color;
   no bloquea y se cierra sola (ej. fnNotificacion en Crear factura) ===== */
html:not(#sff-avisos) .swal2-popup.swal2-toast {
    width: 22em;
    max-width: calc(100vw - 32px);
    padding: 10px 14px;
    background: #fff;
    border-left: 4px solid #0E3D52;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(14, 61, 82, .22);
    font-family: inherit;
}

    html:not(#sff-avisos) .swal2-popup.swal2-toast.swal2-icon-success { border-left-color: #94BE15; }
    html:not(#sff-avisos) .swal2-popup.swal2-toast.swal2-icon-error { border-left-color: #A90329; }
    html:not(#sff-avisos) .swal2-popup.swal2-toast.swal2-icon-warning { border-left-color: #CC7014; }

    html:not(#sff-avisos) .swal2-popup.swal2-toast .swal2-title { margin: 0 6px; padding: 0; background: none; color: #0E3D52; font-size: 14px; font-weight: 700; text-align: left; }

    html:not(#sff-avisos) .swal2-popup.swal2-toast .swal2-html-container { margin: 2px 6px 0; padding: 0; color: #5B6B72; font-size: 13px; text-align: left; }

    html:not(#sff-avisos) .swal2-popup.swal2-toast .swal2-icon { margin: 0 4px 0 0; transform: scale(.85); }

    html:not(#sff-avisos) .swal2-popup.swal2-toast .swal2-icon.swal2-success { border-color: #94BE15; color: #94BE15; }
        html:not(#sff-avisos) .swal2-popup.swal2-toast .swal2-icon.swal2-success [class^=swal2-success-line] { background-color: #94BE15; }
        html:not(#sff-avisos) .swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(148, 190, 21, .3); }

    html:not(#sff-avisos) .swal2-popup.swal2-toast .swal2-timer-progress-bar { background: #94BE15; }

/* Debajo del encabezado azul del sistema */
html:not(#sff-avisos) .swal2-container.swal2-top-end > .swal2-toast { margin-top: 52px; }

@media (max-width: 767px) {
    html:not(#sff-avisos) .swal2-container.swal2-top-end { padding: 12px 16px; }
    html:not(#sff-avisos) .swal2-popup.swal2-toast { width: 100%; }
}


/* ===== Ayuda guiada (Crear, Buscar y Editar factura; Intro.js 2.5, fnIniciarAyuda) — burbuja con encabezado azul, botones del tema.
   Solo con las clases propias (.sff-tour / .sff-tour-hl / body.sff-tour-activo): otras pantallas con Intro.js no cambian ===== */
html:not(#extr-page) body.sff-tour-activo .introjs-overlay { background: #0E3D52 !important; opacity: .55 !important; }

html:not(#extr-page) body.sff-tour-activo .introjs-helperNumberLayer { display: none !important; }

html:not(#extr-page) .introjs-helperLayer.sff-tour-hl {
    background: rgba(255, 255, 255, .92) !important;
    border: 2px solid #94BE15 !important;
    border-radius: 8px !important;
    box-shadow: 0 0 0 4px rgba(148, 190, 21, .25), 0 6px 20px rgba(0, 0, 0, .25) !important;
}

html:not(#extr-page) .introjs-tooltip.sff-tour {
    min-width: 300px !important;
    max-width: 360px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    overflow: hidden;
    font-family: inherit;
    box-shadow: 0 12px 32px rgba(14, 61, 82, .3) !important;
}

    html:not(#extr-page) .sff-tour .introjs-tooltiptext { padding: 0; }

    html:not(#extr-page) .sff-tour .sff-tour-head { padding: 12px 16px 10px; background: #0E3D52; color: #fff; }
        html:not(#extr-page) .sff-tour .sff-tour-head small { display: block; margin-bottom: 2px; font-size: 11px; color: #A9C3CE; }
        html:not(#extr-page) .sff-tour .sff-tour-head b { font-size: 15px; }

    html:not(#extr-page) .sff-tour .sff-tour-body { padding: 14px 16px 4px; font-size: 13px; line-height: 1.5; color: #3E4D54; }
        html:not(#extr-page) .sff-tour .sff-tour-body b { color: #0E3D52; }

    html:not(#extr-page) .sff-tour .introjs-progress { display: none; }

    html:not(#extr-page) .sff-tour .introjs-bullets { padding: 8px 0 0; }
        html:not(#extr-page) .sff-tour .introjs-bullets ul li a { width: 6px; height: 6px; background: #D7E2E7; }
        html:not(#extr-page) .sff-tour .introjs-bullets ul li a.active { width: 16px; background: #94BE15; }

    html:not(#extr-page) .sff-tour .introjs-tooltipbuttons {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 10px;
        padding: 10px 12px;
        border-top: 1px solid #E1E7EA;
    }

    html:not(#extr-page) .sff-tour .introjs-button {
        padding: 6px 14px;
        border-radius: 6px;
        background-image: none;
        box-shadow: none;
        text-shadow: none;
        font-family: inherit;
        font-size: 13px;
        font-weight: 600;
    }

    html:not(#extr-page) .sff-tour .introjs-skipbutton { margin-right: auto; padding-left: 4px; background: none; border: 0; color: #5B6B72; font-weight: 400; }
    html:not(#extr-page) .sff-tour .introjs-prevbutton { background: #fff; color: #0E3D52; border: 1px solid #D7E2E7; }
    html:not(#extr-page) .sff-tour .introjs-nextbutton { background: #0E3D52; color: #fff; border: 1px solid #0E3D52; }
    html:not(#extr-page) .sff-tour .introjs-disabled { opacity: .4; }

    /* Último paso: sin "Siguiente"; "Entendido" verde */
    html:not(#extr-page) .sff-tour .introjs-nextbutton.introjs-disabled { display: none; }
    html:not(#extr-page) .sff-tour .introjs-skipbutton.introjs-donebutton {
        order: 3;
        margin-left: auto;
        margin-right: 0;
        padding: 6px 16px;
        border-radius: 6px;
        background: #94BE15;
        color: #0E3D52;
        font-weight: 700;
    }

/* Móvil: burbuja fija abajo a todo el ancho (siempre visible con sus botones) */
@media (max-width: 767px) {
    html:not(#extr-page) .introjs-tooltip.sff-tour {
        position: fixed !important;
        top: auto !important;
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
    }

        html:not(#extr-page) .sff-tour .introjs-arrow { display: none !important; }
}

/* Paso sin campo (centrado): Intro.js 2.5 lo ubica a la mitad del documento; fijo = a la mitad de la pantalla */
html:not(#extr-page) body.sff-tour-activo .introjsFloatingElement { position: fixed !important; }


/* ===== Factura recurrente: misma tabla "Detalle Factura" (sff-detalle-factura) pero sin Num. lote / Fecha exp.:
   aquí Acciones es la columna 8 (en Crear factura es la 10). Solo se corrigen las posiciones. ===== */
html:not(#extr-page) .sff-detalle-factura.sff-detalle-recurrente #datatable_fixed_facturaDetalle thead th:nth-child(n+9) { width: auto !important; }
html:not(#extr-page) .sff-detalle-factura.sff-detalle-recurrente #datatable_fixed_facturaDetalle thead th:nth-child(8) { text-align: center; }
html:not(#extr-page) .sff-detalle-factura.sff-detalle-recurrente #datatable_fixed_facturaDetalle tbody td:nth-child(8) { text-align: center; white-space: nowrap; }

@media (max-width: 767px) {
    html:not(#extr-page) .sff-detalle-factura.sff-detalle-recurrente #datatable_fixed_facturaDetalle tbody td:nth-child(8) { grid-area: acc; grid-row: auto; grid-column: auto; text-align: right; }
        html:not(#extr-page) .sff-detalle-factura.sff-detalle-recurrente #datatable_fixed_facturaDetalle tbody td:nth-child(8)::before { content: none; display: none; }
        html:not(#extr-page) .sff-detalle-factura.sff-detalle-recurrente #datatable_fixed_facturaDetalle tbody td:nth-child(8) button { padding: 5px 10px; }
}

/* ---------- Aceptación manual: archivo XML, tarjeta "Resumen de la factura" y respuesta (v5.1) ---------- */
html:not(#extr-page) .smart-form .sff-ac-nota { font-size: 12px; color: #5B6B72; margin-top: 6px; }

html:not(#extr-page) .smart-form .sff-ac-archivo {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px dashed #9DB3BC;
    border-radius: 8px;
    padding: 10px 12px;
    background: #F7FAFB;
}
    html:not(#extr-page) .smart-form .sff-ac-archivo > i.fa-file-code-o { font-size: 22px; color: #0E3D52; }
    html:not(#extr-page) .smart-form .sff-ac-archivo .sff-ac-nombre { flex: 1; min-width: 0; }
        html:not(#extr-page) .smart-form .sff-ac-archivo .sff-ac-nombre span {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: #0E3D52;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        html:not(#extr-page) .smart-form .sff-ac-archivo .sff-ac-nombre small { display: block; font-size: 12px; color: #5B6B72; }

/* El input de archivo queda oculto; el botón es su etiqueta */
html:not(#extr-page) .smart-form .sff-ac-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

html:not(#extr-page) .smart-form label.sff-ac-btn {
    margin: 0;
    border: 1px solid #0E3D52;
    background: #fff;
    color: #0E3D52;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
    html:not(#extr-page) .smart-form label.sff-ac-btn:hover { background: #0E3D52; color: #fff; }

html:not(#extr-page) .smart-form .sff-ac-validar {
    margin-top: 10px;
    background: #0E3D52;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 8px 18px;
    font-weight: 600;
}
    html:not(#extr-page) .smart-form .sff-ac-validar:hover { background: #15556F; }
    html:not(#extr-page) .smart-form .sff-ac-validar i { margin-right: 6px; }

html:not(#extr-page) .smart-form .sff-ac-tarjeta {
    border: 1px solid #DCE6EA;
    border-radius: 10px;
    background: #fff;
    padding: 14px 16px;
    margin: 0 14px 6px;
}
html:not(#extr-page) .smart-form .sff-ac-partes { display: flex; gap: 16px; align-items: stretch; }
html:not(#extr-page) .smart-form .sff-ac-parte { flex: 1; min-width: 0; }
html:not(#extr-page) .smart-form .sff-ac-et { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #5B6B72; margin-bottom: 4px; }
html:not(#extr-page) .smart-form .sff-ac-nom { font-size: 15px; font-weight: 700; color: #0E3D52; word-break: break-word; }
html:not(#extr-page) .smart-form .sff-ac-ced { font-size: 12px; color: #5B6B72; margin-top: 2px; }
html:not(#extr-page) .smart-form .sff-ac-flecha { align-self: center; color: #9DB3BC; font-size: 18px; }
html:not(#extr-page) .smart-form .sff-ac-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    padding: 2px 8px;
    margin-top: 6px;
    background: #EEF6D6;
    color: #4C6308;
}
html:not(#extr-page) .smart-form .sff-ac-sep { border-top: 1px solid #EEF2F4; margin: 12px 0; }
html:not(#extr-page) .smart-form .sff-ac-datos { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; }
html:not(#extr-page) .smart-form .sff-ac-v { font-size: 13px; font-weight: 600; color: #0E3D52; }
html:not(#extr-page) .smart-form .sff-ac-clave .sff-ac-v { font-family: Consolas, monospace; font-size: 12px; font-weight: 400; word-break: break-all; }
html:not(#extr-page) .smart-form .sff-ac-total { margin-left: auto; text-align: right; }
    html:not(#extr-page) .smart-form .sff-ac-total .sff-ac-v { font-size: 22px; font-weight: 800; }
html:not(#extr-page) .smart-form .sff-ac-cont { font-size: 11px; color: #5B6B72; text-align: right; margin-top: 3px; }

@media (max-width: 767px) {
    html:not(#extr-page) .smart-form .sff-ac-partes { flex-direction: column; gap: 10px; }
    html:not(#extr-page) .smart-form .sff-ac-flecha { transform: rotate(90deg); align-self: flex-start; margin-left: 6px; }
    html:not(#extr-page) .smart-form .sff-ac-total { margin-left: 0; text-align: left; width: 100%; }
    html:not(#extr-page) .smart-form .sff-ac-tarjeta { margin: 0 0 6px; }
}

/* ---------- Aceptación manual (fase 4, v5.2): archivo marcado por validación, cédula del chip y botón de peligro ---------- */
html:not(#extr-page) .smart-form .sff-campo-error .sff-ac-archivo {
    border-color: #A90329;
    border-style: solid;
    background-color: #FFF7F8;
    box-shadow: 0 0 0 3px rgba(169, 3, 41, .15);
}
html:not(#extr-page) .smart-form .sff-ac-chip .sff-ac-chip-ced { white-space: nowrap; }

/* Confirmación de acciones destructivas (p. ej. "Sí, rechazar"): el tema fuerza el azul en .swal2-confirm */
html:not(#sff-avisos) .swal2-popup:not(.swal2-toast) .swal2-styled.swal2-confirm.sff-av-peligro { background-color: #A90329 !important; }

/* ---------- Facturas desde correo (Aceptacion/Documentos): banda, filtros, barra de selección, tabla y tarjetas (v5.3) ---------- */
html:not(#extr-page) .sff-dc-banda {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    background: #EEF4F6;
    border: 1px solid #D6E3E8;
    border-radius: 8px;
    padding: 9px 14px;
    margin: 0 0 14px;
    font-size: 13px;
    color: #0E3D52;
}
    html:not(#extr-page) .sff-dc-banda > i { font-size: 16px; }
    html:not(#extr-page) .sff-dc-banda a { color: #0E3D52; font-weight: 700; }
    html:not(#extr-page) .sff-dc-banda small { color: #5B6B72; margin-left: auto; }
html:not(#extr-page) .sff-dc-copiar,
html:not(#extr-page) .sff-dc-btn {
    border: 1px solid #0E3D52;
    background: #fff;
    color: #0E3D52;
    border-radius: 6px;
    font-weight: 600;
}
html:not(#extr-page) .sff-dc-copiar { padding: 2px 10px; font-size: 12px; }

html:not(#extr-page) .sff-dc-panel {
    background: #fff;
    border: 1px solid #DCE6EA;
    border-radius: 10px;
    margin-bottom: 14px;
}

/* Filtros en una fila */
html:not(#extr-page) .smart-form.sff-dc-form { background: transparent; }
/* Cuadrícula fija: etiquetas arriba y campos en la misma línea (antes flex-wrap dejaba campos sueltos y desalineados) */
html:not(#extr-page) .smart-form .sff-dc-filtros { display: grid; grid-template-columns: minmax(180px, 1.3fr) auto minmax(150px, 1fr) auto; gap: 10px 14px; align-items: start; padding: 14px 14px 6px; }
/* Facturas procesadas: un filtro más (Estado) */
html:not(#extr-page) .smart-form .sff-dc-filtros.sff-dc-filtros-2 { grid-template-columns: minmax(180px, 1.3fr) auto minmax(140px, 1fr) minmax(140px, 1fr) auto; }
html:not(#extr-page) .smart-form .sff-dc-f { display: flex; flex-direction: column; min-width: 0; }
    html:not(#extr-page) .smart-form .sff-dc-f > .label { margin-bottom: 4px; }
html:not(#extr-page) .smart-form .sff-dc-emisor { min-width: 0; }
html:not(#extr-page) .smart-form .sff-dc-tipo { min-width: 0; }
html:not(#extr-page) .smart-form .sff-dc-rango { display: flex; align-items: center; gap: 6px; }
    html:not(#extr-page) .smart-form .sff-dc-rango label.input { width: 140px; }
html:not(#extr-page) .smart-form .sff-dc-atajos { display: flex; gap: 6px; margin-top: 6px; }
    html:not(#extr-page) .smart-form .sff-dc-atajos button {
        font-size: 11px;
        border: 1px solid #C9D6DC;
        border-radius: 12px;
        padding: 1px 9px;
        background: #fff;
        color: #0E3D52;
    }
        html:not(#extr-page) .smart-form .sff-dc-atajos button.on { background: #0E3D52; border-color: #0E3D52; color: #fff; font-weight: 600; }
        /* Opción B: azul suave sin seleccionar */
        html:not(#extr-page) .smart-form .sff-dc-atajos button:not(.on) { background: #E8F0F3; border-color: #D2E0E6; color: #0E3D52; font-weight: 600; }
        html:not(#extr-page) .smart-form .sff-dc-atajos button:not(.on):hover { background: #D7E5EB; }
/* El botón baja la altura de una etiqueta para quedar en línea con los campos */
html:not(#extr-page) .smart-form .sff-dc-botones { display: flex; gap: 8px; justify-content: flex-end; padding-top: 23px; }
html:not(#extr-page) .smart-form .sff-dc-btn { box-sizing: border-box; height: 32px; padding: 0 14px; font-size: 13px; }
    html:not(#extr-page) .smart-form .sff-dc-btn.sff-dc-prim { background: #0E3D52; color: #fff; }
    html:not(#extr-page) .smart-form .sff-dc-btn i { margin-right: 4px; }
html:not(#extr-page) .smart-form .sff-dc-enlaces { display: flex; gap: 16px; padding: 0 14px 12px; font-size: 12px; }
    html:not(#extr-page) .smart-form .sff-dc-enlaces a { color: #0E3D52; font-weight: 600; cursor: pointer; }
    html:not(#extr-page) .smart-form .sff-dc-enlaces span { color: #5B6B72; }
html:not(#extr-page) .smart-form .sff-dc-mas { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; padding: 0 14px 12px; }
    html:not(#extr-page) .smart-form .sff-dc-mas.abierto { display: grid; }
    html:not(#extr-page) .smart-form .sff-dc-mas .sff-dc-f { min-width: 0; }

/* Pantallas medianas: dos columnas ordenadas y los botones en su propia fila a la derecha */
@media (max-width: 1199px) {
    html:not(#extr-page) .smart-form .sff-dc-filtros,
    html:not(#extr-page) .smart-form .sff-dc-filtros.sff-dc-filtros-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html:not(#extr-page) .smart-form .sff-dc-botones { grid-column: 1 / -1; padding-top: 0; }
}

/* Barra de selección */
html:not(#extr-page) .sff-dc-sel {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    background: #0E3D52;
    color: #fff;
    border-radius: 8px;
    padding: 9px 14px;
    margin-bottom: 10px;
    font-size: 13px;
}
    html:not(#extr-page) .sff-dc-sel.visible { display: flex; }
    html:not(#extr-page) .sff-dc-sel b { font-size: 14px; }
    html:not(#extr-page) .sff-dc-sel a { color: #CFE3EA; text-decoration: underline; font-size: 12px; cursor: pointer; }
    html:not(#extr-page) .sff-dc-sel .sff-dc-btn { margin-left: auto; height: 32px; padding: 0 14px; background: #8CC63E; border-color: #8CC63E; color: #0E3D52; }

/* Tabla */
html:not(#extr-page) .sff-dc-panel .dataTables_wrapper .dt-toolbar,
html:not(#extr-page) .sff-dc-panel .dataTables_wrapper .dt-toolbar-footer { background: transparent; border: 0; padding: 8px 14px; }
/* Buscador de la lista con el estilo de los demás campos: lupa y sugerencia dentro del campo (antes "Buscar en la lista:" con una caja simple) */
html:not(#extr-page) .sff-dc-panel .dataTables_filter { float: none; text-align: left; }
    html:not(#extr-page) .sff-dc-panel .dataTables_filter label { position: relative; display: block; width: 100%; max-width: 380px; margin: 0; font-weight: 400; }
        html:not(#extr-page) .sff-dc-panel .dataTables_filter label::before { content: "\f002"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-family: FontAwesome; font-size: 13px; color: #5B6B72; pointer-events: none; }
    html:not(#extr-page) .sff-dc-panel .dataTables_filter input { width: 100% !important; height: 34px; margin: 0 !important; padding: 6px 10px 6px 30px; border: 1px solid #C9D3D8; border-radius: 4px; background: #fff; color: #0E3D52; font-size: 13px; box-shadow: none; }
        html:not(#extr-page) .sff-dc-panel .dataTables_filter input:focus { border-color: #0E3D52; outline: none; }
        html:not(#extr-page) .sff-dc-panel .dataTables_filter input::placeholder { color: #8A989F; }
html:not(#extr-page) table.sff-dc-tabla { width: 100% !important; margin: 0 !important; border-collapse: separate; border-spacing: 0; font-size: 13px; }
    html:not(#extr-page) table.sff-dc-tabla > thead > tr > th {
        background: #F5F7F8;
        color: #5B6B72;
        font-weight: 600;
        font-size: 12px;
        padding: 9px 10px;
        border: 0;
        border-bottom: 1px solid #E1E7EA;
    }
    html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td { padding: 10px; border: 0; border-bottom: 1px solid #EEF2F4; vertical-align: middle; color: #0E3D52; background: #fff; }
    html:not(#extr-page) table.sff-dc-tabla > tbody > tr.sff-dc-marcada > td { background: #F3F9E8; }
    html:not(#extr-page) table.sff-dc-tabla .sff-dc-chk { width: 34px; text-align: center; }
    html:not(#extr-page) table.sff-dc-tabla .sff-dc-pnom { font-weight: 700; }
    html:not(#extr-page) table.sff-dc-tabla .sff-dc-sub { font-size: 11px; color: #5B6B72; }
    html:not(#extr-page) table.sff-dc-tabla .sff-dc-tipo { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 8px; background: #E8F0F3; color: #0E3D52; }
    html:not(#extr-page) table.sff-dc-tabla .sff-dc-total { text-align: right; font-weight: 700; white-space: nowrap; }
    html:not(#extr-page) table.sff-dc-tabla .sff-dc-acc { white-space: nowrap; text-align: right; }
        html:not(#extr-page) table.sff-dc-tabla .sff-dc-acc button { width: 30px; height: 30px; border: 1px solid #C9D6DC; background: #fff; border-radius: 6px; color: #0E3D52; margin-left: 4px; padding: 0; }
            html:not(#extr-page) table.sff-dc-tabla .sff-dc-acc button:hover { background: #0E3D52; color: #fff; }
html:not(#extr-page) .sff-dc-plazo { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 2px 9px; white-space: nowrap; background: #EEF2F4; color: #5B6B72; }
    html:not(#extr-page) .sff-dc-plazo.sff-dc-ok { background: #EEF6D6; color: #4C6308; }
    html:not(#extr-page) .sff-dc-plazo.sff-dc-pronto { background: #FFF1DC; color: #8A5200; }
    html:not(#extr-page) .sff-dc-plazo.sff-dc-hoy { background: #FBE3E6; color: #A90329; }

@media (max-width: 767px) {
    html:not(#extr-page) .sff-dc-banda small { margin-left: 0; width: 100%; }
    html:not(#extr-page) .smart-form .sff-dc-filtros,
    html:not(#extr-page) .smart-form .sff-dc-filtros.sff-dc-filtros-2,
    html:not(#extr-page) .smart-form .sff-dc-mas { grid-template-columns: minmax(0, 1fr); }
    html:not(#extr-page) .smart-form .sff-dc-rango label.input { flex: 1 1 0; width: 0; min-width: 0; }
    html:not(#extr-page) .smart-form .sff-dc-botones { padding-top: 0; }
        html:not(#extr-page) .smart-form .sff-dc-botones .sff-dc-btn { flex: 1; }
    /* La barra de selección queda fija abajo para tener "Procesar" a mano */
    html:not(#extr-page) .sff-dc-sel.visible { position: fixed; left: 10px; right: 10px; bottom: 84px; margin: 0; z-index: 900; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
    html:not(#extr-page) body.sff-dc-con-seleccion #replacetable { padding-bottom: 110px; }
    /* Tarjetas */
    html:not(#extr-page) table.sff-dc-tabla > thead { display: none; }
    html:not(#extr-page) table.sff-dc-tabla,
    html:not(#extr-page) table.sff-dc-tabla > tbody { display: block; width: 100%; }
        html:not(#extr-page) table.sff-dc-tabla > tbody > tr {
            position: relative;
            display: grid;
            grid-template-columns: 1fr auto;
            grid-template-areas: "prov prov" "doc doc" "fecha fecha" "plazo tot" "acc acc";
            column-gap: 10px;
            border: 1px solid #E1E7EA;
            border-radius: 10px;
            margin: 0 10px 10px;
            padding: 10px 12px 10px 40px;
            background: #fff;
        }
            html:not(#extr-page) table.sff-dc-tabla > tbody > tr.sff-dc-marcada { background: #F3F9E8; border-color: #C9E3A0; }
            html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td { display: block; padding: 2px 0; border: 0; background: transparent !important; }
            html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td.sff-dc-chk { position: absolute; left: 12px; top: 12px; width: auto; }
            html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td:nth-child(2) { grid-area: prov; }
            html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td:nth-child(3) { grid-area: doc; }
                html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td:nth-child(3) .sff-dc-sub { display: inline; margin-left: 6px; }
            html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td:nth-child(4) { grid-area: fecha; font-size: 12px; color: #5B6B72; }
                html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td:nth-child(4)::before { content: "Emisión "; font-weight: 600; }
                html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td.dataTables_empty::before { content: none; }
            html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td:nth-child(5) { grid-area: plazo; align-self: center; }
            html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td.sff-dc-total { grid-area: tot; align-self: center; font-size: 16px; }
            html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td.sff-dc-acc { grid-area: acc; margin-top: 4px; }
            /* Fila "sin datos" de DataTables */
            html:not(#extr-page) table.sff-dc-tabla > tbody > tr > td.dataTables_empty { grid-column: 1 / -1; text-align: center; }
}

/* ---------- Facturas procesadas (Aceptacion/List): subtítulo, chips por estado, respuesta y estado en Hacienda (v5.5) ---------- */
html:not(#extr-page) .sff-lp-sub { font-size: 13px; color: #5B6B72; margin: 0 0 12px; }
    html:not(#extr-page) .sff-lp-sub b { color: #0E3D52; }
html:not(#extr-page) .sff-lp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
html:not(#extr-page) .sff-lp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #DCE6EA;
    background: #fff;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #0E3D52;
}
    html:not(#extr-page) .sff-lp-chip b { font-size: 13px; }
    html:not(#extr-page) .sff-lp-chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
    html:not(#extr-page) .sff-lp-chip.on { background: #0E3D52; border-color: #0E3D52; color: #fff; }
html:not(#extr-page) .sff-lp-p-ok { background: #8CC63E; }
html:not(#extr-page) .sff-lp-p-err { background: #A90329; }
html:not(#extr-page) .sff-lp-p-proc { background: #E8A33C; }
html:not(#extr-page) .sff-lp-p-otro { background: #9DB3BC; }
html:not(#extr-page) .sff-lp-resp { font-size: 12px; font-weight: 600; color: #0E3D52; }
    html:not(#extr-page) .sff-lp-resp.sff-lp-rechazo { color: #A90329; }
html:not(#extr-page) .sff-lp-est { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 2px 9px; white-space: nowrap; background: #EEF2F4; color: #5B6B72; }
    html:not(#extr-page) .sff-lp-est.sff-lp-e-ok { background: #EEF6D6; color: #4C6308; }
    html:not(#extr-page) .sff-lp-est.sff-lp-e-err { background: #FBE3E6; color: #A90329; }
    html:not(#extr-page) .sff-lp-est.sff-lp-e-proc { background: #FFF1DC; color: #8A5200; }
    html:not(#extr-page) .sff-lp-est.sff-lp-e-env { background: #E3EEF7; color: #1F5F8B; }
/* El proveedor no se parte en tantas líneas */
html:not(#extr-page) table.sff-lp-tabla > tbody > tr > td:first-child { min-width: 180px; }

@media (max-width: 767px) {
    /* Tarjetas sin casilla: Proveedor / Documento / Emisión / Respuesta / Estado + Total / Acciones */
    html:not(#extr-page) table.sff-lp-tabla > tbody > tr {
        grid-template-areas: "prov prov" "doc doc" "fecha fecha" "resp resp" "est tot" "acc acc";
        padding: 10px 12px;
    }
        html:not(#extr-page) table.sff-lp-tabla > tbody > tr > td:nth-child(1) { grid-area: prov; min-width: 0; }
        html:not(#extr-page) table.sff-lp-tabla > tbody > tr > td:nth-child(2) { grid-area: doc; }
        html:not(#extr-page) table.sff-lp-tabla > tbody > tr > td:nth-child(3) { grid-area: fecha; font-size: 12px; color: #5B6B72; }
        html:not(#extr-page) table.sff-lp-tabla > tbody > tr > td:nth-child(4) { display: none; }
        html:not(#extr-page) table.sff-lp-tabla > tbody > tr > td:nth-child(5) { grid-area: resp; }
        html:not(#extr-page) table.sff-lp-tabla > tbody > tr > td:nth-child(6) { grid-area: est; align-self: center; }
}

/* ---------- Calendario (Calendario/IndexCalendario): panel, barra, leyenda, eventos y ventanas (v5.6) ---------- */
/* Tipos de evento: los 6 valores que guarda el servidor (bg-color-*) con nombre y tono propio */
html:not(#extr-page) .sff-cal-c-darken { --c: #0E3D52; --t: #E6EDF0; }
html:not(#extr-page) .sff-cal-c-blue { --c: #2F6FB2; --t: #E4EEF8; }
html:not(#extr-page) .sff-cal-c-greenLight { --c: #6E9A0E; --t: #EEF5DA; }
html:not(#extr-page) .sff-cal-c-orange { --c: #CC7014; --t: #FBEEDF; }
html:not(#extr-page) .sff-cal-c-blueLight { --c: #2A93B5; --t: #E1F2F7; }
html:not(#extr-page) .sff-cal-c-red { --c: #A90329; --t: #F8E3E8; }

html:not(#extr-page) .sff-cal-banda {
    display: flex;
    align-items: center;
    gap: 8px 10px;
    background: #EEF4F6;
    border: 1px solid #D6E3E8;
    border-radius: 8px;
    padding: 9px 14px;
    margin: 0 0 14px;
    font-size: 13px;
    color: #0E3D52;
}
    html:not(#extr-page) .sff-cal-banda > i { font-size: 16px; }
    html:not(#extr-page) .sff-cal-banda small { color: #5B6B72; margin-left: auto; white-space: nowrap; }
html:not(#extr-page) .sff-cal-movil { display: none; }

html:not(#extr-page) .sff-cal-panel {
    background: #fff;
    border: 1px solid #DCE6EA;
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
}
html:not(#extr-page) .sff-cal-barra {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 18px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #E1E7EA;
}
html:not(#extr-page) .sff-cal-emisor { flex: 0 1 280px; min-width: 200px; }
    html:not(#extr-page) .sff-cal-emisor label { display: block; font-size: 12px; font-weight: 600; color: #5B6B72; margin-bottom: 4px; }
    html:not(#extr-page) .sff-cal-emisor select { height: 32px; border-radius: 6px; }
/* SmartAdmin pone #calendar-buttons en posición absoluta (arriba a la derecha): aquí va dentro de la barra */
html:not(#extr-page) .sff-cal-nav { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; position: static; top: auto; right: auto; }
    html:not(#extr-page) .sff-cal-nav .btn {
        height: 32px;
        min-width: 32px;
        border: 1px solid #C9D6DC;
        background: #fff;
        color: #0E3D52;
        border-radius: 6px;
        font-weight: 600;
        padding: 0 10px;
    }
        html:not(#extr-page) .sff-cal-nav .btn:hover { background: #E8F0F3; }
    html:not(#extr-page) .sff-cal-nav h3 {
        margin: 0 0 0 8px;
        font-size: 19px;
        font-weight: 700;
        color: #0E3D52;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
html:not(#extr-page) .sff-cal-vistas { display: inline-flex; border: 1px solid #0E3D52; border-radius: 6px; overflow: hidden; }
    html:not(#extr-page) .sff-cal-vistas button {
        height: 30px;
        border: 0;
        border-left: 1px solid #0E3D52;
        background: #fff;
        color: #0E3D52;
        font-weight: 600;
        padding: 0 14px;
    }
        html:not(#extr-page) .sff-cal-vistas button:first-child { border-left: 0; }
        html:not(#extr-page) .sff-cal-vistas button.on { background: #0E3D52; color: #fff; }
html:not(#extr-page) .sff-cal-leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 9px 16px;
    font-size: 12px;
    color: #5B6B72;
    border-bottom: 1px solid #E1E7EA;
    background: #FAFBFC;
}
    html:not(#extr-page) .sff-cal-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
    html:not(#extr-page) .sff-cal-leyenda i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* FullCalendar: el encabezado propio reemplaza al del plugin */
html:not(#extr-page) #calendar.sff-cal { padding: 10px 12px 14px; }
html:not(#extr-page) #calendar.sff-cal .fc-header { display: none; }
html:not(#extr-page) #calendar.sff-cal th { background: #F5F7F8; color: #5B6B72; font-weight: 600; font-size: 12px; border-color: #E1E7EA; }
html:not(#extr-page) #calendar.sff-cal td { border-color: #E1E7EA; }
html:not(#extr-page) #calendar.sff-cal .fc-today { background: #F3F8E4; }
/* Días anteriores a hoy (no se pueden agregar eventos): gris suave y número atenuado (v5.9) */
html:not(#extr-page) #calendar.sff-cal td.fc-past { background-color: #F1F3F4; }
    html:not(#extr-page) #calendar.sff-cal td.fc-past .fc-day-number { color: #9AA8AE; }
html:not(#extr-page) #calendar.sff-cal .fc-day-number { color: #0E3D52; font-weight: 600; font-size: 12px; }
html:not(#extr-page) #calendar.sff-cal .fc-today .fc-day-number { background: #94BE15; border-radius: 10px; padding: 1px 7px; }
html:not(#extr-page) #calendar.sff-cal .fc-agenda-axis { color: #5B6B72; font-size: 11px; }
html:not(#extr-page) #calendar.sff-cal .fc-event {
    border: 0 !important;
    border-left: 3px solid var(--c, #0E3D52) !important;
    background: var(--t, #E6EDF0) !important;
    color: #14303D !important;
    border-radius: 5px;
    padding: 2px 6px;
    font-size: 12px;
    box-shadow: none;
}
    html:not(#extr-page) #calendar.sff-cal .fc-event * { color: inherit !important; }
/* Esquina recta del lado del borde de color (redondeada se veía como un paréntesis) (v5.8) */
html:not(#extr-page) #calendar.sff-cal .fc-event { border-radius: 0 4px 4px 0; }
/* Eventos cortos (< 30 px, marcados en eventAfterRender): hora y título en una línea, sin relleno vertical */
html:not(#extr-page) #calendar.sff-cal .fc-event.sff-ev-corto { padding: 0 6px; }
    html:not(#extr-page) #calendar.sff-cal .fc-event.sff-ev-corto .fc-event-inner { display: flex; align-items: center; height: 100%; overflow: hidden; }
    html:not(#extr-page) #calendar.sff-cal .fc-event.sff-ev-corto .fc-event-time { line-height: 1.2; font-size: 11px; }
    html:not(#extr-page) #calendar.sff-cal .fc-event .fc-event-time { font-weight: 700; color: var(--c, #0E3D52) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    html:not(#extr-page) #calendar.sff-cal .fc-event .fc-event-title { font-weight: 600; }
html:not(#extr-page) #calendar.sff-cal .fc-event.bg-color-darken { --c: #0E3D52; --t: #E6EDF0; }
html:not(#extr-page) #calendar.sff-cal .fc-event.bg-color-blue { --c: #2F6FB2; --t: #E4EEF8; }
html:not(#extr-page) #calendar.sff-cal .fc-event.bg-color-greenLight { --c: #6E9A0E; --t: #EEF5DA; }
html:not(#extr-page) #calendar.sff-cal .fc-event.bg-color-orange { --c: #CC7014; --t: #FBEEDF; }
html:not(#extr-page) #calendar.sff-cal .fc-event.bg-color-blueLight { --c: #2A93B5; --t: #E1F2F7; }
html:not(#extr-page) #calendar.sff-cal .fc-event.bg-color-red { --c: #A90329; --t: #F8E3E8; }

/* Ventanas Nuevo evento / Evento */
html:not(#extr-page) .sff-cal-modal .modal-dialog { width: 560px; max-width: calc(100% - 20px); }
html:not(#extr-page) .sff-cal-modal .modal-content { border: 0; border-radius: 10px; overflow: hidden; }
html:not(#extr-page) .sff-cal-modal .modal-header { background: #0E3D52; padding: 12px 16px; border: 0; }
    html:not(#extr-page) .sff-cal-modal .modal-header .close { color: #fff; opacity: .8; text-shadow: none; }
    html:not(#extr-page) .sff-cal-modal .modal-title { font-size: 16px; font-weight: 700; color: #fff; }
html:not(#extr-page) .sff-cal-modal .modal-body { padding: 16px; }
html:not(#extr-page) .sff-cal-modal .modal-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F5F7F8;
    border-top: 1px solid #E1E7EA;
    padding: 10px 16px;
}
    html:not(#extr-page) .sff-cal-modal .modal-footer .btn { margin: 0; }
    html:not(#extr-page) .sff-cal-modal .modal-footer .btn-ayuda,
    html:not(#extr-page) .sff-cal-modal .modal-footer .sff-cal-btn-borrar { margin-right: auto; }
html:not(#extr-page) .sff-cal-modal .sff-cal-btn-prim { background: #94BE15; border-color: #94BE15; color: #0E3D52; font-weight: 700; }
    html:not(#extr-page) .sff-cal-modal .sff-cal-btn-prim:hover { background: #7FA512; border-color: #7FA512; color: #0E3D52; }
html:not(#extr-page) .sff-cal-modal .sff-cal-btn-borrar { background: #fff; border: 1px solid #A90329; color: #A90329; font-weight: 600; }
    html:not(#extr-page) .sff-cal-modal .sff-cal-btn-borrar:hover { background: #F8E3E8; color: #A90329; }
html:not(#extr-page) .sff-ev-cuando {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F3F8E4;
    border: 1px solid #DDE9B8;
    border-radius: 8px;
    padding: 8px 12px;
    color: #0E3D52;
    font-weight: 600;
    margin-bottom: 14px;
}
    html:not(#extr-page) .sff-ev-cuando small { display: block; font-weight: 400; color: #5B6B72; }
html:not(#extr-page) .sff-ev-chip { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; border-radius: 12px; padding: 2px 10px; font-size: 12px; font-weight: 600; background: var(--t); color: var(--c); white-space: nowrap; }
    html:not(#extr-page) .sff-ev-chip i { width: 9px; height: 9px; border-radius: 2px; background: var(--c); }
html:not(#extr-page) .sff-ev-campo { margin-bottom: 12px; }
    html:not(#extr-page) .sff-ev-campo > label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: #5B6B72; margin-bottom: 4px; }
    html:not(#extr-page) .sff-ev-cont { font-weight: 400; }
    html:not(#extr-page) .sff-ev-campo .form-control { border-radius: 6px; }
html:not(#extr-page) .sff-ev-tipos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
    html:not(#extr-page) .sff-ev-tipos label {
        display: flex;
        align-items: center;
        gap: 7px;
        border: 1px solid #DCE6EA;
        border-radius: 6px;
        padding: 6px 8px;
        margin: 0;
        font-size: 12px;
        font-weight: 600;
        color: #14303D;
        cursor: pointer;
    }
        html:not(#extr-page) .sff-ev-tipos label i { width: 12px; height: 12px; border-radius: 3px; flex: none; background: var(--c); }
        html:not(#extr-page) .sff-ev-tipos label input { position: absolute; opacity: 0; pointer-events: none; }
        html:not(#extr-page) .sff-ev-tipos label.on { border-color: var(--c); background: var(--t); box-shadow: inset 0 0 0 1px var(--c); }
/* Hora de inicio y fin al modificar un evento */
html:not(#extr-page) .sff-ev-horas { display: flex; align-items: center; gap: 8px; }
    html:not(#extr-page) .sff-ev-horas select { flex: 1 1 0; min-width: 0; }
    html:not(#extr-page) .sff-ev-horas span { color: #5B6B72; font-size: 12px; }
html:not(#extr-page) .sff-ev-nota { display: none; margin-top: 4px; color: #5B6B72; font-size: 11px; }
    html:not(#extr-page) .sff-ev-campo.sff-ev-bloqueado .sff-ev-nota { display: block; }

/* Ayuda en la banda y validación dentro de las ventanas (v5.7) */
html:not(#extr-page) .sff-cal-banda #sffCalAyuda { flex: none; padding: 3px 12px; }
html:not(#extr-page) .sff-cal-modal .sff-campo-error .form-control,
html:not(#extr-page) .sff-cal-modal .sff-campo-error .form-control:focus { border-color: #A90329 !important; box-shadow: 0 0 0 2px rgba(169, 3, 41, .12) !important; }
html:not(#extr-page) .sff-cal-modal .sff-campo-error > label { color: #A90329; }
html:not(#extr-page) .sff-cal-modal .sff-campo-error-msg { display: block; margin-top: 4px; font-size: 12px; color: #A90329; }
    html:not(#extr-page) .sff-cal-modal .sff-campo-error-msg:before { content: "\f06a"; font-family: FontAwesome; margin-right: 5px; }
/* Ayuda sobre una ventana abierta: la capa oscura de Intro.js taparía la ventana (queda dentro del z-index del modal);
   se usa el fondo oscuro de la ventana y el elemento del paso se marca con borde verde */
html:not(#extr-page) body.sff-tour-ventana .introjs-overlay,
html:not(#extr-page) body.sff-tour-ventana .introjs-helperLayer { display: none !important; }
html:not(#extr-page) body.sff-tour-ventana .introjs-showElement { outline: 3px solid #94BE15; outline-offset: 3px; border-radius: 6px; }

@media (max-width: 767px) {
    html:not(#extr-page) .sff-cal-pc { display: none; }
    html:not(#extr-page) .sff-cal-movil { display: inline; }
    html:not(#extr-page) .sff-cal-banda small { display: none; }
    html:not(#extr-page) .sff-cal-banda #sffCalAyuda { margin-left: auto; }
    html:not(#extr-page) .sff-cal-barra { padding: 12px; gap: 10px; }
    html:not(#extr-page) .sff-cal-emisor { flex: 1 1 100%; }
    html:not(#extr-page) .sff-cal-nav { flex: 1 1 100%; }
        html:not(#extr-page) .sff-cal-nav h3 { font-size: 16px; margin-left: auto; }
    html:not(#extr-page) .sff-cal-vistas { display: flex; width: 100%; }
        html:not(#extr-page) .sff-cal-vistas button { flex: 1; }
    html:not(#extr-page) .sff-cal-leyenda { padding: 8px 12px; gap: 4px 10px; }
    html:not(#extr-page) #calendar.sff-cal { padding: 6px 4px 10px; }
    html:not(#extr-page) .sff-ev-tipos { grid-template-columns: repeat(2, 1fr); }
    html:not(#extr-page) .sff-cal-modal .modal-dialog { margin: 10px auto; }
}

/* ---------- Lista de clientes (cliente/IndexClient) ---------- */
/* Filtros en cuadrícula de dos columnas del mismo ancho (una en móvil); los ids no cambian (los usan el JS y la ayuda) */
html:not(#extr-page) .sff-filtros-clientes fieldset {
    padding: 16px 13px 2px;
}

html:not(#extr-page) .sff-filtros-clientes fieldset > .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 26px;
    margin: 0;
}

    html:not(#extr-page) .sff-filtros-clientes fieldset > .row::before,
    html:not(#extr-page) .sff-filtros-clientes fieldset > .row::after {
        display: none; /* el clearfix de .row ocupaba celdas de la cuadrícula */
    }

    html:not(#extr-page) .sff-filtros-clientes fieldset > .row > section {
        float: none;
        width: auto;
        margin-bottom: 14px;
        padding: 0;
    }

html:not(#extr-page) .sff-filtros-clientes select.form-control {
    width: 100%;
}

/* Panel de resultados: botón "Nuevo cliente" en la barra */
html:not(#extr-page) .sff-btn-nuevo-cliente {
    float: right;
    height: 24px;
    margin: 5px 6px 0 0;
    padding: 0 12px;
    border-radius: 4px;
    background: #94BE15;
    color: #0E3D52;
    font-size: 12px;
    font-weight: 600;
    line-height: 24px;
}

    html:not(#extr-page) .sff-btn-nuevo-cliente:hover,
    html:not(#extr-page) .sff-btn-nuevo-cliente:focus {
        background: #A6D11F;
        color: #0E3D52;
        text-decoration: none;
    }

/* La tabla usa todo el ancho: sin barra de scroll ni anchos fijos */
html:not(#extr-page) .sff-contenedor-clientes {
    overflow: visible;
}

    html:not(#extr-page) .sff-contenedor-clientes > section {
        float: none;
        width: auto;
        padding: 0 13px;
    }

html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td {
    vertical-align: middle;
}

    html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(1) {
        font-weight: 600;
        color: #0E3D52;
    }

    html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(2),
    html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(5) {
        color: #5B6B72;
    }

    html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(3) {
        white-space: nowrap;
    }

    html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(5) {
        overflow-wrap: anywhere; /* correos largos sin desbordar */
    }

/* Estado: Activo verde, Inactivo gris (lo arma el render de la columna en cliente.js) */
html:not(#extr-page) .sff-tabla-clientes .sff-chip-cliente {
    display: inline-block;
    border-radius: 10px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    background: #EEF1F2;
    color: #5B6B72;
}

    html:not(#extr-page) .sff-tabla-clientes .sff-chip-cliente.sff-chip-activo {
        background: #EAF3DE;
        color: #27500A;
    }

/* Acciones a la derecha; Editar y Código de actividad conservan su color */
html:not(#extr-page) .sff-tabla-clientes > thead > tr > th:last-child,
html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:last-child {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

html:not(#extr-page) .sff-tabla-clientes .botonesAcciones {
    margin: 0 0 0 4px;
}

/* Móvil: filtros en una columna, botones del pie en una fila y una tarjeta por cliente */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-filtros-clientes fieldset > .row {
        grid-template-columns: 1fr;
    }

    html:not(#extr-page) .sff-filtros-clientes footer {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        padding: 10px 13px;
    }

        html:not(#extr-page) .sff-filtros-clientes footer .btn {
            float: none;
            order: 3;
            height: 34px;
            margin: 0;
            padding: 6px 10px;
            font-size: 14px;
            line-height: 20px;
        }

        html:not(#extr-page) .sff-filtros-clientes footer #inicioAyuda { order: 1; }
        html:not(#extr-page) .sff-filtros-clientes footer #exportarClientes { order: 2; }

    html:not(#extr-page) .sff-tabla-clientes > thead {
        display: none;
    }

    html:not(#extr-page) .sff-tabla-clientes,
    html:not(#extr-page) .sff-tabla-clientes > tbody {
        display: block;
        border: 0 !important;
    }

        html:not(#extr-page) .sff-tabla-clientes > tbody > tr {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 4px 10px;
            margin-bottom: 10px;
            padding: 10px 12px;
            border: 1px solid #E1E7EA;
            border-radius: 10px;
            background: #fff !important;
        }

            html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td {
                display: block;
                width: auto;
                padding: 0 !important;
                border: 0 !important;
                background: none !important;
                text-align: left;
            }

                html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(1) { grid-column: 1; grid-row: 1; }
                html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
                html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(2) { grid-column: 1 / span 2; grid-row: 2; font-size: 12px; }
                html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(3) { grid-column: 1 / span 2; grid-row: 3; }
                html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(5) { grid-column: 1 / span 2; grid-row: 4; }
                html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(6) { grid-column: 1 / span 2; grid-row: 5; width: auto; padding-top: 6px !important; text-align: left; } /* width: anula el 1% de escritorio */

    /* Fila vacía ("No existen datos…") */
    html:not(#extr-page) .sff-tabla-clientes > tbody > tr > td.dataTables_empty {
        grid-column: 1 / span 2;
        text-align: center;
    }

    html:not(#extr-page) .sff-tabla-clientes .botonesAcciones {
        margin: 0 4px 0 0;
    }

    /* "Mostrar 10 clientes" en una línea (DataTables apila etiqueta y selector en pantallas angostas) */
    html:not(#extr-page) .sff-contenedor-clientes .dataTables_length,
    html:not(#extr-page) .sff-contenedor-clientes .dataTables_length label {
        width: auto;
    }

        html:not(#extr-page) .sff-contenedor-clientes .dataTables_length label {
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        html:not(#extr-page) .sff-contenedor-clientes .dataTables_length select {
            display: inline-block;
            width: auto;
        }

    html:not(#extr-page) .sff-tabla-clientes .responsiveExpander {
        display: none;
    }
}

/* ---------- Editar cliente (cliente/editar): bloques numerados en cuadrícula ---------- */
html:not(#extr-page) .sff-editar-cliente .sff-ec-bloques {
    padding: 6px 13px 4px;
}

    html:not(#extr-page) .sff-editar-cliente .sff-ec-bloques .sff-bloque-t {
        margin: 14px 0 12px;
    }

html:not(#extr-page) .sff-editar-cliente .sff-ec-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 22px;
    margin: 0 0 6px;
}

    html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > section {
        float: none;
        width: auto;
        margin: 0 0 14px;
        padding: 0;
    }

        html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > section.sff-ec-ancho2 {
            grid-column: span 2;
        }

        html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > section.sff-ec-ancho3 {
            grid-column: 1 / -1;
        }

        /* Interruptores centrados con el campo de al lado (medido: 14px los deja a la altura del campo) */
        html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > section.sff-ec-toggle {
            display: flex;
            align-items: center;
            min-height: 56px;
            padding-top: 14px;
        }

            html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > section.sff-ec-toggle.sff-ec-ancho3 {
                min-height: 0;
                padding-top: 0;
            }

            html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > section.sff-ec-toggle .toggle {
                display: inline-block;
                width: auto;
                margin: 0;
                padding-right: 58px;
                color: #1f2d33;
                font-size: 13px;
                line-height: 24px;
                white-space: nowrap;
            }

    html:not(#extr-page) .sff-editar-cliente .sff-ec-grid select.form-control,
    html:not(#extr-page) .sff-editar-cliente .sff-ec-grid textarea.form-control {
        width: 100%;
    }

html:not(#extr-page) .sff-editar-cliente .label {
    font-weight: 400;
}

html:not(#extr-page) .sff-editar-cliente .note {
    margin-top: 4px;
    color: #5B6B72;
    font-size: 11px;
}

/* Variante con tarjetas (Nuevo/Editar proveedor): cada bloque numerado en su tarjeta, como Editar configuración del emisor */
html:not(#extr-page) .sff-editar-cliente.sff-ec-con-tarjetas {
    background: #F4F7F8;
}

    html:not(#extr-page) .sff-editar-cliente.sff-ec-con-tarjetas .sff-ec-bloques {
        padding: 12px 12px 0;
        background: transparent;
    }

    /* Fondo blanco (v12.7: antes el patrón opcion2.png, igual que el body) */
    html:not(#extr-page) .sff-editar-cliente.sff-ec-con-tarjetas .sff-ec-tarjeta {
        margin: 0 0 14px;
        background: #fff;
        border: 1px solid #B9C7CE;
        border-radius: 10px;
        box-shadow: 0 1px 3px rgba(14, 61, 82, .12);
        overflow: hidden;
    }

        html:not(#extr-page) .sff-editar-cliente.sff-ec-con-tarjetas .sff-ec-tarjeta > .sff-bloque-t {
            margin: 0 0 14px;
            padding: 11px 14px;
            border-bottom: 1px solid #D3DCE1;
            font-size: 15px;
            font-weight: 600;
        }

            html:not(#extr-page) .sff-editar-cliente.sff-ec-con-tarjetas .sff-ec-tarjeta > .sff-bloque-t span {
                width: 24px;
                height: 24px;
                background: #94BE15;
            }

        html:not(#extr-page) .sff-editar-cliente.sff-ec-con-tarjetas .sff-ec-tarjeta > .sff-ec-grid {
            padding: 0 14px;
        }

            html:not(#extr-page) .sff-editar-cliente.sff-ec-con-tarjetas .sff-ec-tarjeta > .sff-ec-grid:last-child {
                padding-bottom: 4px;
            }

/* Días y límite de crédito cuando no tiene crédito (readonly lo pone editarCliente.js) */
html:not(#extr-page) .sff-editar-cliente input[readonly] {
    background: #EEF1F2;
    color: #5B6B72;
}

/* Pie: Ayuda · Volver a la lista · Guardar cambios, en ese orden (SmartAdmin los flota a la derecha) */
html:not(#extr-page) .sff-editar-cliente footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

    html:not(#extr-page) .sff-editar-cliente footer .btn {
        float: none;
        margin: 0;
    }

/* Nombre del cliente en la barra, más tenue */
html:not(#extr-page) .sff-ec-nombre {
    font-weight: 400;
    opacity: .75;
}

/* ---------- Nuevo cliente (cliente/CrearClient): usa el diseño de Editar cliente + estos tres elementos ---------- */
/* Botones "Buscar nombre" y "Buscar actividad" a la altura del campo de al lado */
html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > section.sff-cc-buscar {
    display: flex;
    align-items: flex-start;
    padding-top: 25px; /* medido: deja el botón a la misma altura que el campo */
}

    html:not(#extr-page) .sff-editar-cliente .sff-cc-buscar .btn {
        height: 32px;
        padding: 0 14px;
        border-radius: 4px;
        font-weight: 600;
    }

/* Tabla de actividades y resumen de la actividad elegida, a lo ancho del bloque */
html:not(#extr-page) .sff-editar-cliente .sff-cc-tabla {
    grid-column: 1 / -1;
    margin: 0 0 10px;
}

    html:not(#extr-page) .sff-editar-cliente .sff-cc-tabla table {
        width: 100% !important;
    }

html:not(#extr-page) .sff-editar-cliente .sff-cc-elegida {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #E1E7EA;
    border-left: 4px solid #94BE15;
    border-radius: 6px;
    background: #F4F8EA;
}

    html:not(#extr-page) .sff-editar-cliente .sff-cc-elegida .fa {
        color: #94BE15;
    }

    html:not(#extr-page) .sff-editar-cliente .sff-cc-elegida b {
        color: #0E3D52;
    }

    html:not(#extr-page) .sff-editar-cliente .sff-cc-elegida span {
        color: #5B6B72;
    }

/* Móvil: en una columna el botón va debajo del campo, sin el espacio de la etiqueta */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > section.sff-cc-buscar {
        padding-top: 0;
    }
}

/* ---------- Códigos de actividad del cliente (cliente/IndexCodigoActividad): diseño de Editar cliente + tablas ---------- */
html:not(#extr-page) .sff-editar-cliente .sff-act-tabla {
    margin: 0 0 10px;
}

    html:not(#extr-page) .sff-editar-cliente .sff-act-tabla table {
        width: 100% !important;
        margin: 0 !important;
    }

    html:not(#extr-page) .sff-editar-cliente .sff-act-tabla td {
        vertical-align: middle;
    }

        /* Código en negrita azul; acciones a la derecha (Eliminar y Marcar conservan sus colores) */
        html:not(#extr-page) .sff-editar-cliente .sff-act-tabla td:first-child {
            white-space: nowrap;
            font-weight: 600;
            color: #0E3D52;
        }

    html:not(#extr-page) .sff-editar-cliente .sff-act-tabla th:last-child,
    html:not(#extr-page) .sff-editar-cliente .sff-act-tabla td:last-child {
        width: 1%;
        white-space: nowrap;
        text-align: right;
    }

    /* Mismo tamaño que los botones de la lista de facturas (38-39 x 32 px, separados 6 px).
       El smart-form les quitaba el relleno y quedaban de 12-15 x 20 px. Los colores no cambian. */
    html:not(#extr-page) .sff-editar-cliente .sff-act-tabla .botonesAcciones {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 32px;
        min-width: 38px;
        margin: 0 0 0 3px; /* + el espacio entre botones del HTML = 6 px */
        padding: 6px 12px;
        border-radius: 2px;
        font-size: 13px;
        line-height: 18px;
    }

        html:not(#extr-page) .sff-editar-cliente .sff-act-tabla .botonesAcciones i {
            font-size: 13px;
        }

/* Etiqueta de la actividad por defecto (la arma indexCodigoActividad.js) */
html:not(#extr-page) .sff-editar-cliente .sff-act-defecto {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 9px;
    border-radius: 10px;
    background: #EAF3DE;
    color: #27500A;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* Nota bajo la búsqueda: código completo y actividades ya asignadas */
html:not(#extr-page) .sff-editar-cliente .sff-act-nota {
    margin: -6px 0 12px;
    color: #5B6B72;
    font-size: 12px;
}

@media (max-width: 767px) {
    html:not(#extr-page) .sff-editar-cliente .sff-ec-grid {
        grid-template-columns: 1fr;
    }

        html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > section.sff-ec-ancho2,
        html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > section.sff-ec-ancho3 {
            grid-column: auto;
        }

        /* En una columna no hay campo al lado con el que alinear: sin el espacio de arriba */
        html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > section.sff-ec-toggle {
            min-height: 0;
            padding-top: 0;
        }

    html:not(#extr-page) .sff-editar-cliente footer {
        gap: 6px;
        padding: 10px 13px;
    }

        html:not(#extr-page) .sff-editar-cliente footer .btn {
            height: 34px;
            padding: 6px 10px;
            font-size: 14px;
            line-height: 20px;
        }
}

/* ---------- Nuevo producto (Productos/CrearProducto): diseño de Editar cliente + estos elementos ---------- */
/* Bloque 3: dos interruptores lado a lado, cada uno con su explicación debajo */
html:not(#extr-page) .sff-editar-cliente .sff-ec-grid.sff-pr-2col {
    grid-template-columns: 1fr 1fr;
}

html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > section.sff-pr-calculo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-top: 4px;
}

    html:not(#extr-page) .sff-editar-cliente .sff-pr-calculo .toggle {
        display: inline-block;
        width: auto;
        margin: 0;
        padding-right: 58px;
        color: #1f2d33;
        font-size: 13px;
        line-height: 24px;
    }

    html:not(#extr-page) .sff-editar-cliente .sff-pr-calculo .note {
        margin: 0;
    }

/* Bloque 4: subtítulo de cada lista de precios */
html:not(#extr-page) .sff-editar-cliente .sff-pr-lista {
    grid-column: 1 / -1;
    margin: 2px 0 8px;
    padding: 0 0 4px;
    border-bottom: 1px dashed #D5DEE2;
    color: #0E3D52;
    font-size: 12px;
    font-weight: 600;
}

    html:not(#extr-page) .sff-editar-cliente .sff-pr-lista span {
        margin-left: 6px;
        color: #5B6B72;
        font-weight: 400;
    }

/* Código y descripción del Cabys: siguen en el formulario (se validan y se envían) pero se ven en el recuadro "Cabys elegido" */
html:not(#extr-page) .sff-editar-cliente .sff-pr-oculto {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Mensaje "Cabys requerido" debajo del recuadro, a lo ancho del bloque */
html:not(#extr-page) .sff-editar-cliente .sff-ec-grid > em.invalid {
    grid-column: 1 / -1;
    margin: -10px 0 12px;
}

@media (max-width: 767px) {
    html:not(#extr-page) .sff-editar-cliente .sff-ec-grid.sff-pr-2col {
        grid-template-columns: 1fr;
    }
}

/* ---------- Lista de productos (Productos/IndexProductos): mismo estilo que la lista de clientes, con clases propias ---------- */
/* Filtros en cuadrícula de dos columnas del mismo ancho (una en móvil); los ids no cambian (los usan el JS y la ayuda) */
html:not(#extr-page) .sff-filtros-productos fieldset {
    padding: 16px 13px 2px;
}

html:not(#extr-page) .sff-filtros-productos fieldset > .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 26px;
    margin: 0;
}

    html:not(#extr-page) .sff-filtros-productos fieldset > .row::before,
    html:not(#extr-page) .sff-filtros-productos fieldset > .row::after {
        display: none; /* el clearfix de .row ocupaba celdas de la cuadrícula */
    }

    html:not(#extr-page) .sff-filtros-productos fieldset > .row > section {
        float: none;
        width: auto;
        margin-bottom: 14px;
        padding: 0;
    }

html:not(#extr-page) .sff-filtros-productos select.form-control {
    width: 100%;
}

/* Panel de resultados: botón "Nuevo producto" en la barra */
html:not(#extr-page) .sff-btn-nuevo-producto {
    float: right;
    height: 24px;
    margin: 5px 6px 0 0;
    padding: 0 12px;
    border-radius: 4px;
    background: #94BE15;
    color: #0E3D52;
    font-size: 12px;
    font-weight: 600;
    line-height: 24px;
}

    html:not(#extr-page) .sff-btn-nuevo-producto:hover,
    html:not(#extr-page) .sff-btn-nuevo-producto:focus {
        background: #A6D11F;
        color: #0E3D52;
        text-decoration: none;
    }

/* La tabla usa todo el ancho: sin barra de scroll ni anchos fijos */
html:not(#extr-page) .sff-contenedor-productos {
    overflow: visible;
}

    html:not(#extr-page) .sff-contenedor-productos > section {
        float: none;
        width: auto;
        padding: 0 13px;
    }

html:not(#extr-page) .sff-tabla-productos > tbody > tr > td {
    vertical-align: middle;
}

    html:not(#extr-page) .sff-tabla-productos > tbody > tr > td.sff-pr-nombre {
        font-weight: 600;
        color: #0E3D52;
    }

    html:not(#extr-page) .sff-tabla-productos > tbody > tr > td.sff-pr-gris {
        color: #5B6B72;
    }

html:not(#extr-page) .sff-tabla-productos .sff-num {
    text-align: right;
    white-space: nowrap;
}

/* Estado (Activo verde / Inactivo gris) y "Sin Cabys" (naranja, enlace a Editar); los arma productos.js */
html:not(#extr-page) .sff-tabla-productos .sff-chip-producto {
    display: inline-block;
    border-radius: 10px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    background: #EEF1F2;
    color: #5B6B72;
}

    html:not(#extr-page) .sff-tabla-productos .sff-chip-producto.sff-chip-activo {
        background: #EAF3DE;
        color: #27500A;
    }

    html:not(#extr-page) .sff-tabla-productos .sff-chip-producto.sff-chip-sincabys {
        background: #FFF3E0;
        color: #8A4B00;
        text-decoration: none;
    }

        html:not(#extr-page) .sff-tabla-productos .sff-chip-producto.sff-chip-sincabys:hover,
        html:not(#extr-page) .sff-tabla-productos .sff-chip-producto.sff-chip-sincabys:focus {
            background: #FFE0B2;
            color: #8A4B00;
            text-decoration: none;
        }

/* Acciones a la derecha; Editar y Eliminar conservan su color */
html:not(#extr-page) .sff-tabla-productos > thead > tr > th:last-child,
html:not(#extr-page) .sff-tabla-productos > tbody > tr > td:last-child {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

html:not(#extr-page) .sff-tabla-productos .botonesAcciones {
    margin: 0 0 0 4px;
}

/* Móvil: filtros en una columna, botones del pie en una fila y una tarjeta por producto */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-filtros-productos fieldset > .row {
        grid-template-columns: 1fr;
    }

    html:not(#extr-page) .sff-filtros-productos footer {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        padding: 10px 13px;
    }

        html:not(#extr-page) .sff-filtros-productos footer .btn {
            float: none;
            order: 3;
            height: 34px;
            margin: 0;
            padding: 6px 10px;
            font-size: 14px;
            line-height: 20px;
        }

        html:not(#extr-page) .sff-filtros-productos footer #inicioAyuda { order: 1; }
        html:not(#extr-page) .sff-filtros-productos footer #exportarProductos { order: 2; }

    html:not(#extr-page) .sff-tabla-productos > thead {
        display: none;
    }

    html:not(#extr-page) .sff-tabla-productos,
    html:not(#extr-page) .sff-tabla-productos > tbody {
        display: block;
        border: 0 !important;
    }

        html:not(#extr-page) .sff-tabla-productos > tbody > tr {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 4px 10px;
            margin-bottom: 10px;
            padding: 10px 12px;
            border: 1px solid #E1E7EA;
            border-radius: 10px;
            background: #fff !important;
        }

            /* Cada dato en su línea con su etiqueta (data-l la pone productos.js); nombre y estado arriba */
            html:not(#extr-page) .sff-tabla-productos > tbody > tr > td {
                display: block;
                grid-column: 1 / span 2;
                width: auto;
                padding: 0 !important;
                border: 0 !important;
                background: none !important;
                font-size: 12px;
                text-align: left;
            }

                html:not(#extr-page) .sff-tabla-productos > tbody > tr > td[data-l]::before {
                    content: attr(data-l) ": ";
                    color: #5B6B72;
                    font-weight: 400;
                }

                html:not(#extr-page) .sff-tabla-productos > tbody > tr > td.sff-pr-nombre { grid-column: 1; grid-row: 1; font-size: 13px; }
                html:not(#extr-page) .sff-tabla-productos > tbody > tr > td.sff-pr-estado { grid-column: 2; grid-row: 1; text-align: right; }
                html:not(#extr-page) .sff-tabla-productos > tbody > tr > td:last-child { width: auto; padding-top: 6px !important; text-align: left; } /* width: anula el 1% de escritorio */

    /* Fila vacía (No existen datos) */
    html:not(#extr-page) .sff-tabla-productos > tbody > tr > td.dataTables_empty {
        text-align: center;
    }

    html:not(#extr-page) .sff-tabla-productos .botonesAcciones {
        margin: 0 4px 0 0;
    }

    /* "Mostrar 10 productos" en una línea (DataTables apila etiqueta y selector en pantallas angostas) */
    html:not(#extr-page) .sff-contenedor-productos .dataTables_length,
    html:not(#extr-page) .sff-contenedor-productos .dataTables_length label {
        width: auto;
    }

        html:not(#extr-page) .sff-contenedor-productos .dataTables_length label {
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        html:not(#extr-page) .sff-contenedor-productos .dataTables_length select {
            display: inline-block;
            width: auto;
        }
}

/* ---------- Clasificación Cabys (Productos/ClasificacionCabys): usa .sff-filtros-productos y .sff-tabla-productos + estos elementos ---------- */
/* Barra de selección sobre la tabla (la llena clasificacioncabys.js) */
html:not(#extr-page) .sff-cb-barra {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    padding: 8px 12px;
    border: 1px solid #CFE3F0;
    border-radius: 6px;
    background: #EEF6FB;
    color: #0E3D52;
    font-size: 13px;
}

    html:not(#extr-page) .sff-cb-barra.sff-cb-vacia {
        border-color: #E1E7EA;
        background: #F5F7F8;
        color: #5B6B72;
    }

    html:not(#extr-page) .sff-cb-barra b {
        font-weight: 700;
    }

    html:not(#extr-page) .sff-cb-barra a {
        margin-left: auto;
        font-weight: 600;
        white-space: nowrap;
    }

/* Columna de la casilla y filas seleccionadas */
html:not(#extr-page) .sff-tabla-productos > thead > tr > th:first-child,
html:not(#extr-page) .sff-tabla-productos > tbody > tr > td.sff-cb-casilla {
    width: 1%;
    text-align: center;
}

html:not(#extr-page) .sff-tabla-productos .checkbox {
    margin: 0;
    padding-left: 20px;
}

html:not(#extr-page) .sff-tabla-productos > tbody > tr.sff-cb-sel > td {
    background: #EEF6FB !important;
}

/* Panel "Asignar Cabys": búsqueda con su botón a la misma altura, recuadro del Cabys elegido y nota */
html:not(#extr-page) .sff-cb-asignar fieldset {
    padding: 14px 13px 4px;
}

html:not(#extr-page) .sff-cb-fila {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 14px;
    align-items: end;
    margin-bottom: 12px;
}

    html:not(#extr-page) .sff-cb-fila section {
        float: none;
        width: auto;
        margin: 0;
        padding: 0;
    }

    html:not(#extr-page) .sff-cb-fila .btn {
        height: 32px;
        padding: 0 14px;
        border-radius: 4px;
        font-weight: 600;
    }

html:not(#extr-page) .sff-cb-asignar .sff-cc-elegida {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    padding: 10px 12px;
    border: 1px solid #E1E7EA;
    border-left: 4px solid #94BE15;
    border-radius: 6px;
    background: #F4F8EA;
}

    html:not(#extr-page) .sff-cb-asignar .sff-cc-elegida .fa { color: #94BE15; }
    html:not(#extr-page) .sff-cb-asignar .sff-cc-elegida b { color: #0E3D52; }
    html:not(#extr-page) .sff-cb-asignar .sff-cc-elegida span { color: #5B6B72; }

/* Código y descripción del Cabys: siguen en el formulario (se validan y se envían) pero se ven en el recuadro */
html:not(#extr-page) .sff-cb-asignar .sff-cb-oculto {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

html:not(#extr-page) .sff-cb-asignar .sff-cb-nota {
    margin: 4px 0 8px;
    color: #5B6B72;
    font-size: 11px;
}

html:not(#extr-page) .sff-cb-asignar footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

    html:not(#extr-page) .sff-cb-asignar footer .btn {
        float: none;
        margin: 0;
    }

/* Móvil: casilla a la derecha del nombre, estado en su línea, búsqueda y botón uno debajo del otro */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-tabla-productos > tbody > tr > td.sff-cb-casilla { grid-column: 2; grid-row: 1; text-align: right; }
    html:not(#extr-page) .sff-cb-tabla > tbody > tr > td.sff-pr-estado { grid-column: 1 / span 2; grid-row: auto; text-align: left; }

    html:not(#extr-page) .sff-tabla-productos > tbody > tr.sff-cb-sel {
        border-color: #7FB3D5;
        background: #EEF6FB !important;
    }

    html:not(#extr-page) .sff-cb-fila {
        grid-template-columns: 1fr;
        row-gap: 8px; /* el botón quedaba pegado debajo del campo */
    }
}

/* ---------- Popup "Buscar Cabys" (#modalCabys.sff-cbm-modal: parciales _CodigoCabysPartial de Productos y de Servicios) ---------- */
html:not(#extr-page) #modalCabys.sff-cbm-modal .modal-dialog { width: 760px; max-width: calc(100% - 20px); }
html:not(#extr-page) #modalCabys.sff-cbm-modal .modal-content { display: flex; flex-direction: column; max-height: calc(100vh - 60px); overflow: hidden; border: 0; border-radius: 10px; }
html:not(#extr-page) #modalCabys.sff-cbm-modal .modal-header { padding: 12px 16px; border: 0; background: #0E3D52; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .modal-title { color: #fff; font-size: 16px; font-weight: 700; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .modal-title i { margin-right: 6px; opacity: .85; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .modal-header .close { margin-top: 0; color: #fff; opacity: .8; text-shadow: none; }

/* Solo la lista de resultados hace scroll: búsqueda, cantidad y Cerrar quedan siempre a la vista */
html:not(#extr-page) #modalCabys.sff-cbm-modal .modal-body { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; padding: 0; }
html:not(#extr-page) #modalCabys.sff-cbm-modal #formCabys { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }

html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-buscar { padding: 14px 16px 10px; border-bottom: 1px solid #E1E7EA; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-buscar .label { margin-bottom: 4px; color: #0E3D52; font-weight: 600; }
html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-busqueda { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-busqueda label.input { flex: 1 1 160px; min-width: 0; margin: 0; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-busqueda .btn { height: 32px; padding: 0 20px; border-radius: 6px; font-weight: 600; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-busqueda em.invalid { flex-basis: 100%; order: 3; margin-top: -4px; }
html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-ayuda { margin-top: 6px; color: #5B6B72; font-size: 12px; }

html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-resumen { padding: 7px 16px; border-bottom: 1px solid #E1E7EA; background: #F6F8F9; color: #5B6B72; font-size: 12px; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-resumen:empty { display: none; }

html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-lista { flex: 1 1 auto; min-height: 110px; max-height: calc(100vh - 300px); overflow-y: auto; }
html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla { width: 100%; margin: 0; border: 0; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla thead th { position: sticky; top: 0; z-index: 1; padding: 8px 12px; border: 0; border-bottom: 2px solid #E1E7EA; background: #fff; color: #0E3D52; font-size: 12px; font-weight: 700; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla td { padding: 8px 12px; border: 0; border-top: 1px solid #EEF2F4; vertical-align: middle; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla tbody tr:hover { background: #F4F8EA; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla td:nth-child(1) { color: #0E3D52; font-family: Consolas, Menlo, monospace; white-space: nowrap; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla th:nth-child(3),
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla td:nth-child(3) { text-align: center; white-space: nowrap; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla td:nth-child(3) { font-weight: 600; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla td:nth-child(4) { width: 1%; text-align: right; }
html:not(#extr-page) #modalCabys.sff-cbm-modal .cssSeleccionarCodigoCabys { padding: 4px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; }

/* Mensaje inicial: se oculta en cuanto el JS agrega resultados */
html:not(#extr-page) #modalCabys.sff-cbm-modal #tablaCabys:not(:empty) + tfoot { display: none; }
html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-vacio td { padding: 28px 16px; border: 0; color: #5B6B72; text-align: center; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-vacio i { display: block; margin-bottom: 6px; color: #B4C2C8; font-size: 22px; }

html:not(#extr-page) #modalCabys.sff-cbm-modal .modal-footer { margin: 0; padding: 10px 16px; border-top: 1px solid #E1E7EA; }

/* Móvil: una tarjeta por resultado (código e IVA arriba, descripción, botón a lo ancho) */
@media (max-width: 767px) {
    html:not(#extr-page) #modalCabys.sff-cbm-modal .modal-dialog { margin: 10px auto; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .modal-content { max-height: calc(100vh - 20px); }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-lista { max-height: none; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla thead { display: none; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 10px 14px; border-bottom: 1px solid #EEF2F4; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla tbody td { display: block; padding: 0; border: 0; text-align: left; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla tbody td:nth-child(1) { grid-column: 1; grid-row: 1; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla tbody td:nth-child(3) { grid-column: 2; grid-row: 1; color: #0E3D52; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla tbody td:nth-child(3)::before { content: 'IVA '; color: #5B6B72; font-weight: 400; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla tbody td:nth-child(2) { grid-column: 1 / 3; grid-row: 2; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla tbody td:nth-child(4) { grid-column: 1 / 3; grid-row: 3; width: auto; padding-top: 4px; }
    html:not(#extr-page) #modalCabys.sff-cbm-modal .cssSeleccionarCodigoCabys { width: 100%; padding: 7px; }
}

/* Botones deshabilitados en el pie de los formularios smart-form: SmartAdmin (.smart-form footer .btn) les ponía la manita y parecían activos */
html:not(#extr-page) .smart-form footer .btn[disabled],
html:not(#extr-page) .smart-form footer .btn.disabled {
    cursor: not-allowed;
}

/* Clasificación Cabys: barra en rojo al pulsar "Asignar" sin productos marcados (se quita al marcar uno) */
html:not(#extr-page) .sff-cb-barra.sff-cb-error {
    border-color: #F0B7B7;
    background: #FCEDED;
    color: #A32D2D;
    font-weight: 600;
}

/* Lista de lo que falta en el aviso de "Asignar" */
.swal2-popup .sff-cb-faltan {
    margin: 8px 0 0;
    padding-left: 20px;
    text-align: left;
}

    .swal2-popup .sff-cb-faltan li {
        margin: 2px 0;
    }

/* ==========================================================================
   Créditos activos de un cliente (Cliente/EditarCreditos) — v6.9
   Encabezado con el cliente, resumen (total, créditos, vencidos), tabla de
   facturas a crédito (tarjetas en móvil), pago general y modales de pago y recibos.
   ========================================================================== */
html:not(#extr-page) .sff-cred {
    margin: 0 0 16px;
}

    html:not(#extr-page) .sff-cred .sff-cred-card {
        background: #fff;
        border: 1px solid #dfe5ea;
        border-radius: 10px;
        margin-bottom: 14px;
        overflow: hidden;
    }

    html:not(#extr-page) .sff-cred .sff-cred-head {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px;
        background: #0E3D52;
        color: #fff;
    }

        html:not(#extr-page) .sff-cred .sff-cred-head small {
            display: block;
            color: #b9d3dc;
            font-size: 12px;
        }

        html:not(#extr-page) .sff-cred .sff-cred-head h2 {
            margin: 0;
            font-size: 17px;
            font-weight: 600;
            color: #fff;
            letter-spacing: 0;
        }

    html:not(#extr-page) .sff-cred .sff-cred-kpis {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 18px;
        border-bottom: 1px solid #eef2f5;
    }

    html:not(#extr-page) .sff-cred .sff-cred-kpi {
        flex: 1 1 160px;
        background: #f5f8fa;
        border-radius: 8px;
        padding: 10px 14px;
    }

        html:not(#extr-page) .sff-cred .sff-cred-kpi span {
            display: block;
            font-size: 12px;
            color: #5b6b78;
        }

        html:not(#extr-page) .sff-cred .sff-cred-kpi b {
            font-size: 20px;
            color: #0E3D52;
        }

        html:not(#extr-page) .sff-cred .sff-cred-kpi.sff-cred-total {
            background: #e8f4ea;
        }

            html:not(#extr-page) .sff-cred .sff-cred-kpi.sff-cred-total b {
                color: #2e7d32;
                font-size: 24px;
            }

        html:not(#extr-page) .sff-cred .sff-cred-kpi.sff-cred-vencidos b {
            color: #c62828;
        }

    html:not(#extr-page) .sff-cred .sff-cred-t {
        padding: 12px 18px 4px;
        font-weight: 600;
        color: #0E3D52;
        font-size: 14px;
    }

        html:not(#extr-page) .sff-cred .sff-cred-t i {
            margin-right: 6px;
            color: #94BE15;
        }

    html:not(#extr-page) .sff-cred .sff-cred-tabla {
        padding: 4px 8px 6px;
    }

    html:not(#extr-page) .sff-cred .sff-cred-pg {
        display: grid;
        grid-template-columns: 1fr 1fr 2fr auto;
        gap: 12px;
        align-items: end;
        padding: 8px 18px 6px;
    }

        html:not(#extr-page) .sff-cred .sff-cred-pg label {
            display: block;
            font-size: 12px;
            color: #5b6b78;
            margin-bottom: 4px;
        }

        html:not(#extr-page) .sff-cred .sff-cred-pg .form-control {
            height: 34px;
        }

    html:not(#extr-page) .sff-cred .sff-cred-nota {
        padding: 6px 18px 14px;
        font-size: 12px;
        color: #5b6b78;
    }

/* Tablas de créditos y de recibos */
html:not(#extr-page) .sff-tabla-creditos {
    margin: 0 !important;
    border: 0 !important;
    font-size: 13px;
}

    html:not(#extr-page) .sff-tabla-creditos > thead > tr > th {
        background: #f5f8fa;
        color: #5b6b78;
        font-weight: 600;
        white-space: nowrap;
        border-bottom: 1px solid #dfe5ea !important;
    }

    html:not(#extr-page) .sff-tabla-creditos > tbody > tr > td {
        vertical-align: middle;
        border-top: 1px solid #eef2f5 !important;
    }

    html:not(#extr-page) .sff-tabla-creditos .sff-num {
        text-align: right;
        white-space: nowrap;
    }

    html:not(#extr-page) .sff-tabla-creditos .sff-saldo {
        font-weight: 700;
        color: #0E3D52;
    }

    html:not(#extr-page) .sff-tabla-creditos .sff-acc {
        text-align: right;
        white-space: nowrap;
    }

        html:not(#extr-page) .sff-tabla-creditos .sff-acc .btn {
            padding: 4px 9px;
            font-size: 12px;
            border-radius: 6px;
            margin-left: 2px;
        }

html:not(#extr-page) .sff-cred-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #e8f4ea;
    color: #2e7d32;
    white-space: nowrap;
}

    html:not(#extr-page) .sff-cred-chip.sff-cred-venc {
        background: #fdecea;
        color: #c62828;
    }

    html:not(#extr-page) .sff-cred-chip.sff-cred-anulado {
        background: #eef2f5;
        color: #5b6b78;
    }

/* Modales (Registrar pago y Pagos del crédito) */
html:not(#extr-page) .sff-cred-modal .modal-content {
    border-radius: 10px;
    overflow: hidden;
    border: 0;
}

html:not(#extr-page) .sff-cred-modal .modal-header {
    background: #0E3D52;
    color: #fff;
    border: 0;
    padding: 12px 18px;
}

    html:not(#extr-page) .sff-cred-modal .modal-header .close {
        color: #fff;
        opacity: .85;
        text-shadow: none;
        margin-top: 2px;
    }

    html:not(#extr-page) .sff-cred-modal .modal-header small {
        display: block;
        color: #b9d3dc;
        font-size: 12px;
    }

    html:not(#extr-page) .sff-cred-modal .modal-header b {
        font-size: 16px;
        word-break: break-all;
    }

html:not(#extr-page) .sff-cred-modal .sff-cred-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 18px;
}

    html:not(#extr-page) .sff-cred-modal .sff-cred-form label {
        display: block;
        font-size: 12px;
        color: #5b6b78;
        margin-bottom: 4px;
    }

    html:not(#extr-page) .sff-cred-modal .sff-cred-form .sff-cred-ancho {
        grid-column: 1 / span 2;
    }

html:not(#extr-page) .sff-cred-modal .sff-cred-caja {
    background: #f5f8fa;
    border-radius: 8px;
    padding: 10px 12px;
}

    html:not(#extr-page) .sff-cred-modal .sff-cred-caja span {
        display: block;
        font-size: 12px;
        color: #5b6b78;
    }

    html:not(#extr-page) .sff-cred-modal .sff-cred-caja b {
        font-size: 18px;
        color: #0E3D52;
    }

    html:not(#extr-page) .sff-cred-modal .sff-cred-caja.sff-cred-pendiente {
        background: #e8f4ea;
    }

        html:not(#extr-page) .sff-cred-modal .sff-cred-caja.sff-cred-pendiente b {
            color: #2e7d32;
        }

html:not(#extr-page) .sff-cred-modal .sff-cred-nota {
    font-size: 12px;
    color: #5b6b78;
}

html:not(#extr-page) .sff-cred-modal .modal-footer {
    padding: 12px 18px;
    border-top: 1px solid #eef2f5;
}

html:not(#extr-page) .sff-cred-modal .sff-cred-recibos {
    padding: 8px 10px 4px;
    overflow-x: auto;
}

    html:not(#extr-page) .sff-cred-modal .sff-cred-recibos .sff-acc {
        white-space: nowrap;
    }

/* Bootstrap deja modal-lg en 600px hasta 991px: la tabla de recibos no cabe */
@media (min-width: 768px) and (max-width: 991px) {
    html:not(#extr-page) .sff-cred-modal .modal-dialog.modal-lg {
        width: calc(100% - 40px);
        max-width: 900px;
    }
}

@media (max-width: 767px) {
    html:not(#extr-page) .sff-cred .sff-cred-pg {
        grid-template-columns: 1fr;
    }

    html:not(#extr-page) .sff-cred-modal .sff-cred-form {
        grid-template-columns: 1fr;
    }

        html:not(#extr-page) .sff-cred-modal .sff-cred-form .sff-cred-ancho {
            grid-column: auto;
        }

    /* Tarjetas: una por crédito o recibo */
    html:not(#extr-page) .sff-tabla-creditos > thead {
        display: none;
    }

    html:not(#extr-page) .sff-tabla-creditos,
    html:not(#extr-page) .sff-tabla-creditos > tbody {
        display: block;
        width: 100% !important;
    }

        html:not(#extr-page) .sff-tabla-creditos > tbody > tr {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 2px 10px;
            margin: 10px 4px;
            padding: 10px 12px;
            border: 1px solid #dfe5ea;
            border-radius: 10px;
            background: #fff !important;
        }

            html:not(#extr-page) .sff-tabla-creditos > tbody > tr > td {
                border: 0 !important;
                padding: 1px 0 !important;
                text-align: left;
            }

            html:not(#extr-page) .sff-tabla-creditos > tbody > tr > td.dataTables_empty {
                grid-column: 1 / span 2;
                text-align: center;
            }

    /* Créditos: comprobante | estado; emisor; fechas; monto | saldo; acciones */
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 700; color: #0E3D52; word-break: break-all; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(6) { grid-column: 2; grid-row: 1; text-align: right; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(2) { grid-column: 1 / span 2; grid-row: 2; font-size: 12px; color: #5b6b78; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(3) { grid-column: 1 / span 2; grid-row: 3; font-size: 12px; color: #5b6b78; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(4) { grid-column: 1; grid-row: 4; font-size: 12px; color: #5b6b78; text-align: left; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(5) { grid-column: 2; grid-row: 4; text-align: right; font-size: 15px; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(7) { grid-column: 1 / span 2; grid-row: 5; text-align: left; padding-top: 6px !important; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(4)::before { content: "Monto "; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(5)::before { content: "Saldo "; font-size: 12px; font-weight: 400; color: #5b6b78; }

    /* Recibos: recibo | estado; fecha · medio; abono | saldo; acciones */
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 700; color: #0E3D52; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(6) { grid-column: 2; grid-row: 1; text-align: right; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 12px; color: #5b6b78; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(3) { grid-column: 2; grid-row: 2; font-size: 12px; color: #5b6b78; text-align: right; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(4) { grid-column: 1; grid-row: 3; text-align: left; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(5) { grid-column: 2; grid-row: 3; text-align: right; font-size: 12px; color: #5b6b78; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(7) { grid-column: 1 / span 2; grid-row: 4; text-align: left; padding-top: 6px !important; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(4)::before { content: "Abono "; font-size: 12px; color: #5b6b78; }
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(5)::before { content: "Saldo "; }

    html:not(#extr-page) .sff-tabla-creditos .sff-acc .btn {
        margin: 0 4px 0 0;
    }

    /* Créditos cancelados sin Saldo: el monto ocupa la fila y se destaca */
    html:not(#extr-page) .sff-tabla-creditos.sff-tc-cancelados > tbody > tr > td:nth-child(4) { grid-column: 1 / span 2; font-size: 15px; color: #0E3D52; }
        html:not(#extr-page) .sff-tabla-creditos.sff-tc-cancelados > tbody > tr > td:nth-child(4)::before { font-size: 12px; font-weight: 400; color: #5b6b78; }
}

/* Créditos cancelados: sin la columna Saldo (un crédito cancelado siempre tiene ₡0.00). Se oculta con CSS para no
   descuadrar las tarjetas de móvil, que ubican cada celda por su posición */
html:not(#extr-page) .sff-tabla-creditos.sff-tc-cancelados > thead > tr > th:nth-child(5),
html:not(#extr-page) .sff-tabla-creditos.sff-tc-cancelados > tbody > tr > td:nth-child(5) { display: none !important; }

/* =====================================================================
   Aceptación: modales Procesar y Detalle (Aceptacion/Documentos y Aceptacion/List) — v7.0
   ===================================================================== */
html:not(#extr-page) .sff-am-modal .modal-content {
    border-radius: 10px;
    overflow: hidden;
    border: 0;
}

html:not(#extr-page) .sff-am-modal .modal-header {
    background: #0E3D52;
    color: #fff;
    border: 0;
    padding: 12px 18px;
}

    html:not(#extr-page) .sff-am-modal .modal-header .close {
        color: #fff;
        opacity: .85;
        text-shadow: none;
        margin-top: 2px;
    }

    html:not(#extr-page) .sff-am-modal .modal-header small {
        display: block;
        color: #b9d3dc;
        font-size: 12px;
    }

    html:not(#extr-page) .sff-am-modal .modal-header b {
        display: block;
        font-size: 16px;
        word-break: break-word;
    }

html:not(#extr-page) .sff-am-modal .modal-body {
    padding: 16px 18px;
}

html:not(#extr-page) .sff-am-modal .modal-footer {
    padding: 12px 18px;
    border-top: 1px solid #eef2f5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

    html:not(#extr-page) .sff-am-modal .modal-footer .sff-am-ayuda {
        margin-right: auto;
        font-size: 13px;
        color: #0E3D52;
        cursor: pointer;
    }

html:not(#extr-page) .sff-am-btn {
    border: 0;
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 13px;
}

    html:not(#extr-page) .sff-am-btn.sec { background: #eef2f5; color: #33424d; }
    html:not(#extr-page) .sff-am-btn.sec:hover { background: #dfe7ec; }
    html:not(#extr-page) .sff-am-btn.prim { background: #0E3D52; color: #fff; }
    html:not(#extr-page) .sff-am-btn.prim:hover { background: #0a2f40; }
    html:not(#extr-page) .sff-am-btn.peligro { background: #A90329; color: #fff; }
    html:not(#extr-page) .sff-am-btn.peligro:hover { background: #8c0222; }

/* Procesar: resumen, respuesta, campos y aviso */
html:not(#extr-page) .sff-am-resumen {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
    background: #f5f8fa;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #33424d;
}

    html:not(#extr-page) .sff-am-resumen b { font-size: 17px; color: #0E3D52; }

html:not(#extr-page) .sff-am-lbl {
    display: block;
    font-size: 12px;
    color: #5b6b78;
    margin: 0 0 6px;
    font-weight: 600;
}

html:not(#extr-page) .sff-am-opciones {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

html:not(#extr-page) .sff-am-op {
    border: 1px solid #D2E0E6;
    border-radius: 8px;
    padding: 9px 10px;
    background: #fff;
    text-align: left;
}

    html:not(#extr-page) .sff-am-op i { font-size: 15px; margin-right: 6px; }
    html:not(#extr-page) .sff-am-op b { font-size: 13px; color: #0E3D52; }
    html:not(#extr-page) .sff-am-op span { display: block; font-size: 11.5px; color: #5b6b78; margin-top: 3px; line-height: 1.3; }
    html:not(#extr-page) .sff-am-op.ok i { color: #2e7d32; }
    html:not(#extr-page) .sff-am-op.parcial i { color: #c77700; }
    html:not(#extr-page) .sff-am-op.rechazo i { color: #A90329; }
    html:not(#extr-page) .sff-am-op.on { border-color: #0E3D52; background: #E8F0F3; box-shadow: inset 0 0 0 1px #0E3D52; }
    html:not(#extr-page) .sff-am-op.rechazo.on { border-color: #A90329; background: #fbeaec; box-shadow: inset 0 0 0 1px #A90329; }
        html:not(#extr-page) .sff-am-op.rechazo.on b { color: #A90329; }

html:not(#extr-page) .sff-am-campo { margin-bottom: 12px; }
    html:not(#extr-page) .sff-am-campo .form-control { border-radius: 6px; }
    html:not(#extr-page) .sff-am-campo em.invalid { display: block; margin-top: 4px; font-size: 12px; color: #A90329; font-style: normal; }
        html:not(#extr-page) .sff-am-campo em.invalid:before { content: "\f06a"; font-family: FontAwesome; margin-right: 5px; }
    html:not(#extr-page) .sff-am-campo textarea.invalid { border-color: #A90329; }

html:not(#extr-page) .sff-am-contador { float: right; font-size: 11.5px; color: #8a99a5; font-weight: 400; }
    html:not(#extr-page) .sff-am-contador.lleno { color: #A90329; }

html:not(#extr-page) .sff-am-ayudita { font-size: 11.5px; color: #8a99a5; margin-top: 4px; }

html:not(#extr-page) .sff-am-aviso {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: #fff6e5;
    border: 1px solid #f3dca8;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 12.5px;
    color: #6b4a00;
}

    html:not(#extr-page) .sff-am-aviso i { margin-top: 2px; }

/* Detalle: datos, clave, emisor/receptor, totales y mensajes */
html:not(#extr-page) .sff-am-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    padding: 1px 8px;
    background: #b9d3dc;
    color: #0E3D52;
    margin-left: 6px;
    vertical-align: middle;
}

    html:not(#extr-page) .sff-am-chip:empty { display: none; }

html:not(#extr-page) .sff-am-respuesta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-bottom: 10px;
}

    html:not(#extr-page) .sff-am-respuesta > div > span:first-child { display: block; font-size: 11.5px; color: #5b6b78; margin-bottom: 2px; }

html:not(#extr-page) .sff-am-datos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

html:not(#extr-page) .sff-am-dato {
    background: #f5f8fa;
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 0;
}

    html:not(#extr-page) .sff-am-dato span { display: block; font-size: 11.5px; color: #5b6b78; }
    html:not(#extr-page) .sff-am-dato b { font-size: 13.5px; color: #0E3D52; word-break: break-all; }

html:not(#extr-page) .sff-am-clave {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f8fa;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

    html:not(#extr-page) .sff-am-clave > div { flex: 1; min-width: 0; }
    html:not(#extr-page) .sff-am-clave span { display: block; font-size: 11.5px; color: #5b6b78; }
    html:not(#extr-page) .sff-am-clave code { background: none; color: #0E3D52; padding: 0; font-size: 12.5px; word-break: break-all; white-space: normal; }
    html:not(#extr-page) .sff-am-clave button { border: 1px solid #D2E0E6; background: #fff; border-radius: 6px; font-size: 12px; padding: 4px 8px; color: #0E3D52; white-space: nowrap; }

html:not(#extr-page) .sff-am-partes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

html:not(#extr-page) .sff-am-parte {
    border: 1px solid #eef2f5;
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 0;
}

    html:not(#extr-page) .sff-am-parte span { display: block; font-size: 11.5px; color: #5b6b78; }
    html:not(#extr-page) .sff-am-parte b { display: block; font-size: 13.5px; color: #33424d; word-break: break-word; }
    html:not(#extr-page) .sff-am-parte small { color: #5b6b78; }

html:not(#extr-page) .sff-am-totales {
    background: #E8F0F3;
    border-radius: 8px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr) 1.3fr;
    gap: 8px;
    align-items: end;
}

    html:not(#extr-page) .sff-am-totales span { display: block; font-size: 11.5px; color: #5b6b78; }
    html:not(#extr-page) .sff-am-totales b { font-size: 13.5px; color: #0E3D52; }
    html:not(#extr-page) .sff-am-totales .sff-am-tot b { font-size: 19px; }

html:not(#extr-page) .sff-am-plazo { margin-top: 10px; font-size: 12.5px; color: #5b6b78; }

html:not(#extr-page) .sff-am-mas { margin-top: 10px; font-size: 12.5px; }
    html:not(#extr-page) .sff-am-mas summary { cursor: pointer; color: #0E3D52; font-weight: 600; }
    html:not(#extr-page) .sff-am-mas p { margin: 6px 0 0; color: #5b6b78; background: #f5f8fa; border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }

@media (max-width: 767px) {
    html:not(#extr-page) .sff-am-opciones { grid-template-columns: 1fr; }
        html:not(#extr-page) .sff-am-op span { display: inline; margin-left: 4px; }
    html:not(#extr-page) .sff-am-datos { grid-template-columns: 1fr 1fr; }
    html:not(#extr-page) .sff-am-partes { grid-template-columns: 1fr; }
    html:not(#extr-page) .sff-am-totales { grid-template-columns: 1fr 1fr; }
    html:not(#extr-page) .sff-am-modal .modal-footer { flex-wrap: wrap; }
}

/* =====================================================================
   Roles (Crear / Editar rol): formulario y árbol de permisos
   ===================================================================== */
html:not(#extr-page) .sff-roles .label { color: #0E3D52; font-weight: 600; }
html:not(#extr-page) .sff-roles .input input,
html:not(#extr-page) .sff-roles .select select { border-radius: 4px !important; }

/* Árbol: sin líneas punteadas ni raíz "Sistema" */
html:not(#extr-page) .sff-arbol-permisos { padding: 6px 14px 10px; }
    html:not(#extr-page) .sff-arbol-permisos li { padding: 0; }
        html:not(#extr-page) .sff-arbol-permisos li::before,
        html:not(#extr-page) .sff-arbol-permisos li::after { display: none; }
    html:not(#extr-page) .sff-arbol-permisos > ul > li > span { display: none; }
    html:not(#extr-page) .sff-arbol-permisos > ul > li > ul { padding: 0; }

/* Módulo: fila de encabezado */
html:not(#extr-page) .sff-arbol-permisos > ul > li > ul > li { margin-bottom: 6px; }
    html:not(#extr-page) .sff-arbol-permisos > ul > li > ul > li > span {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 12px;
        border: 1px solid #E1E7EA;
        border-radius: 6px;
        background: #F5F7F8;
        color: #0E3D52;
        font-weight: 600;
    }
        html:not(#extr-page) .sff-arbol-permisos > ul > li > ul > li > span:hover { background: #EAF0F2; border-color: #C9D3D8; color: #0E3D52; }
        html:not(#extr-page) .sff-arbol-permisos > ul > li > ul > li > span > .fa { font-size: 12px; width: 12px; color: #0E3D52; }
        html:not(#extr-page) .sff-arbol-permisos .fa-plus-circle:before { content: "\f054"; }
        html:not(#extr-page) .sff-arbol-permisos .fa-minus-circle:before { content: "\f078"; }

    /* Módulo con permisos marcados */
    html:not(#extr-page) .sff-arbol-permisos > ul > li > ul > li.sff-on > span { background: #F4F9E6; border-color: #94BE15; }

/* Contador marcados/total */
html:not(#extr-page) .sff-arbol-contador { margin-left: auto; padding: 1px 9px; border-radius: 10px; background: #E1E7EA; color: #0E3D52; font-size: 11px; font-weight: 600; }
html:not(#extr-page) .sff-arbol-permisos li.sff-on .sff-arbol-contador { background: #94BE15; }

/* Permisos: checkboxes en columnas, sin cajas punteadas */
html:not(#extr-page) .sff-arbol-permisos > ul > li > ul > li > ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0 16px;
    padding: 0 12px 0 34px;
}
    html:not(#extr-page) .sff-arbol-permisos li li li { padding: 2px 0; }
        html:not(#extr-page) .sff-arbol-permisos li li li > span,
        html:not(#extr-page) .sff-arbol-permisos li.parent_li > span:hover + ul li span { display: block; padding: 0; border: 0; background: none !important; color: #404040; }
        html:not(#extr-page) .sff-arbol-permisos li li li .checkbox { color: #404040; font-size: 13px; }

/* Pie: Ayuda como botón secundario a la izquierda */
html:not(#extr-page) .sff-roles footer .btn-ayuda { float: left; margin-left: 0; background: #fff; border: 1px solid #C9D3D8; color: #0E3D52; }
    html:not(#extr-page) .sff-roles footer .btn-ayuda:hover { background: #F5F7F8; color: #0E3D52; }

/* Roles en móvil: filas de módulo y de permiso de 44px para tocar con el dedo */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-arbol-permisos > ul > li > ul > li > span { padding: 12px; }
    html:not(#extr-page) .sff-arbol-permisos > ul > li > ul > li > ul { padding: 0 4px 0 22px; }
    html:not(#extr-page) .sff-arbol-permisos li li li { padding: 0; border-bottom: 1px solid #EEF2F4; }
        html:not(#extr-page) .sff-arbol-permisos li li li:last-child { border-bottom: 0; }
        html:not(#extr-page) .sff-arbol-permisos li li li .checkbox { line-height: 44px; padding-left: 30px; font-size: 14px; }
            html:not(#extr-page) .sff-arbol-permisos li li li .checkbox i { top: 13px; }
}

/* Roles - lista: el combo de estado va dentro de label.input (!important porque SmartAdmin fuerza radius 0 en .form-control) */
html:not(#extr-page) .sff-roles .input select { border-radius: 4px !important; }

/* =====================================================================
   Reporte D104: encabezado, tablas, totales y resumen
   ===================================================================== */
html:not(#extr-page) .sff-d104 .widget-body { padding: 12px 14px; }

/* Encabezado: datos como etiquetas */
html:not(#extr-page) .sff-d104-encabezado { display: flex; flex-wrap: wrap; gap: 8px; }
    html:not(#extr-page) .sff-d104-dato { background: #F5F7F8; border: 1px solid #E1E7EA; border-radius: 6px; padding: 6px 12px; min-width: 140px; }
        html:not(#extr-page) .sff-d104-dato small { display: block; color: #5b6b78; font-size: 11px; }
        html:not(#extr-page) .sff-d104-dato span { color: #0E3D52; font-weight: 600; word-break: break-word; }
    html:not(#extr-page) .sff-d104-periodo { background: #F4F9E6; border-color: #94BE15; }

/* Tablas: montos alineados a la derecha */
html:not(#extr-page) .sff-d104-grupo { margin: 4px 0 6px; font-size: 15px; font-weight: 600; color: #0E3D52; }
html:not(#extr-page) .sff-d104-subtitulo { margin: 8px 0 4px; font-size: 13px; font-weight: 600; color: #5b6b78; }
html:not(#extr-page) .sff-d104-tabla { margin-bottom: 8px; font-size: 13px; }
    html:not(#extr-page) .sff-d104-tabla > thead > tr > th { background: none; border-bottom: 1px solid #E1E7EA; color: #5b6b78; font-weight: 600; white-space: nowrap; }
    html:not(#extr-page) .sff-d104-tabla > tbody > tr > td { border-top: 1px solid #EEF2F4; }
    html:not(#extr-page) .sff-d104-tabla .sff-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Totales como tarjetas */
html:not(#extr-page) .sff-d104-totales { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
    html:not(#extr-page) .sff-d104-total { background: #F5F7F8; border-radius: 6px; padding: 8px 10px; }
        html:not(#extr-page) .sff-d104-total small { display: block; color: #5b6b78; font-size: 11px; }
        html:not(#extr-page) .sff-d104-total b { color: #0E3D52; font-variant-numeric: tabular-nums; }
    html:not(#extr-page) .sff-d104-total.sff-cero b { color: #9aa7b0; font-weight: 400; }
    html:not(#extr-page) .sff-d104-total.sff-general { background: #0E3D52; }
        html:not(#extr-page) .sff-d104-total.sff-general small { color: #cfe0e6; }
        html:not(#extr-page) .sff-d104-total.sff-general b { color: #fff; font-size: 15px; }
    /* El total general ocupa su propia fila completa (antes caía solo en una segunda fila a medio ancho) */
    html:not(#extr-page) .sff-d104-total.sff-general { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
        html:not(#extr-page) .sff-d104-total.sff-general small { display: inline; font-size: 12px; }

/* Resumen: ajustes editables a la izquierda, resultado a la derecha */
html:not(#extr-page) .sff-d104-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 24px; }
    html:not(#extr-page) .sff-d104-resumen-titulo { color: #5b6b78; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
    html:not(#extr-page) .sff-d104-fila { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 6px 0; border-bottom: 1px solid #EEF2F4; font-weight: 400; color: #404040; }
    html:not(#extr-page) .sff-d104-editable { width: 150px; text-align: right; border: 1px solid #C9D3D8; border-radius: 4px; padding: 5px 8px; }
        html:not(#extr-page) .sff-d104-editable:focus { border-color: #0E3D52; outline: none; }
    html:not(#extr-page) .sff-d104-calculado { width: 150px; text-align: right; border: 0; background: transparent; padding: 0; color: #0E3D52; font-weight: 600; cursor: default; }
    html:not(#extr-page) .sff-d104-pagar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 0; padding: 10px 12px; background: #F4F9E6; border: 1px solid #94BE15; border-radius: 6px; font-weight: 600; color: #0E3D52; }
        html:not(#extr-page) .sff-d104-pagar .sff-d104-calculado { font-size: 18px; }

/* Exportar en el encabezado de Resumen */
html:not(#extr-page) .sff-d104-exportar { background: #fff; border: 1px solid #C9D3D8; color: #0E3D52; border-radius: 4px; }
    html:not(#extr-page) .sff-d104-exportar:hover { background: #F4F9E6; border-color: #94BE15; color: #0E3D52; }

/* Títulos numerados de los paneles (1 Filtros … 5 Resumen), como los bloques de las demás pantallas */
html:not(#extr-page) .sff-d104-n { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 4px; border-radius: 50%; background: #94BE15; color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; }
html:not(#extr-page) .sff-d104-filtros > header > h2,
html:not(#extr-page) .sff-d104 .jarviswidget > header > h2 { margin-left: 10px; }

/* Estado inicial antes de generar el reporte */
html:not(#extr-page) .sff-d104-vacio { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0 0 20px; padding: 28px 16px; background: #fff; border: 1px dashed #C9D3D8; border-radius: 8px; color: #5b6b78; text-align: center; }
    html:not(#extr-page) .sff-d104-vacio i { font-size: 30px; color: #94BE15; margin-bottom: 4px; }
    html:not(#extr-page) .sff-d104-vacio b { color: #0E3D52; font-size: 15px; }

/* Selector de mes (cuadrícula de 12 meses, d104.js): un clic elige y cierra */
html:not(#extr-page) .sff-d104-filtros #fecha { cursor: pointer; background: #fff; }
html:not(#extr-page) .sff-mes-pop { position: absolute; top: calc(100% + 4px); right: 0; z-index: 1000; width: 270px; padding: 10px; background: #fff; border: 1px solid #E1E7EA; border-radius: 8px; box-shadow: 0 6px 18px rgba(14, 61, 82, .15); }
    html:not(#extr-page) .sff-mes-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: #0E3D52; font-size: 14px; font-weight: 700; }
        html:not(#extr-page) .sff-mes-cab button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: #0E3D52; }
            html:not(#extr-page) .sff-mes-cab button:hover:not(:disabled) { background: #F5F7F8; }
            html:not(#extr-page) .sff-mes-cab button:disabled { color: #C9D3D8; cursor: default; }
    html:not(#extr-page) .sff-mes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
        html:not(#extr-page) .sff-mes-grid button { padding: 8px 0; border: 1px solid #E1E7EA; border-radius: 4px; background: #fff; color: #0E3D52; font-size: 13px; }
            html:not(#extr-page) .sff-mes-grid button:hover:not(:disabled),
            html:not(#extr-page) .sff-mes-grid button:focus:not(:disabled) { background: #F4F9E6; border-color: #94BE15; outline: none; }
            html:not(#extr-page) .sff-mes-grid button.sff-mes-actual { border-style: dashed; border-color: #94BE15; }
            html:not(#extr-page) .sff-mes-grid button.sff-mes-sel { background: #0E3D52; border-color: #0E3D52; color: #fff; font-weight: 600; }
            html:not(#extr-page) .sff-mes-grid button:disabled { background: #FAFBFB; border-color: #F0F3F4; color: #C0CAD0; cursor: not-allowed; }
    html:not(#extr-page) .sff-mes-nota { margin-top: 8px; color: #5b6b78; font-size: 11px; line-height: 1.4; }

/* Calendario de jQuery UI con el estilo del tema, en todas las pantallas (antes solo con la clase .sff-dp que ponían los reportes al abrir; esa clase ya no es necesaria) */
html:not(#extr-page) #ui-datepicker-div { width: 280px; padding: 10px; background: #fff; border: 1px solid #E1E7EA; border-radius: 8px; box-shadow: 0 6px 18px rgba(14, 61, 82, .15); font-family: inherit; font-size: 13px; }
        html:not(#extr-page) #ui-datepicker-div *:not(.fa) { font-family: inherit; }
    html:not(#extr-page) #ui-datepicker-div .ui-datepicker-header { margin-bottom: 6px; padding: 2px 0; background: none; border: 0; }
        html:not(#extr-page) #ui-datepicker-div .ui-datepicker-title { color: #0E3D52; font-size: 14px; font-weight: 700; line-height: 30px; }
        html:not(#extr-page) #ui-datepicker-div .ui-datepicker-prev,
        html:not(#extr-page) #ui-datepicker-div .ui-datepicker-next { top: 2px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: #0E3D52; text-align: center; line-height: 30px; cursor: pointer; }
        html:not(#extr-page) #ui-datepicker-div .ui-datepicker-prev { left: 2px; }
        html:not(#extr-page) #ui-datepicker-div .ui-datepicker-next { right: 2px; }
            html:not(#extr-page) #ui-datepicker-div .ui-datepicker-prev:hover,
            html:not(#extr-page) #ui-datepicker-div .ui-datepicker-next:hover { background: #F5F7F8; }
            html:not(#extr-page) #ui-datepicker-div .ui-datepicker-prev.ui-state-disabled,
            html:not(#extr-page) #ui-datepicker-div .ui-datepicker-next.ui-state-disabled { color: #C9D3D8; background: none; cursor: default; }
            html:not(#extr-page) #ui-datepicker-div .ui-datepicker-prev span,
            html:not(#extr-page) #ui-datepicker-div .ui-datepicker-next span { position: static; display: inline; width: auto; height: auto; margin: 0; background: none; text-indent: 0; overflow: visible; }
    html:not(#extr-page) #ui-datepicker-div table { margin: 0; font-size: 13px; }
        html:not(#extr-page) #ui-datepicker-div th { padding: 4px 0; color: #5b6b78; font-size: 11px; font-weight: 600; }
        html:not(#extr-page) #ui-datepicker-div td { padding: 1px; }
            html:not(#extr-page) #ui-datepicker-div td a.ui-state-default,
            html:not(#extr-page) #ui-datepicker-div td span.ui-state-default { padding: 6px 0; border: 1px solid transparent; border-radius: 4px; background: #fff; color: #0E3D52; text-align: center; }
            html:not(#extr-page) #ui-datepicker-div td a.ui-state-default:hover { background: #F4F9E6; border-color: #94BE15; }
            html:not(#extr-page) #ui-datepicker-div td a.ui-state-highlight { border: 1px dashed #94BE15; background: #fff; }
            html:not(#extr-page) #ui-datepicker-div td a.ui-state-active { background: #0E3D52; border-color: #0E3D52; color: #fff; font-weight: 600; }
            html:not(#extr-page) #ui-datepicker-div td.ui-datepicker-other-month a.ui-state-default { color: #9aa7b0; }
            html:not(#extr-page) #ui-datepicker-div td.ui-state-disabled span.ui-state-default { background: #FAFBFB; color: #C0CAD0; opacity: 1; }

@media (max-width: 767px) {
    html:not(#extr-page) .sff-d104-dato { flex: 1 1 100%; }
    /* SmartAdmin fija los títulos en 135px en móvil y cortaba "Detalle de compras" */
    html:not(#extr-page) .sff-d104-filtros > header > h2,
    html:not(#extr-page) .sff-d104 .jarviswidget > header > h2 { width: auto; }
    html:not(#extr-page) .sff-mes-pop { left: 0; width: auto; }
    html:not(#extr-page) .sff-d104-editable,
    html:not(#extr-page) .sff-d104-calculado { width: 130px; }
}

/* Reporte D104 en móvil: cada fila de las tablas se muestra como tarjeta (la etiqueta sale de data-label) */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-d104-responsive { overflow: visible; border: 0; margin-bottom: 0; }
    html:not(#extr-page) .sff-d104-tabla > thead { display: none; }
    html:not(#extr-page) .sff-d104-tabla,
    html:not(#extr-page) .sff-d104-tabla > tbody,
    html:not(#extr-page) .sff-d104-tabla > tbody > tr { display: block; width: 100%; }
    html:not(#extr-page) .sff-d104-tabla > tbody > tr { border: 1px solid #E1E7EA; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
        html:not(#extr-page) .sff-d104-tabla > tbody > tr > td { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 6px 10px; border-top: 1px solid #EEF2F4; text-align: right; white-space: normal; }
            html:not(#extr-page) .sff-d104-tabla > tbody > tr > td::before { content: attr(data-label); color: #5b6b78; text-align: left; white-space: nowrap; }
        html:not(#extr-page) .sff-d104-tabla > tbody > tr > td.sff-d104-tarifa { display: block; background: #F5F7F8; border-top: 0; text-align: left; font-weight: 600; color: #0E3D52; }
            html:not(#extr-page) .sff-d104-tabla > tbody > tr > td.sff-d104-tarifa::before { content: none; }
        html:not(#extr-page) .sff-d104-tabla > tbody > tr > td.sff-d104-monto { font-weight: 600; color: #0E3D52; }
}

/* ===== Espera de waitingDialog.js (D104, reporte de clientes, eliminar producto/servicio, factura recurrente...):
   mismo aspecto que la espera de SweetAlert (banda azul con el título + círculo azul/verde). Global como los avisos.
   Medidas en px: SmartAdmin usa letra más pequeña y en "em" quedaba más chico que el de SweetAlert. */
html:not(#sff-avisos) .sff-espera .modal-dialog { width: 420px; max-width: calc(100% - 32px); margin: 15vh auto 0; }
html:not(#sff-avisos) .sff-espera .modal-content { border: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
html:not(#sff-avisos) .sff-espera .modal-header { padding: 14px 20px; background: #0E3D52; border: 0; }
    html:not(#sff-avisos) .sff-espera .modal-header h3 { margin: 0; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.3; text-align: left; }
html:not(#sff-avisos) .sff-espera .modal-body { padding: 20px; text-align: center; }
html:not(#sff-avisos) .sff-espera-loader {
    display: inline-block;
    width: 33px;
    height: 33px;
    border: 4px solid;
    border-color: #0E3D52 transparent #94BE15 transparent;
    border-radius: 100%;
    animation: sff-espera-giro 1.5s linear infinite;
}
@keyframes sff-espera-giro { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* =====================================================================
   Cuentas de pago (cuentas/IndexInfoCuenta): beneficiario, tarjetas por banco y botón Copiar
   ===================================================================== */
html:not(#extr-page) .sff-cuentas { padding: 14px; }
html:not(#extr-page) .sff-cuentas-beneficiario { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
    html:not(#extr-page) .sff-cuentas-dato { background: #F5F7F8; border: 1px solid #E1E7EA; border-radius: 6px; padding: 6px 12px; }
        html:not(#extr-page) .sff-cuentas-dato small { display: block; color: #5b6b78; font-size: 11px; }
        html:not(#extr-page) .sff-cuentas-dato span { color: #0E3D52; font-weight: 600; }
html:not(#extr-page) .sff-cuentas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
html:not(#extr-page) .sff-cuentas-banco { border: 1px solid #E1E7EA; border-radius: 8px; overflow: hidden; background: #fff; }
    html:not(#extr-page) .sff-cuentas-banco-titulo { background: #F5F7F8; padding: 9px 12px; color: #0E3D52; font-weight: 600; font-size: 14px; }
        html:not(#extr-page) .sff-cuentas-banco-titulo .fa { margin-right: 6px; }
html:not(#extr-page) .sff-cuentas-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-top: 1px solid #EEF2F4; }
    html:not(#extr-page) .sff-cuentas-fila small { display: block; color: #5b6b78; font-size: 11px; }
    html:not(#extr-page) .sff-cuentas-fila span { color: #0E3D52; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: .02em; word-break: break-word; }
html:not(#extr-page) .sff-cuentas-copiar { flex-shrink: 0; background: #fff; border: 1px solid #C9D3D8; color: #0E3D52; border-radius: 4px; }
    html:not(#extr-page) .sff-cuentas-copiar:hover { background: #F5F7F8; color: #0E3D52; }
    html:not(#extr-page) .sff-cuentas-copiar.sff-copiado { background: #F4F9E6; border-color: #94BE15; }
html:not(#extr-page) .sff-cuentas-aviso { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; background: #F4F9E6; border: 1px solid #94BE15; border-radius: 8px; font-size: 13px; line-height: 1.5; color: #3E4D54; }
    html:not(#extr-page) .sff-cuentas-aviso .fa { color: #0E3D52; font-size: 16px; margin-top: 2px; }
    html:not(#extr-page) .sff-cuentas-aviso a { color: #0E3D52; font-weight: 600; text-decoration: underline; }

/* Cuentas de pago en móvil: botón Copiar de 40px de alto para tocar con el dedo */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-cuentas-copiar { min-height: 40px; min-width: 76px; padding: 8px 14px; font-size: 13px; }
}

/* =====================================================================
   Registrar perfil (Account/CrearUsuario): una tarjeta numerada por sección
   ===================================================================== */
html:not(#extr-page) .sff-perfil .sff-perfil-tarjetas { display: grid; gap: 12px; padding: 14px; }
html:not(#extr-page) .sff-perfil .sff-perfil-tarjeta { border: 1px solid #E1E7EA; border-radius: 8px; overflow: hidden; background: #fff; }
html:not(#extr-page) .sff-perfil .sff-perfil-titulo { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: #F5F7F8; color: #0E3D52; font-weight: 600; font-size: 14px; }
html:not(#extr-page) .sff-perfil .sff-perfil-numero { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #0E3D52; color: #fff; font-size: 12px; }
html:not(#extr-page) .sff-perfil .sff-perfil-tarjeta fieldset { padding: 12px 14px 0; border-top: 0; background: transparent; }
html:not(#extr-page) .sff-perfil .sff-perfil-ayuda { display: block; margin-top: 4px; color: #5b6b78; font-size: 11px; }
html:not(#extr-page) .sff-perfil footer .sff-perfil-limpiar { background: #fff; border: 1px solid #C9D3D8; color: #0E3D52; }
    html:not(#extr-page) .sff-perfil footer .sff-perfil-limpiar:hover { background: #F5F7F8; color: #0E3D52; }

/* Registrar perfil en móvil: espacio final para que el botón flotante de WhatsApp no tape "Registrar perfil" */
/* sff-espacio-whatsapp: mismo espacio en otras pantallas (Configuración del emisor) */
html:not(#extr-page) .sff-perfil-espacio-movil,
html:not(#extr-page) .sff-espacio-whatsapp { display: none; }
@media (max-width: 767px) {
    html:not(#extr-page) .sff-perfil-espacio-movil,
    html:not(#extr-page) .sff-espacio-whatsapp { display: block; height: 80px; }
}

/* ===== Botón de ojo en campos de contraseña (sff-ver-clave.js): ocupa el lugar del ícono a la derecha ===== */
html:not(#sff-avisos) .smart-form .input .sff-ver-clave {
    background: transparent;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 0;
    color: #0E3D52;
    cursor: pointer;
    pointer-events: auto;
    z-index: 3;
}
    html:not(#sff-avisos) .smart-form .input .sff-ver-clave:hover { color: #94BE15; }
    html:not(#sff-avisos) .smart-form .input .sff-ver-clave:focus { outline: 2px solid #94BE15; outline-offset: 1px; }
/* =====================================================================
   Configuración de emisores (ClienteEmisor/IndexClientEmisor)
   ===================================================================== */
/* Acciones a la derecha y en una sola línea */
html:not(#extr-page) .sff-tabla-emisores > thead > tr > th:last-child,
html:not(#extr-page) .sff-tabla-emisores > tbody > tr > td:last-child {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

html:not(#extr-page) .sff-tabla-emisores .botonesAcciones {
    margin: 0 0 0 4px;
}

/* Móvil: una tarjeta por emisor; nombre y botones arriba, identificación abajo */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-tabla-emisores > thead {
        display: none;
    }

    html:not(#extr-page) .sff-tabla-emisores,
    html:not(#extr-page) .sff-tabla-emisores > tbody {
        display: block;
        border: 0 !important;
    }

        html:not(#extr-page) .sff-tabla-emisores > tbody > tr {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 4px 10px;
            margin-bottom: 10px;
            padding: 10px 12px;
            border: 1px solid #E1E7EA;
            border-radius: 10px;
            background: #fff !important;
        }

            html:not(#extr-page) .sff-tabla-emisores > tbody > tr > td {
                display: block;
                width: auto;
                padding: 0 !important;
                border: 0 !important;
                background: none !important;
                text-align: left;
            }

                html:not(#extr-page) .sff-tabla-emisores > tbody > tr > td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 600; color: #0E3D52; }
                html:not(#extr-page) .sff-tabla-emisores > tbody > tr > td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 12px; color: #5F6B70; }
                html:not(#extr-page) .sff-tabla-emisores > tbody > tr > td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; }

    /* Fila vacía ("No se encontraron emisores") */
    html:not(#extr-page) .sff-tabla-emisores > tbody > tr > td.dataTables_empty {
        grid-column: 1 / span 2;
        grid-row: 1;
        text-align: center;
    }
}
/* Botones de acción del grid de emisores: mismos colores e íconos, con degradado, sombra y movimiento al pasar el mouse */
html:not(#extr-page) .sff-tabla-emisores .botonesAcciones {
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s, box-shadow .15s;
}

    html:not(#extr-page) .sff-tabla-emisores .botonesAcciones:hover,
    html:not(#extr-page) .sff-tabla-emisores .botonesAcciones:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

    html:not(#extr-page) .sff-tabla-emisores .botonesAcciones:active {
        transform: translateY(1px);
        box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    }

html:not(#extr-page) .sff-tabla-emisores .btnEditar { background: linear-gradient(180deg, #D9A43A, #B47F16) !important; color: #fff !important; }
html:not(#extr-page) .sff-tabla-emisores .btnCodigosActi { background: linear-gradient(180deg, #6A9E9D, #477574) !important; color: #fff !important; }
html:not(#extr-page) .sff-tabla-emisores .btnConsecutivos { background: linear-gradient(180deg, #A7B6BB, #7F9096) !important; color: #22313A !important; }

/* Separación un poco mayor para que la sombra no se toque entre botones */
html:not(#extr-page) .sff-tabla-emisores .botonesAcciones + .botonesAcciones {
    margin-left: 6px;
}
/* Paginador del grid de emisores: la columna de 50% no alcanzaba para Anterior, 1-5, …, 133 y Siguiente
   y "Siguiente" bajaba de línea. El pie pasa a flex: el paginador toma lo que necesita y la información el resto */
html:not(#extr-page) .sff-contenedor-emisores .dt-toolbar-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

    html:not(#extr-page) .sff-contenedor-emisores .dt-toolbar-footer > div {
        float: none;
        width: auto;
    }

        html:not(#extr-page) .sff-contenedor-emisores .dt-toolbar-footer > div:first-child {
            flex: 1 1 200px;
            min-width: 0;
        }

        html:not(#extr-page) .sff-contenedor-emisores .dt-toolbar-footer > div:last-child {
            flex: 0 0 auto;
            margin-left: auto;
        }

html:not(#extr-page) .sff-contenedor-emisores .dataTables_paginate .pagination {
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Celular: el paginador ocupa todo el ancho, centrado, con botones un poco más angostos para que quepa en una línea */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-contenedor-emisores .dt-toolbar-footer > div:last-child {
        flex: 1 1 100%;
        margin-left: 0;
        padding: 0; /* sin el margen de 13 px de la columna, para que el paginador quepa centrado */
    }

    html:not(#extr-page) .sff-contenedor-emisores .dataTables_paginate .pagination {
        justify-content: center;
    }

        html:not(#extr-page) .sff-contenedor-emisores .dataTables_paginate .pagination > li > a {
            padding: 5px 7px;
        }
}
/* Celular: "Anterior" y "Siguiente" pasan a flechas para que quepan las páginas de 3 cifras (129 130 … 133) */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-contenedor-emisores .dataTables_paginate .pagination > li.previous > a,
    html:not(#extr-page) .sff-contenedor-emisores .dataTables_paginate .pagination > li.next > a {
        font-size: 0;
        padding: 5px 10px;
    }

        html:not(#extr-page) .sff-contenedor-emisores .dataTables_paginate .pagination > li.previous > a::before {
            content: "\2039";
            font-size: 16px;
            line-height: 18px;
        }

        html:not(#extr-page) .sff-contenedor-emisores .dataTables_paginate .pagination > li.next > a::before {
            content: "\203A";
            font-size: 16px;
            line-height: 18px;
        }
}
/* Teléfonos muy angostos (menos de 360 px): botones del paginador más compactos */
@media (max-width: 359px) {
    html:not(#extr-page) .sff-contenedor-emisores .dataTables_paginate .pagination > li > a {
        padding: 5px 5px;
    }

        html:not(#extr-page) .sff-contenedor-emisores .dataTables_paginate .pagination > li.previous > a,
        html:not(#extr-page) .sff-contenedor-emisores .dataTables_paginate .pagination > li.next > a {
            padding: 5px 8px;
        }
}
/* =====================================================================
   Configuración del emisor (ClienteEmisor/Editar): vista previa del logo y botón "Quitar logo"
   ===================================================================== */
html:not(#extr-page) .sff-logo-vista {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

html:not(#extr-page) .sff-logo-marco {
    width: 170px;
    height: 80px;
    padding: 6px;
    border: 1px dashed #C9D3D8;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    html:not(#extr-page) .sff-logo-marco img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

html:not(#extr-page) #logoSinLogo {
    font-size: 12px;
    color: #6B777C;
    text-align: center;
}

/* Acción que borra: borde y texto rojos (antes era verde) */
html:not(#extr-page) .sff-btn-quitar {
    background: #fff !important;
    border: 1px solid #E24B4A !important;
    border-radius: 6px;
    color: #A32D2D !important;
    height: 34px;
    padding: 6px 12px !important; /* smart-form dejaba el botón sin relleno (20 px de alto) */
    font-size: 13px;
    line-height: 20px;
}

    html:not(#extr-page) .sff-btn-quitar:hover,
    html:not(#extr-page) .sff-btn-quitar:focus {
        background: #FCEBEB !important;
        color: #791F1F !important;
    }
/* =====================================================================
   Configuración del emisor (ClienteEmisor/Editar): tarjetas numeradas, interruptores en lista,
   notas, Otros cargos y barra de botones fija. Clases sff-ce-* en Editar.cshtml
   ===================================================================== */
html:not(#extr-page) .sff-config-emisor {
    background: #F4F7F8;
    padding: 12px 12px 0;
}

html:not(#extr-page) .sff-config-emisor .sff-ce-tarjeta {
    margin: 0 0 14px;
    background: #fff;
    border: 1px solid #E1E7EA;
    border-radius: 10px;
    overflow: hidden;
}

html:not(#extr-page) .sff-config-emisor .sff-ce-titulo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-bottom: 1px solid #EEF2F4;
    font-size: 15px;
    font-weight: 600;
    color: #0E3D52;
}

html:not(#extr-page) .sff-config-emisor .sff-ce-numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #94BE15;
    color: #fff;
    font-size: 12px;
}

    /* Dentro de la tarjeta, los bloques sin borde ni fondo propios; su título queda como subtítulo */
    html:not(#extr-page) .sff-config-emisor .sff-ce-tarjeta fieldset {
        background: transparent;
        border-top: 0;
        padding-top: 12px;
        padding-bottom: 6px;
    }

        html:not(#extr-page) .sff-config-emisor .sff-ce-tarjeta fieldset + fieldset {
            border-top: 1px dashed #E1E7EA;
        }

    html:not(#extr-page) .sff-config-emisor .sff-ce-tarjeta fieldset > label.label > b {
        font-size: 13px;
        color: #5F6B70;
    }

/* Interruptores en lista de dos columnas: texto a la izquierda, interruptor a la derecha.
   Todo el bloque es una sola cuadrícula (filas y columnas originales con display: contents) para que no queden huecos */
html:not(#extr-page) .sff-config-emisor .sff-ce-interruptores > fieldset:first-of-type {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
}

    html:not(#extr-page) .sff-config-emisor .sff-ce-interruptores > fieldset:first-of-type > .row,
    html:not(#extr-page) .sff-config-emisor .sff-ce-interruptores > fieldset:first-of-type > .row > section {
        display: contents;
    }

    /* El clearfix de Bootstrap (.row::before/::after) ocuparía celdas vacías dentro de la cuadrícula */
    html:not(#extr-page) .sff-config-emisor .sff-ce-interruptores > fieldset:first-of-type > .row::before,
    html:not(#extr-page) .sff-config-emisor .sff-ce-interruptores > fieldset:first-of-type > .row::after {
        display: none;
    }

    html:not(#extr-page) .sff-config-emisor .sff-ce-interruptores > fieldset:first-of-type > label.label {
        grid-column: 1 / -1;
    }

    html:not(#extr-page) .sff-config-emisor .sff-ce-interruptores > fieldset:first-of-type label.toggle {
        margin: 0;
        padding-top: 9px;
        padding-bottom: 9px;
        border-bottom: 1px solid #EEF2F4;
        line-height: 18px;
    }

        html:not(#extr-page) .sff-config-emisor .sff-ce-interruptores > fieldset:first-of-type label.toggle i {
            top: 8px;
        }

    /* Las notas ocupan el ancho completo */
    html:not(#extr-page) .sff-config-emisor .sff-ce-interruptores > fieldset:first-of-type .sff-ce-notas {
        grid-column: 1 / -1;
    }

html:not(#extr-page) .sff-config-emisor .sff-ce-notas {
    display: block !important;
    float: none;
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px 10px 38px;
    position: relative;
    border-radius: 8px;
    background: #E6F1FB;
    color: #0C447C;
    font-size: 12px;
    line-height: 17px;
}

    html:not(#extr-page) .sff-config-emisor .sff-ce-notas::before {
        content: "\f05a";
        font-family: FontAwesome;
        position: absolute;
        left: 13px;
        top: 10px;
        font-size: 15px;
    }

    html:not(#extr-page) .sff-config-emisor .sff-ce-notas label {
        display: block;
        margin: 0 0 6px;
        color: #0C447C;
    }

        html:not(#extr-page) .sff-config-emisor .sff-ce-notas label:last-child {
            margin-bottom: 0;
        }

/* API key: botón Copiar junto al campo */
html:not(#extr-page) .sff-config-emisor .sff-ce-copiar {
    margin-top: 6px;
    height: 30px;
    padding: 4px 10px !important;
    border-radius: 6px;
    color: #0E3D52;
}

    html:not(#extr-page) .sff-config-emisor .sff-ce-copiar.sff-copiado {
        border-color: #94BE15;
        color: #3B6D11;
    }

/* Otros cargos: botón Agregar y tabla como los demás grids */
html:not(#extr-page) .sff-config-emisor .sff-ce-agregar {
    height: 34px;
    padding: 6px 14px !important;
    border-radius: 6px;
}

html:not(#extr-page) .sff-config-emisor #datatable_ListaOtrosCargos {
    border: 1px solid #E1E7EA;
    border-radius: 8px;
    border-collapse: separate;
    overflow: hidden;
}

    html:not(#extr-page) .sff-config-emisor #datatable_ListaOtrosCargos > thead > tr > th {
        background: #F4F7F8;
        color: #5F6B70;
        font-weight: 600;
        border-bottom: 1px solid #E1E7EA;
    }

    html:not(#extr-page) .sff-config-emisor #datatable_ListaOtrosCargos .EliminarOtrosCargos {
        height: 28px;
        padding: 3px 10px;
        border: 1px solid #E24B4A;
        border-radius: 6px;
        background: #fff;
        color: #A32D2D;
    }

        html:not(#extr-page) .sff-config-emisor #datatable_ListaOtrosCargos .EliminarOtrosCargos:hover {
            background: #FCEBEB;
        }

/* Barra de botones fija al pie mientras se recorre la página; Ayuda a la izquierda */
html:not(#extr-page) .sff-config-emisor footer.sff-ce-acciones {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0 -12px;
    border-top: 1px solid #E1E7EA;
    background: #fff;
    box-shadow: 0 -4px 12px rgba(14, 61, 82, .08);
}

    html:not(#extr-page) .sff-config-emisor footer.sff-ce-acciones #inicioAyuda {
        float: left;
        margin-left: 0;
    }

/* Celular: interruptores en una columna */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-config-emisor {
        padding: 8px 8px 0;
    }

    html:not(#extr-page) .sff-config-emisor .sff-ce-interruptores > fieldset:first-of-type {
        grid-template-columns: minmax(0, 1fr);
    }

    html:not(#extr-page) .sff-config-emisor footer.sff-ce-acciones {
        margin: 0 -8px;
    }
}
/* Configuración del emisor: el botón de WhatsApp sube para no tapar la barra de botones fija */
html:not(#extr-page) body:has(.sff-config-emisor) #wachat.floating-wpp {
    bottom: 80px !important;
}

/* Celular: #main del tema tiene overflow hidden y anula position: sticky; la barra pasa a fixed al pie */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-config-emisor footer.sff-ce-acciones {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        z-index: 1000;
        padding: 10px 12px;
    }
}
/* =====================================================================
   Configuración del emisor: subtarjetas en "Encabezado de la factura" y "Secciones adicionales".
   Cada bloque (fieldset.sff-ce-sub) es una subtarjeta; su título (label.sff-ce-subtitulo) es la cabecera,
   con ícono según data-icono y descripción en data-desc. En las secciones con interruptor, el
   interruptor se ubica en la cabecera (solo por CSS: no cambia el HTML de los campos)
   ===================================================================== */
html:not(#extr-page) .sff-config-emisor .sff-ce-subs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 12px 12px;
}

    html:not(#extr-page) .sff-config-emisor .sff-ce-subs > .sff-ce-titulo {
        grid-column: 1 / -1;
        margin: 0 -12px;
    }

    html:not(#extr-page) .sff-config-emisor .sff-ce-subs > fieldset.sff-ce-sub {
        position: relative;
        align-self: start;
        margin: 0;
        padding: 0 12px 8px;
        border: 1px solid #E1E7EA !important;
        border-radius: 8px;
        background: #fff;
    }

    html:not(#extr-page) .sff-config-emisor .sff-ce-subs > fieldset.sff-ce-sub-ancho {
        grid-column: 1 / -1;
    }

html:not(#extr-page) .sff-config-emisor .sff-ce-sub > label.sff-ce-subtitulo {
    position: relative;
    display: block;
    margin: 0 -12px 10px;
    padding: 9px 96px 9px 50px;
    min-height: 48px;
    border-bottom: 1px solid #EEF2F4;
    border-radius: 8px 8px 0 0;
    background: #F7F9FA;
}

    html:not(#extr-page) .sff-config-emisor .sff-ce-sub > label.sff-ce-subtitulo > b {
        font-size: 13px;
        color: #0E3D52;
    }

    /* Descripción corta debajo del título */
    html:not(#extr-page) .sff-config-emisor .sff-ce-sub > label.sff-ce-subtitulo::after {
        content: attr(data-desc);
        display: block;
        font-size: 11px;
        line-height: 15px;
        color: #6B777C;
    }

    /* Ícono de la subtarjeta */
    html:not(#extr-page) .sff-config-emisor .sff-ce-sub > label.sff-ce-subtitulo::before {
        position: absolute;
        left: 12px;
        top: 50%;
        width: 28px;
        height: 28px;
        margin-top: -14px;
        border-radius: 6px;
        background: #E6EEF1;
        color: #0E3D52;
        font-family: FontAwesome;
        font-size: 14px;
        line-height: 28px;
        text-align: center;
    }

html:not(#extr-page) .sff-config-emisor .sff-ce-sub[data-icono="datos"] > label.sff-ce-subtitulo::before { content: "\f2c2"; }
html:not(#extr-page) .sff-config-emisor .sff-ce-sub[data-icono="telefonos"] > label.sff-ce-subtitulo::before { content: "\f095"; }
html:not(#extr-page) .sff-config-emisor .sff-ce-sub[data-icono="logo"] > label.sff-ce-subtitulo::before { content: "\f03e"; }
html:not(#extr-page) .sff-config-emisor .sff-ce-sub[data-icono="exoneracion"] > label.sff-ce-subtitulo::before { content: "\f0a3"; }
html:not(#extr-page) .sff-config-emisor .sff-ce-sub[data-icono="xml"] > label.sff-ce-subtitulo::before { content: "\f121"; }
html:not(#extr-page) .sff-config-emisor .sff-ce-sub[data-icono="contenidos"] > label.sff-ce-subtitulo::before { content: "\f03a"; }
html:not(#extr-page) .sff-config-emisor .sff-ce-sub[data-icono="impuesto"] > label.sff-ce-subtitulo::before { content: "\f295"; }
html:not(#extr-page) .sff-config-emisor .sff-ce-sub[data-icono="vendedores"] > label.sff-ce-subtitulo::before { content: "\f0c0"; }
html:not(#extr-page) .sff-config-emisor .sff-ce-sub[data-icono="cargos"] > label.sff-ce-subtitulo::before { content: "\f0d6"; }

/* Interruptor en la cabecera: la sección que lo contiene se ubica arriba a la derecha y su texto
   (repetido con el título) se oculta; el interruptor sigue siendo el mismo checkbox */
html:not(#extr-page) .sff-config-emisor .sff-ce-sub-interruptor section:has(> label.toggle) {
    position: absolute;
    top: 12px;
    right: 12px;
    width: auto;
    margin: 0;
    padding: 0;
    float: none;
}

    html:not(#extr-page) .sff-config-emisor .sff-ce-sub-interruptor section:has(> label.toggle) > label.toggle {
        display: block;
        width: 52px;
        height: 24px;
        margin: 0;
        padding: 0;
        font-size: 0;
        line-height: 0;
        border: 0;
    }

        html:not(#extr-page) .sff-config-emisor .sff-ce-sub-interruptor section:has(> label.toggle) > label.toggle i {
            top: 3px;
            font-size: 11px;
            line-height: normal;
        }

/* Sección activa (interruptor en SÍ): borde y cabecera en verde */
html:not(#extr-page) .sff-config-emisor .sff-ce-sub-interruptor:has(label.toggle input:checked) {
    border-color: #C0DD97 !important;
}

    html:not(#extr-page) .sff-config-emisor .sff-ce-sub-interruptor:has(label.toggle input:checked) > label.sff-ce-subtitulo {
        background: #F4F8EA;
    }

        html:not(#extr-page) .sff-config-emisor .sff-ce-sub-interruptor:has(label.toggle input:checked) > label.sff-ce-subtitulo::before {
            background: #EAF3DE;
            color: #3B6D11;
        }

/* Celular: subtarjetas en una columna */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-config-emisor .sff-ce-subs {
        grid-template-columns: minmax(0, 1fr);
        padding: 0 8px 8px;
    }

        html:not(#extr-page) .sff-config-emisor .sff-ce-subs > .sff-ce-titulo {
            margin: 0 -8px;
        }
}
/* Sección con el interruptor en NO: solo se ve la cabecera. Antes "Otros cargos" mostraba sus campos al abrir
   aunque estuviera en NO (el script no aplicaba el estado inicial). Las filas siguientes a la del interruptor
   se ocultan; al pasar a SÍ la regla deja de aplicar y el script las muestra como siempre */
html:not(#extr-page) .sff-config-emisor .sff-ce-sub-interruptor:not(:has(label.toggle input:checked)) > .row ~ .row {
    display: none !important;
}
/* Registrar emisor (Emisor/IngresaEmisor): reutiliza las tarjetas sff-ce-* de Configuración del emisor */
html:not(#extr-page) .sff-config-emisor .sff-ce-sub[data-icono="ubicacion"] > label.sff-ce-subtitulo::before { content: "\f041"; }

/* Si el script oculta un bloque que ocupa toda la tarjeta (p. ej. #configuracionDGT al agregar un emisor
   existente), la tarjeta completa se oculta para que no quede solo el título */
html:not(#extr-page) .sff-config-emisor .sff-ce-tarjeta:has(> fieldset#configuracionDGT[style*="none"]) {
    display: none;
}
/* Registrar emisores (Emisor/IndexEmisor): botón "Registrar emisor" del grid con el mismo estilo
   de los botones de Configuración de emisores (degradado, sombra y movimiento) */
html:not(#extr-page) .sff-tabla-registro-emisores > thead > tr > th:last-child,
html:not(#extr-page) .sff-tabla-registro-emisores > tbody > tr > td:last-child {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

html:not(#extr-page) .sff-tabla-registro-emisores .botonesAcciones {
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s, box-shadow .15s;
}

    html:not(#extr-page) .sff-tabla-registro-emisores .botonesAcciones:hover,
    html:not(#extr-page) .sff-tabla-registro-emisores .botonesAcciones:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

    html:not(#extr-page) .sff-tabla-registro-emisores .botonesAcciones:active {
        transform: translateY(1px);
        box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    }

html:not(#extr-page) .sff-tabla-registro-emisores .btnRegistrarEmisor { background: linear-gradient(180deg, #D9A43A, #B47F16) !important; color: #fff !important; }
/* Listas de productos, servicios y proveedores (comparten .sff-tabla-productos): botones Editar y Eliminar
   con el mismo estilo de Configuración de emisores (degradado, sombra y movimiento). Solo estos dos botones:
   el botón "Seleccionar" de las listas de factura no cambia */
html:not(#extr-page) .sff-tabla-productos .btnEditar.botonesAcciones,
html:not(#extr-page) .sff-tabla-productos .btnBorrar.botonesAcciones {
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s, box-shadow .15s;
    color: #fff !important;
}

    html:not(#extr-page) .sff-tabla-productos .btnEditar.botonesAcciones:hover,
    html:not(#extr-page) .sff-tabla-productos .btnEditar.botonesAcciones:focus-visible,
    html:not(#extr-page) .sff-tabla-productos .btnBorrar.botonesAcciones:hover,
    html:not(#extr-page) .sff-tabla-productos .btnBorrar.botonesAcciones:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

    html:not(#extr-page) .sff-tabla-productos .btnEditar.botonesAcciones:active,
    html:not(#extr-page) .sff-tabla-productos .btnBorrar.botonesAcciones:active {
        transform: translateY(1px);
        box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    }

html:not(#extr-page) .sff-tabla-productos .btnEditar.botonesAcciones { background: linear-gradient(180deg, #D9A43A, #B47F16) !important; }
html:not(#extr-page) .sff-tabla-productos .btnBorrar.botonesAcciones { background: linear-gradient(180deg, #C9284B, #8E0323) !important; }

/* Un poco más de separación para que las sombras no se toquen */
html:not(#extr-page) .sff-tabla-productos .btnEditar.botonesAcciones + .btnBorrar.botonesAcciones {
    margin-left: 6px;
}
/* Lista de clientes: botones Editar y Código de actividad con el mismo estilo de Configuración de emisores */
html:not(#extr-page) .sff-tabla-clientes .btnEditar.botonesAcciones,
html:not(#extr-page) .sff-tabla-clientes .btnCreditos.bg-color-teal.botonesAcciones {
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s, box-shadow .15s;
    color: #fff !important;
}

    html:not(#extr-page) .sff-tabla-clientes .btnEditar.botonesAcciones:hover,
    html:not(#extr-page) .sff-tabla-clientes .btnEditar.botonesAcciones:focus-visible,
    html:not(#extr-page) .sff-tabla-clientes .btnCreditos.bg-color-teal.botonesAcciones:hover,
    html:not(#extr-page) .sff-tabla-clientes .btnCreditos.bg-color-teal.botonesAcciones:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

    html:not(#extr-page) .sff-tabla-clientes .btnEditar.botonesAcciones:active,
    html:not(#extr-page) .sff-tabla-clientes .btnCreditos.bg-color-teal.botonesAcciones:active {
        transform: translateY(1px);
        box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    }

html:not(#extr-page) .sff-tabla-clientes .btnEditar.botonesAcciones { background: linear-gradient(180deg, #D9A43A, #B47F16) !important; }
html:not(#extr-page) .sff-tabla-clientes .btnCreditos.bg-color-teal.botonesAcciones { background: linear-gradient(180deg, #6A9E9D, #477574) !important; }

html:not(#extr-page) .sff-tabla-clientes .botonesAcciones + .botonesAcciones {
    margin-left: 6px;
}
/* Códigos de actividad (emisor, cliente y proveedor; comparten .sff-act-tabla): botones Eliminar, Marcar como
   principal y Agregar con el mismo estilo de Configuración de emisores, manteniendo sus colores */
html:not(#extr-page) .sff-act-tabla .btnEliminar.botonesAcciones,
html:not(#extr-page) .sff-act-tabla .btnDefaultAct.botonesAcciones,
html:not(#extr-page) .sff-act-tabla .btnAgregarAct.botonesAcciones {
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s, box-shadow .15s;
    color: #fff !important;
}

    html:not(#extr-page) .sff-act-tabla .btnEliminar.botonesAcciones:hover,
    html:not(#extr-page) .sff-act-tabla .btnEliminar.botonesAcciones:focus-visible,
    html:not(#extr-page) .sff-act-tabla .btnDefaultAct.botonesAcciones:hover,
    html:not(#extr-page) .sff-act-tabla .btnDefaultAct.botonesAcciones:focus-visible,
    html:not(#extr-page) .sff-act-tabla .btnAgregarAct.botonesAcciones:hover,
    html:not(#extr-page) .sff-act-tabla .btnAgregarAct.botonesAcciones:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

    html:not(#extr-page) .sff-act-tabla .btnEliminar.botonesAcciones:active,
    html:not(#extr-page) .sff-act-tabla .btnDefaultAct.botonesAcciones:active,
    html:not(#extr-page) .sff-act-tabla .btnAgregarAct.botonesAcciones:active {
        transform: translateY(1px);
        box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    }

html:not(#extr-page) .sff-act-tabla .btnEliminar.botonesAcciones { background: linear-gradient(180deg, #D9A43A, #B47F16) !important; }
html:not(#extr-page) .sff-act-tabla .btnDefaultAct.botonesAcciones,
html:not(#extr-page) .sff-act-tabla .btnAgregarAct.botonesAcciones { background: linear-gradient(180deg, #6A9E9D, #477574) !important; }

html:not(#extr-page) .sff-act-tabla .botonesAcciones + .botonesAcciones {
    margin-left: 6px;
}

/* Facturar (factura/CrearFactura, _PartialEncabezado): cada bloque numerado es una tarjeta (.sff-fac-tarjeta);
   los fieldset quedan sin estilo, salvo los opcionales (con id) que se muestran como su propia tarjeta */
html:not(#extr-page) .sff-fac-tarjetas {
    background: #F4F7F8;
    padding: 12px 12px 1px;
}

    html:not(#extr-page) .sff-fac-tarjetas > fieldset {
        margin: 0;
        padding: 0 !important;
        background: transparent;
        border: 0 !important;
    }

    html:not(#extr-page) .sff-fac-tarjetas .sff-fac-tarjeta,
    html:not(#extr-page) .sff-fac-tarjetas > fieldset[id],
    html:not(#extr-page) .sff-fac-tarjetas > fieldset.sff-fac-cont {
        margin: 0 0 14px;
        padding: 0 14px 10px !important;
        background: #fff;
        border: 1px solid #B9C7CE !important;
        border-radius: 10px;
        box-shadow: 0 1px 3px rgba(14, 61, 82, .12);
    }

        html:not(#extr-page) .sff-fac-tarjetas .sff-fac-tarjeta fieldset {
            padding: 0 !important;
            background: transparent;
            border: 0 !important;
        }

        /* Bloque 3 Detalle: continúa en el fieldset de la tabla Detalle Factura (sin borde entre ambos) */
        html:not(#extr-page) .sff-fac-tarjetas .sff-fac-tarjeta.sff-fac-abierta {
            margin-bottom: 0;
            padding-bottom: 0 !important;
            border-bottom: 0 !important;
            border-radius: 10px 10px 0 0;
            box-shadow: none;
        }

    html:not(#extr-page) .sff-fac-tarjetas > fieldset.sff-fac-cont {
        border-top: 0 !important;
        border-radius: 0 0 10px 10px;
    }

    /* Bloque 5: sin tarjeta vacía cuando el script de la vista oculta su título (ninguna opción visible) */
    html:not(#extr-page) .sff-fac-tarjetas .sff-fac-tarjeta:has(> #sffBloqueOpciones[style*="none"]) {
        display: none;
    }

    html:not(#extr-page) .sff-fac-tarjetas .sff-fac-tarjeta > .sff-bloque-t {
        margin: 0 -14px 14px;
        padding: 11px 14px;
        border-bottom: 1px solid #D3DCE1;
        font-size: 15px;
        font-weight: 600;
    }

        html:not(#extr-page) .sff-fac-tarjetas .sff-fac-tarjeta > .sff-bloque-t span {
            width: 24px;
            height: 24px;
            background: #94BE15;
        }

    html:not(#extr-page) .sff-fac-tarjetas > footer {
        margin: 0 -12px;
    }

/* Facturar: Seleccionar (lista de servicios/productos), Descuento y Eliminar línea (Detalle Factura) con el estilo de Configuración de emisores */
html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_detalle .btnselect.botonesAcciones,
html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_facturaDetalle .bntdescuentoitem.botonesAcciones,
html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_facturaDetalle .bntdeleteitem.botonesAcciones {
    border: 0 !important;
    border-radius: 8px !important;
    color: #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s, box-shadow .15s;
}

    html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_detalle .btnselect.botonesAcciones:hover,
    html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_detalle .btnselect.botonesAcciones:focus-visible,
    html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_facturaDetalle .bntdescuentoitem.botonesAcciones:hover,
    html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_facturaDetalle .bntdescuentoitem.botonesAcciones:focus-visible,
    html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_facturaDetalle .bntdeleteitem.botonesAcciones:hover,
    html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_facturaDetalle .bntdeleteitem.botonesAcciones:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

    html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_detalle .btnselect.botonesAcciones:active,
    html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_facturaDetalle .bntdescuentoitem.botonesAcciones:active,
    html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_facturaDetalle .bntdeleteitem.botonesAcciones:active {
        transform: translateY(1px);
        box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    }

html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_detalle .btnselect.botonesAcciones { background: linear-gradient(180deg, #6A9E9D, #477574) !important; }
html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_facturaDetalle .bntdescuentoitem.botonesAcciones { background: linear-gradient(180deg, #6A9BAF, #457385) !important; }
html:not(#extr-page) .sff-fac-tarjetas #datatable_fixed_facturaDetalle .bntdeleteitem.botonesAcciones { background: linear-gradient(180deg, #C9284B, #8E0323) !important; }

/* Editar factura (nota de crédito/débito): cada fieldset de primer nivel es una tarjeta, como Nuevo/Editar proveedor */
html:not(#extr-page) .editFacturaForm.sff-nota-tarjetas {
    background: #F4F7F8;
    padding: 12px 12px 1px;
}

    html:not(#extr-page) .editFacturaForm.sff-nota-tarjetas > fieldset {
        position: relative;
        margin: 0 0 14px;
        padding: 0 14px 10px !important;
        background: #fff;
        border: 1px solid #B9C7CE !important;
        border-radius: 10px;
        box-shadow: 0 1px 3px rgba(14, 61, 82, .12);
        overflow: hidden;
    }

        html:not(#extr-page) .editFacturaForm.sff-nota-tarjetas > fieldset fieldset {
            margin: 0;
            padding: 0 !important;
            background: transparent;
            border: 0 !important;
        }

        /* Tipo de impresión: sin tarjeta vacía cuando editarFactura.js oculta el campo */
        html:not(#extr-page) .editFacturaForm.sff-nota-tarjetas > fieldset:has(> #aplicaTipoImpresionLabel[style*="none"]) {
            display: none;
        }

        html:not(#extr-page) .editFacturaForm.sff-nota-tarjetas > fieldset .sff-bloque-t {
            margin: 0 -14px 14px;
            padding: 11px 14px;
            border-bottom: 1px solid #D3DCE1;
            font-size: 15px;
            font-weight: 600;
        }

            html:not(#extr-page) .editFacturaForm.sff-nota-tarjetas > fieldset .sff-bloque-t span {
                width: 24px;
                height: 24px;
                background: #94BE15;
            }

        /* Líneas: la fila de la tabla ocupa todo el ancho de la tarjeta para que el título llegue a los bordes */
        html:not(#extr-page) .editFacturaForm.sff-nota-tarjetas > fieldset .sff-detalle-nota {
            width: auto !important;
            margin: 0 -14px !important;
        }

            html:not(#extr-page) .editFacturaForm.sff-nota-tarjetas > fieldset .sff-detalle-nota > section {
                margin: 0;
                padding: 0 14px;
            }

    html:not(#extr-page) .editFacturaForm.sff-nota-tarjetas > footer {
        margin: 0 -12px;
    }

/* Lista de facturas (factura/IndexFactura): Editar, Descargar y Más acciones con el estilo de Configuración de emisores */
html:not(#extr-page) .sff-tabla-facturas .sff-acc > .btnEditar.botonesAcciones,
html:not(#extr-page) .sff-tabla-facturas .sff-acc > .btnDescarga.botonesAcciones,
html:not(#extr-page) .sff-tabla-facturas .sff-acc .sff-mas > .btn {
    border: 0 !important;
    border-radius: 8px !important;
    color: #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s, box-shadow .15s;
}

    html:not(#extr-page) .sff-tabla-facturas .sff-acc > .btnEditar.botonesAcciones:hover,
    html:not(#extr-page) .sff-tabla-facturas .sff-acc > .btnEditar.botonesAcciones:focus-visible,
    html:not(#extr-page) .sff-tabla-facturas .sff-acc > .btnDescarga.botonesAcciones:hover,
    html:not(#extr-page) .sff-tabla-facturas .sff-acc > .btnDescarga.botonesAcciones:focus-visible,
    html:not(#extr-page) .sff-tabla-facturas .sff-acc .sff-mas > .btn:hover,
    html:not(#extr-page) .sff-tabla-facturas .sff-acc .sff-mas > .btn:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

    html:not(#extr-page) .sff-tabla-facturas .sff-acc > .btnEditar.botonesAcciones:active,
    html:not(#extr-page) .sff-tabla-facturas .sff-acc > .btnDescarga.botonesAcciones:active,
    html:not(#extr-page) .sff-tabla-facturas .sff-acc .sff-mas > .btn:active {
        transform: translateY(1px);
        box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    }

html:not(#extr-page) .sff-tabla-facturas .sff-acc > .btnEditar.botonesAcciones { background: linear-gradient(180deg, #D9A43A, #B47F16) !important; }
html:not(#extr-page) .sff-tabla-facturas .sff-acc > .btnDescarga.botonesAcciones { background: linear-gradient(180deg, #6A9BAF, #457385) !important; }
html:not(#extr-page) .sff-tabla-facturas .sff-acc .sff-mas > .btn { background: linear-gradient(180deg, #A7B6BB, #7F9096) !important; }

/* Facturas recurrentes (FacRecurrente/IndexRecurrente): botón Eliminar con el estilo de Configuración de emisores, en rojo */
html:not(#extr-page) .sff-tabla-recurrentes .btnEliminar.botonesAcciones {
    padding: 6px 12px !important;
    font-size: 13px !important;
    line-height: 1.42857 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: linear-gradient(180deg, #C9284B, #8E0323) !important;
    color: #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s, box-shadow .15s;
}

    html:not(#extr-page) .sff-tabla-recurrentes .btnEliminar.botonesAcciones:hover,
    html:not(#extr-page) .sff-tabla-recurrentes .btnEliminar.botonesAcciones:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

    html:not(#extr-page) .sff-tabla-recurrentes .btnEliminar.botonesAcciones:active {
        transform: translateY(1px);
        box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    }

/* Nuevo/Editar proveedor: botón Agregar del grid de actividades con el estilo y tamaño del botón Editar de la lista */
html:not(#extr-page) .sff-ec-con-tarjetas .sff-cc-tabla .btnAgregarAct.botonesAcciones {
    padding: 6px 12px !important;
    font-size: 13px !important;
    line-height: 1.42857 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: linear-gradient(180deg, #6A9E9D, #477574) !important;
    color: #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s, box-shadow .15s;
}

    html:not(#extr-page) .sff-ec-con-tarjetas .sff-cc-tabla .btnAgregarAct.botonesAcciones:hover,
    html:not(#extr-page) .sff-ec-con-tarjetas .sff-cc-tabla .btnAgregarAct.botonesAcciones:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

    html:not(#extr-page) .sff-ec-con-tarjetas .sff-cc-tabla .btnAgregarAct.botonesAcciones:active {
        transform: translateY(1px);
        box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    }
/* Cuentas por cobrar (cliente/IndexCredito, misma tabla .sff-tabla-clientes): Créditos activos, Créditos cancelados
   y Generar reporte con el mismo estilo de Configuración de emisores, manteniendo sus colores */
html:not(#extr-page) .sff-tabla-clientes .btnCreditos.bg-color-redLight.botonesAcciones,
html:not(#extr-page) .sff-tabla-clientes .btnCreditosCancelados.botonesAcciones,
html:not(#extr-page) .sff-tabla-clientes .btnReporteCliente.botonesAcciones {
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s, box-shadow .15s;
    color: #fff !important;
}

    html:not(#extr-page) .sff-tabla-clientes .btnCreditos.bg-color-redLight.botonesAcciones:hover,
    html:not(#extr-page) .sff-tabla-clientes .btnCreditos.bg-color-redLight.botonesAcciones:focus-visible,
    html:not(#extr-page) .sff-tabla-clientes .btnCreditosCancelados.botonesAcciones:hover,
    html:not(#extr-page) .sff-tabla-clientes .btnCreditosCancelados.botonesAcciones:focus-visible,
    html:not(#extr-page) .sff-tabla-clientes .btnReporteCliente.botonesAcciones:hover,
    html:not(#extr-page) .sff-tabla-clientes .btnReporteCliente.botonesAcciones:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

    html:not(#extr-page) .sff-tabla-clientes .btnCreditos.bg-color-redLight.botonesAcciones:active,
    html:not(#extr-page) .sff-tabla-clientes .btnCreditosCancelados.botonesAcciones:active,
    html:not(#extr-page) .sff-tabla-clientes .btnReporteCliente.botonesAcciones:active {
        transform: translateY(1px);
        box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    }

html:not(#extr-page) .sff-tabla-clientes .btnCreditos.bg-color-redLight.botonesAcciones { background: linear-gradient(180deg, #B86C6C, #8E4545) !important; }
html:not(#extr-page) .sff-tabla-clientes .btnCreditosCancelados.botonesAcciones { background: linear-gradient(180deg, #A7B6BB, #7F9096) !important; }
html:not(#extr-page) .sff-tabla-clientes .btnReporteCliente.botonesAcciones { background: linear-gradient(180deg, #6A9BAF, #457385) !important; }

/* ---------- Franja "Cerrar sesión" (SmartMessageBox con la clase sff-logout, la agrega sff-avisos.js) ---------- */
.divMessageBox.sff-logout {
    background: rgba(14, 61, 82, 0.45);
}

.divMessageBox.sff-logout .MessageBoxContainer {
    background: #0E3D52;
    padding: 18px 20px;
}

.divMessageBox.sff-logout .MessageBoxMiddle {
    position: relative;
    left: auto;
    width: auto;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "titulo botones" "texto botones";
    column-gap: 24px;
    align-items: center;
}

.divMessageBox.sff-logout .sff-lo-ico {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(148, 190, 21, 0.18);
    color: #94BE15;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.divMessageBox.sff-logout .MsgTitle {
    grid-area: titulo;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.3;
}

.divMessageBox.sff-logout .pText {
    grid-area: texto;
    margin: 2px 0 0;
    color: #B9CCD5;
    font-size: 13px;
    line-height: 1.4;
}

.divMessageBox.sff-logout .MessageBoxButtonSection {
    grid-area: botones;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    width: auto;
    height: auto;
    float: none;
}

    .divMessageBox.sff-logout .MessageBoxButtonSection .botTempo {
        float: none;
        margin: 0;
        padding: 7px 16px;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 600;
        box-shadow: none;
    }

        /* Primer botón: Cancelar (borde); último: Cerrar sesión (verde) */
        .divMessageBox.sff-logout .MessageBoxButtonSection .botTempo:first-child {
            background: transparent;
            border: 1px solid #6E93A3;
            color: #fff;
        }

            .divMessageBox.sff-logout .MessageBoxButtonSection .botTempo:first-child:hover,
            .divMessageBox.sff-logout .MessageBoxButtonSection .botTempo:first-child:focus {
                background: rgba(255, 255, 255, 0.08);
                border-color: #B9CCD5;
            }

        .divMessageBox.sff-logout .MessageBoxButtonSection .botTempo:last-child {
            background: #94BE15;
            border: 1px solid #94BE15;
            color: #0E3D52;
        }

            .divMessageBox.sff-logout .MessageBoxButtonSection .botTempo:last-child:hover,
            .divMessageBox.sff-logout .MessageBoxButtonSection .botTempo:last-child:focus {
                background: #A6CC2E;
                border-color: #A6CC2E;
            }

/* Móvil: los botones bajan debajo del texto */
@media (max-width: 767px) {
    .divMessageBox.sff-logout .MessageBoxMiddle {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "titulo" "texto" "botones";
        padding-left: 52px;
    }

    .divMessageBox.sff-logout .sff-lo-ico {
        top: 4px;
        transform: none;
    }

    .divMessageBox.sff-logout .MessageBoxButtonSection {
        margin-top: 12px;
    }
}

/* ---------- Ventana de reingreso por sesión vencida (_ReingresoSesion.cshtml, sff-sesion.js) ---------- */
.sff-reingreso {
    position: fixed;
    inset: 0;
    z-index: 100001; /* encima de la franja de SmartMessageBox (100000) */
    background: rgba(14, 61, 82, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

    .sff-reingreso[style*="display:none"],
    .sff-reingreso[style*="display: none"] {
        display: none !important;
    }

.sff-reingreso-caja {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.sff-reingreso-enc {
    background: #0E3D52;
    color: #fff;
    padding: 13px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
}

    .sff-reingreso-enc .fa {
        color: #94BE15;
        font-size: 17px;
    }

.sff-reingreso-cuerpo {
    padding: 14px 18px 4px;
}

    .sff-reingreso-cuerpo p {
        margin: 0 0 12px;
        color: #3A4A52;
        font-size: 13px;
        line-height: 1.5;
    }

.sff-reingreso-etq {
    display: block;
    margin: 0 0 3px;
    color: #6B7B83;
    font-size: 12px;
    font-weight: 600;
}

.sff-reingreso-usuario {
    margin-bottom: 10px;
    padding: 7px 10px;
    border: 1px solid #DCE3E6;
    border-radius: 6px;
    background: #F4F7F8;
    color: #0E3D52;
    font-size: 13px;
    word-break: break-all;
}

.sff-reingreso-clave {
    position: relative;
}

    .sff-reingreso-clave input {
        width: 100%;
        height: 36px;
        padding: 6px 40px 6px 10px;
        border: 1px solid #0E3D52;
        border-radius: 6px;
        font-size: 14px;
    }

        .sff-reingreso-clave input:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(148, 190, 21, 0.35);
        }

    .sff-reingreso-clave button {
        position: absolute;
        right: 4px;
        top: 4px;
        width: 32px;
        height: 28px;
        border: 0;
        background: transparent;
        color: #6B7B83;
    }

.sff-reingreso-error {
    min-height: 18px;
    margin-top: 6px;
    color: #B3261E;
    font-size: 12px;
}

.sff-reingreso-pie {
    padding: 10px 18px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

    .sff-reingreso-pie button {
        padding: 7px 14px;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 600;
    }

.sff-reingreso-sec {
    border: 1px solid #C9D3D8;
    background: #fff;
    color: #0E3D52;
}

.sff-reingreso-pri {
    border: 1px solid #94BE15;
    background: #94BE15;
    color: #0E3D52;
}

    .sff-reingreso-pri:hover,
    .sff-reingreso-pri:focus {
        background: #A6CC2E;
        border-color: #A6CC2E;
    }

    .sff-reingreso-pri[disabled] {
        opacity: 0.7;
    }

/* ---------- Fuente de los glyphicons (v12.6) ---------- */
/* bootstrap.min.css la pide con una ruta absoluta (/content/fonts/...) que ignora la carpeta del sitio y da 404
   cuando el sitio no está en la raíz (p. ej. la lupa del buscador de DataTables). Este archivo está en Content/css
   y se carga después de Bootstrap: la misma fuente con ruta relativa la reemplaza. */
@font-face {
    font-family: 'Glyphicons Halflings';
    src: url('../fonts/glyphicons-halflings-regular.eot');
    src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
         url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'),
         url('../fonts/glyphicons-halflings-regular.woff') format('woff'),
         url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),
         url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}

/* ---------- Fondo blanco en todas las páginas (v12.7) ---------- */
/* smartadmin-production.min.css pone el patrón opcion2.png en el body (y mybg.png en html). Se reemplaza por blanco liso;
   el login (#extr-page) no cambia. */
html:not(#extr-page),
html:not(#extr-page) body {
    background: #fff;
}

/* SmartAdmin también pone el patrón en los fieldset de los formularios (.smart-form fieldset): solo se quita la imagen */
html:not(#extr-page) .smart-form fieldset {
    background-image: none;
}

/* =====================================================================================
   Modo claro / oscuro (v12.8)
   - Interruptor #sff-modo en el encabezado (_TopRight.cshtml, sff-modo.js).
   - La clase html.sff-oscuro la pone el <head> de _Layout según la preferencia guardada (o el sistema operativo).
   - El modo claro no cambia: todo lo de abajo solo actúa con html.sff-oscuro. El login (#extr-page) queda igual.
   ===================================================================================== */

/* ---------- Interruptor (perilla con sol / luna) ---------- */
html:not(#extr-page) #sff-modo {
    margin: 9px 6px 0;
}

    html:not(#extr-page) #sff-modo .sff-tg {
        position: relative;
        display: block;
        width: 60px;
        height: 30px;
        padding: 0;
        border: 1px solid #9FB4BE;
        border-radius: 15px;
        background: #DCE6EB;
        cursor: pointer;
        outline: none;
        transition: background .2s, border-color .2s;
    }

        html:not(#extr-page) #sff-modo .sff-tg:focus-visible {
            box-shadow: 0 0 0 2px #94BE15;
        }

        html:not(#extr-page) #sff-modo .sff-tg > i {
            position: absolute;
            top: 7px;
            font-size: 14px;
            color: #7A8D96;
        }

        html:not(#extr-page) #sff-modo .sff-tg > .fa-sun-o { left: 9px; }
        html:not(#extr-page) #sff-modo .sff-tg > .fa-moon-o { right: 9px; }

    html:not(#extr-page) #sff-modo .sff-tg-perilla {
        position: absolute;
        top: 2px;
        left: 2px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: left .2s, background .2s;
    }

        html:not(#extr-page) #sff-modo .sff-tg-perilla i {
            font-size: 14px;
            color: #F2A900;
        }

html.sff-oscuro:not(#extr-page) #sff-modo .sff-tg {
    background: #0F1A20;
    border-color: #35505C;
}

html.sff-oscuro:not(#extr-page) #sff-modo .sff-tg-perilla {
    left: 32px;
    background: #94BE15;
}

    html.sff-oscuro:not(#extr-page) #sff-modo .sff-tg-perilla i {
        color: #0E3D52;
    }

/* ---------- Paleta del modo oscuro ---------- */
html.sff-oscuro:not(#extr-page) {
    --sff-o-fondo: #0F1A20;        /* página y campos */
    --sff-o-ribbon: #13222A;
    --sff-o-superficie: #17252D;   /* paneles, tarjetas, tablas */
    --sff-o-superficie-2: #1E2F38; /* encabezados de tabla, adornos de campos, botones grises */
    --sff-o-fila-alterna: #1A2A32;
    --sff-o-fila-hover: #22343D;
    --sff-o-borde: #2C424D;
    --sff-o-borde-campo: #35505C;
    --sff-o-texto: #E3EAEE;
    --sff-o-texto-2: #B8C7CF;
    --sff-o-texto-3: #9DB0BA;
    --sff-o-placeholder: #6F8590;
    --sff-o-enlace: #8FC3DA;
    --sff-o-pie: #0B1418;
    /* Menú (opción B): azul de marca más vivo para separarlo del contenido */
    /* Menú: pizarra, igual que las tarjetas (opción C elegida 2026-10-28; antes azul #0E4A66) */
    --sff-o-menu: #17252D;
    --sff-o-menu-borde: #2C424D;
    --sff-o-menu-sub: #13222A;
    --sff-o-menu-grupo: #8FC3DA;
    --sff-o-menu-activo: rgba(148, 190, 21, .18);
    --sff-o-verde: #94BE15;
    color-scheme: dark;
}

    /* ---------- Página ---------- */
    html.sff-oscuro:not(#extr-page),
    html.sff-oscuro:not(#extr-page) body,
    html.sff-oscuro:not(#extr-page) #main,
    html.sff-oscuro:not(#extr-page) #content {
        background: var(--sff-o-fondo) !important;
        color: var(--sff-o-texto);
    }

    html.sff-oscuro:not(#extr-page) #ribbon {
        background: var(--sff-o-ribbon) !important;
        border-bottom: 1px solid var(--sff-o-borde) !important;
    }

        html.sff-oscuro:not(#extr-page) #ribbon .breadcrumb,
        html.sff-oscuro:not(#extr-page) #ribbon .breadcrumb li,
        html.sff-oscuro:not(#extr-page) #ribbon .breadcrumb a {
            color: var(--sff-o-texto-3) !important;
        }

            html.sff-oscuro:not(#extr-page) #ribbon .breadcrumb li:last-child {
                color: var(--sff-o-texto) !important;
            }

    html.sff-oscuro:not(#extr-page) .page-footer {
        background: var(--sff-o-pie) !important;
        border-top: 1px solid var(--sff-o-borde) !important;
    }

    html.sff-oscuro:not(#extr-page) #content a:not([class]) {
        color: var(--sff-o-enlace);
    }

    html.sff-oscuro:not(#extr-page) #content h1,
    html.sff-oscuro:not(#extr-page) #content h2,
    html.sff-oscuro:not(#extr-page) #content h3,
    html.sff-oscuro:not(#extr-page) #content h4,
    html.sff-oscuro:not(#extr-page) #content h5,
    html.sff-oscuro:not(#extr-page) #content h6 {
        color: var(--sff-o-texto);
    }

    /* ---------- Menú lateral (opción B) ---------- */
    html.sff-oscuro:not(#extr-page) #left-panel {
        background: var(--sff-o-menu) !important;
        border-right: 1px solid var(--sff-o-menu-borde) !important;
    }

        html.sff-oscuro:not(#extr-page) #left-panel nav ul li a {
            color: #fff !important;
        }

        html.sff-oscuro:not(#extr-page) #left-panel nav li.sff-menu-grupo,
        html.sff-oscuro:not(#extr-page) #left-panel nav li.sff-menu-grupo * {
            color: var(--sff-o-menu-grupo) !important;
        }

        html.sff-oscuro:not(#extr-page) #left-panel nav li.active > a {
            background: var(--sff-o-menu-activo) !important;
            box-shadow: inset 3px 0 0 var(--sff-o-verde) !important;
        }

        html.sff-oscuro:not(#extr-page) #left-panel nav ul ul {
            background: var(--sff-o-menu-sub) !important;
        }

    /* ---------- Paneles, tarjetas y formularios ---------- */
    html.sff-oscuro:not(#extr-page) .jarviswidget > div,
    html.sff-oscuro:not(#extr-page) .widget-body,
    html.sff-oscuro:not(#extr-page) .well,
    html.sff-oscuro:not(#extr-page) .panel,
    html.sff-oscuro:not(#extr-page) .panel-body,
    html.sff-oscuro:not(#extr-page) .smart-form fieldset,
    html.sff-oscuro:not(#extr-page) .smart-form footer,
    html.sff-oscuro:not(#extr-page) .modal-content,
    html.sff-oscuro:not(#extr-page) .sff-ec-tarjeta,
    html.sff-oscuro:not(#extr-page) .sff-fac-tarjetas > fieldset,
    html.sff-oscuro:not(#extr-page) .sff-nota-tarjetas > fieldset {
        background: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto);
    }

    /* Contenedores que en claro son gris claro alrededor de las tarjetas: en oscuro, el fondo de la página */
    html.sff-oscuro:not(#extr-page) .smart-form,
    html.sff-oscuro:not(#extr-page) .sff-editar-cliente.sff-ec-con-tarjetas,
    html.sff-oscuro:not(#extr-page) form.sff-fac-tarjetas,
    html.sff-oscuro:not(#extr-page) .editFacturaForm.sff-nota-tarjetas,
    html.sff-oscuro:not(#extr-page) .sff-config-emisor {
        background: transparent !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-bloque-t,
    html.sff-oscuro:not(#extr-page) .sff-bloque-t * {
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .smart-form header,
    html.sff-oscuro:not(#extr-page) .smart-form legend,
    html.sff-oscuro:not(#extr-page) .modal-header,
    html.sff-oscuro:not(#extr-page) .modal-footer {
        background: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) #content label,
    html.sff-oscuro:not(#extr-page) .smart-form .label,
    html.sff-oscuro:not(#extr-page) .smart-form .note,
    html.sff-oscuro:not(#extr-page) .note,
    html.sff-oscuro:not(#extr-page) .help-block,
    html.sff-oscuro:not(#extr-page) .text-muted {
        color: var(--sff-o-texto-2) !important;
    }

    /* Campos */
    html.sff-oscuro:not(#extr-page) .smart-form .input input,
    html.sff-oscuro:not(#extr-page) .smart-form .select select,
    html.sff-oscuro:not(#extr-page) .smart-form .textarea textarea,
    html.sff-oscuro:not(#extr-page) .form-control,
    html.sff-oscuro:not(#extr-page) #content input[type=text],
    html.sff-oscuro:not(#extr-page) #content input[type=email],
    html.sff-oscuro:not(#extr-page) #content input[type=search],
    html.sff-oscuro:not(#extr-page) #content input[type=number],
    html.sff-oscuro:not(#extr-page) #content input[type=password],
    html.sff-oscuro:not(#extr-page) #content input[type=tel],
    html.sff-oscuro:not(#extr-page) #content select,
    html.sff-oscuro:not(#extr-page) #content textarea {
        background-color: var(--sff-o-fondo) !important;
        color: var(--sff-o-texto) !important;
        border-color: var(--sff-o-borde-campo) !important;
    }

        html.sff-oscuro:not(#extr-page) #content input[readonly],
        html.sff-oscuro:not(#extr-page) #content input[disabled],
        html.sff-oscuro:not(#extr-page) #content select[disabled],
        html.sff-oscuro:not(#extr-page) #content textarea[readonly] {
            background-color: var(--sff-o-superficie-2) !important;
            color: var(--sff-o-texto-3) !important;
        }

    html.sff-oscuro:not(#extr-page) #content ::placeholder {
        color: var(--sff-o-placeholder) !important;
    }

    html.sff-oscuro:not(#extr-page) .smart-form .icon-append,
    html.sff-oscuro:not(#extr-page) .smart-form .icon-prepend,
    html.sff-oscuro:not(#extr-page) .input-group-addon {
        background: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto-3) !important;
        border-color: var(--sff-o-borde-campo) !important;
    }

    html.sff-oscuro:not(#extr-page) .select2-container .select2-choice,
    html.sff-oscuro:not(#extr-page) .select2-container-multi .select2-choices {
        background: var(--sff-o-fondo) !important;
        color: var(--sff-o-texto) !important;
        border-color: var(--sff-o-borde-campo) !important;
    }

    /* ---------- Tablas ---------- */
    html.sff-oscuro:not(#extr-page) #content table,
    html.sff-oscuro:not(#extr-page) #content .table {
        background: var(--sff-o-superficie) !important;
        color: var(--sff-o-texto);
    }

        html.sff-oscuro:not(#extr-page) #content table > thead > tr > th,
        html.sff-oscuro:not(#extr-page) #content table > thead > tr > td {
            background: var(--sff-o-superficie-2) !important;
            color: var(--sff-o-texto-2) !important;
            border-color: var(--sff-o-borde) !important;
        }

        html.sff-oscuro:not(#extr-page) #content table > tbody > tr > td,
        html.sff-oscuro:not(#extr-page) #content table > tfoot > tr > td,
        html.sff-oscuro:not(#extr-page) #content table > tfoot > tr > th {
            background: var(--sff-o-superficie) !important;
            color: var(--sff-o-texto);
            border-color: var(--sff-o-borde) !important;
        }

        html.sff-oscuro:not(#extr-page) #content .table-striped > tbody > tr:nth-child(odd) > td {
            background: var(--sff-o-fila-alterna) !important;
        }

        html.sff-oscuro:not(#extr-page) #content .table-hover > tbody > tr:hover > td,
        html.sff-oscuro:not(#extr-page) #content table.dataTable tbody tr:hover > td {
            background: var(--sff-o-fila-hover) !important;
        }

    html.sff-oscuro:not(#extr-page) .dt-toolbar,
    html.sff-oscuro:not(#extr-page) .dt-toolbar-footer {
        background: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto-3) !important;
    }

    html.sff-oscuro:not(#extr-page) .dataTables_info,
    html.sff-oscuro:not(#extr-page) .dataTables_length,
    html.sff-oscuro:not(#extr-page) .dataTables_filter {
        color: var(--sff-o-texto-3) !important;
    }

    html.sff-oscuro:not(#extr-page) .pagination > li > a,
    html.sff-oscuro:not(#extr-page) .pagination > li > span {
        background: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto) !important;
        border-color: var(--sff-o-borde) !important;
    }

    html.sff-oscuro:not(#extr-page) .pagination > .active > a,
    html.sff-oscuro:not(#extr-page) .pagination > .active > span {
        background: #0E4A66 !important;
        border-color: #1B6385 !important;
        color: #fff !important;
    }

    html.sff-oscuro:not(#extr-page) .pagination > .disabled > a,
    html.sff-oscuro:not(#extr-page) .pagination > .disabled > span {
        color: var(--sff-o-placeholder) !important;
    }

    /* ---------- Botones grises ---------- */
    html.sff-oscuro:not(#extr-page) #content .btn-default {
        background: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto) !important;
        border-color: var(--sff-o-borde-campo) !important;
    }

    /* ---------- Componentes propios del tema ---------- */
    html.sff-oscuro:not(#extr-page) .sff-card,
    html.sff-oscuro:not(#extr-page) .sff-fac-tarjeta,
    html.sff-oscuro:not(#extr-page) .sff-oc-factura,
    html.sff-oscuro:not(#extr-page) .sff-dc-panel,
    html.sff-oscuro:not(#extr-page) .sff-cal-panel,
    html.sff-oscuro:not(#extr-page) .sff-cred-card,
    html.sff-oscuro:not(#extr-page) .sff-d104-vacio,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-banco,
    html.sff-oscuro:not(#extr-page) .sff-perfil-tarjeta {
        background: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto);
    }

    /* Bandas, leyendas y títulos que en claro son gris o celeste muy claro */
    html.sff-oscuro:not(#extr-page) .sff-ac-archivo,
    html.sff-oscuro:not(#extr-page) .sff-dc-banda,
    html.sff-oscuro:not(#extr-page) .sff-cal-banda,
    html.sff-oscuro:not(#extr-page) .sff-cal-leyenda,
    html.sff-oscuro:not(#extr-page) .sff-cb-barra.sff-cb-vacia,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-dato,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-banco-titulo,
    html.sff-oscuro:not(#extr-page) .sff-perfil-titulo {
        background: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto);
    }

    /* Avisos verdes claros (Cabys elegido, aviso de cuentas): verde translúcido */
    html.sff-oscuro:not(#extr-page) .sff-cc-elegida,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-aviso {
        background: rgba(148, 190, 21, .12) !important;
        border-color: rgba(148, 190, 21, .45) !important;
        color: var(--sff-o-texto);
    }

    /* Filas: el color lo dan las celdas */
    html.sff-oscuro:not(#extr-page) #content table > thead > tr,
    html.sff-oscuro:not(#extr-page) #content table > tbody > tr,
    html.sff-oscuro:not(#extr-page) #content table > tfoot > tr {
        background: transparent !important;
    }

    /* ---------- Textos (generado): reglas del tema que usan azul de marca #0E3D52 o gris #5B6B72/#5B6B78
       como color de texto sin fondo propio; en oscuro pasan a los textos claros de la paleta ---------- */
    html.sff-oscuro:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(1),
    html.sff-oscuro:not(#extr-page) .sff-bloque-t,
    html.sff-oscuro:not(#extr-page) #modalClientes .sff-modal-sec,
    html.sff-oscuro:not(#extr-page) #modalClientes .sff-act-cod,
    html.sff-oscuro:not(#extr-page) #ribbon .breadcrumb > li:last-child,
    html.sff-oscuro:not(#extr-page) .sff-tc-nombre,
    html.sff-oscuro:not(#extr-page) .sff-tc-cambiar,
    html.sff-oscuro:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(2),
    html.sff-oscuro:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(7),
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(7),
    html.sff-oscuro:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(2),
    html.sff-oscuro:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(8),
    html.sff-oscuro:not(#extr-page) .sff-nota-head .sff-nh-titulo,
    html.sff-oscuro:not(#extr-page) .sff-nota-head .sff-nh-saldo b,
    html.sff-oscuro:not(#extr-page) .sff-oc-nota .sff-oc-desc,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-oc-factura #iditemOtrosCargos > .row > section:first-child .toggle,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-oc-factura .sff-oc-monto,
    html.sff-oscuro:not(#extr-page) .sff-av-res b,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-ac-archivo > i.fa-file-code-o,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-ac-archivo .sff-ac-nombre span,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-ac-nom,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-ac-v,
    html.sff-oscuro:not(#extr-page) .sff-dc-banda a,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-dc-enlaces a,
    html.sff-oscuro:not(#extr-page) .sff-lp-sub b,
    html.sff-oscuro:not(#extr-page) .sff-lp-resp,
    html.sff-oscuro:not(#extr-page) .sff-cal-nav h3,
    html.sff-oscuro:not(#extr-page) #calendar.sff-cal .fc-day-number,
    html.sff-oscuro:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(1),
    html.sff-oscuro:not(#extr-page) .sff-editar-cliente .sff-cc-elegida b,
    html.sff-oscuro:not(#extr-page) .sff-editar-cliente .sff-act-tabla td:first-child,
    html.sff-oscuro:not(#extr-page) .sff-editar-cliente .sff-pr-lista,
    html.sff-oscuro:not(#extr-page) .sff-tabla-productos > tbody > tr > td.sff-pr-nombre,
    html.sff-oscuro:not(#extr-page) .sff-cb-asignar .sff-cc-elegida b,
    html.sff-oscuro:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla td:nth-child(1),
    html.sff-oscuro:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla tbody td:nth-child(3),
    html.sff-oscuro:not(#extr-page) .sff-cred .sff-cred-kpi b,
    html.sff-oscuro:not(#extr-page) .sff-cred .sff-cred-t,
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos .sff-saldo,
    html.sff-oscuro:not(#extr-page) .sff-cred-modal .sff-cred-caja b,
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(1),
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(1),
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos.sff-tc-cancelados > tbody > tr > td:nth-child(4),
    html.sff-oscuro:not(#extr-page) .sff-am-modal .modal-footer .sff-am-ayuda,
    html.sff-oscuro:not(#extr-page) .sff-am-resumen b,
    html.sff-oscuro:not(#extr-page) .sff-am-op b,
    html.sff-oscuro:not(#extr-page) .sff-am-dato b,
    html.sff-oscuro:not(#extr-page) .sff-am-totales b,
    html.sff-oscuro:not(#extr-page) .sff-am-mas summary,
    html.sff-oscuro:not(#extr-page) .sff-arbol-permisos > ul > li > ul > li > span > .fa,
    html.sff-oscuro:not(#extr-page) .sff-d104-dato span,
    html.sff-oscuro:not(#extr-page) .sff-d104-grupo,
    html.sff-oscuro:not(#extr-page) .sff-d104-total b,
    html.sff-oscuro:not(#extr-page) .sff-d104-vacio b,
    html.sff-oscuro:not(#extr-page) .sff-mes-cab,
    html.sff-oscuro:not(#extr-page) #ui-datepicker-div .ui-datepicker-title,
    html.sff-oscuro:not(#extr-page) .sff-d104-tabla > tbody > tr > td.sff-d104-monto,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-dato span,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-fila span,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-aviso .fa,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-aviso a,
    html.sff-oscuro:not(#extr-page) .sff-tabla-emisores > tbody > tr > td:nth-child(1),
    html.sff-oscuro:not(#extr-page) .sff-config-emisor .sff-ce-titulo,
    html.sff-oscuro:not(#extr-page) .sff-config-emisor .sff-ce-copiar,
    html.sff-oscuro:not(#extr-page) .sff-config-emisor .sff-ce-sub > label.sff-ce-subtitulo > b {
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button i,
    html.sff-oscuro:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(3),
    html.sff-oscuro:not(#extr-page) .sff-tabla-facturas > tbody > tr > td:nth-child(2),
    html.sff-oscuro:not(#extr-page) #modalClientes .sff-estado-id.sff-est-consultando,
    html.sff-oscuro:not(#extr-page) #modalClientes .sff-estado-id.sff-est-info,
    html.sff-oscuro:not(#extr-page) #ribbon .breadcrumb,
    html.sff-oscuro:not(#extr-page) #ribbon .breadcrumb > li,
    html.sff-oscuro:not(#extr-page) #ribbon .breadcrumb > li > a,
    html.sff-oscuro:not(#extr-page) .sff-tc-correo,
    html.sff-oscuro:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(4),
    html.sff-oscuro:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(5),
    html.sff-oscuro:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(6),
    html.sff-oscuro:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody td:nth-child(8),
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(1),
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td.dataTables_empty,
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(3)::before,
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(4)::before,
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(6)::before,
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(8)::before,
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(9)::before,
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(5),
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td:nth-child(7)::before,
    html.sff-oscuro:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(1),
    html.sff-oscuro:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td.dataTables_empty,
    html.sff-oscuro:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td:nth-child(n+3):nth-child(-n+8)::before,
    html.sff-oscuro:not(#extr-page) .sff-nota-head .sff-nh-cliente,
    html.sff-oscuro:not(#extr-page) .sff-nota-head .sff-nh-saldo span,
    html.sff-oscuro:not(#extr-page) .sff-oc-nota .sff-oc-titulo,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-oc-factura .sff-oc-titulo,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-otc-factura .sff-oc-titulo,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-exo-factura .sff-oc-titulo,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-exo-factura .input .icon-prepend,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-exo-factura .input .icon-append,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-wal-factura .sff-oc-titulo,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-wal-factura .input .icon-prepend,
    html.sff-oscuro:not(#extr-page) .sff-av-res span,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-ac-nota,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-ac-archivo .sff-ac-nombre small,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-ac-et,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-ac-ced,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-ac-cont,
    html.sff-oscuro:not(#extr-page) .sff-dc-banda small,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-dc-enlaces span,
    html.sff-oscuro:not(#extr-page) .sff-dc-panel .dataTables_filter label::before,
    html.sff-oscuro:not(#extr-page) table.sff-dc-tabla .sff-dc-sub,
    html.sff-oscuro:not(#extr-page) table.sff-dc-tabla > tbody > tr > td:nth-child(4),
    html.sff-oscuro:not(#extr-page) .sff-lp-sub,
    html.sff-oscuro:not(#extr-page) table.sff-lp-tabla > tbody > tr > td:nth-child(3),
    html.sff-oscuro:not(#extr-page) .sff-cal-banda small,
    html.sff-oscuro:not(#extr-page) .sff-cal-emisor label,
    html.sff-oscuro:not(#extr-page) #calendar.sff-cal .fc-agenda-axis,
    html.sff-oscuro:not(#extr-page) .sff-ev-cuando small,
    html.sff-oscuro:not(#extr-page) .sff-ev-campo > label,
    html.sff-oscuro:not(#extr-page) .sff-ev-horas span,
    html.sff-oscuro:not(#extr-page) .sff-ev-nota,
    html.sff-oscuro:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(2),
    html.sff-oscuro:not(#extr-page) .sff-tabla-clientes > tbody > tr > td:nth-child(5),
    html.sff-oscuro:not(#extr-page) .sff-editar-cliente .note,
    html.sff-oscuro:not(#extr-page) .sff-editar-cliente .sff-cc-elegida span,
    html.sff-oscuro:not(#extr-page) .sff-editar-cliente .sff-act-nota,
    html.sff-oscuro:not(#extr-page) .sff-editar-cliente .sff-pr-lista span,
    html.sff-oscuro:not(#extr-page) .sff-tabla-productos > tbody > tr > td.sff-pr-gris,
    html.sff-oscuro:not(#extr-page) .sff-tabla-productos > tbody > tr > td[data-l]::before,
    html.sff-oscuro:not(#extr-page) .sff-cb-asignar .sff-cc-elegida span,
    html.sff-oscuro:not(#extr-page) .sff-cb-asignar .sff-cb-nota,
    html.sff-oscuro:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-ayuda,
    html.sff-oscuro:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-vacio td,
    html.sff-oscuro:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla tbody td:nth-child(3)::before,
    html.sff-oscuro:not(#extr-page) .sff-cred .sff-cred-kpi span,
    html.sff-oscuro:not(#extr-page) .sff-cred .sff-cred-pg label,
    html.sff-oscuro:not(#extr-page) .sff-cred .sff-cred-nota,
    html.sff-oscuro:not(#extr-page) .sff-cred-modal .sff-cred-form label,
    html.sff-oscuro:not(#extr-page) .sff-cred-modal .sff-cred-caja span,
    html.sff-oscuro:not(#extr-page) .sff-cred-modal .sff-cred-nota,
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(2),
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(3),
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(4),
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos.sff-tc-creditos > tbody > tr > td:nth-child(5)::before,
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(2),
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(3),
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(5),
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos.sff-tc-recibos > tbody > tr > td:nth-child(4)::before,
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos.sff-tc-cancelados > tbody > tr > td:nth-child(4)::before,
    html.sff-oscuro:not(#extr-page) .sff-am-lbl,
    html.sff-oscuro:not(#extr-page) .sff-am-op span,
    html.sff-oscuro:not(#extr-page) .sff-am-respuesta > div > span:first-child,
    html.sff-oscuro:not(#extr-page) .sff-am-dato span,
    html.sff-oscuro:not(#extr-page) .sff-am-clave span,
    html.sff-oscuro:not(#extr-page) .sff-am-parte span,
    html.sff-oscuro:not(#extr-page) .sff-am-parte small,
    html.sff-oscuro:not(#extr-page) .sff-am-totales span,
    html.sff-oscuro:not(#extr-page) .sff-am-plazo,
    html.sff-oscuro:not(#extr-page) .sff-d104-dato small,
    html.sff-oscuro:not(#extr-page) .sff-d104-subtitulo,
    html.sff-oscuro:not(#extr-page) .sff-d104-total small,
    html.sff-oscuro:not(#extr-page) .sff-d104-resumen-titulo,
    html.sff-oscuro:not(#extr-page) .sff-mes-nota,
    html.sff-oscuro:not(#extr-page) #ui-datepicker-div th,
    html.sff-oscuro:not(#extr-page) .sff-d104-tabla > tbody > tr > td::before,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-dato small,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-fila small,
    html.sff-oscuro:not(#extr-page) .sff-perfil .sff-perfil-ayuda {
        color: var(--sff-o-texto-3) !important;
    }

    /* ---------- Textos de SmartAdmin y botones de archivo ---------- */
    html.sff-oscuro:not(#extr-page) #content .txt-color-darken,
    html.sff-oscuro:not(#extr-page) #content .fc-day-number {
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-ac-btn {
        background: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde-campo) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-card-desc {
        color: var(--sff-o-texto-3) !important;
    }

    /* Calendario: el día de hoy (en claro es amarillo claro) */
    html.sff-oscuro:not(#extr-page) #content .fc-state-highlight,
    html.sff-oscuro:not(#extr-page) #content .fc-today {
        background: rgba(148, 190, 21, .18) !important;
    }

    /* Árbol de permisos de Nuevo rol (.tree de SmartAdmin) */
    html.sff-oscuro:not(#extr-page) #content .tree li > span {
        background: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde-campo) !important;
        color: var(--sff-o-texto) !important;
    }

    /* ==========================================================================
       Modo oscuro, fase 3 (v13.2): plugins, ventanas y menús flotantes.
       Encabezados de marca (#0E3D52) pasan al azul del menú oscuro para despegarse del fondo;
       botones principales igual. Botones de color (verde, rojo, naranja) se dejan como están.
       ========================================================================== */
    html.sff-oscuro:not(#extr-page) {
        --sff-o-marca: #0E4A66;
        --sff-o-marca-borde: #1B6385;
        --sff-o-error-fondo: rgba(169, 3, 41, .18);
        --sff-o-aviso-fondo: rgba(204, 112, 20, .16);
    }

    /* ---------- Ventanas modales ---------- */
    html.sff-oscuro:not(#extr-page) .modal-body {
        background: var(--sff-o-superficie) !important;
        color: var(--sff-o-texto);
    }

    html.sff-oscuro:not(#extr-page) .modal-header .close,
    html.sff-oscuro:not(#extr-page) .modal-header .modal-title {
        color: var(--sff-o-texto) !important;
        text-shadow: none;
        opacity: .9;
    }

    /* Modales con encabezado de marca: Clientes, Calendario, Cabys, Créditos, Aceptación, Espera */
    html.sff-oscuro:not(#extr-page) #modalClientes .modal-header,
    html.sff-oscuro:not(#extr-page) #modalClientesAct .modal-header,
    html.sff-oscuro:not(#extr-page) #modalClientes .modal-footer,
    html.sff-oscuro:not(#extr-page) #modalClientesAct .modal-footer,
    html.sff-oscuro:not(#extr-page) .sff-cal-modal .modal-header,
    html.sff-oscuro:not(#extr-page) #modalCabys.sff-cbm-modal .modal-header,
    html.sff-oscuro:not(#extr-page) .sff-cred-modal .modal-header,
    html.sff-oscuro:not(#extr-page) .sff-am-modal .modal-header,
    html.sff-oscuro:not(#extr-page) .sff-espera .modal-header {
        background: var(--sff-o-marca) !important;
        border-color: var(--sff-o-marca-borde) !important;
        color: #fff !important;
    }

        html.sff-oscuro:not(#extr-page) #modalClientes .modal-header *,
        html.sff-oscuro:not(#extr-page) #modalClientesAct .modal-header *,
        html.sff-oscuro:not(#extr-page) #modalClientes .modal-footer label,
        html.sff-oscuro:not(#extr-page) #modalClientesAct .modal-footer label,
        html.sff-oscuro:not(#extr-page) .sff-cal-modal .modal-header *,
        html.sff-oscuro:not(#extr-page) #modalCabys.sff-cbm-modal .modal-header *,
        html.sff-oscuro:not(#extr-page) .sff-cred-modal .modal-header *,
        html.sff-oscuro:not(#extr-page) .sff-am-modal .modal-header *,
        html.sff-oscuro:not(#extr-page) .sff-espera .modal-header * {
            color: #fff !important;
        }

    html.sff-oscuro:not(#extr-page) #modalClientes .modal-body,
    html.sff-oscuro:not(#extr-page) #modalClientesAct .modal-body {
        background: var(--sff-o-fondo) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-cal-modal .modal-footer,
    html.sff-oscuro:not(#extr-page) .sff-cbm-modal .modal-footer,
    html.sff-oscuro:not(#extr-page) .sff-cred-modal .modal-footer,
    html.sff-oscuro:not(#extr-page) .sff-am-modal .modal-footer {
        background: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde) !important;
    }

    html.sff-oscuro:not(#extr-page) .modal-backdrop.in {
        opacity: .7;
    }

    /* Modales de Aceptación (.sff-am) */
    html.sff-oscuro:not(#extr-page) .sff-am-resumen,
    html.sff-oscuro:not(#extr-page) .sff-am-dato,
    html.sff-oscuro:not(#extr-page) .sff-am-clave,
    html.sff-oscuro:not(#extr-page) .sff-am-mas p {
        background: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto-2) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-am-op,
    html.sff-oscuro:not(#extr-page) .sff-am-clave button,
    html.sff-oscuro:not(#extr-page) .sff-am-parte {
        background: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde-campo) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-am-op.on {
        background: rgba(143, 195, 218, .14) !important;
        border-color: var(--sff-o-enlace) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-am-op.rechazo.on {
        background: var(--sff-o-error-fondo) !important;
        border-color: #E0607A !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-am-totales {
        background: rgba(143, 195, 218, .12) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-am-aviso {
        background: var(--sff-o-aviso-fondo) !important;
        border-color: rgba(204, 112, 20, .5) !important;
        color: #F2C98A !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-am-chip {
        background: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-am-btn.sec {
        background: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-am-btn.prim {
        background: var(--sff-o-marca) !important;
    }

    /* ---------- Avisos SweetAlert2 ---------- */
    html.sff-oscuro:not(#extr-page) .swal2-popup {
        background: var(--sff-o-superficie) !important;
        color: var(--sff-o-texto-2) !important;
        border: 1px solid var(--sff-o-borde);
    }

    html.sff-oscuro:not(#extr-page) .swal2-popup:not(.swal2-toast) .swal2-title {
        background: var(--sff-o-marca) !important;
        color: #fff !important;
    }

    html.sff-oscuro:not(#extr-page) .swal2-popup.swal2-icon-warning:not(.swal2-toast) .swal2-title {
        background: #A85B10 !important;
    }

    html.sff-oscuro:not(#extr-page) .swal2-popup .swal2-html-container,
    html.sff-oscuro:not(#extr-page) .swal2-popup .swal2-html-container * {
        color: var(--sff-o-texto-2);
    }

        html.sff-oscuro:not(#extr-page) .swal2-popup .swal2-html-container b,
        html.sff-oscuro:not(#extr-page) .swal2-popup .swal2-html-container strong {
            color: var(--sff-o-texto) !important;
        }

    html.sff-oscuro:not(#extr-page) .swal2-popup.swal2-toast .swal2-title {
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .swal2-popup:not(.swal2-toast) .swal2-styled.swal2-confirm {
        background-color: var(--sff-o-marca) !important;
        border: 1px solid var(--sff-o-marca-borde) !important;
    }

    html.sff-oscuro:not(#extr-page) .swal2-popup:not(.swal2-toast) .swal2-styled.swal2-cancel,
    html.sff-oscuro:not(#extr-page) .swal2-popup:not(.swal2-toast) .swal2-styled.swal2-deny {
        background-color: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto) !important;
        border-color: var(--sff-o-borde-campo) !important;
    }

    html.sff-oscuro:not(#extr-page) .swal2-popup .swal2-footer {
        border-top-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto-3) !important;
    }

    html.sff-oscuro:not(#extr-page) .swal2-popup .swal2-input,
    html.sff-oscuro:not(#extr-page) .swal2-popup .swal2-textarea,
    html.sff-oscuro:not(#extr-page) .swal2-popup .swal2-select {
        background: var(--sff-o-fondo) !important;
        color: var(--sff-o-texto) !important;
        border-color: var(--sff-o-borde-campo) !important;
    }

    html.sff-oscuro:not(#extr-page) .swal2-popup .swal2-validation-message {
        background: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .swal2-popup .swal2-close {
        color: var(--sff-o-texto-3) !important;
    }

    html.sff-oscuro:not(#extr-page) .swal2-icon.swal2-success [class^='swal2-success-circular-line'],
    html.sff-oscuro:not(#extr-page) .swal2-icon.swal2-success .swal2-success-fix {
        background-color: var(--sff-o-superficie) !important;
    }

    /* ---------- Calendario de fechas (jQuery UI) ---------- */
    html.sff-oscuro:not(#extr-page) #ui-datepicker-div {
        background: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde) !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, .5) !important;
    }

    html.sff-oscuro:not(#extr-page) #ui-datepicker-div .ui-datepicker-header {
        background: transparent !important;
        border: 0 !important;
    }

    html.sff-oscuro:not(#extr-page) #ui-datepicker-div .ui-datepicker-title,
    html.sff-oscuro:not(#extr-page) #ui-datepicker-div .ui-datepicker-prev,
    html.sff-oscuro:not(#extr-page) #ui-datepicker-div .ui-datepicker-next {
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) #ui-datepicker-div .ui-datepicker-title select {
        background: var(--sff-o-fondo) !important;
        color: var(--sff-o-texto) !important;
        border-color: var(--sff-o-borde-campo) !important;
    }

    html.sff-oscuro:not(#extr-page) #ui-datepicker-div .ui-datepicker-prev:hover,
    html.sff-oscuro:not(#extr-page) #ui-datepicker-div .ui-datepicker-next:hover {
        background: var(--sff-o-superficie-2) !important;
    }

    html.sff-oscuro:not(#extr-page) #ui-datepicker-div .ui-datepicker-prev.ui-state-disabled,
    html.sff-oscuro:not(#extr-page) #ui-datepicker-div .ui-datepicker-next.ui-state-disabled {
        color: var(--sff-o-placeholder) !important;
    }

    html.sff-oscuro:not(#extr-page) #ui-datepicker-div th {
        color: var(--sff-o-texto-3) !important;
    }

    html.sff-oscuro:not(#extr-page) #ui-datepicker-div td a.ui-state-default,
    html.sff-oscuro:not(#extr-page) #ui-datepicker-div td span.ui-state-default {
        background: var(--sff-o-superficie) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) #ui-datepicker-div td a.ui-state-default:hover {
        background: rgba(148, 190, 21, .16) !important;
        border-color: var(--sff-o-verde) !important;
    }

    html.sff-oscuro:not(#extr-page) #ui-datepicker-div td a.ui-state-highlight {
        background: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-verde) !important;
    }

    html.sff-oscuro:not(#extr-page) #ui-datepicker-div td a.ui-state-active {
        background: var(--sff-o-verde) !important;
        border-color: var(--sff-o-verde) !important;
        color: #0E3D52 !important;
    }

    html.sff-oscuro:not(#extr-page) #ui-datepicker-div td.ui-state-disabled span.ui-state-default {
        background: transparent !important;
        color: var(--sff-o-placeholder) !important;
    }

    html.sff-oscuro:not(#extr-page) #ui-datepicker-div .ui-datepicker-buttonpane {
        border-color: var(--sff-o-borde) !important;
        background: transparent !important;
    }

    /* Autocompletar de jQuery UI */
    html.sff-oscuro:not(#extr-page) .ui-autocomplete.ui-menu {
        background: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto) !important;
    }

        html.sff-oscuro:not(#extr-page) .ui-autocomplete .ui-menu-item a,
        html.sff-oscuro:not(#extr-page) .ui-autocomplete .ui-menu-item div {
            color: var(--sff-o-texto) !important;
        }

        html.sff-oscuro:not(#extr-page) .ui-autocomplete .ui-state-focus,
        html.sff-oscuro:not(#extr-page) .ui-autocomplete .ui-state-active {
            background: var(--sff-o-fila-hover) !important;
            border-color: transparent !important;
        }

    /* Calendario de Bootstrap (bootstrap-datepicker), si alguna pantalla lo usa */
    html.sff-oscuro:not(#extr-page) .datepicker.dropdown-menu {
        background: var(--sff-o-superficie) !important;
        color: var(--sff-o-texto) !important;
    }

        html.sff-oscuro:not(#extr-page) .datepicker table tr td.day:hover,
        html.sff-oscuro:not(#extr-page) .datepicker .datepicker-switch:hover,
        html.sff-oscuro:not(#extr-page) .datepicker .prev:hover,
        html.sff-oscuro:not(#extr-page) .datepicker .next:hover {
            background: var(--sff-o-fila-hover) !important;
        }

        html.sff-oscuro:not(#extr-page) .datepicker table tr td.old,
        html.sff-oscuro:not(#extr-page) .datepicker table tr td.new,
        html.sff-oscuro:not(#extr-page) .datepicker table tr td.disabled {
            color: var(--sff-o-placeholder) !important;
        }

    /* ---------- Lista desplegable de select2 ---------- */
    html.sff-oscuro:not(#extr-page) .select2-drop,
    html.sff-oscuro:not(#extr-page) .select2-drop.select2-drop-above {
        background: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde-campo) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .select2-search input,
    html.sff-oscuro:not(#extr-page) .select2-search-choice-close + input,
    html.sff-oscuro:not(#extr-page) .select2-container-multi .select2-choices .select2-search-field input {
        background: var(--sff-o-fondo) !important;
        color: var(--sff-o-texto) !important;
        border-color: var(--sff-o-borde-campo) !important;
    }

    /* Las listas largas con barra de desplazamiento oscura */
    html.sff-oscuro:not(#extr-page) .select2-results,
    html.sff-oscuro:not(#extr-page) .ui-autocomplete {
        color-scheme: dark;
    }

    html.sff-oscuro:not(#extr-page) .select2-results li,
    html.sff-oscuro:not(#extr-page) .select2-results .select2-result-label {
        color: var(--sff-o-texto);
    }

    html.sff-oscuro:not(#extr-page) .select2-results .select2-highlighted {
        background: var(--sff-o-marca) !important;
        color: #fff !important;
    }

        html.sff-oscuro:not(#extr-page) .select2-results .select2-highlighted .select2-result-label {
            color: #fff !important;
        }

    html.sff-oscuro:not(#extr-page) .select2-results .select2-no-results,
    html.sff-oscuro:not(#extr-page) .select2-results .select2-searching,
    html.sff-oscuro:not(#extr-page) .select2-results .select2-selection-limit {
        background: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto-3) !important;
    }

    html.sff-oscuro:not(#extr-page) .select2-results .select2-disabled {
        background: transparent !important;
        color: var(--sff-o-placeholder) !important;
    }

    html.sff-oscuro:not(#extr-page) .select2-container-multi .select2-choices .select2-search-choice {
        background: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde-campo) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .select2-container .select2-choice .select2-arrow {
        background: transparent !important;
        border-color: var(--sff-o-borde-campo) !important;
    }

    html.sff-oscuro:not(#extr-page) .select2-container.select2-container-disabled .select2-choice {
        background: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto-3) !important;
    }

    /* ---------- Menús desplegables (Bootstrap / SmartAdmin) ---------- */
    html.sff-oscuro:not(#extr-page) .dropdown-menu {
        background: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde) !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, .45) !important;
    }

        html.sff-oscuro:not(#extr-page) .dropdown-menu > li > a,
        html.sff-oscuro:not(#extr-page) .dropdown-menu li > button {
            color: var(--sff-o-texto) !important;
            background: transparent;
        }

            html.sff-oscuro:not(#extr-page) .dropdown-menu > li > a:hover,
            html.sff-oscuro:not(#extr-page) .dropdown-menu > li > a:focus,
            html.sff-oscuro:not(#extr-page) .dropdown-menu li > button:hover,
            html.sff-oscuro:not(#extr-page) .dropdown-menu li > button:focus {
                background: var(--sff-o-fila-hover) !important;
                color: var(--sff-o-texto) !important;
            }

        html.sff-oscuro:not(#extr-page) .dropdown-menu i {
            color: var(--sff-o-texto-3);
        }

        html.sff-oscuro:not(#extr-page) .dropdown-menu .divider {
            background: var(--sff-o-borde) !important;
        }

        html.sff-oscuro:not(#extr-page) .dropdown-menu > .disabled > a {
            color: var(--sff-o-placeholder) !important;
        }

    /* Notificaciones del encabezado */
    html.sff-oscuro:not(#extr-page) .ajax-dropdown {
        background: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto) !important;
    }

        html.sff-oscuro:not(#extr-page) .ajax-dropdown .ajax-notifications {
            background: var(--sff-o-fondo) !important;
            border-color: var(--sff-o-borde) !important;
        }

    /* Pestañas */
    html.sff-oscuro:not(#extr-page) .nav-tabs {
        border-color: var(--sff-o-borde) !important;
    }

        html.sff-oscuro:not(#extr-page) .nav-tabs > li > a {
            color: var(--sff-o-texto-2) !important;
            border-color: transparent !important;
        }

            html.sff-oscuro:not(#extr-page) .nav-tabs > li > a:hover {
                background: var(--sff-o-superficie-2) !important;
            }

        html.sff-oscuro:not(#extr-page) .nav-tabs > li.active > a,
        html.sff-oscuro:not(#extr-page) .nav-tabs > li.active > a:hover,
        html.sff-oscuro:not(#extr-page) .nav-tabs > li.active > a:focus {
            background: var(--sff-o-superficie) !important;
            color: var(--sff-o-texto) !important;
            border-color: var(--sff-o-borde) var(--sff-o-borde) transparent !important;
        }

    html.sff-oscuro:not(#extr-page) .tab-content {
        background: transparent;
        color: var(--sff-o-texto);
    }

    /* Barras de progreso */
    html.sff-oscuro:not(#extr-page) .progress {
        background: var(--sff-o-superficie-2) !important;
        box-shadow: none !important;
    }

    /* ---------- DataTables: mensajes y paginación ---------- */
    html.sff-oscuro:not(#extr-page) .dataTables_processing {
        background: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .dataTables_info,
    html.sff-oscuro:not(#extr-page) .dataTables_length,
    html.sff-oscuro:not(#extr-page) .dataTables_filter,
    html.sff-oscuro:not(#extr-page) td.dataTables_empty {
        color: var(--sff-o-texto-3) !important;
    }

    html.sff-oscuro:not(#extr-page) .dataTables_length select,
    html.sff-oscuro:not(#extr-page) .dataTables_filter input {
        background: var(--sff-o-fondo) !important;
        color: var(--sff-o-texto) !important;
        border-color: var(--sff-o-borde-campo) !important;
    }

    html.sff-oscuro:not(#extr-page) .pagination > .disabled > a,
    html.sff-oscuro:not(#extr-page) .pagination > .disabled > span {
        background: var(--sff-o-superficie) !important;
        color: var(--sff-o-placeholder) !important;
        border-color: var(--sff-o-borde) !important;
    }

    /* ---------- Ayuda guiada (Intro.js y .sff-tour) ---------- */
    html.sff-oscuro:not(#extr-page) body.sff-tour-activo .introjs-overlay,
    html.sff-oscuro:not(#extr-page) .introjs-overlay {
        background: #000 !important;
        opacity: .6 !important;
    }

    /* El recuadro que resalta el elemento era blanco translúcido: en oscuro, el color de la superficie */
    html.sff-oscuro:not(#extr-page) .introjs-helperLayer,
    html.sff-oscuro:not(#extr-page) .introjs-helperLayer.sff-tour-hl {
        background: rgba(23, 37, 45, .92) !important;
    }

    html.sff-oscuro:not(#extr-page) .introjs-tooltip {
        background: var(--sff-o-superficie) !important;
        color: var(--sff-o-texto-2) !important;
        border: 1px solid var(--sff-o-borde);
        box-shadow: 0 12px 32px rgba(0, 0, 0, .55) !important;
    }

    html.sff-oscuro:not(#extr-page) .introjs-arrow.top,
    html.sff-oscuro:not(#extr-page) .introjs-arrow.top-middle,
    html.sff-oscuro:not(#extr-page) .introjs-arrow.top-right {
        border-bottom-color: var(--sff-o-superficie) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-tour .introjs-arrow.top,
    html.sff-oscuro:not(#extr-page) .sff-tour .introjs-arrow.top-middle,
    html.sff-oscuro:not(#extr-page) .sff-tour .introjs-arrow.top-right {
        border-bottom-color: var(--sff-o-marca) !important;
    }

    html.sff-oscuro:not(#extr-page) .introjs-arrow.bottom,
    html.sff-oscuro:not(#extr-page) .introjs-arrow.bottom-middle,
    html.sff-oscuro:not(#extr-page) .introjs-arrow.bottom-right {
        border-top-color: var(--sff-o-superficie) !important;
    }

    html.sff-oscuro:not(#extr-page) .introjs-arrow.left,
    html.sff-oscuro:not(#extr-page) .introjs-arrow.left-bottom {
        border-right-color: var(--sff-o-superficie) !important;
    }

    html.sff-oscuro:not(#extr-page) .introjs-arrow.right,
    html.sff-oscuro:not(#extr-page) .introjs-arrow.right-bottom {
        border-left-color: var(--sff-o-superficie) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-tour .sff-tour-head {
        background: var(--sff-o-marca) !important;
        color: #fff !important;
    }

        html.sff-oscuro:not(#extr-page) .sff-tour .sff-tour-head b {
            color: #fff !important;
        }

        html.sff-oscuro:not(#extr-page) .sff-tour .sff-tour-head small {
            color: var(--sff-o-menu-grupo) !important;
        }

    html.sff-oscuro:not(#extr-page) .sff-tour .sff-tour-body {
        color: var(--sff-o-texto-2) !important;
    }

        html.sff-oscuro:not(#extr-page) .sff-tour .sff-tour-body b {
            color: var(--sff-o-texto) !important;
        }

    html.sff-oscuro:not(#extr-page) .introjs-tooltipbuttons {
        border-top-color: var(--sff-o-borde) !important;
    }

    html.sff-oscuro:not(#extr-page) .introjs-bullets ul li a {
        background: var(--sff-o-borde-campo) !important;
    }

        html.sff-oscuro:not(#extr-page) .introjs-bullets ul li a.active {
            background: var(--sff-o-verde) !important;
        }

    html.sff-oscuro:not(#extr-page) .introjs-button {
        background: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto) !important;
        border-color: var(--sff-o-borde-campo) !important;
        text-shadow: none !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-tour .introjs-skipbutton {
        background: none !important;
        border: 0 !important;
        color: var(--sff-o-texto-3) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-tour .introjs-nextbutton {
        background: var(--sff-o-marca) !important;
        border-color: var(--sff-o-marca-borde) !important;
        color: #fff !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-tour .introjs-skipbutton.introjs-donebutton {
        background: var(--sff-o-verde) !important;
        color: #0E3D52 !important;
    }

    html.sff-oscuro:not(#extr-page) .introjs-disabled {
        opacity: .45;
    }

    /* ---------- FullCalendar (Calendario) ---------- */
    html.sff-oscuro:not(#extr-page) #calendar .fc-widget-header,
    html.sff-oscuro:not(#extr-page) #calendar .fc-widget-content,
    html.sff-oscuro:not(#extr-page) #calendar td,
    html.sff-oscuro:not(#extr-page) #calendar th {
        border-color: var(--sff-o-borde) !important;
    }

    html.sff-oscuro:not(#extr-page) #calendar.sff-cal td.fc-past {
        background-color: var(--sff-o-fondo) !important;
    }

    html.sff-oscuro:not(#extr-page) #calendar .fc-other-month .fc-day-number {
        color: var(--sff-o-placeholder) !important;
    }

    html.sff-oscuro:not(#extr-page) #calendar .fc-button {
        background: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto) !important;
        border-color: var(--sff-o-borde-campo) !important;
        text-shadow: none !important;
        box-shadow: none !important;
    }

        html.sff-oscuro:not(#extr-page) #calendar .fc-button.fc-state-active,
        html.sff-oscuro:not(#extr-page) #calendar .fc-button.active {
            background: var(--sff-o-marca) !important;
            color: #fff !important;
        }

    /* ---------- Campos con error y mensajes de validación ---------- */
    html.sff-oscuro:not(#extr-page) .smart-form .sff-campo-error input,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-campo-error select,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-campo-error textarea,
    html.sff-oscuro:not(#extr-page) .sff-campo-error .select2-choice,
    html.sff-oscuro:not(#extr-page) .smart-form .state-error input,
    html.sff-oscuro:not(#extr-page) .smart-form .state-error select,
    html.sff-oscuro:not(#extr-page) .smart-form .state-error textarea {
        background-color: var(--sff-o-error-fondo) !important;
        border-color: #E0607A !important;
    }

    html.sff-oscuro:not(#extr-page) .smart-form .state-success input,
    html.sff-oscuro:not(#extr-page) .smart-form .state-success select,
    html.sff-oscuro:not(#extr-page) .smart-form .state-success textarea {
        background-color: rgba(148, 190, 21, .10) !important;
    }

    html.sff-oscuro:not(#extr-page) .smart-form .note-error,
    html.sff-oscuro:not(#extr-page) .field-validation-error,
    html.sff-oscuro:not(#extr-page) .text-danger {
        color: #F08AA0 !important;
    }

    /* ---------- Ventana de reingreso al vencer la sesión ---------- */
    html.sff-oscuro:not(#extr-page) .sff-reingreso-caja {
        background: var(--sff-o-superficie) !important;
        color: var(--sff-o-texto-2);
    }

    html.sff-oscuro:not(#extr-page) .sff-reingreso-enc {
        background: var(--sff-o-marca) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-reingreso-usuario,
    html.sff-oscuro:not(#extr-page) .sff-reingreso-clave input {
        background: var(--sff-o-fondo) !important;
        border-color: var(--sff-o-borde-campo) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-reingreso-sec {
        background: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde-campo) !important;
        color: var(--sff-o-texto) !important;
    }

    /* Botón blanco del pie de los formularios (Consultar en Hacienda, etc.) y flecha de las tarjetas del modal de cliente */
    html.sff-oscuro:not(#extr-page) .smart-form footer .btn-success,
    html.sff-oscuro:not(#extr-page) #modalClientes .btn-success,
    html.sff-oscuro:not(#extr-page) #modalClientesAct .btn-success {
        background-color: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde-campo) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) #modalClientes .sff-mc-tarjeta > .sff-bloque-t .sff-mc-toggle,
    html.sff-oscuro:not(#extr-page) #modalClientesAct .sff-mc-tarjeta > .sff-bloque-t .sff-mc-toggle {
        color: var(--sff-o-texto-2) !important;
    }

    /* Número de las tarjetas: verde con texto azul de marca (la regla general de títulos lo dejaba claro) */
    html.sff-oscuro:not(#extr-page) #modalClientes .sff-mc-tarjeta > .sff-bloque-t span:not(.sff-mc-toggle),
    html.sff-oscuro:not(#extr-page) #modalClientesAct .sff-mc-tarjeta > .sff-bloque-t span:not(.sff-mc-toggle),
    html.sff-oscuro:not(#extr-page) .sff-editar-cliente.sff-ec-con-tarjetas .sff-ec-tarjeta > .sff-bloque-t span,
    html.sff-oscuro:not(#extr-page) .sff-fac-tarjetas .sff-fac-tarjeta > .sff-bloque-t span,
    html.sff-oscuro:not(#extr-page) .editFacturaForm.sff-nota-tarjetas > fieldset .sff-bloque-t span {
        color: #0E3D52 !important;
    }

    /* Asterisco de obligatorio */
    html.sff-oscuro:not(#extr-page) .sff-req {
        color: #F08AA0 !important;
    }

    /* ---------- Fondos (generado): reglas del tema con fondo blanco o gris muy claro neutro;
       en oscuro pasan a las superficies de la paleta (y su borde claro al borde oscuro) ---------- */
    html.sff-oscuro:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button:hover,
    html.sff-oscuro:not(#extr-page) #incluirCliente.sff-nuevo-cli:hover,
    html.sff-oscuro:not(#extr-page) #actualizarCliente.sff-nuevo-cli:hover,
    html.sff-oscuro:not(#extr-page) #modalClientes .ui-autocomplete .sff-act-item a:hover,
    html.sff-oscuro:not(#extr-page) .sff-seg button:hover,
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody tr:hover td,
    html.sff-oscuro:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody tr:hover td,
    html.sff-oscuro:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla tbody tr:hover,
    html.sff-oscuro:not(#extr-page) .sff-mes-cab button:hover:not(:disabled),
    html.sff-oscuro:not(#extr-page) .sff-mes-grid button:hover:not(:disabled),
    html.sff-oscuro:not(#extr-page) .sff-btn-quitar:hover,
    html.sff-oscuro:not(#extr-page) .sff-config-emisor #datatable_ListaOtrosCargos .EliminarOtrosCargos:hover {
        background-color: var(--sff-o-fila-hover) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-tabla-facturas > tbody > tr,
    html.sff-oscuro:not(#extr-page) #ribbon,
    html.sff-oscuro:not(#extr-page) .sff-tarjeta-cli,
    html.sff-oscuro:not(#extr-page) .sff-detalle-origen #datatable_fixed_detalle tbody tr,
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody td,
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody tr,
    html.sff-oscuro:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody td,
    html.sff-oscuro:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody tr,
    html.sff-oscuro:not(#extr-page) .sff-nota-head,
    html.sff-oscuro:not(#extr-page) .sff-totales-nota > .row,
    html.sff-oscuro:not(#extr-page) .sff-totales-nota > .sff-oc-nota,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-oc-factura,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-otc-factura,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-exo-factura,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-wal-factura,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-ac-tarjeta,
    html.sff-oscuro:not(#extr-page) .sff-dc-panel,
    html.sff-oscuro:not(#extr-page) table.sff-dc-tabla > tbody > tr,
    html.sff-oscuro:not(#extr-page) .sff-cal-panel,
    html.sff-oscuro:not(#extr-page) .sff-cal-leyenda,
    html.sff-oscuro:not(#extr-page) .sff-tabla-clientes > tbody > tr,
    html.sff-oscuro:not(#extr-page) .sff-tabla-productos > tbody > tr,
    html.sff-oscuro:not(#extr-page) .sff-cred .sff-cred-card,
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos > tbody > tr,
    html.sff-oscuro:not(#extr-page) .sff-mes-pop,
    html.sff-oscuro:not(#extr-page) .sff-mes-grid button:disabled,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-banco,
    html.sff-oscuro:not(#extr-page) .sff-perfil .sff-perfil-tarjeta,
    html.sff-oscuro:not(#extr-page) .sff-tabla-emisores > tbody > tr,
    html.sff-oscuro:not(#extr-page) .sff-btn-quitar,
    html.sff-oscuro:not(#extr-page) .sff-config-emisor .sff-ce-tarjeta,
    html.sff-oscuro:not(#extr-page) .sff-config-emisor #datatable_ListaOtrosCargos .EliminarOtrosCargos,
    html.sff-oscuro:not(#extr-page) .sff-config-emisor footer.sff-ce-acciones,
    html.sff-oscuro:not(#extr-page) .sff-config-emisor .sff-ce-subs > fieldset.sff-ce-sub {
        background-color: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde) !important;
    }

    html.sff-oscuro:not(#extr-page) #incluirCliente.sff-nuevo-cli,
    html.sff-oscuro:not(#extr-page) #actualizarCliente.sff-nuevo-cli,
    html.sff-oscuro:not(#extr-page) #modalClientes #btnBuscarNombre,
    html.sff-oscuro:not(#extr-page) #modalClientes #BuscarCodigoActividad,
    html.sff-oscuro:not(#extr-page) .smart-form label.sff-ac-btn,
    html.sff-oscuro:not(#extr-page) .sff-dc-copiar,
    html.sff-oscuro:not(#extr-page) .sff-dc-btn,
    html.sff-oscuro:not(#extr-page) .sff-cal-vistas button {
        background-color: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde-campo) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) #modalClientes .modal-body,
    html.sff-oscuro:not(#extr-page) #modalClientesAct .modal-body,
    html.sff-oscuro:not(#extr-page) #modalClientes .ui-autocomplete .sff-act-item a.ui-state-focus,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-ac-archivo,
    html.sff-oscuro:not(#extr-page) table.sff-dc-tabla > tbody > tr.sff-dc-marcada > td,
    html.sff-oscuro:not(#extr-page) .sff-dc-plazo,
    html.sff-oscuro:not(#extr-page) table.sff-dc-tabla > tbody > tr.sff-dc-marcada,
    html.sff-oscuro:not(#extr-page) .sff-lp-est,
    html.sff-oscuro:not(#extr-page) .sff-lp-est.sff-lp-e-env,
    html.sff-oscuro:not(#extr-page) #calendar.sff-cal .fc-today,
    html.sff-oscuro:not(#extr-page) #calendar.sff-cal td.fc-past,
    html.sff-oscuro:not(#extr-page) .sff-tabla-productos > tbody > tr.sff-cb-sel > td,
    html.sff-oscuro:not(#extr-page) .sff-tabla-productos > tbody > tr.sff-cb-sel,
    html.sff-oscuro:not(#extr-page) .sff-cred .sff-cred-kpi,
    html.sff-oscuro:not(#extr-page) .sff-cred .sff-cred-kpi.sff-cred-total,
    html.sff-oscuro:not(#extr-page) .sff-cred-chip,
    html.sff-oscuro:not(#extr-page) .sff-cred-chip.sff-cred-venc,
    html.sff-oscuro:not(#extr-page) .sff-cred-chip.sff-cred-anulado,
    html.sff-oscuro:not(#extr-page) .sff-cred-modal .sff-cred-caja,
    html.sff-oscuro:not(#extr-page) .sff-cred-modal .sff-cred-caja.sff-cred-pendiente,
    html.sff-oscuro:not(#extr-page) .sff-arbol-permisos > ul > li > ul > li.sff-on > span,
    html.sff-oscuro:not(#extr-page) .sff-d104-periodo,
    html.sff-oscuro:not(#extr-page) .sff-d104-total,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-copiar.sff-copiado,
    html.sff-oscuro:not(#extr-page) .sff-config-emisor .sff-ce-sub-interruptor:has(label.toggle input:checked) > label.sff-ce-subtitulo {
        background-color: var(--sff-o-superficie-2) !important;
    }

    html.sff-oscuro:not(#extr-page) #modalClientes .sff-mc-tarjeta,
    html.sff-oscuro:not(#extr-page) #modalClientesAct .sff-mc-tarjeta,
    html.sff-oscuro:not(#extr-page) .sff-editar-cliente.sff-ec-con-tarjetas .sff-ec-tarjeta,
    html.sff-oscuro:not(#extr-page) .sff-d104-vacio,
    html.sff-oscuro:not(#extr-page) .sff-d104-filtros #fecha,
    html.sff-oscuro:not(#extr-page) .sff-fac-tarjetas .sff-fac-tarjeta,
    html.sff-oscuro:not(#extr-page) .sff-fac-tarjetas > fieldset[id],
    html.sff-oscuro:not(#extr-page) .sff-fac-tarjetas > fieldset.sff-fac-cont,
    html.sff-oscuro:not(#extr-page) .editFacturaForm.sff-nota-tarjetas > fieldset {
        background-color: var(--sff-o-superficie) !important;
    }

    html.sff-oscuro:not(#extr-page) #modalClientes .sff-actividad-chip,
    html.sff-oscuro:not(#extr-page) .sff-nota-head .sff-nh-chip,
    html.sff-oscuro:not(#extr-page) table.sff-dc-tabla .sff-dc-tipo,
    html.sff-oscuro:not(#extr-page) .sff-cb-barra,
    html.sff-oscuro:not(#extr-page) .sff-arbol-contador,
    html.sff-oscuro:not(#extr-page) .sff-d104-pagar,
    html.sff-oscuro:not(#extr-page) .sff-d104-tabla > tbody > tr > td.sff-d104-tarifa,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-banco-titulo,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-aviso,
    html.sff-oscuro:not(#extr-page) .sff-perfil .sff-perfil-titulo {
        background-color: var(--sff-o-superficie-2) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-seg button,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-dc-atajos button,
    html.sff-oscuro:not(#extr-page) table.sff-dc-tabla .sff-dc-acc button,
    html.sff-oscuro:not(#extr-page) .sff-d104-exportar,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-copiar,
    html.sff-oscuro:not(#extr-page) .sff-perfil footer .sff-perfil-limpiar {
        background-color: var(--sff-o-superficie) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle thead th,
    html.sff-oscuro:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle thead th {
        background-color: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde-campo) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-dc-banda,
    html.sff-oscuro:not(#extr-page) .sff-cal-banda,
    html.sff-oscuro:not(#extr-page) .sff-ev-cuando,
    html.sff-oscuro:not(#extr-page) .sff-arbol-permisos > ul > li > ul > li > span {
        background-color: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) table.sff-dc-tabla > thead > tr > th,
    html.sff-oscuro:not(#extr-page) #calendar.sff-cal th,
    html.sff-oscuro:not(#extr-page) .sff-cal-modal .modal-footer,
    html.sff-oscuro:not(#extr-page) .sff-cb-barra.sff-cb-vacia,
    html.sff-oscuro:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-resumen,
    html.sff-oscuro:not(#extr-page) .sff-cb-barra.sff-cb-error,
    html.sff-oscuro:not(#extr-page) .sff-tabla-creditos > thead > tr > th,
    html.sff-oscuro:not(#extr-page) .sff-d104-dato,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-dato,
    html.sff-oscuro:not(#extr-page) .sff-config-emisor #datatable_ListaOtrosCargos > thead > tr > th,
    html.sff-oscuro:not(#extr-page) .sff-config-emisor .sff-ce-sub > label.sff-ce-subtitulo {
        background-color: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde) !important;
    }

    html.sff-oscuro:not(#extr-page) table.sff-dc-tabla > tbody > tr > td,
    html.sff-oscuro:not(#extr-page) .sff-lp-chip,
    html.sff-oscuro:not(#extr-page) #modalCabys.sff-cbm-modal .sff-cbm-tabla thead th,
    html.sff-oscuro:not(#extr-page) .sff-mes-grid button {
        background-color: var(--sff-o-superficie) !important;
        border-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-arbol-permisos > ul > li > ul > li > span:hover,
    html.sff-oscuro:not(#extr-page) .sff-d104-exportar:hover,
    html.sff-oscuro:not(#extr-page) .sff-cuentas-copiar:hover,
    html.sff-oscuro:not(#extr-page) .sff-perfil footer .sff-perfil-limpiar:hover {
        background-color: var(--sff-o-fila-hover) !important;
        color: var(--sff-o-texto) !important;
    }


    /* ---------- Ajustes después de los fondos generados ---------- */
    /* Hoy en el calendario: tinte verde y número en azul de marca sobre el círculo verde */
    html.sff-oscuro:not(#extr-page) #calendar.sff-cal .fc-today {
        background-color: rgba(148, 190, 21, .18) !important;
    }

    html.sff-oscuro:not(#extr-page) #calendar.sff-cal .fc-today .fc-day-number {
        color: #0E3D52 !important;
    }

    /* Colores de evento: el tinte pasa a translúcido y el azul oscuro de "General" se aclara */
    html.sff-oscuro:not(#extr-page) .sff-cal-c-darken,
    html.sff-oscuro:not(#extr-page) #calendar.sff-cal .fc-event.bg-color-darken { --c: #8FC3DA; --t: rgba(143, 195, 218, .16); }
    html.sff-oscuro:not(#extr-page) .sff-cal-c-blue,
    html.sff-oscuro:not(#extr-page) #calendar.sff-cal .fc-event.bg-color-blue { --c: #6FA8E6; --t: rgba(47, 111, 178, .24); }
    html.sff-oscuro:not(#extr-page) .sff-cal-c-greenLight,
    html.sff-oscuro:not(#extr-page) #calendar.sff-cal .fc-event.bg-color-greenLight { --c: #A9D12E; --t: rgba(110, 154, 14, .24); }
    html.sff-oscuro:not(#extr-page) .sff-cal-c-orange,
    html.sff-oscuro:not(#extr-page) #calendar.sff-cal .fc-event.bg-color-orange { --c: #F0A050; --t: rgba(204, 112, 20, .22); }
    html.sff-oscuro:not(#extr-page) .sff-cal-c-blueLight,
    html.sff-oscuro:not(#extr-page) #calendar.sff-cal .fc-event.bg-color-blueLight { --c: #5EC2E2; --t: rgba(42, 147, 181, .22); }
    html.sff-oscuro:not(#extr-page) .sff-cal-c-red,
    html.sff-oscuro:not(#extr-page) #calendar.sff-cal .fc-event.bg-color-red { --c: #F08AA0; --t: rgba(169, 3, 41, .24); }

    html.sff-oscuro:not(#extr-page) #calendar.sff-cal .fc-event,
    html.sff-oscuro:not(#extr-page) .sff-cal-modal [class*='sff-cal-c-'] {
        color: var(--sff-o-texto) !important;
    }

    /* Chips de estado de las listas (Activo, Física/Jurídica) */
    html.sff-oscuro:not(#extr-page) .sff-tabla-clientes .sff-chip-cliente,
    html.sff-oscuro:not(#extr-page) .sff-tabla-productos .sff-chip-producto {
        background: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto-2) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-tabla-clientes .sff-chip-cliente.sff-chip-activo,
    html.sff-oscuro:not(#extr-page) .sff-tabla-productos .sff-chip-producto.sff-chip-activo {
        background: rgba(148, 190, 21, .16) !important;
        border-color: rgba(148, 190, 21, .4) !important;
        color: #B5D94A !important;
    }

    /* Botones blancos con contorno: Ayuda de Roles/Usuarios/Reportes y la navegación del Calendario */
    html.sff-oscuro:not(#extr-page) .sff-roles footer .btn-ayuda,
    html.sff-oscuro:not(#extr-page) .sff-cal-nav .btn {
        background: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde-campo) !important;
        color: var(--sff-o-texto) !important;
    }

        html.sff-oscuro:not(#extr-page) .sff-roles footer .btn-ayuda:hover,
        html.sff-oscuro:not(#extr-page) .sff-cal-nav .btn:hover {
            background: var(--sff-o-fila-hover) !important;
        }

    /* Interruptores (label.toggle) */
    html.sff-oscuro:not(#extr-page) .smart-form .toggle i {
        background-color: var(--sff-o-fondo) !important;
        border-color: var(--sff-o-borde-campo) !important;
    }

    html.sff-oscuro:not(#extr-page) .smart-form .toggle input:checked + i {
        background-color: rgba(148, 190, 21, .2) !important;
        border-color: var(--sff-o-verde) !important;
    }

    /* Campos de solo lectura o de resumen dentro de tarjetas y tablas de líneas */
    html.sff-oscuro:not(#extr-page) .smart-form .sff-oc-factura #iditemOtrosCargos input#monto,
    html.sff-oscuro:not(#extr-page) .smart-form .sff-otc-factura > section:first-of-type input,
    html.sff-oscuro:not(#extr-page) .sff-editar-cliente input[readonly],
    html.sff-oscuro:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody input:disabled {
        background: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde) !important;
        color: var(--sff-o-texto-2) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody input,
    html.sff-oscuro:not(#extr-page) .sff-detalle-nota #datatable_fixed_facturaDetalle tbody input:not(:disabled) {
        background: var(--sff-o-fondo) !important;
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle tbody input {
        border-color: var(--sff-o-borde-campo) !important;
    }

    /* Campos llenados por Hacienda y subtítulos activos de la configuración del emisor: verde translúcido */
    html.sff-oscuro:not(#extr-page) #modalClientes input.sff-autollenado,
    html.sff-oscuro:not(#extr-page) .sff-config-emisor .sff-ce-sub-interruptor:has(label.toggle input:checked) > label.sff-ce-subtitulo {
        background-color: rgba(148, 190, 21, .12) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-config-emisor .sff-ce-sub-interruptor:has(label.toggle input:checked) > label.sff-ce-subtitulo::before {
        background: rgba(148, 190, 21, .22) !important;
        color: #B5D94A !important;
    }

    /* Número de pasos del D104 */
    html.sff-oscuro:not(#extr-page) .sff-d104-n {
        color: #0E3D52 !important;
    }

    /* ==========================================================================
       Modo oscuro, fase 4 (v13.8): logo, aviso del interruptor y colores escritos en el código.
       ========================================================================== */

    /* Logo: _Header tiene las dos imágenes; en claro y en oscuro se ve logo-oscuro.png (letras blancas y F verde) sin placa
       sobre el encabezado azul (claro desde v14.1, a pedido del usuario); logo.png con placa queda solo si no aplica el tema (login) */
    #header #logo img.sff-logo-oscuro {
        display: none !important;
    }

    html:not(#extr-page) #header #logo img:not(.sff-logo-oscuro) {
        display: none !important;
    }

    html:not(#extr-page) #header #logo img.sff-logo-oscuro {
        display: inline-block !important;
        background: transparent !important;
    }

    /* Aviso de una sola vez del interruptor (sff-modo.js): sin Anterior/Siguiente, solo "Entendido" */
    html:not(#extr-page) .sff-tour.sff-tour-uno .introjs-prevbutton,
    html:not(#extr-page) .sff-tour.sff-tour-uno .introjs-nextbutton {
        display: none !important;
    }

    /* Colores escritos en el código (style="..." en scripts y vistas): en oscuro pasan a la paleta.
       El estilo en línea no lleva !important, por eso estas reglas lo reemplazan */
    html.sff-oscuro:not(#extr-page) [style*="0E3D52" i],
    html.sff-oscuro:not(#extr-page) [style*="Color:Black" i] {
        color: var(--sff-o-texto) !important;
    }

    html.sff-oscuro:not(#extr-page) [style*="5B6B72" i],
    html.sff-oscuro:not(#extr-page) [style*="5B6B78" i] {
        color: var(--sff-o-texto-3) !important;
    }

    html.sff-oscuro:not(#extr-page) [style*="c62828" i],
    html.sff-oscuro:not(#extr-page) [style*="A90329" i] {
        color: #F08AA0 !important;
    }

    html.sff-oscuro:not(#extr-page) [style*="2e7d32" i] {
        color: #9BD67A !important;
    }

    html.sff-oscuro:not(#extr-page) [style*="8A5200" i] {
        color: #F2C98A !important;
    }

    /* Número de línea y campos del descuento por línea (fondo gris azulado #82a1ab con texto negro) */
    html.sff-oscuro:not(#extr-page) [style*="82a1ab" i] {
        background-color: var(--sff-o-superficie-2) !important;
        border-color: var(--sff-o-borde-campo) !important;
        color: var(--sff-o-texto) !important;
    }

/* ==========================================================================
   Búsqueda por voz (v14.0): en el encabezado solo queda el botón del micrófono (#search-mobile),
   en todos los tamaños; el campo #search-form se oculta (recognition.js sigue usando #search).
   SmartAdmin ocultaba el botón tras el primer clic (body.search-mobile): por eso !important.
   ========================================================================== */
html:not(#extr-page) #header #search-form {
    display: none !important;
}

html:not(#extr-page) #header #search-mobile {
    display: block !important;
}

    html:not(#extr-page) #header #search-mobile.sff-sin-voz {
        display: none !important;
    }

    /* Escuchando: micrófono rojo que late */
    html:not(#extr-page) #header #search-mobile.sff-escuchando > span > a {
        background: #A90329 !important;
        border-color: #A90329 !important;
        animation: sff-voz-latido 1.2s ease-in-out infinite;
    }

@keyframes sff-voz-latido {
    0%, 100% { box-shadow: 0 0 0 0 rgba(169, 3, 41, .55); }
    50% { box-shadow: 0 0 0 6px rgba(169, 3, 41, 0); }
}

/* Imagen del usuario en el menú (v14.2): franja a lo ancho del menú con la misma altura (60 px) que la imagen cuadrada anterior;
   con el menú contraído queda en el cuadro de 30 px del tema, recortada al centro */
html:not(#extr-page) .login-info img.sff-usuario-ancha {
    width: 200px !important;
    height: 60px !important;
    object-fit: cover;
    border-radius: 8px;
}

html:not(#extr-page) .minified .login-info img.sff-usuario-ancha {
    width: 30px !important;
    height: 30px !important;
    border-radius: 4px;
}

/* Inicio en modo oscuro (v14.3): la regla general de bordes de .sff-card dejaba gris el borde verde izquierdo de Crear factura.
   En celular la tarjeta usa la línea verde superior (sombra interna), como las demás */
@media (min-width: 768px) {
    html.sff-oscuro:not(#extr-page) .sff-card-principal {
        border-left-color: #94BE15 !important;
    }
}

/* Inicio en modo oscuro (v14.4): "¿Qué desea hacer hoy?" tenía el gris del modo claro (#5B6B72, contraste 3.2 sobre el fondo oscuro) */
html.sff-oscuro:not(#extr-page) .sff-inicio .sff-subtitulo {
    color: var(--sff-o-texto-2) !important;
}

/* Tarjetas de líneas en celular, modo oscuro (v14.5): las celdas tomaban el color de fila alterna de las tablas
   y se veían manchas dentro de la tarjeta (Nueva factura y Factura recurrente) */
@media (max-width: 767px) {
    html.sff-oscuro:not(#extr-page) .sff-detalle-factura #datatable_fixed_facturaDetalle.dataTable > tbody > tr:nth-child(n) > td {
        background: transparent !important;
    }
}

/* Totales en celular (v14.6): el texto guía de los campos grandes (24 px en negrita) se cortaba, p. ej. "Porcentaje de Descuento";
   solo el texto guía baja de tamaño, los montos siguen grandes */
@media (max-width: 767px) {
    html:not(#extr-page) .smart-form input.label-center::placeholder {
        font-size: 17px;
        font-weight: 600;
    }
}

/* Modal de los reportes (v14.7): Documentos, Gastos, Renta y D151 (#modalReporte con #iframeReporte del sitio de reportes).
   Encabezado azul, iframe sin el borde hundido del navegador y "Cerrar" en naranja suave */
html:not(#extr-page) #modalReporte .modal-content {
    border: 0;
    border-radius: 12px;
    overflow: hidden;
}

html:not(#extr-page) #modalReporte .modal-header {
    background: #15475C;
    color: #fff;
    padding: 14px 18px;
    border-bottom: 0;
}

    html:not(#extr-page) #modalReporte .modal-header .modal-title {
        color: #fff;
        font-size: 16px;
        font-weight: 600;
    }

    html:not(#extr-page) #modalReporte .modal-header .close {
        color: #fff;
        opacity: .85;
        text-shadow: none;
        font-size: 24px;
        margin-top: -4px;
    }

        html:not(#extr-page) #modalReporte .modal-header .close:hover {
            opacity: 1;
        }

html:not(#extr-page) #modalReporte .modal-body {
    padding: 6px 8px 0;
}

html:not(#extr-page) #modalReporte #iframeReporte {
    display: block;
    width: 100%;
    height: 150px;
    border: 0;
    background: #fff;
}

html:not(#extr-page) #modalReporte .modal-footer {
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 10px 18px 14px;
    border-top: 1px solid #EEF2F5;
}

    html:not(#extr-page) #modalReporte .modal-footer .btn {
        min-width: 96px;
        margin: 0;
        padding: 7px 16px;
        border-radius: 6px;
        border: 1px solid #F1C998;
        background: #FCEBD8;
        color: #8A4A0B;
        font-weight: 600;
    }

        html:not(#extr-page) #modalReporte .modal-footer .btn:before {
            content: "\f00d";
            font-family: FontAwesome;
            font-weight: 400;
            margin-right: 6px;
        }

        html:not(#extr-page) #modalReporte .modal-footer .btn:hover,
        html:not(#extr-page) #modalReporte .modal-footer .btn:focus {
            background: #F9DDBD;
            border-color: #E5B47A;
            color: #8A4A0B;
        }

/* Modo oscuro: el encabezado toma la superficie oscura de los modales; el contenido del iframe sigue claro (otro sitio) */
html.sff-oscuro:not(#extr-page) #modalReporte #iframeReporte {
    border-radius: 8px;
}

html.sff-oscuro:not(#extr-page) #modalReporte .modal-body {
    padding: 8px 8px 0;
}

html.sff-oscuro:not(#extr-page) #modalReporte .modal-footer .btn {
    background: #3B2A18 !important;
    border-color: #7A5128 !important;
    color: #F4C08A !important;
}

    html.sff-oscuro:not(#extr-page) #modalReporte .modal-footer .btn:hover,
    html.sff-oscuro:not(#extr-page) #modalReporte .modal-footer .btn:focus {
        background: #4A341D !important;
        border-color: #9A6732 !important;
        color: #F8D2A6 !important;
    }

/* Tablero (v14.8-v14.9): Reporte/Tablero, primera opción del menú. Indicadores, gráfico de Chart.js 4 y lo más vendido */
html:not(#extr-page) .sff-tb {
    max-width: 1180px;
    padding: 4px 0 24px;
}

    html:not(#extr-page) .sff-tb-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
    }

        html:not(#extr-page) .sff-tb-head small {
            color: #5D6D75;
            font-size: 12px;
        }

        html:not(#extr-page) .sff-tb-head h2 {
            margin: 0;
            font-size: 22px;
            font-weight: 600;
            color: #0E3D52;
        }

    html:not(#extr-page) .sff-tb .sff-tb-filtros {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 10px 18px;
        background: #fff;
        border: 1px solid #DDE3E6;
        border-radius: 10px;
        padding: 12px 16px;
    }

        html:not(#extr-page) .sff-tb .sff-tb-filtros section {
            margin: 0;
        }

    html:not(#extr-page) .sff-tb .sff-tb-emisor {
        flex: 1 1 260px;
        max-width: 380px;
    }

    html:not(#extr-page) .sff-tb .sff-tb-rango {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 8px;
        flex-basis: 100%;
    }

        html:not(#extr-page) .sff-tb .sff-tb-rango .label {
            margin: 0;
        }

        html:not(#extr-page) .sff-tb .sff-tb-rango .input {
            width: 150px;
        }

        html:not(#extr-page) .sff-tb .sff-tb-rango .sff-campo-error-msg {
            flex-basis: 100%;
        }

    html:not(#extr-page) .sff-tb-atajos,
    html:not(#extr-page) .sff-tb-vista {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    html:not(#extr-page) .sff-tb-atajo {
        border: 1px solid #C9D3D8;
        background: #fff;
        color: #2B3A42;
        border-radius: 16px;
        padding: 5px 12px;
        font-size: 12px;
        line-height: 1.3;
        cursor: pointer;
    }

        html:not(#extr-page) .sff-tb-atajo:hover {
            border-color: #15475C;
        }

        html:not(#extr-page) .sff-tb-atajo.active {
            background: #15475C;
            border-color: #15475C;
            color: #fff;
        }

    html:not(#extr-page) .sff-tb-resumen {
        margin: 10px 2px 8px;
        min-height: 18px;
        font-size: 12px;
        color: #5D6D75;
    }

    html:not(#extr-page) .sff-tb-kpis {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 12px;
    }

    html:not(#extr-page) .sff-tb-kpi {
        background: #fff;
        border: 1px solid #DDE3E6;
        border-top: 3px solid #15475C;
        border-radius: 10px;
        padding: 12px 14px;
    }

        html:not(#extr-page) .sff-tb-kpi:nth-child(2) { border-top-color: #94BE15; }
        html:not(#extr-page) .sff-tb-kpi:nth-child(4) { border-top-color: #CC7014; }

        html:not(#extr-page) .sff-tb-kpi small,
        html:not(#extr-page) .sff-tb-kpi span {
            display: block;
            font-size: 12px;
            color: #5D6D75;
        }

        html:not(#extr-page) .sff-tb-kpi b {
            display: block;
            margin: 4px 0 2px;
            font-size: 22px;
            font-weight: 600;
            color: #0E3D52;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

    html:not(#extr-page) .sff-tb-card {
        background: #fff;
        border: 1px solid #DDE3E6;
        border-radius: 10px;
        padding: 12px 16px 14px;
        margin-bottom: 12px;
    }

    html:not(#extr-page) .sff-tb-card-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 8px;
    }

        html:not(#extr-page) .sff-tb-card-head h3 {
            margin: 0;
            font-size: 14px;
            font-weight: 600;
            color: #15475C;
        }

    html:not(#extr-page) .sff-tb-grafico {
        position: relative;
        height: 280px;
    }

    html:not(#extr-page) .sff-tb-dos {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

        html:not(#extr-page) .sff-tb-dos .sff-tb-card {
            margin-bottom: 0;
        }

    html:not(#extr-page) .sff-tb-fila {
        display: grid;
        grid-template-columns: 22px minmax(0, 1fr) auto;
        gap: 2px 8px;
        align-items: center;
        padding: 6px 0;
        font-size: 13px;
    }

    html:not(#extr-page) .sff-tb-pos {
        grid-row: span 2;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #EEF3F5;
        color: #15475C;
        font-size: 11px;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    html:not(#extr-page) .sff-tb-nombre {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #2B3A42;
    }

    html:not(#extr-page) .sff-tb-monto {
        color: #5D6D75;
        font-size: 12px;
        white-space: nowrap;
    }

    html:not(#extr-page) .sff-tb-barra {
        grid-column: 2 / 4;
        height: 6px;
        background: #EEF2F4;
        border-radius: 3px;
        overflow: hidden;
    }

        html:not(#extr-page) .sff-tb-barra i {
            display: block;
            height: 100%;
            border-radius: 3px;
            background: #94BE15;
        }

    html:not(#extr-page) #sffTbServicios .sff-tb-barra i {
        background: #CC7014;
    }

    html:not(#extr-page) .sff-tb-vacio {
        margin: 6px 0 0;
        font-size: 12px;
        color: #5D6D75;
    }

    html:not(#extr-page) .sff-tb-nota {
        margin: 12px 2px 0;
        font-size: 12px;
        color: #5D6D75;
    }

    /* Mientras carga (v15.0): spinner sobre los datos; los filtros siguen disponibles */
    html:not(#extr-page) .sff-tb-datos {
        position: relative;
    }

    html:not(#extr-page) .sff-tb-espera {
        display: none;
        position: absolute;
        inset: -4px;
        z-index: 5;
        border-radius: 10px;
        background: rgba(255, 255, 255, .72);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 140px;
        gap: 10px;
        color: #15475C;
        font-size: 13px;
        font-weight: 600;
    }

    html:not(#extr-page) .sff-tb.sff-tb-cargando .sff-tb-espera {
        display: flex;
    }

    html:not(#extr-page) .sff-tb-spin {
        width: 38px;
        height: 38px;
        border: 4px solid #D6E2E7;
        border-top-color: #15475C;
        border-radius: 50%;
        animation: sff-tb-girar .9s linear infinite;
    }

@keyframes sff-tb-girar {
    to { transform: rotate(360deg); }
}

html.sff-oscuro:not(#extr-page) .sff-tb-espera {
    background: rgba(15, 26, 32, .72) !important;
    color: var(--sff-o-texto) !important;
}

html.sff-oscuro:not(#extr-page) .sff-tb-spin {
    border-color: var(--sff-o-borde) !important;
    border-top-color: #4FA3C4 !important;
}

@media (max-width: 991px) {
    html:not(#extr-page) .sff-tb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    html:not(#extr-page) .sff-tb-dos { grid-template-columns: minmax(0, 1fr); }
    html:not(#extr-page) .sff-tb-grafico { height: 220px; }
    html:not(#extr-page) .sff-tb-kpi b { font-size: 18px; }
    html:not(#extr-page) .sff-tb .sff-tb-emisor { max-width: none; }
}

/* Tablero en modo oscuro */
html.sff-oscuro:not(#extr-page) .sff-tb-head h2,
html.sff-oscuro:not(#extr-page) .sff-tb-kpi b {
    color: var(--sff-o-texto) !important;
}

html.sff-oscuro:not(#extr-page) .sff-tb .sff-tb-filtros,
html.sff-oscuro:not(#extr-page) .sff-tb-kpi,
html.sff-oscuro:not(#extr-page) .sff-tb-card {
    background: var(--sff-o-superficie) !important;
    border-color: var(--sff-o-borde) !important;
}

html.sff-oscuro:not(#extr-page) .sff-tb-kpi:nth-child(1),
html.sff-oscuro:not(#extr-page) .sff-tb-kpi:nth-child(3) { border-top-color: #4FA3C4 !important; }
html.sff-oscuro:not(#extr-page) .sff-tb-kpi:nth-child(2) { border-top-color: #94BE15 !important; }
html.sff-oscuro:not(#extr-page) .sff-tb-kpi:nth-child(4) { border-top-color: #CC7014 !important; }

html.sff-oscuro:not(#extr-page) .sff-tb-head small,
html.sff-oscuro:not(#extr-page) .sff-tb-kpi small,
html.sff-oscuro:not(#extr-page) .sff-tb-kpi span,
html.sff-oscuro:not(#extr-page) .sff-tb-resumen,
html.sff-oscuro:not(#extr-page) .sff-tb-monto,
html.sff-oscuro:not(#extr-page) .sff-tb-vacio,
html.sff-oscuro:not(#extr-page) .sff-tb-nota {
    color: var(--sff-o-texto-2) !important;
}

html.sff-oscuro:not(#extr-page) .sff-tb-card-head h3 {
    color: #8FC3DA !important;
}

html.sff-oscuro:not(#extr-page) .sff-tb-nombre {
    color: var(--sff-o-texto) !important;
}

html.sff-oscuro:not(#extr-page) .sff-tb-atajo {
    background: var(--sff-o-superficie-2) !important;
    border-color: var(--sff-o-borde-campo) !important;
    color: var(--sff-o-texto) !important;
}

    html.sff-oscuro:not(#extr-page) .sff-tb-atajo.active {
        background: #2F7A99 !important;
        border-color: #2F7A99 !important;
        color: #fff !important;
    }

html.sff-oscuro:not(#extr-page) .sff-tb-pos {
    background: var(--sff-o-superficie-2) !important;
    color: #8FC3DA !important;
}

html.sff-oscuro:not(#extr-page) .sff-tb-barra {
    background: var(--sff-o-superficie-2) !important;
}

/* Tablero: mensaje cuando el periodo no tiene movimientos (en lugar del gráfico vacío) */
html:not(#extr-page) .sff-tb-grafico .sff-tb-grafico-vacio {
    position: absolute;
    inset: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

/* Lista de facturas, menú ⋯ en modo oscuro (v15.1): la regla del modo claro fija el texto en #1f2d33 !important
   y es más específica que la general de .dropdown-menu, por eso "Re-facturar" y "Reenviar correo" no se veían */
html.sff-oscuro:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button {
    color: var(--sff-o-texto) !important;
}

    html.sff-oscuro:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button i {
        color: var(--sff-o-texto-2) !important;
    }

    html.sff-oscuro:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button.btnMotivoRechazo,
    html.sff-oscuro:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button.btnEliminarProforma,
    html.sff-oscuro:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button.btnMotivoRechazo i,
    html.sff-oscuro:not(#extr-page) .sff-tabla-facturas .sff-mas .dropdown-menu li > button.btnEliminarProforma i {
        color: #F08AA0 !important;
    }

/* Borradores de Nueva factura (v15.2): #modalFactTemporalBD.sff-bor-modal (_PartialFactura_TemporalBD + crearFactura.js).
   Encabezado azul con cantidad, tabla sin cuadrícula, Reanudar / Descartar con texto y Cerrar naranja suave */
html:not(#extr-page) .sff-bor-modal .modal-dialog {
    max-width: 780px;
}

html:not(#extr-page) .sff-bor-modal .modal-content {
    border: 0;
    border-radius: 12px;
    overflow: hidden;
}

html:not(#extr-page) .sff-bor-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    border: 0;
    background: #15475C;
    color: #fff;
}

    html:not(#extr-page) .sff-bor-modal .modal-header:before,
    html:not(#extr-page) .sff-bor-modal .modal-header:after {
        display: none;
    }

    html:not(#extr-page) .sff-bor-modal .modal-header .modal-title {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
        color: #fff;
        font-size: 16px;
        font-weight: 600;
    }

        html:not(#extr-page) .sff-bor-modal .modal-header .modal-title > i {
            font-size: 20px;
            opacity: .9;
        }

        html:not(#extr-page) .sff-bor-modal .modal-header .modal-title small {
            display: block;
            margin-top: 2px;
            color: #C9DCE4;
            font-size: 12px;
            font-weight: 400;
        }

    html:not(#extr-page) .sff-bor-modal .modal-header .close {
        margin: 0;
        color: #fff;
        opacity: .85;
        text-shadow: none;
        font-size: 24px;
    }

        html:not(#extr-page) .sff-bor-modal .modal-header .close:hover {
            opacity: 1;
        }

html:not(#extr-page) .sff-bor-modal .modal-body {
    padding: 6px 14px 0 !important;
}

    html:not(#extr-page) .sff-bor-modal .modal-body .smart-form fieldset {
        padding: 0;
        background: transparent;
    }

    html:not(#extr-page) .sff-bor-modal .modal-body .row,
    html:not(#extr-page) .sff-bor-modal .modal-body section {
        margin: 0;
        padding: 0;
    }

html:not(#extr-page) .sff-bor-modal #datatable-factTemp {
    border: 0 !important;
    margin: 0 !important;
}

    html:not(#extr-page) .sff-bor-modal #datatable-factTemp > thead > tr > th {
        background: transparent !important;
        border: 0 !important;
        border-bottom: 1px solid #DDE3E6 !important;
        color: #5D6D75;
        font-size: 12px;
        font-weight: 600;
    }

    html:not(#extr-page) .sff-bor-modal #datatable-factTemp > tbody > tr > td {
        border: 0 !important;
        border-bottom: 1px solid #EEF2F5 !important;
        background: transparent !important;
        padding: 9px 8px !important;
        vertical-align: middle !important;
    }

    html:not(#extr-page) .sff-bor-modal #datatable-factTemp > tbody > tr:hover > td {
        background: #F6F9FA !important;
    }

    html:not(#extr-page) .sff-bor-modal #datatable-factTemp > thead > tr > th:nth-child(3),
    html:not(#extr-page) .sff-bor-modal #datatable-factTemp .sff-bor-monto {
        text-align: right;
    }

html:not(#extr-page) .sff-bor-modal .sff-bor-cliente {
    font-weight: 600;
    color: #0E3D52;
}

html:not(#extr-page) .sff-bor-modal .sff-bor-monto {
    font-weight: 600;
    white-space: nowrap;
}

html:not(#extr-page) .sff-bor-modal .sff-bor-fecha {
    color: #5D6D75;
    white-space: nowrap;
}

    html:not(#extr-page) .sff-bor-modal .sff-bor-fecha span {
        color: #8A9AA2;
    }

html:not(#extr-page) .sff-bor-modal .sff-bor-acciones {
    text-align: right;
    white-space: nowrap;
}

html:not(#extr-page) .sff-bor-modal .sff-bor-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 0 6px;
    padding: 6px 10px;
    border: 1px solid;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

html:not(#extr-page) .sff-bor-modal .sff-bor-reanudar {
    background: #15475C;
    border-color: #15475C;
    color: #fff;
}

    html:not(#extr-page) .sff-bor-modal .sff-bor-reanudar:hover,
    html:not(#extr-page) .sff-bor-modal .sff-bor-reanudar:focus {
        background: #1D5A73;
        border-color: #1D5A73;
    }

html:not(#extr-page) .sff-bor-modal .sff-bor-descartar {
    background: #fff;
    border-color: #E3B4B4;
    color: #A32D2D;
}

    html:not(#extr-page) .sff-bor-modal .sff-bor-descartar:hover,
    html:not(#extr-page) .sff-bor-modal .sff-bor-descartar:focus {
        background: #FBEEEE;
        border-color: #A32D2D;
    }

html:not(#extr-page) .sff-bor-modal .dt-toolbar-footer {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 8px 0 4px;
}

html:not(#extr-page) .sff-bor-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 10px 18px 14px;
    border-top: 1px solid #EEF2F5;
    background: transparent;
}

    html:not(#extr-page) .sff-bor-modal .modal-footer footer {
        padding: 0;
        border: 0;
        background: none;
    }

    html:not(#extr-page) .sff-bor-modal #cerrarModalFactTemporal {
        min-width: 96px;
        margin: 0;
        padding: 7px 16px;
        border: 1px solid #F1C998;
        border-radius: 6px;
        background: #FCEBD8;
        color: #8A4A0B;
        font-weight: 600;
    }

        html:not(#extr-page) .sff-bor-modal #cerrarModalFactTemporal:hover,
        html:not(#extr-page) .sff-bor-modal #cerrarModalFactTemporal:focus {
            background: #F9DDBD;
            border-color: #E5B47A;
            color: #8A4A0B;
        }

/* Celular: los botones bajan debajo del cliente y ocupan el ancho */
@media (max-width: 767px) {
    html:not(#extr-page) .sff-bor-modal .sff-bor-acciones {
        white-space: normal;
    }

    html:not(#extr-page) .sff-bor-modal .sff-bor-btn {
        margin: 3px 0 3px 6px;
    }
}

/* Borradores en modo oscuro */
html.sff-oscuro:not(#extr-page) .sff-bor-modal .modal-header {
    background: #1E2F38 !important;
}

html.sff-oscuro:not(#extr-page) .sff-bor-modal .modal-header .modal-title,
html.sff-oscuro:not(#extr-page) .sff-bor-modal .modal-header .close,
html.sff-oscuro:not(#extr-page) .sff-bor-modal .sff-bor-cliente,
html.sff-oscuro:not(#extr-page) .sff-bor-modal .sff-bor-monto {
    color: var(--sff-o-texto) !important;
}

html.sff-oscuro:not(#extr-page) .sff-bor-modal .modal-header .modal-title small,
html.sff-oscuro:not(#extr-page) .sff-bor-modal .sff-bor-fecha,
html.sff-oscuro:not(#extr-page) .sff-bor-modal .sff-bor-fecha span,
html.sff-oscuro:not(#extr-page) .sff-bor-modal #datatable-factTemp > thead > tr > th {
    color: var(--sff-o-texto-2) !important;
}

html.sff-oscuro:not(#extr-page) .sff-bor-modal #datatable-factTemp > thead > tr > th {
    border-bottom-color: var(--sff-o-borde) !important;
}

html.sff-oscuro:not(#extr-page) .sff-bor-modal #datatable-factTemp > tbody > tr > td {
    border-bottom-color: var(--sff-o-fila-hover) !important;
}

html.sff-oscuro:not(#extr-page) .sff-bor-modal #datatable-factTemp > tbody > tr:hover > td {
    background: var(--sff-o-fila-alterna) !important;
}

html.sff-oscuro:not(#extr-page) .sff-bor-modal .sff-bor-reanudar {
    background: #2F7A99 !important;
    border-color: #2F7A99 !important;
    color: #fff !important;
}

html.sff-oscuro:not(#extr-page) .sff-bor-modal .sff-bor-descartar {
    background: transparent !important;
    border-color: #7A3A3A !important;
    color: #F08AA0 !important;
}

html.sff-oscuro:not(#extr-page) .sff-bor-modal .modal-footer {
    border-top-color: var(--sff-o-borde) !important;
}

html.sff-oscuro:not(#extr-page) .sff-bor-modal #cerrarModalFactTemporal {
    background: #3B2A18 !important;
    border-color: #7A5128 !important;
    color: #F4C08A !important;
}

/* Notificaciones de la base (v15.3): toastr de notificaciones.js con #toast-container.sff-noti.
   Estilo 2: fondo suave del color del tipo, ícono, título y botón Entendido del mismo tono; sólido (sin la opacidad de toastr).
   La distancia al borde superior la pone notificaciones.js (debajo del encabezado). Tipos: info 1, éxito 2, advertencia 3, error 4 */
html:not(#extr-page) #toast-container.sff-noti {
    left: 0;
    right: 0;
    width: 100%;
}

    html:not(#extr-page) #toast-container.sff-noti > div {
        width: calc(100% - 32px);
        max-width: 900px;
        margin: 0 auto 8px;
        padding: 12px 14px;
        border: 1px solid;
        border-radius: 8px;
        background-image: none !important;
        box-shadow: 0 6px 18px rgba(14, 61, 82, 0.16);
        opacity: 1;
        cursor: default;
    }

        html:not(#extr-page) #toast-container.sff-noti > div:hover {
            box-shadow: 0 6px 18px rgba(14, 61, 82, 0.16);
            opacity: 1;
            cursor: default;
        }

    html:not(#extr-page) #toast-container.sff-noti .sff-noti-cuerpo {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    html:not(#extr-page) #toast-container.sff-noti .sff-noti-icono {
        flex: 0 0 auto;
        font-size: 22px;
        line-height: 1;
    }

    html:not(#extr-page) #toast-container.sff-noti .sff-noti-texto {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 14px;
        line-height: 1.45;
    }

        html:not(#extr-page) #toast-container.sff-noti .sff-noti-texto strong {
            display: block;
            margin-bottom: 2px;
            font-size: 14px;
            font-weight: 700;
        }

    html:not(#extr-page) #toast-container.sff-noti .sff-noti-btn {
        flex: 0 0 auto;
        padding: 7px 14px;
        border: 0;
        border-radius: 6px;
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
    }

        html:not(#extr-page) #toast-container.sff-noti .sff-noti-btn:hover {
            filter: brightness(1.12);
        }

        html:not(#extr-page) #toast-container.sff-noti .sff-noti-btn:focus-visible {
            outline: 3px solid #94BE15;
            outline-offset: 2px;
        }

        html:not(#extr-page) #toast-container.sff-noti .sff-noti-btn[disabled] {
            opacity: .7;
            cursor: wait;
        }

    /* Colores por tipo */
    html:not(#extr-page) #toast-container.sff-noti > .toast-info {
        background-color: #E6F0F4;
        border-color: #B7D0DB;
        color: #0E3D52;
    }

        html:not(#extr-page) #toast-container.sff-noti > .toast-info .sff-noti-icono { color: #15475C; }
        html:not(#extr-page) #toast-container.sff-noti > .toast-info .sff-noti-btn { background: #15475C; }

    html:not(#extr-page) #toast-container.sff-noti > .toast-success {
        background-color: #EAF3DE;
        border-color: #C0DD97;
        color: #27500A;
    }

        html:not(#extr-page) #toast-container.sff-noti > .toast-success .sff-noti-icono { color: #3B6D11; }
        html:not(#extr-page) #toast-container.sff-noti > .toast-success .sff-noti-btn { background: #3B6D11; }

    html:not(#extr-page) #toast-container.sff-noti > .toast-warning {
        background-color: #FCEBD8;
        border-color: #F1C998;
        color: #6B3A08;
    }

        html:not(#extr-page) #toast-container.sff-noti > .toast-warning .sff-noti-texto strong { color: #8A4A0B; }
        html:not(#extr-page) #toast-container.sff-noti > .toast-warning .sff-noti-icono { color: #B36410; }
        html:not(#extr-page) #toast-container.sff-noti > .toast-warning .sff-noti-btn { background: #8A4A0B; }

    html:not(#extr-page) #toast-container.sff-noti > .toast-error {
        background-color: #FBEAEA;
        border-color: #F0B9B9;
        color: #791F1F;
    }

        html:not(#extr-page) #toast-container.sff-noti > .toast-error .sff-noti-icono { color: #A32D2D; }
        html:not(#extr-page) #toast-container.sff-noti > .toast-error .sff-noti-btn { background: #A32D2D; }

/* Celular: el botón baja debajo del texto y ocupa el ancho */
@media (max-width: 575px) {
    html:not(#extr-page) #toast-container.sff-noti > div {
        width: calc(100% - 16px);
    }

    html:not(#extr-page) #toast-container.sff-noti .sff-noti-cuerpo {
        flex-wrap: wrap;
    }

    html:not(#extr-page) #toast-container.sff-noti .sff-noti-texto {
        flex-basis: calc(100% - 34px);
    }

    html:not(#extr-page) #toast-container.sff-noti .sff-noti-btn {
        width: 100%;
    }
}

/* Notificaciones en modo oscuro */
html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > div,
html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > div:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-info {
    background-color: #1E3440;
    border-color: #2F5566;
    color: #D3E6EE;
}

    html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-info .sff-noti-icono { color: #7CC0DA; }
    html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-info .sff-noti-btn { background: #2F7A99; }

html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-success {
    background-color: #22331A;
    border-color: #3B5A22;
    color: #CFE3B5;
}

    html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-success .sff-noti-icono { color: #97C459; }
    html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-success .sff-noti-btn { background: #3B6D11; }

html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-warning {
    background-color: #3B2A18;
    border-color: #7A5128;
    color: #F4D6B0;
}

    html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-warning .sff-noti-texto strong { color: #F4C08A; }
    html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-warning .sff-noti-icono { color: #F4C08A; }
    html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-warning .sff-noti-btn { background: #9A5A12; }

html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-error {
    background-color: #3A1F22;
    border-color: #7A3A3A;
    color: #F5C6CF;
}

    html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-error .sff-noti-icono { color: #F08AA0; }
    html.sff-oscuro:not(#extr-page) #toast-container.sff-noti > .toast-error .sff-noti-btn { background: #A32D2D; }

/* Chip "Recurrente" de la lista de facturas en modo oscuro (v15.4) */
html.sff-oscuro:not(#extr-page) .sff-tabla-facturas .sff-chip-rec {
    background: #16404B;
    color: #9FD3DF;
}

/* Resumen y sección de los avisos en modo oscuro (v15.5): antes el resumen quedaba con fondo claro y texto claro */
html.sff-oscuro:not(#extr-page) .swal2-popup .sff-av-res {
    background: var(--sff-o-superficie-2);
    border-color: var(--sff-o-borde);
}

    html.sff-oscuro:not(#extr-page) .swal2-popup .sff-av-res span { color: var(--sff-o-texto-3); }

html.sff-oscuro:not(#extr-page) .swal2-popup .sff-av-sec {
    background: var(--sff-o-aviso-fondo);
    color: #F2B26B;
}
