* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #0097b2;
    --primary-dark: #007a91;
    --primary-light: #4ab3cc;
    --secondary: #7ed957;
    --secondary-dark: #5fb344;
    --secondary-light: #a8e68a;
    --bg: #f8fafc;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border: #e2e8f0;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --gray: #94a3b8;
    --sidebar-width: 70px;
    /* Header / asosiy zona — tema bo‘yicha; yon navigatsiya alohida, doim «tungi rail» */
    --surface-header: #ffffff;
    --rail-accent: rgba(255, 255, 255, 0.12);
}

body {
    display: flex;
    height: 100vh;
    background: var(--bg);
    color: var(--text-dark);
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: var(--sidebar-width);
    /* Doim bir xil: tungi rejimga yaqin chalkash teal-gradient (asosiy kontentdan ajraluvchi rail) */
    background: linear-gradient(175deg, #050a14 0%, #062328 42%, #0a2c36 74%, #060f18 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.22);
    position: relative;
    z-index: 100;
    transition: width 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.sidebar.expanded {
    /* Kenglik JS da --sidebar-open-width: eng uzun yozuv + ikon oralig‘i */
    width: var(--sidebar-open-width, 260px);
    align-items: stretch;
    padding-left: 10px;
    padding-right: 10px;
}

@keyframes coinFlip10s {
    0% { transform: perspective(400px) rotateY(0deg); }
    15% { transform: perspective(400px) rotateY(360deg); }
    100% { transform: perspective(400px) rotateY(360deg); }
}

.sidebar .logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 18px;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: all 0.3s;
    flex-direction: row;
}

.sidebar.expanded .logo {
    width: 100%;
    align-self: stretch;
    justify-content: flex-start;
    padding: 8px 12px;
}

.sidebar .logo:hover {
    background: transparent !important;
}

.sidebar .logo i {
    font-size: 24px;
    color: var(--primary-light);
    min-width: 24px;
    order: 1;
    display: inline-block;
    animation: coinFlip10s 10s infinite ease-in-out;
}

.sidebar .logo img, #sidebarLogoIcon {
    width: 32px;
    height: 32px;
    border-radius: 0 !important;
    object-fit: contain;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    order: 1;
    display: inline-block;
    animation: coinFlip10s 10s infinite ease-in-out;
}

.sidebar .sidebar-logo-text-wrap {
    display: none;
    order: 2;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    align-items: center;
}

.sidebar.expanded .logo.logo-has-label .sidebar-logo-text-wrap {
    display: flex;
}

.sidebar .logo #sidebarLogoText {
    display: block;
    width: max-content;
    max-width: 100%;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #0097b2, #7ed957);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.sidebar .logo #sidebarLogoText.sidebar-logo-text--marquee {
    display: inline-block;
    animation: sidebarLogoMarqueeSlide var(--logo-marquee-dur, 8s) ease-in-out infinite;
}

@keyframes sidebarLogoMarqueeSlide {
    0%, 10% {
        transform: translateX(0);
    }
    45%, 55% {
        transform: translateX(var(--logo-marquee-shift, 0px));
    }
    90%, 100% {
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar .logo #sidebarLogoText.sidebar-logo-text--marquee {
        animation: none;
    }
}

.sidebar-divider {
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 12px 0;
    transition: width 0.3s;
}

.sidebar.expanded .sidebar-divider {
    width: 100%;
    align-self: stretch;
}

.sidebar .nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 46px;
    height: 46px;
    margin: 2px 0;
    padding: 0;
    border-radius: 12px;
    color: var(--primary-light);
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar.expanded .nav-item {
    justify-content: flex-start;
    width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
}

.sidebar .nav-item i {
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
    transition: all 0.2s;
}

.sidebar .nav-text {
    display: none;
    font-size: 14px;
    font-weight: 500;
    color: rgba(229, 240, 242, 0.95);
    transition: all 0.2s;
}

.sidebar.expanded .nav-text {
    display: block;
    white-space: nowrap;
}

.sidebar .settings-nav-item {
    margin-top: auto;
}

.sidebar .nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--secondary-light);
}

.sidebar .nav-item:hover .nav-text {
    color: var(--secondary-light);
}

.sidebar .nav-item.active {
    background: var(--rail-accent);
    color: var(--secondary);
}

.sidebar .nav-item.active .nav-text {
    color: var(--secondary);
}

/* Tooltip — yiqilgan sidebar; fon har mavzuda o‘zgarmasa ham tooltip mos */
.sidebar .nav-item::after {
    content: attr(data-title);
    position: absolute;
    left: 60px;
    background: rgba(14, 20, 32, 0.96);
    color: #f1f5f9;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.sidebar:not(.expanded) .nav-item:hover::after {
    opacity: 1;
    visibility: visible;
}

.sidebar.expanded .nav-item::after {
    display: none;
}

.sidebar .nav-item::before {
    content: '';
    position: absolute;
    left: 55px;
    border: 5px solid transparent;
    border-right-color: rgba(14, 20, 32, 0.96);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
}

.sidebar:not(.expanded) .nav-item:hover::before {
    opacity: 1;
    visibility: visible;
}

.sidebar.expanded .nav-item::before {
    display: none;
}

/* ==================== MAIN CONTENT ==================== */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

/* Header */
.header {
    background: var(--surface-header);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.page-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* ==================== STATS CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,151,178,0.1);
}

.stat-title {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Ta'minotchilar sahifasi — 5 ta rangli KPI, bir qator, sahifa kengligi bo‘yicha */
.stats-grid.stats-grid--suppliers-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(4px, 0.9vw, 10px);
    margin-bottom: 14px;
    width: 100%;
}

.stats-grid.stats-grid--suppliers-kpis .stat-card.stat-card--sup-kpi {
    min-width: 0;
    padding: 7px 8px;
    border-radius: 8px;
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stats-grid.stats-grid--suppliers-kpis .stat-card.stat-card--sup-kpi:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 151, 178, 0.12);
}

.stats-grid.stats-grid--suppliers-kpis .stat-title {
    font-size: clamp(0.55rem, 0.65vw + 0.42rem, 0.68rem);
    line-height: 1.25;
    margin-bottom: 3px;
    letter-spacing: 0.04em;
    font-weight: 600;
    text-transform: uppercase;
}

.stats-grid.stats-grid--suppliers-kpis .stat-number {
    font-size: clamp(0.72rem, 0.95vw + 0.45rem, 0.98rem);
    line-height: 1.2;
    font-weight: 700;
    word-break: break-word;
    font-variant-numeric: tabular-nums;
}

