/* Apariencia del panel. Las herramientas pueden usar estas variables. */
:root[data-bs-theme="light"]{color-scheme:light;--mc-surface:#fff;--mc-soft:#eef0f3;--mc-text:#131f30}
:root[data-bs-theme="dark"]{color-scheme:dark;--green:#628ed0;--ink:#e0e5ed;--muted:#a3abb6;--line:#323a45;--paper:#10151c;--mc-surface:#1a212b;--mc-soft:#242c39;--mc-text:#e0e5ed;--bs-body-bg:#10151c;--bs-body-color:#e0e5ed;--bs-border-color:#323a45;--bs-secondary-color:#a3abb6;--bs-tertiary-bg:#242c39}
.theme-picker{display:inline-flex;align-items:center;gap:3px;border:1px solid var(--line);background:var(--mc-surface);padding:3px;border-radius:10px;flex-shrink:0}
.theme-picker button{border:0;background:transparent;color:var(--muted);padding:6px 8px;font-size:12px;border-radius:7px;white-space:nowrap;cursor:pointer}
.theme-picker button:hover{background:var(--mc-soft);color:var(--ink)}
.theme-picker button.active{background:#0b3f8d;color:white}
.theme-picker button:focus-visible{outline:2px solid var(--green);outline-offset:2px}
/* Navegación más oscura incluso con el modo día. */
:root[data-bs-theme="light"] .sidebar{background:#222d3d;border-color:#323e50}
:root[data-bs-theme="light"] .sidebar .brand{color:#f2f4f7}
:root[data-bs-theme="light"] .sidebar .nav-item{color:#d3d9e2}
:root[data-bs-theme="light"] .sidebar .nav-item:hover{background:#2f3d51;color:#fff}
:root[data-bs-theme="light"] .sidebar .nav-item.active{background:#0b3f8d;color:#fff}
:root[data-bs-theme="light"] .sidebar :is(.nav-label,.brand-sub,.sidebar-note,.sidebar-note small,.nav-item small){color:#a9b4c4}
:root[data-bs-theme="light"] .topbar{background:#e0e4ea}
:root[data-bs-theme="dark"] :is(.sidebar,.topbar,.card-panel,.stat-card,.project-card,.auth-form-wrap,.install-card,.modal-content,.toast){background:var(--mc-surface);color:var(--ink);border-color:var(--line)}
:root[data-bs-theme="dark"] .topbar{background:#141a24}
:root[data-bs-theme="dark"] :is(.brand,.breadcrumb-label strong,.form-label,.empty h2){color:var(--ink)}
:root[data-bs-theme="dark"] :is(.muted,.subtitle,.eyebrow,.nav-label,.brand-sub,.sidebar-note,.sidebar-note small,.nav-item small,.page-head p,.project-card p,.stat-card .label,.stat-card .hint,.info-grid small,.filter-result,.topbar-date,.breadcrumb-label,.hero p,.footer){color:var(--muted)}
:root[data-bs-theme="dark"] .nav-item{color:#b6c0d0}
:root[data-bs-theme="dark"] .nav-item:hover{background:#242f3f;color:#dde8f8}
:root[data-bs-theme="dark"] .nav-item.active{background:#1f314c;color:#93b6ea}
:root[data-bs-theme="dark"] :is(.avatar,.project-icon,.stat-card .icon,.board-chip,.hero){background:var(--mc-soft);color:#b0c5e4;border-color:var(--line)}
:root[data-bs-theme="dark"] .btn-light{background:var(--mc-soft);color:var(--ink);border-color:var(--line)}
:root[data-bs-theme="dark"] .btn-light:hover{background:#323f52}
:root[data-bs-theme="dark"] :is(.form-control,.form-select,.search){background:#141a24;color:var(--ink);border-color:var(--line)}
:root[data-bs-theme="dark"] .form-control::placeholder{color:#8f99a8}
:root[data-bs-theme="dark"] :is(.form-control:disabled,.form-control[readonly]){background:#252c37}
:root[data-bs-theme="dark"] .form-select{--bs-form-select-bg-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23d6e8dc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")}
:root[data-bs-theme="dark"] .table{--bs-table-bg:var(--mc-surface);--bs-table-color:var(--ink);--bs-table-border-color:var(--line);--bs-table-hover-bg:#232d3d;--bs-table-hover-color:#e0e5ed;--bs-table-striped-bg:#202937;--bs-table-striped-color:#e0e5ed}
:root[data-bs-theme="dark"] .table th{background:#232b38;color:#b3bcca;border-color:var(--line)}
:root[data-bs-theme="dark"] .table td{border-color:var(--line)}
:root[data-bs-theme="dark"] .table .code{color:#b3bcca}
:root[data-bs-theme="dark"] .ot-table td:nth-child(1){background:var(--mc-surface)}
:root[data-bs-theme="dark"] .empty{background:#161d28;color:var(--muted);border-color:var(--line)}
:root[data-bs-theme="dark"] .progress{background:#313d4e}
:root[data-bs-theme="dark"] .alert-light{background:#252d3a;color:var(--ink);border-color:var(--line)}
:root[data-bs-theme="dark"] :is(.bg-white,.bg-light){background-color:var(--mc-surface)!important;color:var(--ink)}
:root[data-bs-theme="dark"] .text-dark{color:var(--ink)!important}
:root[data-bs-theme="dark"] .btn-close{filter:invert(1) grayscale(100%) brightness(180%)}
.auth-form-wrap>.theme-picker,.install-card>.theme-picker{position:absolute;top:18px;right:18px}
.auth-form-wrap,.install-card{position:relative}
@media(max-width:800px){.topbar>div:last-child{gap:8px!important}.theme-picker button{padding:5px 7px}.theme-picker button span{display:none}.breadcrumb-label{max-width:27vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
