/* Finanzas scoped dark-theme readability override v3.3.22 */

/* Speas proveedores provider modal and cards final v3.3.34 */
body.speas-app.module-proveedores-active #modal-proveedor .btn-close,
body.speas-app.module-proveedores-active #modal-acceso-b2b .btn-close,
body.speas-app.module-proveedores-active #modal-confirmar-proveedor .btn-close,
body.speas-app.module-proveedores-active #modal-copiar-datos .btn-close {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.speas-app.module-proveedores-active #modal-proveedor .btn-close i,
body.speas-app.module-proveedores-active #modal-acceso-b2b .btn-close i,
body.speas-app.module-proveedores-active #modal-confirmar-proveedor .btn-close i,
body.speas-app.module-proveedores-active #modal-copiar-datos .btn-close i {
    font-size: 22px !important;
    line-height: 1 !important;
}

body.speas-app.module-proveedores-active #tabla-proveedores-body td:nth-child(3) .status-badge {
    background: #e8fff8 !important;
    color: #057a6f !important;
    border: 1px solid #a9f1df !important;
    opacity: 1 !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}

body.speas-app.module-proveedores-active #module-content .table-module-container > .table-toolbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
}

body.speas-app.module-proveedores-active #module-content .table-module-container .filter-actions {
    display: flex !important;
    justify-content: flex-end !important;
}

body.speas-app.module-proveedores-active #module-content .table-module-container .btn-icon[title="Exportar Excel"] {
    min-width: 46px !important;
}

@media (min-width: 769px) {
    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr) 42px !important;
        align-items: center !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr > td:last-child {
        justify-self: end !important;
        width: 42px !important;
    }
}

@media (max-width: 768px) {
    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-toolbar {
        grid-template-columns: minmax(0, 1fr) 46px !important;
        gap: 8px !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container .filter-actions {
        width: 46px !important;
        min-width: 46px !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container .filter-actions .btn-icon {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .btn-close {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr {
        grid-template-columns: minmax(0, 1fr) 44px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr > td:last-child {
        grid-column: 2 !important;
        grid-row: 1 !important;
        align-self: start !important;
        justify-self: end !important;
        width: 44px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr > td:not(:last-child) {
        grid-column: 1 / -1 !important;
    }
}

/* Speas proveedores mobile/tablet final polish v3.3.33 */
@media (max-width: 768px) {
    html body.speas-app.module-proveedores-active #module-content .table-module-container {
        width: min(100%, 390px) !important;
        max-width: calc(100vw - 24px) !important;
        margin-inline: auto !important;
    }

    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-toolbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 42px 42px !important;
        gap: 8px !important;
        align-items: center !important;
    }

    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-toolbar .search-box,
    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-toolbar .search-box input {
        width: 100% !important;
        min-width: 0 !important;
    }

    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive {
        overflow: visible !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table,
    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody,
    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tr,
    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table thead {
        display: none !important;
    }

    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body {
        display: grid !important;
        gap: 12px !important;
    }

    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr {
        padding: 14px !important;
        border-radius: 18px !important;
        background: #ffffff !important;
        color: #172033 !important;
        border: 1px solid #dbe7f5 !important;
        box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07) !important;
        overflow: hidden !important;
    }

    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr > td {
        display: grid !important;
        grid-template-columns: 92px minmax(0, 1fr) !important;
        gap: 8px !important;
        align-items: center !important;
        padding: 8px 0 !important;
        border: 0 !important;
        border-bottom: 1px solid #edf3fb !important;
        background: transparent !important;
        color: #172033 !important;
        font-size: 12px !important;
        line-height: 1.25 !important;
        text-align: left !important;
        overflow: hidden !important;
    }

    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr > td,
    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr > td * {
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        white-space: normal !important;
    }

    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr > td:last-child {
        display: block !important;
        border-bottom: 0 !important;
    }

    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr > td::before {
        display: block !important;
        color: #64748b !important;
        font-size: 10px !important;
        font-weight: 900 !important;
        line-height: 1.2 !important;
        text-transform: uppercase !important;
    }

    html body.speas-app.module-proveedores-active #modal-proveedor tbody#lista-tel-erp tr,
    html body.speas-app.module-proveedores-active #modal-proveedor tbody#lista-correo-erp tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 44px !important;
        gap: 10px !important;
        align-items: start !important;
        padding: 12px !important;
        border-radius: 16px !important;
        background: #f8fbff !important;
        border: 1px solid #dbe7f5 !important;
    }

    html body.speas-app.module-proveedores-active #modal-proveedor tbody#lista-tel-erp tr > td,
    html body.speas-app.module-proveedores-active #modal-proveedor tbody#lista-correo-erp tr > td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    html body.speas-app.module-proveedores-active #modal-proveedor tbody#lista-tel-erp tr > td:last-child,
    html body.speas-app.module-proveedores-active #modal-proveedor tbody#lista-correo-erp tr > td:last-child {
        grid-column: 2 !important;
        grid-row: 1 !important;
        justify-self: end !important;
    }

    html body.speas-app.module-proveedores-active #modal-proveedor tbody#lista-tel-erp .erp-principal-cell,
    html body.speas-app.module-proveedores-active #modal-proveedor tbody#lista-correo-erp .erp-principal-cell {
        grid-column: 1 / -1 !important;
    }

    html body.speas-app.module-proveedores-active #modal-proveedor .erp-principal-check {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        min-height: 42px !important;
        padding: 9px 12px !important;
        border-radius: 12px !important;
        border: 1px solid #d2dfef !important;
        background: #ffffff !important;
        color: #334155 !important;
        font-size: 12px !important;
        font-weight: 800 !important;
    }

    html body.speas-app.module-proveedores-active #modal-proveedor .erp-principal-check input[type="checkbox"] {
        order: 2 !important;
        width: 20px !important;
        height: 20px !important;
        margin: 0 !important;
        accent-color: #2563eb !important;
    }
}

@media (min-width: 769px) and (max-width: 1180px) {
    html body.speas-app.module-proveedores-active #modal-proveedor tbody#lista-tel-erp tr {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) 130px 42px !important;
        gap: 12px !important;
        align-items: center !important;
    }

    html body.speas-app.module-proveedores-active #modal-proveedor tbody#lista-correo-erp tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) 130px 42px !important;
        gap: 12px !important;
        align-items: center !important;
    }

    html body.speas-app.module-proveedores-active #modal-proveedor .erp-principal-check {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
        min-height: 40px !important;
        padding: 8px 10px !important;
        border-radius: 12px !important;
        border: 1px solid #d2dfef !important;
        background: #ffffff !important;
        color: #334155 !important;
        font-size: 12px !important;
        font-weight: 800 !important;
    }
}

/* Themed notifications final priority v3.3.24 */
body.speas-app .mini-notif,
body.speas-app .toast {
    border: 1px solid var(--speas-border, #d8e1ee) !important;
    border-left-width: 5px !important;
    background: var(--speas-surface, #ffffff) !important;
    color: var(--speas-text, #111827) !important;
    border-radius: 12px !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16) !important;
}

body.speas-app .mini-notif.success,
body.speas-app .toast.success {
    border-left-color: var(--speas-toast-success, #16a34a) !important;
    background: linear-gradient(135deg, var(--speas-toast-success-soft, #ecfdf5), var(--speas-surface, #ffffff)) !important;
}

body.speas-app .mini-notif.warning,
body.speas-app .toast.warning {
    border-left-color: var(--speas-toast-warning, #d97706) !important;
    background: linear-gradient(135deg, var(--speas-toast-warning-soft, #fffbeb), var(--speas-surface, #ffffff)) !important;
}

body.speas-app .mini-notif.error,
body.speas-app .toast.error {
    border-left-color: var(--speas-toast-error, #dc2626) !important;
    background: linear-gradient(135deg, var(--speas-toast-error-soft, #fef2f2), var(--speas-surface, #ffffff)) !important;
}

body.speas-app .mini-notif.info,
body.speas-app .toast.info {
    border-left-color: var(--speas-toast-info, #2563eb) !important;
    background: linear-gradient(135deg, var(--speas-toast-info-soft, #eff6ff), var(--speas-surface, #ffffff)) !important;
}

/* Themed notifications and toasts v3.3.24 */
body.speas-app {
    --speas-toast-success: #16a34a;
    --speas-toast-success-soft: #ecfdf5;
    --speas-toast-warning: #d97706;
    --speas-toast-warning-soft: #fffbeb;
    --speas-toast-error: #dc2626;
    --speas-toast-error-soft: #fef2f2;
    --speas-toast-info: #2563eb;
    --speas-toast-info-soft: #eff6ff;
}

body.speas-app .mini-notif,
body.speas-app .toast {
    border: 1px solid var(--speas-border, #d8e1ee) !important;
    border-left: 5px solid var(--speas-toast-info) !important;
    background: var(--speas-surface, #ffffff) !important;
    color: var(--speas-text, #111827) !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16) !important;
}

body.speas-app .mini-notif {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    min-height: 62px;
    min-width: 220px;
    max-width: min(360px, calc(100vw - 32px));
    padding: 14px 18px;
    border-radius: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: speasToastIn 0.25s ease forwards;
}

body.speas-app .mini-notif.is-leaving {
    animation: speasToastOut 0.25s ease forwards;
}

body.speas-app .mini-notif i {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px !important;
    flex: 0 0 auto;
}

body.speas-app .toast-title {
    color: var(--speas-text, #111827) !important;
}

body.speas-app .toast-msg {
    color: var(--speas-muted, #64748b) !important;
}

body.speas-app .mini-notif.success,
body.speas-app .toast.success {
    border-left-color: var(--speas-toast-success) !important;
    background: linear-gradient(135deg, var(--speas-toast-success-soft), var(--speas-surface, #ffffff)) !important;
}

body.speas-app .mini-notif.warning,
body.speas-app .toast.warning {
    border-left-color: var(--speas-toast-warning) !important;
    background: linear-gradient(135deg, var(--speas-toast-warning-soft), var(--speas-surface, #ffffff)) !important;
}

body.speas-app .mini-notif.error,
body.speas-app .toast.error {
    border-left-color: var(--speas-toast-error) !important;
    background: linear-gradient(135deg, var(--speas-toast-error-soft), var(--speas-surface, #ffffff)) !important;
}

body.speas-app .mini-notif.info,
body.speas-app .toast.info {
    border-left-color: var(--speas-toast-info) !important;
    background: linear-gradient(135deg, var(--speas-toast-info-soft), var(--speas-surface, #ffffff)) !important;
}

body.speas-app .mini-notif.success i,
body.speas-app .toast.success i {
    color: var(--speas-toast-success) !important;
    background: var(--speas-toast-success-soft);
}

body.speas-app .mini-notif.warning i,
body.speas-app .toast.warning i {
    color: var(--speas-toast-warning) !important;
    background: var(--speas-toast-warning-soft);
}

body.speas-app .mini-notif.error i,
body.speas-app .toast.error i {
    color: var(--speas-toast-error) !important;
    background: var(--speas-toast-error-soft);
}

body.speas-app .mini-notif.info i,
body.speas-app .toast.info i {
    color: var(--speas-toast-info) !important;
    background: var(--speas-toast-info-soft);
}

@keyframes speasToastIn {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes speasToastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(110%); opacity: 0; }
}

@media (max-width: 640px) {
    body.speas-app .mini-notif,
    body.speas-app #toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }

    body.speas-app .mini-notif,
    body.speas-app .toast {
        width: auto;
        min-width: 0;
    }
}

/* Ubicacion: frontend/css/speas-ui.css */

:root {
    --speas-bg: #eceff3;
    --speas-surface: #ffffff;
    --speas-surface-2: #f6f7f9;
    --speas-elevated: #ffffff;
    --speas-sidebar: #f8f9fb;
    --speas-sidebar-2: #ffffff;
    --speas-text: #14171d;
    --speas-muted: #6c7280;
    --speas-border: #d9dee7;
    --speas-border-strong: #bbc2ce;
    --speas-accent: #161a22;
    --speas-accent-2: #5d6673;
    --speas-danger: #dc2626;
    --speas-success: #16a34a;
    --speas-warning: #d97706;
    --speas-radius: 14px;
    --speas-radius-sm: 10px;
    --speas-shadow: 0 14px 40px rgba(15, 23, 42, 0.10);
    --speas-shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.08);
    --speas-input-h: 38px;
    --speas-topbar-h: 58px;
    --speas-font: Inter, "Segoe UI", Arial, sans-serif;
}

* {
    letter-spacing: 0;
}

body.speas-app {
    background:
        radial-gradient(circle at 24% 12%, rgba(255, 255, 255, 0.88), transparent 30%),
        linear-gradient(180deg, var(--speas-bg), color-mix(in srgb, var(--speas-bg) 88%, var(--speas-surface-2)));
    color: var(--speas-text);
    font-family: var(--speas-font);
}

body.speas-app .home,
body.speas-app .contenedor-modulo {
    background: var(--speas-bg);
    color: var(--speas-text);
}

body.speas-app .home {
    padding: 16px 22px 22px;
    overflow-y: auto;
    transition: left 0.22s ease, width 0.22s ease, background-color 0.18s ease, color 0.18s ease;
}

body.speas-app .header-text {
    min-height: var(--speas-topbar-h);
    margin-bottom: 12px;
    padding: 0 12px 0 16px;
    border: 1px solid color-mix(in srgb, var(--speas-border) 82%, transparent);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(18px);
}

body.speas-app .home .text,
body.speas-app #titulo-modulo {
    color: var(--speas-text);
    font-size: 22px;
    font-weight: 700;
}

body.speas-app .sidebar {
    background:
        radial-gradient(circle at 34% 0%, rgba(255, 255, 255, 0.95), transparent 32%),
        linear-gradient(180deg, var(--speas-sidebar-2) 0%, var(--speas-sidebar) 100%);
    box-shadow: 10px 0 34px rgba(17, 24, 39, 0.08);
    border-right: 1px solid rgba(17, 24, 39, 0.08);
    padding-top: 14px;
    transition: left 0.22s ease, width 0.22s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
    body.speas-app .home,
    body.speas-app .sidebar {
        transition: none !important;
    }
}

body.speas-app .sidebar header {
    margin-bottom: 14px;
    padding: 0 12px 0 10px;
}

body.speas-app .sidebar .image-text {
    min-height: 54px;
}

body.speas-app .bottom-content {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.025), transparent);
    border-top-color: rgba(17, 24, 39, 0.08);
    padding-top: 12px;
}

body.speas-app .sidebar li {
    height: 48px;
    margin-top: 5px;
    padding: 0 10px;
}

body.speas-app .sidebar li a {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

body.speas-app .sidebar li a::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.035));
    transition: opacity 0.22s ease;
}

body.speas-app .sidebar li a:hover,
body.speas-app .sidebar li.active a {
    background: #151922;
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.14);
}

body.speas-app .sidebar li a:hover::before,
body.speas-app .sidebar li.active a::before {
    opacity: 1;
}

body.speas-app .sidebar li a:hover .icon,
body.speas-app .sidebar li a:hover .text,
body.speas-app .sidebar li.active .icon,
body.speas-app .sidebar li.active .text {
    color: #ffffff;
}

body.speas-app .sidebar li .icon,
body.speas-app .sidebar li .text {
    color: #626975;
}

body.speas-app .sidebar .text {
    position: relative;
    z-index: 1;
    font-size: 14px;
    font-weight: 680;
}

body.speas-app .sidebar li .icon {
    position: relative;
    z-index: 1;
    font-size: 21px;
    transition: transform 0.22s ease, color 0.22s ease;
}

body.speas-app .sidebar li a:hover .icon,
body.speas-app .sidebar li.active .icon {
    transform: translateX(2px) scale(1.04);
}

body.speas-app .sidebar .image .logo-icon,
body.speas-app .sidebar .toggle {
    color: var(--speas-accent-2);
}

body.speas-app .sidebar .image .logo-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #151922;
    box-shadow: 0 14px 24px rgba(17, 24, 39, 0.18);
    color: #ffffff;
    font-size: 30px;
}

body.speas-app .image-text .name {
    font-size: 20px;
    font-weight: 820;
    letter-spacing: 0;
    color: #151922;
}

body.speas-app .image-text .profession {
    color: #7a828e;
    font-size: 12px;
}

body.speas-app .sidebar .toggle {
    background: #151922;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
}

body.speas-app .profile-card,
body.speas-app .logout-box {
    border-radius: 14px;
}

body.speas-app .profile-card {
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
}

body.speas-app .profile-card:hover {
    background: #f1f3f6;
}

body.speas-app .logout-box:hover {
    background: rgba(17, 24, 39, 0.06);
}

body.speas-app .profile-info .name {
    color: #151922;
}

body.speas-app .profile-info .role,
body.speas-app .logout-box .icon,
body.speas-app .logout-box .text {
    color: #626975;
}

.speas-top-search {
    width: min(340px, 28vw);
    height: 38px;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    border: 1px solid var(--speas-border);
    border-radius: 12px;
    background: var(--speas-surface-2);
    color: var(--speas-muted);
}

.speas-top-search i {
    font-size: 18px;
}

.speas-top-search input {
    width: 100%;
    min-height: 0;
    height: 32px;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--speas-text);
    font-size: 13px;
}

.speas-top-search input:focus {
    box-shadow: none;
}

.speas-top-search span {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 7px;
    background: #ffffff;
    border: 1px solid var(--speas-border);
    color: #8a919d;
    font-size: 11px;
    font-weight: 700;
}

.speas-top-search + .speas-shell-actions {
    margin-left: 0;
}

.speas-shell-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.speas-theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 34px;
    padding: 3px;
    border: 1px solid var(--speas-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--speas-surface) 86%, transparent);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
}

.speas-theme-btn {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--speas-muted);
    background: transparent;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.speas-theme-btn:hover {
    transform: translateY(-1px);
    color: var(--speas-text);
}

.speas-theme-btn.active {
    color: #ffffff;
    background: var(--speas-accent);
}

body.speas-app .contenedor-modulo {
    padding: 0;
}

body.speas-app .mobile-toggle {
    color: var(--speas-text);
}

body.speas-app .contenedor-modulo > h1,
body.speas-app .contenedor-modulo > p {
    margin-left: 2px;
}

body.speas-app .module-header,
body.speas-app .page-header,
body.speas-app .header-section,
body.speas-app .card,
body.speas-app .kpi-card,
body.speas-app .panel,
body.speas-app .table-container,
body.speas-app .filters-card,
body.speas-app .summary-card,
body.speas-app .analytics-container,
body.speas-app .facturas-container,
body.speas-app .inventory-container,
body.speas-app .crm-container {
    background: var(--speas-surface);
    color: var(--speas-text);
    border-color: var(--speas-border);
    border-radius: var(--speas-radius);
    box-shadow: var(--speas-shadow-sm);
}

body.speas-app table {
    border-collapse: collapse;
    color: var(--speas-text);
}

body.speas-app th {
    background: var(--speas-surface-2);
    color: var(--speas-muted);
    font-size: 12px;
    font-weight: 700;
    height: 42px;
}

body.speas-app td {
    color: var(--speas-text);
    font-size: 13px;
    border-color: var(--speas-border);
}

body.speas-app input,
body.speas-app select,
body.speas-app textarea {
    min-height: var(--speas-input-h);
    border-radius: var(--speas-radius-sm);
    border-color: var(--speas-border);
    background: var(--speas-surface);
    color: var(--speas-text);
}

body.speas-app input:focus,
body.speas-app select:focus,
body.speas-app textarea:focus {
    outline: none;
    border-color: var(--speas-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--speas-accent) 18%, transparent);
}

body.speas-app button,
body.speas-app .btn,
body.speas-app .btn-primary,
body.speas-app .btn-secondary {
    border-radius: var(--speas-radius-sm);
}

.speas-module-enter {
    animation: speasModuleIn 0.26s ease both;
}

@keyframes speasModuleIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.speas-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 14, 18, 0.56);
    backdrop-filter: blur(12px);
}

.speas-loader-overlay.active {
    display: flex;
}

.speas-loader-panel {
    width: min(360px, calc(100vw - 36px));
    min-height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(25, 29, 38, 0.92), rgba(12, 14, 18, 0.92));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    position: relative;
    overflow: hidden;
    color: #ffffff;
    display: grid;
    grid-template-rows: 210px auto;
}

.speas-loader-canvas {
    width: 100%;
    height: 210px;
    position: relative;
}

.speas-loader-canvas canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.speas-loader-fallback {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.9), transparent 33%),
        conic-gradient(from 0deg, transparent, #60a5fa, #14b8a6, transparent);
    filter: drop-shadow(0 0 30px rgba(20, 184, 166, 0.34));
    animation: speasOrbSpin 1.2s linear infinite;
    position: absolute;
    top: 62px;
    left: calc(50% - 42px);
}

@keyframes speasOrbSpin {
    to { transform: rotate(360deg); }
}

.speas-loader-copy {
    padding: 0 28px 28px;
    text-align: center;
}

.speas-loader-title {
    font-size: 18px;
    font-weight: 750;
    margin-bottom: 6px;
}

.speas-loader-message {
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    line-height: 1.45;
}

body.speas-login {
    background: var(--speas-bg);
    color: var(--speas-text);
}

.speas-login .login-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 251, 0.98)),
        var(--speas-surface);
}

.speas-login .visual-panel {
    background: transparent;
    isolation: isolate;
    padding-left: clamp(56px, 6vw, 100px);
    padding-right: clamp(48px, 5vw, 90px);
    color: #ffffff;
}

.speas-login #login-visual-3d {
    display: none;
}

.speas-login .dynamic-bg {
    /* Gradient controlled by login.css */
    animation: gradientFlow 18s ease infinite;
}

.speas-login .visual-overlay {
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 30px 30px;
}

.speas-login .visual-panel::before,
.speas-login .visual-panel::after {
    display: none;
}

@keyframes speasAurora {
    from { background-position: 0% 28%; }
    to { background-position: 100% 72%; }
}

.speas-login .brand-container {
    z-index: 8;
}

.speas-login .brand-logo,
.speas-login .brand-logo i {
    color: #151922;
}

.speas-login .brand-message {
    max-width: min(58vw, 720px);
    padding-bottom: 18px;
}

.speas-login .brand-message h2 {
    max-width: 660px;
    font-size: clamp(34px, 2.8vw, 46px);
    line-height: 1.12;
    color: #151922;
    text-shadow: none;
}

.speas-login .brand-message p {
    max-width: 590px;
    color: #5f6876;
}

.speas-login .login-signal-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.speas-login .login-signal-grid span {
    min-width: 102px;
    padding: 9px 13px;
    border: 1px solid rgba(17, 24, 39, 0.10);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    color: #4b5563;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0;
    backdrop-filter: blur(12px);
}

.speas-login .system-status {
    max-width: 500px;
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(17, 24, 39, 0.12);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.10);
}

.speas-login .status-indicator,
.speas-login .server-info p {
    color: #151922;
}

.speas-login .server-info p {
    opacity: 0.72;
}

.speas-login .login-content {
    max-width: 420px;
}

.speas-login .login-header {
    margin-bottom: 28px;
}

.speas-login .login-header h3 {
    font-size: 30px;
    letter-spacing: 0;
}

.speas-login .input-box input {
    height: 44px;
    border-radius: 8px;
}

.speas-login .btn-corporate {
    height: 44px;
    border-radius: 8px;
    background: #151922;
}

.speas-login .btn-corporate:hover {
    background: #000000;
}

@media (max-width: 768px) {
    .speas-top-search {
        display: none;
    }

    .speas-login #login-visual-3d,
    .speas-login .login-signal-grid {
        display: none;
    }

    body.speas-app .home {
        padding: 14px;
    }

    .speas-shell-actions {
        gap: 6px;
    }

    .speas-theme-switch {
        height: 32px;
    }
}

/* Speas enterprise redesign v4 */
:root {
    --speas-bg: #f3f5f8;
    --speas-surface: #ffffff;
    --speas-surface-2: #f7f9fb;
    --speas-elevated: #ffffff;
    --speas-sidebar: #ffffff;
    --speas-sidebar-2: #f8fafc;
    --speas-text: #111827;
    --speas-muted: #667085;
    --speas-border: #dce3ec;
    --speas-border-strong: #b9c3d0;
    --speas-accent: #0f766e;
    --speas-accent-2: #2563eb;
    --speas-danger: #dc2626;
    --speas-success: #059669;
    --speas-warning: #b45309;
    --speas-radius: 8px;
    --speas-radius-sm: 6px;
    --speas-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
    --speas-shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.07);
    --speas-input-h: 34px;
    --speas-topbar-h: 52px;
}

html {
    font-size: 14px;
}

body.speas-app {
    background: var(--speas-bg);
}

body.speas-app .home {
    padding: 12px 16px 16px;
}

body.speas-app .header-text {
    min-height: var(--speas-topbar-h);
    border-radius: var(--speas-radius);
    background: color-mix(in srgb, var(--speas-surface) 94%, transparent);
    box-shadow: var(--speas-shadow-sm);
}

body.speas-app #titulo-modulo,
body.speas-app .home .text {
    font-size: 18px;
    font-weight: 760;
}

body.speas-app .sidebar {
    background: linear-gradient(180deg, var(--speas-sidebar-2), var(--speas-sidebar));
    border-right: 1px solid var(--speas-border);
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.06);
}

body.speas-app .sidebar li {
    height: 42px;
    margin-top: 4px;
}

body.speas-app .sidebar li a {
    border-radius: var(--speas-radius-sm);
}

body.speas-app .sidebar li .text {
    font-size: 13px;
    font-weight: 680;
}

body.speas-app .sidebar li .icon {
    font-size: 19px;
}

body.speas-app .sidebar li a:hover,
body.speas-app .sidebar li.active a {
    background: #111827;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.13);
}

.speas-logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #111827;
    color: #ffffff;
    font-size: 18px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.18);
    position: relative;
    overflow: hidden;
}

.speas-logo-mark::after {
    content: "";
    position: absolute;
    left: 7px;
    right: 7px;
    top: 8px;
    height: 3px;
    border-radius: 999px;
    background: var(--speas-accent);
}

body.speas-app .sidebar .image .logo-icon {
    background: #111827;
    color: #ffffff;
    font-family: var(--speas-font);
    font-size: 18px;
}

body.speas-app .image-text .name {
    color: var(--speas-text);
    font-size: 18px;
    text-transform: none;
}

body.speas-app .image-text .profession {
    color: var(--speas-muted);
    font-size: 11px;
}

body.speas-app .sidebar .toggle {
    width: 24px;
    height: 24px;
    background: var(--speas-accent);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--speas-accent) 28%, transparent);
}

.speas-top-search {
    height: 34px;
    border-radius: var(--speas-radius-sm);
}

.speas-top-search span {
    border-radius: 5px;
    background: var(--speas-surface);
    color: var(--speas-muted);
}

.speas-theme-switch {
    height: 32px;
    border-radius: var(--speas-radius-sm);
}

.speas-theme-btn {
    width: 26px;
    height: 26px;
    border-radius: 5px;
}

.speas-theme-btn.active {
    background: var(--speas-accent);
}

body.speas-app .contenedor-modulo {
    padding: 0;
}

body.speas-app .contenedor-modulo h1,
body.speas-app .contenedor-modulo h2,
body.speas-app .contenedor-modulo h3 {
    color: var(--speas-text);
    letter-spacing: 0;
}

body.speas-app .contenedor-modulo h1 {
    font-size: 22px;
}

body.speas-app .contenedor-modulo h2 {
    font-size: 18px;
}

body.speas-app .contenedor-modulo h3 {
    font-size: 15px;
}

body.speas-app .module-header,
body.speas-app .page-header,
body.speas-app .header-section,
body.speas-app .card,
body.speas-app .kpi-card,
body.speas-app .panel,
body.speas-app .table-container,
body.speas-app .filters-card,
body.speas-app .summary-card,
body.speas-app .analytics-container,
body.speas-app .facturas-container,
body.speas-app .inventory-container,
body.speas-app .crm-container,
body.speas-app .modal-content,
body.speas-app .modal-box,
body.speas-app .form-container,
body.speas-app .section-card {
    border-radius: var(--speas-radius);
    border: 1px solid var(--speas-border);
    background: var(--speas-surface);
    box-shadow: var(--speas-shadow-sm);
}

body.speas-app table {
    width: 100%;
    background: var(--speas-surface);
}

body.speas-app th {
    height: 36px;
    padding: 8px 10px;
    background: var(--speas-surface-2);
    color: var(--speas-muted);
    border-color: var(--speas-border);
    font-size: 11px;
    text-transform: uppercase;
}

body.speas-app td {
    padding: 8px 10px;
    font-size: 12.5px;
}

body.speas-app tbody tr {
    transition: background 0.16s ease, transform 0.16s ease;
}

body.speas-app tbody tr:hover {
    background: color-mix(in srgb, var(--speas-accent) 7%, var(--speas-surface));
}

body.speas-app input,
body.speas-app select,
body.speas-app textarea {
    min-height: var(--speas-input-h);
    border-radius: var(--speas-radius-sm);
    border: 1px solid var(--speas-border);
    background: var(--speas-surface);
    color: var(--speas-text);
    font-size: 13px;
}

body.speas-app textarea {
    min-height: 82px;
}