/* Ranglar */
.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-balance {
    background: linear-gradient(145deg, #e0f7fa 0%, #b2ebf2 45%, #80deea 100%);
    border-color: rgba(0, 151, 178, 0.45);
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-balance .stat-title {
    color: #006064;
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-balance .stat-number {
    color: #004d5c;
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-income {
    background: linear-gradient(145deg, #ecfdf5 0%, #a7f3d0 50%, #6ee7b7 100%);
    border-color: rgba(5, 150, 105, 0.4);
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-income .stat-title {
    color: #065f46;
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-income .stat-number {
    color: #047857;
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-sold {
    background: linear-gradient(145deg, #eff6ff 0%, #bfdbfe 50%, #93c5fd 100%);
    border-color: rgba(37, 99, 235, 0.38);
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-sold .stat-title {
    color: #1e40af;
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-sold .stat-number {
    color: #1d4ed8;
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-diff {
    background: linear-gradient(145deg, #fffbeb 0%, #fde68a 48%, #fcd34d 100%);
    border-color: rgba(217, 119, 6, 0.42);
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-diff .stat-title {
    color: #92400e;
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-diff .stat-number {
    color: #b45309;
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-debt {
    background: linear-gradient(145deg, #fff1f2 0%, #fecdd3 50%, #fda4af 100%);
    border-color: rgba(225, 29, 72, 0.38);
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-debt .stat-title {
    color: #9f1239;
}

.stats-grid.stats-grid--suppliers-kpis .stat-card--sup-debt .stat-number {
    color: #be123c;
}

/* Mahsulotlar sahifasi — ixcham rangli KPI kartalar */
.stats-grid.stats-grid--products-kpis {
    gap: 8px;
    margin-bottom: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .stats-grid.stats-grid--products-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.stat-card.stat-card--kpi {
    padding: 8px 10px;
    border-radius: 8px;
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
}

.stat-card.stat-card--kpi:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 151, 178, 0.12);
}

.stat-card.stat-card--kpi .stat-title {
    font-size: 0.65rem;
    margin-bottom: 2px;
    letter-spacing: 0.045em;
    font-weight: 600;
}

.stat-card.stat-card--kpi .stat-number {
    font-size: 1.1rem;
    line-height: 1.25;
}

.stat-card.stat-card--kpi-total {
    background: linear-gradient(148deg, #e7f9fc 0%, #d7f3f9 55%, #cff0f6 100%);
    border-color: rgba(0, 151, 178, 0.35);
}

.stat-card.stat-card--kpi-total .stat-number {
    color: #007a91;
}

.stat-card.stat-card--kpi-total .stat-title {
    color: #0e7490;
}

.stat-card.stat-card--kpi-active {
    background: linear-gradient(148deg, #ecfdf5 0%, #d1fae5 50%, #c6f6d5 100%);
    border-color: rgba(16, 185, 129, 0.35);
}

.stat-card.stat-card--kpi-active .stat-number {
    color: #047857;
}

.stat-card.stat-card--kpi-active .stat-title {
    color: #065f46;
}

.stat-card.stat-card--kpi-stockout {
    background: linear-gradient(148deg, #fffbeb 0%, #fef3c7 45%, #fde68a88 100%);
    border-color: rgba(245, 158, 11, 0.4);
}

.stat-card.stat-card--kpi-stockout .stat-number {
    color: #c2410c;
}

.stat-card.stat-card--kpi-stockout .stat-title {
    color: #9a3412;
}

.stat-card.stat-card--kpi-cats {
    background: linear-gradient(148deg, #f5f3ff 0%, #ede9fe 50%, #e9d5ff99 100%);
    border-color: rgba(124, 58, 237, 0.32);
}

.stat-card.stat-card--kpi-cats .stat-number {
    color: #6d28d9;
}

.stat-card.stat-card--kpi-cats .stat-title {
    color: #5b21b6;
}

/* Tungi rejim — shu KPI lar */
body.dark-theme .stats-grid--products-kpis .stat-card.stat-card--kpi {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.2);
}

body.dark-theme .stats-grid--products-kpis .stat-card--kpi-total {
    background: linear-gradient(148deg, rgba(0, 151, 178, 0.28) 0%, rgba(0, 151, 178, 0.08) 100%);
}

body.dark-theme .stats-grid--products-kpis .stat-card--kpi-active {
    background: linear-gradient(148deg, rgba(16, 185, 129, 0.26) 0%, rgba(16, 185, 129, 0.06) 100%);
}

body.dark-theme .stats-grid--products-kpis .stat-card--kpi-stockout {
    background: linear-gradient(148deg, rgba(245, 158, 11, 0.22) 0%, rgba(245, 158, 11, 0.06) 100%);
}

body.dark-theme .stats-grid--products-kpis .stat-card--kpi-cats {
    background: linear-gradient(148deg, rgba(139, 92, 246, 0.24) 0%, rgba(124, 58, 237, 0.06) 100%);
}

body.dark-theme .stats-grid--products-kpis .stat-card--kpi .stat-title {
    color: rgba(236, 244, 247, 0.82);
}

body.dark-theme .stats-grid--products-kpis .stat-card--kpi-total .stat-number {
    color: #7ce8f9;
}

body.dark-theme .stats-grid--products-kpis .stat-card--kpi-active .stat-number {
    color: #6ee7b7;
}

body.dark-theme .stats-grid--products-kpis .stat-card--kpi-stockout .stat-number {
    color: #fcd34d;
}

body.dark-theme .stats-grid--products-kpis .stat-card--kpi-cats .stat-number {
    color: #c4b5fd;
}

/* ==================== BUYURTMALAR — ixcham rangli status filt tugmalari ==================== */
.stats-grid.stats-grid--orders-status {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
    margin-bottom: 12px;
}

.stats-grid.stats-grid--orders-status .stat-card.stat-card--order-filter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    padding: 6px 8px;
    margin: 0;
    border-radius: 8px;
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.stats-grid.stats-grid--orders-status .stat-card.stat-card--order-filter:hover {
    transform: translateY(-1px);
}

.stats-grid.stats-grid--orders-status .stat-card.stat-card--order-filter .stat-title {
    font-size: 0.62rem;
    margin-bottom: 2px;
    letter-spacing: 0.035em;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
}

.stats-grid.stats-grid--orders-status .stat-card.stat-card--order-filter .stat-number {
    font-size: 1rem;
    line-height: 1.15;
}

.stats-grid.stats-grid--orders-status .stat-card.stat-card--order-filter.is-active {
    box-shadow:
        0 0 0 2px var(--primary, #0097b2),
        0 2px 10px rgba(0, 151, 178, 0.12);
}

.stat-card.stat-card--order-filter-all {
    background: linear-gradient(148deg, #e7f9fc 0%, #cfeef5 55%, #c8e8f3 100%);
    border-color: rgba(0, 151, 178, 0.35);
}

.stat-card.stat-card--order-filter-all .stat-title {
    color: #0f766e;
}

.stat-card.stat-card--order-filter-all .stat-number {
    color: #007a91;
}

.stat-card.stat-card--order-filter-pending {
    background: linear-gradient(148deg, #fffbeb 0%, #fef3c7 52%, #fde68a75 100%);
    border-color: rgba(217, 119, 6, 0.38);
}

.stat-card.stat-card--order-filter-pending .stat-title {
    color: #9a3412;
}

.stat-card.stat-card--order-filter-pending .stat-number {
    color: #c2410c;
}

.stat-card.stat-card--order-filter-accepted {
    background: linear-gradient(148deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe60 100%);
    border-color: rgba(37, 99, 235, 0.32);
}

.stat-card.stat-card--order-filter-accepted .stat-title {
    color: #1e3a8a;
}

.stat-card.stat-card--order-filter-accepted .stat-number {
    color: #1d4ed8;
}

.stat-card.stat-card--order-filter-preparing {
    background: linear-gradient(148deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d070 100%);
    border-color: rgba(13, 148, 136, 0.3);
}

.stat-card.stat-card--order-filter-preparing .stat-title {
    color: #0f766e;
}

.stat-card.stat-card--order-filter-preparing .stat-number {
    color: #0d9488;
}

.stat-card.stat-card--order-filter-ready {
    background: linear-gradient(148deg, #f0fdf4 0%, #bbf7d0 50%, #86efac55 100%);
    border-color: rgba(22, 163, 74, 0.34);
}

.stat-card.stat-card--order-filter-ready .stat-title {
    color: #14532d;
}

.stat-card.stat-card--order-filter-ready .stat-number {
    color: #15803d;
}

.stat-card.stat-card--order-filter-loading {
    background: linear-gradient(148deg, #fff7ed 0%, #fed7aa 48%, #fdba7435 100%);
    border-color: rgba(234, 88, 12, 0.36);
}

.stat-card.stat-card--order-filter-loading .stat-title {
    color: #9a3412;
}

.stat-card.stat-card--order-filter-loading .stat-number {
    color: #ea580c;
}

.stat-card.stat-card--order-filter-onway {
    background: linear-gradient(148deg, #ecfdf5 0%, #bbf7d0 40%, #4ade8060 100%);
    border-color: rgba(5, 150, 105, 0.32);
}

.stat-card.stat-card--order-filter-onway .stat-title {
    color: #166534;
}

.stat-card.stat-card--order-filter-onway .stat-number {
    color: #059669;
}

.stat-card.stat-card--order-filter-delivered {
    background: linear-gradient(148deg, #f5f3ff 0%, #ddd6fe 50%, #c4b5fd55 100%);
    border-color: rgba(109, 40, 217, 0.3);
}

.stat-card.stat-card--order-filter-delivered .stat-title {
    color: #5b21b6;
}

.stat-card.stat-card--order-filter-delivered .stat-number {
    color: #6d28d9;
}

.stat-card.stat-card--order-filter-cancelled {
    background: linear-gradient(148deg, #fef2f2 0%, #fecaca 45%, #f8717160 100%);
    border-color: rgba(220, 38, 38, 0.38);
}

.stat-card.stat-card--order-filter-cancelled .stat-title {
    color: #991b1b;
}

.stat-card.stat-card--order-filter-cancelled .stat-number {
    color: #b91c1c;
}

.stat-card.stat-card--order-filter-rejected {
    background: linear-gradient(148deg, #fef2f2 0%, #fca5a5 42%, #f43f5e58 100%);
    border-color: rgba(185, 28, 28, 0.42);
}

.stat-card.stat-card--order-filter-rejected .stat-title {
    color: #881337;
}

.stat-card.stat-card--order-filter-rejected .stat-number {
    color: #be123c;
}

@media (max-width: 560px) {
    .stats-grid.stats-grid--orders-status {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

body.dark-theme .stats-grid--orders-status .stat-card.stat-card--order-filter {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

body.dark-theme .stats-grid--orders-status .stat-card.stat-card--order-filter.is-active {
    box-shadow:
        0 0 0 2px rgba(56, 189, 248, 0.8),
        0 2px 14px rgba(0, 0, 0, 0.28);
}

body.dark-theme .stat-card.stat-card--order-filter-all {
    background: linear-gradient(148deg, rgba(0, 151, 178, 0.32) 0%, rgba(0, 151, 178, 0.06) 100%);
    border-color: rgba(56, 189, 248, 0.28);
}

body.dark-theme .stat-card.stat-card--order-filter-all .stat-title {
    color: rgba(226, 232, 240, 0.78);
}

body.dark-theme .stat-card.stat-card--order-filter-all .stat-number {
    color: #7dd3fc;
}

body.dark-theme .stat-card.stat-card--order-filter-pending {
    background: linear-gradient(148deg, rgba(245, 158, 11, 0.24) 0%, rgba(245, 158, 11, 0.06) 100%);
    border-color: rgba(251, 191, 36, 0.28);
}

body.dark-theme .stat-card.stat-card--order-filter-pending .stat-number {
    color: #fcd34d;
}

body.dark-theme .stat-card.stat-card--order-filter-accepted {
    background: linear-gradient(148deg, rgba(59, 130, 246, 0.26) 0%, rgba(59, 130, 246, 0.06) 100%);
}

body.dark-theme .stat-card.stat-card--order-filter-accepted .stat-number {
    color: #93c5fd;
}

body.dark-theme .stat-card.stat-card--order-filter-preparing {
    background: linear-gradient(148deg, rgba(20, 184, 166, 0.26) 0%, rgba(20, 184, 166, 0.06) 100%);
}

body.dark-theme .stat-card.stat-card--order-filter-preparing .stat-number {
    color: #5eead4;
}

body.dark-theme .stat-card.stat-card--order-filter-ready {
    background: linear-gradient(148deg, rgba(34, 197, 94, 0.26) 0%, rgba(34, 197, 94, 0.07) 100%);
}

body.dark-theme .stat-card.stat-card--order-filter-ready .stat-number {
    color: #86efac;
}

body.dark-theme .stat-card.stat-card--order-filter-loading {
    background: linear-gradient(148deg, rgba(251, 146, 60, 0.24) 0%, rgba(234, 88, 12, 0.07) 100%);
}

body.dark-theme .stat-card.stat-card--order-filter-loading .stat-number {
    color: #fdba74;
}

body.dark-theme .stat-card.stat-card--order-filter-onway {
    background: linear-gradient(148deg, rgba(16, 185, 129, 0.24) 0%, rgba(5, 150, 105, 0.07) 100%);
}

body.dark-theme .stat-card.stat-card--order-filter-onway .stat-number {
    color: #6ee7b7;
}

body.dark-theme .stat-card.stat-card--order-filter-delivered {
    background: linear-gradient(148deg, rgba(139, 92, 246, 0.26) 0%, rgba(109, 40, 217, 0.07) 100%);
}

body.dark-theme .stat-card.stat-card--order-filter-delivered .stat-number {
    color: #c4b5fd;
}

body.dark-theme .stat-card.stat-card--order-filter-cancelled {
    background: linear-gradient(148deg, rgba(248, 113, 113, 0.22) 0%, rgba(220, 38, 38, 0.08) 100%);
}

body.dark-theme .stat-card.stat-card--order-filter-cancelled .stat-number {
    color: #fca5a5;
}

body.dark-theme .stat-card.stat-card--order-filter-rejected {
    background: linear-gradient(148deg, rgba(244, 63, 94, 0.26) 0%, rgba(190, 18, 60, 0.08) 100%);
}

body.dark-theme .stat-card.stat-card--order-filter-rejected .stat-number {
    color: #fb7185;
}

body.dark-theme .stats-grid--orders-status .stat-card.stat-card--order-filter .stat-title {
    color: rgba(226, 232, 240, 0.8);
}

/* ==================== ACTION BUTTONS ==================== */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.action-buttons.suppliers-page-toolbar {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.suppliers-page-toolbar__left,
.suppliers-page-toolbar__right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.suppliers-page-toolbar__right {
    margin-left: auto;
}

/* Kirimlar alohida sahifa */
.suppliers-incomes-page__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-bottom: 18px;
}

.suppliers-incomes-page__title {
    flex: 1;
    margin: 0;
    min-width: 0;
    text-align: center;
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--primary);
}

@media (max-width: 520px) {
    .suppliers-incomes-page__title {
        flex-basis: 100%;
        text-align: left;
        order: 3;
    }
}

/* Kirimlar ro'yxati: umumiy ~25% ixchamroq (jadval bloki) */
.suppliers-incomes-list-scale {
    zoom: 0.75;
}

.incomes-supplier-cell {
    max-width: 14rem;
}

.incomes-supplier-cell__person {
    display: block;
    margin-top: 3px;
    font-size: 0.92em;
    font-weight: 500;
    color: #64748b;
    line-height: 1.3;
}

body.dark-theme .incomes-supplier-cell__person {
    color: #94a3b8;
}

/* Kirimlar jadvali: setkasiz, qatorlar orasida chiziq, № teskari */
.suppliers-incomes-table-wrap.products-table {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.suppliers-incomes-table-wrap.products-table table {
    margin-bottom: 0;
}

.suppliers-incomes-table-wrap.products-table th,
.suppliers-incomes-table-wrap.products-table td {
    border-left: none;
    border-right: none;
    border-top: none;
}

.suppliers-incomes-table-wrap.products-table th {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    padding: 10px 10px 10px 0;
    color: var(--primary);
}

.suppliers-incomes-table-wrap.products-table td {
    border-bottom: 1px solid var(--border);
    padding: 12px 10px 12px 0;
    vertical-align: middle;
}

.suppliers-incomes-table-wrap.products-table tbody tr:last-child td {
    border-bottom: none;
}

.suppliers-incomes-table-wrap.products-table tbody tr:hover td {
    background: rgba(0, 151, 178, 0.05);
}

.suppliers-incomes-table-wrap__th-num,
.suppliers-incomes-table-wrap__td-num {
    width: 1%;
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.suppliers-incomes-table-wrap__th-num {
    font-weight: 700;
}

.suppliers-incomes-table-wrap__td-num {
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
}

body.dark-theme .suppliers-incomes-table-wrap.products-table {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.dark-theme .suppliers-incomes-table-wrap.products-table th {
    border-bottom-color: var(--glass-edge);
    background: transparent;
}

body.dark-theme .suppliers-incomes-table-wrap.products-table td {
    border-bottom-color: rgba(148, 163, 184, 0.28);
}

body.dark-theme .suppliers-incomes-table-wrap.products-table tbody tr:hover td {
    background: rgba(0, 151, 178, 0.12);
}

body.dark-theme .suppliers-incomes-table-wrap__td-num {
    color: #cbd5e1;
}

/* Kirimlar ro'yxati: ombor ustuni */
.suppliers-incomes-table-wrap .incomes-warehouse-cell {
    max-width: 220px;
    font-size: 0.86rem;
    line-height: 1.4;
    color: #334155;
}

.suppliers-incomes-table-wrap .incomes-warehouse-cell--empty {
    color: #94a3b8;
    font-style: italic;
}

.suppliers-incomes-table-wrap .incomes-warehouse-cell--consignment > span {
    font-weight: 600;
    color: #b45309;
}

body.dark-theme .suppliers-incomes-table-wrap .incomes-warehouse-cell {
    color: #e2e8f0;
}

body.dark-theme .suppliers-incomes-table-wrap .incomes-warehouse-cell--empty {
    color: #64748b;
}

/* Kirimlar ro'yxati: davr filtri (chip + oraliq) */
.incomes-filter-bar {
    margin-bottom: 18px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(0, 151, 178, 0.22);
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.9) 0%, rgba(255, 255, 255, 0.95) 45%, rgba(224, 242, 254, 0.5) 100%);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.incomes-filter-bar__row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.incomes-filter-bar__label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0f766e;
    white-space: nowrap;
}

.incomes-filter-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    flex: 0 1 auto;
    min-width: 0;
}

.incomes-filter-chip {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.85);
    color: #334155;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.incomes-filter-chip:hover {
    border-color: rgba(0, 151, 178, 0.45);
    color: #0f766e;
    box-shadow: 0 2px 8px rgba(0, 151, 178, 0.12);
}

.incomes-filter-chip.is-active {
    background: linear-gradient(120deg, #0097b2 0%, #0ea5e9 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 151, 178, 0.35);
}

.incomes-filter-chip.is-active:hover {
    color: #fff;
    border-color: transparent;
}

.incomes-filter-custom {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px 10px;
    flex: 0 0 auto;
}

.incomes-filter-custom__field {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
}

.incomes-filter-custom__lbl {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.incomes-filter-date {
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    font-size: 0.8rem;
    font-family: inherit;
    min-width: 0;
    width: 9.5rem;
    max-width: 42vw;
    background: #fff;
    color: #0f172a;
}

.incomes-filter-custom__dash {
    color: #94a3b8;
    font-weight: 600;
    flex-shrink: 0;
}

.incomes-filter-custom__apply {
    padding: 6px 12px;
    font-size: 0.78rem;
    border-radius: 8px;
    flex-shrink: 0;
}

body.dark-theme .incomes-filter-bar {
    border-color: rgba(56, 189, 248, 0.22);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(12, 18, 32, 0.88) 50%, rgba(15, 23, 42, 0.65) 100%);
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.25);
}

body.dark-theme .incomes-filter-bar__label {
    color: #5eead4;
}

body.dark-theme .incomes-filter-chip {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(148, 163, 184, 0.25);
    color: #e2e8f0;
}

body.dark-theme .incomes-filter-chip:hover {
    border-color: rgba(56, 189, 248, 0.4);
    color: #99f6e4;
}

body.dark-theme .incomes-filter-chip.is-active {
    background: linear-gradient(120deg, rgba(0, 151, 178, 0.85) 0%, rgba(14, 165, 233, 0.75) 100%);
    color: #f8fafc;
}

body.dark-theme .incomes-filter-custom__field {
    color: #cbd5e1;
}

body.dark-theme .incomes-filter-date {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(56, 189, 248, 0.28);
    color: #f1f5f9;
}

/* Kirimlar jadvali: to'langan darajasi (pill progress) */
.income-row-paymeter {
    vertical-align: middle;
    min-width: 140px;
    max-width: 260px;
}

.income-paymeter {
    position: relative;
    height: 13px;
    border-radius: 999px;
    overflow: hidden;
    background: linear-gradient(180deg, #fecdd3 0%, #f87171 55%, #ef4444 100%);
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.12);
}

.income-paymeter__fill {
    height: 100%;
    min-width: 0;
    border-radius: 999px 0 0 999px;
    background: linear-gradient(180deg, #a7f3d0 0%, #34d399 45%, #059669 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    transition: width 0.28s ease;
}

.income-paymeter__fill--full {
    border-radius: 999px;
}

.income-paymeter__fill--min {
    min-width: 4px;
}

.income-paymeter__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-top: 5px;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.2;
}

.income-paymeter__pct {
    font-weight: 700;
    color: #0f766e;
}

.income-paymeter__sums {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.dark-theme .income-paymeter {
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.55) 0%, rgba(185, 28, 28, 0.85) 100%);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.35);
}

body.dark-theme .income-paymeter__fill {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.55) 0%, rgba(5, 150, 105, 0.95) 100%);
}

body.dark-theme .income-paymeter__meta {
    color: #94a3b8;
}

body.dark-theme .income-paymeter__pct {
    color: #5eead4;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: rgba(0, 151, 178, 0.08);
}

#noPriceFilterBtn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Input fields styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    background: #f8f9fa;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    background: white;
    color: #1f2937;
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 151, 178, 0.1);
}

.btn:active {
    transform: scale(0.98);
}

/* ==================== SEARCH BAR ==================== */
.search-bar {
    background: var(--white);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border-radius: 8px;
    padding: 0 12px;
    border: 1px solid var(--border);
    margin-bottom: 0;
}

.search-box i {
    color: var(--primary);
    margin-right: 8px;
    font-size: 0.85rem;
}

.search-box input {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.search-box input::placeholder {
    color: var(--gray);
    font-size: 0.8rem;
}

.filter-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.filter-select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.8rem;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Alphabet filter */
.alphabet-filter {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.alphabet-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--text-dark);
    transition: all 0.2s;
}

.alphabet-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.alphabet-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ==================== PRODUCTS TABLE ==================== */
.products-table {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 8px;
    background: var(--bg);
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-dark);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(0,151,178,0.02);
}

/* Mijozlar sahifasi: ~25% ixchamroq, jadval «setka»siz, qatorlar orasida yagona chiziq */
body.customers-settings-panel-open {
    overflow: hidden;
}

.customers-page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.customers-page-toolbar .action-buttons {
    margin-bottom: 0;
}

.customers-toolbar-settings {
    flex-shrink: 0;
    margin-left: auto;
}

.customers-settings-panel {
    position: fixed;
    inset: 0;
    z-index: 28000;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.customers-settings-panel.is-open {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}

.customers-settings-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
}

.customers-settings-panel__sheet {
    position: absolute;
    top: 0;
    right: 0;
    width: min(400px, 100vw);
    height: 100%;
    max-height: 100dvh;
    background: var(--white, #ffffff);
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
    padding: 20px 18px 24px;
    overflow-y: auto;
    transform: translateX(104%);
    transition: transform 0.22s ease;
}

.customers-settings-panel.is-open .customers-settings-panel__sheet {
    transform: translateX(0);
}

.customers-settings-panel__title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.customers-settings-panel__lead {
    margin: 0 0 18px;
    font-size: 0.76rem;
    color: var(--text-light);
    line-height: 1.45;
}

.customers-settings-panel__field {
    margin-bottom: 16px;
}

.customers-settings-panel__field label {
    display: block;
    font-weight: 600;
    font-size: 0.78rem;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.customers-settings-panel__input {
    width: 100%;
    max-width: 220px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    background: var(--white, #fff);
    color: var(--text-dark);
}

.customers-settings-panel__hint {
    display: block;
    margin-top: 6px;
    font-size: 0.68rem;
    color: var(--text-light);
    line-height: 1.4;
}

.customers-settings-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

body.dark-theme .customers-settings-panel__sheet {
    background: rgba(18, 26, 44, 0.98);
    border-left-color: var(--glass-edge, rgba(255, 255, 255, 0.1));
}

body.dark-theme .customers-settings-panel__input {
    background: rgba(12, 18, 32, 0.9);
    border-color: var(--glass-edge, rgba(255, 255, 255, 0.12));
    color: var(--text-dark);
}

.customers-page-compact {
    font-size: 0.75rem;
}

/* Mijozlar — ixcham rangli KPI (9 ta) */
.stats-grid.stats-grid--customers-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 6px;
    margin-bottom: 12px;
}

@media (min-width: 1040px) {
    .stats-grid.stats-grid--customers-kpis {
        grid-template-columns: repeat(9, minmax(0, 1fr));
    }
}

.stat-card.stat-card--cust {
    padding: 6px 7px;
    border-radius: 8px;
    border-width: 1px;
    border-style: solid;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card.stat-card--cust:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

.stat-card.stat-card--cust .stat-title {
    font-size: 0.56rem;
    line-height: 1.28;
    margin-bottom: 2px;
    letter-spacing: 0.015em;
    text-transform: none;
    font-weight: 650;
}

.stat-card.stat-card--cust .stat-number {
    font-size: 0.94rem;
    line-height: 1.18;
}

.stat-card--cust-total {
    background: linear-gradient(145deg, #e8f8fb 0%, #daf3f8 100%);
    border-color: rgba(0, 151, 178, 0.32);
}

.stat-card--cust-total .stat-number {
    color: #0e7490;
}

.stat-card--cust-live {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: rgba(16, 185, 129, 0.35);
}

.stat-card--cust-live .stat-number {
    color: #047857;
}

.stat-card--cust-debt {
    background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 100%);
    border-color: rgba(239, 68, 68, 0.35);
}

.stat-card--cust-debt .stat-number {
    color: #b91c1c;
}

.stat-card--cust-a {
    background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: rgba(109, 40, 217, 0.3);
}

.stat-card--cust-a .stat-number {
    color: #6d28d9;
}

.stat-card--cust-harid-recent {
    background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: rgba(34, 197, 94, 0.4);
}

.stat-card--cust-harid-recent .stat-number {
    color: #15803d;
}

.stat-card--cust-harid-warm {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
    border-color: rgba(234, 179, 8, 0.45);
}

.stat-card--cust-harid-warm .stat-number {
    color: #b45309;
}

.stat-card--cust-harid-mid {
    background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%);
    border-color: rgba(249, 115, 22, 0.45);
}

.stat-card--cust-harid-mid .stat-number {
    color: #c2410c;
}

.stat-card--cust-harid-severe,
.stat-card--cust-harid-never {
    background: linear-gradient(145deg, #fef2f2 0%, #fecaca 100%);
    border-color: rgba(220, 38, 38, 0.45);
}

.stat-card--cust-harid-severe .stat-number,
.stat-card--cust-harid-never .stat-number {
    color: #991b1b;
}

.stat-card.stat-card--cust .stat-title {
    color: rgba(51, 65, 85, 0.88);
}

.customers-page-compact .action-buttons .btn {
    font-size: 0.72rem;
    padding: 6px 10px;
}

.customers-page-compact .search-bar {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 8px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.customers-page-compact .search-box {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 4px 0 0;
}

.customers-page-compact .search-box input {
    font-size: 0.72rem;
    padding: 6px 0;
}

.customers-page-compact .filter-select {
    font-size: 0.72rem;
    padding: 5px 8px;
}

.customers-page-compact .products-table {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.customers-page-compact .products-table table {
    margin-bottom: 0;
}

.customers-page-compact .products-table th,
.customers-page-compact .products-table td {
    font-size: 0.675rem;
    padding: 6px 8px;
    /* Keyinroq keladigan umumiy `table td/th { border: 1px solid #ddd }` setkasini bekor qilish */
    border-left: none;
    border-right: none;
    border-top: none;
}

.customers-page-compact .products-table th {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-size: 0.7rem;
}

.customers-page-compact .products-table td {
    border-bottom: 1px solid var(--border);
}

.customers-page-compact .products-table tbody tr:hover td {
    background: rgba(0, 151, 178, 0.04);
}

.customers-page-compact .products-table tbody tr:last-child td {
    border-bottom: 1px solid var(--border);
}

.customers-page-compact .customers-loc-cell {
    color: var(--text-dark);
    max-width: 14rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mijozlar: harid bo‘yicha aktivlik (rang + yorliq) */
.customer-activity-summary {
    margin: 0 0 12px;
    padding: 8px 0 0;
    font-size: 0.68rem;
    line-height: 1.45;
    color: var(--text-light);
    border-top: 1px solid var(--border);
}

.customer-activity-summary__label {
    font-weight: 600;
    color: var(--text-dark);
    margin-right: 6px;
}

.customer-activity-summary__sep {
    margin: 0 6px;
    opacity: 0.45;
}

.customer-activity-summary__item b {
    color: var(--text-dark);
    font-weight: 700;
}

.customer-activity-summary__item--recent {
    color: #15803d;
}

.customer-activity-summary__item--warm {
    color: #b45309;
}

.customer-activity-summary__item--cold {
    color: #b91c1c;
}

.customer-activity-summary__item--never {
    color: #64748b;
}

.customer-activity-summary__item--severe {
    color: #991b1b;
    font-weight: 600;
}

.customers-page-compact tr.cust-purch-row td:first-child {
    border-left: 4px solid transparent;
}

.customers-page-compact tr.cust-purch-row--recent td:first-child {
    border-left-color: #22c55e;
}

.customers-page-compact tr.cust-purch-row--warm td:first-child {
    border-left-color: #eab308;
}

.customers-page-compact tr.cust-purch-row--cold td:first-child {
    border-left-color: #ef4444;
}

.customers-page-compact tr.cust-purch-row--severe td:first-child {
    border-left-color: #b91c1c;
}

.customers-page-compact tr.cust-purch-row--never td:first-child {
    border-left-color: #94a3b8;
}

.customers-activity-cell {
    vertical-align: middle;
}

.customers-activity-cell .cust-purch-tag {
    margin-top: 0;
}

/* Mijozlar jadvali: bosiladigan holat / reyting */
.customers-page-compact button.cust-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    font: inherit;
    font-size: inherit;
    line-height: 1.35;
    cursor: pointer;
    vertical-align: middle;
    padding: 2px 5px;
    margin: -2px -4px;
    border-radius: 6px;
    border: 1px dashed transparent;
    background: transparent;
    color: inherit;
    text-align: left;
}

.customers-page-compact button.cust-quick-btn:hover {
    border-color: rgba(0, 151, 178, 0.35);
    background: rgba(0, 151, 178, 0.06);
}

.customers-page-compact button.cust-quick-btn:focus-visible {
    outline: 2px solid rgba(0, 151, 178, 0.55);
    outline-offset: 1px;
}

.customers-page-compact button.cust-quick-btn--rating {
    font-weight: 500;
}

.cust-purch-tag {
    display: inline-block;
    margin-top: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.35;
}

.cust-purch-tag--recent {
    background: rgba(34, 197, 94, 0.18);
    color: #166534;
}

.cust-purch-tag--warm {
    background: rgba(234, 179, 8, 0.22);
    color: #854d0e;
}

.cust-purch-tag--cold {
    background: rgba(239, 68, 68, 0.16);
    color: #991b1b;
}

.cust-purch-tag--never {
    background: rgba(148, 163, 184, 0.25);
    color: #475569;
}

.cust-purch-tag--severe {
    background: rgba(185, 28, 28, 0.22);
    color: #7f1d1d;
    border: 1px solid rgba(185, 28, 28, 0.45);
}

body.dark-theme .cust-purch-tag--recent {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

body.dark-theme .cust-purch-tag--warm {
    background: rgba(234, 179, 8, 0.12);
    color: #fde047;
}

body.dark-theme .cust-purch-tag--cold {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

body.dark-theme .cust-purch-tag--never {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}

body.dark-theme .cust-purch-tag--severe {
    background: rgba(220, 38, 38, 0.22);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.45);
}

body.dark-theme .customer-activity-summary__item--severe {
    color: #fca5a5;
}

body.dark-theme .customers-page-compact tr.cust-purch-row--severe td:first-child {
    border-left-color: #dc2626;
}

/* PDF: avval ko‘rish (mijoz kartasi va boshqalar) */
.admin-pdf-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.92);
}

.admin-pdf-preview-overlay__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: var(--surface-header, #fff);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.admin-pdf-preview-overlay__title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(50vw, 420px);
}

.admin-pdf-preview-overlay__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-pdf-preview-overlay__iframe {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: 0;
    background: #3d3d3d;
}

body.dark-theme .admin-pdf-preview-overlay__bar {
    background: rgba(18, 26, 44, 0.96);
    border-bottom-color: var(--glass-edge, rgba(255, 255, 255, 0.12));
}

/* Status colors */
.status-active {
    color: var(--success);
    font-weight: 600;
    font-size: 0.85rem;
}

.status-inactive {
    color: var(--danger);
    font-weight: 600;
    font-size: 0.85rem;
}

.status-paused {
    color: var(--warning);
    font-weight: 600;
    font-size: 0.85rem;
}

.product-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.badge-active {
    background: var(--success);
}

.badge-inactive {
    background: var(--danger);
}

.badge-paused {
    background: var(--warning);
}

/* ==================== PRODUCTS GRID ==================== */
/* ==================== PRODUCTS PAGE ==================== */

.products-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.products-title-section {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.products-title-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.product-count {
    font-size: 0.95rem;
    color: var(--text-soft);
}

/* Filter Bar */
.products-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-left {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 400px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    flex: 1;
    min-width: 220px;
}

.search-box i {
    color: #9ca3af;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 10px 0;
    width: 100%;
    font-size: 0.9rem;
    outline: none;
}

.search-box input::placeholder {
    color: #9ca3af;
}

.filter-select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 140px;
}

.filter-select:hover {
    border-color: var(--primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 151, 178, 0.1);
}

.product-list-select {
    min-width: 180px;
    margin-right: 8px;
}

#subCategoryFilter.product-list-select {
    margin-right: 0;
}

/* Products Table Card */
.products-table-card {
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-bottom: 0;
}

.products-data-table {
    width: 100%;
    border-collapse: collapse;
}

.products-data-table thead {
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
}

.products-data-table th {
    padding: 5px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.products-data-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border-left: 4px solid transparent;
}

.products-data-table tbody tr.status-active {
    border-left-color: #16a34a;
    background-color: transparent;
}

.products-data-table tbody tr.status-inactive {
    border-left-color: #dc2626;
    background-color: transparent;
    opacity: 1;
}

.products-data-table tbody tr.status-restricted {
    border-left-color: #ca8a04;
    background-color: transparent;
}

.products-data-table tbody tr:hover {
    background-color: transparent !important;
    box-shadow: none;
}

.products-data-table td {
    padding: 4px 8px;
    font-size: 0.7rem;
    color: var(--text-dark);
    vertical-align: middle;
}

/* Row number */
.product-row-number {
    text-align: center;
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.65rem;
}

/* Product info cell */
.product-cell-info {
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.product-thumbnail {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--bg);
    overflow: hidden;
    flex-shrink: 0;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-cell-details {
    flex: 1;
}

.product-cell-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1px;
    font-size: 0.72rem;
    line-height: 1.2;
}

.product-cell-sku {
    font-size: 0.6rem;
    color: #9ca3af;
    margin-bottom: 1px;
    line-height: 1;
}

.product-variants {
    font-size: 0.58rem;
    color: #6b7280;
    font-style: italic;
    margin-top: 2px;
    padding: 1px 3px;
    background: rgba(107, 114, 128, 0.08);
    border-radius: 3px;
    border-left: 2px solid #0097b2;
    line-height: 1.1;
}

/* Category badge */
.category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
}

.category-badge.oziq-ovqat {
    background: #e9d5ff;
    color: #7e22ce;
}

.category-badge.ichimlik {
    background: #dbeafe;
    color: #0369a1;
}

.category-badge.gigiyena {
    background: #cffafe;
    color: #0891b2;
}

.category-badge.maishiy {
    background: #fef3c7;
    color: #b45309;
}

.category-badge.gosht {
    background: #fee2e2;
    color: #dc2626;
}

.category-badge.default {
    background: #f0f4f8;
    color: #64748b;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-badge.active {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.active .status-dot {
    background: #16a34a;
}

.status-badge.restricted {
    background: #fef9c3;
    color: #ca8a04;
}

.status-badge.restricted .status-dot {
    background: #ca8a04;
    animation: pulse-yellow 2s infinite;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge.inactive .status-dot {
    background: #dc2626;
    animation: pulse-red 0.8s infinite;
}

@keyframes pulse-yellow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Pulsing / Blinking animation for SaaS support chat button */
@keyframes saasPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); border-color: #ef4444; }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); border-color: #ef4444; }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); border-color: rgba(0,151,178,0.35); }
}

.saas-blinking {
    animation: saasPulse 1.4s infinite !important;
    background: rgba(239, 68, 68, 0.15) !important;
}

/* Stock cell */
.stock-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stock-value {
    font-weight: 600;
    font-size: 0.7rem;
}

.stock-bar-container {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

/* Qoldiq (yashil) + sotilgan (qizil) — ikki qismli panel */
.stock-bar-container.stock-bar-split {
    display: flex;
    flex-direction: row;
    height: 7px;
    border-radius: 4px;
    overflow: hidden;
    background: #e2e8f0;
}

.stock-bar-split--empty {
    opacity: 0.85;
}

.stock-bar-segment {
    height: 100%;
    min-width: 0;
    transition: width 0.35s ease;
}

.stock-bar-segment.stock-bar-remain {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
}

.stock-bar-segment.stock-bar-sold {
    background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
}

.stock-bar-segment.stock-bar-neutral {
    background: #cbd5e1;
}

.stock-split-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 3px;
}

.stock-legend-sep {
    color: #94a3b8;
    font-weight: 400;
}

.stock-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.stock-bar.green {
    background: #16a34a;
}

.stock-bar.yellow {
    background: #ca8a04;
}

.stock-bar.red {
    background: #dc2626;
}

.stock-value.green {
    color: #16a34a;
}

.stock-value.yellow {
    color: #ca8a04;
}

.stock-value.red {
    color: #dc2626;
}

.variants-quantities {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px solid #e2e8f0;
}

.variant-qty-item {
    font-size: 0.58rem;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
}

.variant-qty-item strong {
    color: #1f2937;
    margin-left: 4px;
    font-weight: 600;
}

/* Actions cell */
.actions-cell {
    display: flex;
    justify-content: center;
    position: relative;
}

.actions-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    color: #9ca3af;
    font-size: 1.2rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.actions-btn:hover {
    background: #f0f4f8;
    color: var(--primary);
}

/* Action Dropdown Menu */
.action-dropdown-menu {
    position: fixed;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 200px;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: #f0f4f8;
    color: var(--primary);
}

.dropdown-item i {
    width: 18px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.dropdown-item.delete-item {
    color: #dc2626;
}

.dropdown-item.delete-item:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* Pagination */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: #fafbfc;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
}

.pagination-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-dark);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 151, 178, 0.05);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#paginationInfo {
    font-size: 0.9rem;
    color: #9ca3af;
    font-weight: 500;
}


/* Product images preview */
.product-images-preview {
    display: flex;
    gap: 3px;
}

.product-image-thumb {
    width: 25px;
    height: 25px;
    background: var(--bg);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 0.7rem;
}

/* Hashtags */
.product-hashtags {
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 2px;
}

/* Action icons */
.action-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-icons i {
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.action-icons .fa-edit {
    color: var(--primary);
}

.action-icons .fa-tags {
    color: var(--secondary);
}

.action-icons .fa-copy {
    color: var(--primary-light);
}

.action-icons .fa-trash {
    color: var(--danger);
}

.action-icons i:hover {
    transform: scale(1.1);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    width: 600px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
}

.modal-header h2 {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

/* ==================== FORM ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,151,178,0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Mijoz modali: hudud tanlovlari ixcham */
/* Mijoz modali — telefon + parol (pastdan tekis), rangli panel */
/* Sarlavha doim ko‘rinadi; forma ichida scroll — ism/telefon yuqolmaydi */
#customerModal.customer-modal-vibrant .modal-content.customer-modal-vibrant__content {
    border-radius: 14px;
    border: 1px solid rgba(0, 151, 178, 0.28);
    box-shadow: 0 10px 40px rgba(0, 151, 178, 0.14);
    max-height: min(88vh, 920px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#customerModal.customer-modal-vibrant .customer-modal-vibrant__header {
    flex-shrink: 0;
    background: linear-gradient(110deg, rgba(0, 151, 178, 0.18) 0%, rgba(14, 165, 233, 0.12) 45%, rgba(126, 217, 87, 0.14) 100%);
    border-bottom: 1px solid rgba(0, 151, 178, 0.22);
}

#customerModal.customer-modal-vibrant .customer-modal-vibrant__header h2 {
    color: #0f172a;
}

#customerModal.customer-modal-vibrant .customer-modal-vibrant__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.55) 0%, #fff 22%, #fff 100%);
}

#customerModal .customer-form-credentials {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: flex-end;
    padding: 14px 16px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 151, 178, 0.14) 0%, rgba(14, 165, 233, 0.1) 38%, rgba(126, 217, 87, 0.12) 100%);
    border: 1px solid rgba(0, 151, 178, 0.24);
}

#customerModal .customer-form-credentials__field {
    flex: 1 1 240px;
    margin-bottom: 0;
}

#customerModal .customer-form-credentials .customer-cred-hint {
    margin: 2px 0 8px;
    font-size: 0.75rem;
    line-height: 1.38;
    color: #0f766e;
    max-width: 44ch;
}

#customerModal .customer-cred-input {
    border-color: rgba(0, 151, 178, 0.38);
    background: rgba(255, 255, 255, 0.96);
}

#customerModal .customer-req-star {
    color: #dc2626;
    font-weight: 700;
}

body.dark-theme #customerModal.customer-modal-vibrant .modal-content.customer-modal-vibrant__content {
    border-color: rgba(56, 189, 248, 0.28);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

body.dark-theme #customerModal.customer-modal-vibrant .customer-modal-vibrant__header {
    background: linear-gradient(110deg, rgba(0, 151, 178, 0.28) 0%, rgba(14, 165, 233, 0.15) 50%, rgba(52, 211, 153, 0.12) 100%);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme #customerModal.customer-modal-vibrant .customer-modal-vibrant__header h2 {
    color: var(--text-dark);
}

body.dark-theme #customerModal.customer-modal-vibrant .customer-modal-vibrant__body {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(12, 18, 32, 0.92) 28%);
}

body.dark-theme #customerModal .customer-form-credentials {
    background: linear-gradient(135deg, rgba(0, 151, 178, 0.22) 0%, rgba(14, 165, 233, 0.12) 45%, rgba(52, 211, 153, 0.1) 100%);
    border-color: rgba(56, 189, 248, 0.22);
}

body.dark-theme #customerModal .customer-form-credentials .customer-cred-hint {
    color: #99f6e4;
}

body.dark-theme #customerModal .customer-cred-input {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(56, 189, 248, 0.35);
    color: var(--text-dark);
}

#customerModal .customer-region-block {
    margin-bottom: 12px;
}

#customerModal .customer-region-block__title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text-dark);
}

#customerModal .customer-region-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
}

#customerModal .customer-region-grid .form-group {
    margin-bottom: 0;
}

#customerModal .customer-region-grid .form-group label {
    margin-bottom: 3px;
    font-size: 0.82rem;
}

@media (min-width: 560px) {
    #customerModal .customer-region-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ==================== UNITS GRID ==================== */
.units-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 5px;
}

.unit-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white);
}

.unit-item:hover {
    border-color: var(--primary);
}

.unit-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.unit-item i {
    font-size: 1.2rem;
    margin-bottom: 5px;
    display: block;
}

.unit-item div {
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.unit-item input {
    width: 100%;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 0.9rem;
    color: inherit;
    padding: 5px 0;
}

.unit-item input:focus {
    outline: none;
}

/* ==================== IMAGE UPLOAD ==================== */
.image-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 5px;
}

.image-upload-box {
    aspect-ratio: 1/1;
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray);
    background: var(--bg);
    transition: all 0.2s;
}

.image-upload-box:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.image-upload-box i {
    font-size: 2rem;
    margin-bottom: 5px;
}

.image-upload-box span {
    font-size: 0.8rem;
}

.image-upload-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* ==================== HASHTAGS ==================== */
.hashtags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.hashtag {
    background: var(--bg);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.hashtag:hover {
    border-color: var(--primary);
}

.hashtag i {
    cursor: pointer;
    color: var(--gray);
    font-size: 0.7rem;
}

.hashtag i:hover {
    color: var(--danger);
}

/* ==================== PRICING INFO ==================== */
.pricing-info {
    background: var(--bg);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.pricing-info h4 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.9rem;
}

.pricing-row:last-child {
    border-bottom: none;
}

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--text-dark);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    display: none;
    z-index: 2000;
    font-size: 0.9rem;
    border-left: 4px solid var(--secondary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.toast.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== THEMES ==================== */
/* Light theme (default) */
body.light-theme {
    --bg: #f8fafc;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border: #e2e8f0;
    --surface-header: #ffffff;
}

body.light-theme .stat-card,
body.light-theme .products-table,
body.light-theme .search-bar,
body.light-theme .products-grid {
    background: var(--white);
}

body.light-theme .customers-page-compact .products-table,
body.light-theme .customers-page-compact .search-bar {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Light: mijozlar KPI kartalari — `.stat-card` oq fonini ustidan yozish */
body.light-theme .customers-page-compact .stat-card.stat-card--cust.stat-card--cust-total {
    background: linear-gradient(145deg, #e8f8fb 0%, #daf3f8 100%);
    border-color: rgba(0, 151, 178, 0.32);
}

body.light-theme .customers-page-compact .stat-card.stat-card--cust.stat-card--cust-live {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: rgba(16, 185, 129, 0.35);
}

body.light-theme .customers-page-compact .stat-card.stat-card--cust.stat-card--cust-debt {
    background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 100%);
    border-color: rgba(239, 68, 68, 0.35);
}

body.light-theme .customers-page-compact .stat-card.stat-card--cust.stat-card--cust-a {
    background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: rgba(109, 40, 217, 0.3);
}

body.light-theme .customers-page-compact .stat-card.stat-card--cust.stat-card--cust-harid-recent {
    background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: rgba(34, 197, 94, 0.4);
}

body.light-theme .customers-page-compact .stat-card.stat-card--cust.stat-card--cust-harid-warm {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
    border-color: rgba(234, 179, 8, 0.45);
}

body.light-theme .customers-page-compact .stat-card.stat-card--cust.stat-card--cust-harid-mid {
    background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%);
    border-color: rgba(249, 115, 22, 0.45);
}

body.light-theme .customers-page-compact .stat-card.stat-card--cust.stat-card--cust-harid-severe,
body.light-theme .customers-page-compact .stat-card.stat-card--cust.stat-card--cust-harid-never {
    background: linear-gradient(145deg, #fef2f2 0%, #fecaca 100%);
    border-color: rgba(220, 38, 38, 0.45);
}

/* Dark theme — gradient fon + «shisha» (rasmdagi kabi qatlamli shaffof panel) */
body.dark-theme {
    --bg: transparent;
    --white: rgba(22, 30, 48, 0.58);
    --text-dark: #eef1f8;
    --text-light: #9aa6bc;
    --border: rgba(255, 255, 255, 0.1);
    --glass-edge: rgba(255, 255, 255, 0.1);
    --glass-void: rgba(10, 14, 26, 0.88);
    --glass-surface: rgba(18, 26, 44, 0.66);
    --glass-panel: rgba(22, 32, 52, 0.52);
    --surface-header: rgba(12, 18, 34, 0.74);
    background:
        radial-gradient(ellipse 100% 80% at 0% -5%, rgba(0, 151, 178, 0.32) 0%, transparent 52%),
        radial-gradient(ellipse 85% 65% at 100% 5%, rgba(110, 70, 195, 0.22) 0%, transparent 48%),
        radial-gradient(ellipse 70% 55% at 85% 100%, rgba(200, 60, 95, 0.12) 0%, transparent 45%),
        linear-gradient(158deg, #060913 0%, #0f1628 40%, #121c32 72%, #080d18 100%);
    background-attachment: fixed;
}

body.dark-theme .main {
    background: transparent;
}

body.dark-theme .header {
    background: var(--surface-header);
    backdrop-filter: blur(20px) saturate(155%);
    -webkit-backdrop-filter: blur(20px) saturate(155%);
    border-bottom-color: var(--glass-edge);
    box-shadow: none;
}

body.dark-theme .stat-card,
body.dark-theme .products-table,
body.dark-theme .search-bar,
body.dark-theme .products-grid {
    background: var(--glass-surface);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--glass-edge);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}

body.dark-theme th {
    background: rgba(255, 255, 255, 0.07);
}

body.dark-theme .search-box {
    background: var(--glass-void);
    border-color: var(--glass-edge);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.dark-theme .filter-select,
body.dark-theme .alphabet-btn {
    background: var(--glass-void);
    color: var(--text-dark);
    border-color: var(--glass-edge);
}

body.dark-theme .modal-content {
    background: rgba(12, 18, 32, 0.92);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    color: var(--text-dark);
    border: 1px solid var(--glass-edge);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

body.dark-theme .stat-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 151, 178, 0.12);
}

/* Dark: ta'minotchilar KPI — umumiy `body.dark-theme .stat-card` dan keyin (ranglar saqlansin) */
body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-balance {
    background: linear-gradient(145deg, rgba(0, 151, 178, 0.38) 0%, rgba(0, 151, 178, 0.1) 100%);
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-balance .stat-title {
    color: rgba(204, 251, 241, 0.88);
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-balance .stat-number {
    color: #99f6e4;
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-income {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.34) 0%, rgba(16, 185, 129, 0.09) 100%);
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-income .stat-title {
    color: rgba(209, 250, 229, 0.9);
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-income .stat-number {
    color: #6ee7b7;
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-sold {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.34) 0%, rgba(59, 130, 246, 0.09) 100%);
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-sold .stat-title {
    color: rgba(219, 234, 254, 0.9);
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-sold .stat-number {
    color: #93c5fd;
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-diff {
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.3) 0%, rgba(245, 158, 11, 0.08) 100%);
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-diff .stat-title {
    color: rgba(254, 243, 199, 0.92);
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-diff .stat-number {
    color: #fcd34d;
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-debt {
    background: linear-gradient(145deg, rgba(244, 63, 94, 0.32) 0%, rgba(244, 63, 94, 0.09) 100%);
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-debt .stat-title {
    color: rgba(255, 228, 230, 0.9);
}

body.dark-theme .stats-grid.stats-grid--suppliers-kpis > .stat-card.stat-card--sup-kpi.stat-card--sup-debt .stat-number {
    color: #fda4af;
}

body.dark-theme .customers-page-compact .products-table,
body.dark-theme .customers-page-compact .search-bar {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.dark-theme .customers-page-compact .search-box {
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Dark: mijozlar KPI — umumiy .stat-card stilidan keyin ranglar saqlansin */
body.dark-theme .customers-page-compact .stat-card.stat-card--cust .stat-title {
    color: rgba(226, 232, 240, 0.82);
}

body.dark-theme .customers-page-compact .stat-card.stat-card--cust {
    background: rgba(18, 28, 48, 0.82);
    backdrop-filter: blur(12px) saturate(130%);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
}

body.dark-theme .customers-page-compact .stat-card.stat-card--cust:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-theme .customers-page-compact .stat-card--cust-total {
    border-color: rgba(56, 189, 248, 0.35);
}

body.dark-theme .customers-page-compact .stat-card--cust-total .stat-number {
    color: #7dd3fc;
}

body.dark-theme .customers-page-compact .stat-card--cust-live {
    border-color: rgba(52, 211, 153, 0.4);
}

body.dark-theme .customers-page-compact .stat-card--cust-live .stat-number {
    color: #6ee7b7;
}

body.dark-theme .customers-page-compact .stat-card--cust-debt {
    border-color: rgba(248, 113, 113, 0.4);
}

body.dark-theme .customers-page-compact .stat-card--cust-debt .stat-number {
    color: #fca5a5;
}

body.dark-theme .customers-page-compact .stat-card--cust-a {
    border-color: rgba(167, 139, 250, 0.4);
}

body.dark-theme .customers-page-compact .stat-card--cust-a .stat-number {
    color: #c4b5fd;
}

body.dark-theme .customers-page-compact .stat-card--cust-harid-recent {
    border-color: rgba(74, 222, 128, 0.4);
}

body.dark-theme .customers-page-compact .stat-card--cust-harid-recent .stat-number {
    color: #86efac;
}

body.dark-theme .customers-page-compact .stat-card--cust-harid-warm {
    border-color: rgba(253, 224, 71, 0.4);
}

body.dark-theme .customers-page-compact .stat-card--cust-harid-warm .stat-number {
    color: #fde047;
}

body.dark-theme .customers-page-compact .stat-card--cust-harid-mid {
    border-color: rgba(251, 146, 60, 0.42);
}

body.dark-theme .customers-page-compact .stat-card--cust-harid-mid .stat-number {
    color: #fdba74;
}

body.dark-theme .customers-page-compact .stat-card--cust-harid-severe,
body.dark-theme .customers-page-compact .stat-card--cust-harid-never {
    border-color: rgba(248, 113, 113, 0.42);
}

body.dark-theme .customers-page-compact .stat-card--cust-harid-severe .stat-number,
body.dark-theme .customers-page-compact .stat-card--cust-harid-never .stat-number {
    color: #fecaca;
}

/* Dark theme - Form elements (input, textarea, select) */
body.dark-theme input[type="text"],
body.dark-theme input[type="number"],
body.dark-theme input[type="email"],
body.dark-theme input[type="password"],
body.dark-theme input[type="date"],
body.dark-theme input[type="time"],
body.dark-theme input[type="datetime-local"],
body.dark-theme input[type="phone"],
body.dark-theme input[type="tel"],
body.dark-theme textarea,
body.dark-theme select {
    background: var(--glass-void);
    color: var(--text-dark);
    border-color: var(--glass-edge);
    caret-color: #0097b2;
}

body.dark-theme input[type="text"]::placeholder,
body.dark-theme input[type="number"]::placeholder,
body.dark-theme input[type="email"]::placeholder,
body.dark-theme input[type="password"]::placeholder,
body.dark-theme textarea::placeholder {
    color: #888;
}

body.dark-theme input[type="text"]:focus,
body.dark-theme input[type="number"]:focus,
body.dark-theme input[type="email"]:focus,
body.dark-theme input[type="password"]:focus,
body.dark-theme input[type="date"]:focus,
body.dark-theme input[type="time"]:focus,
body.dark-theme input[type="datetime-local"]:focus,
body.dark-theme input[type="phone"]:focus,
body.dark-theme input[type="tel"]:focus,
body.dark-theme textarea:focus,
body.dark-theme select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #0097b2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 151, 178, 0.28);
}

/* Dark theme - Label */
body.dark-theme label {
    color: #ffffff;
}

/* ==================== GLOBAL DROPDOWN STYLE ==================== */
select,
.filter-select,
.form-select,
.form-group select {
    background: transparent !important;
    border: 2px solid var(--primary) !important;
    border-radius: 999px !important;
    color: var(--text-dark) !important;
    transition: border-color 0.2s, box-shadow 0.2s, color 0.2s !important;
}

select:focus,
.filter-select:focus,
.form-select:focus,
.form-group select:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 151, 178, 0.2) !important;
}

body.dark-theme select,
body.dark-theme .filter-select,
body.dark-theme .form-select,
body.dark-theme .form-group select {
    background: transparent !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}

select option {
    background: #ffffff;
    color: #111827;
}

body.dark-theme select option {
    background: #1f2937;
    color: #ffffff;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .units-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .search-box {
        margin-bottom: 10px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .alphabet-btn {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
    
    #adminThemeSwitch {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==================== UTILITY CLASSES ==================== */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.bg-primary {
    background: var(--primary);
    color: white;
}

.bg-secondary {
    background: var(--secondary);
    color: var(--text-dark);
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

/* ==================== SMART PRODUCT SELECTION STYLES ==================== */

/* Selector groups */
.selector-group {
    margin-bottom: 15px;
}

.selector-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selector-option {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.selector-option:hover {
    border-color: #0097b2;
    background: #f0f9ff;
}

.selector-option.active {
    border-color: #0097b2;
    background: #0097b2;
    color: white;
}

/* Price/Stock matrix tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

table th {
    background: #f0f9ff;
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #0097b2;
}

table td {
    border: 1px solid #ddd;
    padding: 10px;
}

table input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

table input:focus {
    border-color: #0097b2;
    outline: none;
    background: #f8fbff;
}

.p-10 {
    padding: 10px;
}

.p-20 {
    padding: 20px;
}

/* ==================== RESPONSIVE GRID ==================== */

/* Mahsulotlar grid - asosiy (telefon) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Planshet (768px dan 1024px gacha) */
@media (min-width: 768px) and (max-width: 1024px) {
    .modal-content {
        width: 95%;
    }
    
    #productsGrid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px;
    }
    
    .product-card {
        padding: 12px;
    }
}

/* Kichik desktop (1024px dan 1366px gacha) */
/*@media (min-width: 1024px) and (max-width: 1366px) {
    #productsGrid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
}*/

/* Katta desktop (1366px dan katta) */
/*@media (min-width: 1366px) {
    #productsGrid {
        grid-template-columns: repeat(5, 1fr);
        gap: 18px;
    }
    
    .product-card {
        padding: 15px;
    }
    
    .product-card img {
        height: 150px;
    }
}*/

/* Modal o'lchamlarini ham moslashtirish */
@media (min-width: 1366px) {
    #customerOrderModal .modal-content {
        width: 1200px;
        max-width: 90%;
    }
}
/* ==================== BUYURTMALAR AMALLAR UCHUN ==================== */

/* Action icons container */
.orders-action-icons {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    min-width: 180px;
}

/* Individual action button */
.order-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    border: 1px solid var(--border);
    color: var(--gray);
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.order-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.order-action-btn i {
    font-size: 1.1rem;
}

/* Action button colors */
.order-action-btn.accept {
    color: #10b981;
    border-color: #10b981;
}

.order-action-btn.accept:hover {
    background: #10b981;
    color: white;
}

.order-action-btn.view {
    color: var(--primary);
    border-color: var(--primary);
}

.order-action-btn.view:hover {
    background: var(--primary);
    color: white;
}

.order-action-btn.reject {
    color: #ef4444;
    border-color: #ef4444;
}

.order-action-btn.reject:hover {
    background: #ef4444;
    color: white;
}

.order-action-btn.edit {
    color: var(--primary);
    border-color: var(--primary);
}

.order-action-btn.edit:hover {
    background: var(--primary);
    color: white;
}

.order-action-btn.truck {
    color: #f59e0b;
    border-color: #f59e0b;
}

.order-action-btn.truck:hover {
    background: #f59e0b;
    color: white;
}

.order-action-btn.print {
    color: #6b7280;
    border-color: #6b7280;
}

.order-action-btn.print:hover {
    background: #6b7280;
    color: white;
}

.order-action-btn.cog {
    color: var(--primary);
    border-color: var(--primary);
}

.order-action-btn.cog:hover {
    background: var(--primary);
    color: white;
}

.order-action-btn.check {
    color: #10b981;
    border-color: #10b981;
}

.order-action-btn.check:hover {
    background: #10b981;
    color: white;
}

.order-action-btn.times {
    color: #ef4444;
    border-color: #ef4444;
}

.order-action-btn.times:hover {
    background: #ef4444;
    color: white;
}

/* Tooltip for action buttons */
.order-action-btn[data-tooltip] {
    position: relative;
}

.order-action-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    margin-bottom: 8px;
    z-index: 1000;
}

.order-action-btn[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    margin-bottom: -2px;
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .2s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .2s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #0097b2;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Sozlamalar — boshidagi foydalanuvchi profili */
.settings-profile-wrap {
    margin-bottom: 18px;
}

.settings-profile-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--white);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.settings-profile-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(145deg, var(--primary, #0097b2), #0d9488);
    box-shadow: 0 2px 10px rgba(0, 151, 178, 0.28);
}

.settings-profile-text {
    flex: 1;
    min-width: 0;
}

.settings-profile-kicker {
    margin: 0 0 4px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    font-weight: 600;
}

.settings-profile-name {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.settings-profile-sub {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.settings-profile-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(0, 151, 178, 0.12);
    color: #0e7490;
    border: 1px solid rgba(0, 151, 178, 0.22);
}

.settings-profile-meta {
    font-size: 0.82rem;
    color: var(--text-light);
}

.settings-profile-actions {
    flex-shrink: 0;
    margin-left: auto;
}

@media (max-width: 600px) {
    .settings-profile-card {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-profile-actions {
        margin-left: 0;
    }

    .settings-profile-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

body.dark-theme .settings-profile-card {
    background: var(--glass-surface, rgba(22, 30, 48, 0.58));
    border-color: var(--glass-edge, rgba(255, 255, 255, 0.1));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

body.dark-theme .settings-profile-name {
    color: var(--text-dark);
}

body.dark-theme .settings-profile-badge {
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.28);
}

/* Settings tabs */
.settings-tab {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== BUYURTMALAR JADVALI (#ordersTable) ==================== */
/* Vertikal chegaralarsiz — qatorlar orasidagi yagona gorizontal chiziq */
#ordersTable th,
#ordersTable td {
    border-left: none;
    border-right: none;
}

#ordersTable th {
    border-bottom: 1px solid var(--border);
}

#ordersTable td {
    border-bottom: 1px solid var(--border);
}

#ordersTable tbody tr:last-child td {
    border-bottom: 1px solid var(--border);
}

.orders-table tbody tr.orders-table__row {
    transition: background-color 0.2s, box-shadow 0.2s;
}

.orders-table tbody tr:hover {
    background-color: rgba(0, 151, 178, 0.05) !important;
}

/* Yangi (kutilmoqda): chap rangli tor chiziq + «lip‑lip» */
.orders-table tbody tr.orders-table__row--blink {
    animation: ordersStripeBlink 1.25s ease-in-out infinite;
}

@keyframes ordersStripeBlink {
    0%, 100% {
        box-shadow: inset 5px 0 0 #d97706;
    }
    50% {
        box-shadow: inset 5px 0 0 rgba(217, 119, 6, 0.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    .orders-table tbody tr.orders-table__row--blink {
        animation: none;
        box-shadow: inset 5px 0 0 var(--order-stripe, #d97706);
    }
}

.orders-table .sla-indicator {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
}

/* Categories */
.categories-wrap {
    padding: 0 12px 6px;
}

.categories-section {
    padding: 0 0 4px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    display: flex;
    align-items: center;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
}

.categories-section::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 5px 12px;
    min-height: 28px;
    font-size: 0.78rem;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-light);
    flex: 0 0 auto;
}

#subCategoriesSection {
    padding-top: 1px;
}

.category-item:hover {
    background: rgba(0,151,178,0.05);
}

.category-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ==================== ADMIN CHAT ==================== */

/* Header tugmalari */
.admin-chat-header-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 8px;
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.admin-chat-header-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.admin-chat-header-btn:active { transform: scale(0.93); }

/* Unread badge */
.admin-chat-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: white;
    border-radius: 100px;
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    padding: 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

/* Overlay */
.admin-chat-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1198;
}
.admin-chat-overlay.open,
.admin-chat-panel.open ~ .admin-chat-overlay { display: block; }

/* Side panel */
.admin-chat-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: min(420px, 100vw);
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}
.admin-chat-panel.open { right: 0; }
.admin-chat-panel.open + .admin-chat-overlay { display: block; }

/* Panel header */
.admin-chat-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 5;
}
.admin-chat-panel-header h3 {
    flex: 1;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-panel-close, .admin-back-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: var(--bg);
    border-radius: 8px;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.15s;
}
.admin-panel-close:hover, .admin-back-btn:hover { background: #fee2e2; color: #ef4444; }

/* Conversations list */
.admin-conv-search-wrap {
    margin: 10px 10px 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-conv-search-wrap i {
    color: var(--text-dim);
    font-size: 0.82rem;
}
.admin-conv-search-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-dark);
    font-size: 0.86rem;
}

.admin-conv-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.admin-conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}
.admin-conv-item:hover { background: var(--bg); }
.admin-conv-item.unread { background: rgba(0,151,178,0.06); }
.admin-conv-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #007a94));
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.admin-conv-body { flex: 1; min-width: 0; }
.admin-conv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}
.admin-conv-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-conv-time {
    font-size: 0.73rem;
    color: var(--text-dim);
    flex-shrink: 0;
}
.admin-conv-preview {
    font-size: 0.82rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-conv-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 3px;
    font-size: 0.75rem;
    color: var(--text-dim);
}
.admin-conv-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-conv-badge {
    background: var(--primary);
    color: white;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Individual chat messages */
.admin-msg-list {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f7f8fa;
}
.admin-msg {
    display: flex;
    max-width: 80%;
}
.admin-msg.mine  { align-self: flex-end; }
.admin-msg.theirs { align-self: flex-start; }

.admin-bubble {
    padding: 10px 14px 6px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.admin-msg.mine .admin-bubble  { background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.admin-msg.theirs .admin-bubble { background: white; color: #1a1a2e; border-bottom-left-radius: 4px; }
.admin-bubble p { margin: 0 0 4px; font-size: 0.9rem; line-height: 1.4; word-break: break-word; }
.admin-msg-time { font-size: 0.68rem; opacity: 0.65; display: block; text-align: right; }
.admin-chat-img {
    width: 100%;
    max-width: 220px;
    border-radius: 10px;
    margin: 6px 0;
    display: block;
}

/* Input area */
.admin-chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 14px;
    background: var(--white);
    border-top: 1px solid var(--border);
}
.admin-chat-textarea {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.9rem;
    resize: none;
    outline: none;
    background: var(--bg);
    color: var(--text-dark);
    max-height: 80px;
    overflow-y: auto;
    transition: border-color 0.2s;
    font-family: inherit;
}
.admin-chat-textarea:focus { border-color: var(--primary); }
.admin-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}
.admin-send-btn:hover  { background: var(--primary-dark, #007a94); }
.admin-send-btn:active { transform: scale(0.92); }
.admin-attach-btn {
    background: var(--bg);
    color: var(--primary);
}
.admin-attach-btn:hover {
    background: var(--bg);
    color: var(--primary-dark, #007a94);
}

.admin-chat-pending-preview {
    padding: 8px 14px 0;
    background: var(--white);
}

.admin-chat-pending-preview-card {
    position: relative;
    width: fit-content;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 6px;
    background: var(--bg);
}

.admin-chat-pending-preview-card img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.admin-chat-pending-preview-name {
    margin-top: 6px;
    max-width: 170px;
    font-size: 0.72rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-chat-pending-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: #ef4444;
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Broadcast modal */
.admin-broadcast-modal-content {
    background: var(--white);
    border-radius: 16px;
    width: min(920px, 96vw);
    max-height: 92vh;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: scaleIn 0.25s ease;
    display: flex;
    flex-direction: column;
}
@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.admin-broadcast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #007a94));
    color: white;
}
.admin-broadcast-header h3 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.admin-modal-close {
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.2s;
}
.admin-modal-close:hover { background: rgba(255,255,255,0.35); }
.admin-broadcast-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}
.admin-broadcast-body .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.admin-broadcast-body label {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--text-dim);
}
.admin-broadcast-body .form-control {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.92rem;
    outline: none;
    background: var(--bg);
    color: var(--text-dark);
    transition: border-color 0.2s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}
.admin-broadcast-body .form-control:focus { border-color: var(--primary); }

.admin-broadcast-submit-row {
    display: flex;
    gap: 10px;
}
.admin-broadcast-submit-row #broadcastCancelEditBtn {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text-dark);
    padding: 10px 14px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.admin-broadcast-history-wrap {
    margin-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.admin-broadcast-history-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.admin-broadcast-history-list {
    max-height: 340px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
}
.admin-broadcast-history-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: var(--bg);
}
.admin-broadcast-history-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 6px;
}
.admin-broadcast-history-head strong {
    font-size: 0.85rem;
    color: var(--text-dark);
}
.admin-broadcast-history-head span {
    font-size: 0.72rem;
    color: var(--text-dim);
    white-space: nowrap;
}
.admin-broadcast-history-text {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.35;
    white-space: pre-wrap;
}
.admin-broadcast-history-footer {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.admin-broadcast-history-meta {
    font-size: 0.75rem;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.admin-broadcast-actions {
    display: flex;
    gap: 6px;
}
.admin-broadcast-action {
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-dark);
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.admin-broadcast-action.edit { color: #1d4ed8; }
.admin-broadcast-action.delete { color: #b91c1c; }
.admin-broadcast-empty {
    font-size: 0.82rem;
    color: var(--text-dim);
    padding: 8px 2px;
}

/* File upload */
#broadcastFileDropZone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
}
#broadcastFileDropZone:hover {
    border-color: var(--primary);
    background: var(--primary);
    background: rgba(0, 102, 204, 0.05);
}
#broadcastFileDropZone i {
    font-size: 28px;
    color: #888;
    margin-bottom: 8px;
    display: block;
}
#broadcastFilePreview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 10px;
}
#broadcastFilePreview > div {
    width: 80px;
    height: 80px;
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    overflow: hidden;
}

body.dark-theme #broadcastFileDropZone {
    border-color: #30363d;
    background: #0d1117;
}
body.dark-theme #broadcastFileDropZone:hover {
    background: rgba(88, 166, 255, 0.1);
}
body.dark-theme #broadcastFilePreview > div {
    background: #161b22;
    border-color: #30363d;
}

/* Empty state */
.admin-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--text-dim);
}
.admin-chat-empty i { font-size: 2.5rem; opacity: 0.25; }
.admin-chat-empty p { margin: 0; font-size: 0.9rem; }

/* Dark theme */
body.dark-theme .admin-chat-panel,
body.dark-theme .admin-broadcast-modal-content { background: #161b22; }
body.dark-theme .admin-conv-search-wrap { background: #0d1117; border-color: #30363d; }
body.dark-theme .admin-conv-search-wrap i { color: #8b949e; }
body.dark-theme .admin-conv-search-input { color: #e6edf3; }
body.dark-theme .admin-conv-item:hover { background: #1c2128; }
body.dark-theme .admin-conv-item.unread { background: #1a2a30; }
body.dark-theme .admin-conv-meta { color: #8b949e; }
body.dark-theme .admin-msg-list { background: #0d1117; }
body.dark-theme .admin-msg.theirs .admin-bubble { background: #161b22; color: #e6edf3; }
body.dark-theme .admin-chat-input-area,
body.dark-theme .admin-chat-panel-header { background: #161b22; border-color: #30363d; }
body.dark-theme .admin-chat-pending-preview { background: #161b22; }
body.dark-theme .admin-chat-pending-preview-card { background: #0d1117; border-color: #30363d; }
body.dark-theme .admin-chat-pending-preview-name { color: #8b949e; }
body.dark-theme .admin-chat-textarea,
body.dark-theme .admin-broadcast-body .form-control { background: #0d1117; color: #e6edf3; border-color: #30363d; }
body.dark-theme .admin-attach-btn { background: #0d1117; color: #58a6ff; }
body.dark-theme .admin-broadcast-history-item { background: #0d1117; border-color: #30363d; }
body.dark-theme .admin-broadcast-history-title,
body.dark-theme .admin-broadcast-history-head strong { color: #e6edf3; }
body.dark-theme .admin-broadcast-history-head span,
body.dark-theme .admin-broadcast-history-text,
body.dark-theme .admin-broadcast-empty { color: #8b949e; }
body.dark-theme .admin-broadcast-action { background: #161b22; border-color: #30363d; color: #c9d1d9; }
body.dark-theme .admin-broadcast-action.edit { color: #79c0ff; }
body.dark-theme .admin-broadcast-action.delete { color: #ff7b72; }
body.dark-theme .admin-broadcast-submit-row #broadcastCancelEditBtn { background: #161b22; border-color: #30363d; color: #c9d1d9; }
/* Customer Detail Panel Dark Theme */
body.dark-theme #customerDetailPanel { 
    background: #0d1117; 
    border-color: #30363d; 
    color: #e6edf3;
}
body.dark-theme #customerDetailPanel h3,
body.dark-theme #customerDetailPanel h4 { 
    color: #e6edf3; 
}
body.dark-theme #customerDetailPanel small { 
    color: #8b949e; 
}
body.dark-theme #customerDetailPanel button[onclick*="editCustomer"],
body.dark-theme #customerDetailPanel button[onclick*="showBalanceModal"] { 
    background: var(--primary) !important; 
}
body.dark-theme #customerDetailPanel button[onclick*="deleteCustomer"] { 
    background: var(--danger) !important; 
}

/* Dark Theme Table Styling */
body.dark-theme .products-table-card {
    background: var(--glass-surface);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
    border: 1px solid var(--glass-edge);
}

body.dark-theme .products-data-table thead {
    background: var(--glass-void);
    border-bottom-color: var(--glass-edge);
}

body.dark-theme .products-data-table th {
    color: var(--primary-light);
    background: var(--glass-void);
    border-bottom-color: var(--glass-edge);
}

body.dark-theme .products-data-table td {
    color: #cfd7e8;
    border-bottom-color: var(--glass-edge);
}

body.dark-theme .products-data-table tbody tr {
    border-left-color: transparent;
    background: rgba(22, 30, 50, 0.35);
}

body.dark-theme .products-data-table tbody tr.status-active {
    border-left-color: #238636;
}

body.dark-theme .products-data-table tbody tr.status-inactive {
    border-left-color: #da3633;
}

body.dark-theme .products-data-table tbody tr.status-restricted {
    border-left-color: #d4a574;
}

body.dark-theme .products-data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .product-row-number {
    color: #8b949e;
}

body.dark-theme .product-cell-name {
    color: #e6edf3;
}

body.dark-theme .product-cell-sku {
    color: #8b949e;
}

body.dark-theme .product-variants {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    border-left-color: var(--primary);
}

body.dark-theme .category-badge {
    opacity: 0.9;
}

body.dark-theme .status-badge {
    opacity: 0.95;
}

body.dark-theme .stock-value {
    color: var(--primary-light);
}

/* Dark Theme Products Filter Bar */
body.dark-theme .products-filter-bar {
    background: transparent;
}

body.dark-theme .search-box {
    background: var(--glass-void);
    border-color: var(--glass-edge);
}

body.dark-theme .search-box i {
    color: #8b949e;
}

body.dark-theme .search-box input {
    color: #e6edf3;
}

body.dark-theme .search-box input::placeholder {
    color: #8b949e;
}

body.dark-theme .filter-select {
    background: var(--glass-void);
    color: var(--text-dark);
    border-color: var(--glass-edge);
}

body.dark-theme .filter-select:hover {
    border-color: var(--primary-light);
}

body.dark-theme .filter-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(0, 151, 178, 0.18);
}

/* Dark Theme Products Top Bar */
body.dark-theme .products-title-section h2 {
    color: #e6edf3;
}

body.dark-theme .product-count {
    color: #8b949e;
}

/* Dark Theme Modal Text */
body.dark-theme .modal-content h2,
body.dark-theme .modal-header h2 {
    color: var(--primary-light);
}

body.dark-theme .form-group label {
    color: #e6edf3;
}

body.dark-theme .form-group input,
body.dark-theme .form-group select,
body.dark-theme .form-group textarea {
    background: var(--glass-void);
    color: var(--text-dark);
    border-color: var(--glass-edge);
}

body.dark-theme .stat-card {
    background: var(--glass-surface);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-color: var(--glass-edge);
}

body.dark-theme .stat-number {
    color: var(--primary-light);
}

body.dark-theme .stat-title {
    color: var(--text-light);
}

/* Dark Theme Staff List Table */
body.dark-theme #staffList tr {
    background: #161b22 !important;
    border-bottom-color: #30363d !important;
}

body.dark-theme #staffList tr:hover {
    background: #0d1117 !important;
}

body.dark-theme #staffList td {
    color: #e6edf3 !important;
    border-bottom-color: #30363d !important;
}

body.dark-theme #staffList td div[style*="font-weight: 600"] {
    color: #e6edf3 !important;
}

body.dark-theme #staffList td div[style*="color: #0f172a"] {
    color: #e6edf3 !important;
}

body.dark-theme #staffList td div[style*="color: #475569"] {
    color: #c9d1d9 !important;
}

body.dark-theme #staffList td div[style*="color: #94a3b8"] {
    color: #8b949e !important;
}

body.dark-theme #staffList td span[style*="background: #f1f5f9"] {
    background: #30363d !important;
    color: #e6edf3 !important;
}

body.dark-theme #staffList td span[style*="color: #475569"] {
    color: #c9d1d9 !important;
}

/* Force all nested text in staff list to be readable */
body.dark-theme #staffList td * {
    color: inherit !important;
}
body.dark-theme #staffList td {
    color: #e6edf3 !important;
}
body.dark-theme #staffList td span[style*="background: #f1f5f9"],
body.dark-theme #staffList td span[style*="background: #f1f5f9; color"] {
    background: #21262d !important;
    color: #c9d1d9 !important;
}

/* ==================== STAFF PERMISSIONS SELECTOR ==================== */
#staffPermissionsList {
    animation: permissionsSlideIn 0.4s ease-out;
}

@keyframes permissionsSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#staffPermissionsList label {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#staffPermissionsList label:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
}

#staffPermissionsList label:active {
    transform: translateY(0);
}

/* Dark Theme Staff Permissions */
body.dark-theme #staffPermissionsList label {
    background: #161b22 !important;
    border-color: #30363d !important;
    color: #c9d1d9;
}

body.dark-theme #staffPermissionsList label:hover {
    border-color: #58a6ff !important;
    background: #1c2128 !important;
}

