:root {
    /* Landing page inspired colors - Professional palette */
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    /* Neutral tones */
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --sidebar-width: 280px;
    
    /* Gradient backgrounds */
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

/* Dark Theme */
body.dark-theme {
    --light-bg: #1e293b;
    --card-bg: #0f172a;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Chart Container Fixes */
canvas {
    max-width: 100% !important;
    height: auto !important;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.chart-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Top Header Styles */
.top-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width); /* Desktop-da sidebar oldidan boshlanadi */
    right: 0;
    height: 60px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 1100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: left 0.3s ease;
}

/* Mobile-da top-header to'liq kenglikda */
@media (max-width: 768px) {
    .top-header {
        left: 0;
    }
}

/* Body class for sidebar open state */
body.sidebar-open .top-header {
    left: 280px;
}

.top-header-left,
.top-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1.2rem;
}

.sidebar-toggle-btn:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.help-button-header {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.help-button-header:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1.1rem;
}

.header-btn:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.lang-toggle {
    width: auto !important;
    padding: 0 0.7rem;
}

.lang-text {
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.2rem;
}

.theme-toggle.dark-mode {
    color: var(--warning-color);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    z-index: 1050;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(0); /* Desktop-da default ko'rinadi */
}

/* Mobile-da yashirish */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
}