body.speas-app button,
body.speas-app .btn,
body.speas-app .btn-primary,
body.speas-app .btn-secondary,
body.speas-app .action-btn {
    min-height: 32px;
    border-radius: var(--speas-radius-sm);
    font-size: 12.5px;
    font-weight: 700;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

body.speas-app button:hover,
body.speas-app .btn:hover,
body.speas-app .action-btn:hover {
    transform: translateY(-1px);
}

body.speas-app .btn-primary,
body.speas-app button[type="submit"] {
    background: var(--speas-accent);
    border-color: var(--speas-accent);
    color: #ffffff;
}

body.speas-app .badge,
body.speas-app .status-badge,
body.speas-app .tag,
body.speas-app .chip {
    border-radius: 5px;
    font-weight: 750;
    letter-spacing: 0;
}

body.speas-app [style*="#6366f1"],
body.speas-app [style*="#4f46e5"],
body.speas-app [style*="#695CFE"],
body.speas-app [style*="#695cfe"] {
    border-color: var(--speas-accent) !important;
}

body.speas-app [style*="color:#6366f1"],
body.speas-app [style*="color: #6366f1"],
body.speas-app [style*="color:#695CFE"],
body.speas-app [style*="color: #695CFE"],
body.speas-app [style*="color:#695cfe"],
body.speas-app [style*="color: #695cfe"],
body.speas-app [style*="color:#4f46e5"],
body.speas-app [style*="color: #4f46e5"] {
    color: var(--speas-accent) !important;
}

body.speas-app [style*="background:#6366f1"],
body.speas-app [style*="background: #6366f1"],
body.speas-app [style*="background:#695CFE"],
body.speas-app [style*="background: #695CFE"],
body.speas-app [style*="background:#695cfe"],
body.speas-app [style*="background: #695cfe"],
body.speas-app [style*="background:#4f46e5"],
body.speas-app [style*="background: #4f46e5"] {
    background: var(--speas-accent) !important;
    color: #ffffff !important;
}

.speas-loader-overlay {
    background: color-mix(in srgb, var(--speas-bg) 62%, rgba(17, 24, 39, 0.42));
}

.speas-loader-panel {
    width: min(340px, calc(100vw - 32px));
    min-height: auto;
    grid-template-rows: none;
    gap: 14px;
    padding: 22px;
    border-radius: 10px;
    border: 1px solid var(--speas-border);
    background: var(--speas-surface);
    color: var(--speas-text);
    box-shadow: var(--speas-shadow);
}

.speas-loader-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.speas-loader-bars {
    flex: 1;
    display: grid;
    gap: 6px;
}

.speas-loader-bars span,
.speas-loader-skeleton span {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--speas-surface-2), color-mix(in srgb, var(--speas-accent) 16%, var(--speas-surface-2)), var(--speas-surface-2));
    background-size: 220% 100%;
    animation: speasShimmer 1.15s ease-in-out infinite;
}

.speas-loader-bars span:nth-child(1) { width: 86%; }
.speas-loader-bars span:nth-child(2) { width: 64%; animation-delay: 0.1s; }
.speas-loader-bars span:nth-child(3) { width: 76%; animation-delay: 0.18s; }

.speas-loader-track {
    height: 3px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--speas-surface-2);
}

.speas-loader-track span {
    display: block;
    width: 44%;
    height: 100%;
    border-radius: inherit;
    background: var(--speas-accent);
    animation: speasProgress 1.05s ease-in-out infinite;
}

.speas-loader-skeleton {
    display: grid;
    gap: 8px;
    margin-top: 2px;
}

.speas-loader-skeleton span:nth-child(1) { width: 92%; }
.speas-loader-skeleton span:nth-child(2) { width: 70%; animation-delay: 0.12s; }
.speas-loader-skeleton span:nth-child(3) { width: 82%; animation-delay: 0.22s; }

.speas-loader-copy {
    padding: 0;
    text-align: left;
}

.speas-loader-title {
    color: var(--speas-text);
    font-size: 14px;
}

.speas-loader-message {
    color: var(--speas-muted);
    font-size: 12px;
}

.speas-loader-canvas,
.speas-loader-fallback {
    display: none;
}

@keyframes speasShimmer {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}

@keyframes speasProgress {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(240%); }
}

body.speas-login .enterprise-layout {
    background: var(--speas-bg);
}

body.speas-login .visual-panel {
    flex: 1.05;
    background: transparent;
    color: #ffffff;
    padding: clamp(32px, 5vw, 72px);
}

body.speas-login .dynamic-bg {
    /* Let login.css control the gradient */
    animation: gradientFlow 18s ease infinite;
}

body.speas-login .visual-overlay {
    background-image:
        radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 30px 30px;
}

body.speas-login .visual-panel::before,
body.speas-login .visual-panel::after {
    display: none;
}

body.speas-login .brand-logo {
    color: #ffffff;
    font-size: 22px;
    letter-spacing: 0;
    text-transform: none;
}

body.speas-login .brand-message h2 {
    font-size: clamp(28px, 3.2vw, 46px);
    letter-spacing: -0.5px;
    max-width: 600px;
    color: #ffffff;
}

body.speas-login .brand-message p {
    font-size: 16px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.75);
}

body.speas-login .login-panel {
    background: var(--speas-surface);
}

body.speas-login .login-content {
    max-width: 390px;
}

body.speas-login .login-header h3 {
    font-size: 25px;
}

body.speas-login .form-group {
    margin-bottom: 18px;
}

body.speas-login .input-box input {
    height: 42px;
    border-radius: var(--speas-radius-sm);
}

body.speas-login .btn-corporate {
    height: 42px;
    background: #111827;
    border-radius: var(--speas-radius-sm);
}

body.speas-login .btn-corporate:hover {
    background: var(--speas-accent);
}

body.speas-login .loader {
    width: 18px;
    height: 3px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.35);
    position: relative;
    overflow: hidden;
    animation: none;
}

body.speas-login .loader::after {
    content: "";
    display: block;
    width: 42%;
    height: 100%;
    background: #ffffff;
    border-radius: inherit;
    animation: speasProgress 0.9s ease-in-out infinite;
}

body.speas-login .security-notice {
    border-radius: var(--speas-radius);
}

@media (max-width: 1100px) {
    body.speas-login .enterprise-layout {
        min-height: 100vh;
        overflow-y: auto;
    }

    body.speas-login .visual-panel {
        min-height: 210px;
        height: auto;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    body.speas-app .home {
        padding: 10px;
    }

    body.speas-app .header-text {
        padding: 0 8px;
    }

    body.speas-app #titulo-modulo {
        font-size: 16px;
    }
}

/* Speas visual polish v5 */
:root {
    --speas-bg: #eef2f6;
    --speas-surface: #ffffff;
    --speas-surface-2: #f8fafc;
    --speas-elevated: #ffffff;
    --speas-sidebar: #ffffff;
    --speas-sidebar-2: #f9fbfd;
    --speas-text: #0f172a;
    --speas-muted: #64748b;
    --speas-border: #d8e0ea;
    --speas-border-strong: #afbccb;
    --speas-accent: #0f766e;
    --speas-accent-2: #1d4ed8;
    --speas-accent-soft: #e6f7f4;
    --speas-danger: #dc2626;
    --speas-success: #059669;
    --speas-warning: #b45309;
    --speas-radius: 10px;
    --speas-radius-sm: 7px;
    --speas-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
    --speas-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --speas-input-h: 36px;
    --speas-topbar-h: 54px;
}

body.speas-app {
    background:
        linear-gradient(180deg, var(--speas-bg), color-mix(in srgb, var(--speas-bg) 82%, #ffffff));
    font-size: 13px;
}

body.speas-app .home {
    padding: 12px 16px 16px;
}

body.speas-app .header-text {
    min-height: var(--speas-topbar-h);
    padding: 0 10px 0 14px;
    border-radius: var(--speas-radius);
    border: 1px solid var(--speas-border);
    background: color-mix(in srgb, var(--speas-surface) 96%, transparent);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

body.speas-app #titulo-modulo,
body.speas-app .home .text {
    font-size: 17px;
    font-weight: 800;
}

body.speas-app .sidebar {
    background: linear-gradient(180deg, var(--speas-sidebar-2), var(--speas-sidebar));
    border-right: 1px solid var(--speas-border);
    box-shadow: 8px 0 30px rgba(15, 23, 42, 0.08);
}

body.speas-app .sidebar li {
    height: 40px;
    margin-top: 3px;
    padding: 0 9px;
}

body.speas-app .sidebar li a {
    border-radius: 8px;
}

body.speas-app .sidebar li .icon {
    font-size: 18px;
}

body.speas-app .sidebar.close:not(:hover):not(.mobile-active) .menu {
    padding: 0 12px 20px !important;
    scrollbar-width: none !important;
}

body.speas-app .sidebar.close:not(:hover):not(.mobile-active) li {
    padding: 0 !important;
    justify-content: center !important;
}

body.speas-app .sidebar.close:not(:hover):not(.mobile-active) li a {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    margin: 0 auto !important;
    justify-content: center !important;
}

body.speas-app .sidebar.close:not(:hover):not(.mobile-active) li .icon {
    width: 50px !important;
    min-width: 0 !important;
    flex: 0 0 50px !important;
}

body.speas-app .sidebar.close:not(:hover):not(.mobile-active) .menu::-webkit-scrollbar {
    width: 0 !important;
    display: none !important;
}

body.speas-app .sidebar.close:not(:hover):not(.mobile-active) li .text {
    display: none !important;
}

body.speas-app .sidebar li .text {
    font-size: 12.8px;
    font-weight: 720;
}

body.speas-app .sidebar li a:hover,
body.speas-app .sidebar li.active a {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.speas-logo-mark {
    background: linear-gradient(145deg, #0f172a, #172033);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.speas-logo-mark::after {
    background: #5eead4;
}

body.speas-app .profile-card {
    border-radius: 12px;
    background: var(--speas-surface);
    border: 1px solid var(--speas-border);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.speas-top-search {
    width: min(360px, 30vw);
    height: 34px;
    border-radius: 8px;
    background: var(--speas-surface-2);
}

.speas-theme-switch {
    border-radius: 8px;
    background: var(--speas-surface);
}

.speas-theme-btn {
    border-radius: 6px;
}

body.speas-app .module-header,
body.speas-app .page-header,
body.speas-app .header-section,
body.speas-app .card,
body.speas-app .kpi-card,
body.speas-app .panel,
body.speas-app .table-container,
body.speas-app .filters-card,
body.speas-app .summary-card,
body.speas-app .analytics-container,
body.speas-app .facturas-container,
body.speas-app .inventory-container,
body.speas-app .crm-container,
body.speas-app .modal-content,
body.speas-app .modal-box,
body.speas-app .form-container,
body.speas-app .section-card {
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

body.speas-app th {
    height: 34px;
    font-size: 11px;
}

body.speas-app td {
    padding: 7px 9px;
    font-size: 12.5px;
}

body.speas-app button,
body.speas-app .btn,
body.speas-app .btn-primary,
body.speas-app .btn-secondary,
body.speas-app .action-btn {
    min-height: 32px;
    border-radius: 7px;
}

body.speas-login .enterprise-layout {
    min-height: 100vh;
    background:
        linear-gradient(90deg, #f8fafc 0%, #eef2f6 52%, #ffffff 52%, #ffffff 100%);
}

body.speas-login .visual-panel {
    flex: 1.02;
    padding: clamp(38px, 5vw, 72px);
    background:
        linear-gradient(135deg, #f8fafc 0%, #eef4f8 100%);
    border-right: 1px solid #dce3ec;
}

body.speas-login .visual-overlay {
    opacity: 0.55;
    background-image:
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(180deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
    background-size: 40px 40px;
}

body.speas-login .dynamic-bg {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.72), rgba(241,245,249,0.60)),
        linear-gradient(90deg, rgba(15,118,110,0.07), rgba(29,78,216,0.06));
}

body.speas-login .brand-logo {
    gap: 12px;
    font-size: 24px;
    font-weight: 850;
}

body.speas-login .brand-message {
    max-width: 680px;
}

body.speas-login .brand-message h2 {
    font-size: clamp(32px, 3.2vw, 50px);
    line-height: 1.04;
    max-width: 620px;
}

body.speas-login .brand-message p {
    max-width: 600px;
    color: #526071;
    font-size: 16px;
}

body.speas-login .login-signal-grid span {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

body.speas-login .system-status {
    border-radius: 10px;
}

body.speas-login .login-insights {
    width: min(640px, 88%);
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

body.speas-login .insight-card {
    position: relative;
    min-height: 74px;
    padding: 16px;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    overflow: hidden;
}

body.speas-login .insight-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: linear-gradient(90deg, #0f766e, #1d4ed8);
    opacity: 0.85;
}

body.speas-login .insight-main {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92));
    color: #ffffff;
}

body.speas-login .insight-main i {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(94, 234, 212, 0.14);
    color: #5eead4;
    font-size: 26px;
    animation: speasPulseSoft 2.4s ease-in-out infinite;
}

body.speas-login .insight-label,
body.speas-login .insight-card span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.speas-login .insight-main .insight-label {
    color: rgba(255, 255, 255, 0.66);
}

body.speas-login .insight-card strong {
    display: block;
    margin-top: 6px;
    color: inherit;
    font-size: 17px;
    font-weight: 900;
}

body.speas-login .insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

body.speas-login .insight-grid .insight-card {
    min-height: 116px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.speas-login .insight-grid i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e6f7f4;
    color: #0f766e;
    font-size: 22px;
}

body.speas-login .insight-flow {
    height: 74px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    align-items: end;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(203, 213, 225, 0.68);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.28));
}

body.speas-login .insight-flow span {
    display: block;
    border-radius: 999px 999px 6px 6px;
    background: linear-gradient(180deg, rgba(94, 234, 212, 0.95), rgba(15, 118, 110, 0.72));
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.14);
    animation: speasBarRise 3s ease-in-out infinite;
}

body.speas-login .insight-flow span:nth-child(1) {
    height: 32px;
}

body.speas-login .insight-flow span:nth-child(2) {
    height: 46px;
    animation-delay: 0.25s;
}

body.speas-login .insight-flow span:nth-child(3) {
    height: 58px;
    animation-delay: 0.5s;
}

@keyframes speasPulseSoft {
    0%, 100% { transform: scale(1); opacity: 0.92; }
    50% { transform: scale(1.06); opacity: 1; }
}

@keyframes speasBarRise {
    0%, 100% { transform: scaleY(0.86); transform-origin: bottom; }
    50% { transform: scaleY(1); transform-origin: bottom; }
}

body.speas-login .login-panel {
    flex: 0.92;
    background: #ffffff;
}

body.speas-login .login-content {
    max-width: 392px;
    padding: 28px;
    border: 1px solid #dce3ec;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

body.speas-login .login-header {
    margin-bottom: 24px;
    text-align: left;
}

body.speas-login .login-header h3 {
    font-size: 24px;
}

body.speas-login .input-box input {
    height: 42px;
    background: #f8fafc;
}

body.speas-login .btn-corporate {
    height: 42px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

body.speas-login .security-notice {
    margin-top: 22px;
}

@media (min-width: 1600px) {
    body.speas-app .home {
        max-width: 1780px;
        margin: 0 auto;
        width: 100%;
    }

    body.speas-login .login-content {
        max-width: 420px;
    }
}

@media (max-width: 1100px) {
    body.speas-login .enterprise-layout {
        background: #ffffff;
    }

    body.speas-login .visual-panel {
        border-right: 0;
        border-bottom: 1px solid #dce3ec;
        padding: 28px 24px;
    }

    body.speas-login .login-panel {
        padding: 30px 20px;
    }

    body.speas-login .login-insights {
        display: none;
    }
}

/* Speas desktop login composition v10 */
@media (min-width: 1101px) {
    body.speas-login .visual-panel {
        padding: clamp(34px, 4vw, 64px) clamp(56px, 5vw, 90px);
    }

    body.speas-login .brand-container {
        max-width: 760px;
        min-height: 100%;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: clamp(22px, 3vh, 34px);
        justify-content: stretch;
    }

    body.speas-login .brand-logo {
        align-self: start;
        margin-bottom: 0;
    }

    body.speas-login .brand-message {
        align-self: center;
        max-width: 760px;
        display: grid;
        gap: 18px;
    }

    body.speas-login .brand-message h2 {
        max-width: 650px;
        font-size: clamp(44px, 4.2vw, 62px);
        line-height: 1.02;
        margin: 0;
    }

    body.speas-login .brand-message p {
        max-width: 640px;
        margin: 0;
        font-size: clamp(15px, 1vw, 18px);
    }

    body.speas-login .login-signal-grid {
        width: min(420px, 100%);
        margin-top: 4px;
    }

    body.speas-login .login-insights {
        width: min(620px, 100%);
        margin-top: 8px;
        gap: 12px;
    }

    body.speas-login .insight-main {
        min-height: 76px;
        padding: 14px 16px;
        border-radius: 11px;
    }

    body.speas-login .insight-main i {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }

    body.speas-login .insight-grid {
        gap: 10px;
    }

    body.speas-login .insight-grid .insight-card {
        min-height: 104px;
        padding: 14px;
    }

    body.speas-login .insight-grid i {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }

    body.speas-login .insight-card strong {
        font-size: 16px;
    }

    body.speas-login .insight-flow {
        height: 54px;
        padding: 10px 12px;
        border-radius: 11px;
    }

    body.speas-login .insight-flow span:nth-child(1) {
        height: 22px;
    }

    body.speas-login .insight-flow span:nth-child(2) {
        height: 32px;
    }

    body.speas-login .insight-flow span:nth-child(3) {
        height: 40px;
    }

    body.speas-login .system-status {
        align-self: end;
        width: min(500px, 100%);
        max-width: none;
        margin-top: 0;
        min-height: 56px;
        padding: 12px 16px;
        border-radius: 12px;
        box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    }
}

@media (min-width: 1101px) and (max-height: 880px) {
    body.speas-login .visual-panel {
        padding-top: 30px;
        padding-bottom: 28px;
    }

    body.speas-login .brand-container {
        gap: 16px;
    }

    body.speas-login .brand-message {
        gap: 13px;
    }

    body.speas-login .brand-message h2 {
        font-size: clamp(40px, 3.6vw, 54px);
    }

    body.speas-login .login-insights {
        gap: 10px;
    }

    body.speas-login .insight-grid .insight-card {
        min-height: 92px;
    }

    body.speas-login .insight-flow {
        display: none;
    }
}

/* Speas wide login composition v11 */
@media (min-width: 1500px) {
    body.speas-login .visual-panel {
        padding: 42px clamp(56px, 5vw, 96px);
    }

    body.speas-login .brand-container {
        max-width: 880px;
        grid-template-columns: minmax(0, 1fr) minmax(310px, 0.82fr);
        grid-template-rows: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "logo logo"
            "message insights"
            "status insights";
        column-gap: clamp(34px, 4vw, 60px);
        row-gap: 26px;
        align-items: center;
    }

    body.speas-login .brand-logo {
        grid-area: logo;
    }

    body.speas-login .brand-message {
        grid-area: message;
        align-self: center;
        gap: 20px;
    }

    body.speas-login .brand-message h2 {
        font-size: clamp(48px, 3.4vw, 64px);
        max-width: 560px;
    }

    body.speas-login .brand-message p {
        max-width: 560px;
    }

    body.speas-login .login-signal-grid {
        width: min(430px, 100%);
    }

    body.speas-login .login-insights {
        grid-area: insights;
        align-self: center;
        width: 100%;
        margin-top: 0;
        gap: 12px;
    }

    body.speas-login .insight-main {
        min-height: 82px;
    }

    body.speas-login .insight-grid {
        grid-template-columns: 1fr;
    }

    body.speas-login .insight-grid .insight-card {
        min-height: 78px;
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 12px;
        align-items: center;
        justify-content: start;
    }

    body.speas-login .insight-grid .insight-card i {
        grid-row: 1 / span 2;
    }

    body.speas-login .insight-grid .insight-card span,
    body.speas-login .insight-grid .insight-card strong {
        margin: 0;
    }

    body.speas-login .insight-flow {
        height: 66px;
    }

    body.speas-login .system-status {
        grid-area: status;
        align-self: end;
        width: min(500px, 100%);
    }
}

/* Speas dark modules compatibility v12 */

/* Speas dark module residue fixes v13 */

/* Speas POS product cards dark contrast v14 */

/* Speas POS checkout dark contrast v15 */

/* Speas calendar reservation detail dark contrast v16 */

/* Speas despacho web dark contrast v17 */

@media (max-width: 768px) {
    body.speas-login .visual-panel {
        min-height: 190px;
        padding: 28px 18px;
    }

    body.speas-login .brand-logo {
        font-size: 23px;
    }

    body.speas-login .login-panel {
        align-items: flex-start;
        padding: 30px 18px;
    }

    body.speas-login .login-content {
        max-width: none;
        padding: 26px 22px;
        border-radius: 14px;
    }

    body.speas-login .login-header {
        text-align: center;
    }

    body.speas-app .header-text {
        min-height: 50px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        padding: 8px 10px;
    }

    body.speas-app .mobile-toggle {
        margin-right: 0;
    }

    body.speas-app .home .header-text > .text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 18px;
        line-height: 1.2;
    }

    body.speas-app .speas-shell-actions {
        justify-self: end;
        min-width: max-content;
    }

    .speas-theme-switch {
        padding: 2px;
        flex: 0 0 auto;
    }
}

/* Speas dark/module compatibility v7 */

@media (max-width: 768px) {
    body.speas-app .contenedor-modulo {
        padding: 0;
    }

    body.speas-app .table-module-container {
        border-radius: 12px !important;
        padding: 10px !important;
    }

    body.speas-app .module-header {
        gap: 10px !important;
        margin-bottom: 14px !important;
    }

    body.speas-app .header-titles h2 {
        font-size: 20px !important;
        line-height: 1.18 !important;
    }

    body.speas-app .header-titles p {
        font-size: 13px !important;
    }

    body.speas-app .header-actions,
    body.speas-app .table-toolbar,
    body.speas-app .search-box,
    body.speas-app .filter-actions {
        width: 100% !important;
        max-width: none !important;
    }

    body.speas-app .header-actions,
    body.speas-app .filter-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.speas-app .table-responsive {
        position: relative;
        border-radius: 10px !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.speas-app .premium-table {
        min-width: 760px !important;
    }

    body.speas-app .premium-table th,
    body.speas-app .premium-table td {
        padding: 12px 10px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }
}

/* Speas mobile login polish v8 */
@media (max-width: 768px) {
    body.speas-login {
        background:
            linear-gradient(180deg, #eef4f8 0%, #f8fafc 38%, #ffffff 100%) !important;
    }

    body.speas-login .enterprise-layout {
        min-height: 100svh;
        background:
            radial-gradient(circle at 18% 8%, rgba(94, 234, 212, 0.22), transparent 26%),
            radial-gradient(circle at 88% 12%, rgba(29, 78, 216, 0.12), transparent 24%),
            linear-gradient(180deg, #eef4f8 0%, #ffffff 56%) !important;
    }

    body.speas-login .visual-panel {
        min-height: 255px;
        padding: 24px 18px 78px;
        border-bottom: 0;
        background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(239, 246, 255, 0.72)),
            linear-gradient(90deg, rgba(15, 118, 110, 0.08), rgba(29, 78, 216, 0.08)) !important;
        overflow: hidden;
    }

    body.speas-login .visual-panel::before {
        content: "";
        position: absolute;
        inset: 12px 14px auto;
        height: 190px;
        display: block;
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 22px;
        background:
            linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
            linear-gradient(180deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
        background-size: 28px 28px;
        mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
        pointer-events: none;
        z-index: 1;
    }

    body.speas-login .visual-panel::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 24px;
        width: 72%;
        height: 1px;
        display: block;
        transform: translateX(-50%);
        background: linear-gradient(90deg, transparent, rgba(15, 118, 110, 0.40), transparent);
        z-index: 2;
    }

    body.speas-login .brand-container {
        position: relative;
        z-index: 3;
        gap: 14px;
        justify-content: flex-start;
        padding-top: 6px;
    }

    body.speas-login .brand-logo {
        width: 100%;
        justify-content: center;
        gap: 10px;
        margin-bottom: 0;
        color: #0f172a;
        text-shadow: none;
    }

    body.speas-login .brand-logo .speas-logo-mark {
        width: 48px;
        height: 48px;
        border-radius: 13px;
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
    }

    body.speas-login .brand-logo span:last-child {
        font-size: 25px;
        font-weight: 900;
        color: #0f172a;
        opacity: 1;
    }

    body.speas-login .brand-message {
        display: block !important;
        max-width: 330px;
        margin: 0 auto;
        text-align: center;
    }

    body.speas-login .brand-message h2 {
        margin: 8px 0 8px;
        font-size: 22px;
        line-height: 1.08;
        letter-spacing: 0;
        color: #0f172a;
    }

    body.speas-login .brand-message p {
        display: none;
    }

    body.speas-login .login-signal-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-top: 14px;
    }

    body.speas-login .login-signal-grid span {
        min-height: 30px;
        padding: 0 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        border: 1px solid rgba(15, 118, 110, 0.16);
        background: rgba(255, 255, 255, 0.82);
        color: #334155;
        font-size: 11px;
        font-weight: 800;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    }

    body.speas-login .system-status {
        display: flex !important;
        width: min(310px, calc(100vw - 48px));
        min-height: 46px;
        margin: 14px auto 0;
        padding: 9px 12px;
        border: 1px solid rgba(15, 118, 110, 0.16);
        border-left: 3px solid #10b981;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.82);
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    }

    body.speas-login .status-indicator {
        color: #0f172a;
        font-size: 12px;
    }

    body.speas-login .server-info p {
        color: #64748b;
    }

    body.speas-login .login-panel {
        margin-top: -58px;
        padding: 0 18px 34px;
        align-items: flex-start;
        background: transparent !important;
        position: relative;
        z-index: 4;
    }

    body.speas-login .login-content {
        max-width: none;
        padding: 24px 22px 22px;
        border-radius: 18px;
        border: 1px solid rgba(203, 213, 225, 0.88);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94));
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
    }

    body.speas-login .login-header {
        margin-bottom: 20px;
        text-align: center;
    }

    body.speas-login .login-header h3 {
        font-size: 27px;
        line-height: 1.1;
    }

    body.speas-login .login-header p {
        max-width: 280px;
        margin: 8px auto 0;
        font-size: 14.5px;
        line-height: 1.45;
    }

    body.speas-login .form-group {
        margin-bottom: 16px;
    }

    body.speas-login .form-group label {
        font-size: 11px;
        letter-spacing: 0.08em;
    }

    body.speas-login .input-box input {
        height: 48px;
        border-radius: 10px;
        font-size: 14px;
        background: #f8fafc;
        border-color: #d9e2ec;
        box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
    }

    body.speas-login .input-box i {
        color: #718096;
    }

    body.speas-login .btn-corporate {
        height: 50px;
        margin-top: 20px;
        border-radius: 10px;
        font-size: 14.5px;
        background: linear-gradient(135deg, #0f172a, #111827);
        box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
    }

    body.speas-login .security-notice {
        margin-top: 20px;
        padding: 14px;
        border-radius: 14px;
        background: #f8fafc;
    }

    body.speas-login .security-notice i {
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: #e6f7f4;
        color: #0f766e;
    }

    body.speas-login .login-footer {
        margin-top: 22px;
    }
}

@media (max-width: 768px) {
    body.speas-app .sidebar.mobile-active,
    body.speas-app .sidebar.mobile-active.close {
        width: min(82vw, 300px) !important;
        padding: 14px 10px !important;
        background: linear-gradient(180deg, #202936, #1c2530) !important;
        border-right: 1px solid rgba(148, 163, 184, 0.20);
        box-shadow: 18px 0 50px rgba(2, 6, 23, 0.38) !important;
    }

    body.speas-app .sidebar.mobile-active header {
        min-height: 54px;
        padding: 0 6px 12px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    }

    body.speas-app .sidebar.mobile-active .image-text {
        gap: 10px;
    }

    body.speas-app .sidebar.mobile-active .speas-logo-mark {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        box-shadow: 0 12px 28px rgba(20, 184, 166, 0.20);
    }

    body.speas-app .sidebar.mobile-active .logo-text .name {
        color: #f8fafc !important;
        font-size: 18px;
        font-weight: 850;
    }

    body.speas-app .sidebar.mobile-active .logo-text .profession {
        color: #9fb0c4 !important;
        font-size: 11px;
        letter-spacing: 0.01em;
    }

    body.speas-app .sidebar.mobile-active .menu-links {
        padding: 10px 0 0 !important;
    }

    body.speas-app .sidebar.mobile-active li {
        height: auto;
        margin: 4px 0;
    }

    body.speas-app .sidebar.mobile-active li a {
        min-height: 42px;
        padding: 0 12px !important;
        border-radius: 8px;
        gap: 12px;
        color: #dbe4ef;
    }

    body.speas-app .sidebar.mobile-active li .icon {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px;
        color: #b9c7d8 !important;
        font-size: 19px;
    }

    body.speas-app .sidebar.mobile-active li .text {
        color: #dbe4ef !important;
        font-size: 13.5px;
        font-weight: 720;
    }

    body.speas-app .sidebar.mobile-active li a:hover,
    body.speas-app .sidebar.mobile-active li.active a {
        background: linear-gradient(135deg, rgba(94, 234, 212, 0.20), rgba(148, 163, 184, 0.12)) !important;
        border: 1px solid rgba(94, 234, 212, 0.22);
        box-shadow: inset 3px 0 0 #5eead4;
    }

    body.speas-app .sidebar.mobile-active li a:hover .icon,
    body.speas-app .sidebar.mobile-active li.active .icon,
    body.speas-app .sidebar.mobile-active li a:hover .text,
    body.speas-app .sidebar.mobile-active li.active .text {
        color: #f8fafc !important;
    }

    body.speas-app .sidebar.mobile-active .bottom-content {
        border-top: 1px solid rgba(148, 163, 184, 0.14);
        padding-top: 10px;
    }

    body.speas-app .sidebar.mobile-active .profile-card {
        margin: 0 0 8px !important;
        padding: 10px !important;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.07) !important;
        border: 1px solid rgba(148, 163, 184, 0.16) !important;
    }

    body.speas-app .sidebar.mobile-active .profile-info .name {
        color: #f8fafc !important;
        font-weight: 780;
    }

    body.speas-app .sidebar.mobile-active .profile-info .role {
        color: #9fb0c4 !important;
    }

    body.speas-app .sidebar.mobile-active .logout-box {
        margin: 0 !important;
    }

    body.speas-app .sidebar.mobile-active .logout-box a {
        min-height: 40px;
        padding: 0 12px !important;
        border-radius: 8px;
    }
}

/* Speas terceros dark contrast v18 */

/* Speas historial modal positioning and mail polish v19 */
body.speas-app #modal-detalle-venta.modal-overlay,
body.speas-app #modal-envio-correo.modal-overlay,
body.speas-app #modal-envio-whatsapp.modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    z-index: 10020 !important;
}

body.speas-app #modal-detalle-venta.modal-overlay.active,
body.speas-app #modal-envio-correo.modal-overlay.active,
body.speas-app #modal-envio-whatsapp.modal-overlay.active {
    display: flex !important;
}

body.speas-app #modal-detalle-venta .modal-content,
body.speas-app #modal-envio-correo .modal-content,
body.speas-app #modal-envio-whatsapp .modal-content {
    margin: 0 !important;
    transform: none !important;
    width: min(92vw, 560px) !important;
    max-height: min(82dvh, 720px) !important;
    border-radius: 14px !important;
}

body.speas-app #modal-envio-correo .modal-content {
    max-width: 460px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.speas-app #modal-envio-correo .modal-header {
    margin: 0 !important;
    padding: 20px 22px !important;
    border-bottom: 1px solid #dbe3ee !important;
}

body.speas-app #modal-envio-correo .modal-header h3 {
    color: #172033 !important;
    font-size: 18px !important;
    font-weight: 850 !important;
}

body.speas-app #modal-envio-correo .modal-header h3 i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e6f7f4;
    color: #0f766e;
}