body.dark-theme #staffPermissionsList label.permission-checked {
    border-color: #58a6ff !important;
    background: linear-gradient(135deg, #161b22 0%, rgba(88, 166, 255, 0.08) 100%) !important;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15), inset 0 0 12px rgba(88, 166, 255, 0.05) !important;
}

body.dark-theme #staffPermissionsList label.permission-unchecked {
    border-color: #30363d !important;
    background: #161b22 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

body.dark-theme #staffPermissionsList .product-cell-name {
    color: #e6edf3;
}

/* Light theme dark theme support */
body.dark-theme #staffPermissionsList {
    background: #0d1117;
}

body.dark-theme #staffPermissionsList label {
    background: #161b22 !important;
    border-color: #30363d !important;
    color: #e6edf3;
}

body.dark-theme #staffPermissionsList label:hover {
    border-color: #58a6ff !important;
    background: #1c2128 !important;
}

body.dark-theme #staffPermissionsList .fa-check {
    color: white;
}

/* Checkmark pulse animation */
@keyframes checkPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Permission button click animation */
@keyframes permissionButtonClick {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

/* Permission card glow animation */
@keyframes permissionGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* ==================== Hududlar ro'yxati sahifasi ==================== */
.locations-view-page {
    max-width: 1100px;
}

.locations-view-intro {
    background: linear-gradient(135deg, rgba(0, 151, 178, 0.08), rgba(126, 217, 87, 0.08));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

.locations-view-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.locations-view-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.locations-view-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.locations-view-search {
    padding-left: 40px !important;
}

.locations-view-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #64748b;
}

.locations-view-stat strong {
    color: var(--primary);
    font-weight: 700;
}

.locations-view-tree-wrap {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    padding: 12px 8px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.locations-view-tree {
    padding: 4px 8px 0;
}

.locations-view-loading,
.locations-view-error,
.locations-view-empty {
    padding: 24px;
    text-align: center;
    color: #64748b;
}

.locations-view-error {
    color: #b91c1c;
}

.lv-province,
.lv-district,
.lv-mfy {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fafbfc;
}

.lv-district {
    margin: 8px 8px 8px 12px;
    background: #fff;
}

.lv-mfy {
    margin: 8px 8px 8px 16px;
    background: #f8fafc;
}

.lv-province > summary,
.lv-district > summary,
.lv-mfy > summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1e293b;
    user-select: none;
}

.lv-province > summary::-webkit-details-marker,
.lv-district > summary::-webkit-details-marker,
.lv-mfy > summary::-webkit-details-marker {
    display: none;
}

.lv-province > summary::before,
.lv-district > summary::before,
.lv-mfy > summary::before {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: #94a3b8;
    width: 16px;
    text-align: center;
    transition: transform 0.2s;
}

.lv-province[open] > summary::before,
.lv-district[open] > summary::before,
.lv-mfy[open] > summary::before {
    transform: rotate(-180deg);
}

.lv-province-summary .lv-icon {
    color: var(--primary);
}

.lv-district-summary .lv-icon {
    color: #0d9488;
}

.lv-mfy-summary .lv-icon {
    color: #6366f1;
}

.lv-label {
    flex: 1;
    min-width: 0;
}

.lv-badge {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 999px;
}

.lv-province-body {
    padding: 4px 8px 12px 12px;
    border-top: 1px solid #eef2f7;
}

.lv-district-body {
    padding: 4px 4px 10px 8px;
    border-top: 1px solid #f1f5f9;
}

.lv-mfy-body {
    padding: 8px 12px 12px;
    border-top: 1px solid #e2e8f0;
}

.lv-mahalla-list {
    margin: 0;
    padding-left: 20px;
    color: #334155;
    font-size: 14px;
    line-height: 1.65;
}

.lv-mahalla-item {
    margin-bottom: 4px;
}

.lv-muted {
    margin: 8px 0 0;
    font-size: 13px;
    color: #94a3b8;
    font-style: italic;
}

.locations-view-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.locations-view-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
}

