/* Modern Analytics Dashboard Styles */

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Specific Layout for the top row: 2 small cards, 1 large revenue chart */
.analytics-top-row {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.analytics-left-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 1200px) {
    .analytics-top-row {
        grid-template-columns: 1fr;
    }

    .analytics-left-col {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.modern-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.modern-card-header {
    margin-bottom: 20px;
}

.modern-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.modern-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Card 1: Profit / Calls Trend */
.card-profit {
    min-height: 200px;
}

.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
    margin-top: 8px;
}

.total-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 10px;
}

/* Card 2: Expenses / Radial Gauge */
.card-expenses {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
}

.radial-chart-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radial-chart-text {
    position: absolute;
    text-align: center;
}

.radial-percent {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Card 3: Generated Leads / Circular */
.card-leads {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.leads-info {
    flex: 1;
}

.leads-chart-container {
    width: 100px;
    height: 100px;
    position: relative;
}

/* Card 4: Revenue Report / Bar Chart */
.card-revenue {
    min-height: 350px;
    grid-column: span 1;
    /* In robust grids */
}

.revenue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.revenue-legend {
    display: flex;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.budget-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
    margin-left: 20px;
    min-width: 150px;
}

.budget-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 10px 0;
}

.budget-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 10px;
}

/* Layout overrides */
.modern-dashboard-container {
    display: grid;
    gap: 24px;
}

/* Top Stats Row: Profit / Expenses / Leads / Budget? */
/* Actually fitting the image:
Left Col: Profit (Line), Expenses (Half-Doughnut)
Right Col: Revenue Report (Bar) + Budget (Side panel?)
Since the image has "Profit" and "Expenses" stacked or grid?
Image: Profit & Expenses are separate cards. Generated Leads is separate.
Revenue Report is a large card.
Revenue Report has a "Budget" side panel inside it? Or separate? 
The image shows "Revenue Report" on the left of that card, and "$25,825 Budget" on the right side of the SAME card.
*/

.revenue-card-content {
    display: flex;
    height: 100%;
}

.revenue-chart-area {
    flex: 1;
    border-right: 1px solid var(--border-color);
    padding-right: 20px;
}

.revenue-budget-area {
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 20px;
    text-align: center;
}

.budget-chart-mini {
    height: 60px;
    width: 100%;
    margin: 20px 0;
}