:root,
:root[data-theme="dark"] {
    --sayc-bg-main: #141414;
    --sayc-bg-surface: #1e2227;
    --sayc-bg-surface-2: #232830;
    --sayc-bg-surface-3: #171b20;
    --sayc-border-subtle: #2a2f36;
    --sayc-border-strong: #36404b;
    --sayc-text-primary: #e4e7eb;
    --sayc-text-secondary: #9aa2ac;
    --sayc-accent: #3182ce;
    --sayc-accent-soft: rgba(49, 130, 206, 0.14);
    --sayc-success: #48bb78;
    --sayc-warning: #ecc94b;
    --sayc-info: #4299e1;
    --sayc-danger: #d64545;
    --sayc-shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.22);
    --sayc-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23bcc6d3'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293A1 1 0 0 1 .293 14.293L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    color-scheme: dark;
}

:root[data-theme="light"] {
    --sayc-bg-main: #ecf3f9;
    --sayc-bg-surface: #ffffff;
    --sayc-bg-surface-2: #f7fbff;
    --sayc-bg-surface-3: #e5eef7;
    --sayc-border-subtle: #dbe5ef;
    --sayc-border-strong: #c4d3e2;
    --sayc-text-primary: #17324d;
    --sayc-text-secondary: #627d96;
    --sayc-accent: #2f6fae;
    --sayc-accent-soft: rgba(47, 111, 174, 0.12);
    --sayc-success: #2f8c64;
    --sayc-warning: #b88413;
    --sayc-info: #2f6fae;
    --sayc-danger: #c15555;
    --sayc-shadow-soft: 0 16px 34px rgba(27, 73, 120, 0.12);
    --sayc-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235f7893'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293A1 1 0 0 1 .293 14.293L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    color-scheme: light;
}

body.admin-dark,
body.auth-screen,
body.select-client-page,
body.proc-dark-page,
body.public-page {
    color: var(--sayc-text-primary);
}

body.admin-dark,
body.proc-dark-page {
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--sayc-accent) 12%, transparent), transparent 24%),
        radial-gradient(circle at top center, color-mix(in srgb, var(--sayc-bg-surface) 24%, transparent), transparent 28%),
        var(--sayc-bg-main);
}

body.auth-screen,
body.select-client-page {
    background:
        radial-gradient(circle at top, color-mix(in srgb, var(--sayc-accent) 16%, transparent), transparent 30%),
        linear-gradient(145deg, var(--sayc-bg-main) 0%, var(--sayc-bg-surface-3) 100%);
}

body.public-page {
    background: var(--sayc-bg-main);
}

body.auth-screen .card,
body.auth-screen .auth-card-rounded,
body.select-client-page .select-card,
body.public-page .public-service-card,
body.bg-light .auth-card-rounded {
    background: var(--sayc-bg-surface);
    border: 1px solid var(--sayc-border-subtle);
    box-shadow: var(--sayc-shadow-soft);
    color: var(--sayc-text-primary);
}

body.auth-screen .text-muted,
body.auth-screen .form-text,
body.select-client-page .text-muted,
body.public-page .text-muted,
body.admin-dark .text-muted,
body.admin-dark .form-text,
body.proc-dark-page .text-muted,
body.proc-dark-page .form-text {
    color: var(--sayc-text-secondary) !important;
}

body.auth-screen .text-dark,
body.select-client-page .text-dark,
body.public-page .text-dark {
    color: var(--sayc-text-primary) !important;
}

body.admin-dark .form-control,
body.admin-dark .form-select,
body.admin-dark .input-group-text,
body.proc-dark-page .form-control,
body.proc-dark-page .form-select,
body.proc-dark-page .input-group-text,
body.auth-screen .form-control,
body.auth-screen .form-select,
body.select-client-page .form-control,
body.select-client-page .form-select {
    background: var(--sayc-bg-surface-2);
    border-color: var(--sayc-border-strong);
    color: var(--sayc-text-primary);
}

body.admin-dark .form-control::placeholder,
body.admin-dark .form-select::placeholder,
body.proc-dark-page .form-control::placeholder,
body.auth-screen .form-control::placeholder,
body.select-client-page .form-control::placeholder {
    color: color-mix(in srgb, var(--sayc-text-secondary) 82%, transparent);
}

body.admin-dark .form-control:focus,
body.admin-dark .form-select:focus,
body.proc-dark-page .form-control:focus,
body.proc-dark-page .form-select:focus,
body.auth-screen .form-control:focus,
body.auth-screen .form-select:focus,
body.select-client-page .form-control:focus,
body.select-client-page .form-select:focus {
    background: var(--sayc-bg-surface);
    border-color: color-mix(in srgb, var(--sayc-accent) 72%, white);
    color: var(--sayc-text-primary);
    box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--sayc-accent) 18%, transparent);
}

.sayc-primary-btn,
body.public-page .btn-outline-light:hover,
body.public-page .btn-outline-light:focus {
    background: var(--sayc-accent);
    border-color: var(--sayc-accent);
    color: #f7fbff;
}

.sayc-primary-btn:hover,
.sayc-primary-btn:focus {
    background: color-mix(in srgb, var(--sayc-accent) 88%, black);
    border-color: color-mix(in srgb, var(--sayc-accent) 88%, black);
    color: #f7fbff;
}

body.auth-screen .auth-qr-box {
    background: var(--sayc-bg-surface-2);
    border-color: var(--sayc-border-strong);
    color: var(--sayc-text-primary);
}

body.select-client-page .select-progress {
    background: color-mix(in srgb, var(--sayc-accent) 10%, white);
}

body.public-page .navbar,
body.public-page footer {
    background: linear-gradient(180deg, color-mix(in srgb, var(--sayc-bg-surface) 88%, var(--sayc-bg-main)) 0%, var(--sayc-bg-surface-3) 100%) !important;
    border-color: var(--sayc-border-subtle);
}

body.public-page .navbar .navbar-brand,
body.public-page .navbar .nav-link,
body.public-page footer,
body.public-page footer p {
    color: var(--sayc-text-primary) !important;
}

body.public-page .btn-outline-light {
    border-color: color-mix(in srgb, var(--sayc-accent) 58%, transparent);
    color: var(--sayc-accent);
}

body.public-page .public-hero-section {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--sayc-accent) 92%, #0f2742) 0%, color-mix(in srgb, var(--sayc-accent) 68%, #12263b) 100%);
    color: #f7fbff;
}

body.public-page #servicios.bg-light,
body.public-page .bg-light {
    background: var(--sayc-bg-surface-2) !important;
}

body.public-page #nosotros,
body.public-page #servicios {
    color: var(--sayc-text-primary);
}

body.public-page .public-service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 38px rgba(20, 54, 87, 0.14);
}

:root[data-theme="light"] #sidebar-wrapper {
    background: linear-gradient(180deg, #f7fbff 0%, #edf4fa 100%);
    border-right-color: rgba(47, 111, 174, 0.12);
    box-shadow: 14px 0 32px rgba(33, 81, 124, 0.14);
}

:root[data-theme="light"] #sidebar-wrapper .sidebar-heading {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 249, 255, 0.96) 100%);
    border-bottom-color: rgba(47, 111, 174, 0.08) !important;
    color: #17324d;
}

:root[data-theme="light"] #sidebar-wrapper .sidebar-brand-text,
:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link-top,
:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link-mid {
    color: #24405a !important;
}

:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link,
:root[data-theme="light"] #sidebar-wrapper .collapse .collapse > .sidebar-nav-link,
:root[data-theme="light"] #sidebar-wrapper #submenuSecure > .sidebar-nav-link,
:root[data-theme="light"] #sidebar-wrapper #submenuHerramientas > .sidebar-nav-link,
:root[data-theme="light"] #sidebar-wrapper #submenuProcesos > .sidebar-nav-link {
    color: #627d96 !important;
}

:root[data-theme="light"] #sidebar-wrapper .sidebar-group-heading,
:root[data-theme="light"] #sidebar-wrapper .system-group-heading {
    color: #7b94ab !important;
    border-top-color: rgba(47, 111, 174, 0.08) !important;
}

:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link:hover,
:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link:focus-visible,
:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link-leaf.sidebar-current,
:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link-leaf.active {
    background: rgba(47, 111, 174, 0.08) !important;
    color: #17324d !important;
}

:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link-top.sidebar-current,
:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link-top.active,
:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link-top.sidebar-open,
:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link-mid.sidebar-current,
:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link-mid.active,
:root[data-theme="light"] #sidebar-wrapper .sidebar-nav-link-mid.sidebar-open {
    background: rgba(47, 111, 174, 0.12) !important;
    border-left-color: #2f6fae !important;
    color: #17324d !important;
}

:root[data-theme="light"] #sidebar-wrapper .collapse.show::before,
:root[data-theme="light"] #sidebar-wrapper .collapse.collapsing::before {
    background: linear-gradient(180deg, rgba(47, 111, 174, 0.16) 0%, rgba(47, 111, 174, 0.04) 100%);
}

#sidebar-wrapper .theme-mode-option.is-theme-active {
    background: var(--sayc-accent-soft) !important;
    color: var(--sayc-text-primary) !important;
    border-left-color: var(--sayc-accent) !important;
}

#sidebar-wrapper .theme-mode-option.is-theme-active .theme-mode-badge {
    background: color-mix(in srgb, var(--sayc-accent) 16%, transparent);
    color: var(--sayc-accent);
    border-color: color-mix(in srgb, var(--sayc-accent) 24%, transparent);
}

.theme-mode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--sayc-border-subtle);
    background: color-mix(in srgb, var(--sayc-bg-surface) 88%, transparent);
    color: var(--sayc-text-secondary);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

:root[data-theme="light"] .table-dark-custom {
    background: #f4f9fe;
}

:root[data-theme="light"] .desktop-table-wrap {
    border-color: #c7d6e5;
    background: linear-gradient(180deg, #ffffff 0%, #f3f8fd 100%);
    box-shadow: inset 0 0 0 1px rgba(47, 111, 174, 0.04), 0 12px 24px rgba(34, 79, 121, 0.1);
}

:root[data-theme="light"] .table-dark-custom thead th {
    background: linear-gradient(180deg, #dfeaf5 0%, #cfdeec 100%);
    color: #23415d;
    border-color: #c2d2e1;
}

:root[data-theme="light"] .table-dark-custom thead tr:nth-child(2) th,
:root[data-theme="light"] .table-dark-custom thead tr:nth-child(2) th::before {
    background: #edf4fa;
    box-shadow: 0 1px 0 #cfdeec;
}

:root[data-theme="light"] .table-dark-custom thead tr:nth-child(2) .form-select,
:root[data-theme="light"] .table-dark-custom thead tr:nth-child(2) .form-control {
    background-color: #ffffff !important;
    color: #17324d !important;
}

:root[data-theme="light"] .table-dark-custom td,
:root[data-theme="light"] .table-dark-custom th {
    border-color: #d7e2ec;
}

:root[data-theme="light"] .table-dark-custom tbody td {
    background: #ffffff;
    color: #24405a;
    border-bottom-color: #dfebf5;
}

:root[data-theme="light"] .table-dark-custom tbody tr:nth-child(even) td {
    background: #f7fbff;
}

:root[data-theme="light"] .table-dark-custom tbody tr:hover td {
    background: #eaf3fb !important;
    color: #17324d;
}

:root[data-theme="light"] .flatpickr-calendar {
    background: #ffffff;
    color: #17324d;
    border: 1px solid #cfdeec;
    box-shadow: 0 16px 32px rgba(31, 72, 112, 0.14);
}

:root[data-theme="light"] .flatpickr-months .flatpickr-month,
:root[data-theme="light"] .flatpickr-current-month .flatpickr-monthDropdown-months,
:root[data-theme="light"] .flatpickr-weekdays,
:root[data-theme="light"] span.flatpickr-weekday {
    color: #17324d;
    fill: #17324d;
}

:root[data-theme="light"] .flatpickr-day {
    color: #254360;
}

:root[data-theme="light"] .flatpickr-day.selected,
:root[data-theme="light"] .flatpickr-day.startRange,
:root[data-theme="light"] .flatpickr-day.endRange {
    background: #2f6fae;
    border-color: #2f6fae;
}

:root[data-theme="light"] .dashboard-shell {
    background:
        radial-gradient(circle at top left, rgba(47, 111, 174, 0.10), transparent 24%),
        radial-gradient(circle at top center, rgba(255, 255, 255, 0.76), transparent 34%),
        linear-gradient(180deg, #eef4fa 0%, #e6eef7 100%);
}

:root[data-theme="light"] .admin-modal-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(244, 249, 253, 0.98) 100%);
    border-color: rgba(47, 111, 174, 0.12);
    box-shadow: 0 24px 48px rgba(31, 72, 112, 0.18);
}

:root[data-theme="light"] .admin-modal-header {
    background: linear-gradient(180deg, rgba(249, 252, 255, 0.98) 0%, rgba(241, 247, 252, 0.96) 100%);
    border-bottom-color: rgba(47, 111, 174, 0.10);
}

:root[data-theme="light"] .admin-modal-title,
:root[data-theme="light"] .admin-modal-subtitle,
:root[data-theme="light"] .admin-modal-body,
:root[data-theme="light"] .admin-modal-content .modal-footer {
    color: #17324d;
}

:root[data-theme="light"] .admin-modal-subtitle,
:root[data-theme="light"] .admin-modal-body .text-muted,
:root[data-theme="light"] .admin-modal-content .modal-footer .btn-admin-ghost {
    color: #6c859d !important;
}

:root[data-theme="light"] .admin-modal-body {
    background: transparent;
}

:root[data-theme="light"] .admin-modal-content .modal-footer {
    background: rgba(249, 252, 255, 0.88);
    border-top-color: rgba(47, 111, 174, 0.10);
}

:root[data-theme="light"] .admin-modal-content .btn-close {
    filter: none;
    opacity: 0.72;
}

:root[data-theme="light"] .admin-modal-content .btn-close:hover,
:root[data-theme="light"] .admin-modal-content .btn-close:focus {
    opacity: 1;
}

:root[data-theme="light"] #modalConfigTablas .modal-title {
    color: #17324d;
    font-weight: 700;
}

:root[data-theme="light"] #modalConfigTablas .admin-modal-body {
    background:
        linear-gradient(180deg, rgba(251, 253, 255, 0.98) 0%, rgba(243, 248, 252, 0.96) 100%);
}

:root[data-theme="light"] #modalConfigTablas #checklistTablas {
    padding: 0.4rem 0.25rem 0.15rem !important;
}

:root[data-theme="light"] #modalConfigTablas .admin-visibility-section {
    margin-top: 0.65rem;
    padding: 0 0 0.85rem;
    border-bottom: 1px solid rgba(47, 111, 174, 0.12);
}

:root[data-theme="light"] #modalConfigTablas .admin-visibility-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(47, 111, 174, 0.16);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(238, 245, 252, 0.98) 0%, rgba(230, 239, 248, 0.94) 100%);
    color: #2b5d88;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