.locations-view-toolbar-stack {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

.locations-view-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.locations-view-province-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.locations-view-field-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.locations-view-province-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.locations-view-province-select {
    flex: 1;
    min-width: 200px;
    max-width: 420px;
}

.locations-view-icon-btn {
    min-width: 42px;
    padding-left: 12px;
    padding-right: 12px;
}

.locations-view-inline-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px dashed var(--primary);
    border-radius: 10px;
    background: #f0fdfa;
}

.locations-view-inline-input {
    min-width: 180px;
    flex: 1;
    max-width: 320px;
}

.locations-view-search-flex {
    flex: 1;
    min-width: 220px;
}

.lv-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.lv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: var(--primary);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.lv-btn:hover {
    background: #f0fdfa;
    border-color: var(--primary);
}

.lv-btn-del {
    color: #b91c1c;
    border-color: #fecaca;
}

.lv-btn-del:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.lv-btn-geo {
    color: #0d9488;
    border-color: #99f6e4;
}

.lv-btn-geo:hover {
    background: #f0fdfa;
    border-color: #2dd4bf;
}

.lv-pinned {
    color: #0d9488;
    margin-right: 4px;
}

.lv-geo-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(0, 151, 178, 0.06);
}

.lv-geo-bar-title {
    flex: 1 1 160px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.lv-geo-inp {
    width: 110px;
    max-width: 42%;
}

.lv-geo-bar-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 12px;
    width: 100%;
}

