/* ========== Aging Cards ========== */

.aging-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.aging-card {
    text-align: center;
    padding: 20px 12px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.aging-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.aging-card.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.aging-card-value {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.aging-card-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* Card Colors */
.aging-current { border-color: #10b981; }
.aging-current .aging-card-value { color: #059669; }
.aging-current.active { background: #ecfdf5; border-color: #059669; }

.aging-30 { border-color: #f59e0b; }
.aging-30 .aging-card-value { color: #d97706; }
.aging-30.active { background: #fffbeb; border-color: #d97706; }

.aging-60 { border-color: #f97316; }
.aging-60 .aging-card-value { color: #ea580c; }
.aging-60.active { background: #fff7ed; border-color: #ea580c; }

.aging-90 { border-color: #ef4444; }
.aging-90 .aging-card-value { color: #dc2626; }
.aging-90.active { background: #fef2f2; border-color: #dc2626; }

.aging-over90 { border-color: #991b1b; }
.aging-over90 .aging-card-value { color: #991b1b; }
.aging-over90.active { background: #fef2f2; border-color: #991b1b; }

/* ========== Total Bar ========== */

.aging-total-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 15px;
    color: #64748b;
}

.aging-total-bar strong {
    font-size: 18px;
    color: #1e293b;
}

/* ========== Bucket Badges ========== */

.bucket-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.bucket-current { background: #d1fae5; color: #065f46; }
.bucket-30 { background: #fef3c7; color: #92400e; }
.bucket-60 { background: #ffedd5; color: #9a3412; }
.bucket-90 { background: #fee2e2; color: #991b1b; }
.bucket-over90 { background: #fecaca; color: #7f1d1d; }

/* ========== Amount / Link ========== */

.amount-column { text-align: right; }
.amount-cell { text-align: right; font-weight: 500; white-space: nowrap; }

.invoice-link {
    color: #1e40af;
    font-weight: 600;
    text-decoration: none;
}

.invoice-link:hover { text-decoration: underline; }

/* ========== Responsive ========== */

@media (max-width: 1200px) {
    .aging-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .aging-cards { grid-template-columns: repeat(2, 1fr); }
    .aging-card-value { font-size: 18px; }
}