/* ===========================
   Revenue Recognition Page Styles
   =========================== */

.revenue-dashboard {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Dashboard Layout */
.dashboard-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.dashboard-card.wide {
    grid-column: span 2;
}

.dashboard-card.full-width {
    grid-column: span 3;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c2c2c;
    margin: 0;
}

.chart-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(24, 218, 198, 0.1) 0%, rgba(24, 218, 198, 0.05) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #18dac6;
}

.chart-subtitle {
    font-size: 0.875rem;
    color: #718096;
    margin: 4px 0 0 0;
}

.period-select {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #2c2c2c;
    background-color: #ffffff;
    cursor: pointer;
}

.period-select:focus {
    outline: none;
    border-color: #18dac6;
}

/* Card Body */
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body.center {
    align-items: center;
    justify-content: center;
}

/* Revenue Amount */
.revenue-amount {
    font-size: 3rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 12px;
}

.revenue-change {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.revenue-change.positive {
    color: #10b981;
}

.revenue-change .material-icons-outlined {
    font-size: 18px;
}

.revenue-update {
    font-size: 0.8125rem;
    color: #a0aec0;
    margin-bottom: 20px;
}

/* Mini Chart */
.mini-chart {
    margin-top: auto;
}

/* State List */
.state-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.state-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.state-label {
    width: 48px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #ffffff;
    border-radius: 6px;
    flex-shrink: 0;
}

.state-bar {
    flex: 1;
    height: 32px;
    background-color: #f7fafc;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.state-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.state-value {
    font-weight: 600;
    color: #2c2c2c;
    min-width: 50px;
    text-align: right;
}

/* Percentage Display */
.percentage-large {
    font-size: 4rem;
    font-weight: 700;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.trend-up {
    font-size: 3rem;
    color: #10b981;
}

.percentage-subtitle {
    font-size: 0.9375rem;
    color: #718096;
    margin-bottom: 20px;
    text-align: center;
}

/* Card Link */
.card-link {
    color: #18dac6;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.card-link:hover {
    color: #14c4b0;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #718096;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Chart Stats */
.chart-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-date {
    font-size: 0.875rem;
    color: #718096;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.stat-change.positive {
    color: #10b981;
}

.stat-period {
    font-size: 0.75rem;
    color: #a0aec0;
}

/* Header Buttons */
.filter-btn,
.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #ffffff;
    color: #2c2c2c;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.export-btn:hover {
    background-color: #f7fafc;
    border-color: #cbd5e0;
}

.export-btn {
    background-color: #18dac6;
    color: #000000;
    border-color: #18dac6;
    font-weight: 600;
}

.export-btn:hover {
    background-color: #14c4b0;
    border-color: #14c4b0;
}

.filter-btn .material-icons-outlined,
.export-btn .material-icons-outlined {
    font-size: 20px;
}

/* Donut Chart Container */
.donut-chart-container {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.semi-donut-container {
    width: 100%;
    max-width: 250px;
    margin: 0 auto 20px;
}

/* Active Submenu Item */
.menu-item.active-sub {
    background-color: rgba(24, 218, 198, 0.1);
    color: #18dac6;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .dashboard-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-card.wide {
        grid-column: span 1;
    }
    
    .dashboard-card.full-width {
        grid-column: span 2;
    }
}

@media (max-width: 992px) {
    .revenue-dashboard {
        padding: 24px;
    }
    
    .dashboard-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-card.wide,
    .dashboard-card.full-width {
        grid-column: span 1;
    }
    
    .filter-btn span:not(.material-icons-outlined),
    .export-btn span:not(.material-icons-outlined) {
        display: none;
    }
}

@media (max-width: 768px) {
    .revenue-dashboard {
        padding: 16px;
    }
    
    .dashboard-card {
        padding: 16px;
    }
    
    .revenue-amount {
        font-size: 2.5rem;
    }
    
    .percentage-large {
        font-size: 3rem;
    }
    
    .chart-stats {
        flex-direction: column;
        gap: 16px;
    }
}