:root[data-theme="light"] #modalConfigTablas .col-md-4.col-sm-6 {
    display: flex;
}

:root[data-theme="light"] #modalConfigTablas .admin-visibility-item {
    width: 100%;
    min-height: 48px;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(47, 111, 174, 0.10);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(246, 250, 254, 0.98) 100%);
    box-shadow: 0 10px 22px rgba(31, 72, 112, 0.06);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

:root[data-theme="light"] #modalConfigTablas .admin-visibility-item:hover {
    border-color: rgba(47, 111, 174, 0.18);
    box-shadow: 0 14px 28px rgba(31, 72, 112, 0.10);
    transform: translateY(-1px);
}

:root[data-theme="light"] #modalConfigTablas .admin-visibility-item .form-check-input {
    border-color: rgba(117, 140, 163, 0.38);
    background-color: #eef3f8;
    box-shadow: none;
}

:root[data-theme="light"] #modalConfigTablas .admin-visibility-item .form-check-input:focus {
    border-color: rgba(47, 111, 174, 0.34);
    box-shadow: 0 0 0 0.18rem rgba(47, 111, 174, 0.14);
}

:root[data-theme="light"] #modalConfigTablas .admin-visibility-item .form-check-input:checked {
    background-color: #2f6fae;
    border-color: #2f6fae;
}

:root[data-theme="light"] #modalConfigTablas .admin-visibility-item .form-check-label {
    color: #33526e;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

:root[data-theme="light"] #modalConfigTablas .modal-footer {
    background: linear-gradient(180deg, rgba(249, 252, 255, 0.96) 0%, rgba(241, 247, 252, 0.94) 100%);
}

:root[data-theme="light"] .sat-cfdi-inline-note {
    background: rgba(243, 248, 252, 0.98);
    border-color: rgba(47, 111, 174, 0.10);
    color: #5f7790;
}

:root[data-theme="light"] #modalXmlReports .admin-modal-content {
    background:
        radial-gradient(circle at top right, rgba(47, 111, 174, 0.08), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(243, 248, 253, 0.985) 100%);
    border-color: rgba(47, 111, 174, 0.12);
    box-shadow: 0 26px 54px rgba(31, 72, 112, 0.16);
}

:root[data-theme="light"] #modalXmlReports .admin-modal-header {
    background: linear-gradient(180deg, rgba(250, 253, 255, 0.99) 0%, rgba(241, 247, 252, 0.97) 100%);
    border-bottom-color: rgba(47, 111, 174, 0.10);
}

:root[data-theme="light"] #modalXmlReports .admin-modal-title {
    color: #17324d;
}

:root[data-theme="light"] #modalXmlReports .admin-modal-title i {
    color: #17324d;
}

:root[data-theme="light"] #modalXmlReports .admin-modal-subtitle {
    color: #6c859d !important;
}

:root[data-theme="light"] #modalXmlReports .admin-modal-body {
    background:
        radial-gradient(circle at top left, rgba(47, 111, 174, 0.05), transparent 24%),
        linear-gradient(180deg, rgba(251, 253, 255, 0.99) 0%, rgba(242, 248, 253, 0.97) 100%);
}

:root[data-theme="light"] #modalXmlReports .modal-footer {
    background: linear-gradient(180deg, rgba(249, 252, 255, 0.96) 0%, rgba(241, 247, 252, 0.94) 100%);
    border-top-color: rgba(47, 111, 174, 0.10);
}

:root[data-theme="light"] #modalXmlReports #xml-reports-feedback,
:root[data-theme="light"] #modalXmlReports .sat-cfdi-inline-note {
    background: linear-gradient(180deg, rgba(246, 250, 254, 0.99) 0%, rgba(239, 246, 252, 0.97) 100%);
    border-color: rgba(47, 111, 174, 0.10);
    color: #5f7790;
}

:root[data-theme="light"] #modalXmlReports .dashboard-ws-table-wrap {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(244, 249, 253, 0.98) 100%);
    border-color: rgba(47, 111, 174, 0.10);
    box-shadow: 0 16px 32px rgba(31, 72, 112, 0.08);
}

:root[data-theme="light"] #modalXmlReports .admin-select,
:root[data-theme="light"] #modalXmlReports .admin-input {
    background: #ffffff;
    border-color: #d4dfeb;
    color: #17324d;
}

:root[data-theme="light"] #modalXmlReports .xml-report-combobox-trigger {
    background: #ffffff;
    border-color: #d4dfeb;
    color: #17324d;
}

:root[data-theme="light"] #modalXmlReports .xml-report-combobox-trigger:hover,
:root[data-theme="light"] #modalXmlReports .xml-report-combobox-trigger:focus,
:root[data-theme="light"] #modalXmlReports .xml-report-combobox-trigger.show {
    border-color: rgba(47, 111, 174, 0.28);
    color: #17324d;
    box-shadow: 0 0 0 0.18rem rgba(47, 111, 174, 0.12);
}

:root[data-theme="light"] #modalXmlReports .xml-report-combobox-menu {
    border-color: rgba(47, 111, 174, 0.10);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(243, 248, 253, 0.99) 100%);
    box-shadow: 0 18px 32px rgba(31, 72, 112, 0.12);
}

:root[data-theme="light"] #modalXmlReports .xml-report-combobox-item:hover {
    background: rgba(227, 238, 248, 0.58);
}

:root[data-theme="light"] #modalXmlReports .xml-report-combobox-item .form-check-label {
    color: #24445f;
}

:root[data-theme="light"] #modalXmlReports .admin-select option {
    background: #ffffff;
    color: #17324d;
}

:root[data-theme="light"] #modalXmlReports .dashboard-ws-summary-table thead th {
    background: rgba(240, 246, 252, 0.98);
    color: #315578;
    border-bottom-color: rgba(47, 111, 174, 0.12);
}

:root[data-theme="light"] #modalXmlReports .dashboard-ws-summary-table tbody td {
    color: #24445f;
    border-bottom-color: rgba(47, 111, 174, 0.08);
}

:root[data-theme="light"] #modalXmlReports .dashboard-ws-summary-table tbody tr:hover td {
    background: rgba(227, 238, 248, 0.55);
}

:root[data-theme="light"] #modalXmlReports .report-modal-document,
:root[data-theme="light"] #modalXmlReports .sat-cancelled-preview-title,
:root[data-theme="light"] #modalXmlReports .sat-cancelled-preview-section-title {
    color: #17324d;
}

:root[data-theme="light"] #modalXmlReports .sat-cancelled-preview-kicker,
:root[data-theme="light"] #modalXmlReports .sat-cancelled-preview-meta,
:root[data-theme="light"] #modalXmlReports .sat-cancelled-preview-muted {
    color: #70879d;
}

:root[data-theme="light"] #modalXmlReports .sat-cancelled-preview-pill {
    border-color: rgba(47, 111, 174, 0.20);
    background: rgba(226, 238, 250, 0.96);
    color: #2c5f93;
}

:root[data-theme="light"] #modalXmlReports .sat-cancelled-preview-note-block {
    border-color: rgba(47, 111, 174, 0.18);
    background: rgba(244, 249, 253, 0.96);
    color: #5f7790;
}

:root[data-theme="light"] #modalXmlReports .report-modal-metric {
    background: linear-gradient(180deg, rgba(247, 251, 255, 0.99) 0%, rgba(239, 246, 252, 0.98) 100%);
    border-color: rgba(47, 111, 174, 0.08);
}

:root[data-theme="light"] #modalXmlReports .report-modal-metric span {
    color: #70879d;
}

:root[data-theme="light"] #modalXmlReports .report-modal-metric strong {
    color: #17324d;
}

