:root{color-scheme:light}
.theme-toggle{min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #c8d6e4;border-radius:9px;padding:0 12px;background:#fff;color:#243548;font:inherit;font-size:13px;font-weight:850;line-height:1;cursor:pointer;white-space:nowrap}
.theme-toggle:hover{background:#eef3f8;border-color:#99adc0}.theme-toggle [data-lucide]{width:16px;height:16px;stroke-width:2.4;flex:0 0 auto}.floating-theme-toggle{position:fixed;top:14px;right:14px;z-index:20;box-shadow:0 10px 28px rgb(15 31 49 / 16%)}
header .theme-toggle,.topbar .theme-toggle{background:#ffffff0d;border-color:#7890a4;color:#fff}.topbar .theme-toggle:hover,header .theme-toggle:hover{background:#ffffff1a;border-color:#d8e5ef}
html[data-theme="dark"]{--up2-ink:#e8eef7;--up2-muted:#a9b6c8;--up2-surface:#172131;--up2-canvas:#0f1722;--up2-border:#2e4057;--up2-orange:#ff6b22;--up2-orange-dark:#e95714;--up2-blue:#3aa7d8;--up2-green:#41bf82;--up2-red:#ff6f76;--up2-shadow:0 18px 38px rgb(0 0 0 / 28%);background:#0f1722;color-scheme:dark}
html[data-theme="dark"] body{background:#0f1722!important;color:#e8eef7!important}
html[data-theme="dark"] header,html[data-theme="dark"] .topbar{background:#111b2a!important;color:#fff!important;border-bottom-color:#ff6b22!important;box-shadow:0 12px 28px rgb(0 0 0 / 30%)!important}
html[data-theme="dark"] .page,html[data-theme="dark"] .workspace,html[data-theme="dark"] main{color:#e8eef7}
html[data-theme="dark"] aside,html[data-theme="dark"] .auth-card,html[data-theme="dark"] .card,html[data-theme="dark"] .tenant,html[data-theme="dark"] .tenant-metrics div,html[data-theme="dark"] .create-panel,html[data-theme="dark"] .intro,html[data-theme="dark"] .agent,html[data-theme="dark"] .company,html[data-theme="dark"] .form-company,html[data-theme="dark"] .metric,html[data-theme="dark"] .panel,html[data-theme="dark"] .widget,html[data-theme="dark"] .component,html[data-theme="dark"] .dialog,html[data-theme="dark"] dialog,html[data-theme="dark"] .modal,html[data-theme="dark"] .dialog-content,html[data-theme="dark"] .up2-confirm,html[data-theme="dark"] .toast,html[data-theme="dark"] .activation,html[data-theme="dark"] .tenant-link,html[data-theme="dark"] .schema,html[data-theme="dark"] details,html[data-theme="dark"] .empty{background:#172131!important;border-color:#2e4057!important;color:#e8eef7!important;box-shadow:var(--up2-shadow)!important}
html[data-theme="dark"] .canvas{background-color:#101824!important;background-image:linear-gradient(rgb(65 86 112 / 24%) 1px,transparent 1px),linear-gradient(90deg,rgb(65 86 112 / 24%) 1px,transparent 1px)!important;border-color:#3a526e!important}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] .tenant h2,html[data-theme="dark"] .card h3,html[data-theme="dark"] .metric .value,html[data-theme="dark"] .widget-value,html[data-theme="dark"] .panel h2,html[data-theme="dark"] .company strong,html[data-theme="dark"] .schema-summary,html[data-theme="dark"] .tenant-metrics strong{color:#f4f8fc!important}
html[data-theme="dark"] p,html[data-theme="dark"] .description,html[data-theme="dark"] .meta,html[data-theme="dark"] .hint,html[data-theme="dark"] .subtitle,html[data-theme="dark"] .summary,html[data-theme="dark"] .status,html[data-theme="dark"] .component span,html[data-theme="dark"] .tenant-metrics span,html[data-theme="dark"] .bar-value,html[data-theme="dark"] .legend,html[data-theme="dark"] .line-labels,html[data-theme="dark"] .chart-number,html[data-theme="dark"] .company p,html[data-theme="dark"] .modal>p,html[data-theme="dark"] .up2-confirm p{color:#a9b6c8!important}
html[data-theme="dark"] header p,html[data-theme="dark"] .topbar p,html[data-theme="dark"] .eyebrow{color:#cad8e8!important}
html[data-theme="dark"] label,html[data-theme="dark"] .widget-label,html[data-theme="dark"] .bar-name,html[data-theme="dark"] .chart-name{color:#cbd8e8!important}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] .company-checks{background:#101925!important;border-color:#33475f!important;color:#eef5fb!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#748398!important}
html[data-theme="dark"] input:focus,html[data-theme="dark"] select:focus,html[data-theme="dark"] textarea:focus{border-color:#3aa7d8!important;outline-color:rgb(58 167 216 / 24%)!important}
html[data-theme="dark"] .secondary,html[data-theme="dark"] .quiet-button,html[data-theme="dark"] .up2-confirm-cancel{background:#26364a!important;border-color:#3a526e!important;color:#e8eef7!important}
html[data-theme="dark"] .primary,html[data-theme="dark"] .up2-confirm-accept{background:#ff6b22!important;color:#fff!important}
html[data-theme="dark"] .danger,html[data-theme="dark"] .up2-confirm-accept.danger{background:#3a1e28!important;color:#ffb9be!important;border-color:#6a2b39!important}
html[data-theme="dark"] .nav-link,html[data-theme="dark"] .header-button,html[data-theme="dark"] .back-button{background:#ffffff0d!important;border-color:#667a93!important;color:#fff!important}
html[data-theme="dark"] .filter-chip,html[data-theme="dark"] .time-button,html[data-theme="dark"] .company-checks label,html[data-theme="dark"] .id,html[data-theme="dark"] .company-count,html[data-theme="dark"] .badge,html[data-theme="dark"] .activation-code{background:#213247!important;border-color:#3b5572!important;color:#d8eaff!important}
html[data-theme="dark"] .hint{background:#111b2a!important;border:1px solid #2e4057!important;color:#a9b6c8!important}
html[data-theme="dark"] .link{color:#ffb089!important}
html[data-theme="dark"] .chart-list>[role=button]:hover,html[data-theme="dark"] .vertical-item:hover,html[data-theme="dark"] .legend-item:hover,html[data-theme="dark"] .filter-chip:hover,html[data-theme="dark"] .time-button:hover,html[data-theme="dark"] .company-checks label:hover,html[data-theme="dark"] .component:hover{background:#223148!important;border-color:#496783!important}
html[data-theme="dark"] .time-button.selected,html[data-theme="dark"] .filter-chip.selected{background:#2488b8!important;border-color:#2488b8!important;color:#fff!important}
html[data-theme="dark"] .tenant-state.active,html[data-theme="dark"] .online,html[data-theme="dark"] .complete{background:#163d30!important;color:#8fe0b5!important;border-color:#2d684e!important}
html[data-theme="dark"] .tenant-state.expiring,html[data-theme="dark"] .pending{background:#3b3018!important;color:#f3cf83!important}
html[data-theme="dark"] .tenant-state.inactive,html[data-theme="dark"] .error{background:#3a1e28!important;color:#ffb9be!important}
html[data-theme="dark"] .track,html[data-theme="dark"] .chart-track{background:#25364a!important}
html[data-theme="dark"] .donut-chart::after{background:#172131!important;box-shadow:0 0 0 1px #2e4057!important}
html[data-theme="dark"] .line-chart .grid{stroke:#2f435b!important}
html[data-theme="dark"] .line-chart .point{fill:#172131!important}
html[data-theme="dark"] .theme-toggle{background:#243346;color:#e8eef7;border-color:#3a526e}html[data-theme="dark"] .floating-theme-toggle{background:#172131}
html[data-theme="dark"] .permission-row{background:#101925!important;border-color:#33475f!important;color:#e8eef7!important}
html[data-theme="dark"] .permission-row strong,html[data-theme="dark"] .access-choice,html[data-theme="dark"] .permission-toggle{color:#d8e5f2!important}
html[data-theme="dark"] .permission-row small,html[data-theme="dark"] .modal-help{color:#a9b6c8!important}
html[data-theme="dark"] .dialog-status{color:#ffb9be!important}
html[data-theme="dark"] .business-filter-options{background:#101925!important;border-color:#33475f!important}
html[data-theme="dark"] .business-filter-touch-field{color:#cbd8e8!important}
html[data-theme="dark"] .business-filter-option{color:#d8e5f2!important}
html[data-theme="dark"] .business-filter-option:hover{background:#223148!important;border-color:#496783!important}
html[data-theme="dark"] .business-filter-options-empty{color:#a9b6c8!important}
@media(max-width:600px){.floating-theme-toggle{top:10px;right:10px}.theme-toggle{width:42px;min-width:42px;padding:0}.theme-toggle span{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}
