/* ActiNexo v0.6 - Claro/Oscuro compatible con ambas interfaces */
.theme-switch{font:700 12px/1.1 'DM Sans',sans-serif;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:112px;min-height:36px;padding:8px 10px;border:1px solid #dce5f3;border-radius:10px;background:#fff;color:#314766;white-space:nowrap;cursor:pointer;flex-shrink:0}
.theme-switch::before{content:'☾';font-size:16px}
.theme-switch::after{content:'Oscuro'}
.theme-switch:focus-visible{outline:3px solid #718fff;outline-offset:2px}
.theme-login{position:absolute;right:22px;top:22px;z-index:3}
[data-theme="dark"] .theme-switch{background:#26364f;border-color:#3c506d;color:#e7edfb}
[data-theme="dark"] .theme-switch::before{content:'☀'}
[data-theme="dark"] .theme-switch::after{content:'Claro'}
/* Centro de trabajo */
[data-theme="dark"] body,[data-theme="dark"] html{background:#0d1421;color:#e9effa}
[data-theme="dark"] :root,[data-theme="dark"]{--ink:#e6edfa;--ink2:#d4def0;--muted:#9aabc5;--line:#314057;--light:#0d1421;--paper:#172337;--navy:#0b1526;--navy2:#182a42;--accent:#7290ff;--accent2:#213657;--teal:#30c5ac;--orange:#eeb65b;--red:#ff868f;--shadow:0 14px 32px rgba(0,0,0,.15);color-scheme:dark}
[data-theme="dark"] .topbar,[data-theme="dark"] .panel,[data-theme="dark"] .stat-card,[data-theme="dark"] .settings-card,[data-theme="dark"] .report-tile,[data-theme="dark"] .feature-card,[data-theme="dark"] .alert-card,[data-theme="dark"] .login-form-outer,[data-theme="dark"] .modal,[data-theme="dark"] .drawer,[data-theme="dark"] .donut-hole,[data-theme="dark"] .card,[data-theme="dark"] .metric,[data-theme="dark"] .login-card{background:#172337!important;border-color:#314057!important;color:#e9effa}
[data-theme="dark"] .topbar{background:rgba(23,35,55,.96)!important}
[data-theme="dark"] .sidebar,[data-theme="dark"] .side{background:#0b1526}
[data-theme="dark"] .h1,[data-theme="dark"] .panel-title,[data-theme="dark"] .stat-value,[data-theme="dark"] .setting-title,[data-theme="dark"] .section-mini,[data-theme="dark"] .detail-section-title,[data-theme="dark"] .modal-title,[data-theme="dark"] .drawer-title,[data-theme="dark"] .activity-title,[data-theme="dark"] .asset-name,[data-theme="dark"] .field-label,[data-theme="dark"] .user-block .name,[data-theme="dark"] .breadcrumbs strong,[data-theme="dark"] .top-right,[data-theme="dark"] .logo,[data-theme="dark"] .modal .modal-title,[data-theme="dark"] .login-card .logo{color:#edf3ff!important}
[data-theme="dark"] .subtitle,[data-theme="dark"] .panel-sub,[data-theme="dark"] .stat-label,[data-theme="dark"] .stat-change,[data-theme="dark"] .section-text,[data-theme="dark"] .form-hint,[data-theme="dark"] .activity-desc,[data-theme="dark"] .field-meta,[data-theme="dark"] .drawer-sub,[data-theme="dark"] .detail-row label,[data-theme="dark"] .detail-row span,[data-theme="dark"] .count-note,[data-theme="dark"] .settings-card .setting-sub,[data-theme="dark"] .login-card p,[data-theme="dark"] .desc,[data-theme="dark"] .foot-note{color:#a6b8d2!important}
[data-theme="dark"] .button:not(.primary),[data-theme="dark"] .btn:not(.primary),[data-theme="dark"] .top-tenant,[data-theme="dark"] .action-mini,[data-theme="dark"] .icon-btn:hover,[data-theme="dark"] .code-pill,[data-theme="dark"] .tag,[data-theme="dark"] .stat-icon,[data-theme="dark"] .field-row,[data-theme="dark"] .column-choice,[data-theme="dark"] .demo-account{background:#24334c!important;border-color:#3a4e6b!important;color:#dce6f7!important}
[data-theme="dark"] .button.primary,[data-theme="dark"] .btn.primary{background:#506df2!important;color:#fff!important;border-color:#637dff!important}
[data-theme="dark"] .topbar,[data-theme="dark"] .panel,[data-theme="dark"] .settings-card,[data-theme="dark"] .stat-card,[data-theme="dark"] .modal-head,[data-theme="dark"] .modal-foot,[data-theme="dark"] .detail-row,[data-theme="dark"] .field-row,[data-theme="dark"] .activity-item,[data-theme="dark"] .card-title{border-color:#314057!important}
[data-theme="dark"] input,[data-theme="dark"] select,[data-theme="dark"] textarea,[data-theme="dark"] .toolbar-search,[data-theme="dark"] .search-global{background:#101d30!important;border-color:#3a4d6c!important;color:#edf3ff!important}
[data-theme="dark"] input::placeholder,[data-theme="dark"] textarea::placeholder{color:#8497b4}
[data-theme="dark"] .data-table th,[data-theme="dark"] thead th{background:#23334b!important;color:#a9badd!important}
[data-theme="dark"] .data-table td,[data-theme="dark"] tbody td{border-color:#314057!important;color:#dce7f7!important;background:#172337}
[data-theme="dark"] .data-table tr:hover td,[data-theme="dark"] tbody tr:hover td{background:#22334d!important}
[data-theme="dark"] .outdated-row td{background:#382d25!important}
[data-theme="dark"] .notice,[data-theme="dark"] .report-tile .feature-icon,[data-theme="dark"] .info,[data-theme="dark"] .login-card .info{background:#223452!important;color:#c7d8f7!important;border-color:#3a537c!important}
[data-theme="dark"] .notice.warning,[data-theme="dark"] .warning,[data-theme="dark"] .error{background:#473026!important;color:#ffd8af!important;border-color:#77513c!important}
[data-theme="dark"] .modal-overlay,[data-theme="dark"] .drawer-overlay,[data-theme="dark"] .overlay{background:rgba(1,6,17,.78)}
[data-theme="dark"] .drawer-body,[data-theme="dark"] .modal-content{background:#172337;color:#edf3ff}
[data-theme="dark"] .drawer-header{background:#1c3050!important}
[data-theme="dark"] .login-wrap{background:#0c1423!important}
[data-theme="dark"] .login-cover{background:linear-gradient(160deg,#111e38,#1a3157)!important}
[data-theme="dark"] .login-big,[data-theme="dark"] .login-logo,[data-theme="dark"] .login-eyebrow{color:#f1f5ff}
[data-theme="dark"] .login-form,[data-theme="dark"] .login-form h2,[data-theme="dark"] .login-form p{color:#e6edfa!important}
[data-theme="dark"] .login-form-outer{background:#152237!important}
[data-theme="dark"] .login-card,[data-theme="dark"] .login-card h1{color:#e6edfa}
[data-theme="dark"] .demo-box,[data-theme="dark"] .reading-entry,[data-theme="dark"] .closure-item,[data-theme="dark"] .diff-record,[data-theme="dark"] .dup-alert,[data-theme="dark"] .review-chips{background:#202f48!important;border-color:#3c506b!important;color:#e3eaf6!important}
[data-theme="dark"] .mobile-bottom{background:#162339!important;border-top-color:#30415a!important}
[data-theme="dark"] .mobile-bottom button{color:#a5b8d4}
[data-theme="dark"] .mobile-bottom button.active{color:#a3b6ff}
[data-theme="dark"] .chart-grid div{border-color:#34455f}
[data-theme="dark"] .crumb,[data-theme="dark"] .muted{color:#a5b8d1!important}
[data-theme="dark"] .login-wrap{background:radial-gradient(circle at 10% 15%,#1d3254,transparent 50%),#0c1423!important}
[data-theme="dark"] .field{color:#b9c9e1}
[data-theme="dark"] .field input,[data-theme="dark"] .field select{background:#111f34;color:#eef4ff;border-color:#3c506d}
[data-theme="dark"] .side-bottom{background:#172944}
[data-theme="dark"] .metric span{color:#a4b7d0}
@media(max-width:700px){.theme-switch{min-width:39px;width:39px;padding:7px}.theme-switch::after{display:none}.theme-login{min-width:102px;width:auto}.theme-login::after{display:inline}.topbar .theme-switch{min-width:34px;width:34px}}

/* Mejora de contraste en textos explicativos y gráficos en oscuro */
[data-theme="dark"] .activity-item span[style*="color:"],[data-theme="dark"] .legend-row,[data-theme="dark"] .panel-footer,[data-theme="dark"] .chart-bar-col label,[data-theme="dark"] .stat-change{color:#b7c7de!important}
[data-theme="dark"] input:disabled{background:#1a2a40!important;color:#b1c4df!important;opacity:.75}
[data-theme="dark"] .drawer .detail-row strong,[data-theme="dark"] .reading-entry small{color:#d4e3f8!important}
