/* Qorong'i rejim — faqat html[data-theme="dark"]. Yorug' dizayn o'zgarmaydi. */
html[data-theme="dark"] {
  color-scheme: dark;
  background: #0f172a !important;
  --blue: #3b82f6;
  --blue-d: #60a5fa;
  --line: #334155;
  --line-soft: #1e293b;
  --hdr: #1e293b;
  --hdr-bg: #1e293b;
  --muted: #94a3b8;
  --text: #e2e8f0;
  --sel: #1e3a8a;
  --surface: #1e293b;
  --bg-color: #0f172a;
  --chrome: #1e293b;
  --navy: #020617;
  --navy2: #1e293b;
  --ribbon: #1e293b;
  --side: #0f172a;
  --sel-bd: #3b82f6;
  --btn-hover: #1e3a8a;
  --btn-hover-bd: #3b82f6;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .win {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  color: #e2e8f0 !important;
  background: #0f172a !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  background: #1e293b !important;
  border-color: #3b82f6 !important;
}
html[data-theme="dark"] option { background: #1e293b; color: #e2e8f0; }

html[data-theme="dark"] .fld,
html[data-theme="dark"] .combo,
html[data-theme="dark"] .datebox {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .fld:focus { background: #1e293b !important; }

html[data-theme="dark"] .tbtn,
html[data-theme="dark"] .bigbtn,
html[data-theme="dark"] .dbtn,
html[data-theme="dark"] .dbtn.white,
html[data-theme="dark"] .cal-btn,
html[data-theme="dark"] .calbar-btn {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .calbar-btn:hover {
  background: #334155 !important;
  border-color: #3b82f6 !important;
  color: #fff !important;
}
html[data-theme="dark"] .calbar .datebox:focus-within,
html[data-theme="dark"] .calbar .datebox.open,
html[data-theme="dark"] .datebox:focus-within,
html[data-theme="dark"] .datebox.open {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 1px #3b82f6 !important;
}
html[data-theme="dark"] .datebox .cal-ico,
html[data-theme="dark"] .calbar .datebox .cal-ico {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .datebox input::selection,
html[data-theme="dark"] .calbar .datebox input::selection {
  background: #2563eb !important;
  color: #fff !important;
}
html[data-theme="dark"] .tbtn:hover,
html[data-theme="dark"] .bigbtn:hover,
html[data-theme="dark"] .tb2-btn:hover {
  background: #1e3a8a !important;
  border-color: #3b82f6 !important;
  color: #93c5fd !important;
}
html[data-theme="dark"] .tbtn.primary,
html[data-theme="dark"] .bigbtn.primary,
html[data-theme="dark"] .btn-primary {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #2563eb !important;
}
html[data-theme="dark"] .tb2-btn {
  background: transparent !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .toolbar-wrapper,
html[data-theme="dark"] .toolbar2,
html[data-theme="dark"] .tabs,
html[data-theme="dark"] .statusbar,
html[data-theme="dark"] .kl-bottom,
html[data-theme="dark"] .shell-status,
html[data-theme="dark"] .hs-sub,
html[data-theme="dark"] .radiorow {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}
html[data-theme="dark"] .tab:hover { background: #0f172a !important; color: #e2e8f0 !important; }
html[data-theme="dark"] .tab.active { background: #2563eb !important; color: #fff !important; }

html[data-theme="dark"] .content,
html[data-theme="dark"] .sz-center,
html[data-theme="dark"] .sz-wrap,
html[data-theme="dark"] .sv-content,
html[data-theme="dark"] .sk-content2 {
  background: #0f172a !important;
}
html[data-theme="dark"] .gridpane,
html[data-theme="dark"] .sz-nav,
html[data-theme="dark"] .sz-main,
html[data-theme="dark"] .menudlg,
html[data-theme="dark"] .listwrap,
html[data-theme="dark"] .usr-tbl,
html[data-theme="dark"] .listtable,
html[data-theme="dark"] .region-list,
html[data-theme="dark"] .pass-box,
html[data-theme="dark"] .about-card,
html[data-theme="dark"] .kz-empty {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] table.g,
html[data-theme="dark"] table.grid,
html[data-theme="dark"] .cl-tbl table {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] table.g th,
html[data-theme="dark"] table.grid th,
html[data-theme="dark"] .cl-tbl th {
  background: #0f172a !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] table.g td,
html[data-theme="dark"] table.grid td,
html[data-theme="dark"] .cl-tbl td {
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] table.g tbody tr:hover td,
html[data-theme="dark"] table.grid tbody tr.r:hover td,
html[data-theme="dark"] .products .p:hover {
  background: #0f172a !important;
}
html[data-theme="dark"] .price-inp {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #3b82f6 !important;
}
html[data-theme="dark"] td.price-cell:hover {
  background: #1e3a8a !important;
}
html[data-theme="dark"] table.g tbody tr.grow td {
  background: #1e293b !important;
  color: #93c5fd !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] table.g tbody tr.grouprow td,
html[data-theme="dark"] table.g tbody tr.grouprow.gsel td {
  background: #2a3648 !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .footrow,
html[data-theme="dark"] .totrow,
html[data-theme="dark"] .totrow div {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #93c5fd !important;
}
html[data-theme="dark"] .footrow div { border-color: #334155 !important; }

html[data-theme="dark"] .dlg,
html[data-theme="dark"] .korzinka-win,
html[data-theme="dark"] .custom-calendar {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .dlghdr,
html[data-theme="dark"] .dlg-t,
html[data-theme="dark"] .settingsfoot,
html[data-theme="dark"] .kz-titlebar,
html[data-theme="dark"] .kz-tb2 {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .note,
html[data-theme="dark"] .legend,
html[data-theme="dark"] .confirm-msg {
  background: #0f172a !important;
  color: #94a3b8 !important;
}
html[data-theme="dark"] .overlay { background: rgba(2, 6, 23, .55) !important; }

html[data-theme="dark"] .menucell,
html[data-theme="dark"] .navitem {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .menucell:hover,
html[data-theme="dark"] .navitem:hover { background: #0f172a !important; border-color: #3b82f6 !important; }
html[data-theme="dark"] .navitem.active { background: #2563eb !important; color: #fff !important; }

html[data-theme="dark"] .lbl,
html[data-theme="dark"] .frow label,
html[data-theme="dark"] .kl-chk,
html[data-theme="dark"] .hs-chk { color: #94a3b8 !important; }
html[data-theme="dark"] .chk,
html[data-theme="dark"] .tv-chk { color: #e2e8f0 !important; }
html[data-theme="dark"] .pane-title,
html[data-theme="dark"] .sec-title { color: #e2e8f0 !important; }
html[data-theme="dark"] .pane-sub { color: #94a3b8 !important; }
html[data-theme="dark"] .progress { background: #0f172a !important; border-color: #334155 !important; }
html[data-theme="dark"] .listcount { color: #94a3b8 !important; }
html[data-theme="dark"] .stab { border-color: #334155 !important; }
html[data-theme="dark"] .stab button { color: #94a3b8 !important; }
html[data-theme="dark"] .stab button.active { color: #60a5fa !important; border-color: #3b82f6 !important; }
html[data-theme="dark"] .tsep { background: #334155 !important; }
html[data-theme="dark"] .statusbar .cell { border-color: #334155 !important; }
html[data-theme="dark"] .statusbar b { color: #60a5fa !important; }

/* Index shell */
html[data-theme="dark"] .titlebar {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .ribbon {
  background: #1e293b !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .rib { color: #94a3b8 !important; }
html[data-theme="dark"] .rib:hover { background: #0f172a !important; color: #93c5fd !important; }
html[data-theme="dark"] .rib.active { background: #2563eb !important; color: #fff !important; }
html[data-theme="dark"] .rib.active .i { color: #fff !important; }
html[data-theme="dark"] .sep { border-color: #334155 !important; }
html[data-theme="dark"] .frame-wrap iframe {
  border-color: #334155 !important;
  background: #0f172a !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .wbtn { color: #94a3b8 !important; }
html[data-theme="dark"] .wbtn:hover { background: #334155 !important; color: #e2e8f0 !important; }
html[data-theme="dark"] .wbtn.close:hover { background: #ef4444 !important; color: #fff !important; }

/* Savdo */
html[data-theme="dark"] .searchbar,
html[data-theme="dark"] .wleft,
html[data-theme="dark"] .products,
html[data-theme="dark"] .gridwrap,
html[data-theme="dark"] .izohrow,
html[data-theme="dark"] .clientrow,
html[data-theme="dark"] .rightbar,
html[data-theme="dark"] .cherno,
html[data-theme="dark"] .fbtn,
html[data-theme="dark"] .arrbtn,
html[data-theme="dark"] .rndbtn,
html[data-theme="dark"] .cl-tbl,
html[data-theme="dark"] #dlgClientAdd .dlg {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .workspace { background: #0f172a !important; }
html[data-theme="dark"] .products .p { border-color: #334155 !important; }
html[data-theme="dark"] .products .p .nm,
html[data-theme="dark"] .cl-tbl td.fio { color: #93c5fd !important; }
html[data-theme="dark"] .products .p.sel,
html[data-theme="dark"] .cl-tbl tr.sel td { background: #1e3a8a !important; }
html[data-theme="dark"] .searchbar input,
html[data-theme="dark"] .izohrow input,
html[data-theme="dark"] .clientrow select,
html[data-theme="dark"] .pcwrap input,
html[data-theme="dark"] .frm-row input,
html[data-theme="dark"] .frm-row select,
html[data-theme="dark"] .cl-top input {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .totalbox { background: #1e3a8a !important; border-color: #3b82f6 !important; color: #93c5fd !important; }
html[data-theme="dark"] .totalbox.empty { background: #0f172a !important; border-color: #334155 !important; color: #64748b !important; }
html[data-theme="dark"] .icobtn { background: #1e3a8a !important; border-color: #3b82f6 !important; color: #93c5fd !important; }
html[data-theme="dark"] .burger:hover { background: #0f172a !important; }
html[data-theme="dark"] .burger i { background: #94a3b8 !important; }
html[data-theme="dark"] .fbtn { color: #e2e8f0 !important; }
html[data-theme="dark"] .fbtn .k,
html[data-theme="dark"] .fbtn .ic { color: #94a3b8 !important; }
html[data-theme="dark"] .fbtn:hover:not(:disabled) { background: #0f172a !important; }
html[data-theme="dark"] .fbtn:disabled {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #475569 !important;
}
html[data-theme="dark"] .fbtn:disabled .k,
html[data-theme="dark"] .fbtn:disabled .ic { color: #94a3b8 !important; }
html[data-theme="dark"] .fbtn.save:not(:disabled) { background: #14532d !important; border-color: #166534 !important; color: #86efac !important; }
html[data-theme="dark"] .fbtn.cancel:not(:disabled) { background: #7f1d1d !important; border-color: #991b1b !important; color: #fecaca !important; }
html[data-theme="dark"] .arrbtn { background: #0f172a !important; border-color: #334155 !important; }
html[data-theme="dark"] .paybtn:disabled { background: #475569 !important; color: #f1f5f9 !important; }
html[data-theme="dark"] .noData,
html[data-theme="dark"] .listbox .lb .nd,
html[data-theme="dark"] .ob-empty { color: #94a3b8 !important; }
html[data-theme="dark"] .frm-row label { color: #94a3b8 !important; }
html[data-theme="dark"] .dbtn.green { background: #14532d !important; border-color: #166534 !important; color: #86efac !important; }
html[data-theme="dark"] .dbtn.red { background: #7f1d1d !important; border-color: #991b1b !important; color: #fecaca !important; }
html[data-theme="dark"] .dbtn.yellow { background: #713f12 !important; border-color: #a16207 !important; color: #fde68a !important; }

/* Hisobot / sverka extras */
html[data-theme="dark"] .hs-groupbar { background: #2563eb !important; color: #fff !important; }
html[data-theme="dark"] .datebox:hover { border-color: #3b82f6 !important; }
html[data-theme="dark"] .cal-header,
html[data-theme="dark"] .cal-weekdays,
html[data-theme="dark"] .cal-footer { color: #94a3b8 !important; border-color: #334155 !important; }
html[data-theme="dark"] .cal-day { color: #e2e8f0 !important; }
html[data-theme="dark"] .cal-day:hover { background: #0f172a !important; }
html[data-theme="dark"] .cal-day.other-month { color: #475569 !important; }
html[data-theme="dark"] .cal-day.selected { background: #2563eb !important; color: #fff !important; }
html[data-theme="dark"] td.pink { background: #7f1d1d !important; color: #fecaca !important; }
html[data-theme="dark"] td.blue { background: #1e3a8a !important; color: #93c5fd !important; }
html[data-theme="dark"] td.money { background: #14532d !important; color: #86efac !important; }
html[data-theme="dark"] td.kirim-c,
html[data-theme="dark"] td.kirim-row,
html[data-theme="dark"] td.tannarx { background: #14532d !important; color: #86efac !important; }
html[data-theme="dark"] td.chikim-c { background: #1e3a8a !important; color: #93c5fd !important; }
html[data-theme="dark"] td.minlow { background: #7f1d1d !important; color: #fecaca !important; }
html[data-theme="dark"] table.g tbody tr.yellow,
html[data-theme="dark"] table.g tbody tr.yellow td { background: #713f12 !important; color: #fde68a !important; }
html[data-theme="dark"] .hs-empty td,
html[data-theme="dark"] .kl-empty td,
html[data-theme="dark"] .tv-empty td,
html[data-theme="dark"] .sk-empty-row td { background: #0f172a !important; color: #64748b !important; }
html[data-theme="dark"] .hs-sof-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .hs-sof-card .v { color: #e2e8f0 !important; }
html[data-theme="dark"] .hs-sof-card.main {
  background: #14532d !important;
  border-color: #166534 !important;
}
html[data-theme="dark"] .hs-sof-card.main .v { color: #86efac !important; }
html[data-theme="dark"] .hs-sof-card.main.neg {
  background: #7f1d1d !important;
  border-color: #991b1b !important;
}
html[data-theme="dark"] .hs-sof-card.main.neg .v { color: #fca5a5 !important; }
html[data-theme="dark"] table.g tfoot td { background: #1e293b !important; color: #93c5fd !important; }

html[data-theme="dark"] .tg-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .tg-card h4,
html[data-theme="dark"] .sh-sof-sec { color: #e2e8f0 !important; }
html[data-theme="dark"] .sh-sof-note { color: #94a3b8 !important; }
html[data-theme="dark"] .tg-item:hover { background: #0f172a !important; }
html[data-theme="dark"] .tg-item span { color: #e2e8f0 !important; }
html[data-theme="dark"] .tg-item .meta { color: #94a3b8 !important; }
html[data-theme="dark"] .tg-item .meta.neg { color: #fca5a5 !important; }
html[data-theme="dark"] .tg-preview {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .tg-note {
  background: #172554 !important;
  border-color: #1e40af !important;
  color: #93c5fd !important;
}
html[data-theme="dark"] .sh-sof-card {
  background: #0f172a !important;
  border-color: #334155 !important;
}

/* Tovar / tsennik / klient */
html[data-theme="dark"] .ctxmenu {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .ctxmenu div:hover { background: #1e3a8a !important; }
html[data-theme="dark"] .dropdown { background: #1e293b !important; border-color: #3b82f6 !important; }
html[data-theme="dark"] .dropdown div { border-color: #334155 !important; color: #e2e8f0 !important; }
html[data-theme="dark"] .dropdown div:hover,
html[data-theme="dark"] .dropdown div.on,
html[data-theme="dark"] .dropdown div.sel { background: #1e3a8a !important; color: #fff !important; }

/* Login: yorug'da hozirgi dizayn qoladi; qorong'ida karta ham qorong'i */
html[data-theme="dark"] .pill,
html[data-theme="dark"] .note,
html[data-theme="dark"] .tblwrap {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}
html[data-theme="dark"] .pill .k { color: #94a3b8 !important; }
html[data-theme="dark"] .pill .v { color: #e2e8f0 !important; }
html[data-theme="dark"] .card h2 { color: #e2e8f0 !important; border-color: #334155 !important; }
html[data-theme="dark"] .form h2 { color: #e2e8f0 !important; }
html[data-theme="dark"] .hint { color: #94a3b8 !important; }
html[data-theme="dark"] .form label { color: #94a3b8 !important; }
html[data-theme="dark"] .field { background: #0f172a !important; border-color: #334155 !important; }
html[data-theme="dark"] .field input { background: transparent !important; color: #e2e8f0 !important; }
html[data-theme="dark"] .btn-ghost {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .btn-ghost:hover { background: #334155 !important; }

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .mainpane,
html[data-theme="dark"] .sidebtns,
html[data-theme="dark"] .sidehdr,
html[data-theme="dark"] .sidepane,
html[data-theme="dark"] .gridscroll,
html[data-theme="dark"] .col-chooser,
html[data-theme="dark"] .oralik-menu {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .cat { border-color: #334155 !important; color: #e2e8f0 !important; }
html[data-theme="dark"] .cat:hover { background: #0f172a !important; }
html[data-theme="dark"] .cat.sel { background: #2563eb !important; color: #fff !important; }
html[data-theme="dark"] .sidehdr { color: #94a3b8 !important; }

html[data-theme="dark"] .totrow .sp { background: #1e293b !important; }

html[data-theme="dark"] table {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] table th {
  background: #0f172a !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] table td {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .qarz-scroll,
html[data-theme="dark"] #qarzScroll,
html[data-theme="dark"] #qarzTable {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] #qarzTable th { background: #0f172a !important; color: #94a3b8 !important; border-color: #334155 !important; }
html[data-theme="dark"] #qarzTable th:hover { background: #334155 !important; }
html[data-theme="dark"] #qarzTable td { color: #e2e8f0 !important; border-color: #334155 !important; }
html[data-theme="dark"] .qgroup td { background: #2a3648 !important; color: #e2e8f0 !important; border-color: #334155 !important; }
html[data-theme="dark"] .qgroup:hover td { background: #334155 !important; }
html[data-theme="dark"] .qrow.q-odd td { background: #1e293b !important; }
html[data-theme="dark"] .qrow.q-even td { background: #0f172a !important; }
html[data-theme="dark"] .qrow:hover td { background: #334155 !important; }
html[data-theme="dark"] .qrow.sel td { background: #1e3a8a !important; }
html[data-theme="dark"] .qrow td.q-name { color: #fff !important; font-weight: 650; }
html[data-theme="dark"] #qarzFoot,
html[data-theme="dark"] #qarzFoot div {
  background: #0f172a !important;
  color: #93c5fd !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] #qarzTable .qrow td.qarz-pos { background: #14532d !important; color: #86efac !important; }
html[data-theme="dark"] #qarzTable .qrow td.qarz-neg { background: #1e3a8a !important; color: #93c5fd !important; }
html[data-theme="dark"] #qarzTable .qrow td.date-red { background: #7f1d1d !important; color: #fecaca !important; }
html[data-theme="dark"] #qarzTable .qrow td.date-yellow { background: #713f12 !important; color: #fde68a !important; }
html[data-theme="dark"] #qarzTable .qrow td.date-green { background: #14532d !important; color: #86efac !important; }

html[data-theme="dark"] .context-menu,
html[data-theme="dark"] .col-menu {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .ctx-item:hover,
html[data-theme="dark"] .col-item:hover { background: #1e3a8a !important; }
html[data-theme="dark"] .ctx-sep { background: #334155 !important; }

html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background:#FFF"],
html[data-theme="dark"] [style*="background:#f8fafc"],
html[data-theme="dark"] [style*="background:#f1f5f9"],
html[data-theme="dark"] [style*="background:#eff6ff"],
html[data-theme="dark"] [style*="background:#dbeafe"],
html[data-theme="dark"] [style*="background:#ecfdf3"],
html[data-theme="dark"] [style*="background:#fef9c3"],
html[data-theme="dark"] [style*="background:#fee2e2"],
html[data-theme="dark"] [style*="background:#f4f7f9"] {
  background-color: #1e293b !important;
}
html[data-theme="dark"] [style*="color:#0f172a"],
html[data-theme="dark"] [style*="color: #0f172a"],
html[data-theme="dark"] [style*="color:#000"] {
  color: #e2e8f0 !important;
}

/* Xujjat kirim oynasi */
html[data-theme="dark"] .kirimwin { background: #0f172a !important; }
html[data-theme="dark"] .kirimwin .titlebar,
html[data-theme="dark"] .imeibox,
html[data-theme="dark"] .listbox,
html[data-theme="dark"] .kfoot,
html[data-theme="dark"] .cols,
html[data-theme="dark"] .gridcol,
html[data-theme="dark"] .newprod,
html[data-theme="dark"] .railicons button,
html[data-theme="dark"] .inline-drop,
html[data-theme="dark"] .imeihdr,
html[data-theme="dark"] .cntbox {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .imeilist div { border-color: #334155 !important; color: #e2e8f0 !important; }
html[data-theme="dark"] .imeilist div:hover { background: #0f172a !important; }
html[data-theme="dark"] .imeilist div.sel { background: #1e3a8a !important; }
html[data-theme="dark"] .cntbox { background: #0f172a !important; color: #94a3b8 !important; }
html[data-theme="dark"] .inline-item,
html[data-theme="dark"] .l-item { border-color: #334155 !important; color: #e2e8f0 !important; }
html[data-theme="dark"] .inline-item:hover,
html[data-theme="dark"] .inline-item.on { background: #2563eb !important; color: #fff !important; }
html[data-theme="dark"] .l-item:hover { background: #0f172a !important; }
html[data-theme="dark"] .nom-combo { background: #0f172a !important; border-color: #3b82f6 !important; }
html[data-theme="dark"] .nom-combo .arw { border-color: #334155 !important; }
html[data-theme="dark"] .nom-combo .arw:hover { background: #1e293b !important; }
html[data-theme="dark"] #kirimTable tr.add-row td { background: #1e293b !important; }
html[data-theme="dark"] .kfoot button,
html[data-theme="dark"] .dlgbtns button,
html[data-theme="dark"] .dots,
html[data-theme="dark"] .combo .arw,
html[data-theme="dark"] .exitbtn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .dlgbody,
html[data-theme="dark"] .settingsbody,
html[data-theme="dark"] .settingsfoot {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

/* Kassa / Sverka / Sklad / Oborot */
html[data-theme="dark"] .qoldiq,
html[data-theme="dark"] #kassaScroll,
html[data-theme="dark"] .sv-toolbar,
html[data-theme="dark"] .sv-main,
html[data-theme="dark"] .sv-side,
html[data-theme="dark"] .sv-foot,
html[data-theme="dark"] .sk-main,
html[data-theme="dark"] .sk-side,
html[data-theme="dark"] .sk-minzap,
html[data-theme="dark"] .ob-qoldik {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .sk-minzap:hover { background: #0f172a !important; border-color: #3b82f6 !important; }
html[data-theme="dark"] .listbox .lh,
html[data-theme="dark"] .photo {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}
html[data-theme="dark"] .svbosh { background: #1e293b !important; color: #f87171 !important; }
html[data-theme="dark"] table.g td.focused { background: #0f172a !important; }
html[data-theme="dark"] table.g tbody tr.qgroup td {
  background: #2a3648 !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] table.g tbody tr.qgroup.gsel td {
  background: #2a3648 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] table.g tbody tr.kirim-row td { background: #14532d !important; }
html[data-theme="dark"] table.g tbody tr.kirim-row.gsel td { background: #1e3a8a !important; }

/* Tsennik */
html[data-theme="dark"] .ts-body { background: #0f172a !important; }
html[data-theme="dark"] .ts-rail,
html[data-theme="dark"] .ts-card,
html[data-theme="dark"] .ts-scroll,
html[data-theme="dark"] .imei-detail {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .imei-detail { background: #0f172a !important; }
html[data-theme="dark"] .det-grid b { color: #e2e8f0 !important; }
html[data-theme="dark"] .det-grid span { color: #94a3b8 !important; }
html[data-theme="dark"] .pay-naqd { background: #14532d !important; color: #86efac !important; }
html[data-theme="dark"] .pay-term { background: #1e3a8a !important; color: #93c5fd !important; }
html[data-theme="dark"] .pay-bank { background: #4c1d95 !important; color: #ddd6fe !important; }
html[data-theme="dark"] .pay-click { background: #7c2d12 !important; color: #fdba74 !important; }
html[data-theme="dark"] .pay-none { background: #334155 !important; color: #cbd5e1 !important; }

/* Savdo dialog / numpad / draft */
html[data-theme="dark"] .draftpop,
html[data-theme="dark"] .numpad button,
html[data-theme="dark"] #dlgPay .dlg,
html[data-theme="dark"] .inv-fields input,
html[data-theme="dark"] .ca-actions button {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .numpad button:hover { background: #0f172a !important; }
html[data-theme="dark"] .imrow { border-color: #334155 !important; }
html[data-theme="dark"] .okbtn { background: #1e3a8a !important; border-color: #3b82f6 !important; color: #93c5fd !important; }
html[data-theme="dark"] .oralik-item { color: #e2e8f0 !important; }
html[data-theme="dark"] .oralik-item:hover { background: #0f172a !important; }
html[data-theme="dark"] .tick.empty { color: #475569 !important; }

html[data-theme="dark"] .sh-scroll,
html[data-theme="dark"] .gbody { background: #1e293b !important; }

html[data-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #475569; border-radius: 8px; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: #0f172a; }

/* Toast: tungi rejimda --text och rangga aylanadi, oq matn yo‘qolmasin */
html[data-theme="dark"] .toast {
  background: #020617 !important;
  color: #f8fafc !important;
  border: 1px solid #334155;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] .toast.tg {
  background: #0f766e !important;
  color: #f0fdfa !important;
  border-color: #134e4a;
}

/* Semantik ranglar — jadval td !important ularni yuvib yubormasin */
html[data-theme="dark"] .status-badge { color: #fff !important; }
html[data-theme="dark"] .status-badge.status-green { background: #16a34a !important; }
html[data-theme="dark"] .status-badge.status-yellow { background: #d97706 !important; }
html[data-theme="dark"] .status-badge.status-red { background: #dc2626 !important; }

html[data-theme="dark"] .mod-badge { color: #fff !important; }
html[data-theme="dark"] .mod-savdo { background: #2563eb !important; }
html[data-theme="dark"] .mod-xujjat { background: #7c3aed !important; }
html[data-theme="dark"] .mod-kassa { background: #16a34a !important; }
html[data-theme="dark"] .mod-tovar { background: #ea580c !important; }
html[data-theme="dark"] .mod-narx { background: #d97706 !important; }
html[data-theme="dark"] .mod-other { background: #64748b !important; }
html[data-theme="dark"] .act-create { color: #4ade80 !important; }
html[data-theme="dark"] .act-update { color: #38bdf8 !important; }
html[data-theme="dark"] .act-delete { color: #f87171 !important; }
html[data-theme="dark"] .act-other { color: #cbd5e1 !important; }
html[data-theme="dark"] .log-empty { color: #64748b !important; background: transparent !important; }

html[data-theme="dark"] .balpos,
html[data-theme="dark"] td.balpos,
html[data-theme="dark"] .footrow .balpos,
html[data-theme="dark"] .totrow .balpos { color: #86efac !important; }
html[data-theme="dark"] .balneg,
html[data-theme="dark"] td.balneg,
html[data-theme="dark"] .footrow .balneg,
html[data-theme="dark"] .totrow .balneg { color: #fca5a5 !important; }

html[data-theme="dark"] .pill-on { background: #14532d !important; color: #86efac !important; }
html[data-theme="dark"] .pill-off { background: #334155 !important; color: #94a3b8 !important; }
html[data-theme="dark"] .pill.ok .v { color: #86efac !important; }
html[data-theme="dark"] .pill.warn .v,
html[data-theme="dark"] .pill.expired .v { color: #fca5a5 !important; }

html[data-theme="dark"] td.marker,
html[data-theme="dark"] .marker { color: #60a5fa !important; }
html[data-theme="dark"] .qoldiq { color: #94a3b8 !important; }
html[data-theme="dark"] .qoldiq b { color: #e2e8f0 !important; }
html[data-theme="dark"] table.g tr.sel td.money { background: #166534 !important; color: #86efac !important; }

html[data-theme="dark"] [style*="color:#dc2626"],
html[data-theme="dark"] [style*="color: #dc2626"],
html[data-theme="dark"] [style*="color:#b91c1c"] { color: #fca5a5 !important; }
html[data-theme="dark"] [style*="color:#15803d"],
html[data-theme="dark"] [style*="color:#16a34a"] { color: #86efac !important; }
html[data-theme="dark"] [style*="color:#2563eb"],
html[data-theme="dark"] [style*="color:var(--blue)"] { color: #93c5fd !important; }

html[data-theme="dark"] [style*="background:#2563eb"],
html[data-theme="dark"] [style*="background: #2563eb"] {
  background-color: #2563eb !important;
  color: #fff !important;
}

html[data-theme="dark"] .cl-chip {
  background: #0f172a !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .cl-chip .k { color: #94a3b8 !important; }
html[data-theme="dark"] .cl-chip .v { color: #e2e8f0 !important; }
html[data-theme="dark"] .cl-chip.st-green { background: #14532d !important; border-color: #166534 !important; }
html[data-theme="dark"] .cl-chip.st-green .v { color: #86efac !important; }
html[data-theme="dark"] .cl-chip.st-yellow { background: #422006 !important; border-color: #a16207 !important; }
html[data-theme="dark"] .cl-chip.st-yellow .v { color: #fde047 !important; }
html[data-theme="dark"] .cl-chip.st-red { background: #450a0a !important; border-color: #b91c1c !important; }
html[data-theme="dark"] .cl-chip.st-red .v { color: #fca5a5 !important; }
html[data-theme="dark"] .cl-chip.debt .v { color: #fca5a5 !important; }
html[data-theme="dark"] .svbtn {
  background: #1e3a8a !important;
  border-color: #3b82f6 !important;
  color: #93c5fd !important;
}
html[data-theme="dark"] .svbtn:hover {
  background: #1d4ed8 !important;
  color: #fff !important;
}