:root[data-theme="light"] #modalXmlReports .report-modal-actions {
    border-top-color: rgba(47, 111, 174, 0.10);
}

:root[data-theme="light"] #modalXmlReports .report-modal-actions .btn-admin-ghost {
    color: #6d859c !important;
}

:root[data-theme="light"] #modalXmlReports .report-modal-actions .btn-admin-ghost:hover,
:root[data-theme="light"] #modalXmlReports .report-modal-actions .btn-admin-ghost:focus {
    color: #17324d !important;
    background: rgba(47, 111, 174, 0.08);
}

:root[data-theme="light"] #btn-xml-materiales-load {
    background: linear-gradient(180deg, #4d97ea 0%, #2f6fae 100%);
    border-color: rgba(47, 111, 174, 0.18);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(47, 111, 174, 0.16);
}

:root[data-theme="light"] #btn-xml-materiales-load:hover,
:root[data-theme="light"] #btn-xml-materiales-load:focus {
    background: linear-gradient(180deg, #5aa3f4 0%, #397fc3 100%);
}

:root[data-theme="light"] #btn-xml-materiales-export {
    background: linear-gradient(180deg, #2aa18f 0%, #1f8575 100%);
    border-color: rgba(30, 129, 113, 0.18);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(31, 133, 117, 0.14);
}

:root[data-theme="light"] #btn-xml-materiales-export:hover,
:root[data-theme="light"] #btn-xml-materiales-export:focus {
    background: linear-gradient(180deg, #30ae9a 0%, #23917f 100%);
}

:root[data-theme="light"] #btn-xml-materiales-clear {
    color: #5c7289;
    background: rgba(230, 237, 245, 0.92);
    border-color: rgba(47, 111, 174, 0.08);
}