body.speas-app #modal-envio-correo .modal-body {
    padding: 22px !important;
}

body.speas-app #modal-envio-correo .modal-body p {
    margin: 0 0 12px !important;
    color: #64748b !important;
    font-weight: 650;
}

body.speas-app #modal-envio-correo .modal-body > div[style*="position: relative"] {
    margin-bottom: 22px !important;
}

body.speas-app #modal-envio-correo .modal-body input[type="email"] {
    min-height: 48px !important;
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #172033 !important;
    font-size: 15px !important;
}

body.speas-app #modal-envio-correo .modal-body input[type="email"]:focus {
    border-color: #14b8a6 !important;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14) !important;
}

body.speas-app #modal-envio-correo .modal-body .btn-secondary,
body.speas-app #modal-envio-correo .modal-body .btn-primary {
    min-height: 42px;
    border-radius: 10px !important;
    padding: 0 18px !important;
    font-weight: 800 !important;
}

@media (max-width: 640px) {
    body.speas-app #modal-detalle-venta.modal-overlay,
    body.speas-app #modal-envio-correo.modal-overlay,
    body.speas-app #modal-envio-whatsapp.modal-overlay {
        padding: 14px !important;
    }

    body.speas-app #modal-envio-correo .modal-body > div:last-child {
        flex-direction: column !important;
    }

    body.speas-app #modal-envio-correo .modal-body .btn-secondary,
    body.speas-app #modal-envio-correo .modal-body .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* Speas flujo de caja dark contrast v20 */

/* Speas caja chica dark contrast and modal polish v22 */

@media (max-width: 640px) {
}

/* Speas inventario dark contrast and modal polish v23 */

@media (max-width: 720px) {
}

/* Speas proveedores dark responsive polish v24 */

/* Historial ventas: compact vertical rhythm between header, filters and table. */
body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start !important;
    gap: 10px !important;
    row-gap: 10px !important;
    padding: 10px !important;
    background: #ffffff !important;
}

body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) > .module-header,
body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) > .table-toolbar,
body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) > .table-responsive,
body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) > #historial-paginacion {
    margin: 0 !important;
    transform: none !important;
}

body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) > .module-header {
    min-height: 64px !important;
    height: auto !important;
    padding: 12px 18px !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) > .module-header .header-titles h2 {
    margin: 0 0 3px !important;
    line-height: 1.15 !important;
}

body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) > .module-header .header-titles p {
    margin: 0 !important;
    line-height: 1.25 !important;
}

body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) > .table-toolbar {
    min-height: 48px !important;
    height: auto !important;
    padding: 5px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) .search-box {
    position: relative !important;
    width: min(100%, 520px) !important;
    max-width: 520px !important;
    height: 38px !important;
    min-height: 38px !important;
}

body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) .search-box i {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    line-height: 1 !important;
    pointer-events: none !important;
}

body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) #historial-search {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 14px 0 46px !important;
    line-height: 38px !important;
}

body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) .refresh-history-btn {
    width: 44px !important;
    min-width: 44px !important;
    height: 38px !important;
    min-height: 38px !important;
}

body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) > .table-responsive {
    margin-top: 0 !important;
}

body.speas-app .contenedor-modulo > .table-module-container.fade-in:has(#historial-search) .premium-table th {
    height: 40px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

@media (max-width: 768px) {
    body.speas-app #module-content .table-module-container {
        gap: 14px !important;
    }

    body.speas-app #module-content .table-module-container .module-header {
        padding: 16px !important;
        border-radius: 14px !important;
        align-items: stretch !important;
    }

    body.speas-app #module-content .table-module-container .module-header h2 {
        font-size: 22px !important;
        line-height: 1.15 !important;
    }

    body.speas-app #module-content .table-module-container .module-header p {
        font-size: 14px !important;
        line-height: 1.35 !important;
    }

    body.speas-app #module-content .table-module-container .module-header > div:last-child {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    body.speas-app #module-content .table-module-container .module-header .btn-secondary,
    body.speas-app #module-content .table-module-container .module-header .btn-primary {
        width: 100% !important;
        min-height: 48px !important;
        justify-content: center !important;
        padding: 0 12px !important;
        white-space: normal !important;
        text-align: center !important;
    }

    body.speas-app #module-content .table-module-container .table-toolbar {
        padding: 16px !important;
        border-radius: 14px !important;
        align-items: stretch !important;
    }

    body.speas-app #module-content .table-module-container .filter-actions {
        justify-content: flex-start !important;
    }

    body.speas-app #module-content .table-module-container .table-responsive {
        border-radius: 14px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body.speas-app #module-content .table-module-container .premium-table {
        min-width: 760px !important;
    }

    body.speas-app #module-content .table-module-container .premium-table th,
    body.speas-app #module-content .table-module-container .premium-table td {
        padding: 14px 16px !important;
        white-space: nowrap !important;
    }

    body.speas-app #module-content .table-module-container .pagination {
        justify-content: space-between !important;
        padding: 12px 4px !important;
    }

    body.speas-app #modal-proveedor.modal-overlay {
        align-items: stretch !important;
        justify-content: flex-end !important;
    }

    body.speas-app #modal-proveedor .modal-content {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
    }

    body.speas-app #modal-proveedor .modal-header {
        padding: 18px 20px !important;
    }

    body.speas-app #modal-proveedor .modal-body {
        padding: 18px 20px 26px !important;
    }

    body.speas-app #modal-proveedor .row-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    body.speas-app #modal-proveedor .premium-table tr {
        display: grid !important;
        grid-template-columns: 1fr 44px !important;
        gap: 10px !important;
        padding: 14px !important;
    }

    body.speas-app #modal-proveedor .premium-table td {
        display: block !important;
        padding: 0 !important;
    }

    body.speas-app #modal-proveedor .premium-table td:not(:last-child) {
        grid-column: 1 / 2 !important;
    }

    body.speas-app #modal-proveedor .premium-table td:last-child {
        position: static !important;
        grid-column: 2 / 3 !important;
        grid-row: 1 / span 4 !important;
        align-self: start !important;
    }

    body.speas-app #modal-proveedor .premium-table input,
    body.speas-app #modal-proveedor .premium-table select {
        min-height: 46px !important;
        border: 1px solid #607187 !important;
        border-radius: 12px !important;
        padding: 0 14px !important;
    }

    body.speas-app #modal-proveedor .modal-footer {
        padding: 14px 20px !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    body.speas-app #modal-proveedor .modal-footer .btn-cancel,
    body.speas-app #modal-proveedor .modal-footer .btn-primary {
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    body.speas-app .table-module-container:has(#tabla-proveedores-body) .table-responsive > .premium-table {
        min-width: 720px !important;
        width: 100% !important;
        border-collapse: collapse !important;
        border-spacing: 0 !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) .table-responsive > .premium-table thead {
        display: table-header-group !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body tr {
        display: table-row !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #303b48 !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td {
        display: table-cell !important;
        grid-template-columns: none !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 13px 14px !important;
        border-bottom: 1px solid #53657a !important;
        white-space: nowrap !important;
        min-width: 0 !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td:nth-child(3) .status-badge {
        justify-self: auto !important;
        min-width: 86px !important;
        max-width: 100% !important;
        text-align: center !important;
        background: rgba(94, 234, 212, 0.14) !important;
        color: #ccfbf1 !important;
        border: 1px solid rgba(94, 234, 212, 0.32) !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td:nth-child(5) {
        grid-template-columns: none !important;
        justify-content: initial !important;
        text-align: center !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td:nth-child(5) small {
        margin-left: 4px !important;
        color: #cbd5e1 !important;
        font-size: 11px !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td::before {
        color: #9fb0c4 !important;
        font-size: 11px !important;
        font-weight: 900 !important;
        letter-spacing: 0.06em !important;
        text-transform: uppercase !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td:nth-child(1)::before,
    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td:nth-child(2)::before,
    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td:nth-child(3)::before,
    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td:nth-child(4)::before,
    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td:nth-child(5)::before,
    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td:nth-child(6)::before,
    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td:nth-child(7)::before {
        content: none !important;
        display: none !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body td::after,
    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body tr::before,
    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body tr::after {
        content: none !important;
        display: none !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body .action-buttons {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) #tabla-proveedores-body .client-contact {
        display: grid !important;
        gap: 4px !important;
        min-width: 0 !important;
    }
}

/* Speas ordenes compra dark responsive polish v27 */

@media (max-width: 768px) {
    body.speas-app .modulo-container:has(#tabla-oc-interna) {
        padding: 14px !important;
        border-radius: 14px !important;
        overflow: hidden !important;
    }

    body.speas-app .modulo-container:has(#tabla-oc-interna) .header-acciones {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        align-items: stretch !important;
    }

    body.speas-app .modulo-container:has(#tabla-oc-interna) .header-acciones h2 {
        font-size: 21px !important;
        line-height: 1.18 !important;
        min-width: 0 !important;
        overflow-wrap: anywhere !important;
    }

    body.speas-app .modulo-container:has(#tabla-oc-interna) .header-acciones > div {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        align-items: stretch !important;
    }

    body.speas-app .modulo-container:has(#tabla-oc-interna) #filtro-sede-oc {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        min-height: 48px !important;
    }

    body.speas-app .modulo-container:has(#tabla-oc-interna) .btn-excel,
    body.speas-app .modulo-container:has(#tabla-oc-interna) .btn-primary {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 52px !important;
        padding: 0 10px !important;
        justify-content: center !important;
        white-space: normal !important;
        text-align: center !important;
        line-height: 1.15 !important;
        overflow: hidden !important;
    }

    body.speas-app .modulo-container:has(#tabla-oc-interna) .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body.speas-app .modulo-container:has(#tabla-oc-interna) .table-custom {
        min-width: 780px !important;
    }

    body.speas-app .modulo-container:has(#tabla-oc-interna) .pagination {
        align-items: center !important;
        gap: 12px !important;
    }

    body.speas-app #modal-crear-oc .modal-content {
        width: min(94vw, 560px) !important;
        max-height: 92vh !important;
    }

    body.speas-app #modal-crear-oc .modal-header {
        padding: 18px 20px !important;
    }

    body.speas-app #modal-crear-oc .modal-body {
        padding: 18px 20px !important;
    }

    body.speas-app #modal-crear-oc .form-grid {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    body.speas-app #modal-crear-oc .input-group,
    body.speas-app #modal-crear-oc .input-group[style*="grid-column"] {
        grid-column: auto !important;
    }

    body.speas-app #modal-crear-oc .input-group input,
    body.speas-app #modal-crear-oc .input-group select,
    body.speas-app #modal-crear-oc .input-group textarea {
        min-height: 52px !important;
        font-size: 15px !important;
    }
}

/* Speas ordenes compra mobile modal viewport fix v28 */
@media (max-width: 768px) {
    body.speas-app #modal-crear-oc.modal-overlay:not(.hidden) {
        align-items: flex-start !important;
        justify-content: center !important;
        padding: 14px 12px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-y: auto !important;
    }

    body.speas-app #modal-crear-oc .modal-content {
        width: min(94vw, 560px) !important;
        max-height: calc(100dvh - 30px) !important;
        margin: 0 auto !important;
        border-radius: 16px !important;
        overflow: hidden !important;
    }

    body.speas-app #modal-crear-oc .modal-header {
        flex: 0 0 auto !important;
        min-height: 58px !important;
        padding: 14px 18px !important;
        gap: 10px !important;
    }

    body.speas-app #modal-crear-oc .modal-header h3 {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-width: 0 !important;
        margin: 0 !important;
        font-size: 16px !important;
        line-height: 1.25 !important;
        overflow: visible !important;
    }

    body.speas-app #modal-crear-oc .modal-header > i {
        flex: 0 0 auto !important;
        width: 38px !important;
        height: 38px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 12px !important;
        background: #344151 !important;
        border: 1px solid #53657a !important;
    }

    body.speas-app #modal-crear-oc .modal-body {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        padding-top: 18px !important;
    }
}

/* Speas ordenes compra mobile full viewport modal fix v29 */
@media (max-width: 768px) {
    body.speas-modal-open {
        overflow: hidden !important;
        touch-action: none !important;
    }

    body.speas-app #modal-crear-oc.modal-overlay {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        z-index: 9999 !important;
        box-sizing: border-box !important;
        background: rgba(8, 13, 22, 0.78) !important;
        backdrop-filter: blur(8px) !important;
        overflow: hidden !important;
    }

    body.speas-app #modal-crear-oc.modal-overlay:not(.hidden) {
        display: flex !important;
        align-items: stretch !important;
        justify-content: center !important;
        padding: 10px 12px 12px !important;
    }

    body.speas-app #modal-crear-oc .modal-content {
        width: min(94vw, 560px) !important;
        height: calc(100dvh - 22px) !important;
        max-height: calc(100dvh - 22px) !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        border-radius: 16px !important;
    }

    body.speas-app #modal-crear-oc .modal-header {
        position: relative !important;
        flex: 0 0 auto !important;
        min-height: 64px !important;
        padding: 14px 16px !important;
        background: #2e3a48 !important;
        border-bottom: 1px solid #526276 !important;
    }

    body.speas-app #modal-crear-oc .modal-header h3 {
        flex: 1 1 auto !important;
        font-size: clamp(15px, 4vw, 18px) !important;
        white-space: normal !important;
        word-break: normal !important;
    }

    body.speas-app #modal-crear-oc .modal-header > i:last-child {
        flex: 0 0 44px !important;
        width: 44px !important;
        height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 14px !important;
        background: #344151 !important;
        border: 1px solid #53657a !important;
        font-size: 24px !important;
    }

    body.speas-app #modal-crear-oc .modal-body {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        padding: 18px 16px max(22px, env(safe-area-inset-bottom, 0px)) !important;
        background: #2e3a48 !important;
    }

    body.speas-app #modal-crear-oc .form-actions {
        position: static !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin: 18px 0 0 !important;
        padding: 0 0 max(10px, env(safe-area-inset-bottom, 0px)) !important;
        background: transparent !important;
        border-top: 0 !important;
    }

    body.speas-app #modal-crear-oc .form-actions .btn-outline,
    body.speas-app #modal-crear-oc .form-actions .btn-primary {
        width: 100% !important;
        min-height: 48px !important;
    }
}

/* Speas ordenes compra mobile form scroll refinement v30 */
@media (max-width: 768px) {
    body.speas-app #modal-crear-oc .modal-body {
        padding-bottom: max(22px, env(safe-area-inset-bottom, 0px)) !important;
    }

    body.speas-app #modal-crear-oc .form-actions {
        position: static !important;
        margin-top: 20px !important;
    }
}

/* Speas facturas dark responsive polish v31 */

@media (max-width: 768px) {
}

@media (min-width: 769px) and (max-width: 1180px) {
}

@media (min-width: 1600px) {
}

/* Speas facturas dark modal refinements v32 */

@media (max-width: 768px) {
    body.speas-app #toast-container {
        top: 82px !important;
        left: 16px !important;
        right: 16px !important;
        width: auto !important;
        gap: 8px !important;
        z-index: 9997 !important;
    }

    body.speas-app .toast {
        min-width: 0 !important;
        width: 100% !important;
        padding: 10px 12px !important;
        border-radius: 12px !important;
        gap: 10px !important;
        transform: translateY(-140%) !important;
    }

    body.speas-app .toast.show {
        transform: translateY(0) !important;
    }

    body.speas-app .toast-title {
        font-size: 12px !important;
        margin: 0 !important;
    }

    body.speas-app .toast-msg {
        font-size: 12px !important;
        line-height: 1.25 !important;
    }
}

/* Speas facturas mobile modal scroll without bottom blocker v33 */
@media (max-width: 768px) {
}

/* Speas facturas mobile modal spacing and provider accounts dark fix v34 */

@media (max-width: 768px) {
}

/* Speas caja chica compact movement type badge v35 */
body.speas-app .caja-chica-container #tabla-chica-body td:nth-child(2) {
    width: 112px !important;
}

body.speas-app .caja-chica-container #tabla-chica-body td:nth-child(2) .badge {
    width: auto !important;
    min-width: 82px !important;
    max-width: 96px !important;
    min-height: 28px !important;
    height: 28px !important;
    padding: 0 9px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

body.speas-app .caja-chica-container #tabla-chica-body td:nth-child(2) .badge i {
    font-size: 12px !important;
    line-height: 1 !important;
    margin: 0 !important;
}

@media (max-width: 768px) {
    body.speas-app .caja-chica-container #tabla-chica-body td:nth-child(2) {
        width: 94px !important;
    }

    body.speas-app .caja-chica-container #tabla-chica-body td:nth-child(2) .badge {
        min-width: 74px !important;
        max-width: 84px !important;
        height: 26px !important;
        min-height: 26px !important;
        padding: 0 7px !important;
        font-size: 11px !important;
        border-radius: 7px !important;
    }

    body.speas-app .caja-chica-container #tabla-chica-body td:nth-child(2) .badge i {
        font-size: 11px !important;
    }
}

/* Speas inventario desktop tablet tv modal footer fix v36 */
body.speas-app #modal-producto.modal-overlay.active {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    overflow: hidden !important;
}

body.speas-app #modal-producto .modal-content.slide-in-right {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    width: min(46vw, 780px) !important;
    min-width: 640px !important;
    max-width: calc(100vw - var(--sidebar-w, 96px) - 24px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
}

body.speas-app #modal-producto .modal-header {
    flex: 0 0 auto !important;
    min-height: 96px !important;
    padding: 24px 38px !important;
}

body.speas-app #modal-producto .modal-body {
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    padding: 28px 38px 32px !important;
    overscroll-behavior: contain !important;
}

body.speas-app #modal-producto .modal-footer {
    position: static !important;
    flex: 0 0 auto !important;
    min-height: 86px !important;
    margin: 0 !important;
    padding: 16px 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 14px !important;
    z-index: 2 !important;
}

@media (min-width: 1600px) {
    body.speas-app #modal-producto .modal-content.slide-in-right {
        width: min(42vw, 860px) !important;
    }
}

@media (min-width: 721px) and (max-width: 1180px) {
    body.speas-app #modal-producto .modal-content.slide-in-right {
        width: min(78vw, 760px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 24px) !important;
    }

    body.speas-app #modal-producto .modal-header {
        min-height: 88px !important;
        padding: 22px 30px !important;
    }

    body.speas-app #modal-producto .modal-body {
        padding: 24px 30px 30px !important;
    }

    body.speas-app #modal-producto .modal-footer {
        min-height: 82px !important;
        padding: 14px 30px !important;
    }
}

@media (max-width: 720px) {
    body.speas-app #modal-producto.modal-overlay.active {
        justify-content: center !important;
        align-items: flex-start !important;
        height: 100dvh !important;
        padding: 12px 10px max(12px, env(safe-area-inset-bottom)) !important;
        overflow-y: auto !important;
    }

    body.speas-app #modal-producto .modal-content.slide-in-right {
        width: min(100%, 560px) !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: calc(100dvh - 24px - env(safe-area-inset-bottom)) !important;
        max-height: calc(100dvh - 24px - env(safe-area-inset-bottom)) !important;
        border-radius: 22px !important;
    }

    body.speas-app #modal-producto .modal-header {
        min-height: 82px !important;
        padding: 18px 22px !important;
    }

    body.speas-app #modal-producto .modal-body {
        padding: 20px 22px 24px !important;
    }

    body.speas-app #modal-producto .modal-footer {
        min-height: auto !important;
        padding: 14px 22px max(16px, env(safe-area-inset-bottom)) !important;
    }
}

@media (min-width: 721px) {
    body.speas-app #modal-producto.modal-overlay.active {
        top: -78px !important;
        left: calc(-1 * var(--sidebar-w, 96px)) !important;
        width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
    }

    body.speas-app #modal-producto .modal-content.slide-in-right {
        height: 100dvh !important;
        max-height: 100dvh !important;
    }
}

@media (min-width: 721px) {
    body.speas-app #modal-producto .modal-content.slide-in-right {
        width: min(46vw, 780px) !important;
    }
}

@media (min-width: 1600px) {
    body.speas-app #modal-producto .modal-content.slide-in-right {
        width: min(42vw, 860px) !important;
        min-width: 760px !important;
    }
}

@media (min-width: 721px) and (max-width: 1180px) {
    body.speas-app #modal-producto .modal-content.slide-in-right {
        width: min(78vw, 760px) !important;
        min-width: 0 !important;
    }
}

/* Speas inventario dark modal scrollbar v37 */

/* Speas inventario kardex dark modal spacing and scrollbars v38 */
body.speas-app #modal-kardex.modal-overlay.active {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    padding: clamp(30px, 4dvh, 48px) clamp(18px, 3.5vw, 48px) !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body.speas-app #modal-kardex .modal-content.center-modal {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    width: min(88vw, 1380px) !important;
    max-width: calc(100vw - 96px) !important;
    height: auto !important;
    max-height: calc(100dvh - clamp(60px, 8dvh, 96px)) !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 14px !important;
}

body.speas-app #modal-kardex .modal-header {
    flex: 0 0 auto !important;
    min-height: 90px !important;
    padding: 24px 32px !important;
}

body.speas-app #modal-kardex .modal-body {
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    overflow: hidden !important;
    padding: 24px 32px 20px !important;
}

body.speas-app #modal-kardex .kardex-filters {
    flex: 0 0 auto !important;
    margin-bottom: 0 !important;
}

body.speas-app #modal-kardex .modal-body > div:nth-child(2) {
    flex: 1 1 auto !important;
    min-height: 260px !important;
    max-height: none !important;
    overflow: auto !important;
    padding-bottom: 0 !important;
    overscroll-behavior: contain !important;
}

body.speas-app #modal-kardex .pagination-container {
    flex: 0 0 auto !important;
    margin-top: 2px !important;
}

@media (min-width: 721px) {
    body.speas-app #modal-kardex.modal-overlay.active {
        top: -78px !important;
        left: calc(-1 * var(--sidebar-w, 96px)) !important;
        width: 100vw !important;
        height: 100dvh !important;
    }
}

@media (max-width: 720px) {
    body.speas-app #modal-kardex.modal-overlay.active {
        padding: 12px 10px max(12px, env(safe-area-inset-bottom)) !important;
        align-items: flex-start !important;
        overflow-y: auto !important;
    }

    body.speas-app #modal-kardex .modal-content.center-modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100dvh - 24px - env(safe-area-inset-bottom)) !important;
        border-radius: 20px !important;
    }

    body.speas-app #modal-kardex .modal-header {
        min-height: 78px !important;
        padding: 18px 20px !important;
    }

    body.speas-app #modal-kardex .modal-body {
        padding: 18px 14px 16px !important;
    }
}

