
/* Credit Module Styles */
.credit-status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.credit-status-draft { background-color: #6c757d; color: white; }
.credit-status-pending_branch { background-color: #ffc107; color: #000; }
.credit-status-pending_finance { background-color: #fd7e14; color: white; }
.credit-status-approved { background-color: #198754; color: white; }
.credit-status-rejected { background-color: #dc3545; color: white; }
.credit-status-disbursed { background-color: #0d6efd; color: white; }
.credit-status-partially_paid { background-color: #6f42c1; color: white; }
.credit-status-closed { background-color: #20c997; color: white; }
.credit-status-defaulted { background-color: #212529; color: white; }

/* Credit Card Styles */
.credit-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.credit-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.credit-card-header {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.credit-card-body {
    padding: 15px;
}

.credit-card-footer {
    padding: 10px 15px;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* Progress Bar for Credit Repayment */
.repayment-progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
}

.repayment-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #198754, #20c997);
    transition: width 0.3s;
}

/* Amount Display Styles */
.amount-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
}

.amount-positive {
    color: #198754;
}

.amount-negative {
    color: #dc3545;
}

.amount-large {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Timeline for Credit History */
.credit-timeline {
    position: relative;
    padding-left: 30px;
}

.credit-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #0d6efd;
    background-color: white;
}

.timeline-item.approved::before {
    border-color: #198754;
    background-color: #198754;
}

.timeline-item.rejected::before {
    border-color: #dc3545;
    background-color: #dc3545;
}

.timeline-item.disbursed::before {
    border-color: #6f42c1;
    background-color: #6f42c1;
}

.timeline-item.repayment::before {
    border-color: #20c997;
    background-color: #20c997;
}

/* Voucher Styles */
.voucher-container {
    border: 2px solid #000;
    padding: 20px;
    background: #fff;
    font-family: 'Times New Roman', Times, serif;
}

.voucher-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.voucher-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.voucher-table th,
.voucher-table td {
    border: 1px solid #000;
    padding: 8px;
    text-align: left;
}

.voucher-table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

.voucher-total {
    border-top: 3px double #000;
    font-weight: bold;
    font-size: 1.2em;
}

.signature-line {
    border-top: 1px solid #000;
    margin-top: 40px;
    padding-top: 10px;
    text-align: center;
}

/* Responsive Credit Tables */
@media (max-width: 768px) {
    .credit-table-responsive {
        font-size: 12px;
    }
    
    .credit-table-responsive th,
    .credit-table-responsive td {
        padding: 4px;
    }
    
    .amount-large {
        font-size: 1.2rem;
    }
}

/* Animation for Credit Actions */
@keyframes creditActionSuccess {
    0% { background-color: #d1e7dd; }
    100% { background-color: transparent; }
}

.credit-action-success {
    animation: creditActionSuccess 2s ease;
}

@keyframes creditActionError {
    0% { background-color: #f8d7da; }
    100% { background-color: transparent; }
}

.credit-action-error {
    animation: creditActionError 2s ease;
}

/* Print Optimizations */
@media print {
    .credit-card {
        break-inside: avoid;
        border: 1px solid #000 !important;
    }
    
    .voucher-container {
        border: 2px solid #000 !important;
        page-break-inside: avoid;
    }
    
    .no-print {
        display: none !important;
    }
     .breadcrumb, .breadcrumb-item, .no-print {
                display: none !important;
            }
}

