/* SCALERP appearance layer. Screen only: printed invoices retain their original palette. */
@media screen {
:root { --sc-bg:#f4f6fb; --sc-surface:#fff; --sc-soft:#eef1f7; --sc-text:#17233b; --sc-muted:#586780; --sc-border:#dce3ee; --sc-accent:#7351d7; color-scheme:light; }
:root[data-theme="dark"] { --sc-bg:#111019; --sc-surface:#1e1a29; --sc-soft:#302a3b; --sc-text:#eee8f6; --sc-muted:#c2b6d3; --sc-border:#44384f; --sc-accent:#c698f5; color-scheme:dark; }
html, body, .content-wrapper, #scrollable-container, main.tw-bg-gray-100 { background-color:var(--sc-bg)!important; color:var(--sc-text); }
.sc-dashboard-surface { background:var(--sc-bg)!important; }
.sc-dashboard-surface h1.text-white { color:var(--sc-text)!important; }
.side-bar { background:var(--sc-surface)!important; border-inline-end:1px solid var(--sc-border); }
.sc-theme-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:9px 12px; border:1px solid var(--sc-border); border-radius:10px; background:var(--sc-surface); color:var(--sc-text); white-space:nowrap; font-weight:600; }
[data-theme-toggle]:focus-visible { outline:3px solid var(--sc-accent); outline-offset:3px; }
#sc-profile-menu [data-theme-toggle] { width:100%; text-align:start; border:0; background:transparent; }
.sc-dashboard-surface .tw-bg-white { border-color:var(--sc-border); box-shadow:0 3px 14px #10204006; }
[data-theme="dark"] :is(.tw-bg-white,.tw-bg-gray-50,.box,.card,.panel,.modal-content,.dropdown-menu,.popover,.daterangepicker,.datepicker,.select2-dropdown,.list-group-item,.well,.pos-header > div) { background-color:var(--sc-surface)!important; color:var(--sc-text); border-color:var(--sc-border)!important; }
[data-theme="dark"] :is(.tw-bg-gray-100,.tw-bg-gray-200,.box-footer,.panel-footer,.modal-header,.modal-footer,.input-group-addon,.select2-selection__choice,.table-striped>tbody>tr:nth-of-type(odd)) { background-color:var(--sc-soft)!important; color:var(--sc-text); }
[data-theme="dark"] :is(.tw-text-gray-900,.tw-text-gray-800,.tw-text-gray-700,.text-black,.box-title,.modal-title,.select2-selection__rendered,.select2-results__option,.dropdown-menu>li>a,.sidebar-menu a) { color:var(--sc-text)!important; }
[data-theme="dark"] :is(.tw-text-gray-600,.tw-text-gray-500,.tw-text-slate-500,.text-muted,.help-block) { color:var(--sc-muted)!important; }
[data-theme="dark"] :is(.tw-border-gray-200,.tw-border-gray-100,.table>thead>tr>th,.table>tbody>tr>td,.table>tfoot>tr>td,.nav-tabs,.nav-tabs>li.active>a,.modal-header,.modal-footer,.box-header.with-border) { border-color:var(--sc-border)!important; }
[data-theme="dark"] :is(.form-control,.select2-selection,.select2-search__field,.dataTables_filter input,.dataTables_length select),
[data-theme="dark"] #sidebar-search { color:var(--sc-text)!important; background-color:var(--sc-bg)!important; border-color:var(--sc-border)!important; }
[data-theme="dark"] :is(.form-control,.select2-search__field,#sidebar-search)::placeholder { color:var(--sc-muted); opacity:1; }
[data-theme="dark"] :is(.form-control[disabled],.form-control[readonly]) { background:var(--sc-soft)!important; }
[data-theme="dark"] :is(.btn-default,.pagination>li>a,.pagination>li>span,.nav-tabs>li.active>a,.daterangepicker .calendar-table,.daterangepicker td.available,.daterangepicker th.available,.popover-title) { background:var(--sc-surface); color:var(--sc-text); border-color:var(--sc-border); }
[data-theme="dark"] :is(.dropdown-menu>li>a:hover,.table-hover>tbody>tr:hover,.nav>li>a:hover,.daterangepicker td.available:hover,.select2-results__option[aria-selected=true]) { background:var(--sc-soft); color:var(--sc-text); }
[data-theme="dark"] .select2-results__option--highlighted[aria-selected] { background:#6746bd!important; color:#fff!important; }
[data-theme="dark"] #sc-profile-menu .sc-profile-clock button { color:var(--sc-muted); }
[data-theme="dark"] #sc-profile-menu :is(a,button):hover { background:var(--sc-soft)!important; color:var(--sc-text)!important; }
[data-theme="dark"] .close { color:var(--sc-text); text-shadow:none; opacity:.8; }
[data-theme="dark"] :is(.highcharts-background,.highcharts-legend-box) { fill:var(--sc-surface); }
[data-theme="dark"] :is(.highcharts-axis-labels text,.highcharts-legend-item text,.highcharts-title,.highcharts-subtitle,.highcharts-axis-title) { fill:var(--sc-muted)!important; color:var(--sc-muted)!important; }
[data-theme="dark"] :is(.highcharts-grid-line,.highcharts-axis-line,.highcharts-tick) { stroke:var(--sc-border); }
[data-theme="dark"] .highcharts-button-box { fill:var(--sc-soft); }
[data-theme="dark"] .highcharts-button-symbol { stroke:var(--sc-text); }
}
@media screen {
[data-theme="dark"] :is(.tw-bg-white,.box,.modal-content) :is(h2,h3,h4,h5,h6) { color:var(--sc-text); }
[data-theme="dark"] :is(.tw-text-slate-600,.tw-text-slate-700,.tw-text-slate-800,.tw-text-slate-900,.pos-card-name) { color:var(--sc-text)!important; }
[data-theme="dark"] :is(.tw-text-slate-400,.tw-text-gray-400) { color:var(--sc-muted)!important; }
[data-theme="dark"] body.lockscreen #pos_table > tbody > tr:nth-child(odd) { background:var(--sc-surface)!important; }
[data-theme="dark"] body.lockscreen #pos_table > tbody > tr:nth-child(even),
[data-theme="dark"] body.lockscreen #pos_table > tbody > tr:hover { background:var(--sc-soft)!important; }
[data-theme="dark"] :is(.pos-form-actions,.pos-drawer-panel,.pos-card,.pos-subcat-pill,.swal-modal,.ui-autocomplete) { background:var(--sc-surface)!important; color:var(--sc-text); border-color:var(--sc-border); }
[data-theme="dark"] :is(.pos-card.is-active,.pos-subcat-strip,.pos-subcat-pill.is-active,.ui-menu-item:hover) { background:var(--sc-soft)!important; color:var(--sc-text); }
[data-theme="dark"] :is(.swal-title,.swal-text,.ui-menu-item) { color:var(--sc-text); }
[data-theme="dark"] body.lockscreen #pos_table .display_currency.pos_line_total_text { color:var(--sc-text); }
}
@media screen {
[data-theme="dark"] #pos_header_more_options { background:var(--sc-surface); }
[data-theme="dark"] #pos_header_more_options > :is(a,button) > strong { color:var(--sc-text); }
}
