/* ==========================================================================
   OmadSavdo — tungi rejim (html[data-theme="dark"])
   ========================================================================== */

/* Tugma */
.osc-theme { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--ink, #1C1530); cursor: pointer; transition: background .2s, color .2s; }
.osc-theme:hover { background: var(--primary-50, #F5F3FF); color: var(--primary, #5B21B6); }
.osc-theme svg { grid-area: 1 / 1; transition: transform .35s, opacity .25s; }
.osc-theme__sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
html[data-theme="dark"] .osc-theme__moon { opacity: 0; transform: rotate(90deg) scale(.6); }
html[data-theme="dark"] .osc-theme__sun { opacity: 1; transform: none; }
html.osc-theme-anim, html.osc-theme-anim *, html.osc-theme-anim *::before, html.osc-theme-anim *::after { transition: background-color .3s, border-color .3s, color .2s, fill .3s !important; }

/* Ranglar */
html[data-theme="dark"] {
	color-scheme: dark;
	--surface: #1E2635;
	--surface-2: #252F41;
	--primary: #A78BFA;
	--primary-600: #8B5CF6;
	--primary-500: #8B5CF6;
	--primary-100: #303A5A;
	--primary-50: #283149;
	--green-50: #16302B;
	--ink: #E7EAF1;
	--ink-2: #C2C9D6;
	--muted: #8D97AA;
	--tx-muted: #8D97AA;
	--line: #2D3749;
	--bg: #141B28;
	--white: #1E2635;
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
	--shadow: 0 6px 24px -8px rgba(0, 0, 0, .55);
	--shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
	/* sotuvchi paneli */
	--osv-p: #8B5CF6; --osv-p2: #A78BFA; --osv-p50: #283149; --osv-ink: #E7EAF1; --osv-ink2: #C2C9D6;
	--osv-muted: #8D97AA; --osv-line: #2D3749; --osv-bg: #141B28;
	/* Dokan yon menyu */
	--dokan-sidebar-background-color: #18202E; --dokan-sidebar-hover-background-color: #283149; --dokan-sidebar-text-color: #C2C9D6; --dokan-sidebar-hover-text-color: #fff;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }

/* Formalar */
html[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=submit]):not([type=button]),
html[data-theme="dark"] select, html[data-theme="dark"] textarea {
	background-color: var(--surface-2) !important; color: var(--ink) !important; border-color: var(--line) !important;
}
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #7D7695 !important; }
html[data-theme="dark"] .osc-tel { background: var(--surface-2); border-color: var(--line); }
html[data-theme="dark"] .osc-tel__cc { background: #2A3446; border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .osc-tel input.input-text { background: transparent !important; }

/* Rasmlar biroz yumshoqroq */
html[data-theme="dark"] img:not(.osc-flag) { filter: brightness(.94); }

/* Och pastel bloklar — to‘q variant */
html[data-theme="dark"] [style*="#FFF4DE"], html[data-theme="dark"] [style*="#FFEBD6"], html[data-theme="dark"] [style*="#E0ECFF"] { filter: brightness(.35) saturate(1.4); }

/* WooCommerce xabarlari */
html[data-theme="dark"] .woocommerce-message, html[data-theme="dark"] .woocommerce-info { background: #13261B !important; color: #BBF7D0 !important; border-color: #166534 !important; }
html[data-theme="dark"] .woocommerce-error { background: #2A1119 !important; color: #FECDD3 !important; border-color: #9F1239 !important; }
html[data-theme="dark"] .woocommerce-error a, html[data-theme="dark"] .woocommerce-message a { color: #fff !important; }
html[data-theme="dark"] table, html[data-theme="dark"] th, html[data-theme="dark"] td { border-color: var(--line); }

/* Ko‘rinmay qolgan matnlar */
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] h4 { color: var(--ink); }
html[data-theme="dark"] hr { border-color: var(--line); }
html[data-theme="dark"] ::selection { background: #5B21B6; color: #fff; }
html[data-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--bg); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3A4559; border-radius: 10px; border: 2px solid var(--bg); }

/* To‘q bloklar (yuqori chiziq, footer, toast) — tunda yanada to‘qroq */
html[data-theme="dark"] { --dark-bg: #101722; }
html[data-theme="dark"] .site-footer, html[data-theme="dark"] .topbar { border-top: 1px solid var(--line); }

/* Promo kartochkalar */
html[data-theme="dark"] .promo--peach { background: linear-gradient(135deg, #3B2415, #5C3517); }
html[data-theme="dark"] .promo--sky { background: linear-gradient(135deg, #142340, #1D3763); }
html[data-theme="dark"] .promo, html[data-theme="dark"] .promo:hover { color: var(--ink); }

/* ---------- Sotuvchi paneli (Dokan React + WooCommerce Admin komponentlari) ---------- */
html[data-theme="dark"] .bg-white, html[data-theme="dark"] .\!bg-white { background-color: var(--surface) !important; }
html[data-theme="dark"] .bg-gray-50, html[data-theme="dark"] .bg-gray-100, html[data-theme="dark"] .bg-\[\#F8F9F8\], html[data-theme="dark"] .bg-\[\#f8f9f8\] { background-color: var(--surface-2) !important; }
html[data-theme="dark"] .border-gray-200, html[data-theme="dark"] .border-gray-100, html[data-theme="dark"] .border-gray-300, html[data-theme="dark"] .border-\[\#E9E9E9\], html[data-theme="dark"] .divide-gray-200 > * { border-color: var(--line) !important; }
html[data-theme="dark"] .text-gray-900, html[data-theme="dark"] .text-gray-800, html[data-theme="dark"] .text-gray-700, html[data-theme="dark"] .text-black, html[data-theme="dark"] .text-\[\#25252D\], html[data-theme="dark"] .text-\[\#575757\] { color: var(--ink) !important; }
html[data-theme="dark"] .text-gray-600, html[data-theme="dark"] .text-gray-500, html[data-theme="dark"] .text-\[\#828282\] { color: var(--tx-muted) !important; }
html[data-theme="dark"] hr.h-\[1px\] { background: var(--line) !important; }
html[data-theme="dark"] .dokan-layout header, html[data-theme="dark"] .dokan-frontend-layout-header { background: var(--surface) !important; border-color: var(--line) !important; }
html[data-theme="dark"] .dokan-layout main { background: var(--bg) !important; }
html[data-theme="dark"] .osc-dhead__guide, html[data-theme="dark"] a.visit-store { color: var(--ink) !important; }
html[data-theme="dark"] .osc-lang--dash { background: var(--surface-2) !important; }
html[data-theme="dark"] .osc-theme--dash { color: var(--ink); }

html[data-theme="dark"] .woocommerce-layout__header, html[data-theme="dark"] .woocommerce-summary, html[data-theme="dark"] .woocommerce-summary__item,
html[data-theme="dark"] .woocommerce-summary__item-delta, html[data-theme="dark"] .components-card, html[data-theme="dark"] .components-surface,
html[data-theme="dark"] .woocommerce-chart, html[data-theme="dark"] .woocommerce-chart__header, html[data-theme="dark"] .woocommerce-chart__body,
html[data-theme="dark"] .d3-chart__tooltip, html[data-theme="dark"] .components-input-control__container, html[data-theme="dark"] .woocommerce-dropdown-button,
html[data-theme="dark"] .components-popover__content, html[data-theme="dark"] .woocommerce-table, html[data-theme="dark"] .woocommerce-table__table,
html[data-theme="dark"] .components-card__header, html[data-theme="dark"] .components-card__body, html[data-theme="dark"] .components-card__footer {
	background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; box-shadow: none !important;
}
html[data-theme="dark"] .woocommerce-summary__item:hover, html[data-theme="dark"] .woocommerce-summary__item.is-selected { background: var(--surface-2) !important; }
html[data-theme="dark"] .woocommerce-summary__item.is-selected::before { background: var(--primary-600) !important; }
html[data-theme="dark"] .components-text, html[data-theme="dark"] .components-truncate, html[data-theme="dark"] .woocommerce-layout__header-heading,
html[data-theme="dark"] .woocommerce-summary__item-label, html[data-theme="dark"] .woocommerce-summary__item-value, html[data-theme="dark"] .woocommerce-dropdown-button__labels,
html[data-theme="dark"] .woocommerce-chart__title, html[data-theme="dark"] .woocommerce-legend__item, html[data-theme="dark"] .woocommerce-section-header__title { color: var(--ink) !important; }
html[data-theme="dark"] .woocommerce-chart .tick text, html[data-theme="dark"] .d3-chart__container text { fill: var(--tx-muted) !important; }
html[data-theme="dark"] .d3-chart__container .grid line, html[data-theme="dark"] .d3-chart__container .domain { stroke: var(--line) !important; }
html[data-theme="dark"] .components-button:not(.is-primary) { color: var(--ink); }
html[data-theme="dark"] .woocommerce-section-header::after, html[data-theme="dark"] .woocommerce-section-header hr { background: var(--line) !important; }

/* Chat, sharhlar, mahsulot ustasi — o‘z o‘zgaruvchilari */
html[data-theme="dark"] .oscc, html[data-theme="dark"] .oscc-modal, html[data-theme="dark"] .oscc-ask, html[data-theme="dark"] .osr, html[data-theme="dark"] .wz {
	--p: #8B5CF6; --p2: #A78BFA; --p50: #283149; --p100: #303A5A; --ink: #E7EAF1; --ink2: #C2C9D6; --mut: #8D97AA; --line: #2D3749; --bg: #141B28;
}
html[data-theme="dark"] .wz-foot { background: rgba(30,38,53,.94) !important; }
html[data-theme="dark"] .oscc-side { background: var(--surface-2) !important; }
html[data-theme="dark"] .oscc-msgs { background: var(--bg) !important; }
html[data-theme="dark"] .oscc-ctx { background: var(--surface-2) !important; }
html[data-theme="dark"] .freeship { color: #BBF7D0; }
html[data-theme="dark"] .freeship__bar { background: #1F3D2B; }
html[data-theme="dark"] .os-sell__steps b, html[data-theme="dark"] #dokan-seller-listing-wrap .store-content .store-data h2 a { color: var(--ink) !important; }
html[data-theme="dark"] .osc-fx-note { background: var(--primary-50); border-color: var(--primary-100); color: var(--ink-2); }

/* WordPress DataViews (mahsulotlar, buyurtmalar ro‘yxati) */
html[data-theme="dark"] .dataviews-wrapper, html[data-theme="dark"] .dataviews-layout__container, html[data-theme="dark"] .dataviews-view-table,
html[data-theme="dark"] .dataviews-view-table tr, html[data-theme="dark"] .dataviews-view-table td, html[data-theme="dark"] .dataviews-view-table th,
html[data-theme="dark"] .dataviews__view-actions, html[data-theme="dark"] .dataviews-filters__container, html[data-theme="dark"] .dataviews-footer,
html[data-theme="dark"] .dataviews-bulk-actions-footer__container, html[data-theme="dark"] .dataviews-pagination {
	background-color: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important;
}
html[data-theme="dark"] .dataviews-view-table thead th { background-color: var(--surface-2) !important; color: var(--tx-muted) !important; }
html[data-theme="dark"] .dataviews-view-table tr:hover td, html[data-theme="dark"] .dataviews-view-table tr.is-selected td { background-color: var(--surface-2) !important; }
html[data-theme="dark"] .dataviews-view-table a, html[data-theme="dark"] .dataviews-title-field a, html[data-theme="dark"] .text-dokan-link { color: var(--ink) !important; }
html[data-theme="dark"] .dataviews-view-table a:hover, html[data-theme="dark"] .text-dokan-link:hover { color: #B9A4FF !important; }
html[data-theme="dark"] .dataviews-view-table td, html[data-theme="dark"] .dataviews-title-field { color: var(--ink-2) !important; }
html[data-theme="dark"] .animate-pulse > *, html[data-theme="dark"] .bg-gray-200 { background-color: var(--surface-2) !important; }
html[data-theme="dark"] .components-checkbox-control__input { background: var(--surface-2) !important; border-color: #4A556B !important; }
html[data-theme="dark"] .dokan-layout .border-b, html[data-theme="dark"] .dokan-layout .border-t { border-color: var(--line) !important; }
html[data-theme="dark"] .pui-root-dataviews, html[data-theme="dark"] .pui-root-dataviews thead, html[data-theme="dark"] .pui-root-dataviews th { background-color: var(--surface) !important; border-color: var(--line) !important; }
html[data-theme="dark"] .pui-root-dataviews thead th { background-color: var(--surface-2) !important; color: var(--tx-muted) !important; }
html[data-theme="dark"] .pui-root-dataviews [role="tab"], html[data-theme="dark"] .pui-root-dataviews [role="tablist"] button, html[data-theme="dark"] .pui-root-dataviews .components-button { background-color: transparent !important; box-shadow: none !important; color: var(--ink-2) !important; }
html[data-theme="dark"] .pui-root-dataviews [role="tab"][aria-selected="true"], html[data-theme="dark"] .pui-root-dataviews [role="tab"].is-active { color: #B9A4FF !important; box-shadow: inset 0 -2px 0 #8B5CF6 !important; }
html[data-theme="dark"] .dataviews-view-table__actions-column, html[data-theme="dark"] .dataviews-view-table__checkbox-column { background-color: var(--surface) !important; }
html[data-theme="dark"] .dokan-badge-success, html[data-theme="dark"] .bg-green-200 { background: rgba(22,163,74,.2) !important; color: #4ADE80 !important; }
html[data-theme="dark"] .bg-red-200 { background: rgba(225,29,72,.2) !important; color: #FB7185 !important; }
html[data-theme="dark"] .bg-yellow-200, html[data-theme="dark"] .bg-orange-200 { background: rgba(245,158,11,.2) !important; color: #FCD34D !important; }
html[data-theme="dark"] .bg-blue-200, html[data-theme="dark"] .bg-gray-200.rounded-full { background: rgba(96,165,250,.18) !important; color: #93C5FD !important; }

/* Dokan (shadcn) komponent o‘zgaruvchilari — faqat ularning ichida */
html[data-theme="dark"] [class*="pui-root"], html[data-theme="dark"] [data-radix-popper-content-wrapper] {
	--background: #1E2635; --foreground: #E7EAF1; --muted: #252F41; --muted-foreground: #8D97AA;
	--border: #2D3749; --input: #34405A; --accent: #283149; --accent-foreground: #E7EAF1;
	--secondary: #252F41; --secondary-foreground: #E7EAF1; --popover: #1E2635; --popover-foreground: #E7EAF1;
	--card: #1E2635; --card-foreground: #E7EAF1;
}

/* Dokan eski sahifalari (buyurtmalar, pul yechish, sozlamalar) */
html[data-theme="dark"] .dokan-alert, html[data-theme="dark"] .dokan-alert-danger, html[data-theme="dark"] .dokan-alert-warning, html[data-theme="dark"] .dokan-alert-info,
html[data-theme="dark"] .dokan-alert-success, html[data-theme="dark"] .dokan-panel, html[data-theme="dark"] .dokan-panel-body, html[data-theme="dark"] .dokan-panel-heading,
html[data-theme="dark"] .dokan-table, html[data-theme="dark"] .dokan-table td, html[data-theme="dark"] .dokan-table th, html[data-theme="dark"] .dokan-table tr,
html[data-theme="dark"] .dokan-dashboard-content article, html[data-theme="dark"] .dokan-settings-content, html[data-theme="dark"] .dokan-form-group .dokan-w5 {
	background-color: var(--surface) !important; color: var(--ink-2) !important; border-color: var(--line) !important;
}
html[data-theme="dark"] .dokan-alert-danger { border-top-color: #E11D48 !important; }
html[data-theme="dark"] .dokan-alert strong, html[data-theme="dark"] .dokan-alert p, html[data-theme="dark"] .dokan-alert span { color: var(--ink-2) !important; }
html[data-theme="dark"] .dokan-btn:not(.dokan-btn-theme):not(.dokan-btn-success):not(.dokan-btn-danger), html[data-theme="dark"] .dokan-btn-default,
html[data-theme="dark"] .select2-container--default .select2-selection--single, html[data-theme="dark"] .select2-dropdown, html[data-theme="dark"] .select2-search__field {
	background: var(--surface-2) !important; color: var(--ink) !important; border-color: var(--line) !important;
}
html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--ink) !important; }
html[data-theme="dark"] .select2-results__option { color: var(--ink-2); }
html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] { background: #8B5CF6; color: #fff; }
html[data-theme="dark"] .dokan-order-filter-serach, html[data-theme="dark"] ul.subsubsub li, html[data-theme="dark"] ul.subsubsub li a,
html[data-theme="dark"] ul.order-statuses-filter li a, html[data-theme="dark"] .dokan-dashboard-content ul li a { color: var(--ink-2); }
html[data-theme="dark"] ul.order-statuses-filter li.active a, html[data-theme="dark"] ul.subsubsub li a.current { color: #B9A4FF !important; }
html[data-theme="dark"] .dokan-dashboard-content label, html[data-theme="dark"] .dokan-control-label { color: var(--ink-2); }
html[data-theme="dark"] #wpadminbar .ab-item { background-color: transparent; }
html[data-theme="dark"] .dokan-error, html[data-theme="dark"] .dokan-message, html[data-theme="dark"] .dokan-info { background: var(--surface) !important; color: var(--ink-2) !important; border-color: var(--line) !important; }
html[data-theme="dark"] .dokan-error { border-top-color: #E11D48 !important; }
html[data-theme="dark"] .dokan-message { border-top-color: #16A34A !important; }
