/* Analytics Specific Styles */
.main-content {
    padding: 24px 40px;
    /* Added 40px left/right padding as requested */
    max-width: 1400px;
    /* Prevent it from stretching too wide on huge screens */
    margin: 0 auto;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.analytics-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.date-controls {
    display: flex;
    gap: 12px;
}

.time-select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.time-select:hover {
    border-color: #cbd5e1;
}

.custom-date-group {
    display: flex;
    gap: 8px;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon.bg-blue {
    background: #e0f2fe;
    color: #0284c7;
}

.kpi-icon.bg-green {
    background: #dcfce7;
    color: #166534;
}

.kpi-icon.bg-purple {
    background: #f3e8ff;
    color: #9333ea;
}

.kpi-info {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 2px 0 0;
}

.kpi-trend {
    font-size: 11px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.kpi-trend.up {
    color: #16a34a;
}

.kpi-trend.down {
    color: #dc2626;
}

/* Chart Section */
.chart-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.chart-container {
    position: relative;
    height: 350px;
    /* Fixed height for beauty */
    width: 100%;
}