:root[data-theme="light"] #btn-xml-materiales-clear:hover,
:root[data-theme="light"] #btn-xml-materiales-clear:focus {
    color: #274764;
    background: rgba(221, 232, 243, 0.98);
    border-color: rgba(47, 111, 174, 0.14);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-modal-body {
    background:
        radial-gradient(circle at top right, rgba(47, 111, 174, 0.06), transparent 28%),
        linear-gradient(180deg, rgba(251, 253, 255, 0.98) 0%, rgba(242, 248, 253, 0.96) 100%);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-hero,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-status-card,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-progress-card,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-work-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(244, 249, 253, 0.97) 100%);
    border: 1px solid rgba(47, 111, 174, 0.12);
    box-shadow: 0 16px 32px rgba(31, 72, 112, 0.08);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-hero {
    padding: 14px 16px;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-hero-item,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-integrity-metric {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(246, 250, 254, 0.96);
    border: 1px solid rgba(47, 111, 174, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-label,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-status-label {
    color: #6e869b;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-value,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-status-value,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .admin-panel-title {
    color: #17324d;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-status-copy {
    color: #668198;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .admin-label {
    color: #6e869b;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-status-card.is-ready {
    border-color: rgba(47, 140, 100, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(243, 251, 247, 0.97) 100%);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-status-card.is-warning {
    border-color: rgba(184, 132, 19, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 249, 236, 0.97) 100%);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-tab-nav {
    background: linear-gradient(180deg, rgba(238, 245, 252, 0.98) 0%, rgba(229, 238, 247, 0.94) 100%);
    border-color: rgba(47, 111, 174, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-tab-btn {
    color: #6c859c;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-tab-btn:hover,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-tab-btn:focus {
    color: #264764;
    background: rgba(47, 111, 174, 0.08);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-tab-btn.is-active {
    background: linear-gradient(180deg, rgba(66, 113, 164, 0.98) 0%, rgba(47, 91, 138, 0.96) 100%);
    color: #f7fbff;
    box-shadow: 0 10px 22px rgba(31, 72, 112, 0.14);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-progress-log {
    background: linear-gradient(180deg, rgba(249, 252, 255, 0.99) 0%, rgba(239, 246, 252, 0.98) 100%);
    border-color: rgba(47, 111, 174, 0.10);
    color: #315f36;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-calendar {
    background: #ffffff !important;
    border: 1px solid rgba(47, 111, 174, 0.16) !important;
    box-shadow: 0 18px 34px rgba(31, 72, 112, 0.16) !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-months {
    background: linear-gradient(180deg, #dfe9f3 0%, #d2deea 100%) !important;
    border-bottom: 1px solid rgba(47, 111, 174, 0.10) !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    padding: 6px 6px 0 !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-current-month,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-months .flatpickr-month {
    color: #24405a !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-current-month .flatpickr-monthDropdown-months,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-current-month input.cur-year,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-current-month span.cur-month {
    color: #24405a !important;
    fill: #24405a !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-current-month .flatpickr-monthDropdown-months {
    background: rgba(255, 255, 255, 0.88) !important;
    border-radius: 999px !important;
    padding: 2px 10px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84) !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .sat-flatpickr-year-select {
    background-color: rgba(255, 255, 255, 0.88) !important;
    background-image:
        linear-gradient(45deg, transparent 50%, #6e869b 50%),
        linear-gradient(135deg, #6e869b 50%, transparent 50%) !important;
    color: #24405a !important;
    color-scheme: light !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84) !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .sat-flatpickr-year-select:hover,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .sat-flatpickr-year-select:focus,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-current-month .flatpickr-monthDropdown-months:hover,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-current-month .flatpickr-monthDropdown-months:focus,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-current-month input.cur-year:hover,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-current-month input.cur-year:focus {
    background: rgba(47, 111, 174, 0.10) !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .sat-flatpickr-year-select option {
    background: #ffffff !important;
    color: #274767 !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-months .flatpickr-prev-month,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-months .flatpickr-next-month,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-months .flatpickr-prev-month svg,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-months .flatpickr-next-month svg {
    color: #6e869b !important;
    fill: #6e869b !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-months .flatpickr-prev-month:hover,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-months .flatpickr-next-month:hover {
    color: #17324d !important;
    fill: #17324d !important;
    background: rgba(255, 255, 255, 0.62) !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap .flatpickr-weekdays {
    background: rgba(245, 249, 253, 0.94) !important;
    border-bottom: 1px solid rgba(47, 111, 174, 0.08) !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-date-wrap span.flatpickr-weekday {
    color: #70879d !important;
    fill: #70879d !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-cert-expiry-vigente {
    color: #4d8d6e;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-ws-progress {
    background: linear-gradient(135deg, rgba(235, 243, 251, 0.98), rgba(225, 236, 247, 0.96));
    border-color: rgba(47, 111, 174, 0.14);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-ws-progress-kicker {
    color: #597b9f;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) #sat-cfdi-ws-progress-title,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) #sat-cfdi-ws-progress-percent {
    color: #17324d;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-ws-progress-track {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(47, 111, 174, 0.12);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-ws-progress-meta {
    color: #5f7790;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-ws-block {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(47, 111, 174, 0.12);
    color: #58748e;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-modal-footer {
    background: linear-gradient(180deg, rgba(249, 252, 255, 0.98) 0%, rgba(240, 247, 252, 0.96) 100%);
    border-top-color: rgba(47, 111, 174, 0.10);
    box-shadow: 0 -10px 24px rgba(31, 72, 112, 0.08);
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-modal-footer .btn-admin-ghost {
    color: #6d859c !important;
}

:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-modal-footer .btn-admin-ghost:hover,
:root[data-theme="light"] :is(#modalSatCfdi, #modalSatDocumentos) .sat-cfdi-modal-footer .btn-admin-ghost:focus {
    color: #17324d !important;
    background: rgba(47, 111, 174, 0.08);
}

:root[data-theme="light"] .dashboard-topbar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 253, 0.96) 100%) !important;
    border-color: rgba(47, 111, 174, 0.12);
    box-shadow: 0 14px 30px rgba(31, 72, 112, 0.08);
}

:root[data-theme="light"] .dashboard-topbar .navbar-brand,
:root[data-theme="light"] .dashboard-topbar .nav-link,
:root[data-theme="light"] .dashboard-topbar .dropdown-item {
    color: #26425d !important;
}

:root[data-theme="light"] .dashboard-topbar .text-muted,
:root[data-theme="light"] .dashboard-topbar .nav-link.text-dark {
    color: #70879d !important;
}

:root[data-theme="light"] .dashboard-topbar .dropdown-menu {
    background: #ffffff;
    border-color: #d5e1ec;
    box-shadow: 0 18px 34px rgba(31, 72, 112, 0.12);
}

:root[data-theme="light"] .dashboard-topbar .dropdown-item:hover,
:root[data-theme="light"] .dashboard-topbar .dropdown-item:focus {
    background: rgba(47, 111, 174, 0.08);
    color: #17324d !important;
}

:root[data-theme="light"] .dashboard-client-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 249, 253, 0.96) 100%);
    border-color: rgba(47, 111, 174, 0.14);
    box-shadow: 0 16px 34px rgba(31, 72, 112, 0.10);
}

:root[data-theme="light"] .dashboard-client-card .text-muted {
    color: #7890a6 !important;
}

:root[data-theme="light"] .dashboard-client-name,
:root[data-theme="light"] .dashboard-client-card .text-primary {
    color: #1f5d95 !important;
}

:root[data-theme="light"] .btn-admin-secondary {
    background: rgba(47, 111, 174, 0.08);
    border-color: rgba(47, 111, 174, 0.34);
    color: #315e88;
}

:root[data-theme="light"] .btn-admin-secondary:hover,
:root[data-theme="light"] .btn-admin-secondary:focus {
    background: rgba(47, 111, 174, 0.14);
    border-color: rgba(47, 111, 174, 0.46);
    color: #17324d;
}

:root[data-theme="light"] .btn-admin-danger {
    background: rgba(193, 85, 85, 0.08);
    border-color: rgba(193, 85, 85, 0.34);
    color: #bf6b6b;
}

:root[data-theme="light"] .btn-admin-danger:hover,
:root[data-theme="light"] .btn-admin-danger:focus {
    background: rgba(193, 85, 85, 0.14);
    border-color: rgba(193, 85, 85, 0.44);
    color: #9d4949;
}

:root[data-theme="light"] .dashboard-status-card {
    border-color: rgba(47, 111, 174, 0.16);
    background: linear-gradient(180deg, rgba(247, 251, 255, 0.98) 0%, rgba(240, 247, 253, 0.98) 100%);
    color: #31506d;
    box-shadow: 0 14px 30px rgba(31, 72, 112, 0.08);
}

:root[data-theme="light"] .dashboard-status-card.is-warning {
    border-color: rgba(184, 132, 19, 0.26);
    background: linear-gradient(180deg, rgba(255, 252, 244, 0.98) 0%, rgba(255, 247, 227, 0.96) 100%);
    color: #8a6515;
}

:root[data-theme="light"] .dashboard-status-card.is-success {
    border-color: rgba(38, 128, 78, 0.24);
    background: linear-gradient(180deg, rgba(244, 252, 247, 0.98) 0%, rgba(230, 246, 236, 0.96) 100%);
    color: #1f6b43;
}

:root[data-theme="light"] .dashboard-status-card.is-info {
    border-color: rgba(47, 111, 174, 0.20);
    background: linear-gradient(180deg, rgba(245, 250, 255, 0.98) 0%, rgba(235, 244, 252, 0.96) 100%);
    color: #2f5a86;
}

:root[data-theme="light"] .dashboard-running-spinner {
    border-color: rgba(214, 177, 56, 0.18);
    border-top-color: #d4a11d;
    box-shadow: 0 0 0 1px rgba(212, 161, 29, 0.08);
}

:root[data-theme="light"] .dashboard-running-title {
    color: #c79213;
}

:root[data-theme="light"] .dashboard-running-subtitle {
    color: #90a4b6;
}

:root[data-theme="light"] .dashboard-running-copy > div:not(.dashboard-running-title):not(.dashboard-running-subtitle) {
    color: #7b5e19;
}

:root[data-theme="light"] .dashboard-running-copy strong {
    color: #6d5316;
}

:root[data-theme="light"] .dashboard-status-card.is-error {
    border-color: rgba(183, 92, 92, 0.22);
    background: linear-gradient(180deg, rgba(255, 250, 250, 0.98) 0%, rgba(252, 243, 243, 0.97) 100%);
    color: #9a4a4a;
}

:root[data-theme="light"] .sat-process-summary-card.is-error .sat-process-summary-headline {
    color: #7b4a4a;
}

:root[data-theme="light"] .sat-process-summary-card.is-error .sat-process-summary-note {
    color: #6d5960;
}

:root[data-theme="light"] .admin-inline-info {
    border-color: rgba(47, 111, 174, 0.16);
    background: linear-gradient(180deg, rgba(243, 248, 253, 0.98) 0%, rgba(236, 244, 251, 0.96) 100%);
    color: #26425d;
    box-shadow: 0 16px 32px rgba(31, 72, 112, 0.09);
}

:root[data-theme="light"] .cfdi-integrity-alert {
    color: #26425d;
}

:root[data-theme="light"] .cfdi-integrity-alert-metrics > div,
:root[data-theme="light"] .cfdi-integrity-alert-scope-card {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(47, 111, 174, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

:root[data-theme="light"] .cfdi-integrity-alert-metrics span,
:root[data-theme="light"] .cfdi-integrity-alert-scope-title,
:root[data-theme="light"] .cfdi-integrity-alert-months-title {
    color: #6f879c;
    opacity: 1;
}

:root[data-theme="light"] .cfdi-integrity-alert-metrics strong,
:root[data-theme="light"] .cfdi-integrity-alert .fw-bold {
    color: #17324d;
}

:root[data-theme="light"] .cfdi-integrity-warning {
    border-color: rgba(184, 132, 19, 0.24);
    background: linear-gradient(180deg, rgba(255, 248, 231, 0.98) 0%, rgba(252, 241, 210, 0.96) 100%);
    color: #8a6515;
}

:root[data-theme="light"] .cfdi-integrity-critical {
    border-color: rgba(193, 85, 85, 0.24);
    background: linear-gradient(180deg, rgba(254, 241, 241, 0.98) 0%, rgba(250, 230, 230, 0.96) 100%);
    color: #9d4949;
}

:root[data-theme="light"] .dashboard-ws-table-title,
:root[data-theme="light"] .dashboard-ws-table-note,
:root[data-theme="light"] .dashboard-ws-subtle {
    color: #4f6a84;
}

:root[data-theme="light"] .dashboard-ws-table-wrap,
:root[data-theme="light"] .dashboard-ws-recent-scroll {
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(47, 111, 174, 0.08);
    border-radius: 12px;
}

:root[data-theme="light"] #contenedorVisor {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(244, 249, 253, 0.98) 100%);
    border: 1px solid rgba(47, 111, 174, 0.12);
    box-shadow: 0 20px 40px rgba(31, 72, 112, 0.11);
}

:root[data-theme="light"] #contenedorVisor .card-header {
    background: rgba(248, 251, 254, 0.96);
    border-bottom-color: rgba(47, 111, 174, 0.10) !important;
}

:root[data-theme="light"] #contenedorVisor .card-body {
    background: transparent;
}

:root[data-theme="light"] #tituloTablaActiva,
:root[data-theme="light"] .dashboard-section-title,
:root[data-theme="light"] .dashboard-ws-table-title {
    color: #2d5d88 !important;
}

:root[data-theme="light"] .dashboard-search-wrap .input-group-text {
    background: #ffffff;
    border-color: #d4dfeb;
    color: #70879d;
}

:root[data-theme="light"] body.admin-dark .input-group .form-control,
:root[data-theme="light"] body.admin-dark .input-group .admin-input,
:root[data-theme="light"] #inputBusquedaGlobal {
    background: #ffffff !important;
    border-color: #d4dfeb !important;
    color: #17324d !important;
}

:root[data-theme="light"] body.admin-dark .input-group .form-control::placeholder,
:root[data-theme="light"] body.admin-dark .input-group .admin-input::placeholder,
:root[data-theme="light"] #inputBusquedaGlobal::placeholder {
    color: #7b93a8 !important;
}

:root[data-theme="light"] body.admin-dark .form-select,
:root[data-theme="light"] body.admin-dark .admin-select,
:root[data-theme="light"] .dashboard-per-page {
    background: #ffffff !important;
    border-color: #d4dfeb !important;
    color: #17324d !important;
}

:root[data-theme="light"] body.admin-dark .admin-select option,
:root[data-theme="light"] body.admin-dark .form-select option,
:root[data-theme="light"] .dashboard-per-page option {
    background: #ffffff;
    color: #17324d;
}

:root[data-theme="light"] body.admin-dark .form-select:focus,
:root[data-theme="light"] body.admin-dark .admin-select:focus,
:root[data-theme="light"] .dashboard-per-page:focus {
    background: #ffffff !important;
    border-color: rgba(47, 111, 174, 0.34) !important;
    box-shadow: 0 0 0 0.18rem rgba(47, 111, 174, 0.12) !important;
    color: #17324d !important;
}

/* ----------------------------------------------------------------------------
   Superficies admin premium en MODO CLARO (paridad dual-theme, DIR-020/031/032).
   Las .admin-card y bloques asociados usan fondo oscuro fijo pensado para modo
   oscuro; aqui se les da el tratamiento claro premium (mismo lenguaje visual que
   el modal CFDI SAT de referencia). Solo afecta a [data-theme="light"]; el modo
   oscuro queda intacto.
---------------------------------------------------------------------------- */
:root[data-theme="light"] body.admin-dark .admin-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(244, 249, 253, 0.97) 100%);
    border: 1px solid rgba(47, 111, 174, 0.12);
    box-shadow: 0 16px 32px rgba(31, 72, 112, 0.08);
}

/* Banda de resumen como hero claro, ligeramente diferenciada de las tarjetas */
:root[data-theme="light"] body.admin-dark .admin-card .admin-summary-grid {
    background: linear-gradient(180deg, rgba(238, 245, 252, 0.96) 0%, rgba(229, 238, 247, 0.92) 100%);
    border-radius: var(--sayc-radius-lg);
}

:root[data-theme="light"] body.admin-dark .admin-summary-value {
    color: #17324d;
}

:root[data-theme="light"] body.admin-dark .admin-summary-grid .small,
:root[data-theme="light"] body.admin-dark .admin-card .text-muted,
:root[data-theme="light"] body.admin-dark .admin-card .form-text {
    color: #627d96 !important;
}

:root[data-theme="light"] body.admin-dark .admin-panel-title {
    color: #17324d;
}

:root[data-theme="light"] body.admin-dark .admin-card .form-label {
    color: #2c4866;
}

:root[data-theme="light"] body.admin-dark .admin-card hr {
    border-color: rgba(47, 111, 174, 0.14);
    opacity: 1;
}

/* Pestañas premium en claro */
:root[data-theme="light"] body.admin-dark .admin-tabs {
    border-bottom-color: rgba(47, 111, 174, 0.16);
}

:root[data-theme="light"] body.admin-dark .admin-tabs .nav-link {
    color: #6c859c;
}

:root[data-theme="light"] body.admin-dark .admin-tabs .nav-link:hover {
    color: #264764;
    background: rgba(47, 111, 174, 0.06);
}

:root[data-theme="light"] body.admin-dark .admin-tabs .nav-link.active {
    color: #1f4878;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(238, 245, 252, 0.97) 100%);
    border-color: rgba(47, 111, 174, 0.18);
    border-bottom-color: transparent;
}

/* Paneles editor, labels y textareas compartidos en MODO CLARO (para que toda
   plantilla/modal/tabla nueva que use estas clases herede premium sin retrabajo) */
:root[data-theme="light"] body.admin-dark .admin-editor-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(244, 249, 253, 0.97) 100%);
    border: 1px solid rgba(47, 111, 174, 0.12);
}

:root[data-theme="light"] body.admin-dark .admin-label {
    color: #2c4866;
}

:root[data-theme="light"] body.admin-dark .admin-textarea {
    background: #ffffff;
    border-color: #d4dfeb;
    color: #17324d;
}

:root[data-theme="light"] body.admin-dark .admin-textarea:focus {
    background: #ffffff;
    border-color: rgba(47, 111, 174, 0.34);
    box-shadow: 0 0 0 0.18rem rgba(47, 111, 174, 0.12);
    color: #17324d;
}

:root[data-theme="light"] .dashboard-clear-btn {
    color: #6d859c;
}

:root[data-theme="light"] .dashboard-filter-summary {
    background: rgba(242, 247, 252, 0.96);
    border-top-color: rgba(47, 111, 174, 0.08);
    border-bottom-color: rgba(47, 111, 174, 0.08);
}

:root[data-theme="light"] .dashboard-view-summary {
    background: rgba(236, 244, 250, 0.98);
    border-bottom-color: rgba(47, 111, 174, 0.08);
    color: #58728b;
}

:root[data-theme="light"] .dashboard-filter-chip {
    background: rgba(47, 111, 174, 0.10);
    border-color: rgba(47, 111, 174, 0.16);
    color: #36536d;
}

:root[data-theme="light"] .dashboard-filter-chip strong {
    color: #17324d;
}

:root[data-theme="light"] #tablaDinamica thead th {
    background: linear-gradient(180deg, #dde8f2 0%, #d0deeb 100%) !important;
    color: #24405a !important;
    border-bottom-color: rgba(47, 111, 174, 0.12);
    box-shadow: 0 2px 2px -1px rgba(58, 90, 120, 0.12);
}

:root[data-theme="light"] .admin-simple-table thead th,
:root[data-theme="light"] .dashboard-ws-summary-table thead th {
    background: linear-gradient(180deg, #dde8f2 0%, #d0deeb 100%) !important;
    color: #24405a !important;
    border-bottom-color: rgba(47, 111, 174, 0.12);
}

:root[data-theme="light"] .dashboard-sort-priority {
    background: rgba(47, 111, 174, 0.12);
    border-color: rgba(47, 111, 174, 0.22);
    color: #295286;
}

:root[data-theme="light"] #tablaDinamica tbody td {
    background: #ffffff;
    color: #5f7790;
    border-bottom-color: rgba(47, 111, 174, 0.08);
}

:root[data-theme="light"] .admin-simple-table td,
:root[data-theme="light"] .dashboard-ws-summary-table tbody td {
    background: #ffffff;
    color: #5f7790;
    border-bottom-color: rgba(47, 111, 174, 0.08);
}

:root[data-theme="light"] #tablaDinamica tbody tr:nth-child(even) td {
    background: #f5f9fd;
}

:root[data-theme="light"] .admin-simple-table tbody tr:nth-child(even) td,
:root[data-theme="light"] .dashboard-ws-summary-table tbody tr:nth-child(even) td {
    background: #f5f9fd;
}

:root[data-theme="light"] .admin-simple-table tbody tr:nth-child(odd) td,
:root[data-theme="light"] .dashboard-ws-summary-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

:root[data-theme="light"] #tablaDinamica tbody tr:hover td {
    background: #eaf2f9;
    color: #17324d;
}

:root[data-theme="light"] .admin-simple-table tbody tr:hover td,
:root[data-theme="light"] .dashboard-ws-summary-table tbody tr:hover td {
    background: #eaf2f9;
    color: #17324d;
}

:root[data-theme="light"] #tablaDinamica tbody tr.dashboard-row-reconciliation-alert td {
    background: #fbe8e8 !important;
    color: #8c4b4b;
    border-bottom-color: rgba(193, 85, 85, 0.24);
}

:root[data-theme="light"] #tablaDinamica tbody tr.dashboard-row-reconciliation-alert:hover td {
    background: #f8dddd !important;
    color: #7f3f3f;
}

:root[data-theme="light"] #tablaDinamica tbody tr.dashboard-row-reconciliation-alert td:first-child {
    box-shadow: inset 4px 0 0 rgba(193, 85, 85, 0.76);
}

