.analytics-month-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 16px 4px;
}

.analytics-card {
    margin: 12px 16px 0;
    background: var(--tg-theme-bg-color, #fff);
    border: 1.5px solid var(--secondary-bg-color);
    border-radius: 16px;
    padding: 16px;
}

.analytics-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 14px;
}

/* Income vs Expenses */
.analytics-comparison {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.analytics-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.analytics-bar-label {
    width: 70px;
    font-size: 12px;
    font-weight: 600;
    color: var(--hint-color);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.analytics-bar-track {
    flex: 1;
    height: 28px;
    background: var(--secondary-bg-color);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.analytics-bar-fill {
    height: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-width: 60px;
}

.analytics-bar-fill.income {
    background: linear-gradient(90deg, #34c759, #5ad87a);
}

.analytics-bar-fill.expense {
    background: linear-gradient(90deg, #ff3b30, #ff6b6b);
}

.analytics-bar-amount-outside {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-color);
    min-width: 80px;
    text-align: right;
    flex-shrink: 0;
}

/* Quick Stats */
.analytics-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 16px 0;
}

.analytics-stat-card {
    background: var(--tg-theme-bg-color, #fff);
    border: 1.5px solid var(--secondary-bg-color);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.analytics-stat-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--hint-color);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.analytics-stat-number {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.3px;
}

.analytics-stat-sub {
    font-size: 11px;
    color: var(--hint-color);
    font-weight: 500;
}

/* Category / Source Breakdown */
.analytics-breakdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--secondary-bg-color);
}

.analytics-breakdown-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.analytics-breakdown-item:first-child {
    padding-top: 0;
}

.analytics-breakdown-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.analytics-breakdown-info {
    flex: 1;
    min-width: 0;
}

.analytics-breakdown-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.analytics-breakdown-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.analytics-breakdown-amount {
    font-size: 14px;
    font-weight: 700;
}

.analytics-breakdown-bar {
    height: 5px;
    background: var(--secondary-bg-color);
    border-radius: 3px;
    overflow: hidden;
}

.analytics-breakdown-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.analytics-breakdown-pct {
    font-size: 12px;
    color: var(--hint-color);
    font-weight: 600;
    min-width: 36px;
    text-align: right;
    flex-shrink: 0;
}

.analytics-empty {
    padding: 24px;
    text-align: center;
    color: var(--hint-color);
    font-size: 13px;
}