.lv-geo-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: flex-end;
}

.lv-geo-lab {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
}

.lv-geo-lab span {
    text-transform: lowercase;
}

.lv-geo-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.lv-geo-hint {
    width: 100%;
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-light);
}

.lv-geo-map {
    width: 100%;
    height: 260px;
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg);
}

.lv-geo-map .leaflet-container {
    font-family: inherit;
}

.lv-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #ecfeff;
    border: 1px solid #99f6e4;
}

.lv-inline-form .lv-inline-input {
    flex: 1;
    min-width: 160px;
    max-width: 280px;
}

.lv-mahalla-block {
    margin-top: 8px;
}

.lv-mahalla-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px 6px 8px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.lv-mahalla-row:hover {
    background: rgba(0, 151, 178, 0.07);
}

body.dark-theme .lv-mahalla-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.lv-mahalla-guides {
    width: 20px;
    flex-shrink: 0;
    border-left: 2px dotted #cbd5e1;
    min-height: 1.2em;
    margin-left: 4px;
}

.lv-label-plain {
    font-weight: 500;
    font-size: 14px;
}

.lv-icon-sm {
    font-size: 13px;
    color: #64748b;
}

/* ----- Hududlar: VS Code explorer uslubi ----- */
.locations-view-tagline {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.45;
    max-width: 520px;
}