:root[data-theme="light"] #tablaDinamica tbody td.dashboard-cell-selected {
    background: rgba(47, 111, 174, 0.12) !important;
    color: #17324d;
}

:root[data-theme="light"] #tablaDinamica tbody td.dashboard-cell-active {
    background: rgba(47, 111, 174, 0.18) !important;
    box-shadow: inset 0 0 0 1px rgba(47, 111, 174, 0.34);
    color: #17324d;
}

:root[data-theme="light"] .table-responsive {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(47, 111, 174, 0.10);
}

:root[data-theme="light"] .dashboard-table-scroll {
    background: rgba(255, 255, 255, 0.94);
}

:root[data-theme="light"] #contenedorVisor .card-footer {
    background: rgba(248, 251, 254, 0.98);
    border-top: 1px solid rgba(47, 111, 174, 0.10) !important;
}

:root[data-theme="light"] body.admin-dark .page-link {
    border-color: rgba(47, 111, 174, 0.18);
    background: #ffffff;
    color: #36536d;
}

:root[data-theme="light"] body.admin-dark .page-link:hover,
:root[data-theme="light"] body.admin-dark .page-link:focus {
    border-color: rgba(47, 111, 174, 0.30);
    background: #edf4fa;
    color: #17324d;
}

:root[data-theme="light"] body.admin-dark .page-item.disabled .page-link {
    border-color: rgba(47, 111, 174, 0.10);
    background: #f2f7fb;
    color: #8aa0b4;
}

