/* css/dashboard.css - Dashboard specific styles */

/* Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.card {
    background: var(--white);
    padding: 15px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.card h3 {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 500;
}

.card p {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.chart-wrapper {
    /* position: relative; */
    /* height: auto; */
    /* max-height: 400px; */
    background: var(--white);
    padding: 15px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* .chart-wrapper canvas {
    max-height: 300px !important; /* Adjust this value as needed */
/* } */
*/ .chart-wrapper h3 {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--dark);
    font-weight: 600;
}

/* Category Cards */
.category-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.category-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 15px;
    transition: all 0.2s;
}

.category-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-card.drag-over {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-title h4 {
    color: var(--dark);
    font-size: 14px;
    font-weight: 600;
}

.category-total {
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.category-actions {
    display: flex;
    gap: 5px;
}

/* Transactions */
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin: 5px 0;
    background: var(--light);
    border-radius: 4px;
    cursor: move;
    transition: all 0.2s;
    font-size: 13px;
}

.transaction-item:hover {
    background: var(--border);
}

.transaction-item.dragging {
    opacity: 0.5;
}

.transaction-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.transaction-amount {
    font-weight: 600;
    margin-right: 8px;
}

/* Transactions List */
.transactions-list {
    max-height: 400px;
    overflow-y: auto;
}

.transaction-row {
    display: grid;
    grid-template-columns: 100px 1fr 100px 60px;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    font-size: 13px;
}

.transaction-row:hover {
    background: var(--light);
}

/* Budget Progress */
.budget-progress {
    height: 4px;
    background: var(--light);
    border-radius: 2px;
    overflow: hidden;
}

.budget-progress-fill {
    height: 100%;
    background: var(--success);
    transition: all 0.3s;
}

.budget-progress-fill.warning {
    background: var(--warning);
}

.budget-progress-fill.danger {
    background: var(--danger);
}

/* Duplicate indicator */
.duplicate-indicator {
    display: inline-block;
    background: var(--warning);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .chart-wrapper canvas {
        max-height: 300px !important;
        height: auto !important;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }

    .category-details {
        grid-template-columns: 1fr;
    }
}