.locations-view-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.locations-view-mini-stats {
    font-size: 12px;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lv-toolbar-explorer {
    flex-wrap: nowrap;
    align-items: center;
}

/* Hududlar explorer: fon shaffof, qolgan panel (locations-view-tree-wrap) temaga mos */
.locations-view-tree-wrap--explorer {
    padding: 0;
    background: transparent;
    border-color: var(--border);
    box-shadow: none;
    max-height: min(72vh, 720px);
    overflow-y: auto;
    overflow-x: hidden;
}

.lv-explorer-host {
    padding: 8px 6px 14px;
    min-height: 200px;
    font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    background: transparent;
}

.lv-explorer {
    color: var(--text-dark);
}

.lv-explorer .locations-view-empty,
.lv-explorer .locations-view-loading,
.lv-explorer .locations-view-error {
    color: var(--text-light);
    padding: 16px 12px;
    text-align: left;
}

.lv-explorer .locations-view-error {
    color: var(--danger);
}

.lv-node {
    user-select: none;
}

.lv-node-root {
    margin-bottom: 2px;
}

.lv-children {
    margin-left: 14px;
    padding: 0 0 2px 8px;
    border-left: 1px solid var(--border);
}

.lv-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 26px;
    padding: 2px 6px 2px 4px;
    border-radius: 4px;
    cursor: default;
}

.lv-row-folder {
    cursor: pointer;
}

.lv-row-folder:hover,
.lv-row-file:hover {
    background: rgba(0, 151, 178, 0.08);
}

body.dark-theme .lv-row-folder:hover,
body.dark-theme .lv-row-file:hover {
    background: rgba(255, 255, 255, 0.06);
}

.lv-row-root .lv-row-label {
    font-weight: 600;
    color: var(--text-dark);
}

.lv-chevron,
.lv-chevron-spacer {
    width: 18px;
    min-width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 9px;
}

.lv-row-folder .lv-chevron i {
    transition: transform 0.12s ease;
}

.lv-row-folder.is-open .lv-chevron i {
    transform: rotate(90deg);
}

.lv-row-icon {
    width: 20px;
    min-width: 20px;
    text-align: center;
    color: var(--primary);
}

.lv-row-file .lv-row-icon {
    color: var(--primary-light);
    font-size: 12px;
}

.lv-row-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-dark);
}

.lv-row-meta {
    font-size: 11px;
    color: var(--text-light);
    margin-right: 4px;
    flex-shrink: 0;
}

.lv-row-meta.muted {
    font-style: italic;
}

.lv-row-mfy {
    flex-wrap: wrap;
    row-gap: 2px;
}

.lv-mfy-fee {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 4px;
}

.lv-mfy-fee-lab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-size: 11px;
    color: var(--text-light);
    cursor: text;
}

.lv-mfy-fee-lab-t {
    white-space: nowrap;
}

.lv-mfy-fee-inp {
    width: 88px;
    max-width: 22vw;
    padding: 2px 6px;
    font-size: 12px;
    height: 26px;
    min-height: 26px;
}

.lv-explorer .lv-btn-fee-save {
    width: 26px;
    height: 26px;
    background: var(--primary);
    border-color: var(--primary-dark);
    color: #fff;
}

.lv-explorer .lv-btn-fee-save:hover {
    filter: brightness(1.05);
}

.lv-explorer .lv-actions {
    opacity: 1;
    flex-shrink: 0;
}

.lv-explorer .lv-btn {
    background: var(--white);
    border-color: var(--border);
    color: var(--primary);
    width: 26px;
    height: 26px;
}

.lv-explorer .lv-btn:hover {
    background: rgba(0, 151, 178, 0.1);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.lv-explorer .lv-btn-del {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.35);
}

.lv-explorer .lv-btn-del:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

.lv-inline-form--tree {
    margin: 4px 0 8px;
    padding: 8px 10px;
    background: rgba(0, 151, 178, 0.06);
    border: 1px solid var(--primary);
    border-radius: 8px;
    align-items: center;
}

body.dark-theme .lv-inline-form--tree {
    background: rgba(255, 255, 255, 0.04);
}

.lv-inline-form--root {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.lv-explorer .lv-inline-form--tree .form-input {
    background: var(--white);
    border-color: var(--border);
    color: var(--text-dark);
}

.lv-explorer .lv-inline-form--tree .btn-primary {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: #fff;
}

.lv-explorer .lv-inline-form--tree .btn-outline {
    border-color: var(--border);
    color: var(--text-dark);
}

/* Buyurtma batafsil modali — boshqaruv paneli */
.order-detail-toolbar {
    margin: -4px -4px 18px;
    padding: 14px 16px 16px;
    background: linear-gradient(145deg, rgba(0, 151, 178, 0.07) 0%, rgba(126, 217, 87, 0.06) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.order-detail-toolbar__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-detail-toolbar__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.order-detail-toolbar__row--secondary {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0, 151, 178, 0.25);
}

.order-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 9px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    background: var(--white);
    color: var(--text-dark);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.order-detail-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.order-detail-btn i {
    font-size: 14px;
    opacity: 0.92;
}

.order-detail-btn--primary {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
    color: #fff;
    border-color: var(--primary-dark);
}

.order-detail-btn--primary:hover {
    filter: brightness(1.03);
}

.order-detail-btn--accent {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    color: #fff;
    border-color: #b45309;
}

.order-detail-btn--success {
    background: linear-gradient(180deg, #34d399 0%, var(--success) 100%);
    color: #fff;
    border-color: #047857;
}

.order-detail-btn--warning {
    background: linear-gradient(180deg, #fbbf24 0%, var(--warning) 100%);
    color: #fff;
    border-color: #b45309;
}

.order-detail-btn--muted {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.order-detail-btn--ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-light);
    box-shadow: none;
}

.order-detail-btn--ghost:hover {
    background: rgba(0, 151, 178, 0.06);
    border-color: rgba(0, 151, 178, 0.35);
    color: var(--primary-dark);
}

.order-detail-btn--danger-outline {
    background: #fff;
    border-color: rgba(239, 68, 68, 0.45);
    color: #b91c1c;
}

.order-detail-btn--danger-outline:hover {
    background: #fef2f2;
}

.order-detail-btn--danger-solid {
    background: linear-gradient(180deg, #f87171 0%, var(--danger) 100%);
    color: #fff;
    border-color: #b91c1c;
}

body.dark-theme .order-detail-toolbar {
    background: linear-gradient(145deg, rgba(0, 151, 178, 0.12) 0%, rgba(126, 217, 87, 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

body.dark-theme .order-detail-toolbar__title {
    color: var(--primary-light);
}

body.dark-theme .order-detail-btn {
    background: #1e293b;
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .order-detail-btn--muted {
    background: #334155;
    color: #cbd5e1;
}

body.dark-theme .order-detail-btn--ghost:hover {
    background: rgba(0, 151, 178, 0.15);
}

/* ==================== Ta'minotchilar: ro'yxat (setkasiz, qatorlar orasida yagona chiziq) ==================== */
.suppliers-list-wrap.products-table {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 32px;
}

.suppliers-list-wrap.products-table table {
    margin-bottom: 0;
}

.suppliers-list-wrap.products-table th,
.suppliers-list-wrap.products-table td {
    border-left: none;
    border-right: none;
    border-top: none;
}

.suppliers-list-wrap.products-table th {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    padding: 10px 10px 10px 0;
    color: var(--primary);
}

.suppliers-list-wrap.products-table td {
    border-bottom: 1px solid var(--border);
    padding: 12px 10px 12px 0;
    vertical-align: middle;
}

.suppliers-list-wrap.products-table tbody tr:last-child td {
    border-bottom: none;
}

.suppliers-list-wrap.products-table tbody tr:hover td {
    background: rgba(0, 151, 178, 0.05);
}

.suppliers-list-wrap .suppliers-table__th-num,
.suppliers-list-wrap td.suppliers-table__num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.suppliers-list-wrap .suppliers-table__th-actions {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.suppliers-list-wrap .suppliers-table__row {
    cursor: pointer;
}

.suppliers-list-wrap .suppliers-table__sub {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 4px;
    font-weight: 400;
    line-height: 1.35;
    white-space: normal;
}

.suppliers-list-wrap .suppliers-table__meta {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
}

.suppliers-list-wrap .suppliers-table__code {
    font-size: 0.78rem;
    background: rgba(0, 151, 178, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

.suppliers-list-wrap .suppliers-table__bal-pos {
    color: #059669;
    font-weight: 600;
}

.suppliers-list-wrap .suppliers-table__bal-neg {
    color: #dc2626;
    font-weight: 600;
}

.suppliers-list-wrap .suppliers-table__actions .btn {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

body.dark-theme .suppliers-list-wrap .suppliers-table__sub {
    color: #94a3b8;
}

body.dark-theme .suppliers-list-wrap.products-table {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.dark-theme .suppliers-list-wrap.products-table th {
    background: transparent;
    border-bottom-color: var(--glass-edge);
}

body.dark-theme .suppliers-list-wrap.products-table td {
    border-bottom-color: rgba(148, 163, 184, 0.28);
}

body.dark-theme .suppliers-list-wrap.products-table tbody tr:hover td {
    background: rgba(0, 151, 178, 0.12);
}

body.dark-theme .suppliers-list-wrap .suppliers-table__code {
    background: rgba(56, 189, 248, 0.12);
    color: #e2e8f0;
}

.supplier-card-v2 {
    position: relative;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 0;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.supplier-card-v2:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 151, 178, 0.12);
}

.supplier-card-v2__accent {
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #22d3ee 50%, var(--secondary) 100%);
}

.supplier-card-v2__body {
    padding: 18px 18px 14px;
}

.supplier-card-v2__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.supplier-card-v2__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.supplier-card-v2__meta {
    font-size: 12px;
    color: #64748b;
}

.supplier-card-v2__badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

.supplier-card-v2__metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 16px 0 14px;
    padding: 14px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.supplier-card-v2__metric {
    text-align: center;
    padding: 8px 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e2e8f0;
}

.supplier-card-v2__metric-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 4px;
}

.supplier-card-v2__metric-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.supplier-card-v2__metric-value--balance-pos {
    color: #d97706;
}

.supplier-card-v2__metric-value--balance-neg {
    color: #059669;
}

.supplier-card-v2__metric-sub {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}

.supplier-card-v2__metric-value--income {
    color: #0369a1;
}

.supplier-card-v2__metric-value--paid {
    color: #059669;
}

/* Ta'minotchi kartasi: 3 qator — balans | ikki ombor yonma-yon | jami */
.supplier-card-v2__metrics.supplier-card-v2__metrics--with-storage {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.supplier-card-v2__metrics-stack-row {
    width: 100%;
    min-width: 0;
}

.supplier-card-v2__metrics-stack-row--storages .supplier-card-v2__storage-split {
    width: 100%;
}

@media (max-width: 420px) {
    .supplier-card-v2__metrics-stack-row--storages .supplier-card-v2__storage-split {
        grid-template-columns: 1fr;
    }
}

.supplier-card-v2__storage-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    min-width: 0;
}

.supplier-card-v2__storage {
    padding: 8px 8px;
    border-radius: 10px;
    text-align: left;
    border: 1px solid #e2e8f0;
    background: rgba(248, 250, 252, 0.95);
}

.supplier-card-v2__storage--own {
    border-color: rgba(14, 165, 233, 0.45);
}

.supplier-card-v2__storage--cons {
    border-color: rgba(245, 158, 11, 0.5);
}

.supplier-card-v2__storage-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 6px;
}

.supplier-card-v2__storage--own .supplier-card-v2__storage-badge {
    color: #0369a1;
}

.supplier-card-v2__storage--cons .supplier-card-v2__storage-badge {
    color: #b45309;
}

.supplier-card-v2__storage-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
}

.supplier-card-v2__storage-line--physical {
    margin-top: 5px;
    padding-bottom: 2px;
    border-bottom: 1px dashed #e2e8f0;
}

.supplier-card-v2__storage-val--physical {
    font-size: 12px;
    color: #0f172a;
}

.supplier-card-v2__metric-sub--physical {
    margin-top: 4px;
    font-size: 10px;
    color: #475569;
}

.supplier-card-v2__storage-val {
    font-size: 11px;
    font-weight: 700;
}

.supplier-card-v2__storage-val--own {
    color: #0369a1;
}

.supplier-card-v2__storage-val--own-paid {
    color: #059669;
}

.supplier-card-v2__storage-val--cons {
    color: #b45309;
}

.supplier-card-v2__storage-val--cons-paid {
    color: #ca8a04;
}

.supplier-card-v2__storage-foot {
    font-size: 9px;
    color: #94a3b8;
    margin-top: 6px;
}

/* Ta'minotchi kartasi (ixcham): balans + savdo + ikki ombor tannarx */
.supplier-card-v2--compact .supplier-card-v2__body {
    padding: 14px 14px 10px;
}

.supplier-card-v2--compact .supplier-card-v2__head {
    margin-bottom: 8px;
}

.supplier-card-v2__metrics.supplier-card-v2__metrics--compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0 8px;
    padding: 10px 0 8px;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.supplier-card-v2__metric--sold {
    text-align: center;
    width: 100%;
}

.supplier-card-v2__metric-value--sold {
    color: #0f766e;
    font-size: 1rem;
}

.supplier-card-v2__foot--hint {
    text-align: center;
    margin-top: 6px;
}

.supplier-card-v2__foot--hint small {
    color: #94a3b8;
    font-size: 11px;
}

.supplier-card-v2__contact {
    margin-bottom: 12px;
    font-size: 13px;
    color: #475569;
}

.supplier-card-v2__contact-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    align-items: flex-start;
}

.supplier-card-v2__contact-row:last-child {
    margin-bottom: 0;
}

.supplier-card-v2__contact-icon {
    color: var(--primary);
    width: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.supplier-card-v2__foot {
    margin-top: 10px;
}

.supplier-card-v2__foot small {
    color: #64748b;
}

.supplier-card-v2__foot code {
    font-size: 11px;
}

.supplier-card-v2__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.supplier-card-v2__btn-kirim {
    width: 100%;
    justify-content: center;
}

/* Ta'minotchi dashboard: boshqaruv va 3 nuqta menyusi */
.supplier-detail-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.supplier-detail-menu {
    position: relative;
}

.supplier-detail-menu__summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.supplier-detail-menu__summary::-webkit-details-marker {
    display: none;
}

.supplier-detail-dd {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    padding: 8px;
    z-index: 30;
}

.supplier-detail-dd__danger {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #b91c1c;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.supplier-detail-dd__danger:hover {
    background: #fef2f2;
}

.supplier-dash-kpi {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.supplier-dash-kpi--compact {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 0;
}

.supplier-dash-kpi__card {
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.supplier-dash-kpi__card--hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #0c4a6e 100%);
    color: #fff;
    border: none;
}

.supplier-dash-kpi__card--hero .supplier-dash-kpi__label {
    color: rgba(255, 255, 255, 0.75);
}

.supplier-dash-kpi__card--hero .supplier-dash-kpi__value {
    color: #fff;
}

.supplier-dash-kpi__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 600;
}

.supplier-dash-kpi__value {
    font-size: 1.35rem;
    font-weight: 800;
    margin-top: 6px;
    color: #0f172a;
}

.supplier-dash-kpi__hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 8px;
    line-height: 1.35;
}

.supplier-dash-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 22px 22px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
}

.supplier-dash-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
}

.supplier-dash-panel__title {
    margin: 0;
    font-size: 1.05rem;
    color: var(--primary);
    font-weight: 700;
}

.supplier-dash-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.supplier-dash-pill {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.supplier-dash-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.supplier-dash-pill--active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.supplier-dash-hint {
    font-size: 12px;
    color: #64748b;
    margin: 8px 0 0 0;
}

#supplierDetailsModal #supplierDetailTrendTitle {
    margin-top: 12px;
    margin-bottom: 6px;
}

#supplierDetailsModal .supplier-dash-panel {
    min-width: 0;
}

.supplier-dash-storage-intro {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 14px 0;
    line-height: 1.45;
}

.supplier-dash-storage-report {
    margin-bottom: 22px;
    padding: 14px 16px 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 40%);
}

.supplier-dash-storage-report--own {
    border-left: 4px solid #0ea5e9;
}

.supplier-dash-storage-report--cons {
    border-left: 4px solid #f59e0b;
}

.supplier-dash-subtitle--storage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}

.supplier-dash-subtitle--category {
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    color: #475569;
}

.supplier-dash-storage-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.supplier-dash-storage-badge--own {
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
    border: 1px solid rgba(14, 165, 233, 0.35);
}

.supplier-dash-storage-badge--cons {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.supplier-dash-storage-desc {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

/* Batafsil modal: tashqi konteynerda supplier-dash-kpi grid ishlatilmasin — bitta bolada bo'sh ustun qolardi */
.supplier-detail-stats-root {
    width: 100%;
    margin-bottom: 20px;
}

.supplier-detail-filtered-kpi {
    width: 100%;
    margin-top: 8px;
    margin-bottom: 0;
}

.supplier-detail-stats-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 0;
}

.supplier-detail-stats-stack .supplier-dash-kpi {
    margin-bottom: 0;
    width: 100%;
    min-width: 0;
}

.supplier-dash-kpi--row-hero {
    grid-template-columns: 1fr;
}

.supplier-dash-kpi--row-storage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.supplier-dash-kpi--row-bottom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

/* Ta'minotchi detail: umumiy — ikki ombor ustida, keng past qator */
/* .supplier-dash-kpi asosida display:grid — bu yerda gridni bekor qilish shart (aks holda ichki ustunlar ustma-ust chiqadi) */
.supplier-dash-kpi.supplier-dash-kpi--aggregate-bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    grid-template-columns: none;
    width: 100%;
    margin: 0 0 12px 0;
    padding: 8px 12px 6px;
    border-radius: 10px;
    box-sizing: border-box;
    background: linear-gradient(100deg, #0f172a 0%, #1e3a5f 42%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

.supplier-dash-kpi__aggregate-bar-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-wrap: nowrap;
    min-height: 0;
    width: 100%;
    min-width: 0;
}

.supplier-dash-kpi__aggregate-bar-title {
    flex: 0 0 auto;
    align-self: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    max-width: 7.5rem;
    line-height: 1.25;
    padding-right: 6px;
    border-right: 1px solid rgba(148, 163, 184, 0.35);
}

.supplier-dash-kpi__aggregate-bar-metrics {
    flex: 1 1 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 8px;
    align-items: stretch;
    min-width: 0;
    width: 100%;
}

.supplier-dash-kpi__aggregate-bar-cell {
    text-align: center;
    padding: 2px 6px;
    border-left: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.supplier-dash-kpi__aggregate-bar-cell:first-child {
    border-left: none;
}

.supplier-dash-kpi__aggregate-bar-lbl {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 2px;
    line-height: 1.2;
}

.supplier-dash-kpi__aggregate-bar-val {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.2;
    max-width: 100%;
    word-break: break-word;
}

.supplier-dash-kpi__aggregate-bar-val--muted {
    color: #cbd5e1;
}

.supplier-dash-kpi__aggregate-bar-val--sale {
    color: #5eead4;
}

.supplier-dash-kpi__aggregate-bar-note {
    font-size: 10px;
    color: #64748b;
    margin-top: 4px;
    padding-top: 3px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 720px) {
    .supplier-dash-kpi__aggregate-bar-row {
        flex-wrap: wrap;
    }
    .supplier-dash-kpi__aggregate-bar-title {
        max-width: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.25);
        padding: 0 0 4px 0;
        margin-bottom: 2px;
    }
    .supplier-dash-kpi__aggregate-bar-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .supplier-dash-kpi__aggregate-bar-cell {
        border-left: none;
        padding: 4px 2px;
    }
}

.supplier-detail-filtered-kpi > .supplier-dash-kpi {
    width: 100%;
    min-width: 0;
}

.supplier-dash-kpi__card--storage-own {
    border-left: 4px solid #0ea5e9;
    background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 100%);
}

.supplier-dash-kpi__card--storage-cons {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(145deg, #ffffff 0%, #fffbeb 100%);
}

.supplier-dash-kpi__storage-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #334155;
    margin-bottom: 8px;
}

.supplier-dash-kpi__value--physical {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.supplier-dash-kpi__value--own {
    color: #0369a1;
}

.supplier-dash-kpi__value--own-paid {
    color: #059669;
}

.supplier-dash-kpi__value--cons {
    color: #b45309;
}

.supplier-dash-kpi__value--cons-paid {
    color: #ca8a04;
}

.supplier-dash-kpi--period-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 0;
}

@media (max-width: 560px) {
    .supplier-dash-kpi--row-storage,
    .supplier-dash-kpi--period-split {
        grid-template-columns: 1fr;
    }
}

.supplier-dash-empty-msg {
    font-size: 13px;
    color: #64748b;
}

.supplier-dash-subtitle {
    margin: 20px 0 10px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
}

.supplier-dash-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.supplier-dash-table th {
    background: #f8fafc;
    font-size: 12px;
}

.supplier-dash-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.supplier-dash-cat {
    display: grid;
    grid-template-columns: minmax(100px, 160px) 1fr minmax(72px, 88px);
    align-items: center;
    gap: 12px;
}

.supplier-dash-cat__name {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.supplier-dash-cat__track {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.supplier-dash-cat__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary) 0%, #22d3ee 100%);
    min-width: 4px;
    transition: width 0.35s ease;
}

.supplier-dash-cat__sum {
    font-size: 13px;
    font-weight: 700;
    color: #0369a1;
    text-align: right;
}

.supplier-details-modal {
    width: 1040px;
    max-width: 98%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
}

.supplier-details-modal__subtitle {
    color: #64748b;
    font-size: 13px;
    margin: -6px 0 10px 0;
}

.supplier-details-modal__muted {
    font-size: 12px;
    color: #64748b;
    margin: -4px 0 8px 0;
}

.supplier-details-modal__section-title {
    color: var(--primary);
    margin: 18px 0 10px;
    font-size: 1.05rem;
    font-weight: 600;
}

.supplier-details-modal__section-title--profile {
    margin-top: 22px;
}

.supplier-details-modal__title-suffix {
    font-weight: 400;
    font-size: 15px;
    color: #64748b;
}

.supplier-detail-info {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    color: #1e293b;
}

.supplier-detail-info__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.supplier-detail-info strong {
    color: #0f172a;
    font-weight: 600;
}

.supplier-detail-info code {
    font-size: 11px;
    background: rgba(15, 23, 42, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    color: #334155;
}

.supplier-detail-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 20px;
}

#supplierDetailsModal .supplier-detail-data-table {
    width: 100%;
    min-width: 520px;
    margin: 0;
    border-collapse: collapse;
}

#supplierDetailsModal .supplier-detail-data-table--wide {
    min-width: 640px;
}

#supplierDetailsModal .supplier-detail-data-table th {
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

#supplierDetailsModal .supplier-detail-data-table td {
    padding: 10px 12px;
    font-size: 13px;
    color: #1e293b;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.supplier-detail-table-placeholder {
    text-align: center;
    padding: 16px;
    color: #64748b;
}

