/* Budget Tracker Styles */

.board-title {
    font-size: 28px;
    font-weight: 700;
    border: none;
    background: transparent;
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
}

.board-title:hover {
    background-color: var(--bg-hover);
}

.board-title:focus {
    background-color: var(--bg-hover);
    outline: 2px solid var(--color-teal);
}

.collaboration-indicators {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
}

.collaborator-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid var(--bg-primary);
    margin-left: -8px;
    cursor: pointer;
}

.collaborator-avatar:first-child {
    margin-left: 0;
}

.budget-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.overview-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.overview-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.overview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.overview-icon {
    font-size: 24px;
}

.overview-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overview-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.overview-change {
    font-size: 13px;
    font-weight: 500;
}

.overview-change.positive {
    color: var(--success);
}

.overview-change.negative {
    color: var(--danger);
}

.income-card {
    border-left: 4px solid var(--success);
}

.expense-card {
    border-left: 4px solid var(--danger);
}

.savings-card {
    border-left: 4px solid var(--color-teal);
}

.balance-card {
    border-left: 4px solid var(--color-deep-blue);
}

/* Tabs */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: var(--bg-hover);
}

.filter-btn.active {
    background-color: var(--color-teal);
    color: white;
    border-color: var(--color-teal);
}

/* Transactions Table */
.transactions-table {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 120px 1fr 150px 100px 140px 60px;
    padding: 16px 20px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-row {
    display: grid;
    grid-template-columns: 120px 1fr 150px 100px 140px 60px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    transition: background-color 0.2s ease;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background-color: var(--bg-hover);
}

.table-cell {
    font-size: 14px;
    color: var(--text-primary);
}

.amount-positive {
    color: var(--success);
    font-weight: 600;
}

.amount-negative {
    color: var(--danger);
    font-weight: 600;
}

.category-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.income-badge {
    background-color: var(--success);
}

.food-badge {
    background-color: #ffc107;
}

.utilities-badge {
    background-color: #dc3545;
}

.freelance-badge {
    background-color: var(--color-teal);
}

.housing-badge {
    background-color: #28a745;
}

.transport-badge {
    background-color: #17a2b8;
}

.entertainment-badge {
    background-color: #6f42c1;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.category-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.category-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.category-budget {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.category-progress-bar {
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.category-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.category-percentage {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 600;
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.chart-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.chart-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.chart-placeholder {
    display: flex;
    gap: 32px;
    align-items: center;
}

.pie-chart {
    width: 200px;
    height: 200px;
}

.pie-segment {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.chart-legend {
    flex: 1;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-primary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 300px;
    padding: 20px;
    gap: 40px;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    max-width: 100px;
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bar:hover {
    opacity: 0.8;
    transform: scaleY(1.02);
}

.bar::after {
    content: attr(data-value);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.income-bar {
    background: linear-gradient(to top, #28a745, #34ce57);
}

.expense-bar {
    background: linear-gradient(to top, #dc3545, #ff4757);
}

.savings-bar {
    background: linear-gradient(to top, var(--color-deep-blue), var(--color-teal));
}

.bar-label {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Goals */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.goal-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.goal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.goal-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

.goal-amount {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.goal-progress-bar {
    height: 12px;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-deep-blue), var(--color-teal));
    border-radius: 6px;
    transition: width 0.3s ease;
}

.goal-footer {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .budget-overview {
        grid-template-columns: 1fr;
    }

    .table-header,
    .table-row {
        grid-template-columns: 1fr 2fr 1fr;
        gap: 8px;
    }

    .table-header div:nth-child(3),
    .table-header div:nth-child(4),
    .table-header div:nth-child(6),
    .table-row .table-cell:nth-child(3),
    .table-row .table-cell:nth-child(4),
    .table-row .table-cell:nth-child(6) {
        display: none;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }

    .chart-placeholder {
        flex-direction: column;
    }

    .bar-chart {
        gap: 20px;
    }
}