/* Speas inventario table spacing polish v39 */
body.speas-app .table-module-container:has(#tabla-productos-body) .table-responsive {
    padding: 0 10px 8px !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table thead th {
    padding: 16px 22px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table tbody td {
    padding: 14px 22px !important;
    line-height: 1.35 !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table thead th:first-child,
body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table tbody td:first-child {
    padding-left: 28px !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table thead th:last-child,
body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table tbody td:last-child {
    padding-right: 28px !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table tbody tr {
    min-height: 68px !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) #tabla-productos-body td:nth-child(2) span,
body.speas-app .table-module-container:has(#tabla-productos-body) #tabla-productos-body td:nth-child(3) span,
body.speas-app .table-module-container:has(#tabla-productos-body) #tabla-productos-body .badge-cat,
body.speas-app .table-module-container:has(#tabla-productos-body) #tabla-productos-body .badge-type,
body.speas-app .table-module-container:has(#tabla-productos-body) #tabla-productos-body .status-badge,
body.speas-app .table-module-container:has(#tabla-productos-body) #tabla-productos-body .badge {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 26px !important;
    padding: 4px 9px !important;
    border-radius: 8px !important;
    line-height: 1.15 !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    body.speas-app .table-module-container:has(#tabla-productos-body) .table-responsive {
        padding: 0 6px 8px !important;
    }

    body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table thead th,
    body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table tbody td {
        padding: 13px 16px !important;
    }

    body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table thead th:first-child,
    body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table tbody td:first-child {
        padding-left: 18px !important;
    }
}

/* Speas inventario header spacing polish v40 */
body.speas-app .table-module-container:has(#tabla-productos-body) {
    gap: 18px !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) > .module-header {
    padding: 22px 28px 18px !important;
    margin: 0 !important;
    align-items: center !important;
    border-radius: 12px 12px 0 0 !important;
    box-sizing: border-box !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) > .module-header .header-titles {
    min-width: 260px !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) > .module-header h2 {
    margin: 0 0 8px !important;
    line-height: 1.18 !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) > .module-header p {
    margin: 0 !important;
    line-height: 1.35 !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) > .tabs-container {
    padding: 16px 28px 18px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) > .table-toolbar {
    margin: 0 28px !important;
    padding: 18px 20px !important;
    box-sizing: border-box !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) > .table-responsive {
    margin: 8px 28px 0 !important;
    width: auto !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) > .pagination {
    margin: 0 28px !important;
}

@media (max-width: 768px) {
    body.speas-app .table-module-container:has(#tabla-productos-body) > .module-header {
        padding: 18px 18px 16px !important;
        gap: 14px !important;
    }

    body.speas-app .table-module-container:has(#tabla-productos-body) > .tabs-container {
        padding: 14px 18px 16px !important;
    }

    body.speas-app .table-module-container:has(#tabla-productos-body) > .table-toolbar,
    body.speas-app .table-module-container:has(#tabla-productos-body) > .table-responsive,
    body.speas-app .table-module-container:has(#tabla-productos-body) > .pagination {
        margin-left: 18px !important;
        margin-right: 18px !important;
    }
}

/* Speas caja chica spacing polish v41 */
body.speas-app .caja-chica-container {
    max-width: min(100%, 1480px) !important;
    padding: 24px 28px 64px !important;
    box-sizing: border-box !important;
}

body.speas-app .caja-chica-container > .module-header {
    padding: 22px 28px 18px !important;
    margin: 0 0 28px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

body.speas-app .caja-chica-container > .module-header h2 {
    margin: 0 0 8px !important;
    line-height: 1.18 !important;
}

body.speas-app .caja-chica-container > .module-header p {
    margin: 0 !important;
    line-height: 1.35 !important;
}

body.speas-app .caja-chica-container > .saldo-card-container {
    margin: 0 0 32px !important;
    gap: 24px !important;
}

body.speas-app .caja-chica-container .saldo-card {
    padding: 38px 42px !important;
}

body.speas-app .caja-chica-container .actions-grid .btn-action {
    padding: 30px 24px !important;
}

body.speas-app .caja-chica-container > .table-container {
    padding: 32px 34px 34px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

body.speas-app .caja-chica-container .table-header-flex {
    padding: 0 4px !important;
    margin-bottom: 20px !important;
}

body.speas-app .caja-chica-container .table-responsive {
    padding: 0 8px 8px !important;
    box-sizing: border-box !important;
}

body.speas-app .caja-chica-container .premium-table th {
    padding: 16px 24px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

body.speas-app .caja-chica-container .premium-table td {
    padding: 14px 24px !important;
    line-height: 1.35 !important;
}

body.speas-app .caja-chica-container .premium-table th:first-child,
body.speas-app .caja-chica-container .premium-table td:first-child {
    padding-left: 28px !important;
}

body.speas-app .caja-chica-container .premium-table th:last-child,
body.speas-app .caja-chica-container .premium-table td:last-child {
    padding-right: 28px !important;
}

@media (max-width: 980px) {
    body.speas-app .caja-chica-container {
        padding: 18px 18px 56px !important;
    }

    body.speas-app .caja-chica-container > .module-header {
        padding: 18px 18px 16px !important;
        gap: 14px !important;
    }

    body.speas-app .caja-chica-container > .saldo-card-container {
        gap: 18px !important;
    }

    body.speas-app .caja-chica-container .saldo-card,
    body.speas-app .caja-chica-container > .table-container {
        padding: 24px 20px !important;
    }
}

/* Speas flujo caja spacing polish v42 */
body.speas-app .caja-container {
    max-width: min(100%, 1680px) !important;
    padding: 24px 28px 64px !important;
    box-sizing: border-box !important;
}

body.speas-app .caja-container > .module-header {
    padding: 22px 28px 18px !important;
    margin: 0 0 28px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

body.speas-app .caja-container > .module-header .header-titles {
    min-width: 260px !important;
}

body.speas-app .caja-container > .module-header h2 {
    margin: 0 0 8px !important;
    line-height: 1.18 !important;
}

body.speas-app .caja-container > .module-header p {
    margin: 0 !important;
    line-height: 1.35 !important;
}

body.speas-app .caja-container .kpi-grid-temporal {
    gap: 24px !important;
    margin: 0 0 32px !important;
}

body.speas-app .caja-container .kpi-card {
    padding: 26px 30px !important;
    min-height: 150px !important;
    box-sizing: border-box !important;
}

body.speas-app .caja-container .card-header-flex {
    margin-bottom: 20px !important;
}

body.speas-app .caja-container .amount-big {
    margin: 0 !important;
    line-height: 1.15 !important;
}

body.speas-app .caja-container .desglose-container {
    padding: 28px !important;
    margin: 0 0 32px !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
}

body.speas-app .caja-container .desglose-header {
    margin: 0 0 24px !important;
    gap: 18px !important;
}

body.speas-app .caja-container .desglose-title h3 {
    margin: 0 0 4px !important;
    line-height: 1.2 !important;
}

body.speas-app .caja-container .desglose-title small {
    display: block !important;
    line-height: 1.3 !important;
}

body.speas-app .caja-container .cards-methods-grid {
    gap: 18px !important;
}

body.speas-app .caja-container .method-card-detail {
    min-height: 82px !important;
    padding: 18px 20px !important;
    box-sizing: border-box !important;
}

body.speas-app .caja-container .method-card-detail .icon-box {
    flex: 0 0 48px !important;
}

body.speas-app .caja-container .table-module-container {
    padding: 32px 34px 34px !important;
    margin: 0 !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
}

body.speas-app .caja-container .table-responsive {
    padding: 0 8px 8px !important;
    box-sizing: border-box !important;
}

body.speas-app .caja-container .premium-table th {
    padding: 16px 24px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

body.speas-app .caja-container .premium-table td {
    padding: 16px 24px !important;
    line-height: 1.35 !important;
}

body.speas-app .caja-container .premium-table th:first-child,
body.speas-app .caja-container .premium-table td:first-child {
    padding-left: 28px !important;
}

body.speas-app .caja-container .premium-table th:last-child,
body.speas-app .caja-container .premium-table td:last-child {
    padding-right: 28px !important;
}

body.speas-app .caja-container #caja-paginacion {
    margin: 22px 8px 0 !important;
}

@media (max-width: 980px) {
    body.speas-app .caja-container {
        padding: 18px 18px 56px !important;
    }

    body.speas-app .caja-container > .module-header {
        padding: 18px 18px 16px !important;
        gap: 14px !important;
    }

    body.speas-app .caja-container .kpi-grid-temporal {
        gap: 18px !important;
        margin-bottom: 24px !important;
    }

    body.speas-app .caja-container .kpi-card,
    body.speas-app .caja-container .desglose-container,
    body.speas-app .caja-container .table-module-container {
        padding: 22px 20px !important;
    }
}

@media (max-width: 600px) {
    body.speas-app .caja-container {
        padding: 14px 14px 48px !important;
    }

    body.speas-app .caja-container > .module-header,
    body.speas-app .caja-container .kpi-card,
    body.speas-app .caja-container .desglose-container,
    body.speas-app .caja-container .table-module-container {
        padding: 18px 16px !important;
    }

    body.speas-app .caja-container .cards-methods-grid {
        grid-template-columns: 1fr !important;
    }

    body.speas-app .caja-container .method-card-detail {
        flex-direction: row !important;
        text-align: left !important;
    }

    body.speas-app .caja-container .premium-table th,
    body.speas-app .caja-container .premium-table td {
        padding: 14px 16px !important;
    }
}

/* Speas historial despacho calendario spacing polish v43 */
body.speas-app .table-module-container:has(#tabla-historial-body) {
    max-width: min(100%, 1680px) !important;
    padding: 24px 28px 64px !important;
    box-sizing: border-box !important;
}

body.speas-app .table-module-container:has(#tabla-historial-body) > .module-header {
    padding: 22px 28px 18px !important;
    margin: 0 0 28px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

body.speas-app .table-module-container:has(#tabla-historial-body) > .module-header h2,
body.speas-app .calendar-module-container > .module-header h2,
body.speas-app .despacho-container .despacho-title h2 {
    margin: 0 0 8px !important;
    line-height: 1.18 !important;
}

body.speas-app .table-module-container:has(#tabla-historial-body) > .module-header p,
body.speas-app .calendar-module-container > .module-header p,
body.speas-app .despacho-container .despacho-title p {
    margin: 0 !important;
    line-height: 1.35 !important;
}

body.speas-app .table-module-container:has(#tabla-historial-body) > .table-toolbar {
    margin: 0 0 26px !important;
    padding: 18px 20px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
}

body.speas-app .table-module-container:has(#tabla-historial-body) > .table-responsive {
    padding: 0 8px 8px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
}

body.speas-app .table-module-container:has(#tabla-historial-body) .premium-table th {
    padding: 16px 24px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

body.speas-app .table-module-container:has(#tabla-historial-body) .premium-table td {
    padding: 16px 24px !important;
    line-height: 1.35 !important;
}

body.speas-app .table-module-container:has(#tabla-historial-body) .premium-table th:first-child,
body.speas-app .table-module-container:has(#tabla-historial-body) .premium-table td:first-child {
    padding-left: 28px !important;
}

body.speas-app .table-module-container:has(#tabla-historial-body) .premium-table th:last-child,
body.speas-app .table-module-container:has(#tabla-historial-body) .premium-table td:last-child {
    padding-right: 28px !important;
}

body.speas-app .table-module-container:has(#tabla-historial-body) #historial-paginacion {
    margin: 22px 8px 0 !important;
}

body.speas-app .despacho-container {
    max-width: min(100%, 1680px) !important;
    padding: 24px 28px 64px !important;
    box-sizing: border-box !important;
}

body.speas-app .despacho-container .despacho-header {
    padding: 22px 28px 18px !important;
    margin: 0 0 24px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

body.speas-app .despacho-container .despacho-tabs {
    padding: 0 0 18px !important;
    margin: 0 0 26px !important;
    gap: 12px !important;
}

body.speas-app .despacho-container .despacho-actions {
    padding: 18px 20px !important;
    margin: 0 0 24px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
}

body.speas-app .despacho-container .table-responsive {
    padding: 0 8px 8px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
}

body.speas-app .despacho-container .despacho-table th {
    padding: 16px 24px !important;
    line-height: 1.2 !important;
}

body.speas-app .despacho-container .despacho-table td {
    padding: 16px 24px !important;
    line-height: 1.35 !important;
}

body.speas-app .despacho-container .despacho-table th:first-child,
body.speas-app .despacho-container .despacho-table td:first-child {
    padding-left: 28px !important;
}

body.speas-app .despacho-container .despacho-table th:last-child,
body.speas-app .despacho-container .despacho-table td:last-child {
    padding-right: 28px !important;
}

body.speas-app .calendar-module-container {
    max-width: min(100%, 1680px) !important;
    height: auto !important;
    min-height: calc(100vh - 130px) !important;
    padding: 24px 28px 64px !important;
    gap: 26px !important;
    box-sizing: border-box !important;
}

body.speas-app .calendar-module-container > .module-header {
    padding: 22px 28px 18px !important;
    margin: 0 !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

body.speas-app .calendar-module-container .calendar-wrapper {
    margin: 0 !important;
    border-radius: 18px !important;
    min-height: 680px !important;
    box-sizing: border-box !important;
}

body.speas-app .calendar-module-container .calendar-sidebar {
    padding: 34px 30px !important;
    gap: 18px !important;
    box-sizing: border-box !important;
}

body.speas-app .calendar-module-container .calendar-main-area {
    padding: 26px !important;
    box-sizing: border-box !important;
}

body.speas-app .calendar-module-container .fc-toolbar {
    gap: 18px !important;
}

body.speas-app .calendar-module-container .fc-toolbar-title {
    line-height: 1.2 !important;
}

body.speas-app .calendar-module-container .fc-scrollgrid th,
body.speas-app .calendar-module-container .fc-scrollgrid td {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

@media (max-width: 980px) {
    body.speas-app .table-module-container:has(#tabla-historial-body),
    body.speas-app .despacho-container,
    body.speas-app .calendar-module-container {
        padding: 18px 18px 56px !important;
    }

    body.speas-app .table-module-container:has(#tabla-historial-body) > .module-header,
    body.speas-app .despacho-container .despacho-header,
    body.speas-app .calendar-module-container > .module-header {
        padding: 18px 18px 16px !important;
        gap: 14px !important;
    }

    body.speas-app .despacho-container .despacho-actions,
    body.speas-app .table-module-container:has(#tabla-historial-body) > .table-toolbar {
        padding: 16px !important;
    }

    body.speas-app .calendar-module-container .calendar-wrapper {
        min-height: 620px !important;
    }
}

@media (max-width: 768px) {
    body.speas-app .calendar-module-container .calendar-wrapper {
        flex-direction: column !important;
        min-height: auto !important;
    }

    body.speas-app .calendar-module-container .calendar-sidebar {
        width: 100% !important;
        padding: 20px !important;
        border-right: 0 !important;
        border-bottom: 1px solid #5b6b80 !important;
    }

    body.speas-app .calendar-module-container .calendar-main-area {
        min-height: 620px !important;
        padding: 18px !important;
    }
}

@media (max-width: 600px) {
    body.speas-app .table-module-container:has(#tabla-historial-body),
    body.speas-app .despacho-container,
    body.speas-app .calendar-module-container {
        padding: 14px 14px 48px !important;
    }

    body.speas-app .table-module-container:has(#tabla-historial-body) > .module-header,
    body.speas-app .table-module-container:has(#tabla-historial-body) > .table-toolbar,
    body.speas-app .despacho-container .despacho-header,
    body.speas-app .despacho-container .despacho-actions,
    body.speas-app .calendar-module-container > .module-header {
        padding: 18px 16px !important;
    }

    body.speas-app .table-module-container:has(#tabla-historial-body) .premium-table th,
    body.speas-app .table-module-container:has(#tabla-historial-body) .premium-table td,
    body.speas-app .despacho-container .despacho-table th,
    body.speas-app .despacho-container .despacho-table td {
        padding: 14px 16px !important;
    }
}

/* Speas proveedores dark spacing and centered modals v44 */
body.speas-app .table-module-container:has(#tabla-proveedores-body) {
    max-width: min(100%, 1680px) !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 24px 28px 34px !important;
    gap: 24px !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) > .module-header {
    padding: 22px 28px 18px !important;
    margin: 0 !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) > .module-header h2 {
    margin: 0 0 8px !important;
    line-height: 1.18 !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) > .module-header p {
    margin: 0 !important;
    line-height: 1.35 !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) > .table-toolbar {
    padding: 18px 20px !important;
    margin: 0 !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) > .table-responsive {
    padding: 0 8px 8px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) .premium-table th {
    padding: 16px 24px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) .premium-table td {
    padding: 16px 24px !important;
    line-height: 1.35 !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) .premium-table th:first-child,
body.speas-app .table-module-container:has(#tabla-proveedores-body) .premium-table td:first-child {
    padding-left: 28px !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) .premium-table th:last-child,
body.speas-app .table-module-container:has(#tabla-proveedores-body) .premium-table td:last-child {
    padding-right: 28px !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) > .pagination {
    margin: 0 !important;
    padding: 10px 8px 0 !important;
    min-height: 0 !important;
}

body.speas-app #modal-proveedor.modal-overlay {
    align-items: center !important;
    justify-content: center !important;
    padding: 48px 32px !important;
    box-sizing: border-box !important;
}

body.speas-app #modal-proveedor.modal-overlay.active,
body.speas-app #modal-proveedor.modal-overlay:not(.hidden) {
    display: flex !important;
}

body.speas-app #modal-proveedor .modal-content {
    width: min(1040px, calc(100vw - 96px)) !important;
    max-width: min(1040px, calc(100vw - 96px)) !important;
    height: auto !important;
    max-height: calc(100dvh - 96px) !important;
    margin: auto !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    transform: none !important;
    box-shadow: 0 26px 70px rgba(3, 10, 20, 0.36) !important;
}

body.speas-app #modal-proveedor .modal-header {
    min-height: 78px !important;
    padding: 22px 38px !important;
    box-sizing: border-box !important;
}

body.speas-app #modal-proveedor .modal-body {
    max-height: calc(100dvh - 252px) !important;
    padding: 30px 38px 26px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

body.speas-app #modal-proveedor .modal-footer {
    position: sticky !important;
    bottom: 0 !important;
    padding: 22px 38px !important;
    gap: 14px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

body.speas-app #modal-proveedor .row-grid {
    gap: 18px !important;
}

body.speas-app #modal-proveedor .form-subtitle {
    margin: 28px 0 18px !important;
    padding-bottom: 8px !important;
    line-height: 1.2 !important;
}

body.speas-app #modal-proveedor .premium-table {
    margin: 0 0 26px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

body.speas-app #modal-proveedor .premium-table td {
    padding: 10px 12px !important;
}

body.speas-app #modal-acceso-b2b,
body.speas-app #modal-confirmar-proveedor,
body.speas-app #modal-copiar-datos {
    align-items: center !important;
    justify-content: center !important;
    padding: 32px !important;
    box-sizing: border-box !important;
}

body.speas-app #modal-acceso-b2b .modal-content,
body.speas-app #modal-confirmar-proveedor .modal-content,
body.speas-app #modal-copiar-datos .modal-content {
    transform: none !important;
    margin: auto !important;
    border-radius: 18px !important;
}

@media (min-width: 1400px) {
    body.speas-app #modal-proveedor .modal-content {
        width: min(1120px, calc(100vw - 140px)) !important;
        max-width: min(1120px, calc(100vw - 140px)) !important;
    }
}

@media (max-width: 980px) {
    body.speas-app .table-module-container:has(#tabla-proveedores-body) {
        padding: 18px 18px 34px !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) > .module-header,
    body.speas-app .table-module-container:has(#tabla-proveedores-body) > .table-toolbar {
        padding: 18px 18px 16px !important;
        gap: 14px !important;
    }

    body.speas-app #modal-proveedor.modal-overlay {
        padding: 34px 24px !important;
    }

    body.speas-app #modal-proveedor .modal-content {
        width: min(920px, calc(100vw - 48px)) !important;
        max-width: min(920px, calc(100vw - 48px)) !important;
        max-height: calc(100dvh - 68px) !important;
    }
}

@media (max-width: 600px) {
    body.speas-app .table-module-container:has(#tabla-proveedores-body) {
        padding: 14px 14px 34px !important;
    }

    body.speas-app #modal-proveedor.modal-overlay {
        padding: 14px !important;
    }

    body.speas-app #modal-proveedor .modal-content {
        width: calc(100vw - 28px) !important;
        max-width: calc(100vw - 28px) !important;
        max-height: calc(100dvh - 28px) !important;
        border-radius: 16px !important;
    }

    body.speas-app #modal-proveedor .modal-header,
    body.speas-app #modal-proveedor .modal-body,
    body.speas-app #modal-proveedor .modal-footer {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }
}

/* Speas proveedores viewport modal and scrollbar polish v45 */
body.speas-app #modal-proveedor.modal-overlay,
body.speas-app #modal-acceso-b2b,
body.speas-app #modal-confirmar-proveedor,
body.speas-app #modal-copiar-datos {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    z-index: 12000 !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-y: auto !important;
    background: rgba(8, 15, 26, 0.72) !important;
    backdrop-filter: blur(12px) saturate(120%) !important;
}

body.speas-app #modal-proveedor.modal-overlay {
    padding: 48px 32px !important;
}

body.speas-app #modal-acceso-b2b,
body.speas-app #modal-confirmar-proveedor,
body.speas-app #modal-copiar-datos {
    padding: 32px !important;
}

body.speas-app #modal-proveedor .modal-content {
    max-height: calc(100dvh - 96px) !important;
}

body.speas-app #modal-acceso-b2b .modal-content,
body.speas-app #modal-confirmar-proveedor .modal-content,
body.speas-app #modal-copiar-datos .modal-content {
    max-height: calc(100dvh - 64px) !important;
}

body.speas-app #modal-proveedor .modal-body,
body.speas-app #copy-modal-content {
    scrollbar-width: thin !important;
    scrollbar-color: #5eead4 #1f2a36 !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) > .table-responsive {
    height: auto !important;
    max-height: none !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) > .table-responsive > .premium-table {
    margin: 0 !important;
}

@media (min-width: 1800px) {
    body.speas-app .table-module-container:has(#tabla-proveedores-body) {
        max-width: min(100%, 1760px) !important;
    }
}

@media (max-width: 980px) {
    body.speas-app #modal-proveedor.modal-overlay {
        padding: 34px 24px !important;
    }

    body.speas-app #modal-proveedor .modal-content {
        max-height: calc(100dvh - 68px) !important;
    }
}

@media (max-width: 600px) {
    body.speas-app #modal-proveedor.modal-overlay,
    body.speas-app #modal-acceso-b2b,
    body.speas-app #modal-confirmar-proveedor,
    body.speas-app #modal-copiar-datos {
        padding: 14px !important;
    }

    body.speas-app #modal-proveedor .modal-content,
    body.speas-app #modal-acceso-b2b .modal-content,
    body.speas-app #modal-confirmar-proveedor .modal-content,
    body.speas-app #modal-copiar-datos .modal-content {
        max-height: calc(100dvh - 28px) !important;
    }
}

/* Speas proveedores true viewport centering v46 */
body.speas-app #modal-proveedor.modal-overlay,
body.speas-app #modal-acceso-b2b,
body.speas-app #modal-confirmar-proveedor,
body.speas-app #modal-copiar-datos {
    left: -96px !important;
    top: -78px !important;
    right: auto !important;
    bottom: auto !important;
}

@media (max-width: 600px) {
    body.speas-app #modal-proveedor.modal-overlay,
    body.speas-app #modal-acceso-b2b,
    body.speas-app #modal-confirmar-proveedor,
    body.speas-app #modal-copiar-datos {
        left: -16px !important;
        top: -74px !important;
    }
}

/* Speas proveedores side editor and category contrast v47 */
body.speas-app #modal-proveedor.modal-overlay {
    align-items: stretch !important;
    justify-content: flex-end !important;
    padding: 0 !important;
}

body.speas-app #modal-proveedor .modal-content.slide-in-right,
body.speas-app #modal-proveedor .modal-content {
    width: min(48vw, 920px) !important;
    min-width: 720px !important;
    max-width: calc(100vw - var(--sidebar-w, 96px) - 24px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 18px 0 0 18px !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    overflow: hidden !important;
    transform: none !important;
}

body.speas-app #modal-proveedor .modal-header {
    min-height: 96px !important;
    padding: 24px 38px !important;
}

body.speas-app #modal-proveedor .modal-body {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 28px 38px 32px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

body.speas-app #modal-proveedor .modal-footer {
    position: static !important;
    min-height: 86px !important;
    padding: 16px 38px !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

@media (min-width: 1600px) {
    body.speas-app #modal-proveedor .modal-content.slide-in-right,
    body.speas-app #modal-proveedor .modal-content {
        width: min(44vw, 980px) !important;
    }
}

@media (min-width: 721px) and (max-width: 1180px) {
    body.speas-app #modal-proveedor .modal-content.slide-in-right,
    body.speas-app #modal-proveedor .modal-content {
        width: min(82vw, 820px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 24px) !important;
    }
}

@media (max-width: 720px) {
    body.speas-app #modal-proveedor.modal-overlay {
        align-items: stretch !important;
        justify-content: flex-end !important;
        padding: 0 !important;
    }

    body.speas-app #modal-proveedor .modal-content.slide-in-right,
    body.speas-app #modal-proveedor .modal-content {
        width: 100vw !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
    }

    body.speas-app #modal-proveedor .modal-header,
    body.speas-app #modal-proveedor .modal-body,
    body.speas-app #modal-proveedor .modal-footer {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* Speas proveedores nested inputs dark borders v48 */

/* Speas proveedores bank account field layout v49 */
body.speas-app #modal-proveedor #lista-banco-erp tr {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 16px !important;
}

body.speas-app #modal-proveedor #lista-banco-erp td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
}

body.speas-app #modal-proveedor #lista-banco-erp td:nth-child(1) {
    grid-column: span 2 !important;
}

body.speas-app #modal-proveedor #lista-banco-erp td:nth-child(2) {
    grid-column: span 5 !important;
}

body.speas-app #modal-proveedor #lista-banco-erp td:nth-child(3) {
    grid-column: span 4 !important;
}

body.speas-app #modal-proveedor #lista-banco-erp td:nth-child(4) {
    grid-column: span 6 !important;
}

body.speas-app #modal-proveedor #lista-banco-erp td:nth-child(5) {
    grid-column: span 5 !important;
}

body.speas-app #modal-proveedor #lista-banco-erp td:nth-child(6) {
    grid-column: span 1 !important;
    display: flex !important;
    justify-content: center !important;
}

body.speas-app #modal-proveedor #lista-banco-erp [data-f="cuenta"],
body.speas-app #modal-proveedor #lista-banco-erp [data-f="cci"] {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 14px !important;
}

@media (max-width: 900px) {
    body.speas-app #modal-proveedor #lista-banco-erp td:nth-child(1),
    body.speas-app #modal-proveedor #lista-banco-erp td:nth-child(2),
    body.speas-app #modal-proveedor #lista-banco-erp td:nth-child(3),
    body.speas-app #modal-proveedor #lista-banco-erp td:nth-child(4),
    body.speas-app #modal-proveedor #lista-banco-erp td:nth-child(5) {
        grid-column: span 12 !important;
    }

    body.speas-app #modal-proveedor #lista-banco-erp td:nth-child(6) {
        grid-column: span 12 !important;
        justify-content: flex-end !important;
    }
}

/* Speas ordenes compra side panel and dark scroll polish v50 */
body.speas-app .modulo-container:has(#tabla-oc-interna) {
    padding: 30px 32px 28px !important;
}

body.speas-app .modulo-container:has(#tabla-oc-interna) .header-acciones {
    margin: 0 0 28px !important;
    padding: 16px 0 4px !important;
    gap: 22px !important;
}

body.speas-app .modulo-container:has(#tabla-oc-interna) .header-acciones h2 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.25 !important;
}

body.speas-app .modulo-container:has(#tabla-oc-interna) .table-responsive {
    margin-top: 0 !important;
}

body.speas-app #modal-crear-oc.modal-overlay {
    align-items: stretch !important;
    justify-content: flex-end !important;
    padding: 0 !important;
}

body.speas-app #modal-crear-oc.modal-overlay:not(.hidden) {
    display: flex !important;
}

body.speas-app #modal-crear-oc .modal-content {
    width: min(52vw, 1000px) !important;
    min-width: 820px !important;
    max-width: calc(100vw - var(--sidebar-w, 96px) - 24px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-radius: 18px 0 0 18px !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
    transform: none !important;
}

body.speas-app #modal-crear-oc .modal-header {
    min-height: 84px !important;
    padding: 24px 32px !important;
}

body.speas-app #modal-crear-oc .modal-body {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 28px 32px 34px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-width: thin !important;
    scrollbar-color: #5eead4 #263240 !important;
}

body.speas-app #modal-crear-oc .form-grid {
    gap: 22px 24px !important;
}

body.speas-app #modal-crear-oc .form-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    padding-top: 6px !important;
}

@media (min-width: 1600px) {
    body.speas-app #modal-crear-oc .modal-content {
        width: min(46vw, 1040px) !important;
    }
}

@media (min-width: 721px) and (max-width: 1180px) {
    body.speas-app #modal-crear-oc .modal-content {
        width: min(84vw, 860px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 24px) !important;
    }
}

@media (max-width: 720px) {
    body.speas-app .modulo-container:has(#tabla-oc-interna) {
        padding: 18px 16px 20px !important;
    }

    body.speas-app .modulo-container:has(#tabla-oc-interna) .header-acciones {
        padding-top: 8px !important;
    }

    body.speas-app #modal-crear-oc.modal-overlay:not(.hidden) {
        align-items: stretch !important;
        justify-content: flex-end !important;
        padding: 0 !important;
    }

    body.speas-app #modal-crear-oc .modal-content {
        width: 100vw !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
    }

    body.speas-app #modal-crear-oc .modal-header,
    body.speas-app #modal-crear-oc .modal-body {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* Speas creditos dark spacing and side modal polish v51 */
body.speas-app .module-container:has(#tabla-creditos-body),
body.speas-app .module-container:has(#form-simulador-rapido) {
    padding: 26px 32px 30px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .module-header-tabs {
    padding: 24px 26px !important;
    margin: 0 0 28px !important;
    gap: 22px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .header-titles h2 {
    margin: 0 0 8px !important;
    line-height: 1.25 !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .header-titles p {
    margin: 0 !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .tabs-wrapper {
    width: auto !important;
    min-width: 374px !important;
    padding: 8px !important;
    gap: 8px !important;
    border-radius: 14px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .tabs-wrapper .tab-btn {
    min-height: 48px !important;
    padding: 0 18px !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .kpi-resumen-bar {
    gap: 24px !important;
    margin: 0 0 28px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .kpi-card {
    padding: 24px 26px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .table-toolbar {
    padding: 20px !important;
    margin: 0 0 24px !important;
    gap: 18px !important;
    align-items: center !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .search-box {
    width: min(100%, 520px) !important;
    min-height: 50px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .search-box input {
    min-height: 50px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .actions-box .btn-primary {
    min-height: 50px !important;
    padding: 0 24px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .table-responsive {
    margin-top: 0 !important;
}

body.speas-app .module-container:has(#form-simulador-rapido) .simulation-wrapper {
    padding: 26px !important;
    border-radius: 16px !important;
    box-shadow: none !important;
}

body.speas-app .module-container:has(#form-simulador-rapido) .simulation-wrapper h3 {
    margin-bottom: 24px !important;
    padding-bottom: 16px !important;
}

body.speas-app .module-container:has(#form-simulador-rapido) .grid-row {
    gap: 22px !important;
    margin-bottom: 20px !important;
}

body.speas-app #modal-credito.modal-overlay {
    align-items: stretch !important;
    justify-content: flex-end !important;
    padding: 0 !important;
}

body.speas-app #modal-credito.modal-overlay.active {
    display: flex !important;
}

body.speas-app #modal-credito .modal-content {
    width: min(54vw, 1040px) !important;
    min-width: 840px !important;
    max-width: calc(100vw - var(--sidebar-w, 96px) - 24px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 18px 0 0 18px !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transform: none !important;
}

body.speas-app #modal-credito .modal-header {
    min-height: 92px !important;
    padding: 24px 32px !important;
}

body.speas-app #modal-credito .modal-body {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 28px 32px 34px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

body.speas-app #modal-credito .modal-footer {
    position: static !important;
    min-height: 86px !important;
    padding: 16px 32px !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 12px !important;
}

body.speas-app #modal-credito .flow-selector-container {
    gap: 24px !important;
    margin-bottom: 28px !important;
}

body.speas-app #modal-credito .flow-card {
    min-height: 132px !important;
    border-radius: 14px !important;
}

body.speas-app #modal-credito .grid-row {
    gap: 22px 24px !important;
}

body.speas-app #modal-credito .input-group input,
body.speas-app #modal-credito .input-group select {
    min-height: 52px !important;
}

@media (min-width: 1600px) {
    body.speas-app #modal-credito .modal-content {
        width: min(48vw, 1080px) !important;
    }
}

@media (min-width: 721px) and (max-width: 1180px) {
    body.speas-app #modal-credito .modal-content {
        width: min(84vw, 900px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 24px) !important;
    }
}

@media (max-width: 720px) {
    body.speas-app .module-container:has(#tabla-creditos-body),
    body.speas-app .module-container:has(#form-simulador-rapido) {
        padding: 18px 16px 22px !important;
    }

    body.speas-app .module-container:has(#tabla-creditos-body) .module-header-tabs {
        padding: 18px !important;
    }

    body.speas-app .module-container:has(#tabla-creditos-body) .tabs-wrapper {
        min-width: 0 !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.speas-app .module-container:has(#tabla-creditos-body) .table-toolbar {
        display: grid !important;
        grid-template-columns: 1fr !important;
        padding: 16px !important;
    }

    body.speas-app .module-container:has(#tabla-creditos-body) .search-box,
    body.speas-app .module-container:has(#tabla-creditos-body) .actions-box .btn-primary {
        width: 100% !important;
    }

    body.speas-app #modal-credito.modal-overlay.active {
        align-items: stretch !important;
        justify-content: flex-end !important;
        padding: 0 !important;
    }

    body.speas-app #modal-credito .modal-content {
        width: 100vw !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
    }

    body.speas-app #modal-credito .modal-header,
    body.speas-app #modal-credito .modal-body,
    body.speas-app #modal-credito .modal-footer {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    body.speas-app #modal-credito .flow-selector-container,
    body.speas-app #modal-credito .grid-row {
        grid-template-columns: 1fr !important;
    }

    body.speas-app #modal-credito .modal-footer {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
}

/* Speas global dark viewport scrollbar v52 */

/* Speas clientes dark spacing and side modal polish v53 */
body.speas-app .table-module-container:has(#tabla-clientes-body) {
    padding: 26px 32px 30px !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) > .module-header {
    padding: 22px 26px !important;
    margin-bottom: 24px !important;
    border-radius: 14px !important;
    gap: 16px !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) > .module-header .header-titles {
    min-width: 260px !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) > .module-header h2 {
    margin: 0 0 8px !important;
    line-height: 1.18 !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) > .module-header p {
    margin: 0 !important;
    line-height: 1.45 !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) > .table-toolbar {
    padding: 20px !important;
    margin-bottom: 24px !important;
    border-radius: 14px !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) > .table-toolbar .search-box {
    min-height: 50px !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) > .table-responsive {
    border-radius: 14px !important;
    overflow: auto !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) .premium-table th,
body.speas-app .table-module-container:has(#tabla-clientes-body) .premium-table td {
    padding: 16px 20px !important;
    vertical-align: middle !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) .premium-table th:first-child,
body.speas-app .table-module-container:has(#tabla-clientes-body) .premium-table td:first-child {
    padding-left: 24px !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) .premium-table th:last-child,
body.speas-app .table-module-container:has(#tabla-clientes-body) .premium-table td:last-child {
    padding-right: 24px !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) > .pagination {
    padding: 20px 0 0 !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) .kid-info {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 118px !important;
    padding: 8px 12px !important;
    border-radius: 10px !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) .kid-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) .kid-name,
body.speas-app .table-module-container:has(#tabla-clientes-body) .client-contact span {
    line-height: 1.35 !important;
}

body.speas-app .table-module-container:has(#tabla-clientes-body) .badge-cat {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 30px !important;
    padding: 7px 14px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

body.speas-app #modal-cliente.modal-overlay {
    align-items: stretch !important;
    justify-content: flex-end !important;
    padding: 0 !important;
}

body.speas-app #modal-cliente.modal-overlay.active {
    display: flex !important;
}

body.speas-app #modal-cliente .modal-content.slide-in-right {
    width: min(46vw, 920px) !important;
    min-width: 620px !important;
    max-width: calc(100vw - 32px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 18px 0 0 18px !important;
    display: grid !important;
    grid-template-rows: auto 1fr auto !important;
    overflow: hidden !important;
}

body.speas-app #modal-cliente .modal-header {
    padding: 28px 38px !important;
}