:root[data-theme="light"] body.admin-dark * {
    scrollbar-width: thin;
    scrollbar-color: #95a8bb #edf3f8;
}

:root[data-theme="light"] body.admin-dark *::-webkit-scrollbar-track {
    background: #edf3f8;
}

:root[data-theme="light"] body.admin-dark *::-webkit-scrollbar-thumb {
    background: #95a8bb;
    border: 3px solid #edf3f8;
    border-radius: 999px;
}

:root[data-theme="light"] body.admin-dark *::-webkit-scrollbar-thumb:hover {
    background: #8197ab;
}

:root[data-theme="light"] .dashboard-ws-summary-table .dashboard-ws-subtle,
:root[data-theme="light"] .admin-simple-table .dashboard-ws-subtle,
:root[data-theme="light"] .sat-cancelled-preview-muted,
:root[data-theme="light"] .sat-cancelled-preview-meta {
    color: #70879d;
}

:root[data-theme="light"] .dashboard-ws-age {
    color: #8ba0b4;
}

:root[data-theme="light"] .dashboard-ws-badge {
    border-color: rgba(47, 111, 174, 0.28);
    background: rgba(224, 237, 249, 0.96);
    color: #2b5f95;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

:root[data-theme="light"] .dashboard-ws-badge.is-atencion {
    border-color: rgba(190, 154, 52, 0.32);
    background: rgba(255, 244, 206, 0.96);
    color: #8c6a12;
}

:root[data-theme="light"] .dashboard-ws-badge.is-alta_atencion,
:root[data-theme="light"] .dashboard-ws-badge.is-requiere_revision {
    border-color: rgba(181, 78, 78, 0.30);
    background: rgba(252, 230, 230, 0.96);
    color: #9a3f3f;
}

:root[data-theme="light"] .sat-cancelled-preview-document,
:root[data-theme="light"] .sat-cancelled-preview-title,
:root[data-theme="light"] .sat-cancelled-preview-section-title {
    color: #17324d;
}

:root[data-theme="light"] .sat-cancelled-preview-sheet {
    background: transparent;
}

:root[data-theme="light"] .sat-cancelled-preview-kicker,
:root[data-theme="light"] .sat-cancelled-preview-meta,
:root[data-theme="light"] .sat-cancelled-preview-muted {
    color: #70879d;
}

:root[data-theme="light"] .sat-cancelled-preview-docrow,
:root[data-theme="light"] .sat-cancelled-preview-totalrow,
:root[data-theme="light"] .sat-cancelled-preview-seal-text {
    color: #2f4b66;
}

:root[data-theme="light"] .sat-cancelled-preview-docrow span {
    color: #5b7590;
}

:root[data-theme="light"] .sat-cancelled-preview-pill {
    border-color: rgba(193, 85, 85, 0.30);
    background: rgba(193, 85, 85, 0.08);
    color: #9d4949;
}

:root[data-theme="light"] .sat-process-summary-kicker {
    color: #70879d;
}

:root[data-theme="light"] .sat-process-summary-title {
    color: #17324d;
}

:root[data-theme="light"] .sat-process-summary-pill {
    border-color: rgba(47, 111, 174, 0.24);
    background: rgba(226, 238, 250, 0.96);
    color: #2c5f93;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

:root[data-theme="light"] .sat-process-summary-pill.is-warning {
    border-color: rgba(190, 154, 52, 0.30);
    background: rgba(255, 244, 206, 0.96);
    color: #8c6a12;
}

:root[data-theme="light"] .sat-process-summary-pill.is-error {
    border-color: rgba(181, 78, 78, 0.30);
    background: rgba(252, 230, 230, 0.96);
    color: #9a3f3f;
}

:root[data-theme="light"] .sat-process-summary-headline {
    color: #2f4b66;
}

:root[data-theme="light"] .sat-process-summary-metric {
    border-color: rgba(47, 111, 174, 0.12);
    background: rgba(255, 255, 255, 0.76);
}

:root[data-theme="light"] .sat-process-summary-metric.is-success {
    border-color: rgba(72, 187, 120, 0.22);
    background: rgba(238, 250, 242, 0.96);
}

:root[data-theme="light"] .sat-process-summary-metric.is-warning {
    border-color: rgba(190, 154, 52, 0.22);
    background: rgba(255, 248, 227, 0.96);
}

:root[data-theme="light"] .sat-process-summary-metric.is-error {
    border-color: rgba(181, 78, 78, 0.22);
    background: rgba(253, 240, 240, 0.96);
}

:root[data-theme="light"] .sat-process-summary-metric-label {
    color: #70879d;
}

:root[data-theme="light"] .sat-process-summary-metric-value {
    color: #17324d;
}

:root[data-theme="light"] .sat-process-summary-note {
    color: #4b6783;
}

:root[data-theme="light"] .sat-process-summary-note strong,
:root[data-theme="light"] .sat-process-summary-note code {
    color: #17324d;
}

:root[data-theme="light"] .sat-cancelled-preview-notice {
    border-color: rgba(184, 132, 19, 0.22);
    background: rgba(255, 247, 225, 0.92);
    color: #8a6515;
}

:root[data-theme="light"] .sat-cancelled-preview-note-block {
    border-color: rgba(47, 111, 174, 0.18);
    background: rgba(244, 249, 253, 0.96);
    color: #5f7790;
}

:root[data-theme="light"] .sat-cancelled-preview-table-wrap {
    border-color: rgba(47, 111, 174, 0.10);
    background: rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] .sat-cancelled-preview-table th {
    background: linear-gradient(180deg, #dde8f2 0%, #d0deeb 100%) !important;
    color: #24405a !important;
    border-color: rgba(47, 111, 174, 0.10);
}

:root[data-theme="light"] .sat-cancelled-preview-table td,
:root[data-theme="light"] .sat-cancelled-preview-concept-detail td {
    background: #ffffff;
    color: #5f7790;
    border-color: rgba(47, 111, 174, 0.08);
}

:root[data-theme="light"] .sat-cancelled-preview-concept-detail strong,
:root[data-theme="light"] .sat-cancelled-preview-tax-row strong {
    color: #264764;
}

:root[data-theme="light"] .sat-cancelled-preview-concept-description {
    color: #5f7790;
}

:root[data-theme="light"] .sat-cancelled-preview-tax-row {
    color: #65819c;
}

:root[data-theme="light"] .sat-cancelled-preview-tax-code {
    color: #3d6486;
}

:root[data-theme="light"] .sat-cancelled-preview-tax-label {
    color: #7a96af;
}

:root[data-theme="light"] .sat-cancelled-preview-totals {
    background: rgba(250, 252, 255, 0.88);
    border: 1px solid rgba(47, 111, 174, 0.10);
    border-radius: 14px;
    padding: 14px 16px;
}

:root[data-theme="light"] .sat-cancelled-preview-totalrow strong {
    color: #1f3e5b;
}

:root[data-theme="light"] .sat-cancelled-preview-totalrow.is-grand strong {
    color: #18324a;
}

:root[data-theme="light"] .dashboard-filter-modal-intro {
    background: rgba(243, 248, 252, 0.98);
    border-color: rgba(47, 111, 174, 0.10);
    color: #5f7790;
}

:root[data-theme="light"] .dashboard-filter-row {
    border-color: rgba(47, 111, 174, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(245, 249, 253, 0.97) 100%);
    box-shadow: 0 12px 24px rgba(31, 72, 112, 0.07);
}

:root[data-theme="light"] .dashboard-filter-title {
    color: #1f3e5b;
}

:root[data-theme="light"] .dashboard-filter-subtitle,
:root[data-theme="light"] .dashboard-filter-help {
    color: #70879d;
}

:root[data-theme="light"] .dashboard-filter-row .form-check-input {
    border-color: rgba(47, 111, 174, 0.24);
    box-shadow: none;
}

:root[data-theme="light"] .dashboard-filter-row .form-check-input:checked {
    background-color: #2f6fae;
    border-color: #2f6fae;
}

:root[data-theme="light"] .dashboard-filter-toggle {
    background: linear-gradient(180deg, #f8fbfe 0%, #edf4fa 100%);
    border-color: rgba(47, 111, 174, 0.14);
    color: #6d859c;
}

:root[data-theme="light"] .dashboard-filter-toggle:hover,
:root[data-theme="light"] .dashboard-filter-toggle:focus {
    box-shadow: 0 8px 18px rgba(31, 72, 112, 0.10);
    border-color: rgba(47, 111, 174, 0.24);
    color: #2d587f;
}

:root[data-theme="light"] .dashboard-filter-toggle.is-open {
    background: linear-gradient(180deg, #eaf2f9 0%, #dfeaf5 100%);
    border-color: rgba(47, 111, 174, 0.24);
}

:root[data-theme="light"] .dashboard-filter-toggle.is-open i,
:root[data-theme="light"] .dashboard-filter-toggle.is-open .dashboard-filter-icon {
    color: #2d587f;
    fill: #2d587f;
}

:root[data-theme="light"] .dashboard-filter-advanced {
    border-top: 1px solid rgba(47, 111, 174, 0.08);
    background: rgba(248, 251, 254, 0.88);
}

:root[data-theme="light"] .dashboard-filter-advanced .admin-select,
:root[data-theme="light"] .dashboard-filter-advanced .admin-input,
:root[data-theme="light"] .dashboard-filter-advanced .form-select,
:root[data-theme="light"] .dashboard-filter-advanced .form-control,
:root[data-theme="light"] .dashboard-filter-simple,
:root[data-theme="light"] .dashboard-filter-date {
    background: #ffffff !important;
    border-color: #d4dfeb !important;
    color: #17324d !important;
}

:root[data-theme="light"] .dashboard-filter-advanced .admin-select option,
:root[data-theme="light"] .dashboard-filter-advanced .form-select option {
    background: #ffffff;
    color: #17324d;
}

:root[data-theme="light"] #modalVistasTabla .admin-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(245, 249, 253, 0.97) 100%);
    border-color: rgba(47, 111, 174, 0.12);
    box-shadow: 0 12px 24px rgba(31, 72, 112, 0.07);
}

:root[data-theme="light"] #modalVistasTabla .form-label,
:root[data-theme="light"] #modalVistasTabla .small.text-muted,
:root[data-theme="light"] #modalVistasTabla #estadoVistaTabla {
    color: #70879d !important;
}

:root[data-theme="light"] #modalVistasTabla #inputNombreVistaTabla,
:root[data-theme="light"] #modalVistasTabla #selectVistaTablaGuardada {
    background: #ffffff !important;
    border-color: #d4dfeb !important;
    color: #17324d !important;
}

:root[data-theme="light"] #modalVistasTabla #selectVistaTablaGuardada option {
    background: #ffffff;
    color: #17324d;
}

:root[data-theme="light"] .dashboard-table-view-item {
    border-color: rgba(47, 111, 174, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(245, 249, 253, 0.97) 100%);
    box-shadow: 0 12px 24px rgba(31, 72, 112, 0.07);
}

:root[data-theme="light"] .dashboard-table-view-title {
    color: #1f3e5b;
}

:root[data-theme="light"] .dashboard-table-view-meta {
    color: #70879d;
}

:root[data-theme="light"] .sat-cfdi-integrity-card,
:root[data-theme="light"] .sat-cfdi-integrity-actions {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(244, 249, 253, 0.98) 100%);
    border-color: rgba(47, 111, 174, 0.12);
    box-shadow: 0 16px 32px rgba(31, 72, 112, 0.09);
}

:root[data-theme="light"] .sat-cfdi-progress-badge {
    color: #43607d;
    background: rgba(47, 111, 174, 0.10);
    border-color: rgba(47, 111, 174, 0.14);
}

:root[data-theme="light"] .sat-cfdi-integrity-metric {
    background: rgba(242, 247, 252, 0.96);
    border-color: rgba(47, 111, 174, 0.10);
}

:root[data-theme="light"] .sat-cfdi-status-value,
:root[data-theme="light"] .sat-cfdi-value,
:root[data-theme="light"] .sat-cfdi-integrity-scope-label {
    color: #17324d;
}

:root[data-theme="light"] .sat-cfdi-status-copy,
:root[data-theme="light"] .sat-cfdi-integrity-card .text-muted,
:root[data-theme="light"] .sat-cfdi-integrity-metric span {
    color: #68839b !important;
}
