/* Clean workspace palette. Light is the default; dark remains a personal option. */
:root{font-variant-numeric:tabular-nums;--radius-sm:8px;--radius-md:12px;--radius-lg:16px}
html body .page-title,html body .page-header h1{font-weight:700!important;letter-spacing:0!important}
html body .top-header .header-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.92rem!important}
html body .stat-card .stat-value{font-weight:700!important}
html body .sidebar .nav-link .nav-label{font-size:.84rem!important;font-weight:500!important}
html body .data-table tbody td{font-size:.82rem!important;line-height:1.8!important}
html body .data-table th{font-size:.74rem!important;line-height:1.8!important}
html body .card,html body .client-card,html body .product-card{box-shadow:none!important}
.theme-toggle{width:36px;height:36px;min-width:36px;border-radius:9px;background:#ffffff08;border:1px solid #ffffff18;color:inherit;font-size:19px;cursor:pointer}
html[data-theme="light"]{
 color-scheme:light;--brand:#365ed8;--brand-dark:#274bc2;--brand-deeper:#223d91;--brand-light:#edf2ff;--brand-glow:transparent;--brand-rgb:54,94,216;--brand-grad:#365ed8;
 --bg:#f5f7fa;--bg-deep:#f5f7fa;--bg-base:#f5f7fa;--bg-elevated:#f8fafc;--bg-card:#fff;--bg-card-2:#f8fafc;--bg-input:#fff;--bg-hover:#f2f5fb;
 --surface:#fff;--surface-soft:#f8fafc;--surface-raised:#fff;--surface-1:#fff;--surface-2:#f8fafc;--surface-3:#f1f5f9;
 --text:#172234;--text-primary:#172234;--text-secondary:#536174;--text-muted:#64748b;--text-ghost:#94a3b8;
 --border:#e0e6ee;--border-strong:#cbd5e1;--border-accent:#b9c8ef;--success:#16825c;--success-dark:#126545;--success-bg:#edf8f2;--danger:#bd3345;--danger-dark:#a52536;--danger-bg:#fff0f2;--warning:#95630a;--warning-bg:#fff7e6;--info:#365ed8;--info-bg:#edf2ff;
 --glass-light:#fff;--glass-medium:#fff;--glass-strong:#fff;--glass-border:#e0e6ee;--shadow-xs:none;--shadow-sm:0 2px 6px #17223405;--shadow-md:0 4px 20px #17223408;--shadow-lg:0 12px 42px #17223415;
}
html[data-theme="light"] body,html[data-theme="light"] body .app-container,html[data-theme="light"] body .main-wrapper,html[data-theme="light"] body .page{background:#f5f7fa!important;background-image:none!important;color:#172234!important}
html[data-theme="light"] body .sidebar,html[data-theme="light"] body .sidebar-header,html[data-theme="light"] body .sidebar-footer{background:#fff!important;border-color:#e0e6ee!important;color:#172234!important}
html[data-theme="light"] body .sidebar-brand-name{color:#bd3345!important}
html[data-theme="light"] body .sidebar-brand-sub,html[data-theme="light"] body .user-role,html[data-theme="light"] body .app-version{color:#64748b!important}
html[data-theme="light"] body .user-card{background:#f8fafc!important;border:1px solid #e0e6ee!important;border-radius:10px!important}
html[data-theme="light"] body .nav-group{border-color:#edf0f5!important}
html[data-theme="light"] body .nav-group>summary{color:#3f4d62!important}
html[data-theme="light"] body .nav-group>summary:hover{background:#f8fafc!important}
html[data-theme="light"] body .sidebar .nav-link{color:#536174!important}
html[data-theme="light"] body .sidebar .nav-link .nav-icon-wrap{color:#536174!important}
html[data-theme="light"] body .sidebar .nav-link.active{background:#edf2ff!important;color:#274bc2!important}
html[data-theme="light"] body .sidebar .nav-link.active .nav-icon-wrap{color:#274bc2!important}
html[data-theme="light"] body .sidebar .nav-link:hover{background:#f3f6fc!important;color:#172234!important}
html[data-theme="light"] body .navigation-search-label{color:#536174!important}
html[data-theme="light"] body .navigation-search-label input{background:#f8fafc!important;border-color:#e0e6ee!important;color:#172234!important}
html[data-theme="light"] body .top-header,html[data-theme="light"] body .app-header{background:#ffffffed!important;backdrop-filter:blur(10px)!important;border-color:#e0e6ee!important;box-shadow:none!important}
html[data-theme="light"] body .header-title,html[data-theme="light"] body .user-name{color:#172234!important}
html[data-theme="light"] body .theme-toggle,html[data-theme="light"] body .menu-toggle,html[data-theme="light"] body #notif-bell-btn,html[data-theme="light"] body .lang-toggle,html[data-theme="light"] body .connection-status-badge,html[data-theme="light"] body .user-menu-trigger{background:#f8fafc!important;color:#536174!important;border-color:#e0e6ee!important;box-shadow:none!important}
html[data-theme="light"] body .menu-toggle::before{color:#536174!important}
html[data-theme="light"] body .card,html[data-theme="light"] body .table-container,html[data-theme="light"] body .filter-panel,html[data-theme="light"] body .filters-card,html[data-theme="light"] body .form-card,html[data-theme="light"] body .client-card,html[data-theme="light"] body .product-card,html[data-theme="light"] body .report-overview-panel,html[data-theme="light"] body .settings-sidebar,html[data-theme="light"] body .settings-content{background:#fff!important;background-image:none!important;color:#172234!important;border-color:#e0e6ee!important}
html[data-theme="light"] body .card-header,html[data-theme="light"] body .client-card-meta,html[data-theme="light"] body .client-card-actions{background:#fff!important;border-color:#e0e6ee!important}
html[data-theme="light"] body .card-title,html[data-theme="light"] body .page-title,html[data-theme="light"] body .card h3,html[data-theme="light"] body .report-overview-panel h2,html[data-theme="light"] body .report-overview-panel h3{color:#172234!important}
html[data-theme="light"] body .page-subtitle,html[data-theme="light"] body .workflow-note,html[data-theme="light"] body .cell-note,html[data-theme="light"] body .report-source-note,html[data-theme="light"] body .report-metric>span,html[data-theme="light"] body .report-metric small,html[data-theme="light"] body .simple-filter-bar label{color:#536174!important}
html[data-theme="light"] body .btn-primary{background:#365ed8!important;border-color:#365ed8!important;color:#fff!important}
html[data-theme="light"] body .btn-primary:hover{background:#274bc2!important}
html[data-theme="light"] body .btn-secondary,html[data-theme="light"] body .btn-outline,html[data-theme="light"] body .btn-ghost{background:#fff!important;border:1px solid #d9e1ed!important;color:#3f4d62!important}
html[data-theme="light"] body .btn-secondary:hover,html[data-theme="light"] body .btn-outline:hover,html[data-theme="light"] body .btn-ghost:hover{background:#f3f6fc!important}
html[data-theme="light"] body .btn-danger{background:#fff0f2!important;border-color:#f1c5cd!important;color:#bd3345!important}
html[data-theme="light"] body .form-control,html[data-theme="light"] body .form-select,html[data-theme="light"] body input:not([type=checkbox]):not([type=radio]):not([type=submit]),html[data-theme="light"] body select,html[data-theme="light"] body textarea{background:#fff!important;border-color:#d5dfea!important;color:#172234!important}
html[data-theme="light"] body input:disabled,html[data-theme="light"] body select:disabled{background:#f1f5f9!important;color:#64748b!important;opacity:1}
html[data-theme="light"] body input::placeholder,html[data-theme="light"] body textarea::placeholder{color:#8491a3!important}
html[data-theme="light"] body .stat-card,html[data-theme="light"] body #page-dashboard .stats-grid .stat-card:first-child{background:#fff!important;border-color:#e0e6ee!important}
html[data-theme="light"] body .stat-card .stat-label,html[data-theme="light"] body #page-dashboard .stats-grid .stat-card:first-child .stat-label{color:#536174!important}
html[data-theme="light"] body .stat-card .stat-value,html[data-theme="light"] body #page-dashboard .stats-grid .stat-card:first-child .stat-value,html[data-theme="light"] body .report-metric strong{color:#172234!important}
html[data-theme="light"] body .stat-card .stat-trend,html[data-theme="light"] body #page-dashboard .stats-grid .stat-card:first-child .stat-trend{color:#64748b!important}
html[data-theme="light"] body .report-metric{background:#f8fafc!important;border-color:#e5eaf2!important}
html[data-theme="light"] body .table-responsive,html[data-theme="light"] body #inventory-table-container,html[data-theme="light"] body #inventory-history-table-container,html[data-theme="light"] body .data-table tbody,html[data-theme="light"] body .data-table tbody tr,html[data-theme="light"] body .data-table td,html[data-theme="light"] body #inventory-table-container .data-table td:first-child{background:#fff!important;color:#172234!important;border-color:#e5eaf2!important;box-shadow:none!important}
html[data-theme="light"] body .data-table thead,html[data-theme="light"] body .data-table th,html[data-theme="light"] body #inventory-table-container .data-table th:first-child{background:#f8fafc!important;color:#536174!important;border-color:#e5eaf2!important;box-shadow:none!important}
html[data-theme="light"] body .data-table tbody tr:hover,html[data-theme="light"] body .data-table tbody tr:hover td{background:#f8fafc!important}
html[data-theme="light"] body .data-table td.text-danger,html[data-theme="light"] body .text-danger{color:#bd3345!important}
html[data-theme="light"] body .data-table td.text-success,html[data-theme="light"] body .text-success{color:#16825c!important}
html[data-theme="light"] body .data-table td.text-warning,html[data-theme="light"] body .text-warning{color:#95630a!important}
html[data-theme="light"] body .cost-color,html[data-theme="light"] body .sell-color,html[data-theme="light"] body .profit-color{color:#172234!important}
html[data-theme="light"] body .badge{background:#f1f5f9!important;border-color:#e0e6ee!important;color:#536174!important}
html[data-theme="light"] body .badge-success{background:#edf8f2!important;color:#16825c!important;border-color:#cce8db!important}
html[data-theme="light"] body .badge-danger{background:#fff0f2!important;color:#bd3345!important;border-color:#f1c5cd!important}
html[data-theme="light"] body .badge-warning{background:#fff7e6!important;color:#95630a!important;border-color:#f0dfb9!important}
html[data-theme="light"] body .badge-info,html[data-theme="light"] body .badge-primary,html[data-theme="light"] body .badge-brand{background:#edf2ff!important;color:#365ed8!important;border-color:#ccd7f9!important}
html[data-theme="light"] body .simple-details>summary,html[data-theme="light"] body .guide-description{color:#172234!important}
html[data-theme="light"] body .guide-steps,html[data-theme="light"] body .guide-notes,html[data-theme="light"] body .report-legend,html[data-theme="light"] body .inventory-save-bar>span{color:#536174!important}
html[data-theme="light"] body .field-help-button{background:#edf2ff!important;color:#365ed8!important;border-color:#cbd7fa!important}
html[data-theme="light"] body .field-help-note{background:#edf2ff!important;color:#27447f!important}
html[data-theme="light"] body .client-branch-count b,html[data-theme="light"] body #page-products .product-stock-line strong{color:#172234!important}
html[data-theme="light"] body #main-content .filter-panel-header,html[data-theme="light"] body #page-products .product-card-footer{background:#f8fafc!important;background-image:none!important;color:#172234!important;border-color:#e0e6ee!important}
html[data-theme="light"] body #page-products .product-card{border-top-color:#e0e6ee!important}
html[data-theme="light"] body #dashboard-period-label{color:#536174!important}
html[data-theme="light"] body .search-icon{color:#64748b!important}
html body .page-title-icon,html body .filter-panel-icon,html body #roles-container .nav-icon-wrap{display:none!important}
html[data-theme="light"] body .inventory-save-bar,html[data-theme="light"] body .adjustment-lines>div{border-color:#e0e6ee!important}
html[data-theme="light"] body .branch-tab{background:#fff!important;border:1px solid #d9e1ed!important;color:#536174!important;border-radius:9px!important}
html[data-theme="light"] body .branch-tab.active{background:#edf2ff!important;border-color:#cbd7fa!important;color:#274bc2!important;box-shadow:none!important}
html[data-theme="light"] body .client-branch-chip,html[data-theme="light"] body .client-branch-more,html[data-theme="light"] body .client-no-branches,html[data-theme="light"] body .product-stock-line,html[data-theme="light"] body .price-row{background:#f8fafc!important;border-color:#e0e6ee!important;color:#536174!important}
html[data-theme="light"] body .product-card-visual,html[data-theme="light"] body #products-grid .product-card .product-card-visual,html[data-theme="light"] body .client-card .client-avatar{background:#edf2ff!important;color:#365ed8!important;border-color:#e0e6ee!important}
html[data-theme="light"] body .card-selectable{background:#fff!important;border-color:#d9e1ed!important;color:#172234!important;box-shadow:none!important}
html[data-theme="light"] body .card-selectable.selected{background:#edf2ff!important;border-color:#8ea5ec!important}
html[data-theme="light"] body .stepper-modern,html[data-theme="light"] body .step-modern{background:transparent!important;color:#64748b!important}
html[data-theme="light"] body .step-active .step-modern-num{background:#365ed8!important;color:#fff!important}
html[data-theme="light"] body .running-total-summary{background:#edf2ff!important;color:#274bc2!important;box-shadow:none!important}
html[data-theme="light"] body .modal-overlay.is-open>.modal,html[data-theme="light"] body .modal-overlay>.modal-content,html[data-theme="light"] body .modal-body{background:#fff!important;color:#172234!important;border-color:#e0e6ee!important}
html[data-theme="light"] body .modal-header,html[data-theme="light"] body .modal-footer{background:#f8fafc!important;color:#172234!important;border-color:#e0e6ee!important}
html[data-theme="light"] body .modal-title,html[data-theme="light"] body .modal-body h4{color:#172234!important}
html[data-theme="light"] body .modal-close,html[data-theme="light"] body .modal-close-btn{background:#fff!important;color:#536174!important;border-color:#d9e1ed!important}
html[data-theme="light"] body .notif-panel,html[data-theme="light"] body .notif-panel-header,html[data-theme="light"] body .notif-panel-footer,html[data-theme="light"] body .user-dropdown-menu,html[data-theme="light"] body .dropdown-user-info{background:#fff!important;color:#172234!important;border-color:#e0e6ee!important}
html[data-theme="light"] body .notification-card{background:#fff!important;color:#172234!important;border-color:#e0e6ee!important}
html[data-theme="light"] body .notification-card.unread{background:#f2f5ff!important;border-inline-start-color:#365ed8!important}
html[data-theme="light"] body .notification-card p,html[data-theme="light"] body .notification-card-heading time,html[data-theme="light"] body .notification-update-row small{color:#536174!important}
html[data-theme="light"] body .notification-panel-tabs,html[data-theme="light"] body .notification-update-row{border-color:#e0e6ee!important}
html[data-theme="light"] body .bottom-nav,html[data-theme="light"] body .bottom-sheet-content,html[data-theme="light"] body .bottom-sheet-header{background:#fff!important;color:#172234!important;border-color:#e0e6ee!important;box-shadow:none!important}
html[data-theme="light"] body .bottom-nav-item{color:#64748b!important}
html[data-theme="light"] body .bottom-nav-item.active{background:#edf2ff!important;color:#365ed8!important}
html[data-theme="light"] body .bottom-nav-item.active::before,html[data-theme="light"] body .bottom-nav-item.active::after{background:#365ed8!important;box-shadow:none!important}
html[data-theme="light"] body .sheet-item{background:#f8fafc!important;border-color:#e0e6ee!important;color:#172234!important}
html[data-theme="light"] body .sheet-item-icon{background:#edf2ff!important;color:#365ed8!important}
html[data-theme="light"] body .sheet-group-label{color:#536174!important}
html[data-theme="light"] body .empty-state{background:#f8fafc!important;border-color:#d9e1ed!important;color:#64748b!important;min-height:150px!important}
html[data-theme="light"] body .dashboard-period-details,html[data-theme="light"] body .dashboard-bar-group{border-color:#d9e1ed!important}
html[data-theme="light"] body .dashboard-month-column>span,html[data-theme="light"] body .report-chart-empty{color:#64748b!important}
html[data-theme="light"] body .toast{background:#fff!important;color:#172234!important;border-color:#d9e1ed!important;box-shadow:0 4px 24px #17223418!important}
html[data-theme="light"] body .toast-close{color:#64748b!important}
/* Login uses the same restrained palette and real feature descriptions. */
html[data-theme="light"] body:has(.login-wrapper){background:#f5f7fa!important}
html body:has(.login-wrapper) .bg-orb,html body:has(.login-wrapper) .bg-grid,html body:has(.login-wrapper) .animated-bg,html body:has(.login-wrapper) .juice-splash,html body:has(.login-wrapper) .branding-stats,html body:has(.login-wrapper) .trust-badges{display:none!important}
html[data-theme="light"] body .login-container{background:#fff!important;border:1px solid #e0e6ee!important;box-shadow:0 12px 50px #17223408!important;border-radius:18px!important;overflow:hidden}
html[data-theme="light"] body .branding-panel{background:#edf2ff!important;color:#172234!important}
html[data-theme="light"] body .branding-title{color:#172234!important;text-shadow:none!important}
html[data-theme="light"] body .branding-subtitle,html[data-theme="light"] body .branding-feature,html[data-theme="light"] body .branding-tagline{color:#536174!important}
html[data-theme="light"] body .form-panel,html[data-theme="light"] body .login-card{background:#fff!important;border-color:#e0e6ee!important;box-shadow:none!important}
html[data-theme="light"] body .login-card-title{color:#172234!important}
html[data-theme="light"] body .login-card-desc,html[data-theme="light"] body .form-label,html[data-theme="light"] body .input-label{color:#536174!important}
html[data-theme="light"] body .input-wrapper,html[data-theme="light"] body .login-card .input-group,html[data-theme="light"] body .login-form input{background:#fff!important;color:#172234!important;border-color:#d9e1ed!important}
html[data-theme="light"] body #loginBtn{background:#365ed8!important;color:#fff!important;border-color:#365ed8!important;box-shadow:none!important}
@media(max-width:760px){html body .page>.page-header{margin:0!important;width:100%!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important}html body .page-subtitle{max-width:100%!important}html body .page-title-icon{display:none!important}html body .stat-card .stat-label{max-width:100%!important}.theme-toggle{width:32px;height:34px;min-width:32px}html body .top-header .header-actions{gap:6px!important}}
@media print{html body .theme-toggle,html body .field-help-button,html body .field-help-note,html body .screen-help-button{display:none!important}}
@media(max-width:760px){html body .form-control,html body .form-select,html body input:not([type=checkbox]):not([type=radio]),html body select,html body textarea{font-size:16px!important}}
html[data-theme="light"] body #page-analytics .analytics-tabs-nav{background:transparent!important;border:0!important;box-shadow:none!important}
html[data-theme="light"] body #page-analytics .analytics-tab-btn{background:#fff!important;color:#536174!important;border:1px solid #e0e6ee!important;box-shadow:none!important}
html[data-theme="light"] body #page-analytics .analytics-tab-btn.active{background:#edf2ff!important;color:#274bc2!important;border-color:#b9c8ef!important}
html[data-theme="light"] body #page-products .product-card,html[data-theme="light"] body #page-products .product-card:hover,html[data-theme="light"] body .client-card:hover{border-color:#e0e6ee!important;transform:none!important;box-shadow:none!important}
#page-invoices .invoice-period-cell strong{display:inline-block;font-weight:700;white-space:normal;line-height:1.7}
.product-list-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.product-list-tools label{font-size:.85rem;color:var(--secondary-text)}
.product-list-tools .form-select{width:auto;max-width:100%;min-width:170px}
.product-list-tools small{color:var(--secondary-text)}
.product-inactive-badge{white-space:normal}
@media(max-width:760px){.product-list-tools .form-select{flex:1;min-width:0}.product-list-tools small{flex-basis:100%}}
@media(max-width:760px){html body #products-grid .product-card-badges{flex-wrap:wrap}html body #products-grid .product-card-badges .badge.product-inactive-badge{display:inline-flex!important;max-width:100%}}