.supplier-detail-loading-block {
    text-align: center;
    padding: 12px;
    color: #64748b;
}

.supplier-detail-muted-inline {
    color: #64748b;
}

.supplier-detail-table-note {
    font-size: 12px;
    color: #475569;
}

.supplier-detail-product-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
}

.supplier-detail-product-row__img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.supplier-detail-product-row__main {
    flex: 1;
    min-width: 0;
}

.supplier-detail-product-row__title {
    font-weight: 600;
    color: var(--text-dark);
}

.supplier-detail-product-row__meta,
.supplier-detail-product-row__stock {
    font-size: 12px;
    color: #6b7280;
}

.supplier-detail-products-empty {
    padding: 12px;
    color: #64748b;
}

.supplier-detail-consignment-tag {
    color: #b45309;
}

body.dark-theme .supplier-detail-consignment-tag {
    color: #fbbf24;
}

/* Tungi rejim: ta'minotchi kartalari va dashboard */
body.dark-theme .supplier-card-v2 {
    background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

body.dark-theme .supplier-card-v2:hover {
    box-shadow: 0 12px 40px rgba(0, 151, 178, 0.22);
}

body.dark-theme .supplier-card-v2__title {
    color: #f1f5f9;
}

body.dark-theme .supplier-card-v2__meta {
    color: #94a3b8;
}

body.dark-theme .supplier-card-v2__metrics {
    border-color: #334155;
}

body.dark-theme .supplier-card-v2__metric {
    background: rgba(15, 23, 42, 0.65);
    border-color: #475569;
}

body.dark-theme .supplier-card-v2__metric-label {
    color: #94a3b8;
}

body.dark-theme .supplier-card-v2__metric-value {
    color: #e2e8f0;
}

body.dark-theme .supplier-card-v2__metric-value--balance-pos {
    color: #fbbf24;
}

body.dark-theme .supplier-card-v2__metric-value--balance-neg {
    color: #4ade80;
}

body.dark-theme .supplier-card-v2__metric-value--income {
    color: #38bdf8;
}

body.dark-theme .supplier-card-v2__metric-value--paid {
    color: #4ade80;
}

body.dark-theme .supplier-card-v2__storage {
    background: rgba(30, 41, 59, 0.55);
    border-color: #475569;
}

body.dark-theme .supplier-card-v2__storage--own {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(12, 74, 110, 0.25);
}

body.dark-theme .supplier-card-v2__storage--cons {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(120, 53, 15, 0.2);
}

body.dark-theme .supplier-card-v2__storage-line {
    color: #94a3b8;
}

body.dark-theme .supplier-card-v2__storage-line--physical {
    border-bottom-color: #475569;
}

body.dark-theme .supplier-card-v2__storage-val--physical {
    color: #f1f5f9;
}

body.dark-theme .supplier-card-v2__metric-sub--physical {
    color: #94a3b8;
}

body.dark-theme .supplier-dash-kpi__value--physical {
    color: #f1f5f9;
}

body.dark-theme .supplier-card-v2__storage--own .supplier-card-v2__storage-badge {
    color: #38bdf8;
}

body.dark-theme .supplier-card-v2__storage--cons .supplier-card-v2__storage-badge {
    color: #fbbf24;
}

body.dark-theme .supplier-card-v2__storage-val--own {
    color: #38bdf8;
}

body.dark-theme .supplier-card-v2__storage-val--own-paid {
    color: #4ade80;
}

body.dark-theme .supplier-card-v2__storage-val--cons {
    color: #fbbf24;
}

body.dark-theme .supplier-card-v2__storage-val--cons-paid {
    color: #fcd34d;
}

body.dark-theme .supplier-card-v2__storage-foot {
    color: #64748b;
}

body.dark-theme .supplier-card-v2__metric-sub {
    color: #64748b;
}

body.dark-theme .supplier-card-v2__contact {
    color: #cbd5e1;
}

body.dark-theme .supplier-card-v2__foot small {
    color: #94a3b8;
}

body.dark-theme .supplier-card-v2__foot code {
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
}

body.dark-theme .supplier-card-v2 .btn-outline {
    background: #1e293b;
    color: #7dd3fc;
    border-color: #0e7490;
}

body.dark-theme .supplier-card-v2 .btn-outline:hover {
    background: rgba(14, 116, 144, 0.35);
    color: #e0f2fe;
    border-color: var(--primary-light);
}

body.dark-theme .supplier-dash-kpi__card {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}

body.dark-theme .supplier-dash-kpi__card--hero {
    background: linear-gradient(135deg, #0c1929 0%, #134e4a 50%, #164e63 100%);
}

body.dark-theme .supplier-dash-kpi__label {
    color: #94a3b8;
}

body.dark-theme .supplier-dash-kpi__value {
    color: #f1f5f9;
}

body.dark-theme .supplier-dash-kpi__hint {
    color: #64748b;
}

body.dark-theme .supplier-dash-panel {
    background: #1a1a1a;
    border-color: #333333;
}

body.dark-theme .supplier-dash-panel__title {
    color: var(--primary-light);
}

body.dark-theme .supplier-dash-pill {
    background: #2a2a2a;
    border-color: #444444;
    color: #e2e8f0;
}

body.dark-theme .supplier-dash-pill:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

body.dark-theme .supplier-dash-pill--active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

body.dark-theme .supplier-dash-hint,
body.dark-theme .supplier-dash-subtitle {
    color: #94a3b8;
}

body.dark-theme .supplier-dash-empty-msg {
    color: #94a3b8;
}

body.dark-theme .supplier-dash-storage-intro,
body.dark-theme .supplier-dash-storage-desc {
    color: #94a3b8;
}

body.dark-theme .supplier-dash-storage-report {
    background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
    border-color: #333333;
}

body.dark-theme .supplier-dash-storage-report--own {
    border-left-color: #38bdf8;
}

body.dark-theme .supplier-dash-storage-report--cons {
    border-left-color: #fbbf24;
}

body.dark-theme .supplier-dash-storage-badge--own {
    background: rgba(14, 165, 233, 0.15);
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.35);
}

body.dark-theme .supplier-dash-storage-badge--cons {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.35);
}

body.dark-theme .supplier-dash-subtitle--category {
    color: #94a3b8;
}

body.dark-theme .supplier-dash-kpi__card--storage-own {
    background: linear-gradient(145deg, #1e293b 0%, #0c1929 100%);
    border-color: #334155;
    border-left-color: #38bdf8;
}

body.dark-theme .supplier-dash-kpi__card--storage-cons {
    background: linear-gradient(145deg, #1e293b 0%, #1c1410 100%);
    border-color: #334155;
    border-left-color: #fbbf24;
}

body.dark-theme .supplier-dash-kpi__storage-title {
    color: #cbd5e1;
}

body.dark-theme .supplier-dash-kpi__value--own {
    color: #38bdf8;
}

body.dark-theme .supplier-dash-kpi__value--own-paid {
    color: #4ade80;
}

body.dark-theme .supplier-dash-kpi__value--cons {
    color: #fbbf24;
}

body.dark-theme .supplier-dash-kpi__value--cons-paid {
    color: #fcd34d;
}

body.dark-theme .supplier-dash-table-wrap {
    border-color: #444444;
}

body.dark-theme .supplier-dash-table th {
    background: #2a2a2a;
    color: #e2e8f0;
}

body.dark-theme .supplier-dash-table td {
    color: #e2e8f0;
    border-color: #333333;
}

body.dark-theme .supplier-dash-cat__name {
    color: #cbd5e1;
}

body.dark-theme .supplier-dash-cat__track {
    background: #334155;
}

body.dark-theme .supplier-dash-cat__sum {
    color: #38bdf8;
}

body.dark-theme .supplier-details-modal {
    border-color: #333333;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
}

body.dark-theme .supplier-details-modal__subtitle,
body.dark-theme .supplier-details-modal__muted,
body.dark-theme .supplier-details-modal__title-suffix {
    color: #94a3b8;
}

body.dark-theme .supplier-details-modal__section-title {
    color: var(--primary-light);
}

body.dark-theme .supplier-detail-info {
    background: #252525;
    border-color: #3a3a3a;
    color: #e2e8f0;
}

body.dark-theme .supplier-detail-info strong {
    color: #f1f5f9;
}

body.dark-theme .supplier-detail-info code {
    background: rgba(0, 0, 0, 0.35);
    color: #e2e8f0;
}

body.dark-theme .supplier-detail-table-wrap {
    border-color: #3a3a3a;
    background: #141414;
}

body.dark-theme #supplierDetailsModal .supplier-detail-data-table th {
    background: #2a2a2a;
    color: #e2e8f0;
    border-bottom-color: #444444;
}

body.dark-theme #supplierDetailsModal .supplier-detail-data-table td {
    color: #e2e8f0;
    border-bottom-color: #333333;
}

body.dark-theme .supplier-detail-table-placeholder,
body.dark-theme .supplier-detail-loading-block,
body.dark-theme .supplier-detail-muted-inline {
    color: #94a3b8;
}

body.dark-theme .supplier-detail-table-note {
    color: #94a3b8;
}

body.dark-theme .supplier-detail-product-row {
    border-color: #3a3a3a;
    background: #252525;
}

body.dark-theme .supplier-detail-product-row__title {
    color: #f1f5f9;
}

body.dark-theme .supplier-detail-product-row__meta,
body.dark-theme .supplier-detail-product-row__stock {
    color: #94a3b8;
}

body.dark-theme .supplier-detail-products-empty {
    color: #94a3b8;
}

body.dark-theme .supplier-detail-dd {
    background: #1e293b;
    border-color: #475569;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

body.dark-theme .supplier-detail-dd__danger {
    color: #fca5a5;
}

body.dark-theme .supplier-detail-dd__danger:hover {
    background: rgba(185, 28, 28, 0.25);
}

/* ==================== Kirim modali (Mahsulot kirimi) ==================== */
.income-modal-content {
    width: 1040px;
    max-width: 98%;
    max-height: 88vh;
    overflow-y: auto;
}

.income-modal-section-title {
    color: var(--primary);
    margin: 18px 0 15px;
    font-size: 1.05rem;
    font-weight: 600;
}

.income-modal-section-title--tight {
    margin-bottom: 10px;
}

.income-modal-selected-products {
    margin-bottom: 20px;
}

.income-modal-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.income-modal-product-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.income-modal-product-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(0, 151, 178, 0.12);
}

.income-modal-product-card--selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 151, 178, 0.2);
}

.income-modal-product-thumb img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
    display: block;
}

.income-modal-product-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-top: 8px;
    line-height: 1.25;
}

.income-modal-product-unit {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

.income-modal-product-tan {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 6px;
}

.income-modal-product-tan-val {
    font-weight: 600;
    color: var(--text-dark);
}

.income-modal-product-tan--ombor {
    font-size: 0.72rem;
    margin-top: 4px;
    color: #64748b;
}

.income-modal-product-picked {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

.income-modal-empty {
    padding: 18px 16px;
    text-align: center;
    color: var(--text-light);
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.02);
}

.income-modal-empty--fullwidth {
    grid-column: 1 / -1;
}

.income-modal-supplier-card {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f8fafc;
}

.income-supplier-card-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    align-items: start;
}

.income-supplier-card-inner__col {
    min-width: 0;
}

.income-supplier-card-inner__col--right {
    text-align: right;
}

@media (max-width: 520px) {
    .income-supplier-card-inner {
        grid-template-columns: 1fr;
    }

    .income-supplier-card-inner__col--right {
        text-align: left;
    }
}

.inc-sc-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inc-sc-label--spaced {
    margin-top: 10px;
}

.inc-sc-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-top: 2px;
}

.inc-sc-value {
    color: var(--text-dark);
    margin-top: 2px;
    font-size: 0.95rem;
}

.inc-sc-balance {
    font-weight: 800;
    font-size: 1.12rem;
    color: var(--primary);
    margin-top: 2px;
}

.income-storage-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.income-storage-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.income-storage-btn:hover {
    border-color: var(--primary-light);
}

.income-storage-btn--active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Kirim modali: tezkor to'lov (Naqd / Qisman / Qarz) */
.income-payment-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.income-payment-rows__quick .income-pay-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.income-pay-quick-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-dark);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.income-pay-quick-btn:hover {
    border-color: var(--primary-light);
}

.income-pay-quick-btn--active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.income-product-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.income-product-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
}

.income-selected-group {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 14px 10px;
    margin-bottom: 14px;
    overflow-x: auto;
}

.income-selected-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.income-selected-group__title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
}

.income-selected-group__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.income-selected-grid {
    display: grid;
    grid-template-columns: minmax(100px, 1.15fr) minmax(80px, 0.85fr) minmax(90px, 0.95fr) minmax(72px, 0.75fr) minmax(88px, 0.85fr) minmax(88px, 0.85fr) 44px;
    gap: 8px;
    align-items: center;
    min-width: 640px;
}

.income-selected-grid--head {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    padding: 4px 2px 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}

.income-selected-grid--head > div {
    color: var(--text-light);
}

.income-selected-grid--row {
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.income-selected-grid--row:last-child {
    border-bottom: none;
}

.income-selected-placeholder {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 8px 6px;
    border-radius: 8px;
    background: #f1f5f9;
    text-align: center;
}

.income-modal-control {
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--text-dark);
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.income-modal-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 151, 178, 0.15);
}

.income-modal-control--flex1 {
    flex: 1;
}

.income-modal-control--flex2 {
    flex: 2;
}

.income-cost-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.income-cost-row__del {
    color: var(--danger);
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.income-cost-row__del:hover {
    opacity: 0.85;
}

.income-selected-line-total {
    font-weight: 700;
    font-size: 0.88rem;
    text-align: right;
    color: var(--text-dark);
    padding: 8px 10px;
    border-radius: 8px;
    background: #f1f5f9;
}

.income-selected-row-remove {
    padding: 6px 10px !important;
    min-width: 40px;
    justify-self: end;
}

.income-modal-totals {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 16px 0;
    background: rgba(0, 151, 178, 0.06);
}

.income-modal-totals__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.income-modal-totals__row--grand {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
}

.income-modal-totals__grand {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--primary);
}

