:root { color-scheme:light; --theme-bg:#f7f8fa; --theme-panel:#fff; --theme-field:#fff; --theme-ink:#202a35; --theme-muted:#687482; --theme-line:#e4e8ed; --theme-link:#315d7d; }
.theme-toggle-form { display:flex; align-items:center; margin:0; flex-shrink:0; }
.theme-toggle-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:6px 10px; min-height:36px; border:1px solid var(--theme-line); border-radius:6px; background:var(--theme-panel); color:var(--theme-ink); font:12px/1.5 system-ui,sans-serif; cursor:pointer; }
.theme-toggle-button [data-theme-icon] { font-size:19px; line-height:1; }
.theme-toggle-button:disabled { opacity:.6; cursor:wait; }
.theme-toggle-button:focus-visible { outline:2px solid #d76a13; outline-offset:3px; }
.theme-save-status { position:fixed; top:76px; right:20px; max-width:min(360px,calc(100vw - 40px)); z-index:1100; padding:12px 16px; background:var(--theme-panel); color:var(--theme-ink); border:1px solid var(--theme-line); border-radius:6px; font:13px/1.5 system-ui,sans-serif; }
.access-header:has(.theme-toggle-form) .access-context { margin-left:auto; }
@media(max-width:575.98px) { .theme-toggle-label { display:none; } .theme-toggle-button { min-width:36px; padding:6px; } .app-shell .main-header { gap:10px; } }
html[data-theme="dark"] { color-scheme:dark; --theme-bg:#141a22; --theme-panel:#1d2631; --theme-field:#17202b; --theme-ink:#e5eaf0; --theme-muted:#a5b2c2; --theme-line:#364253; --theme-link:#9bc7eb; --shell-bg:var(--theme-bg); --shell-ink:var(--theme-ink); --shell-muted:var(--theme-muted); --shell-line:var(--theme-line); }
html[data-theme="dark"] body { background:var(--theme-bg); color:var(--theme-ink); }
html[data-theme="dark"] :is(.app-shell,.access-page) a { color:var(--theme-link); }
html[data-theme="dark"] .app-shell :is(.main-header,.main-sidebar,.card,.card-header,.card-body,.info-box,.callout,.toast,.toast-header) { background:var(--theme-panel); color:var(--theme-ink); border-color:var(--theme-line); }
html[data-theme="dark"] .app-shell .small-box { background:var(--theme-panel)!important; color:var(--theme-ink)!important; }
html[data-theme="dark"] .app-shell .card-footer { background:#19222c; border-color:var(--theme-line); }
html[data-theme="dark"] .app-shell .card-outline { border-top-color:var(--card-accent); }
html[data-theme="dark"] :is(.app-brand,.app-company,.access-brand) { color:var(--theme-ink)!important; }
html[data-theme="dark"] #company-header-logo { background:#fff; border-radius:4px; padding:2px; }
html[data-theme="dark"] .app-menu-toggle { background:var(--theme-panel); color:var(--theme-ink); border-color:var(--theme-line); }
html[data-theme="dark"] .app-shell .nav-sidebar .nav-link { color:#c2cddd; }
html[data-theme="dark"] .app-shell .nav-sidebar .nav-link:hover { background:#283443; color:#fff; }
html[data-theme="dark"] .app-shell .nav-sidebar .nav-link.active { background:#3a2b20; color:#ffc18e; }
html[data-theme="dark"] :is(.btn-tool,.close) { color:#bfccdb; }
html[data-theme="dark"] .app-shell :is(.btn-default,.btn-secondary) { background:#263342; border-color:#46566b; color:#e5eaf0; }
html[data-theme="dark"] .app-shell .btn-info { background:#233b4c; border-color:#41647d; color:#b9dcf6; }
html[data-theme="dark"] :is(.app-shell .btn-primary,.access-primary) { background:#315d7d; border-color:#6086a5; color:#fff!important; }
html[data-theme="dark"] .app-shell :is(.form-control,.custom-select,.input-group-text,.dataTables_wrapper input,.dataTables_wrapper select) { background:var(--theme-field); color:var(--theme-ink); border-color:var(--theme-line)!important; }
html[data-theme="dark"] :is(input,textarea)::placeholder { color:#a5b2c2; opacity:1; }
html[data-theme="dark"] :is(input,select,textarea):disabled { background:#26303c!important; color:#a5b2c2!important; }
html[data-theme="dark"] .app-shell :is(.table,table.dataTable,.dataTables_wrapper,.dataTables_wrapper label) { color:var(--theme-ink); }
html[data-theme="dark"] .app-shell .table :is(th,td) { border-color:var(--theme-line); }
html[data-theme="dark"] .app-shell .table thead th { color:#b7c5d6; }
html[data-theme="dark"] .app-shell .table .thead-light th { background:#273444; color:#e5eaf0; }
html[data-theme="dark"] .app-shell :is(table.dataTable tbody tr,table.dataTable tbody td.sorting_1,.last-error-row > td) { background:var(--theme-panel)!important; }
html[data-theme="dark"] .app-shell :is(.table-hover tbody tr:hover,.report-detail-link:hover) { background:#2a394a; color:#fff; }
html[data-theme="dark"] .app-shell .dataTables_wrapper .dataTables_paginate .paginate_button { color:#c2cddd!important; }
html[data-theme="dark"] .app-shell .dataTables_wrapper .dataTables_paginate .paginate_button.current { background:#33465b; border-color:#6886a5; color:#fff!important; }
html[data-theme="dark"] :is(.text-muted,.app-shell small,.dashboard-period-note,.dashboard-empty,.dataTables_info) { color:var(--theme-muted)!important; }
html[data-theme="dark"] .app-shell .label-success { background:#1e4435; color:#a9e7c7; }
html[data-theme="dark"] .app-shell .label-warning { background:#49391e; color:#f3d399; }
html[data-theme="dark"] .app-shell .label-danger { background:#4c292f; color:#ffb6b6; }
html[data-theme="dark"] .app-shell :is(.label-info,.label-primary) { background:#233f55; color:#b8daf5; }
html[data-theme="dark"] .app-shell .label-default { background:#33404e; color:#d9e2ed; }
html[data-theme="dark"] .alert-info { background:#203d4a; border-color:#386474; color:#c1e5f0; }
html[data-theme="dark"] .alert-warning { background:#493c24; border-color:#77623d; color:#f7dda6; }
html[data-theme="dark"] .alert-danger { background:#4c2d33; border-color:#7a4852; color:#ffd3d7; }
html[data-theme="dark"] .alert-success { background:#244438; border-color:#436d59; color:#c6ecd9; }
html[data-theme="dark"] :is(.alert-light,.bg-light,.bg-white) { background:var(--theme-panel)!important; color:var(--theme-ink)!important; }
html[data-theme="dark"] .border { border-color:var(--theme-line)!important; }
html[data-theme="dark"] .text-dark { color:var(--theme-ink)!important; }
html[data-theme="dark"] .text-warning { color:#f3d399!important; }
html[data-theme="dark"] .text-danger { color:#ffb6b6!important; }
html[data-theme="dark"] :is(.modal-content,.dropdown-menu,.bootstrap-datetimepicker-widget,.swal2-popup,.swal-modal) { background:var(--theme-panel); color:var(--theme-ink); border-color:var(--theme-line); }
html[data-theme="dark"] :is(.modal-header,.modal-footer) { border-color:var(--theme-line); }
html[data-theme="dark"] :is(.dropdown-item,.swal-title,.swal-text,.swal2-title,.swal2-content,.swal2-html-container) { color:var(--theme-ink); }
html[data-theme="dark"] .swal-button--cancel { background:#33465b; color:var(--theme-ink); }
html[data-theme="dark"] :is(.dropdown-item:hover,.bootstrap-datetimepicker-widget table td:hover) { background:#33465b; color:#fff; }
html[data-theme="dark"] :is(.select2-container--default .select2-selection--single,.select2-dropdown,.select2-search__field) { background:var(--theme-field); color:var(--theme-ink); border-color:var(--theme-line); }
html[data-theme="dark"] :is(.select2-container--default .select2-selection--single .select2-selection__rendered,.select2-results__option) { color:var(--theme-ink); }
html[data-theme="dark"] .select2-container--default .select2-results__option--selected { background:#33465b; }
html[data-theme="dark"] :is(.access-form,.access-choice) { background:var(--theme-panel); border-color:var(--theme-line); }
html[data-theme="dark"] .access-choice:has(input:checked) { background:#253748; border-color:#8bb9dd; }
html[data-theme="dark"] .access-initial { background:#303d4c; color:var(--theme-muted); }
html[data-theme="dark"] .access-input { background:var(--theme-field); color:var(--theme-ink); border-color:var(--theme-line); }
html[data-theme="dark"] :is(.access-eyebrow,.access-description,.access-context,.access-company-description > span,.access-message,.access-back,.access-footer) { color:var(--theme-muted)!important; border-color:var(--theme-line); }
/* Ingreso rapido (registro 00072): barra visible mientras un administrador esta dentro de otra cuenta. */
.impersonation-banner { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; padding:8px 24px; background:#7a3b00; color:#fff; font:13px/1.5 system-ui,sans-serif; }
.impersonation-banner strong { color:#fff; }
.impersonation-banner__form { margin:0; }
html[data-theme="dark"] .impersonation-banner { background:#b25a0c; color:#fff; }