.sidebar-header {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sidebar-subtitle {
    font-size: 0.875rem;
    opacity: 0.7;
    font-weight: 500;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.nav-section-title {
    padding: 0 1.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1.5rem;
}

.nav-section-title:first-child {
    margin-top: 0;
}

.nav-item {
    margin: 0.25rem 1rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.875rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover, .nav-link.active {
    background: rgba(99, 102, 241, 0.2);
    color: white;
    transform: translateX(8px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.nav-link i {
    width: 24px;
    height: 24px;
    margin-right: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.main-container {
    margin-left: 0;
    padding: 80px 2rem 2rem;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    max-width: 100%;
    overflow-x: hidden;
}

/* Main Content Styles */
.main-content {
    margin-left: var(--sidebar-width); /* Desktop-da sidebar uchun joy */
    padding: 80px 2rem 2rem;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* When sidebar is open */
body.sidebar-open .main-container {
    margin-left: var(--sidebar-width);
}

/* Desktop default - sidebar always visible */
@media (min-width: 769px) {
    .main-container {
        margin-left: var(--sidebar-width);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0; /* Mobile-da sidebar ustida */
    }
    
    /* Mobile-da sidebar ochiq holatida */
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    
    /* Mobile-da top-header sidebar ochiq holatida */
    body.sidebar-open .top-header {
        left: 0; /* Mobile-da harakat qilmasligi kerak */
    }
}

/* Dashboard Filter Panel */
.dashboard-filters {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filters-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 200px;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Inline Filters */
.dashboard-filters-inline {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.filters-row-inline {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.filter-group-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label-inline {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.time-period-filter {
    position: relative;
    min-width: 160px;
}

.time-period-select {
    width: 100%;
    padding: 0.4rem 1.8rem 0.4rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.4rem center;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
}

.time-period-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.time-period-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 0.5rem;
    display: none;
    max-width: 500px;
    min-width: 400px;
}

.time-period-dropdown.show {
    display: block;
}

.time-period-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.time-period-dropdown-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-dropdown-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-dropdown-btn:hover {
    background: var(--light-bg);
    color: var(--text-primary);
}

.predefined-periods {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.predefined-periods-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.periods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.periods-grid::-webkit-scrollbar {
    width: 6px;
}

.periods-grid::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 3px;
}

.periods-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.periods-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.period-option {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.period-option:hover {
    background: var(--light-bg);
    border-color: var(--primary-color);
}

.period-option.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.custom-date-section {
    padding: 1.5rem;
}

.custom-date-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.date-range-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.75rem;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.date-range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.date-range-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-date-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.quick-date-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

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

/* Dual Month Date Range Picker */
.date-range-picker-container {
    margin: 1rem 0;
    position: relative;
}

.date-range-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.date-range-icon {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
    font-size: 16px;
    z-index: 1;
    pointer-events: none;
}

.date-range-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-range-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dual-calendar-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    margin-top: 8px;
    padding: 20px;
    min-width: 350px;
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.nav-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.nav-btn:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.current-month-year {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.months-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

@media (max-width: 700px) {
    .dual-calendar-popup {
        min-width: 300px;
        padding: 16px;
    }
    
    .months-container {
        gap: 0;
    }
}

.dual-month {
    min-width: 260px;
}

.dual-month-header {
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.dual-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 8px;
}

.dual-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 4px;
    text-transform: uppercase;
}

.dual-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.dual-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    min-height: 36px;
    color: var(--text-primary);
}

.dual-day:hover:not(.other-month) {
    background: rgba(0, 86, 179, 0.15);
    transform: scale(1.05);
}

.dual-day.other-month {
    color: var(--text-secondary);
    opacity: 0.3;
    cursor: default;
}

.dual-day.today {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    font-weight: 700;
}

.dual-day.selected {
    background: var(--text-primary);
    color: var(--card-bg);
    font-weight: 600;
}

.dual-day.range-start {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 8px 0 0 8px;
}

.dual-day.range-start:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.dual-day.range-end {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 0 8px 8px 0;
}

.dual-day.range-end:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.dual-day.range-start.range-end {
    border-radius: 8px;
}

.dual-day.range-start.range-end:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.dual-day.in-range {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    border-radius: 0;
}

.dual-day.hover-range {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    border-radius: 0;
}

.calendar-instructions {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

.calendar-confirm-section {
    text-align: center;
    margin-top: 12px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.calendar-confirm-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-confirm-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 86, 179, 0.3);
}

.calendar-confirm-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.calendar-confirm-btn:disabled:hover {
    transform: none;
}

/* Quick Date Confirmation Styles */
.quick-date-confirm-section {
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.quick-date-confirm-text {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 500;
}

.quick-date-confirm-buttons {
    display: flex;
    justify-content: center;
}

.quick-confirm-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--primary-color);
    color: white;
}

.quick-confirm-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 86, 179, 0.3);
}

.date-range-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.date-range-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
}

.date-range-calendar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 0.5rem;
    padding: 1.5rem;
    width: 350px;
    min-width: 350px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-nav-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
    background: var(--light-bg);
    color: var(--text-primary);
}

.calendar-month-year {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 0.75rem;
}

.weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.75rem 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 1rem;
}

.calendar-day {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    position: relative;
    font-weight: 500;
}

.calendar-day:hover {
    background: var(--light-bg);
    transform: scale(1.05);
}

.calendar-day.other-month {
    color: var(--text-secondary);
    opacity: 0.4;
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.calendar-day.in-range {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    font-weight: 600;
}

.calendar-day.range-start {
    background: var(--primary-color);
    color: white;
    border-radius: 8px 4px 4px 8px;
    font-weight: 600;
}

.calendar-day.range-end {
    background: var(--primary-color);
    color: white;
    border-radius: 4px 8px 8px 4px;
    font-weight: 600;
}

.calendar-day.range-start.range-end {
    border-radius: 8px;
}

.calendar-day.today {
    border: 2px solid var(--primary-color);
    font-weight: 600;
}

.calendar-day.hover-range {
    background: rgba(99, 102, 241, 0.25);
    color: var(--primary-color);
    font-weight: 600;
}

.calendar-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.selected-range-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.date-range-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.date-range-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

.apply-date-range {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-date-range:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.apply-date-range:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.store-filter {
    position: relative;
    min-width: 200px;
}

.store-dropdown {
    position: relative;
    min-width: 140px;
}

.store-dropdown-toggle {
    width: 100%;
    padding: 0.4rem 1.8rem 0.4rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.4rem center;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
    text-align: left;
}

.store-dropdown-toggle:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.store-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 0.25rem;
    display: none;
}

.store-dropdown-menu.show {
    display: block;
}

.store-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.store-dropdown-item:last-child {
    border-bottom: none;
}

.store-dropdown-item:hover {
    background: var(--light-bg);
}

.store-checkbox {
    margin-right: 0.75rem;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.store-dropdown-item label {
    cursor: pointer;
    font-size: 0.875rem;
    margin: 0;
    flex: 1;
    color: var(--text-primary);
}

.dashboard-header {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.help-button {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

.help-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-height: 160px;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card.active {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
}

/* Kartochka turlari uchun ranglar */
.stat-card.success {
    border-left: 4px solid var(--success-color);
}

.stat-card.danger {
    border-left: 4px solid var(--danger-color);
}

.stat-card.warning {
    border-left: 4px solid #ffa726;
}

.stat-card.info {
    border-left: 4px solid #17a2b8;
}

.stat-card.combined {
    border-left: 4px solid var(--primary-color);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before,
.stat-card.active::before {
    transform: scaleX(1);
}

/* Ikonka uchun stillar */
.stat-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    margin-top: 0.25rem;
}

.stat-card.success .stat-icon {
    background: linear-gradient(135deg, var(--success-color), #4ade80);
}

.stat-card.danger .stat-icon {
    background: linear-gradient(135deg, var(--danger-color), #f87171);
}

.stat-card.warning .stat-icon {
    background: linear-gradient(135deg, #ffa726, #ffb74d);
}

.stat-card.info .stat-icon {
    background: linear-gradient(135deg, #17a2b8, #20c997);
}

/* Kontentni ajratish */
.stat-content {
    flex: 1;
    min-width: 0;
}

/* Stat header - value va info icon uchun */
.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Info icon uchun */
.info-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.info-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.stat-card.success .info-icon:hover {
    background: var(--success-color);
}

.stat-card.danger .info-icon:hover {
    background: var(--danger-color);
}

.stat-card.warning .info-icon:hover {
    background: #ffa726;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Ikkilamchi ma'lumotlar uchun */
.stat-secondary {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.secondary-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.secondary-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: lowercase;
}

/* Uchinchi darajali ma'lumotlar uchun */
.stat-tertiary {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tertiary-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tertiary-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: lowercase;
}

/* Moliyaviy kartochka uchun maxsus stillar */
.stat-label-small {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: lowercase;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-value-secondary {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Moliyaviy kartochkadagi barcha summalar uchun bir xil stil */
.stat-value-uniform {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-height: 1.6rem;
}

/* Inline o'zgarish ko'rsatkichi */
.stat-change-inline {
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}

.stat-change-inline.positive {
    color: var(--success-color);
}

.stat-change-inline.negative {
    color: var(--danger-color);
}

/* Moliyaviy kompakt kartochkalar uchun stillar */
.stat-card.financial-compact {
    min-height: 120px;
    padding: 1.25rem;
}

.stat-card.financial-compact .stat-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.stat-card.financial-compact .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.stat-card.financial-compact .stat-label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-card.financial-compact .stat-change {
    font-size: 0.75rem;
    margin-top: auto;
}

/* Moliyaviy kartochka uchun maxsus o'lcham */
.stat-card.info .stat-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
}

.stat-card.info {
    align-items: flex-start;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

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

/* Stat Info Modal uchun stillar */
.stat-info-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.stat-info-item i {
    font-size: 1.5rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.stat-info-item div {
    flex: 1;
}

.stat-info-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.stat-info-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Dark theme uchun */
[data-theme="dark"] .stat-info-item {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--primary-color);
}

/* Modal z-index ni oshirish top-header ustida chiqishi uchun */
.modal {
    z-index: 1200 !important;
}

.modal-backdrop {
    z-index: 1150 !important;
}

.chart-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chart-title-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.chart-subtitle {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.8;
}

/* Chart Filter Selector Styles */
.chart-filter-selector {
    position: relative;
}

.chart-filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s ease;
    min-width: 140px;
    justify-content: space-between;
}

.chart-filter-toggle:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.chart-filter-toggle i {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.chart-filter-toggle.active i {
    transform: rotate(180deg);
}

.chart-filter-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.chart-filter-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chart-filter-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.chart-filter-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.chart-filter-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    color: white;
}

.chart-filter-item.active:hover {
    background: linear-gradient(135deg, #4f46e5 0%, var(--primary-color) 100%);
}

.chart-filter-item i {
    color: var(--text-secondary);
    font-size: 1rem;
}

.chart-filter-item.active i {
    color: white;
}

/* Financial Summary Styles */
.chart-header-with-filter {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.financial-summary {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    flex: 1;
}

.financial-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 150px;
}

.financial-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.financial-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .chart-header-with-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .financial-summary {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-filter-selector {
        width: 100%;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .chart-controls {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .chart-filter-toggle {
        min-width: 120px;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .chart-filter-dropdown {
        left: 0;
        right: 0;
    }
    
    .chart-filter-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .financial-summary {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .financial-item {
        width: 100%;
        min-width: auto;
    }
}

.chart-wrapper {
    position: relative;
    height: 400px;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Sales Goal Card Styles */
.sales-goal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sales-goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sales-goal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sales-goal-title i {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.sales-goal-edit-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

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

.sales-goal-history-btn {
    background: transparent;
    border: 1px solid #6b7280;
    color: #6b7280;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.sales-goal-history-btn:hover {
    background: #6b7280;
    color: white;
    border-color: #6b7280;
}

.sales-goal-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.sales-goal-main {
    flex: 1;
    width: 100%;
}

.sales-goal-values {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.sales-goal-value-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.sales-goal-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.sales-goal-amount {
    font-size: 1.25rem;
    font-weight: 700;
}

.sales-goal-amount.current {
    color: #10b981;
}

.sales-goal-amount.target {
    color: var(--primary-color);
}

.sales-goal-amount.days {
    color: #f59e0b;
}

.sales-goal-progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sales-goal-progress-bar {
    height: 32px;
    background: #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.sales-goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 16px;
    transition: width 0.6s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
}

.progress-percentage-inside {
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sales-goal-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.progress-completed {
    color: #10b981;
    font-weight: 600;
}

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

/* Daily Stats */
.daily-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.daily-stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.daily-stat-item:hover {
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}

.daily-stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.daily-stat-icon.success {
    background: #10b981;
}

.daily-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.daily-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.daily-stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.daily-stat-value.success {
    color: #10b981;
}

body.dark-theme .daily-stat-item {
    background: rgba(99, 102, 241, 0.1);
}

body.dark-theme .daily-stat-item:hover {
    background: rgba(99, 102, 241, 0.15);
}

/* Info Button with Tooltip */
.info-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
    z-index: 1;
}

.info-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.1);
    z-index: 2;
}

.info-btn i {
    font-size: 1rem;
}

/* Tooltip */
.info-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: var(--text-primary);
    color: var(--card-bg);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: normal;
    width: 280px;
    max-width: 90vw;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 500;
}

.info-btn::before {
    content: '';
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: var(--text-primary);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.info-btn:hover::after,
.info-btn:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* Info button - o'ng tomonda (ombor statistikasi uchun) */
.info-btn-right::after {
    left: auto;
    right: 0;
    transform: translateX(0) scale(0.9);
}

.info-btn-right:hover::after {
    transform: translateX(0) scale(1);
}

.info-btn-right::before {
    left: auto;
    right: 10px;
    transform: translateX(0);
}

.info-btn-right:hover::before {
    transform: translateX(0);
}

body.dark-theme .info-btn {
    color: #818cf8;
}

body.dark-theme .info-btn:hover {
    background: rgba(129, 140, 248, 0.1);
}

body.dark-theme .info-btn::after {
    background: #f1f5f9;
    color: #1e293b;
}

body.dark-theme .info-btn::before {
    border-bottom-color: #f1f5f9;
}

/* Sales Goal History Modal */
.history-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.history-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.history-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.history-stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.history-stat-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.history-stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.history-stat-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.history-stat-icon.primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.history-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.history-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.history-table {
    margin-bottom: 0;
}

.history-table thead th {
    background: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.history-row {
    transition: all 0.2s ease;
}

.history-row:hover {
    background: rgba(99, 102, 241, 0.03);
}

.history-row td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.month-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.result-cell {
    font-weight: 600;
    color: #10b981;
}

.progress-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mini-progress {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    max-width: 120px;
}

.mini-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.mini-progress-fill.success {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.mini-progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-text {
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 60px;
}

.progress-text.success {
    color: #10b981;
}

.progress-text.warning {
    color: #f59e0b;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

body.dark-theme .history-stat-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

body.dark-theme .history-table thead th {
    background: rgba(15, 23, 42, 0.5);
}

body.dark-theme .history-row:hover {
    background: rgba(99, 102, 241, 0.08);
}

body.dark-theme .mini-progress {
    background: rgba(226, 232, 240, 0.1);
}

/* Help Modal Styles */
.help-intro {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.help-intro h6 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

#helpAccordion .accordion-item {
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
    border-radius: 8px !important;
    overflow: hidden;
}

#helpAccordion .accordion-button {
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
}

#helpAccordion .accordion-button:not(.collapsed) {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-color);
    box-shadow: none;
}

#helpAccordion .accordion-button:focus {
    box-shadow: none;
    border-color: var(--border-color);
}

#helpAccordion .accordion-body {
    padding: 1rem 1.25rem;
    background: var(--card-bg);
}

.help-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.help-list li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

.help-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.help-tips kbd {
    background: var(--text-primary);
    color: var(--card-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.help-tips .alert {
    border-left: 4px solid;
    border-radius: 8px;
}

.help-tips .alert-info {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.help-tips .alert-success {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.help-tips ul {
    list-style: none;
}

.help-tips ul li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

body.dark-theme .help-intro {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
}

body.dark-theme #helpAccordion .accordion-button:not(.collapsed) {
    background: rgba(99, 102, 241, 0.15);
}

body.dark-theme .help-tips .alert-info {
    background: rgba(59, 130, 246, 0.1);
}

body.dark-theme .help-tips .alert-success {
    background: rgba(16, 185, 129, 0.1);
}

/* Remove old help styles */
.help-section {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.help-section:last-of-type {
    border-bottom: none;
}

/* Remove unused side styles */

/* Dark theme support */
body.dark-theme .sales-goal-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

body.dark-theme .sales-goal-progress-bar {
    background: rgba(226, 232, 240, 0.1);
}

/* Responsive */
@media (max-width: 991px) {
    .sales-goal-values {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .sales-goal-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .sales-goal-values {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sales-goal-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .sales-goal-edit-btn {
        width: 100%;
        justify-content: center;
    }
    
    .daily-stats {
        grid-template-columns: 1fr;
    }
    
    .info-btn::after {
        width: 240px;
        left: auto;
        right: 0;
        transform: translateX(0) scale(0.9);
    }
    
    .info-btn:hover::after {
        transform: translateX(0) scale(1);
    }
    
    .info-btn::before {
        left: auto;
        right: 10px;
        transform: translateX(0);
    }
    
    .info-btn:hover::before {
        transform: translateX(0);
    }
}

/* Modern Warehouse Stats Container */
.warehouse-stats {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    overflow: visible;
}

.warehouse-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        var(--primary-color) 30%,
        var(--secondary-color) 70%,
        transparent
    );
    opacity: 0.6;
}

.warehouse-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.02em;
}

.warehouse-title i {
    font-size: 1.3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Modern Warehouse Card Design */
.warehouse-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.warehouse-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.warehouse-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
}

.warehouse-card:hover::after {
    opacity: 1;
}

/* Color variations for each card - Professional palette */
.warehouse-card:nth-child(1)::after {
    background: linear-gradient(180deg, #4f46e5, #4338ca);
}

.warehouse-card:nth-child(2)::after {
    background: linear-gradient(180deg, #7c3aed, #6d28d9);
}

.warehouse-card:nth-child(3)::after {
    background: linear-gradient(180deg, #06b6d4, #0891b2);
}

.warehouse-card:nth-child(4)::after {
    background: linear-gradient(180deg, #10b981, #059669);
}

.warehouse-card:nth-child(5)::after {
    background: linear-gradient(180deg, #f59e0b, #d97706);
}

.warehouse-card:nth-child(6)::after {
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

/* Icon and Content Styling */
.warehouse-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.08));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.warehouse-card:hover .warehouse-icon {
    transform: scale(1.08);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(124, 58, 237, 0.12));
}

.warehouse-card:nth-child(1) .warehouse-icon {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(67, 56, 202, 0.08));
    color: #4338ca;
}

.warehouse-card:nth-child(2) .warehouse-icon {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(109, 40, 217, 0.08));
    color: #6d28d9;
}

.warehouse-card:nth-child(3) .warehouse-icon {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(8, 145, 178, 0.08));
    color: #0891b2;
}

.warehouse-card:nth-child(4) .warehouse-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.08));
    color: #059669;
}

.warehouse-card:nth-child(5) .warehouse-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.08));
    color: #d97706;
}

.warehouse-card:nth-child(6) .warehouse-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.08));
    color: #dc2626;
}

.warehouse-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.warehouse-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
}

.warehouse-value {
    font-weight: 800;
    color: var(--text-primary);
    font-size: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Dark theme support */
body.dark-theme .warehouse-stats {
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.5);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.3),
        0 10px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark-theme .warehouse-card {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.6);
}

body.dark-theme .warehouse-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 12px 32px rgba(0, 0, 0, 0.5);
}

.products-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    /* margin-left: calc(var(--sidebar-width) + 1rem); */
    /* margin-right: 2rem; */
    margin-bottom: 2rem;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.product-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-filter {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.product-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.products-table th,
.products-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.products-table th {
    background: var(--light-bg);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.products-table tbody tr:hover {
    background: var(--light-bg);
}

.product-name {
    font-weight: 600;
    color: var(--text-primary);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-bloklangan { background: #fee2e2; color: #991b1b; }
.status-sotuvda { background: #dcfce7; color: #166534; }
.status-tugagan { background: #f3f4f6; color: #6b7280; }

.loading-indicator {
    display: none;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .top-header {
        left: 0 !important;
        padding: 0 1rem;
    }

    .help-button-header {
        display: none;
    }

    .top-header-right {
        gap: 0.5rem;
    }

    .header-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .main-container {
        margin-left: 0 !important;
        padding: 80px 1rem 1rem;
    }

    .sidebar {
        top: 60px;
        height: calc(100vh - 60px);
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-container {
        margin-left: 0;
        padding: 80px 1rem 0;
    }
    
    /* Mobil qurilmalarda kartochkalar uchun */
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1.25rem;
    }
    
    .stat-icon {
        align-self: center;
        margin-top: 0;
    }
    
    .stat-header {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .info-icon {
        margin-top: 0;
    }
    
    .stat-secondary {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .secondary-value {
        font-size: 1rem;
    }
    
    .dashboard-filters-inline {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filters-row-inline {
        flex-direction: column;
        gap: 1rem;
    }
    
    .help-button {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 1rem;
        width: 100%;
    }
    
    .chart-header,
    .products-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .chart-title-container {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .chart-title {
        font-size: 1.25rem;
    }
    
    .chart-subtitle {
        font-size: 0.8rem;
    }
    
    .product-filters {
        justify-content: center;
    }

    .warehouse-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .warehouse-card {
        padding: 1rem;
    }

    .warehouse-value {
        font-size: 1.25rem;
    }

    .filters-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .filter-group {
        min-width: auto;
        width: 100%;
    }

    .time-period-filters {
        justify-content: center;
    }

    .mobile-toggle {
        display: block;
    }
}

.mobile-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Zakazlar sahifasi uchun qo'shimcha stillar */
.stat-card.danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left: 4px solid var(--danger-color);
}

.stat-card.danger .stat-icon {
    background: var(--danger-color);
}

.stat-card.danger:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.15);
    transform: translateY(-2px);
}

/* O'zgarish ko'rsatkichlari uchun qo'shimcha stillar */
.stat-change.neutral {
    color: var(--text-secondary);
}

.stat-change.neutral i {
    color: var(--text-secondary);
}

/* Stat change holatlari uchun ranglar */
.stat-change.positive {
    color: #28a745;
}

.stat-change.negative {
    color: #dc3545;
}

/* Danger card ichidagi o'zgarish ranglari */
.stat-card.danger .stat-change.positive {
    color: #b8ffcc;
}

.stat-card.danger .stat-change.negative {
    color: #ffb3b3;
}

.stat-card.danger .stat-change.neutral {
    color: rgba(255, 255, 255, 0.7);
}

/* Unit Economics Specific Styles */
.unit-economics-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: var(--card-bg);
    overflow: hidden;
    position: relative;
}

.unit-economics-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.unit-economics-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.unit-economics-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    margin: 0 auto;
}

.unit-economics-icon i {
    font-size: 28px;
}

.unit-economics-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.unit-economics-card .card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.unit-economics-card .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

.chart-container canvas {
    max-width: 100% !important;
    height: auto !important;
}

/* Table enhancements */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#unitEconomicsTable {
    margin-bottom: 0;
}

#unitEconomicsTable th {
    background-color: var(--light-bg);
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    padding: 1rem 0.75rem;
    white-space: nowrap;
}

#unitEconomicsTable td {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

#unitEconomicsTable tbody tr:hover {
    background-color: var(--light-bg);
}

.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

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

.sortable i {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.sortable:hover i {
    opacity: 1;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Filter section */
.card-body .row.g-3 {
    align-items: end;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.1);
}

/* Button groups */
.btn-group .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

.btn-group .btn-check:checked + .btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .unit-economics-card .card-title {
        font-size: 0.75rem;
    }
    
    .unit-economics-value {
        font-size: 1.5rem;
    }
    
    .unit-economics-icon {
        width: 50px;
        height: 50px;
    }
    
    .unit-economics-icon i {
        font-size: 24px;
    }
    
    .chart-container {
        height: 280px;
    }
    
    #unitEconomicsTable th,
    #unitEconomicsTable td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .btn-group {
        width: 100%;
    }
    
    .btn-group .btn {
        flex: 1;
    }
}

/* Button visibility fixes */
.btn-outline-primary {
    border-color: #0d6efd !important;
    color: #0d6efd !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
}

.btn-outline-primary.active {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
}

/* Ensure all buttons in button groups are visible */
.btn-group .btn-outline-primary {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Dashboard Containers */
.stats-charts-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.warehouse-summary-container {
    /* background: linear-gradient(135deg, #fefefe 0%, #f0f4f8 100%); */
    border-radius: 16px;
    /* padding: 2rem; */
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); */
    /* border: 1px solid rgba(0, 0, 0, 0.05); */
    /* margin-left: calc(var(--sidebar-width) + 1rem); Sidebar-dan keyin ozroq padding bilan */
    margin-right: 2rem;
    margin-top: 1rem; /* Yuqoridagi containerdan orasini ekstremal kamaytirish */
}

/* Legacy containers (remove later) */
.main-dashboard-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-dashboard-container {
    background: linear-gradient(135deg, #fefefe 0%, #f0f4f8 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dark mode support */
[data-bs-theme="dark"] .stats-charts-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .warehouse-summary-container {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .chart-filter-toggle {
    background: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .chart-filter-toggle:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    border-color: var(--primary-color);
}

[data-bs-theme="dark"] .chart-filter-dropdown {
    background: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .chart-filter-item {
    color: var(--bs-light);
}

[data-bs-theme="dark"] .chart-filter-item:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

[data-bs-theme="dark"] .chart-filter-item i {
    color: rgba(255, 255, 255, 0.7);
}

/* Legacy dark mode (remove later) */
[data-bs-theme="dark"] .main-dashboard-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .secondary-dashboard-container {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .stats-charts-container,
    .warehouse-summary-container,
    .products-section {
        padding: 1rem;
        margin: 0.5rem 0.5rem; /* Mobile-da sidebar yo'q, shuning uchun margin-left 0 */
    }
    
    .main-dashboard-container {
        padding: 1rem;
        margin: 0 -0.5rem;
    }
    
    .secondary-dashboard-container {
        padding: 1rem;
        margin: 0 -0.5rem;
    }
}

/* Yangi section lar uchun stillar */

/* Ombor statistikasi - Static section */
.warehouse-static-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: visible;
}

/* Yashil chiziq olib tashlandi */
/* .warehouse-static-section::before {} */

/* Vaqt davri bo'yicha section */
.sales-time-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    position: relative;
}

/* Ko'k chiziq olib tashlandi */
/* .sales-time-section::before {} */

.section-header-with-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.section-main-title i {
    color: var(--primary-color);
}

/* Tanlangan vaqt davri ko'rsatkichi */
.time-period-info {
    font-size: 0.9rem;
    color: #10b981;
    font-weight: 500;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

body.dark-theme .time-period-info {
    color: #34d399;
}

.badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.sales-stats-section {
    background: rgba(255, 255, 255, 0.7);
}

/* Dark theme support */
body.dark-theme .warehouse-static-section {
    background: var(--card-bg);
    border-color: var(--border-color);
}

body.dark-theme .sales-time-section {
    background: var(--card-bg);
    border-color: var(--primary-color);
}

body.dark-theme .sales-stats-section {
    background: rgba(15, 23, 42, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
    .section-header-with-badge {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-main-title {
        font-size: 1.25rem;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .sales-time-section,
    .warehouse-static-section {
        padding: 1rem;
    }
}