.income-change-info {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
}

.income-change-info--success {
    background: #d4edda;
    color: #155724;
}

.income-change-info--warn {
    background: #fee2e2;
    color: #b91c1c;
}

.income-modal-check-preview {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 8px;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-dark);
}

body.dark-theme .income-modal-product-card {
    background: #252525;
    border-color: #3a3a3a;
}

body.dark-theme .income-modal-product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

body.dark-theme .income-modal-product-card--selected {
    background: rgba(0, 151, 178, 0.12);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(0, 151, 178, 0.25);
}

body.dark-theme .income-modal-product-thumb img {
    background: #1a1a1a;
}

body.dark-theme .income-modal-product-name {
    color: #f1f5f9;
}

body.dark-theme .income-modal-product-unit,
body.dark-theme .income-modal-product-tan {
    color: #94a3b8;
}

body.dark-theme .income-modal-product-tan-val {
    color: #e2e8f0;
}

body.dark-theme .income-modal-product-tan--ombor {
    color: #94a3b8;
}

body.dark-theme .income-modal-empty {
    background: rgba(255, 255, 255, 0.03);
    border-color: #444444;
    color: #94a3b8;
}

body.dark-theme .income-modal-supplier-card {
    background: #252525;
    border-color: #3a3a3a;
}

body.dark-theme .inc-sc-label {
    color: #94a3b8;
}

body.dark-theme .inc-sc-title,
body.dark-theme .inc-sc-value {
    color: #f1f5f9;
}

body.dark-theme .inc-sc-balance {
    color: var(--primary-light);
}

body.dark-theme .income-storage-btn {
    background: #2a2a2a;
    color: #e5e5e5;
    border-color: #444444;
}

body.dark-theme .income-storage-btn--active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

body.dark-theme .income-pay-quick-btn {
    background: #2a2a2a;
    color: #e5e5e5;
    border-color: #444444;
}

body.dark-theme .income-pay-quick-btn--active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

body.dark-theme .income-product-search-input {
    background: #2a2a2a;
    color: #ffffff;
    border-color: #444444;
}

body.dark-theme .income-selected-group {
    background: #252525;
    border-color: #3a3a3a;
}

body.dark-theme .income-selected-group__title {
    color: #f1f5f9;
}

body.dark-theme .income-selected-grid--head {
    color: #94a3b8;
    border-bottom-color: #3a3a3a;
}

body.dark-theme .income-selected-grid--head > div {
    color: #94a3b8;
}

body.dark-theme .income-selected-grid--row {
    border-bottom-color: #333333;
}

body.dark-theme .income-selected-placeholder {
    background: #1e293b;
    color: #94a3b8;
}

body.dark-theme .income-modal-control {
    background: #2a2a2a;
    border-color: #444444;
    color: #ffffff;
}

body.dark-theme .income-modal-control:focus {
    background: #333333;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 151, 178, 0.25);
}

body.dark-theme .income-selected-line-total {
    background: #2a2a2a;
    color: #f1f5f9;
}

body.dark-theme .income-modal-totals {
    background: rgba(0, 151, 178, 0.1);
    border-color: #3a3a3a;
}

body.dark-theme .income-modal-totals__row {
    color: #e2e8f0;
}

body.dark-theme .income-change-info--success {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
}

body.dark-theme .income-change-info--warn {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

body.dark-theme .income-modal-check-preview {
    background: #222222;
    border-color: #444444;
    color: #e2e8f0;
}

body.dark-theme .income-modal .btn-outline {
    background: transparent;
    color: #e2e8f0;
    border-color: #475569;
}

body.dark-theme .income-modal .btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    color: #ffffff;
}

/* ==================== Kirim cheki (batafsil modal) ==================== */
.income-detail-modal-content {
    width: 1080px;
    max-width: 98%;
    max-height: 90vh;
    overflow-y: auto;
}

.income-detail-header {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    color: #1e293b;
}

.income-detail-header-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.income-detail-header-grid strong {
    color: #0f172a;
}

.income-detail-products {
    margin-bottom: 12px;
}

.income-detail-check {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    color: #1e293b;
    font-size: 0.9rem;
}

.income-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.income-detail-product-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    background: #ffffff;
    color: #1e293b;
}

.income-detail-product-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.income-detail-product-card__sum {
    font-weight: 700;
    white-space: nowrap;
}

.income-detail-product-card__fields {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 10px;
    align-items: start;
}

@media (max-width: 720px) {
    .income-detail-product-card__fields {
        grid-template-columns: 1fr;
    }
}

.income-detail-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.income-detail-readonly {
    padding: 8px;
    border: 1px solid var(--primary);
    border-radius: 6px;
    font-weight: 600;
    background: #ffffff;
    color: #0f172a;
}

.income-detail-readonly--accent {
    border-color: var(--primary);
}

.income-detail-expense-hint {
    font-size: 11px;
    color: #0b7285;
    margin-top: 4px;
    line-height: 1.35;
}

.income-detail-check-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
}

.income-detail-check-line__meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.income-detail-check-line__sum {
    white-space: nowrap;
    font-weight: 600;
}

.income-detail-expense-callout {
    border-radius: 6px;
    padding: 8px;
    margin: 8px 0;
    font-size: 12px;
}

.income-detail-expense-callout--company {
    background: #e0f2fe;
    border: 1px solid #0284c7;
    color: #0c4a6e;
}

.income-detail-expense-callout--supplier {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.income-detail-expense-callout__title {
    font-weight: 600;
    margin-bottom: 4px;
}

.income-detail-expense-callout__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    gap: 8px;
}

.income-detail-expense-callout__footer {
    border-top: 1px solid #0284c7;
    margin-top: 6px;
    padding-top: 6px;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #0c4a6e;
}

.income-detail-expense-callout__footer--supplier {
    border-top: 1px solid #fcd34d;
    color: #92400e;
}

.income-detail-check-summary {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
}

.income-detail-check-summary--muted {
    color: #64748b;
    margin-top: 8px;
}

.income-detail-check-summary--grand {
    margin-top: 6px;
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
}

body.dark-theme .income-detail-header {
    background: #252525;
    border-color: #3a3a3a;
    color: #e2e8f0;
}

body.dark-theme .income-detail-header-grid strong {
    color: #f1f5f9;
}

body.dark-theme .income-detail-check {
    background: #252525;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark-theme .income-detail-product-card {
    background: #252525;
    border-color: #3a3a3a;
    color: #e2e8f0;
}

body.dark-theme .income-detail-product-card__sum {
    color: #f1f5f9;
}

body.dark-theme .income-detail-label {
    color: #94a3b8;
}

body.dark-theme .income-detail-readonly {
    background: #2a2a2a;
    border-color: var(--primary);
    color: #f1f5f9;
}

body.dark-theme .income-detail-expense-hint {
    color: #7dd3fc;
}

body.dark-theme .income-detail-check-line {
    border-bottom-color: #3a3a3a;
}

body.dark-theme .income-detail-check-line__meta {
    color: #94a3b8;
}

body.dark-theme .income-detail-check-line__sum {
    color: #f1f5f9;
}

body.dark-theme .income-detail-expense-callout--company {
    background: rgba(14, 116, 144, 0.25);
    border-color: #38bdf8;
    color: #e0f2fe;
}

body.dark-theme .income-detail-expense-callout--company .income-detail-expense-callout__footer {
    border-top-color: #38bdf8;
    color: #bae6fd;
}

body.dark-theme .income-detail-expense-callout--supplier {
    background: rgba(120, 53, 15, 0.35);
    border-color: #fbbf24;
    color: #fef3c7;
}

body.dark-theme .income-detail-expense-callout__footer--supplier {
    border-top-color: #fbbf24;
    color: #fde68a;
}

body.dark-theme .income-detail-check-summary--muted {
    color: #94a3b8;
}

body.dark-theme .income-detail-check-summary--grand {
    color: #f1f5f9;
}

body.dark-theme .income-detail-modal .income-modal-section-title {
    color: var(--primary-light);
}

body.dark-theme #incomeDetailModal .income-detail-warehouse,
body.dark-theme #incomeDetailModal .income-modal-control--select {
    background: #2a2a2a;
    color: #ffffff;
    border-color: #444444;
}

body.dark-theme .income-detail-modal .btn-secondary {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

body.dark-theme .income-detail-modal .btn-secondary:hover {
    background: #475569;
    color: #ffffff;
}

/* Ta'minotchi mahsulotlarini ko'chirish sahifasi */
.spt-page {
    max-width: 100%;
    margin: 0;
}

.spt-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.spt-header__titles {
    flex: 1;
    min-width: 200px;
}

.spt-title {
    margin: 0 0 6px;
    font-size: 1.35rem;
    color: var(--text-primary, #0f172a);
}

.spt-subtitle {
    margin: 0;
    color: var(--text-secondary, #64748b);
    font-size: 0.95rem;
}

.spt-notice {
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.9rem;
    color: #0e7490;
    margin-bottom: 24px;
    line-height: 1.45;
}

.spt-notice i {
    margin-right: 8px;
}

.spt-section {
    margin-bottom: 32px;
}

.spt-section__title {
    font-size: 1.1rem;
    margin: 0 0 14px;
    color: var(--text-primary, #0f172a);
    display: flex;
    align-items: center;
    gap: 10px;
}

.spt-section--secondary .spt-section__title {
    color: #0369a1;
}

.spt-section--log {
    margin-top: 36px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.spt-log-hint {
    margin: -4px 0 14px;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
}

.spt-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.spt-root {
    width: 100%;
}

.spt-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.spt-data-table tbody tr.spt-data-row {
    cursor: default;
}

.spt-td-nowrap {
    white-space: nowrap;
}

.spt-td-stock {
    vertical-align: middle;
}

.spt-td-actions {
    vertical-align: middle;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.spt-controls-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 10px;
}

.spt-compact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.spt-compact--grow {
    flex: 1 1 120px;
    min-width: 100px;
}

.spt-compact__lbl {
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #64748b;
}

.spt-mini {
    width: 56px;
    padding: 4px 6px;
    font-size: 0.72rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    line-height: 1.2;
}

.spt-mini--select {
    width: auto;
    min-width: 72px;
    max-width: 160px;
}

.spt-compact--grow .spt-mini--select {
    max-width: none;
    width: 100%;
}

.spt-form {
    margin: 0;
}

.spt-btn-transfer {
    padding: 5px 10px;
    font-size: 0.68rem;
    align-self: flex-end;
    flex-shrink: 0;
    white-space: nowrap;
}

.spt-btn-lbl {
    font-weight: 600;
}

.spt-loading,
.spt-empty,
.spt-error {
    padding: 20px;
    text-align: center;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}

.spt-error {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fef2f2;
}

body.dark-theme .spt-title,
body.dark-theme .spt-section__title {
    color: #f1f5f9;
}

body.dark-theme .spt-subtitle {
    color: #94a3b8;
}

body.dark-theme .spt-notice {
    background: #164e63;
    border-color: #0e7490;
    color: #cffafe;
}

body.dark-theme .spt-section--log {
    border-top-color: #334155;
}

body.dark-theme .spt-log-hint {
    color: #94a3b8;
}

body.dark-theme .spt-compact__lbl {
    color: #94a3b8;
}

body.dark-theme .spt-mini,
body.dark-theme .spt-mini.spt-mini--select {
    background: #0d1117;
    border-color: #30363d;
    color: #e6edf3;
}

body.dark-theme .spt-loading,
body.dark-theme .spt-empty {
    background: #0f172a;
    border-color: #475569;
    color: #94a3b8;
}

body.dark-theme .spt-error {
    background: #450a0a;
    border-color: #991b1b;
    color: #fecaca;
}

/* ==================== PERMISSIONS CUSTOM TOGGLE SWITCH & CARDS ==================== */
.perm-card-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.perm-card-active {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%) !important;
    border: 2px solid #22c55e !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.12) !important;
}

.perm-card-inactive {
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%) !important;
    border: 2px solid #fca5a5 !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.06) !important;
}

.perm-card-disabled {
    opacity: 0.85;
    cursor: not-allowed !important;
}

/* Custom Sliding Toggle Switch */
.perm-toggle-switch {
    width: 48px;
    height: 26px;
    background: #ef4444;
    border-radius: 999px;
    padding: 3px;
    cursor: pointer;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.perm-toggle-switch.active {
    background: #22c55e;
}

.perm-toggle-knob {
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    transform: translateX(0);
}

.perm-toggle-switch.active .perm-toggle-knob {
    transform: translateX(22px);
}

/* ==================== SIDEBAR HOVER TOOLTIP (WHEN COLLAPSED) ==================== */
.sidebar:not(.expanded) .nav-item {
    position: relative;
}

.sidebar:not(.expanded) .nav-item::after {
    content: attr(data-title);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) scale(0.92);
    background: #0f172a;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    z-index: 9999;
}

.sidebar:not(.expanded) .nav-item::before {
    content: '';
    position: absolute;
    left: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 6px 6px 0;
    border-style: solid;
    border-color: transparent #0f172a transparent transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
    z-index: 9999;
}

.sidebar:not(.expanded) .nav-item:hover::after,
.sidebar:not(.expanded) .nav-item:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

/* Custom enlarged Order Details Modal */
#orderDetailsModal .modal-content {
    width: 960px !important;
    max-width: 95% !important;
    max-height: 90vh !important;
    border-radius: 16px !important;
    font-size: 1.02rem !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25) !important;
}

#orderDetailsModal .modal-header {
    padding: 22px 28px !important;
    background: #f8fafc !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

#orderDetailsModal .modal-header h3 {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
}

#orderDetailsModal .modal-body {
    padding: 24px 28px !important;
    overflow-y: auto !important;
    flex: 1 !important;
}

#orderDetailsModal .order-details-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px 28px !important;
    background: #f8fafc !important;
    padding: 20px !important;
    border-radius: 14px !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 24px !important;
}

#orderDetailsModal .detail-item {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

#orderDetailsModal .detail-item label {
    font-weight: 700 !important;
    font-size: 0.92rem !important;
    color: #475569 !important;
    margin: 0 !important;
}

#orderDetailsModal .detail-item span {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}

#orderDetailsModal h4 {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin-top: 24px !important;
    margin-bottom: 14px !important;
}

#orderDetailsModal .order-items-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 1.02rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

#orderDetailsModal .order-items-table th {
    background: #f1f5f9 !important;
    padding: 14px 18px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    font-size: 0.98rem !important;
}

#orderDetailsModal .order-items-table td {
    padding: 14px 18px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #0f172a !important;
}

/* ==================== ORDERS TABLE DARK THEME ENHANCEMENTS ==================== */
body.dark-theme #ordersTable.orders-table,
body.dark-theme .orders-table {
    background: #0f172a !important;
    color: #f8fafc !important;
}

body.dark-theme #ordersTable thead th,
body.dark-theme .orders-table thead th {
    background: #1e293b !important;
    color: #38bdf8 !important;
    border-bottom: 2px solid #334155 !important;
    font-weight: 800 !important;
}

body.dark-theme #ordersTable tbody tr,
body.dark-theme .orders-table tbody tr {
    background: #0f172a !important;
    border-bottom: 1px solid #1e293b !important;
    color: #f8fafc !important;
}

body.dark-theme #ordersTable tbody tr:hover,
body.dark-theme .orders-table tbody tr:hover {
    background: #1e293b !important;
}

/* Fix inline dark text colors inside dark theme cells */
body.dark-theme #ordersTable td,
body.dark-theme .orders-table td {
    color: #f8fafc !important;
}

body.dark-theme #ordersTable td strong,
body.dark-theme .orders-table td strong {
    color: #f8fafc !important;
}

/* Date cell text in dark mode */
body.dark-theme #ordersTable td div[style*="color:#0f172a"],
body.dark-theme #ordersTable td div[style*="color: #0f172a"],
body.dark-theme #ordersTable td span[style*="color:#0f172a"],
body.dark-theme #ordersTable td span[style*="color: #0f172a"] {
    color: #f1f5f9 !important;
}

body.dark-theme #ordersTable td div[style*="color:#0097b2"],
body.dark-theme #ordersTable td div[style*="color: #0097b2"] {
    color: #38bdf8 !important;
}

/* Customer code subtitle */
body.dark-theme #ordersTable td small[style*="color: var(--gray)"],
body.dark-theme #ordersTable td small {
    color: #94a3b8 !important;
}

/* Action buttons in dark theme */
body.dark-theme .orders-action-icons .order-action-btn,
body.dark-theme .action-icons .btn {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
    box-shadow: none !important;
}

body.dark-theme .orders-action-icons .order-action-btn:hover {
    background: #334155 !important;
    color: #38bdf8 !important;
}

/* Action popup menu in dark mode */
body.dark-theme .order-more-menu-popup {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
}

body.dark-theme .order-more-menu-popup button {
    color: #f8fafc !important;
}

body.dark-theme .order-more-menu-popup button:hover {
    background: #334155 !important;
}

/* Shartli Naqd and Payment Method Badges in dark theme */
body.dark-theme #ordersTable td span[style*="background:#e0f2fe"],
body.dark-theme #ordersTable td span[style*="background: #e0f2fe"] {
    background: #075985 !important;
    color: #bae6fd !important;
}

body.dark-theme #ordersTable td span[style*="background:#f0fdf4"],
body.dark-theme #ordersTable td span[style*="background: #f0fdf4"] {
    background: #14532d !important;
    color: #bbf7d0 !important;
}

body.dark-theme #ordersTable td span[style*="background:#fef2f2"],
body.dark-theme #ordersTable td span[style*="background: #fef2f2"] {
    background: #7f1d1d !important;
    color: #fecaca !important;
}

body.dark-theme #ordersTable td span[style*="background:#f1f5f9"],
body.dark-theme #ordersTable td span[style*="background: #f1f5f9"] {
    background: #334155 !important;
    color: #cbd5e1 !important;
}

/* 3-Dots More Action Button styling for light and dark theme */
.order-more-btn {
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #475569 !important;
    border-radius: 8px !important;
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.order-more-btn:hover {
    background: #e2e8f0 !important;
    color: #0097b2 !important;
}

.order-more-menu-popup {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body.dark-theme .order-more-btn {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
    box-shadow: none !important;
}

body.dark-theme .order-more-btn:hover {
    background: #334155 !important;
    color: #38bdf8 !important;
}