body.speas-app #modal-cliente .modal-body {
    padding: 28px 38px 34px !important;
    overflow: auto !important;
}

body.speas-app #modal-cliente .modal-footer {
    padding: 22px 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 14px !important;
}

body.speas-app #modal-cliente .row-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
}

body.speas-app #modal-cliente .input-group {
    margin-bottom: 18px !important;
}

body.speas-app #modal-cliente .input-group input,
body.speas-app #modal-cliente .input-group select {
    min-height: 54px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.speas-app #modal-cliente .form-subtitle {
    margin: 24px 0 18px !important;
    padding-bottom: 10px !important;
    line-height: 1.2 !important;
    letter-spacing: 0.02em !important;
}

@media (min-width: 1600px) {
    body.speas-app #modal-cliente .modal-content.slide-in-right {
        width: min(44vw, 980px) !important;
    }
}

@media (min-width: 721px) and (max-width: 1180px) {
    body.speas-app #modal-cliente .modal-content.slide-in-right {
        width: min(84vw, 900px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 24px) !important;
    }

    body.speas-app .table-module-container:has(#tabla-clientes-body) {
        padding: 22px 24px 28px !important;
    }
}

@media (max-width: 720px) {
    body.speas-app .table-module-container:has(#tabla-clientes-body) {
        padding: 18px 16px 22px !important;
    }

    body.speas-app .table-module-container:has(#tabla-clientes-body) > .module-header {
        padding: 18px !important;
        align-items: stretch !important;
    }

    body.speas-app .table-module-container:has(#tabla-clientes-body) > .module-header .btn-primary {
        width: 100% !important;
    }

    body.speas-app .table-module-container:has(#tabla-clientes-body) > .table-toolbar {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        padding: 16px !important;
    }

    body.speas-app .table-module-container:has(#tabla-clientes-body) > .table-responsive {
        max-width: 100% !important;
    }

    body.speas-app .table-module-container:has(#tabla-clientes-body) .premium-table {
        min-width: 760px !important;
    }

    body.speas-app .table-module-container:has(#tabla-clientes-body) .premium-table th,
    body.speas-app .table-module-container:has(#tabla-clientes-body) .premium-table td {
        padding: 14px 16px !important;
    }

    body.speas-app #modal-cliente.modal-overlay.active {
        align-items: stretch !important;
        justify-content: flex-end !important;
        padding: 0 !important;
    }

    body.speas-app #modal-cliente .modal-content.slide-in-right {
        width: 100vw !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
    }

    body.speas-app #modal-cliente .modal-header,
    body.speas-app #modal-cliente .modal-body,
    body.speas-app #modal-cliente .modal-footer {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    body.speas-app #modal-cliente .row-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    body.speas-app #modal-cliente .modal-footer {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
}

/* Speas clientes fixed viewport modal scroll v54 */
body.speas-app #modal-cliente.modal-overlay,
body.speas-app #modal-cliente.modal-overlay.active {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    overflow: hidden !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    z-index: 10000 !important;
    overscroll-behavior: contain !important;
}

body.speas-app #modal-cliente .modal-content.slide-in-right,
body.speas-app #modal-cliente.modal-overlay.active .modal-content.slide-in-right {
    position: relative !important;
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    align-self: stretch !important;
    margin: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    transform: none !important;
    overflow: hidden !important;
}

body.speas-app #modal-cliente .modal-header,
body.speas-app #modal-cliente .modal-footer {
    flex: 0 0 auto !important;
    position: relative !important;
    z-index: 2 !important;
}

body.speas-app #modal-cliente .modal-body {
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    scrollbar-gutter: stable !important;
}

@media (min-width: 721px) {
    body.speas-app #modal-cliente .modal-content.slide-in-right,
    body.speas-app #modal-cliente.modal-overlay.active .modal-content.slide-in-right {
        border-radius: 18px 0 0 18px !important;
    }
}

@media (max-width: 720px) {
    body.speas-app #modal-cliente .modal-content.slide-in-right,
    body.speas-app #modal-cliente.modal-overlay.active .modal-content.slide-in-right {
        border-radius: 0 !important;
    }
}

/* Speas clientes modal safe gutter and responsive form v55 */
body.speas-app #modal-cliente.modal-overlay,
body.speas-app #modal-cliente.modal-overlay.active {
    width: 100% !important;
    max-width: 100% !important;
}

body.speas-app #modal-cliente .modal-content.slide-in-right,
body.speas-app #modal-cliente.modal-overlay.active .modal-content.slide-in-right {
    box-sizing: border-box !important;
    max-width: calc(100dvw - 28px) !important;
    margin-right: 0 !important;
}

body.speas-app #modal-cliente .modal-body {
    box-sizing: border-box !important;
    padding-right: max(46px, calc(38px + env(safe-area-inset-right))) !important;
}

body.speas-app #modal-cliente #form-cliente,
body.speas-app #modal-cliente .input-group,
body.speas-app #modal-cliente .row-grid {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.speas-app #modal-cliente .input-group input,
body.speas-app #modal-cliente .input-group select {
    max-width: 100% !important;
}

@media (min-width: 981px) and (max-width: 1180px) {
    body.speas-app #modal-cliente .modal-content.slide-in-right,
    body.speas-app #modal-cliente.modal-overlay.active .modal-content.slide-in-right {
        width: min(88vw, 900px) !important;
        max-width: calc(100dvw - 28px) !important;
    }
}

@media (min-width: 721px) and (max-width: 980px) {
    body.speas-app #modal-cliente .modal-content.slide-in-right,
    body.speas-app #modal-cliente.modal-overlay.active .modal-content.slide-in-right {
        width: min(90vw, 760px) !important;
        min-width: 0 !important;
        max-width: calc(100dvw - 28px) !important;
        border-radius: 18px 0 0 18px !important;
    }

    body.speas-app #modal-cliente .modal-header,
    body.speas-app #modal-cliente .modal-footer {
        padding-left: 30px !important;
        padding-right: 34px !important;
    }

    body.speas-app #modal-cliente .modal-body {
        padding-left: 30px !important;
        padding-right: 48px !important;
    }

    body.speas-app #modal-cliente .row-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
}

@media (max-width: 720px) {
    body.speas-app #modal-cliente .modal-content.slide-in-right,
    body.speas-app #modal-cliente.modal-overlay.active .modal-content.slide-in-right {
        max-width: 100dvw !important;
    }

    body.speas-app #modal-cliente .modal-body {
        padding-right: max(28px, calc(20px + env(safe-area-inset-right))) !important;
    }
}

/* Speas admin dark modules spacing pass v56 */

body.speas-app .crm-container,
body.speas-app .analytics-container,
body.speas-app .control-container,
body.speas-app .config-container,
body.speas-app .profile-container-premium {
    box-sizing: border-box;
    width: 100%;
}

body.speas-app .crm-container,
body.speas-app .analytics-container,
body.speas-app .control-container {
    padding: clamp(18px, 2vw, 32px) !important;
    gap: 22px !important;
}

body.speas-app .config-container,
body.speas-app .profile-container-premium {
    padding: clamp(18px, 2.2vw, 34px) !important;
}

body.speas-app .crm-container .module-header,
body.speas-app .analytics-container .module-header,
body.speas-app .control-container .control-header,
body.speas-app .config-container .module-header {
    padding: clamp(20px, 1.8vw, 30px) !important;
    margin: 0 0 22px !important;
    border: 1px solid var(--speas-border) !important;
    border-radius: 18px !important;
}

body.speas-app .crm-container .header-left,
body.speas-app .analytics-container .title-wrapper,
body.speas-app .control-container .control-header,
body.speas-app .config-container .module-header > div {
    min-width: 0;
}

body.speas-app .crm-container h2,
body.speas-app .analytics-container h2,
body.speas-app .control-container h2,
body.speas-app .config-container h2,
body.speas-app .profile-container-premium h2,
body.speas-app .profile-container-premium h3 {
    color: var(--speas-text) !important;
    text-shadow: none !important;
}

body.speas-app .crm-container p,
body.speas-app .analytics-container p,
body.speas-app .control-container p,
body.speas-app .config-container p,
body.speas-app .profile-container-premium p {
    color: var(--speas-muted) !important;
}

/* CRM / Leads */
body.speas-app .crm-container .header-actions {
    gap: 14px !important;
    flex-wrap: wrap !important;
}

body.speas-app .crm-container .table-responsive {
    min-height: 360px;
    border: 1px solid var(--speas-border) !important;
    border-radius: 18px !important;
    overflow: auto !important;
}

body.speas-app .crm-container .crm-table th,
body.speas-app .crm-container .crm-table td {
    padding: 14px 16px !important;
    border-color: var(--speas-border) !important;
}

body.speas-app .crm-container .crm-table th {
    white-space: nowrap;
}

/* Analitica */
body.speas-app .analytics-container .summary-cards-grid,
body.speas-app .analytics-container .charts-grid {
    gap: clamp(18px, 1.7vw, 28px) !important;
}

body.speas-app .analytics-container .toolbar-container,
body.speas-app .analytics-container .chart-card,
body.speas-app .analytics-container .table-responsive-modern {
    box-sizing: border-box !important;
    max-width: 100% !important;
    border-radius: 18px !important;
    padding: clamp(18px, 1.6vw, 26px) !important;
    border: 1px solid var(--speas-border) !important;
}

body.speas-app .analytics-container .table-responsive-modern {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

body.speas-app .analytics-container .premium-table {
    min-width: 780px !important;
}

body.speas-app .analytics-container .modern-input,
body.speas-app .analytics-container .modern-select {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

body.speas-app .analytics-container canvas {
    display: block !important;
    max-width: 100% !important;
}

body.speas-app .analytics-container .pnl-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 96px !important;
    padding: 7px 12px !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
}

body.speas-app .analytics-container .pnl-pill.pnl-positive {
    background: #dcfce7 !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
}

body.speas-app .analytics-container .pnl-pill.pnl-negative {
    background: #fee2e2 !important;
    border: 1px solid #fecaca !important;
    color: #b91c1c !important;
}

/* Auditoria */
body.speas-app .control-container .control-actions,
body.speas-app .control-container .audit-filters,
body.speas-app .control-container .audit-pagination {
    gap: 14px !important;
    flex-wrap: wrap !important;
}

body.speas-app .control-container .audit-panel {
    padding: clamp(18px, 1.8vw, 28px) !important;
    border-radius: 18px !important;
    border: 1px solid var(--speas-border) !important;
}

body.speas-app .control-container .audit-filters {
    padding: 18px !important;
    border-radius: 16px !important;
}

body.speas-app .control-container .table-wrap-control {
    border-radius: 16px !important;
    overflow: auto !important;
    border: 1px solid var(--speas-border) !important;
}

body.speas-app .control-container .table-wrap-control th,
body.speas-app .control-container .table-wrap-control td {
    padding: 13px 14px !important;
}

/* Configuracion */
body.speas-app .config-container {
    max-width: min(1380px, 100%) !important;
}

body.speas-app .config-container .grid-layout {
    gap: 26px !important;
}

body.speas-app .config-container .card-block,
body.speas-app .config-container .full-width-card,
body.speas-app .config-container .sedes-list-card,
body.speas-app .config-container .sede-form-card {
    padding: clamp(22px, 1.8vw, 32px) !important;
    border-radius: 18px !important;
    border: 1px solid var(--speas-border) !important;
}

body.speas-app .config-container .selected-row {
    box-shadow: inset 4px 0 0 #4de1d2 !important;
}

body.speas-app .config-container .salon-section-toolbar {
    align-items: center !important;
    gap: 18px !important;
    margin-bottom: 18px !important;
}

body.speas-app .config-container .salon-sede-selector {
    width: min(360px, 100%) !important;
    min-width: 260px !important;
    margin-bottom: 0 !important;
}

body.speas-app .config-container .salon-sede-selector select {
    min-height: 48px !important;
    padding-right: 46px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer !important;
}

body.speas-app .config-container .salon-sede-arrow {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #64748b !important;
    font-size: 1.35rem !important;
    pointer-events: none !important;
    transition: color 0.18s ease, transform 0.18s ease !important;
}

body.speas-app .config-container .salon-sede-selector:focus-within .salon-sede-arrow {
    color: #14b8a6 !important;
    transform: translateY(-50%) rotate(180deg) !important;
}

body.speas-app .config-container .is-panel-focus {
    animation: speasPanelFocus 1.15s ease-out 1;
}

@keyframes speasPanelFocus {
    0% { box-shadow: 0 0 0 0 rgba(77, 225, 210, 0.45); }
    55% { box-shadow: 0 0 0 8px rgba(77, 225, 210, 0.18); }
    100% { box-shadow: 0 0 0 0 rgba(77, 225, 210, 0); }
}

/* Perfil */
body.speas-app .profile-container-premium {
    max-width: min(1500px, 100%) !important;
    grid-template-columns: minmax(300px, 370px) minmax(0, 1fr) !important;
}

body.speas-app .profile-sidebar-card,
body.speas-app .profile-content-card {
    border: 1px solid var(--speas-border) !important;
    border-radius: 20px !important;
}

@media (max-width: 1180px) {
    body.speas-app .crm-container .module-header,
    body.speas-app .analytics-container .module-header,
    body.speas-app .control-container .control-header,
    body.speas-app .config-container .module-header {
        align-items: flex-start !important;
    }

    body.speas-app .analytics-container .filters-wrapper,
    body.speas-app .analytics-container .actions-wrapper,
    body.speas-app .control-container .audit-filters {
        width: 100% !important;
    }

    body.speas-app .profile-container-premium {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 780px) {
    body.speas-app .crm-container,
    body.speas-app .analytics-container,
    body.speas-app .control-container,
    body.speas-app .config-container,
    body.speas-app .profile-container-premium {
        padding: 16px !important;
    }

    body.speas-app .crm-container .module-header,
    body.speas-app .analytics-container .module-header,
    body.speas-app .control-container .control-header,
    body.speas-app .config-container .module-header {
        padding: 18px !important;
    }

    body.speas-app .crm-container .header-actions,
    body.speas-app .analytics-container .toolbar-container,
    body.speas-app .analytics-container .filters-wrapper,
    body.speas-app .analytics-container .actions-wrapper,
    body.speas-app .config-container .form-row,
    body.speas-app .profile-container-premium .form-grid-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }

    body.speas-app .crm-container .search-box,
    body.speas-app .analytics-container .modern-input,
    body.speas-app .analytics-container .modern-select,
    body.speas-app .config-container .search-box-simple {
        width: 100% !important;
        min-width: 0 !important;
    }

    body.speas-app .config-container .salon-section-toolbar {
        align-items: stretch !important;
    }

    body.speas-app .config-container .salon-sede-selector {
        width: 100% !important;
        min-width: 0 !important;
    }

    body.speas-app .analytics-container .charts-grid {
        grid-template-columns: 1fr !important;
    }

    body.speas-app .analytics-container .chart-body {
        height: 360px !important;
    }

    body.speas-app .config-container .grid-layout {
        grid-template-columns: 1fr !important;
        grid-template-areas: "photo" "info" "security" !important;
    }
}

/* Speas enterprise density v62 */
@media (min-width: 769px) {
    :root {
        --sidebar-width: 232px;
        --sidebar-close-width: 70px;
        --speas-input-h: 32px;
        --speas-topbar-h: 46px;
    }

    html {
        font-size: 13px;
    }

    body.speas-app {
        font-size: 12px !important;
    }

    body.speas-app .home {
        padding: 9px 14px 14px !important;
    }

    body.speas-app .header-text {
        min-height: var(--speas-topbar-h) !important;
        margin-bottom: 8px !important;
        padding: 0 10px 0 12px !important;
        border-radius: 10px !important;
    }

    body.speas-app #titulo-modulo,
    body.speas-app .home .text {
        font-size: 16px !important;
        line-height: 1.15 !important;
    }

    body.speas-app .speas-top-search {
        width: min(300px, 24vw) !important;
        height: 32px !important;
    }

    body.speas-app .speas-top-search input {
        font-size: 12px !important;
        height: 30px !important;
    }

    body.speas-app .speas-theme-switch {
        height: 32px !important;
    }

    body.speas-app .speas-theme-btn {
        width: 30px !important;
        height: 28px !important;
    }

    body.speas-app .sidebar {
        padding-top: 9px !important;
    }

    body.speas-app .sidebar header {
        margin-bottom: 8px !important;
    }

    body.speas-app .sidebar .image-text {
        min-height: 46px !important;
    }

    body.speas-app .sidebar .image .logo-icon {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
        font-size: 25px !important;
    }

    body.speas-app .sidebar li {
        height: 36px !important;
        margin-top: 3px !important;
    }

    body.speas-app .sidebar li .icon {
        font-size: 17px !important;
    }

    body.speas-app .sidebar li .text {
        font-size: 12px !important;
    }

    body.speas-app .sidebar.close:not(:hover):not(.mobile-active) .menu {
        padding: 0 10px 16px !important;
    }

    body.speas-app .sidebar.close:not(:hover):not(.mobile-active) li a {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
    }

    body.speas-app .sidebar.close:not(:hover):not(.mobile-active) li .icon {
        width: 44px !important;
        flex-basis: 44px !important;
    }

    body.speas-app .profile-img {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
    }

    body.speas-app .profile-card {
        padding: 9px 11px !important;
        margin-bottom: 8px !important;
    }

    body.speas-app .contenedor-modulo {
        font-size: 12px !important;
    }

    body.speas-app :is(input, select, textarea, button) {
        font-size: 12px;
    }

    body.speas-app :is(.btn, .btn-primary, .btn-secondary, .btn-excel, .action-btn, .cat-btn, .meta-pill, .status-pill) {
        min-height: 30px !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        font-size: 11.5px !important;
    }

    body.speas-app :is(.module-header, .control-header, .catalog-title-bar, .section-toolbar, .header-acciones, .toolbar-container) h1,
    body.speas-app :is(.module-header, .control-header, .catalog-title-bar, .section-toolbar, .header-acciones, .toolbar-container) h2,
    body.speas-app :is(.module-header, .control-header, .catalog-title-bar, .section-toolbar, .header-acciones, .toolbar-container) h3 {
        font-size: 16px !important;
        line-height: 1.2 !important;
    }

    body.speas-app :is(.module-header, .control-header, .catalog-title-bar, .section-toolbar, .header-acciones, .toolbar-container) p {
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    body.speas-app :is(table, .table-custom, .premium-table, .simple-table, .data-table) th,
    body.speas-app :is(table, .table-custom, .premium-table, .simple-table, .data-table) td {
        padding: 8px 10px !important;
        font-size: 12px !important;
        line-height: 1.28 !important;
    }

    body.speas-app :is(.status-badge, .status-pill, .badge, .chip, .role-tag, .method-badge) {
        font-size: 10.5px !important;
        padding: 4px 8px !important;
        min-height: 0 !important;
    }

    body.speas-app .pos-container {
        height: calc(100vh - 64px) !important;
        gap: 18px !important;
        padding-bottom: 6px !important;
    }

    body.speas-app .pos-catalog {
        padding: 18px !important;
        border-radius: 14px !important;
    }

    body.speas-app .catalog-header {
        gap: 11px !important;
        margin-bottom: 14px !important;
    }

    body.speas-app .catalog-title-bar h2 {
        font-size: 17px !important;
    }

    body.speas-app .catalog-title-bar p {
        font-size: 12px !important;
    }

    body.speas-app .search-bar input {
        min-height: 38px !important;
        padding: 9px 14px 9px 42px !important;
        border-radius: 10px !important;
        font-size: 12px !important;
    }

    body.speas-app .search-bar i {
        left: 14px !important;
        font-size: 17px !important;
    }

    body.speas-app .category-tabs {
        gap: 7px !important;
        padding-bottom: 4px !important;
    }

    body.speas-app .cat-btn {
        padding-left: 14px !important;
        padding-right: 14px !important;
        border-radius: 8px !important;
    }

    body.speas-app .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)) !important;
        gap: 14px !important;
        padding: 4px 8px 28px 4px !important;
    }

    body.speas-app .product-card {
        min-height: 122px !important;
        padding: 12px !important;
        gap: 8px !important;
        border-radius: 13px !important;
    }

    body.speas-app .product-icon {
        width: 38px !important;
        height: 38px !important;
        border-radius: 11px !important;
    }

    body.speas-app .product-icon i {
        font-size: 19px !important;
    }

    body.speas-app .product-name {
        font-size: 12.5px !important;
        line-height: 1.2 !important;
        height: 2.45em !important;
        margin-bottom: 5px !important;
    }

    body.speas-app .product-price {
        font-size: 15.5px !important;
        line-height: 1.1 !important;
    }

    body.speas-app .badge-stock {
        font-size: 10px !important;
        padding: 2px 7px !important;
    }

    body.speas-app .pos-ticket {
        width: 330px !important;
        border-radius: 14px !important;
    }

    body.speas-app .ticket-header {
        padding: 14px 16px !important;
        border-radius: 14px 14px 0 0 !important;
    }

    body.speas-app .ticket-icon {
        width: 30px !important;
        height: 30px !important;
        border-radius: 10px !important;
    }

    body.speas-app .ticket-header h3 {
        font-size: 14px !important;
    }

    body.speas-app .ticket-subtitle {
        font-size: 10.5px !important;
    }

    body.speas-app .ticket-items {
        padding: 16px !important;
    }

    body.speas-app .cart-item {
        margin-bottom: 11px !important;
        padding-bottom: 11px !important;
    }

    body.speas-app .item-info h4 {
        font-size: 12.5px !important;
    }

    body.speas-app .item-info p,
    body.speas-app .summary-row {
        font-size: 11.5px !important;
    }

    body.speas-app .qty-btn {
        width: 23px !important;
        height: 23px !important;
    }

    body.speas-app .item-total {
        font-size: 13px !important;
    }

    body.speas-app .ticket-footer {
        padding: 16px !important;
        border-radius: 0 0 14px 14px !important;
    }

    body.speas-app .summary-row.total {
        font-size: 16px !important;
        margin-top: 10px !important;
        padding-top: 10px !important;
    }

    body.speas-app .btn-checkout {
        padding: 11px !important;
        margin-top: 12px !important;
        border-radius: 10px !important;
        font-size: 12.5px !important;
    }
}

@media (min-width: 1440px) {
    body.speas-app .home {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.speas-app .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    }
}

/* Speas shell edge alignment v63 */
@media (min-width: 769px) {
    body.speas-app .home,
    body.speas-app .sidebar.close ~ .home {
        position: fixed !important;
        left: var(--sidebar-close-width) !important;
        right: 0 !important;
        width: auto !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }

    /* El menú compacto se expande al pasar el puntero. El contenido debe viajar
       con él; si conserva el desplazamiento compacto, los primeros 160 px del
       módulo quedan debajo del menú y aparentan pertenecer a otra pantalla. */
    body.speas-app .sidebar.close:hover ~ .home {
        left: var(--sidebar-width) !important;
    }

    body.speas-app .header-text,
    body.speas-app .contenedor-modulo {
        max-width: none !important;
    }
}

/* Speas global compact density v64 */
@media (min-width: 1024px) {
    :root {
        --sidebar-close-width: 64px;
        --speas-input-h: 30px;
        --speas-topbar-h: 40px;
        --speas-radius: 11px;
        --speas-radius-sm: 8px;
    }

    html {
        font-size: 12px;
    }

    body.speas-app {
        font-size: 11px !important;
    }

    body.speas-app .home {
        padding: 7px 11px 11px !important;
    }

    body.speas-app .header-text {
        min-height: 40px !important;
        margin-bottom: 7px !important;
        padding: 0 8px 0 10px !important;
        border-radius: 9px !important;
    }

    body.speas-app #titulo-modulo,
    body.speas-app .home .text {
        font-size: 14.5px !important;
        line-height: 1.1 !important;
    }

    body.speas-app .speas-top-search {
        width: min(270px, 22vw) !important;
        height: 29px !important;
        gap: 6px !important;
        padding: 0 8px !important;
        border-radius: 9px !important;
    }

    body.speas-app .speas-top-search i {
        font-size: 15px !important;
    }

    body.speas-app .speas-top-search input {
        height: 27px !important;
        font-size: 10.8px !important;
    }

    body.speas-app .speas-top-search span {
        padding: 1px 5px !important;
        font-size: 9.5px !important;
    }

    body.speas-app .speas-theme-switch {
        height: 29px !important;
        gap: 2px !important;
    }

    body.speas-app .speas-theme-btn {
        width: 26px !important;
        height: 25px !important;
    }

    body.speas-app .sidebar {
        padding-top: 7px !important;
    }

    body.speas-app .sidebar header {
        margin-bottom: 6px !important;
        padding-left: 7px !important;
        padding-right: 7px !important;
    }

    body.speas-app .sidebar .image-text {
        min-height: 40px !important;
    }

    body.speas-app .sidebar .image .logo-icon {
        width: 32px !important;
        height: 32px !important;
        border-radius: 9px !important;
        font-size: 22px !important;
    }

    body.speas-app .sidebar li {
        height: 32px !important;
        margin-top: 2px !important;
        padding-left: 7px !important;
        padding-right: 7px !important;
    }

    body.speas-app .sidebar li .icon {
        font-size: 15.5px !important;
    }

    body.speas-app .sidebar li .text {
        font-size: 11px !important;
    }

    body.speas-app .sidebar.close:not(:hover):not(.mobile-active) .menu {
        padding: 0 8px 12px !important;
    }

    body.speas-app .sidebar.close:not(:hover):not(.mobile-active) li a {
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
    }

    body.speas-app .sidebar.close:not(:hover):not(.mobile-active) li .icon {
        width: 40px !important;
        flex-basis: 40px !important;
    }

    body.speas-app .profile-img {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
    }

    body.speas-app .profile-card {
        padding: 7px 8px !important;
        margin-bottom: 7px !important;
        border-radius: 10px !important;
    }

    body.speas-app .contenedor-modulo {
        font-size: 11px !important;
    }

    body.speas-app :is(.module-header, .page-header, .control-header, .catalog-title-bar, .section-toolbar, .toolbar-container, .header-acciones, .dashboard-hero, .dashboard-card, .card, .panel, .kpi-card, .metric-card, .summary-card, .table-container, .filters-card) {
        border-radius: 11px !important;
    }

    body.speas-app :is(.module-header, .page-header, .control-header, .section-toolbar, .toolbar-container, .header-acciones, .dashboard-hero) {
        padding: 12px 14px !important;
        margin-bottom: 10px !important;
    }

    body.speas-app :is(.card, .panel, .kpi-card, .metric-card, .summary-card, .table-container, .filters-card) {
        padding: 12px !important;
    }

    body.speas-app :is(.module-header, .page-header, .control-header, .catalog-title-bar, .section-toolbar, .toolbar-container, .header-acciones) h1,
    body.speas-app :is(.module-header, .page-header, .control-header, .catalog-title-bar, .section-toolbar, .toolbar-container, .header-acciones) h2,
    body.speas-app :is(.module-header, .page-header, .control-header, .catalog-title-bar, .section-toolbar, .toolbar-container, .header-acciones) h3,
    body.speas-app .contenedor-modulo h1,
    body.speas-app .contenedor-modulo h2 {
        font-size: 14.5px !important;
        line-height: 1.15 !important;
    }

    body.speas-app .contenedor-modulo h3 {
        font-size: 13px !important;
        line-height: 1.15 !important;
    }

    body.speas-app :is(.module-header, .page-header, .control-header, .catalog-title-bar, .section-toolbar, .toolbar-container, .header-acciones) p,
    body.speas-app .contenedor-modulo p,
    body.speas-app .muted-line {
        font-size: 10.8px !important;
        line-height: 1.3 !important;
    }

    body.speas-app :is(input, select, textarea) {
        min-height: 30px !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
    }

    body.speas-app textarea {
        min-height: 70px !important;
    }

    body.speas-app :is(button, .btn, .btn-primary, .btn-secondary, .btn-excel, .action-btn, .cat-btn, .meta-pill, .status-pill, .tab-btn, .filter-btn) {
        min-height: 28px !important;
        padding: 5px 10px !important;
        font-size: 10.8px !important;
        border-radius: 8px !important;
    }

    body.speas-app :is(table, .table-custom, .premium-table, .simple-table, .data-table) th,
    body.speas-app :is(table, .table-custom, .premium-table, .simple-table, .data-table) td {
        padding: 6px 8px !important;
        font-size: 11px !important;
        line-height: 1.22 !important;
    }

    body.speas-app :is(.status-badge, .status-pill, .badge, .chip, .role-tag, .method-badge) {
        font-size: 9.8px !important;
        padding: 3px 7px !important;
        border-radius: 7px !important;
    }

    body.speas-app :is(.stats-grid, .kpi-grid, .metrics-grid, .dashboard-grid, .charts-grid, .cards-grid, .quick-actions-grid) {
        gap: 10px !important;
    }

    body.speas-app :is(.pagination, .pagination-controls, .table-footer) {
        gap: 7px !important;
        font-size: 10.8px !important;
    }

    body.speas-app :is(.pagination button, .pagination-controls button) {
        width: 28px !important;
        height: 28px !important;
        min-height: 28px !important;
    }

    body.speas-app .modal-content,
    body.speas-app .side-modal,
    body.speas-app .drawer-modal {
        font-size: 11px !important;
    }

    body.speas-app .modal-header {
        padding: 12px 16px !important;
    }

    body.speas-app .modal-body {
        padding: 14px 16px !important;
    }

    body.speas-app .modal-footer {
        padding: 12px 16px !important;
    }

    body.speas-app .pos-container {
        height: calc(100vh - 54px) !important;
        gap: 14px !important;
    }

    body.speas-app .pos-catalog {
        padding: 14px !important;
        border-radius: 12px !important;
    }

    body.speas-app .catalog-header {
        gap: 9px !important;
        margin-bottom: 11px !important;
    }

    body.speas-app .search-bar input {
        min-height: 32px !important;
        padding: 7px 12px 7px 36px !important;
        font-size: 11px !important;
    }

    body.speas-app .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)) !important;
        gap: 11px !important;
        padding: 3px 6px 22px 3px !important;
    }

    body.speas-app .product-card {
        min-height: 104px !important;
        padding: 10px !important;
        gap: 6px !important;
        border-radius: 11px !important;
    }

    body.speas-app .product-icon {
        width: 32px !important;
        height: 32px !important;
        border-radius: 9px !important;
    }

    body.speas-app .product-icon i {
        font-size: 16px !important;
    }

    body.speas-app .product-name {
        font-size: 11px !important;
        height: 2.35em !important;
        margin-bottom: 3px !important;
    }

    body.speas-app .product-price {
        font-size: 13.5px !important;
    }

    body.speas-app .badge-stock {
        font-size: 9px !important;
        padding: 2px 6px !important;
    }

    body.speas-app .pos-ticket {
        width: 292px !important;
        border-radius: 12px !important;
    }

    body.speas-app .ticket-header,
    body.speas-app .ticket-items,
    body.speas-app .ticket-footer {
        padding: 12px !important;
    }

    body.speas-app .ticket-icon {
        width: 27px !important;
        height: 27px !important;
        border-radius: 8px !important;
    }

    body.speas-app .ticket-header h3 {
        font-size: 12.5px !important;
    }

    body.speas-app .ticket-subtitle {
        font-size: 9.5px !important;
    }

    body.speas-app .summary-row.total {
        font-size: 14px !important;
    }

    body.speas-app .btn-checkout {
        padding: 9px !important;
        font-size: 11px !important;
    }
}

