:root{color-scheme:dark;--app-bg:#0d0f10;--panel-bg:#151819;--panel-bg-elevated:#1a1e1f;--text-primary:#f0f2f2;--text-secondary:#8b9497;--text-on-dark:#f7f6f2;--text-on-dark-secondary:#c8c6bf;--border-color:#292e30;--input-bg:#101213;--hover-bg:#202425;--accent:#f5b400;--accent-text:#17130b;--danger:#e25c5c;--success:#55bd7c;--warning:#d9a72e;--shadow-color:#000b}
html[data-theme=light]{color-scheme:light;--app-bg:#f1efe9;--panel-bg:#f8f7f3;--panel-bg-elevated:#fffefa;--text-primary:#202020;--text-secondary:#69665f;--text-on-dark:#f7f6f2;--text-on-dark-secondary:#c8c6bf;--border-color:#d8d4ca;--input-bg:#f4f2ec;--hover-bg:#eae7de;--accent:#f5b400;--accent-text:#17130b;--danger:#bd3f45;--success:#247b49;--warning:#9a6a00;--shadow-color:#3b352815}
body{background:var(--app-bg);color:var(--text-primary)}
body,.topbar,.view,article,section,dialog,input,select,textarea,button,.table,.cart,.cash-table,.cash-row,.dash-metric,.dash-calendar-panel,.dash-chart-panel,.dash-recent{transition:background-color .18s ease,color .18s ease,border-color .18s ease}
.theme-toggle{flex:none;height:32px;display:flex;align-items:center;gap:5px;border:1px solid #3b4143;border-radius:5px;background:#181b1c;color:#b8bfc1;padding:0 8px}.theme-toggle:hover{border-color:var(--accent);color:var(--accent)}.theme-toggle span{font-size:15px}.theme-toggle em{font-size:10px;font-style:normal;font-weight:750}
.pos-home,.nav button[data-view=dashboard]{height:38px!important;border:1px solid #9a7320!important;border-radius:6px!important;background:#2d2515!important;color:#e9b94f!important;padding:0 17px!important;font-weight:900!important;letter-spacing:.04em;white-space:nowrap}
.pos-home:hover,.nav button[data-view=dashboard]:hover{border-color:#d5a331!important;background:#382d17!important;color:#ffd36e!important}
.pos-home.active,.nav button[data-view=dashboard].active{border-color:var(--accent)!important;background:var(--accent)!important;color:var(--accent-text)!important;box-shadow:0 0 0 1px #f5b40026}
html[data-theme=light] body{background:var(--app-bg);color:var(--text-primary)}
html[data-theme=light] .topbar{background:#171918;border-color:#3a3d3b;color:#f4f4f2}
html[data-theme=light] .nav button{color:#b9bcb9}html[data-theme=light] .nav button:hover,html[data-theme=light] .nav button.active{color:#fff}
html[data-theme=light] .settings-gear,html[data-theme=light] .theme-toggle{background:#202321;color:#d8d9d6;border-color:#494d49}
html[data-theme=light] .pos-home,html[data-theme=light] .nav button[data-view=dashboard]{border-color:#b7892d!important;background:#39301e!important;color:#f0c76f!important}
html[data-theme=light] .pos-home.active,html[data-theme=light] .nav button[data-view=dashboard].active{border-color:var(--accent)!important;background:var(--accent)!important;color:var(--accent-text)!important}
html[data-theme=light] .view:not(.paper-dialog),html[data-theme=light] .products-sticky{background:var(--app-bg);color:var(--text-primary)}
html[data-theme=light] small,html[data-theme=light] .hint,html[data-theme=light] .count,html[data-theme=light] .shown{color:var(--text-secondary)}
html[data-theme=light] .table,html[data-theme=light] .cash-table,html[data-theme=light] .supplier-table,html[data-theme=light] .transaction-table,html[data-theme=light] .client-table,html[data-theme=light] .ali-history,html[data-theme=light] .dash-calendar-panel,html[data-theme=light] .dash-chart-panel,html[data-theme=light] .dash-recent,html[data-theme=light] .dash-metric{background:var(--panel-bg);border-color:var(--border-color);color:var(--text-primary);box-shadow:0 1px 2px var(--shadow-color)}
html[data-theme=light] .thead,html[data-theme=light] .cash-table-head,html[data-theme=light] .supplier-head-row,html[data-theme=light] .transaction-head,html[data-theme=light] .activity-head,html[data-theme=light] .client-table-head,html[data-theme=light] .ali-history-head{background:#e9e6de;color:var(--text-secondary)}
html[data-theme=light] .product-row,html[data-theme=light] .cash-row,html[data-theme=light] .supplier-row,html[data-theme=light] .transaction-row,html[data-theme=light] .client-row,html[data-theme=light] .recent-row{border-color:var(--border-color);color:var(--text-primary)}
html[data-theme=light] .product-row:hover,html[data-theme=light] .supplier-row:hover,html[data-theme=light] .client-row:hover{background:var(--hover-bg)}
html[data-theme=light] input,html[data-theme=light] select,html[data-theme=light] textarea,html[data-theme=light] .search{background:var(--input-bg);color:var(--text-primary);border-color:#c9c5bb}html[data-theme=light] input::placeholder,html[data-theme=light] textarea::placeholder{color:#8a867e}
html[data-theme=light] .btn:not(.save):not(.delete),html[data-theme=light] .page-btn{background:#ebe8df;color:#343431;border-color:#cbc7bd}
html[data-theme=light] dialog:not(.paper-dialog),html[data-theme=light] .settings-drawer{background:var(--panel-bg-elevated);color:var(--text-primary);border-color:var(--border-color);box-shadow:0 20px 60px #3b35282b}
html[data-theme=light] .reset-panel{background:#fbf4f1;border-color:#ddb9b9}html[data-theme=light] .reset-switch{background:#fffdfa;border-color:var(--border-color)}
html[data-theme=light] .pos-view{background:var(--app-bg)}html[data-theme=light] .catalog{background:var(--app-bg);color:var(--text-primary)}html[data-theme=light] .cart{background:var(--panel-bg-elevated);border-color:var(--border-color);color:var(--text-primary)}
html[data-theme=light] .pos-view.active{background:var(--app-bg);color:var(--text-primary)}html[data-theme=light] .pos-catalog{background:var(--app-bg);color:var(--text-primary)}html[data-theme=light] .pos-cart{background:var(--panel-bg-elevated);border-color:var(--border-color);color:var(--text-primary)}html[data-theme=light] .pos-heading h1,html[data-theme=light] .pos-orders-head h2,html[data-theme=light] .pos-cart-head h2,html[data-theme=light] .pos-cart-empty b{color:var(--text-primary)}
html[data-theme=light] .pos-universal-search input,html[data-theme=light] .pos-order-fields select,html[data-theme=light] .pos-order-fields input,html[data-theme=light] .pos-line-controls input{background:var(--input-bg);color:var(--text-primary);border-color:#c9c5bb}html[data-theme=light] .pos-results{background:var(--panel-bg-elevated);border-color:var(--border-color)}html[data-theme=light] .pos-result{background:var(--panel-bg-elevated)!important;color:var(--text-primary)!important;border-color:var(--border-color)!important}html[data-theme=light] .pos-result:hover{background:var(--hover-bg)!important}
html[data-theme=light] .pos-order-fields label,html[data-theme=light] .pos-line-controls>label{color:#55524c!important}
html[data-theme=light] .pos-cart-head,html[data-theme=light] .pos-cart-row{border-color:var(--border-color)}html[data-theme=light] .pos-totals{background:var(--panel-bg);border-color:var(--border-color)}html[data-theme=light] .pos-items-count,html[data-theme=light] .pos-calculated{color:var(--text-secondary)}html[data-theme=light] .pos-calculated b{color:var(--text-primary)}html[data-theme=light] .pos-final input{background:#fffdf8;color:var(--text-primary);border-color:#b98a21}
html[data-theme=light] .cart-head,html[data-theme=light] .cart-row,html[data-theme=light] .total,html[data-theme=light] .pos-order-card,html[data-theme=light] .pos-current-summary{border-color:var(--border-color)}
html[data-theme=light] .result,html[data-theme=light] .pos-order-card{color:var(--text-primary);border-color:var(--border-color)}html[data-theme=light] .result:hover,html[data-theme=light] .result.selected{background:var(--hover-bg)}
html[data-theme=light] .total-line b,html[data-theme=light] .selling{color:var(--text-primary)}
html[data-theme=light] .dashboard-view{background:var(--app-bg)}html[data-theme=light] .calendar-day{background:#fdfcf8;color:var(--text-primary);border-color:var(--border-color)}html[data-theme=light] .calendar-day:hover,html[data-theme=light] .calendar-day.selected{background:#fff7d9}html[data-theme=light] .dash-chart .axis{stroke:#c8c3b8}html[data-theme=light] .dash-chart text{fill:#6e6a62}
html[data-theme=light] .dashboard-title h1,html[data-theme=light] .dash-section-title h2,html[data-theme=light] .dash-chart-panel h2,html[data-theme=light] .dash-recent h2{color:var(--text-primary)}
html[data-theme=light] .month-switch button{color:var(--text-primary);background:#ebe8df;border-color:#cbc7bd}
html[data-theme=light] .cash-source,html[data-theme=light] .cash-note{color:var(--text-secondary)}html[data-theme=light] .cash-received,html[data-theme=light] .income{color:var(--success)}html[data-theme=light] .cash-paid,html[data-theme=light] .paid,html[data-theme=light] .debt{color:var(--danger)}
html[data-theme=light] .meter-family{box-shadow:none}html[data-theme=light] .meter-row{color:#f5f6f6}
html[data-theme=light] #cables .cable-head,html[data-theme=light] #cables .cable-row,html[data-theme=light] #cables .cable-size,html[data-theme=light] #cables .cable-num{color:var(--text-on-dark)}
html[data-theme=light] .meter-family{background:#faf9f5;border-color:#cbc7bd}html[data-theme=light] .meter-table-head{background:#555752}html[data-theme=light] .meter-row{background:#faf9f5;color:#252523;border-color:#d8d4ca}html[data-theme=light] .meter-row:nth-child(odd){background:#f0eee7}html[data-theme=light] .meter-number{color:#252523}html[data-theme=light] .meter-add-product{background:#eeeae1;border-color:#d8d4ca}
html[data-theme=light] .client-card,html[data-theme=light] .client-summary-card,html[data-theme=light] .invoice-card,html[data-theme=light] .purchase-summary article,html[data-theme=light] .profile-summary>div,html[data-theme=light] .global-transactions{background:var(--panel-bg);color:var(--text-primary);border-color:var(--border-color)}
html[data-theme=light] .supplier-row,html[data-theme=light] .transaction-row:not(.transaction-head){color:var(--text-on-dark)}
html[data-theme=light] .supplier-row:hover{background:#222728;color:var(--text-on-dark)}
html[data-theme=light] .transaction-row:not(.transaction-head) small{color:var(--text-on-dark-secondary)}
html[data-theme=light] .clients-panel{color:var(--text-on-dark)}
html[data-theme=light] .clients-panel h2,html[data-theme=light] .client-activity-row{color:var(--text-on-dark)}
html[data-theme=light] .client-row{color:var(--text-on-dark)}
html[data-theme=light] .client-row:hover{background:#202526;color:var(--text-on-dark)}
html[data-theme=light] .client-summary article,html[data-theme=light] .client-profile-summary>div{color:var(--text-on-dark)}
html[data-theme=light] .client-summary article small,html[data-theme=light] .client-profile-summary>div small{color:var(--text-on-dark-secondary)}
html[data-theme=light] .invoice-card .invoice-total b{color:var(--text-primary)}
html[data-theme=light] .invoice-card .invoice-total small,html[data-theme=light] .invoice-card .invoice-paid b,html[data-theme=light] .invoice-card .invoice-remaining b{color:var(--text-secondary)}
html[data-theme=light] .cable-pricing-bar,html[data-theme=light] .supplier-head,html[data-theme=light] .cable-row.focused{color:var(--text-on-dark)}
html[data-theme=light] .cable-pricing-bar small,html[data-theme=light] .supplier-head small,html[data-theme=light] .cable-row.focused small{color:var(--text-on-dark-secondary)}
html[data-theme=light] .ali-view{background:var(--app-bg);color:var(--text-primary)}html[data-theme=light] .ali-history-head,html[data-theme=light] .ali-row{border-color:var(--border-color)}
html[data-theme=light] ::-webkit-scrollbar-track{background:#ebe8df}html[data-theme=light] ::-webkit-scrollbar-thumb{background:#aaa69d}
.dashboard-view,.cart-empty,.pos-cart-empty{position:relative}.settings-drawer{position:fixed;z-index:10001;inset:0 auto 0 0;height:100dvh;max-height:100dvh;overflow-y:auto;overscroll-behavior:contain}.settings-shade{z-index:10000}.dashboard-view:before,.settings-drawer:before,.cart-empty:before,.pos-cart-empty:before{content:'';position:absolute;pointer-events:none;background:url('/assets/lightbulb-outline.svg') center/contain no-repeat;opacity:.055;z-index:0}.dashboard-view:before{right:18px;top:78px;width:150px;height:200px}.settings-drawer:before{right:20px;bottom:22px;width:105px;height:140px}.cart-empty:before,.pos-cart-empty:before{width:90px;height:120px;top:50%;left:50%;transform:translate(-50%,-58%)}.dashboard-view>*,.settings-drawer>*,.cart-empty>*,.pos-cart-empty>*{position:relative;z-index:1}html[data-theme=light] .dashboard-view:before,html[data-theme=light] .settings-drawer:before,html[data-theme=light] .cart-empty:before,html[data-theme=light] .pos-cart-empty:before{opacity:.075}
@media(max-width:620px){.theme-toggle{width:32px;padding:0;justify-content:center}.theme-toggle em{display:none}.topbar{grid-template-columns:34px 32px 112px 48px minmax(0,1fr)!important}.settings-gear{grid-column:1}.theme-toggle{grid-column:2}.brand-home{grid-column:3!important}.pos-home{grid-column:4!important}.pos-home{width:48px;padding:0!important}.nav{grid-column:5!important}.nav button[data-view=dashboard]{height:52px!important;padding-inline:9px!important;font-size:11px}.dashboard-view:before{width:90px;height:120px;right:8px}}
@media(prefers-reduced-motion:reduce){body,.topbar,.view,article,section,dialog,input,select,textarea,button{transition:none!important}}