/* Speas normal/soft clarity and density v65 */

@media (min-width: 1024px) {
    html {
        font-size: 11.2px;
    }

    body.speas-app {
        font-size: 10.5px !important;
    }

    body.speas-app .home {
        padding: 6px 9px 9px !important;
    }

    body.speas-app .header-text {
        min-height: 36px !important;
        margin-bottom: 6px !important;
        padding: 0 7px 0 9px !important;
    }

    body.speas-app #titulo-modulo,
    body.speas-app .home .text {
        font-size: 13.6px !important;
    }

    body.speas-app .contenedor-modulo {
        font-size: 10.5px !important;
    }

    body.speas-app :is(.module-header, .page-header, .control-header, .section-toolbar, .toolbar-container, .header-acciones, .dashboard-hero) {
        padding: 10px 12px !important;
        margin-bottom: 8px !important;
    }

    body.speas-app :is(.card, .panel, .kpi-card, .metric-card, .summary-card, .table-container, .filters-card) {
        padding: 10px !important;
    }

    body.speas-app :is(.module-header, .page-header, .control-header, .catalog-title-bar, .section-toolbar, .toolbar-container, .header-acciones) h1,
    body.speas-app :is(.module-header, .page-header, .control-header, .catalog-title-bar, .section-toolbar, .toolbar-container, .header-acciones) h2,
    body.speas-app :is(.module-header, .page-header, .control-header, .catalog-title-bar, .section-toolbar, .toolbar-container, .header-acciones) h3,
    body.speas-app .contenedor-modulo h1,
    body.speas-app .contenedor-modulo h2 {
        font-size: 13.8px !important;
    }

    body.speas-app :is(input, select, textarea) {
        min-height: 28px !important;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
        font-size: 10.5px !important;
    }

    body.speas-app :is(button, .btn, .btn-primary, .btn-secondary, .btn-excel, .action-btn, .cat-btn, .meta-pill, .status-pill, .tab-btn, .filter-btn) {
        min-height: 26px !important;
        padding: 4px 9px !important;
        font-size: 10.3px !important;
    }

    body.speas-app :is(table, .table-custom, .premium-table, .simple-table, .data-table) th,
    body.speas-app :is(table, .table-custom, .premium-table, .simple-table, .data-table) td {
        padding: 5px 7px !important;
        font-size: 10.4px !important;
    }

    body.speas-app .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)) !important;
        gap: 10px !important;
    }

    body.speas-app .product-card {
        min-height: 94px !important;
        padding: 9px !important;
    }

    body.speas-app .pos-ticket {
        width: 270px !important;
    }

    body.speas-app .modal-header,
    body.speas-app .modal-body,
    body.speas-app .modal-footer {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

/* Speas normal/soft module hardening v66 */

@media (min-width: 1024px) {
    body.speas-app :is(.saldo-card, .cash-balance-card, .balance-main-card) {
        padding: 14px !important;
    }

    body.speas-app :is(.saldo-card, .cash-balance-card, .balance-main-card) :is(h1, h2, .amount, .balance-amount) {
        font-size: 16px !important;
    }

    body.speas-app :is(.fc-button) {
        padding: 4px 8px !important;
        font-size: 10.2px !important;
    }

    body.speas-app :is(.fc-col-header-cell, .fc-daygrid-day-frame) {
        padding: 4px !important;
    }
}

/* Speas global density and light theme viewport hardening v67 */
body.speas-app {
    overflow-x: hidden !important;
}

body.speas-app .home {
    box-sizing: border-box !important;
    max-width: calc(100vw - var(--sidebar-close-width, 80px)) !important;
}

body.speas-app .sidebar:not(.close) ~ .home {
    max-width: calc(100vw - var(--sidebar-width, 260px)) !important;
}

body.speas-app .contenedor-modulo,
body.speas-app .contenedor-modulo > * {
    box-sizing: border-box !important;
}

body.speas-app .contenedor-modulo {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
}

body.speas-app :is(.table-responsive, .table-scroll, .table-responsive-kardex, .products-wrapper, .category-tabs, .tabs-wrapper, .modal-body, .drawer-body, .sidebar .menu) {
    scrollbar-width: thin !important;
}

body.speas-app :is(.table-responsive, .table-scroll, .table-responsive-kardex, .products-wrapper, .category-tabs, .tabs-wrapper, .modal-body, .drawer-body, .sidebar .menu)::-webkit-scrollbar {
    display: block !important;
    width: 10px !important;
    height: 10px !important;
}

@media (min-width: 1600px) {
    body.speas-app .home {
        padding-right: 10px !important;
    }

    body.speas-app .contenedor-modulo > :is(.module-container, .dashboard-container, .analytics-container, .crm-container, .config-container, .profile-container, .caja-container, .caja-chica-container, .pos-container, .table-module-container, .dashboard-shell, .home-dashboard) {
        width: 100% !important;
        max-width: none !important;
    }
}

@media (max-width: 768px) {
    body.speas-app .home {
        max-width: 100vw !important;
    }
}

/* Speas light theme solid white correction v68 */

/* Speas normal theme clean white correction v69 */

/* Speas global density 80 percent v70 */
@media (min-width: 1024px) {
    :root {
        --sidebar-close-width: 72px;
        --speas-input-h: 32px;
        --speas-topbar-h: 44px;
        --speas-radius: 12px;
        --speas-radius-sm: 9px;
    }

    html {
        font-size: 12.8px;
    }

    body.speas-app {
        font-size: 11.8px !important;
    }

    body.speas-app .home {
        padding: 8px 13px 13px !important;
    }

    body.speas-app .header-text {
        min-height: 44px !important;
        margin-bottom: 8px !important;
        padding: 0 10px 0 12px !important;
        border-radius: 10px !important;
    }

    body.speas-app #titulo-modulo,
    body.speas-app .home .text {
        font-size: 15.6px !important;
        line-height: 1.12 !important;
    }

    body.speas-app .speas-top-search {
        width: min(292px, 23vw) !important;
        height: 32px !important;
        gap: 7px !important;
        padding: 0 9px !important;
        border-radius: 10px !important;
    }

    body.speas-app .speas-top-search i {
        font-size: 16px !important;
    }

    body.speas-app .speas-top-search input {
        height: 29px !important;
        font-size: 11.6px !important;
    }

    body.speas-app .speas-top-search span {
        padding: 1px 5px !important;
        font-size: 10px !important;
    }

    body.speas-app .speas-theme-switch {
        height: 31px !important;
        gap: 3px !important;
    }

    body.speas-app .speas-theme-btn {
        width: 27px !important;
        height: 26px !important;
    }

    body.speas-app .sidebar header {
        margin-bottom: 7px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    body.speas-app .sidebar .image-text {
        min-height: 43px !important;
    }

    body.speas-app .sidebar .image .logo-icon {
        width: 35px !important;
        height: 35px !important;
        border-radius: 10px !important;
        font-size: 24px !important;
    }

    body.speas-app .sidebar li {
        height: 35px !important;
        margin-top: 3px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    body.speas-app .sidebar li .icon {
        font-size: 16.8px !important;
    }

    body.speas-app .sidebar li .text {
        font-size: 11.8px !important;
    }

    body.speas-app .sidebar.close:not(:hover):not(.mobile-active) .menu {
        padding: 0 9px 13px !important;
    }

    body.speas-app .sidebar.close:not(:hover):not(.mobile-active) li a {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
    }

    body.speas-app .sidebar.close:not(:hover):not(.mobile-active) li .icon {
        width: 44px !important;
        flex-basis: 44px !important;
    }

    body.speas-app .profile-img {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
    }

    body.speas-app .profile-card {
        padding: 8px 9px !important;
        margin-bottom: 8px !important;
        border-radius: 11px !important;
    }

    body.speas-app .contenedor-modulo {
        font-size: 11.8px !important;
    }

    body.speas-app :is(.module-header, .page-header, .control-header, .section-toolbar, .toolbar-container, .header-acciones, .dashboard-hero) {
        padding: 13px 15px !important;
        margin-bottom: 11px !important;
    }

    body.speas-app :is(.card, .panel, .kpi-card, .metric-card, .summary-card, .table-container, .filters-card) {
        padding: 13px !important;
    }

    body.speas-app :is(input, select, textarea, .form-control, .form-select, .search-input, .search-box) {
        min-height: 32px !important;
        font-size: 11.8px !important;
    }

    body.speas-app :is(button, .btn, .action-btn, .icon-btn, .cat-btn, .tab-btn, .filter-btn, .export-btn) {
        min-height: 32px !important;
        font-size: 11.5px !important;
    }

    body.speas-app :is(th, .table-head, .table-header) {
        font-size: 11.2px !important;
        height: 35px !important;
    }

    body.speas-app :is(td, .table-row) {
        font-size: 11.6px !important;
    }

    body.speas-app :is(.product-card, .pos-product-card) {
        min-height: 154px !important;
        padding: 15px !important;
    }
}

/* Speas normal theme pure white blue correction v71 */

/* Speas normal theme pure white final module override v72 */

/* Speas normal theme blue accent cleanup v73 */

/* Speas flujo caja KPI compact spacing v74 */
body.speas-app .caja-container .kpi-grid-temporal .kpi-card {
    justify-content: flex-start !important;
    gap: 16px !important;
    min-height: 118px !important;
    padding: 24px 28px !important;
}

body.speas-app .caja-container .kpi-grid-temporal .kpi-card .card-header-flex {
    margin-bottom: 0 !important;
}

body.speas-app .caja-container .kpi-grid-temporal .kpi-card .amount-big {
    margin: 0 !important;
    line-height: 1.08 !important;
}

@media (max-width: 900px) {
    body.speas-app .caja-container .kpi-grid-temporal .kpi-card {
        min-height: 104px !important;
        padding: 20px 22px !important;
        gap: 12px !important;
    }
}

/* Speas global 90 density at 100 percent v75 */
@media (min-width: 1024px) {
    html {
        font-size: 13.2px;
    }

    body.speas-app {
        font-size: 12.2px !important;
    }

    body.speas-app .home {
        padding: 7px 12px 12px !important;
        overflow-x: hidden !important;
    }

    body.speas-app #contenedor-dinamico,
    body.speas-app .contenedor-modulo,
    body.speas-app .module-content {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: clip;
    }

    body.speas-app .header-text {
        min-height: 42px !important;
        margin-bottom: 8px !important;
        padding: 0 9px 0 11px !important;
        border-radius: 10px !important;
    }

    body.speas-app #titulo-modulo,
    body.speas-app .home .text {
        font-size: 15px !important;
        line-height: 1.1 !important;
    }

    body.speas-app .speas-top-search {
        height: 30px !important;
        width: min(286px, 22vw) !important;
        padding: 0 8px !important;
        border-radius: 9px !important;
    }

    body.speas-app .speas-top-search input {
        height: 27px !important;
        font-size: 11.2px !important;
    }

    body.speas-app :is(
        .module-header,
        .page-header,
        .control-header,
        .section-toolbar,
        .toolbar-container,
        .header-acciones,
        .dashboard-hero,
        .hero-panel,
        .filter-panel,
        .filters-panel,
        .filter-section,
        .filters-section,
        .table-toolbar,
        .module-toolbar
    ) {
        padding: 11px 14px !important;
        margin-bottom: 10px !important;
        gap: 9px !important;
    }

    body.speas-app :is(
        .module-header h1,
        .module-header h2,
        .page-header h1,
        .page-header h2,
        .header-titles h1,
        .header-titles h2,
        .section-title,
        .panel-title
    ) {
        font-size: 17px !important;
        line-height: 1.15 !important;
        margin-bottom: 3px !important;
    }

    body.speas-app :is(
        .header-titles p,
        .module-header p,
        .page-header p,
        .section-subtitle,
        .panel-subtitle
    ) {
        font-size: 11.6px !important;
        line-height: 1.25 !important;
    }

    body.speas-app :is(
        .card,
        .panel,
        .kpi-card,
        .metric-card,
        .summary-card,
        .table-container,
        .table-module-container,
        .filters-card,
        .content-card,
        .section-card,
        .crud-card,
        .premium-card,
        .dashboard-card
    ) {
        padding: 11px 12px !important;
        border-radius: 12px !important;
    }

    body.speas-app :is(
        .table-responsive,
        .table-scroll,
        .premium-table-container,
        .table-wrapper,
        .table-card
    ) {
        border-radius: 10px !important;
    }

    body.speas-app :is(
        table,
        .premium-table,
        .data-table,
        .crm-table,
        .simple-table,
        .table-custom
    ) {
        font-size: 11.4px !important;
    }

    body.speas-app :is(
        th,
        .premium-table th,
        .data-table th,
        .crm-table th,
        .simple-table th,
        .table-custom th
    ) {
        height: 31px !important;
        padding: 9px 11px !important;
        font-size: 10.8px !important;
        line-height: 1.15 !important;
    }

    body.speas-app :is(
        td,
        .premium-table td,
        .data-table td,
        .crm-table td,
        .simple-table td,
        .table-custom td
    ) {
        padding: 9px 11px !important;
        font-size: 11.2px !important;
        line-height: 1.22 !important;
    }

    body.speas-app :is(
        input,
        select,
        textarea,
        .form-control,
        .form-select,
        .search-input,
        .search-box input
    ) {
        min-height: 31px !important;
        font-size: 11.4px !important;
        border-radius: 9px !important;
    }

    body.speas-app :is(
        button,
        .btn,
        .btn-primary,
        .btn-secondary,
        .action-btn,
        .cat-btn,
        .tab-btn,
        .filter-btn,
        .export-btn
    ) {
        min-height: 31px !important;
        padding: 7px 11px !important;
        font-size: 11.2px !important;
        border-radius: 9px !important;
    }

    body.speas-app :is(.btn-icon, .icon-btn, .action-icon, .premium-table .btn-icon) {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
        padding: 0 !important;
    }

    body.speas-app :is(.badge, .status-badge, .pill, .chip, .badge-pago, .estado-badge) {
        padding: 3px 7px !important;
        font-size: 10px !important;
        line-height: 1.1 !important;
        border-radius: 8px !important;
    }

    body.speas-app :is(.modal-content, .modal-box, .drawer-panel, .side-modal, .modal-panel) {
        font-size: 12px !important;
    }

    body.speas-app :is(.modal-header, .drawer-header, .modal-footer, .drawer-footer) {
        padding: 13px 16px !important;
    }

    body.speas-app :is(.modal-body, .drawer-body) {
        padding: 14px 16px !important;
    }

    body.speas-app .pos-catalog .product-card,
    body.speas-app :is(.product-card, .pos-product-card) {
        min-height: 145px !important;
        padding: 13px !important;
    }

    body.speas-app .caja-container .kpi-grid-temporal .kpi-card {
        min-height: 106px !important;
        padding: 19px 23px !important;
        gap: 10px !important;
    }
}

@media (min-width: 1600px) {
    body.speas-app :is(.premium-table th, .data-table th, .crm-table th, .simple-table th) {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    body.speas-app :is(.premium-table td, .data-table td, .crm-table td, .simple-table td) {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
}

@media (max-width: 1023px) {
    body.speas-app :is(.premium-table th, .data-table th, .crm-table th, .simple-table th) {
        padding: 9px 10px !important;
    }

    body.speas-app :is(.premium-table td, .data-table td, .crm-table td, .simple-table td) {
        padding: 9px 10px !important;
    }
}

/* Speas per-module density adapters v76 */
@media (min-width: 1024px) {
    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) {
        padding: 10px 12px !important;
        gap: 10px !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(
        .module-header,
        .module-header-tabs,
        .despacho-header,
        .control-header,
        .catalog-header,
        .header-acciones
    ) {
        padding: 11px 14px !important;
        margin-bottom: 10px !important;
        min-height: auto !important;
        gap: 9px !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(h1, h2, .catalog-title-bar h2, .despacho-title h2, .control-header h2, .header-left h2, .header-titles h2) {
        font-size: 16.6px !important;
        line-height: 1.14 !important;
        margin-bottom: 3px !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(p, small, .catalog-title-bar p, .despacho-title p, .header-left p, .header-titles p) {
        font-size: 11.4px !important;
        line-height: 1.24 !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(
        .table-toolbar,
        .tabs-wrapper,
        .tabs-terceros,
        .category-tabs,
        .filter-actions,
        .header-actions,
        .despacho-actions,
        .control-actions,
        .catalog-meta
    ) {
        gap: 8px !important;
        margin-bottom: 9px !important;
        padding: 9px 11px !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(
        .summary-cards-grid,
        .kpi-dashboard-grid,
        .kpi-grid-temporal,
        .kpi-resumen-bar,
        .actions-grid,
        .grid-layout,
        .quick-actions-grid,
        .content-grid,
        .validation-wrapper,
        .charts-grid,
        .profile-grid,
        .pos-layout
    ) {
        gap: 12px !important;
        margin-bottom: 12px !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(
        .kpi-card,
        .kpi-card-modern,
        .saldo-card,
        .btn-action,
        .scanner-card,
        .chart-card,
        .card-block,
        .full-width-card,
        .profile-sidebar-card,
        .profile-form-card,
        .panel-card,
        .table-responsive,
        .calendar-wrapper,
        .calendar-sidebar,
        .calendar-main,
        .pos-catalog,
        .cart-panel,
        .order-panel
    ) {
        padding: 13px 14px !important;
        border-radius: 12px !important;
        min-height: auto !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(input, select, textarea, .search-box input, .search-bar input, .date-filter, .input-group-lg input) {
        height: auto !important;
        min-height: 31px !important;
        padding: 7px 11px !important;
        font-size: 11.4px !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(
        .premium-table th,
        .crm-table thead th,
        .despacho-table th,
        .table-custom th,
        .table-wrap-control th
    ) {
        padding: 8px 10px !important;
        font-size: 10.7px !important;
        height: 30px !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(
        .premium-table td,
        .crm-table td,
        .despacho-table td,
        .table-custom td,
        .table-wrap-control td
    ) {
        padding: 8px 10px !important;
        font-size: 11.1px !important;
        line-height: 1.2 !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(.modal-header, .modal-body, .modal-footer) {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(.modal-header) {
        padding-top: 13px !important;
        padding-bottom: 13px !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(.modal-body) {
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) :is(.modal-footer) {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
}

@media (min-width: 1024px) and (max-width: 1366px) {
    body.speas-app :is(
        .analytics-container,
        .caja-chica-container,
        .calendar-module-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container
    ) {
        padding: 9px 10px !important;
    }
}

/* Speas per-module CSS density coverage v77 */
@media (min-width: 1024px) {
    body.speas-app :is(
        .dashboard-container,
        .dashboard-shell,
        .home-dashboard,
        .speas-home,
        .analytics-container,
        .calendar-module-container,
        .caja-container,
        .caja-chica-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .pos-shell,
        .profile-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container,
        .ventas-module
    ) {
        padding-block: 9px !important;
        padding-inline: 12px !important;
        row-gap: 10px !important;
        column-gap: 10px !important;
    }

    body.speas-app :is(
        .dashboard-container,
        .dashboard-shell,
        .home-dashboard,
        .speas-home,
        .analytics-container,
        .calendar-module-container,
        .caja-container,
        .caja-chica-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .pos-shell,
        .profile-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container,
        .ventas-module
    ) :is(
        .module-header,
        .module-header-tabs,
        .catalog-header,
        .despacho-header,
        .control-header,
        .crm-header,
        .header-acciones,
        .toolbar-container,
        .table-toolbar,
        .filters-wrapper,
        .filter-actions,
        .tabs-wrapper,
        .tabs-container,
        .tabs-terceros,
        .category-tabs
    ) {
        padding: 9px 12px !important;
        margin-block: 0 9px !important;
        min-height: 0 !important;
        gap: 8px !important;
    }

    body.speas-app :is(
        .dashboard-container,
        .dashboard-shell,
        .home-dashboard,
        .speas-home,
        .analytics-container,
        .calendar-module-container,
        .caja-container,
        .caja-chica-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .pos-shell,
        .profile-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container,
        .ventas-module
    ) :is(
        .kpi-dashboard-grid,
        .summary-cards-grid,
        .dashboard-cards-container,
        .kpi-grid-temporal,
        .kpi-resumen-bar,
        .cards-methods-grid,
        .saldo-card-container,
        .actions-grid,
        .content-grid,
        .grid-layout,
        .grid-row,
        .row-grid,
        .quick-grid,
        .shortcuts-grid,
        .speas-grid-main,
        .speas-workspace-grid,
        .validation-wrapper,
        .gestion-grid,
        .charts-grid,
        .profile-grid,
        .form-grid,
        .form-grid-row,
        .flow-selector-container,
        .credit-summary-card
    ) {
        gap: 10px !important;
        margin-bottom: 10px !important;
    }

    body.speas-app :is(
        .dashboard-container,
        .dashboard-shell,
        .home-dashboard,
        .speas-home,
        .analytics-container,
        .calendar-module-container,
        .caja-container,
        .caja-chica-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .pos-shell,
        .profile-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container,
        .ventas-module
    ) :is(
        .kpi-card,
        .kpi-card-modern,
        .card-resumen,
        .saldo-card,
        .saldo-card.en-cero,
        .saldo-caja-container,
        .cash-balance-card,
        .balance-main-card,
        .scanner-card,
        .history-card,
        .chart-card,
        .chart-card-ranking,
        .speas-panel,
        .speas-panel-card,
        .quick-action-card,
        .shortcut-card,
        .profile-sidebar-card,
        .profile-content-card,
        .profile-form-card,
        .panel-card,
        .full-width-card,
        .audit-panel,
        .salones-card,
        .flow-card,
        .simulation-wrapper,
        .credit-summary-card,
        .table-container,
        .table-responsive,
        .table-responsive-kardex,
        .table-scroll,
        .table-mini-wrapper,
        .calendar-wrapper,
        .calendar-sidebar,
        .calendar-main,
        .pos-catalog,
        .cart-panel,
        .order-panel
    ) {
        padding: 12px 13px !important;
        border-radius: 11px !important;
        min-height: 0 !important;
    }

    body.speas-app :is(
        .dashboard-container,
        .dashboard-shell,
        .home-dashboard,
        .speas-home,
        .analytics-container,
        .calendar-module-container,
        .caja-container,
        .caja-chica-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .pos-shell,
        .profile-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container,
        .ventas-module
    ) :is(h1, h2, h3, .module-header h2, .catalog-title-bar h2, .despacho-title h2, .control-header h2, .header-left h2, .header-titles h2, .card-header h3) {
        font-size: clamp(14px, 0.95vw, 16.5px) !important;
        line-height: 1.14 !important;
        margin-bottom: 3px !important;
    }

    body.speas-app :is(
        .dashboard-container,
        .dashboard-shell,
        .home-dashboard,
        .speas-home,
        .analytics-container,
        .calendar-module-container,
        .caja-container,
        .caja-chica-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .pos-shell,
        .profile-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container,
        .ventas-module
    ) :is(p, small, label, .module-header p, .catalog-title-bar p, .despacho-title p, .header-left p, .header-titles p, .card-header p) {
        font-size: 11.2px !important;
        line-height: 1.24 !important;
    }

    body.speas-app :is(
        .dashboard-container,
        .dashboard-shell,
        .home-dashboard,
        .speas-home,
        .analytics-container,
        .calendar-module-container,
        .caja-container,
        .caja-chica-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .pos-shell,
        .profile-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container,
        .ventas-module
    ) :is(input, select, textarea, .form-control, .form-select, .search-input, .search-box, .input-wrapper input, .input-wrapper select, .input-wrapper textarea) {
        min-height: 31px !important;
        padding: 7px 10px !important;
        font-size: 11.3px !important;
        line-height: 1.18 !important;
    }

    body.speas-app :is(
        .dashboard-container,
        .dashboard-shell,
        .home-dashboard,
        .speas-home,
        .analytics-container,
        .calendar-module-container,
        .caja-container,
        .caja-chica-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .pos-shell,
        .profile-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container,
        .ventas-module
    ) :is(button, .btn, .action-btn, .btn-action, .tab-btn, .cat-btn, .filter-btn, .export-btn, .primary-action, .btn-primary, .btn-success) {
        min-height: 31px !important;
        padding: 7px 11px !important;
        font-size: 11.1px !important;
    }

    body.speas-app :is(
        .dashboard-container,
        .dashboard-shell,
        .home-dashboard,
        .speas-home,
        .analytics-container,
        .calendar-module-container,
        .caja-container,
        .caja-chica-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .pos-shell,
        .profile-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container,
        .ventas-module
    ) :is(.btn-icon, .icon-btn, .action-icon, .premium-table .btn-icon) {
        width: 29px !important;
        height: 29px !important;
        min-height: 29px !important;
        padding: 0 !important;
    }

    body.speas-app :is(.premium-table, .data-table, .crm-table, .despacho-table, .table-custom, .simple-table, .kardex-table, .cash-table, .audit-table) {
        font-size: 11.2px !important;
    }

    body.speas-app :is(.premium-table th, .data-table th, .crm-table th, .despacho-table th, .table-custom th, .simple-table th, .kardex-table th, .cash-table th, .audit-table th) {
        height: 30px !important;
        padding: 8px 10px !important;
        font-size: 10.6px !important;
        line-height: 1.15 !important;
    }

    body.speas-app :is(.premium-table td, .data-table td, .crm-table td, .despacho-table td, .table-custom td, .simple-table td, .kardex-table td, .cash-table td, .audit-table td) {
        padding: 8px 10px !important;
        font-size: 11.1px !important;
        line-height: 1.2 !important;
    }

    body.speas-app :is(.modal-content, .modal-box, .modal-content-custom, .drawer-panel, .side-modal, .modal-panel) {
        font-size: 11.8px !important;
    }

    body.speas-app :is(.modal-header, .drawer-header, .modal-footer, .drawer-footer) {
        padding: 12px 15px !important;
    }

    body.speas-app :is(.modal-body, .drawer-body) {
        padding: 13px 15px !important;
    }
}

@media (min-width: 1367px) {
    body.speas-app :is(.product-card, .pos-product-card) {
        min-height: 142px !important;
        padding: 12px !important;
    }

    body.speas-app :is(.kpi-card, .kpi-card-modern) :is(h3, .amount, .balance-amount) {
        font-size: clamp(16px, 1.1vw, 18px) !important;
        margin-top: 6px !important;
    }
}

@media (min-width: 1024px) and (max-width: 1366px) {
    body.speas-app :is(
        .dashboard-container,
        .dashboard-shell,
        .home-dashboard,
        .speas-home,
        .analytics-container,
        .calendar-module-container,
        .caja-container,
        .caja-chica-container,
        .config-container,
        .control-container,
        .crm-container,
        .despacho-container,
        .modulo-container,
        .module-container,
        .pos-container,
        .pos-shell,
        .profile-container,
        .profile-container-premium,
        .table-module-container,
        .terceros-container,
        .ventas-module
    ) {
        padding-block: 8px !important;
        padding-inline: 10px !important;
    }

    body.speas-app :is(.kpi-card, .kpi-card-modern, .summary-card, .product-card, .pos-product-card) {
        padding: 11px !important;
    }
}

/* Historial and inventory search: align icon with placeholder and keep focus on the field only. */
body.speas-app :is(
    .contenedor-modulo > .table-module-container.fade-in:has(#historial-search),
    .table-module-container:has(#buscador-productos)
) .search-box {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: min(100%, 520px) !important;
    max-width: 520px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    outline: 0 !important;
    overflow: visible !important;
}

body.speas-app :is(
    .contenedor-modulo > .table-module-container.fade-in:has(#historial-search),
    .table-module-container:has(#buscador-productos)
) .search-box:focus,
body.speas-app :is(
    .contenedor-modulo > .table-module-container.fade-in:has(#historial-search),
    .table-module-container:has(#buscador-productos)
) .search-box:focus-within {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

body.speas-app :is(
    .contenedor-modulo > .table-module-container.fade-in:has(#historial-search),
    .table-module-container:has(#buscador-productos)
) .search-box i {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
    width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    line-height: 1 !important;
    font-size: 18px !important;
    pointer-events: none !important;
    color: #64748b !important;
}

body.speas-app :is(#historial-search, #buscador-productos) {
    display: block !important;
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    line-height: 38px !important;
    padding: 0 14px 0 46px !important;
    margin: 0 !important;
    border: 1px solid #cbdcf0 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
    outline: 0 !important;
    vertical-align: middle !important;
}

body.speas-app :is(#historial-search, #buscador-productos)::placeholder {
    color: #73829a !important;
    opacity: 1 !important;
}

body.speas-app :is(#historial-search, #buscador-productos):focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16) !important;
    outline: 0 !important;
}

@media (max-width: 768px) {
    body.speas-app :is(
        .contenedor-modulo > .table-module-container.fade-in:has(#historial-search),
        .table-module-container:has(#buscador-productos)
    ) .search-box {
        width: 100% !important;
        max-width: none !important;
    }
}

/* Inventario: compact spacing between category tabs, search filters and table. */
body.speas-app .table-module-container:has(#tabla-productos-body) {
    gap: 8px !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) > .tabs-container {
    margin: 0 !important;
    padding: 8px 12px 9px !important;
    min-height: 0 !important;
    border-bottom: 1px solid rgba(203, 220, 240, 0.72) !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) > .table-toolbar {
    min-height: 46px !important;
    height: auto !important;
    margin: 8px 12px 8px !important;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) > .table-responsive {
    margin: 0 12px !important;
    padding-top: 0 !important;
}

body.speas-app .table-module-container:has(#tabla-productos-body) .premium-table thead th {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

@media (min-width: 1200px) {
    body.speas-app .table-module-container:has(#tabla-productos-body) > .table-toolbar {
        margin-top: 6px !important;
        margin-bottom: 8px !important;
    }
}

@media (max-width: 768px) {
    body.speas-app .table-module-container:has(#tabla-productos-body) > .tabs-container {
        padding: 7px 8px 8px !important;
    }

    body.speas-app .table-module-container:has(#tabla-productos-body) > .table-toolbar {
        margin: 6px 8px 8px !important;
        padding: 10px !important;
    }

    body.speas-app .table-module-container:has(#tabla-productos-body) > .table-responsive {
        margin: 0 8px !important;
    }
}

/* Proveedores: compact search area and align the input icon with the placeholder. */
body.speas-app .table-module-container:has(#tabla-proveedores-body) {
    gap: 10px !important;
    padding-top: 16px !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) > .module-header {
    margin: 0 12px 8px !important;
    padding: 16px 22px !important;
    min-height: 0 !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) > .table-toolbar {
    min-height: 46px !important;
    height: auto !important;
    margin: 4px 12px 8px !important;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) > .table-responsive {
    margin: 0 12px !important;
    padding: 0 !important;
}

body.speas-app .table-module-container:has(#tabla-proveedores-body) > .pagination {
    margin: 8px 12px 0 !important;
    padding: 0 !important;
}

body.speas-app .table-module-container:has(#buscador-proveedores) .search-box {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: min(100%, 420px) !important;
    max-width: 420px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    outline: 0 !important;
    overflow: visible !important;
}

body.speas-app .table-module-container:has(#buscador-proveedores) .search-box:focus,
body.speas-app .table-module-container:has(#buscador-proveedores) .search-box:focus-within {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

body.speas-app .table-module-container:has(#buscador-proveedores) .search-box i {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
    width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    line-height: 1 !important;
    font-size: 18px !important;
    pointer-events: none !important;
    color: #64748b !important;
}

body.speas-app #buscador-proveedores {
    display: block !important;
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    line-height: 38px !important;
    padding: 0 14px 0 46px !important;
    margin: 0 !important;
    border: 1px solid #cbdcf0 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
    outline: 0 !important;
    vertical-align: middle !important;
}

body.speas-app #buscador-proveedores::placeholder {
    color: #73829a !important;
    opacity: 1 !important;
}

body.speas-app #buscador-proveedores:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16) !important;
}

@media (max-width: 768px) {
    body.speas-app .table-module-container:has(#tabla-proveedores-body) {
        gap: 8px !important;
        padding-top: 10px !important;
    }

    body.speas-app .table-module-container:has(#tabla-proveedores-body) > .module-header,
    body.speas-app .table-module-container:has(#tabla-proveedores-body) > .table-toolbar,
    body.speas-app .table-module-container:has(#tabla-proveedores-body) > .table-responsive,
    body.speas-app .table-module-container:has(#tabla-proveedores-body) > .pagination {
        margin-left: 8px !important;
        margin-right: 8px !important;
    }

    body.speas-app .table-module-container:has(#buscador-proveedores) .search-box {
        width: 100% !important;
        max-width: none !important;
    }
}

/* Ordenes de compra: give table rows a little breathing room without losing density. */
body.speas-app .modulo-container:has(#tabla-oc-interna) .table-custom th {
    padding-top: 11px !important;
    padding-bottom: 11px !important;
    line-height: 1.25 !important;
}

body.speas-app .modulo-container:has(#tabla-oc-interna) #tabla-oc-interna td {
    padding-top: 11px !important;
    padding-bottom: 11px !important;
    line-height: 1.35 !important;
    vertical-align: middle !important;
}

body.speas-app .modulo-container:has(#tabla-oc-interna) #tabla-oc-interna tr {
    min-height: 46px !important;
}

body.speas-app .modulo-container:has(#tabla-oc-interna) #tabla-oc-interna .status-badge,
body.speas-app .modulo-container:has(#tabla-oc-interna) #tabla-oc-interna .status {
    line-height: 1.15 !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

@media (max-width: 768px) {
    body.speas-app .modulo-container:has(#tabla-oc-interna) .table-custom th,
    body.speas-app .modulo-container:has(#tabla-oc-interna) #tabla-oc-interna td {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
}

/* Creditos compact spacing and search alignment v3.3.15 */
body.speas-app .module-container:has(#tabla-creditos-body) {
    padding-top: 14px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .module-header-tabs {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 17px 24px !important;
    gap: 14px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .header-titles h2 {
    margin: 0 0 5px !important;
    line-height: 1.18 !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .tabs-wrapper {
    min-width: 0 !important;
    padding: 4px !important;
    gap: 6px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .tabs-wrapper .tab-btn {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 14px !important;
    border-radius: 9px !important;
    font-size: 13px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .kpi-resumen-bar {
    gap: 14px !important;
    margin: 0 !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .kpi-card {
    min-height: 96px !important;
    padding: 15px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 5px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .kpi-card span {
    font-size: 11px !important;
    line-height: 1.1 !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .kpi-card h3 {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.15 !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) .kpi-card small {
    font-size: 12px !important;
    line-height: 1.15 !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) #tab-creditos.active {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) #tab-creditos .table-toolbar {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 13px 16px !important;
    align-items: center !important;
    gap: 12px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) #tab-creditos .search-box {
    width: auto !important;
    max-width: 360px !important;
    min-height: 38px !important;
    height: 38px !important;
    flex: 0 1 360px !important;
    display: flex !important;
    align-items: center !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) #tab-creditos .search-box i {
    left: 14px !important;
    top: 50% !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 18px !important;
    line-height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) #tab-creditos .search-box input {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 13px 0 40px !important;
    font-size: 13px !important;
    line-height: 38px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) #tab-creditos .actions-box .btn-primary {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 16px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) #tab-creditos .table-responsive {
    margin: 0 !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) #tab-creditos .premium-table th {
    padding-top: 11px !important;
    padding-bottom: 11px !important;
}

body.speas-app .module-container:has(#tabla-creditos-body) #tab-creditos .premium-table td {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

@media (max-width: 720px) {
    body.speas-app .module-container:has(#tabla-creditos-body) {
        gap: 12px !important;
        padding-top: 12px !important;
    }

    body.speas-app .module-container:has(#tabla-creditos-body) .module-header-tabs {
        padding: 16px !important;
    }

    body.speas-app .module-container:has(#tabla-creditos-body) .tabs-wrapper .tab-btn,
    body.speas-app .module-container:has(#tabla-creditos-body) #tab-creditos .actions-box .btn-primary {
        min-height: 40px !important;
        height: 40px !important;
    }

body.speas-app .module-container:has(#tabla-creditos-body) #tab-creditos .search-box {
        max-width: none !important;
        width: 100% !important;
        flex-basis: auto !important;
    }
}

/* Speas final sidebar logo contrast v3.3.17 */

/* ═══════════════════════════════════════════════════════════════
   LOADER PREMIUM — Responsive al tema v3.3.18
   ═══════════════════════════════════════════════════════════════ */

/* Overlay base: glassmorphism neutro */
.speas-loader-overlay {
    background: rgba(15, 10, 25, 0.55) !important;
    backdrop-filter: blur(14px) saturate(1.4) !important;
}

/* Panel base renovado */
.speas-loader-panel {
    width: min(380px, calc(100vw - 32px)) !important;
    padding: 28px !important;
    border-radius: 20px !important;
    gap: 18px !important;
    animation: speasPanelIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes speasPanelIn {
    from { opacity: 0; transform: translateY(18px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Logo mark en loader: más grande con pulso */
.speas-loader-brand .speas-logo-mark {
    width: 52px !important;
    height: 52px !important;
    font-size: 24px !important;
    border-radius: 14px !important;
    animation: speasLogoBreath 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes speasLogoBreath {
    0%,100% { transform: scale(1);    box-shadow: 0 6px 20px rgba(0,0,0,0.20); }
    50%      { transform: scale(1.06); box-shadow: 0 10px 28px rgba(0,0,0,0.28); }
}

/* Track más visible */
.speas-loader-track {
    height: 4px !important;
    border-radius: 999px !important;
}

/* Título y mensaje */
.speas-loader-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: -0.2px !important;
}
.speas-loader-message {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
}

/* ── Suave: overlay rosa suave ── */
@keyframes speasLogoBreathSuave {
    0%,100% { transform: scale(1);    box-shadow: 0 8px 24px rgba(217, 100, 142, 0.35); }
    50%      { transform: scale(1.08); box-shadow: 0 14px 36px rgba(217, 100, 142, 0.50); }
}

/* ═══════════════════════════════════════════════════════════════
   MODALES — Premium responsivo al tema v3.3.18
   ═══════════════════════════════════════════════════════════════ */

.speas-modal-overlay,
.modal-overlay {
    backdrop-filter: blur(10px) saturate(1.2) !important;
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN — Insight cards del panel de acceso v3.4.3
   ═══════════════════════════════════════════════════════════════ */

body.speas-login .insight-card {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    backdrop-filter: blur(16px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18) !important;
    color: #ffffff !important;
}

body.speas-login .insight-card::after {
    background: linear-gradient(90deg, #D9648E, #9C8AC9) !important;
    opacity: 1 !important;
}

body.speas-login .insight-main {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

body.speas-login .insight-main i {
    background: rgba(217, 100, 142, 0.25) !important;
    color: #FFB3D9 !important;
}

body.speas-login .insight-label,
body.speas-login .insight-card span {
    color: rgba(255, 255, 255, 0.65) !important;
}

body.speas-login .insight-main .insight-label {
    color: rgba(255, 255, 255, 0.60) !important;
}

body.speas-login .insight-card strong {
    color: #ffffff !important;
}

body.speas-login .insight-grid i {
    background: rgba(156, 138, 201, 0.25) !important;
    color: #E9D5FF !important;
}

body.speas-login .login-signal-grid span {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN — Override final blindado v3.3.19
   El archivo tiene bloques duplicados de versiones anteriores que
   pintaban el panel de claro/negro. Estas reglas van al final con
   !important para garantizar que siempre ganen en la cascada.
   ═══════════════════════════════════════════════════════════════ */

body.speas-login .visual-panel {
    background: linear-gradient(160deg, #050810 0%, #0A1024 35%, #0E1B3D 65%, #0B1330 100%) !important;
    color: #ffffff !important;
    overflow: hidden !important;
}

body.speas-login .visual-panel::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 2px !important;
    background: linear-gradient(90deg, transparent, #3B82F6, #6366F1, #22D3EE, transparent) !important;
    background-size: 200% 100% !important;
    animation: speasScanLine 6s linear infinite !important;
    z-index: 3 !important;
    opacity: 0.9 !important;
    inset: auto !important;
    height: 2px !important;
    border: none !important;
    border-radius: 0 !important;
    mask-image: none !important;
}

@keyframes speasScanLine {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

body.speas-login .dynamic-bg {
    background: linear-gradient(160deg, #050810 0%, #0A1024 35%, #0E1B3D 65%, #0B1330 100%) !important;
    animation: none !important;
}

body.speas-login .dynamic-bg::before {
    content: "" !important;
    position: absolute !important;
    width: 460px !important;
    height: 460px !important;
    top: 8% !important;
    right: -8% !important;
    border-radius: 50% !important;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.32), transparent 70%) !important;
    filter: blur(40px) !important;
    opacity: 1 !important;
    animation: speasOrbFloat 14s ease-in-out infinite !important;
    display: block !important;
}

body.speas-login .dynamic-bg::after {
    content: "" !important;
    position: absolute !important;
    width: 380px !important;
    height: 380px !important;
    bottom: 4% !important;
    left: -6% !important;
    border-radius: 50% !important;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.26), transparent 70%) !important;
    filter: blur(40px) !important;
    opacity: 1 !important;
    animation: speasOrbFloat 14s ease-in-out infinite reverse !important;
    display: block !important;
}

@keyframes speasOrbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-30px) scale(1.06); }
}

body.speas-login .visual-overlay {
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) !important;
    background-size: 28px 28px !important;
    opacity: 1 !important;
}

body.speas-login .brand-logo {
    color: #ffffff !important;
}

body.speas-login .brand-logo .speas-logo-mark {
    background: linear-gradient(135deg, #3B82F6, #6366F1) !important;
    border: none !important;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset, 0 8px 24px rgba(59, 130, 246, 0.45) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    animation: speasLogoGlow 3s ease-in-out infinite !important;
}

@keyframes speasLogoGlow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset, 0 8px 24px rgba(59, 130, 246, 0.45); }
    50%       { box-shadow: 0 0 0 1px rgba(255,255,255,0.20) inset, 0 8px 34px rgba(99, 102, 241, 0.65); }
}

body.speas-login .brand-message h2 {
    color: #ffffff !important;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25) !important;
}

body.speas-login .brand-message p {
    color: rgba(255, 255, 255, 0.65) !important;
}

body.speas-login .system-status {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-left: 3px solid #3B82F6 !important;
}

body.speas-login .dot.online {
    background: #10B981 !important;
    box-shadow: 0 0 10px #10B981 !important;
}

body.speas-login .login-panel {
    background: #ffffff !important;
}

body.speas-login .login-header h3 {
    color: #111827 !important;
}

body.speas-login .login-header p {
    color: #6B7280 !important;
}

body.speas-login .input-box input {
    background: #F8FAFC !important;
    border: 1px solid #E5E9F0 !important;
    color: #111827 !important;
}

body.speas-login .input-box input:focus {
    background: #ffffff !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12) !important;
}

body.speas-login .input-box i {
    color: #94A3B8 !important;
}

body.speas-login .input-box input:focus + i {
    color: #3B82F6 !important;
}

body.speas-login .btn-corporate {
    background: linear-gradient(135deg, #2563EB, #4F46E5) !important;
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28) !important;
    border: none !important;
    color: #ffffff !important;
}

body.speas-login .btn-corporate:hover {
    background: linear-gradient(135deg, #1D4ED8, #4338CA) !important;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.40) !important;
    transform: translateY(-2px) !important;
}

body.speas-login .security-notice {
    background: rgba(59, 130, 246, 0.05) !important;
    border: 1px solid rgba(59, 130, 246, 0.14) !important;
}

body.speas-login .security-notice i {
    color: #3B82F6 !important;
}

body.speas-login .login-footer a:hover {
    color: #3B82F6 !important;
}

/* Insight cards y signal-grid — acentos azul/indigo, no rosa */
body.speas-login .insight-card::after {
    background: linear-gradient(90deg, #3B82F6, #6366F1) !important;
    opacity: 1 !important;
}

body.speas-login .insight-main i {
    background: rgba(59, 130, 246, 0.22) !important;
    color: #93C5FD !important;
}

body.speas-login .insight-grid i {
    background: rgba(99, 102, 241, 0.22) !important;
    color: #C7D2FE !important;
}

/* ═══════════════════════════════════════════════════════════════
   LOADER — Fix "S" invisible en tema claro v3.3.20
   Forzado explícito por tema para que el logo del loader sea
   visible siempre, sin depender de fallback genérico.
   ═══════════════════════════════════════════════════════════════ */
.speas-loader-brand .speas-logo-mark {
    background: linear-gradient(135deg, #1E293B, #334155) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-indent: 0 !important;
    font-size: 24px !important;
    line-height: 52px !important;
    text-align: center !important;
}

/* Finanzas scoped dark-theme readability override v3.3.22 final layer */

/* Themed notifications true final priority v3.3.24 */
body.speas-app .mini-notif,
body.speas-app .toast {
    border: 1px solid var(--speas-border, #d8e1ee) !important;
    border-left-width: 5px !important;
    background: var(--speas-surface, #ffffff) !important;
    color: var(--speas-text, #111827) !important;
    border-radius: 12px !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16) !important;
}

body.speas-app .mini-notif.success,
body.speas-app .toast.success {
    border-left-color: var(--speas-toast-success, #16a34a) !important;
    background: linear-gradient(135deg, var(--speas-toast-success-soft, #ecfdf5), var(--speas-surface, #ffffff)) !important;
}

body.speas-app .mini-notif.warning,
body.speas-app .toast.warning {
    border-left-color: var(--speas-toast-warning, #d97706) !important;
    background: linear-gradient(135deg, var(--speas-toast-warning-soft, #fffbeb), var(--speas-surface, #ffffff)) !important;
}

body.speas-app .mini-notif.error,
body.speas-app .toast.error {
    border-left-color: var(--speas-toast-error, #dc2626) !important;
    background: linear-gradient(135deg, var(--speas-toast-error-soft, #fef2f2), var(--speas-surface, #ffffff)) !important;
}

body.speas-app .mini-notif.info,
body.speas-app .toast.info {
    border-left-color: var(--speas-toast-info, #2563eb) !important;
    background: linear-gradient(135deg, var(--speas-toast-info-soft, #eff6ff), var(--speas-surface, #ffffff)) !important;
}

/* Sidebar active and hover separation v3.3.25 */

/* Speas flujo caja final responsive priority v3.3.26 */
@media (max-width: 640px) {
    html body.speas-app #contenedor-dinamico .caja-container {
        max-width: 430px !important;
        padding: 12px 12px 44px !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .header-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 8px !important;
        width: 100% !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .period-tabs {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        width: 100% !important;
        overflow: visible !important;
        white-space: normal !important;
        gap: 3px !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .cards-methods-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .method-card-detail {
        flex-direction: column !important;
        min-height: 108px !important;
        padding: 12px 8px !important;
        gap: 8px !important;
        justify-content: center !important;
        text-align: center !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .method-card-detail .icon-box {
        width: 38px !important;
        height: 38px !important;
        flex: 0 0 38px !important;
        font-size: 18px !important;
        margin: 0 auto !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .method-card-detail .method-info span {
        font-size: 11px !important;
        line-height: 1.15 !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .method-card-detail .method-info h3 {
        font-size: 14px !important;
        line-height: 1.1 !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .table-responsive {
        overflow: visible !important;
        padding: 0 !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .premium-table,
    html body.speas-app #contenedor-dinamico .caja-container .premium-table thead,
    html body.speas-app #contenedor-dinamico .caja-container .premium-table tbody,
    html body.speas-app #contenedor-dinamico .caja-container .premium-table tr,
    html body.speas-app #contenedor-dinamico .caja-container .premium-table th,
    html body.speas-app #contenedor-dinamico .caja-container .premium-table td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .premium-table thead {
        display: none !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .premium-table tbody {
        display: grid !important;
        gap: 12px !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .premium-table tr {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        padding: 12px !important;
        border: 1px solid var(--speas-border, #dbe6f2) !important;
        border-radius: 14px !important;
        background: var(--speas-surface, #ffffff) !important;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06) !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .premium-table td {
        display: grid !important;
        grid-template-columns: 78px minmax(0, 1fr) !important;
        gap: 9px !important;
        align-items: start !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid var(--speas-border, #edf2f7) !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        font-size: 12px !important;
        line-height: 1.25 !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .premium-table td:last-child {
        border-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .premium-table td::before {
        color: var(--speas-muted, #64748b) !important;
        content: "" !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        letter-spacing: 0.04em !important;
        text-transform: uppercase !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .premium-table td:nth-child(1)::before { content: "Hora" !important; }
    html body.speas-app #contenedor-dinamico .caja-container .premium-table td:nth-child(2)::before { content: "Tipo" !important; }
    html body.speas-app #contenedor-dinamico .caja-container .premium-table td:nth-child(3)::before { content: "Origen" !important; }
    html body.speas-app #contenedor-dinamico .caja-container .premium-table td:nth-child(4)::before { content: "Metodo" !important; }
    html body.speas-app #contenedor-dinamico .caja-container .premium-table td:nth-child(5)::before { content: "Monto" !important; }
    html body.speas-app #contenedor-dinamico .caja-container .premium-table td:nth-child(6)::before { content: "Usuario" !important; }

    html body.speas-app #contenedor-dinamico .caja-container .premium-table td .caja-fecha-cell,
    html body.speas-app #contenedor-dinamico .caja-container .premium-table td .caja-monto-value {
        grid-column: 2 !important;
        min-width: 0 !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .premium-table td .caja-monto-value small {
        display: inline !important;
        margin-left: 4px !important;
    }
}

@media (max-width: 360px) {
    html body.speas-app #contenedor-dinamico .caja-container .cards-methods-grid,
    html body.speas-app #contenedor-dinamico .caja-container .kpi-grid-temporal,
    html body.speas-app #contenedor-dinamico .caja-container .header-actions {
        grid-template-columns: 1fr !important;
    }

    html body.speas-app #contenedor-dinamico .caja-container .btn-success {
        width: 100% !important;
    }
}

/* Speas caja chica final responsive and modal priority v3.3.27 */
body.speas-app.speas-modal-open {
    overflow: hidden !important;
}

body.speas-app #contenedor-dinamico .caja-chica-container {
    max-width: min(100%, 1780px) !important;
}

body.speas-app #contenedor-dinamico .caja-chica-container .saldo-card-container {
    display: grid !important;
    grid-template-columns: minmax(280px, 1.45fr) repeat(2, minmax(220px, 0.72fr)) !important;
    align-items: stretch !important;
}

body.speas-app #contenedor-dinamico .caja-chica-container .actions-grid {
    display: contents !important;
}

body.speas-app #contenedor-dinamico .caja-chica-container .saldo-card,
body.speas-app #contenedor-dinamico .caja-chica-container .btn-action {
    border-radius: 16px !important;
    min-height: 166px !important;
}

body.speas-app #contenedor-dinamico .caja-chica-container .saldo-card {
    background: var(--speas-surface, #ffffff) !important;
    color: var(--speas-text, #111827) !important;
    border: 1px solid var(--speas-border, #dbe6f2) !important;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05) !important;
}

body.speas-app #contenedor-dinamico .caja-chica-container .saldo-info h1,
body.speas-app #contenedor-dinamico .caja-chica-container .saldo-info span {
    color: var(--speas-text, #111827) !important;
}

body.speas-app #contenedor-dinamico .caja-chica-container .saldo-info span {
    color: var(--speas-muted, #64748b) !important;
}

body.speas-app #modal-chica.modal-overlay,
body.speas-app #modal-success.modal-overlay,
body.speas-app #modal-error.modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    z-index: 999999 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(12px, 2vw, 24px) !important;
    background: color-mix(in srgb, var(--speas-bg, #0f172a) 58%, rgba(15, 23, 42, 0.68)) !important;
    backdrop-filter: blur(10px) !important;
    overflow: hidden !important;
}

body.speas-app #modal-chica .modal-content.center-modal,
body.speas-app #modal-success .modal-content,
body.speas-app #modal-error .modal-content {
    display: grid !important;
    align-items: stretch !important;
    text-align: left !important;
    width: min(94vw, 520px) !important;
    max-width: 520px !important;
    max-height: calc(100dvh - 32px) !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 20px !important;
    background: var(--speas-surface, #ffffff) !important;
    color: var(--speas-text, #111827) !important;
    border: 1px solid var(--speas-border, #dbe6f2) !important;
    box-shadow: 0 28px 82px rgba(15, 23, 42, 0.22) !important;
}

body.speas-app #modal-chica .modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 20px 22px !important;
    border-bottom: 1px solid var(--speas-border, #dbe6f2) !important;
}

body.speas-app #modal-chica .modal-header h3 {
    color: var(--speas-text, #111827) !important;
    font-size: clamp(18px, 1.15vw, 21px) !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

body.speas-app #modal-chica .modal-body {
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 22px !important;
    overscroll-behavior: contain !important;
}

body.speas-app #modal-chica #form-chica {
    display: grid !important;
    gap: 16px !important;
}

body.speas-app #modal-chica #tipo-badge-container {
    margin: 0 !important;
    text-align: left !important;
}

body.speas-app #modal-chica .input-group {
    margin: 0 !important;
}

body.speas-app #modal-chica .input-group label {
    color: var(--speas-muted, #64748b) !important;
}

body.speas-app #modal-chica .input-group input,
body.speas-app #modal-chica .input-group select,
body.speas-app #modal-chica .input-group textarea {
    min-height: 48px !important;
    border-color: var(--speas-border, #dbe6f2) !important;
    background: var(--speas-surface, #ffffff) !important;
    color: var(--speas-text, #111827) !important;
    box-shadow: none !important;
}

body.speas-app #modal-chica.tipo-ingreso .input-group input:focus,
body.speas-app #modal-chica.tipo-ingreso .input-group select:focus,
body.speas-app #modal-chica.tipo-ingreso .input-group textarea:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12) !important;
}

body.speas-app #modal-chica.tipo-gasto .input-group input:focus,
body.speas-app #modal-chica.tipo-gasto .input-group select:focus,
body.speas-app #modal-chica.tipo-gasto .input-group textarea:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12) !important;
}

body.speas-app #modal-chica .badge-lg {
    width: auto !important;
    min-height: 40px !important;
    padding: 9px 15px !important;
    box-shadow: none !important;
}

body.speas-app #modal-chica .modal-footer {
    display: grid !important;
    grid-template-columns: minmax(120px, 0.45fr) minmax(160px, 1fr) !important;
    gap: 10px !important;
    margin: 4px 0 0 !important;
    padding: 0 !important;
}

body.speas-app #modal-chica .btn-cancel,
body.speas-app #modal-chica .btn-primary {
    width: 100% !important;
    min-height: 50px !important;
    margin: 0 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

body.speas-app #modal-chica.tipo-ingreso .btn-primary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    color: #ffffff !important;
}

body.speas-app #modal-chica.tipo-gasto .btn-primary {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
}

body.speas-app #modal-success .modal-content,
body.speas-app #modal-error .modal-content {
    justify-items: center !important;
    text-align: center !important;
    gap: 12px !important;
    padding: 28px 24px !important;
}

body.speas-app #modal-success .modal-content i,
body.speas-app #modal-error .modal-content i {
    font-size: 58px !important;
    margin: 0 !important;
}

body.speas-app #modal-success .modal-content h3,
body.speas-app #modal-error .modal-content h3 {
    margin: 0 !important;
    color: var(--speas-text, #111827) !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    white-space: pre-line !important;
}

@media (min-width: 1181px) and (max-width: 1500px) {
    body.speas-app #contenedor-dinamico .caja-chica-container .saldo-card-container {
        grid-template-columns: minmax(260px, 1.1fr) repeat(2, minmax(190px, 0.75fr)) !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .saldo-card,
    body.speas-app #contenedor-dinamico .caja-chica-container .btn-action {
        min-height: 150px !important;
    }
}

@media (min-width: 721px) and (max-width: 1180px) {
    body.speas-app #contenedor-dinamico .caja-chica-container {
        max-width: 760px !important;
        padding: 14px !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .saldo-card-container {
        grid-template-columns: 1fr 1fr !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .saldo-card {
        grid-column: 1 / -1 !important;
        min-height: 132px !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .btn-action {
        min-height: 142px !important;
    }
}

@media (max-width: 720px) {
    body.speas-app #contenedor-dinamico .caja-chica-container {
        max-width: 430px !important;
        padding: 12px 12px 48px !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .saldo-card-container {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .saldo-card {
        min-height: 156px !important;
        display: grid !important;
        justify-items: center !important;
        text-align: center !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .btn-action {
        min-height: 92px !important;
        display: grid !important;
        grid-template-columns: 52px minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        text-align: left !important;
        column-gap: 14px !important;
        row-gap: 2px !important;
        padding: 16px 18px !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .btn-action .icon-circle {
        grid-row: 1 / 3 !important;
        width: 46px !important;
        height: 46px !important;
        font-size: 28px !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .table-responsive {
        overflow: visible !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table,
    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table thead,
    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table tbody,
    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table tr,
    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table th,
    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table thead {
        display: none !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table tbody {
        display: grid !important;
        gap: 10px !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table tr {
        display: grid !important;
        padding: 12px !important;
        border: 1px solid var(--speas-border, #dbe6f2) !important;
        border-radius: 14px !important;
        background: var(--speas-surface, #ffffff) !important;
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05) !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table td {
        display: grid !important;
        grid-template-columns: 82px minmax(0, 1fr) !important;
        gap: 8px !important;
        align-items: start !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid var(--speas-border, #edf2f7) !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        font-size: 12px !important;
        line-height: 1.28 !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table td:last-child {
        border-bottom: 0 !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table td::before {
        color: var(--speas-muted, #64748b) !important;
        font-size: 10px !important;
        font-weight: 900 !important;
        letter-spacing: 0.04em !important;
        text-transform: uppercase !important;
    }

    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table td:nth-child(1)::before { content: "Fecha" !important; }
    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table td:nth-child(2)::before { content: "Tipo" !important; }
    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table td:nth-child(3)::before { content: "Categoria" !important; }
    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table td:nth-child(4)::before { content: "Detalle" !important; }
    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table td:nth-child(5)::before { content: "Monto" !important; }
    body.speas-app #contenedor-dinamico .caja-chica-container .premium-table td:nth-child(6)::before { content: "Responsable" !important; }

    body.speas-app #modal-chica .modal-content.center-modal {
        width: min(94vw, 390px) !important;
        max-height: calc(100dvh - 24px) !important;
    }

    body.speas-app #modal-chica .modal-header {
        padding: 16px 18px !important;
    }

    body.speas-app #modal-chica .modal-body {
        padding: 18px !important;
    }

    body.speas-app #modal-chica .modal-footer {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 360px) {
    body.speas-app #contenedor-dinamico .caja-chica-container .table-header-flex {
        grid-template-columns: 1fr !important;
    }
}

/* Speas caja chica dark contrast and close fix v3.3.29 */
body.speas-app #modal-chica .btn-close,
body.speas-app #modal-chica .modal-header .btn-close {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    flex: 0 0 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    padding: 0 !important;
}

body.speas-app #modal-chica .btn-close i,
body.speas-app #modal-chica .btn-close .bx {
    font-size: 20px !important;
    line-height: 1 !important;
    margin: 0 !important;
}

body.speas-app #contenedor-dinamico .caja-chica-container .chica-category-chip {
    display: inline-flex !important;
    align-items: center !important;
    width: fit-content !important;
    max-width: 100% !important;
    min-height: 28px !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    font-weight: 800 !important;
}

@media (max-width: 720px) {
    body.speas-app #modal-chica .btn-close,
    body.speas-app #modal-chica .modal-header .btn-close {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        flex: 0 0 38px !important;
        border-radius: 11px !important;
    }

    body.speas-app #modal-chica .btn-close i,
    body.speas-app #modal-chica .btn-close .bx {
        font-size: 18px !important;
    }
}

/* Speas inventario final modal and filters priority v3.3.30 */
body.speas-app #contenedor-dinamico .table-module-container .filter-actions {
    align-items: center !important;
}

body.speas-app #contenedor-dinamico .table-module-container .filter-actions .btn-excel-inventario,
body.speas-app #modal-kardex .btn-excel-inventario {
    min-width: 96px !important;
    height: 42px !important;
    padding-inline: 16px !important;
    justify-content: center !important;
    gap: 8px !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}

body.speas-app #contenedor-dinamico .table-module-container .filter-actions .btn-excel-inventario i,
body.speas-app #modal-kardex .btn-excel-inventario i {
    color: currentColor !important;
}

body.speas-app #modal-kardex.modal-overlay.active,
body.speas-app #modal-producto.modal-overlay.active {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0 !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(14px, 2.2vw, 34px) !important;
    overflow: hidden !important;
    background: rgba(15, 23, 42, 0.48) !important;
    backdrop-filter: blur(4px);
}

body.speas-app #modal-kardex .modal-content.center-modal {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: min(1480px, calc(100vw - clamp(28px, 4vw, 72px))) !important;
    max-width: 1480px !important;
    height: min(850px, calc(100dvh - clamp(28px, 4vw, 72px))) !important;
    max-height: calc(100dvh - clamp(28px, 4vw, 72px)) !important;
    min-width: 0 !important;
    margin: auto !important;
    transform: none !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body.speas-app #modal-kardex .kardex-filters {
    display: grid !important;
    grid-template-columns: minmax(190px, 0.9fr) minmax(220px, 1fr) minmax(260px, 1.15fr) minmax(104px, auto) !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 14px !important;
    margin: 0 !important;
    background: #f8fafc !important;
    border: 1px solid #dbe7f5 !important;
    border-radius: 12px !important;
}

body.speas-app #modal-kardex .kardex-filters > input,
body.speas-app #modal-kardex .kardex-filters > select,
body.speas-app #modal-kardex .kardex-filters > button {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    margin: 0 !important;
}

body.speas-app #modal-kardex .table-responsive-kardex {
    min-height: 0 !important;
    max-height: none !important;
    flex: 1 1 auto !important;
    overflow: auto !important;
}

body.speas-app #modal-producto .modal-content.slide-in-right {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: min(920px, calc(100vw - clamp(28px, 5vw, 96px))) !important;
    max-width: 920px !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: min(840px, calc(100dvh - clamp(28px, 5vw, 96px))) !important;
    margin: auto !important;
    transform: none !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22) !important;
}

body.speas-app #modal-producto .modal-header {
    min-height: 68px !important;
    padding: 20px 28px !important;
}

body.speas-app #modal-producto .modal-body {
    min-height: 0 !important;
    overflow: auto !important;
    padding: 26px 34px 24px !important;
}

body.speas-app #modal-producto #form-producto {
    max-width: 760px !important;
    margin: 0 auto !important;
}

body.speas-app #modal-producto .form-subtitle {
    margin: 24px 0 16px !important;
    padding-bottom: 9px !important;
    border-bottom: 1px solid var(--border-color, #e2e8f0) !important;
}

body.speas-app #modal-producto .form-subtitle:first-of-type {
    margin-top: 0 !important;
}

body.speas-app #modal-producto .row-grid {
    gap: 18px !important;
    margin-bottom: 18px !important;
}

body.speas-app #modal-producto .input-group {
    margin-top: 0 !important;
    margin-bottom: 18px !important;
}

body.speas-app #modal-producto .input-group input,
body.speas-app #modal-producto .input-group select {
    height: 46px !important;
    border-radius: 10px !important;
    padding-inline: 14px !important;
}

body.speas-app #modal-producto #group-sede {
    padding: 14px !important;
    margin: 0 0 18px !important;
    background: #f8fafc !important;
    border: 1px solid #dbe7f5 !important;
    border-radius: 12px !important;
}

body.speas-app #modal-producto #prod-sede {
    background: #fff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

body.speas-app #modal-producto .modal-footer {
    position: static !important;
    min-height: auto !important;
    padding: 18px 28px !important;
    border-top: 1px solid var(--border-color, #e2e8f0) !important;
}

@media (min-width: 1440px) {
    body.speas-app #contenedor-dinamico .table-module-container .filter-bar {
        grid-template-columns: minmax(320px, 1fr) auto !important;
    }

    body.speas-app #contenedor-dinamico .table-module-container .filter-actions {
        display: grid !important;
        grid-template-columns: minmax(190px, 220px) minmax(190px, 220px) minmax(104px, auto) !important;
        gap: 12px !important;
    }
}

@media (min-width: 769px) and (max-width: 1180px) {
    body.speas-app #modal-kardex .modal-content.center-modal {
        width: min(760px, calc(100vw - 44px)) !important;
        height: min(780px, calc(100dvh - 44px)) !important;
        max-width: calc(100vw - 44px) !important;
        max-height: calc(100dvh - 44px) !important;
    }

    body.speas-app #modal-kardex .kardex-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.speas-app #modal-producto .modal-content.slide-in-right {
        width: min(700px, calc(100vw - 44px)) !important;
        max-height: calc(100dvh - 44px) !important;
    }
}

@media (max-width: 768px) {
    body.speas-app #modal-kardex.modal-overlay.active,
    body.speas-app #modal-producto.modal-overlay.active {
        align-items: center !important;
        justify-content: center !important;
        padding: 14px !important;
    }

    body.speas-app #modal-kardex .modal-content.center-modal {
        width: calc(100vw - 28px) !important;
        max-width: calc(100vw - 28px) !important;
        height: min(760px, calc(100dvh - 28px)) !important;
        max-height: calc(100dvh - 28px) !important;
        border-radius: 16px !important;
    }

    body.speas-app #modal-kardex .modal-header,
    body.speas-app #modal-producto .modal-header {
        min-height: 64px !important;
        padding: 16px 18px !important;
    }

    body.speas-app #modal-kardex .modal-body,
    body.speas-app #modal-producto .modal-body {
        padding: 18px !important;
    }

    body.speas-app #modal-kardex .kardex-filters {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        padding: 10px !important;
    }

    body.speas-app #modal-producto .modal-content.slide-in-right {
        width: calc(100vw - 28px) !important;
        max-width: calc(100vw - 28px) !important;
        height: min(760px, calc(100dvh - 28px)) !important;
        max-height: calc(100dvh - 28px) !important;
        border-radius: 16px !important;
    }

    body.speas-app #modal-producto .row-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        margin-bottom: 0 !important;
    }

    body.speas-app #modal-producto .input-group {
        margin-bottom: 16px !important;
    }

    body.speas-app #modal-producto .modal-footer {
        padding: 14px 18px max(16px, env(safe-area-inset-bottom)) !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
}

/* Speas inventario stock modal centered viewport v3.3.31 */
body.speas-app #modal-stock.modal-overlay.active {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    overflow: hidden !important;
    background: rgba(15, 23, 42, 0.48) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 9999 !important;
}

body.speas-app #modal-stock .modal-content.center-modal {
    width: min(520px, calc(100vw - 48px)) !important;
    max-width: calc(100vw - 48px) !important;
    height: auto !important;
    max-height: min(720px, calc(100dvh - 48px)) !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    transform: none !important;
}

body.speas-app #modal-stock .modal-header {
    min-height: 70px !important;
    padding: 18px 24px !important;
}

body.speas-app #modal-stock .modal-header h3 {
    font-size: 18px !important;
    line-height: 1.2 !important;
}

body.speas-app #modal-stock .btn-close {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 10px !important;
}

body.speas-app #modal-stock .btn-close i {
    font-size: 18px !important;
}

body.speas-app #modal-stock .modal-body {
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 18px 24px 24px !important;
}

body.speas-app #modal-stock #form-stock {
    display: grid !important;
    gap: 16px !important;
}

body.speas-app #modal-stock #form-stock > div[style*="background: #f8fafc"] {
    margin-bottom: 0 !important;
}

body.speas-app #modal-stock .stock-tabs {
    margin-bottom: 0 !important;
}

body.speas-app #modal-stock .row-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 12px !important;
}

body.speas-app #modal-stock .input-group {
    margin: 0 !important;
}

body.speas-app #modal-stock .input-group input,
body.speas-app #modal-stock .input-group select {
    height: 44px !important;
    min-height: 44px !important;
    font-size: 14px !important;
}

body.speas-app #modal-stock .modal-footer {
    padding: 6px 0 0 !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px !important;
}

body.speas-app #modal-stock .modal-footer .btn-cancel,
body.speas-app #modal-stock .modal-footer .btn-primary {
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
    padding: 0 20px !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

@media (min-width: 769px) and (max-width: 1180px) {
    body.speas-app #modal-stock.modal-overlay.active {
        padding: 32px !important;
    }

    body.speas-app #modal-stock .modal-content.center-modal {
        width: min(560px, calc(100vw - 64px)) !important;
        max-width: calc(100vw - 64px) !important;
        max-height: calc(100dvh - 64px) !important;
    }
}

@media (max-width: 768px) {
    body.speas-app #modal-stock.modal-overlay.active {
        align-items: center !important;
        justify-content: center !important;
        padding: 14px !important;
    }

    body.speas-app #modal-stock .modal-content.center-modal {
        width: calc(100vw - 28px) !important;
        max-width: calc(100vw - 28px) !important;
        max-height: min(680px, calc(100dvh - 28px)) !important;
        border-radius: 18px !important;
    }

    body.speas-app #modal-stock .modal-header {
        min-height: 64px !important;
        padding: 16px 18px !important;
    }

    body.speas-app #modal-stock .modal-body {
        padding: 16px 18px 18px !important;
    }

    body.speas-app #modal-stock #form-stock {
        gap: 14px !important;
    }

    body.speas-app #modal-stock #form-stock > div[style*="background: #f8fafc"] {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        gap: 12px !important;
        align-items: center !important;
        padding: 12px !important;
    }

    body.speas-app #modal-stock .stock-tabs {
        gap: 6px !important;
        padding: 4px !important;
    }

    body.speas-app #modal-stock .stock-tab {
        min-height: 40px !important;
        padding: 8px 6px !important;
        font-size: 11px !important;
    }

    body.speas-app #modal-stock .row-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    body.speas-app #modal-stock .modal-footer {
        display: grid !important;
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr) !important;
        gap: 10px !important;
        padding-top: 4px !important;
    }

    body.speas-app #modal-stock .modal-footer .btn-cancel,
    body.speas-app #modal-stock .modal-footer .btn-primary {
        width: 100% !important;
        padding: 0 10px !important;
        font-size: 12px !important;
    }
}

/* Speas proveedores final mobile and tablet priority v3.3.32 */
@media (max-width: 1024px) {
    body.speas-app.module-proveedores-active #module-content .table-module-container {
        max-width: min(100%, 760px) !important;
        margin-inline: auto !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-toolbar {
        display: grid !important;
        grid-template-columns: 1fr auto auto !important;
        gap: 10px !important;
        align-items: center !important;
        padding: 12px !important;
        border-radius: 16px !important;
        background: #ffffff !important;
        border: 1px solid #dbe7f5 !important;
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05) !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container .filter-actions {
        display: contents !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container .btn-icon {
        width: auto !important;
        min-width: 44px !important;
        height: 44px !important;
        padding: 0 12px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 7px !important;
        border-radius: 12px !important;
        background: #f8fbff !important;
        border: 1px solid #d7e4f4 !important;
        color: #284469 !important;
        box-shadow: none !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container .btn-icon[title="Filtros"]::after {
        content: "Filtro";
        font-size: 12px;
        font-weight: 800;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container .btn-icon[title="Exportar Excel"]::after {
        content: "Excel";
        font-size: 12px;
        font-weight: 800;
    }

    body.speas-app.module-proveedores-active #modal-proveedor.modal-overlay.active .modal-content.slide-in-right {
        width: min(780px, calc(100vw - 56px)) !important;
        max-width: calc(100vw - 56px) !important;
        height: min(840px, calc(100dvh - 56px)) !important;
        max-height: calc(100dvh - 56px) !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .modal-body {
        padding: 20px 24px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .premium-table,
    body.speas-app.module-proveedores-active #modal-proveedor .premium-table tbody {
        display: grid !important;
        width: 100% !important;
        gap: 12px !important;
        border: 0 !important;
        background: transparent !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .premium-table tr {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) auto !important;
        gap: 12px !important;
        align-items: center !important;
        padding: 14px !important;
        border-radius: 16px !important;
        border: 1px solid #dbe7f5 !important;
        background: #f8fbff !important;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04) !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr,
    body.speas-app.module-proveedores-active #modal-proveedor #lista-banco-erp tr {
        grid-template-columns: repeat(3, minmax(0, 1fr)) auto !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .premium-table td {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .premium-table td[style*="width:30px"],
    body.speas-app.module-proveedores-active #modal-proveedor .premium-table td[style*="width: 4%"] {
        width: auto !important;
        justify-self: end !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .premium-table input,
    body.speas-app.module-proveedores-active #modal-proveedor .premium-table select {
        width: 100% !important;
        min-height: 42px !important;
        border: 1px solid #d2dfef !important;
        border-radius: 11px !important;
        background: #ffffff !important;
        color: #0f172a !important;
        padding: 9px 12px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .premium-table button {
        width: 38px !important;
        height: 38px !important;
        border-radius: 11px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ffe8ec !important;
        color: #ef4444 !important;
        border: 1px solid #ffd1d8 !important;
    }
}

@media (max-width: 768px) {
    body.speas-app.module-proveedores-active #module-content .table-module-container {
        width: min(100%, 390px) !important;
        padding: 0 10px 28px !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container > .module-header {
        margin-top: 0 !important;
        padding: 16px !important;
        border-radius: 16px !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-toolbar {
        grid-template-columns: 1fr 44px 44px !important;
        gap: 8px !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container .btn-icon::after {
        content: none !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive {
        overflow: visible !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table,
    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody,
    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tr,
    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table thead {
        display: none !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody {
        display: grid !important;
        gap: 12px !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tr {
        padding: 14px !important;
        border-radius: 17px !important;
        background: #ffffff !important;
        border: 1px solid #dbe7f5 !important;
        box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07) !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table td {
        display: grid !important;
        grid-template-columns: 92px minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 8px 0 !important;
        border: 0 !important;
        border-bottom: 1px solid #edf3fb !important;
        background: transparent !important;
        color: #172033 !important;
        font-size: 12px !important;
        text-align: left !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table td:last-child {
        border-bottom: 0 !important;
        display: block !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table td::before {
        display: block !important;
        color: #64748b !important;
        font-size: 10px !important;
        font-weight: 900 !important;
        line-height: 1.2 !important;
        text-transform: uppercase !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container .client-contact {
        align-items: flex-start !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container .status-badge {
        width: fit-content !important;
        max-width: 100% !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container .action-buttons {
        display: flex !important;
        justify-content: flex-start !important;
        gap: 9px !important;
        margin-top: 4px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor.modal-overlay.active {
        padding: 10px !important;
        align-items: center !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor.modal-overlay.active .modal-content.slide-in-right {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        height: calc(100dvh - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
        border-radius: 20px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .modal-header {
        min-height: 62px !important;
        padding: 16px 18px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .modal-header h3 {
        font-size: 15px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .btn-close {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        border-radius: 12px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .modal-body {
        padding: 16px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .form-subtitle {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        margin: 18px 0 12px !important;
        font-size: 13px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .premium-table tr,
    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr,
    body.speas-app.module-proveedores-active #modal-proveedor #lista-banco-erp tr {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        padding: 13px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .premium-table td[style*="width:30px"],
    body.speas-app.module-proveedores-active #modal-proveedor .premium-table td[style*="width: 4%"],
    body.speas-app.module-proveedores-active #modal-proveedor .premium-table td:last-child {
        position: static !important;
        justify-self: stretch !important;
        width: 100% !important;
        text-align: right !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .premium-table td:last-child button {
        margin-left: auto !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .modal-footer {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        padding: 12px 16px max(14px, env(safe-area-inset-bottom)) !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .modal-footer .btn-cancel {
        order: 1 !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .modal-footer .btn-primary {
        order: 2 !important;
    }
}

/* Speas proveedores final cascade lock v3.3.33 */
@media (max-width: 768px) {
    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr {
        background: #ffffff !important;
        background-color: #ffffff !important;
        color: #172033 !important;
        border-color: #dbe7f5 !important;
    }

    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr > td,
    html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr > td * {
        color: #172033 !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        white-space: normal !important;
    }
}

/* Speas proveedores modal/cards absolute final v3.3.34 */
body.speas-app.module-proveedores-active #modal-proveedor .btn-close {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 13px !important;
}

body.speas-app.module-proveedores-active #modal-proveedor .btn-close i {
    font-size: 22px !important;
    line-height: 1 !important;
}

body.speas-app.module-proveedores-active #tabla-proveedores-body td:nth-child(3) .status-badge {
    display: inline-flex !important;
    width: fit-content !important;
    max-width: 100% !important;
    align-items: center !important;
    justify-content: center !important;
    background: #e8fff8 !important;
    color: #057a6f !important;
    border: 1px solid #a9f1df !important;
    opacity: 1 !important;
    font-weight: 900 !important;
}

body.speas-app.module-proveedores-active #module-content .table-module-container > .table-toolbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
}

body.speas-app.module-proveedores-active #module-content .table-module-container .filter-actions {
    display: flex !important;
    justify-content: flex-end !important;
}

@media (min-width: 769px) {
    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr) 42px !important;
        align-items: center !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr > td:last-child {
        justify-self: end !important;
        width: 42px !important;
    }
}

@media (max-width: 768px) {
    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-toolbar {
        grid-template-columns: minmax(0, 1fr) 46px !important;
        gap: 8px !important;
    }

    body.speas-app.module-proveedores-active #module-content .table-module-container .filter-actions,
    body.speas-app.module-proveedores-active #module-content .table-module-container .filter-actions .btn-icon {
        width: 46px !important;
        min-width: 46px !important;
        height: 46px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor .btn-close {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr {
        grid-template-columns: minmax(0, 1fr) 44px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr > td:last-child {
        grid-column: 2 !important;
        grid-row: 1 !important;
        align-self: start !important;
        justify-self: end !important;
        width: 44px !important;
    }

    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr > td:not(:last-child) {
        grid-column: 1 / -1 !important;
    }
}

/* Speas proveedores modal/card polish final v3.3.35 */
body.speas-app #modal-proveedor .btn-close,
body.speas-app.module-proveedores-active #modal-proveedor .btn-close {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
}

body.speas-app #modal-proveedor .btn-close i,
body.speas-app.module-proveedores-active #modal-proveedor .btn-close i {
    font-size: 24px !important;
    line-height: 1 !important;
}

body.speas-app #module-content .table-module-container .filter-actions,
body.speas-app.module-proveedores-active #module-content .table-module-container .filter-actions {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: auto !important;
    min-width: 46px !important;
}

body.speas-app #module-content .table-module-container .filter-actions .btn-icon,
body.speas-app.module-proveedores-active #module-content .table-module-container .filter-actions .btn-icon {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
}

@media (min-width: 769px) {
    body.speas-app #modal-proveedor #lista-dir-erp tr,
    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr) 42px !important;
        align-items: center !important;
        gap: 10px !important;
    }

    body.speas-app #modal-proveedor #lista-dir-erp tr > td,
    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr > td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        grid-column: auto !important;
        grid-row: auto !important;
        padding: 0 !important;
    }

    body.speas-app #modal-proveedor #lista-dir-erp tr > td:last-child,
    body.speas-app.module-proveedores-active #modal-proveedor #lista-dir-erp tr > td:last-child {
        width: 42px !important;
        min-width: 42px !important;
        justify-self: end !important;
        align-self: center !important;
    }
}

@media (max-width: 768px) {
    body.speas-app #modal-proveedor .btn-close,
    body.speas-app.module-proveedores-active #modal-proveedor .btn-close {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
    }

    body.speas-app #module-content .table-module-container .filter-actions,
    body.speas-app.module-proveedores-active #module-content .table-module-container .filter-actions {
        display: flex !important;
        width: 46px !important;
        min-width: 46px !important;
        justify-content: flex-end !important;
    }

    body.speas-app #module-content .table-module-container > .table-responsive > .premium-table td:nth-child(3),
    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > .premium-table td:nth-child(3) {
        display: grid !important;
        grid-template-columns: 96px minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 10px !important;
        color: #172033 !important;
        min-height: 34px !important;
    }

    body.speas-app #module-content .table-module-container > .table-responsive > .premium-table td:nth-child(3) .badge,
    body.speas-app #module-content .table-module-container > .table-responsive > .premium-table td:nth-child(3) .status-badge,
    body.speas-app #module-content .table-module-container > .table-responsive > .premium-table td:nth-child(3) span,
    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > .premium-table td:nth-child(3) .badge,
    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > .premium-table td:nth-child(3) .status-badge,
    body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > .premium-table td:nth-child(3) span {
        justify-self: start !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        background: #e8fff8 !important;
        border: 1px solid #a9f1df !important;
        color: #057a6f !important;
        opacity: 1 !important;
    }
}

/* Proveedores final toolbar/category priority v3.3.36 */
body.speas-app.module-proveedores-active .table-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.speas-app.module-proveedores-active .table-toolbar .search-box {
    flex: 1 1 540px !important;
    max-width: 620px !important;
    min-width: 260px !important;
    height: 46px !important;
    box-sizing: border-box !important;
}

body.speas-app.module-proveedores-active .table-toolbar .filter-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    margin-left: auto !important;
    min-width: max-content !important;
}

body.speas-app.module-proveedores-active .table-toolbar .btn-export-excel {
    width: auto !important;
    min-width: 104px !important;
    height: 46px !important;
    padding: 0 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
}

body.speas-app.module-proveedores-active .table-toolbar .btn-export-excel .excel-label {
    display: inline-block !important;
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
    font-weight: 800 !important;
    font-size: 13px !important;
}

html body.speas-app.module-proveedores-active #tabla-proveedores-body > tr > td:nth-child(3) > span.status-badge {
    background: #e4fff8 !important;
    background-color: #e4fff8 !important;
    border: 1px solid #86e8d3 !important;
    color: #075f59 !important;
    -webkit-text-fill-color: #075f59 !important;
    opacity: 1 !important;
    filter: none !important;
    text-shadow: none !important;
    font-weight: 900 !important;
}

@media (max-width: 768px) {
    body.speas-app.module-proveedores-active .table-toolbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 48px !important;
        gap: 10px !important;
        align-items: center !important;
        padding: 12px !important;
        border-radius: 14px !important;
    }

    body.speas-app.module-proveedores-active .table-toolbar .search-box {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 48px !important;
    }

    body.speas-app.module-proveedores-active .table-toolbar .filter-actions {
        width: 48px !important;
        min-width: 48px !important;
        margin-left: 0 !important;
        justify-content: center !important;
    }

    body.speas-app.module-proveedores-active .table-toolbar .btn-export-excel {
        width: 48px !important;
        min-width: 48px !important;
        height: 48px !important;
        padding: 0 !important;
        border-radius: 12px !important;
    }

    body.speas-app.module-proveedores-active .table-toolbar .btn-export-excel .excel-label {
        display: none !important;
    }

    body.speas-app.module-proveedores-active #tabla-proveedores-body > tr > td:nth-child(3) > span.status-badge {
        min-width: 86px !important;
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
}

/* Proveedores category ultra-specific final override v3.3.36 */
html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr > td:nth-child(3) > span.status-badge,
html body.speas-app.module-proveedores-active .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr > td:nth-child(3) > span.status-badge {
    background: #e4fff8 !important;
    background-color: #e4fff8 !important;
    border: 1px solid #86e8d3 !important;
    color: #075f59 !important;
    -webkit-text-fill-color: #075f59 !important;
    opacity: 1 !important;
    filter: none !important;
    text-shadow: none !important;
    font-weight: 900 !important;
}

/* Proveedores final theme polish v3.3.37 */
html body.speas-app.module-proveedores-active .table-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    width: 100% !important;
    padding: 22px 18px !important;
    box-sizing: border-box !important;
}

html body.speas-app.module-proveedores-active .table-toolbar .search-box {
    flex: 0 1 540px !important;
    width: min(540px, 48vw) !important;
    max-width: 540px !important;
    min-width: 280px !important;
    min-height: 46px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

html body.speas-app.module-proveedores-active .table-toolbar .filter-actions {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin-left: auto !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

html body.speas-app.module-proveedores-active .table-toolbar .btn-export-excel {
    width: auto !important;
    min-width: 112px !important;
    max-width: 132px !important;
    height: 46px !important;
    padding: 0 18px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
}

html body.speas-app.module-proveedores-active .table-toolbar .btn-export-excel .excel-label {
    display: inline-block !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    line-height: 1 !important;
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
}

html body.speas-app.module-proveedores-active #module-content .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr > td:nth-child(3) > span.status-badge,
html body.speas-app.module-proveedores-active .table-module-container > .table-responsive > table.premium-table tbody#tabla-proveedores-body > tr > td:nth-child(3) > span.status-badge,
html body.speas-app.module-proveedores-active #tabla-proveedores-body > tr > td:nth-child(3) > span.status-badge {
    min-width: 82px !important;
    max-width: 120px !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    background: #e4fff8 !important;
    background-color: #e4fff8 !important;
    border: 1px solid #69d8c6 !important;
    color: #075f59 !important;
    -webkit-text-fill-color: #075f59 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
    opacity: 1 !important;
    filter: none !important;
    box-shadow: none !important;
}

html body.speas-app.module-proveedores-active #modal-proveedor .modal-body,
html body.speas-app.module-proveedores-active #modal-proveedor .modal-content {
    scrollbar-width: thin !important;
    scrollbar-color: #94a3b8 #f8fafc !important;
}

@media (max-width: 768px) {
    html body.speas-app.module-proveedores-active .table-toolbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 48px !important;
        gap: 10px !important;
        padding: 12px !important;
    }

    html body.speas-app.module-proveedores-active .table-toolbar .search-box {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        min-height: 48px !important;
    }

    html body.speas-app.module-proveedores-active .table-toolbar .filter-actions,
    html body.speas-app.module-proveedores-active .table-toolbar .btn-export-excel {
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        height: 48px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html body.speas-app.module-proveedores-active .table-toolbar .btn-export-excel .excel-label {
        display: none !important;
    }
}

/* ==========================================================================
   Área táctil mínima en dispositivos de dedo
   --------------------------------------------------------------------------
   El sistema de densidad reduce --speas-input-h a 32px (>=769px) y 30px
   (>=1024px), pensado para mouse. Pero una tablet en horizontal (~1024-1180px,
   el caso de las sedes) entra en esos breakpoints por ancho y termina con
   inputs y botones por debajo del mínimo táctil de 44px.

   `pointer: coarse` distingue el dispositivo de entrada del tamaño de pantalla,
   que es la pregunta correcta: el desktop con mouse conserva su densidad.
   ========================================================================== */
@media (pointer: coarse) {
    :root {
        --speas-input-h: 44px;
    }
}
