/* Custom CSS for Debt Management System */

/* Persian/Farsi Font Improvements */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* Reset Bootstrap defaults and set proper color scheme */
body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #4a5568;
}

/* Default text colors for light backgrounds */
h1, h2, h3, h4, h5, h6 {
    color: #2d3748;
    font-weight: 700;
}

p, span, div, label, input, textarea, select {
    color: #4a5568;
}

/* Override for elements that should have white text */
.text-white, .text-light {
    color: white !important;
}

/* Container for better spacing */
.main-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 25px;
    backdrop-filter: blur(15px);
    margin: 15px;
    min-height: calc(100vh - 30px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.main-content {
    padding: 2.5rem;
}

/* Enhanced Card Styling */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
    overflow: hidden;
}

/* Card text colors (dark text on white background) */
.card {
    color: #4a5568;
}

.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: #2d3748;
    font-weight: 700;
}

.card .text-muted {
    color: #718096;
}

.card .fw-bold {
    color: #2d3748;
}

.card .card-title {
    color: #2d3748;
}

.card .card-text {
    color: #4a5568;
}

.card p, .card span, .card div {
    color: #4a5568;
}

.card small, .card .small {
    color: #718096;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.card-header {
    border: none;
    padding: 1.5rem 2rem;
    background: transparent;
    position: relative;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Card header with bg-primary should have white text */
.card-header.bg-primary,
.card-header.bg-primary h1,
.card-header.bg-primary h2,
.card-header.bg-primary h3,
.card-header.bg-primary h4,
.card-header.bg-primary h5,
.card-header.bg-primary h6,
.card-header.bg-primary p,
.card-header.bg-primary span,
.card-header.bg-primary div,
.card-header.bg-primary i {
    color: white !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.card-header.bg-primary::before {
    display: none;
}

.card-body {
    padding: 2rem;
}

/* Gradient Backgrounds for Stats Cards */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

/* Stats cards have dark background, so white text */
.stats-card,
.stats-card h1,
.stats-card h2,
.stats-card h3,
.stats-card h4,
.stats-card h5,
.stats-card h6,
.stats-card p,
.stats-card span,
.stats-card div,
.stats-card .card-title,
.stats-card .card-text,
.stats-card i {
    color: white !important;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.stats-card:hover::before {
    right: -30%;
}

.stats-card-success {
    background: linear-gradient(135deg, #48bb78 0%, #38b2ac 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.stats-card-success,
.stats-card-success h1,
.stats-card-success h2,
.stats-card-success h3,
.stats-card-success h4,
.stats-card-success h5,
.stats-card-success h6,
.stats-card-success p,
.stats-card-success span,
.stats-card-success div,
.stats-card-success .card-title,
.stats-card-success .card-text,
.stats-card-success i {
    color: white !important;
}

.stats-card-success::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.stats-card-success:hover::before {
    right: -30%;
}

.stats-card-warning {
    background: linear-gradient(135deg, #ed8936 0%, #f6ad55 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.stats-card-warning,
.stats-card-warning h1,
.stats-card-warning h2,
.stats-card-warning h3,
.stats-card-warning h4,
.stats-card-warning h5,
.stats-card-warning h6,
.stats-card-warning p,
.stats-card-warning span,
.stats-card-warning div,
.stats-card-warning .card-title,
.stats-card-warning .card-text,
.stats-card-warning i {
    color: white !important;
}

.stats-card-warning::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.stats-card-warning:hover::before {
    right: -30%;
}

.stats-card-info {
    background: linear-gradient(135deg, #4299e1 0%, #63b3ed 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.stats-card-info,
.stats-card-info h1,
.stats-card-info h2,
.stats-card-info h3,
.stats-card-info h4,
.stats-card-info h5,
.stats-card-info h6,
.stats-card-info p,
.stats-card-info span,
.stats-card-info div,
.stats-card-info .card-title,
.stats-card-info .card-text,
.stats-card-info i {
    color: white !important;
}

.stats-card-info::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.stats-card-info:hover::before {
    right: -30%;
}

.stats-card-danger {
    background: linear-gradient(135deg, #f56565 0%, #fc8181 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.stats-card-danger,
.stats-card-danger h1,
.stats-card-danger h2,
.stats-card-danger h3,
.stats-card-danger h4,
.stats-card-danger h5,
.stats-card-danger h6,
.stats-card-danger p,
.stats-card-danger span,
.stats-card-danger div,
.stats-card-danger .card-title,
.stats-card-danger .card-text,
.stats-card-danger i {
    color: white !important;
}

.stats-card-danger::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.stats-card-danger:hover::before {
    right: -30%;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, #2d3748 0%, #4a5568 100%);
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
    min-height: 100vh;
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

/* Sidebar has dark background, so white text */
.sidebar,
.sidebar h1,
.sidebar h2,
.sidebar h3,
.sidebar h4,
.sidebar h5,
.sidebar h6,
.sidebar p,
.sidebar span,
.sidebar div,
.sidebar .text-light {
    color: white !important;
}

.sidebar h4 {
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 15px;
    margin: 5px 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 15px 25px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    color: inherit !important;
}

/* Enhanced Buttons */
.btn {
    border-radius: 15px;
    font-weight: 600;
    padding: 12px 30px;
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Colored buttons have white text */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white !important;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
    color: white !important;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38b2ac 100%);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
    color: white !important;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(72, 187, 120, 0.6);
    color: white !important;
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936 0%, #f6ad55 100%);
    box-shadow: 0 6px 20px rgba(237, 137, 54, 0.4);
    color: white !important;
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(237, 137, 54, 0.6);
    color: white !important;
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #fc8181 100%);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
    color: white !important;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(245, 101, 101, 0.6);
    color: white !important;
}

/* Outline buttons have dark text */
.btn-outline-secondary {
    border: 2px solid #cbd5e0;
    color: #4a5568 !important;
    background: transparent;
}

.btn-outline-secondary:hover {
    background: #cbd5e0;
    color: #2d3748 !important;
    transform: translateY(-2px);
}

/* Enhanced Form Controls */
.form-control,
.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 15px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748;
    font-weight: 500;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    background: white;
    color: #2d3748;
}

.form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control::placeholder {
    color: #a0aec0;
}

.search-box {
    border-radius: 30px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    padding: 15px 25px;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    color: #2d3748;
}

.search-box:focus {
    border-color: #667eea;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
    color: #2d3748;
}

/* Enhanced Table */
.table {
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: none;
}

/* Table header has dark background, so white text */
.table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: none;
    font-weight: 700;
    text-align: center;
    padding: 20px 15px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.3s ease;
    border: none;
    border-bottom: 1px solid #f1f3f5;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: scale(1.01);
}

/* Table body has light background, so dark text */
.table tbody td {
    border: none;
    padding: 20px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f7fafc;
    color: #4a5568;
}

.table tbody td .text-muted {
    color: #718096;
}

.table tbody td .fw-bold,
.table tbody td .font-weight-bold {
    color: #2d3748;
}

.table tbody td h6,
.table tbody td h5,
.table tbody td h4 {
    color: #2d3748;
    margin-bottom: 2px;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Date Info and Action Buttons Styling */
.date-info {
    font-size: 0.9em;
}

.date-info .debt-date {
    color: #495057;
    margin-bottom: 2px;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8em;
}

.dropdown-menu {
    font-size: 0.85em;
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dropdown-item {
    padding: 0.4rem 0.8rem;
}

/* Enhanced Badges */
.status-badge {
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Badges have colored backgrounds, so white text */
.badge {
    color: white !important;
    font-weight: 600;
}

.badge.bg-success {
    background: linear-gradient(135deg, #48bb78 0%, #38b2ac 100%) !important;
    color: white !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ed8936 0%, #f6ad55 100%) !important;
    color: white !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #f56565 0%, #fc8181 100%) !important;
    color: white !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #4299e1 0%, #63b3ed 100%) !important;
    color: white !important;
}

/* Avatar Enhancement */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 20px;
    padding: 20px 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

/* Alerts have colored backgrounds, so white text */
.alert,
.alert h1, .alert h2, .alert h3, .alert h4, .alert h5, .alert h6,
.alert p, .alert span, .alert div {
    color: white !important;
}

.alert-success {
    background: linear-gradient(135deg, #48bb78 0%, #38b2ac 100%);
}

.alert-danger {
    background: linear-gradient(135deg, #f56565 0%, #fc8181 100%);
}

.alert-warning {
    background: linear-gradient(135deg, #ed8936 0%, #f6ad55 100%);
}

.alert-info {
    background: linear-gradient(135deg, #4299e1 0%, #63b3ed 100%);
}

.alert .btn-close {
    filter: brightness(0) invert(1);
}

.alert .fas, .alert i {
    color: white !important;
}

/* Text utility classes */
.text-muted {
    color: #718096 !important;
}

.text-danger {
    color: #e53e3e !important;
}

.text-success {
    color: #38a169 !important;
}

.text-warning {
    color: #d69e2e !important;
}

.text-info {
    color: #3182ce !important;
}

.text-primary {
    color: #667eea !important;
}

.text-secondary {
    color: #6c757d !important;
}

/* Force proper text hierarchy */
.fw-bold, .font-weight-bold {
    color: #2d3748;
}

.fs-1, .fs-2, .fs-3, .fs-4, .fs-5, .fs-6 {
    color: #2d3748;
}

.h1, .h2, .h3, .h4, .h5, .h6 {
    color: #2d3748;
}

/* Links */
a {
    color: #667eea;
    text-decoration: none;
}

a:hover {
    color: #764ba2;
}

/* Small text */
.small, small {
    color: #718096;
}

/* Form validation */
.invalid-feedback {
    color: #e53e3e !important;
    font-weight: 500;
}

.valid-feedback {
    color: #38a169 !important;
    font-weight: 500;
}

/* Card header */
.card-header h5 {
    color: #2d3748;
    font-weight: 700;
}

/* Card header with colored background */
.card-header.bg-primary h5,
.card-header.bg-success h5,
.card-header.bg-warning h5,
.card-header.bg-danger h5,
.card-header.bg-info h5 {
    color: white !important;
    font-weight: 700;
}

/* Dropdown menus */
.dropdown-menu {
    background: white;
    color: #4a5568;
}

.dropdown-item {
    color: #4a5568;
}

.dropdown-item:hover {
    color: #2d3748;
    background: #f7fafc;
}

/* Override any remaining issues */
.text-dark {
    color: #2d3748 !important;
}

/* Ensure all stats cards maintain white text */
.stats-card .opacity-75,
.stats-card-success .opacity-75,
.stats-card-warning .opacity-75,
.stats-card-info .opacity-75,
.stats-card-danger .opacity-75 {
    opacity: 0.9 !important;
    color: white !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .main-container {
        margin: 10px;
        border-radius: 15px;
        min-height: calc(100vh - 20px);
    }
    
    .sidebar {
        min-height: auto;
        padding: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .table-responsive {
        border-radius: 15px;
    }
    
    .btn {
        padding: 10px 20px;
        margin: 2px;
        font-size: 14px;
    }
    
    .stats-card .card-body {
        padding: 1.5rem;
    }
    
    .stats-card h3,
    .stats-card h4,
    .stats-card h5 {
        font-size: 1.3rem;
    }
    
    .form-control,
    .form-select {
        padding: 12px 15px;
        font-size: 16px;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out;
}

/* Loading Animation */
.loading {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination Enhancement */
.pagination {
    justify-content: center;
}

.pagination .page-link {
    border: none;
    color: #667eea;
    padding: 12px 18px;
    margin: 0 3px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.8);
}

.pagination .page-link:hover,
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Print Styles */
@media print {
    .sidebar,
    .btn,
    .pagination {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    body {
        background: white !important;
    }
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.shadow-soft {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08) !important;
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;
}

/* Spacing improvements */
.section-spacing {
    margin-bottom: 2.5rem;
}

.card-spacing {
    margin-bottom: 1.5rem;
}

/* Better responsiveness */
@media (max-width: 992px) {
    .main-container {
        margin: 10px;
        border-radius: 20px;
    }
    
    .main-content {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .main-container {
        margin: 5px;
        border-radius: 15px;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Fix for small text readability */
.small, small {
    color: #718096;
}

/* Pagination Styles */
.pagination {
    margin: 0;
}

.pagination .page-link {
    color: #4a5568;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    margin: 0 0.125rem;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    color: #2d3748;
    background-color: #f7fafc;
    border-color: #cbd5e0;
    text-decoration: none;
}

.pagination .page-item.active .page-link {
    color: #fff;
    background-color: #4299e1;
    border-color: #4299e1;
}

.pagination .page-item.disabled .page-link {
    color: #a0aec0;
    background-color: #fff;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.pagination .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(66, 153, 225, 0.25);
    border-color: #4299e1;
}

/* RTL support for pagination */
.pagination .page-item:first-child .page-link {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.pagination .page-item:last-child .page-link {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Payment Progress Styles */
.payment-info {
    font-size: 0.9em;
}

.payment-info .progress {
    background-color: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
}

.payment-info .progress-bar {
    background: linear-gradient(45deg, #28a745, #34ce57);
    transition: width 0.3s ease;
}

.payment-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

/* Quick Amount Buttons */
.quick-amount {
    transition: all 0.2s ease;
}

.quick-amount:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

/* Payment Status Badges Enhancement */
.status-badge.bg-warning {
    background-color: #fd7e14 !important;
    color: white !important;
}

.status-badge.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.status-badge.bg-success {
    background-color: #198754 !important;
    color: white !important;
}

/* Payment Form Enhancements */
.payment-form .amount-input {
    font-size: 1.1em;
    font-weight: 500;
}

/* Progress Bar in Tables */
.table .progress {
    margin: 0;
    height: 6px !important;
}

.table .progress-bar {
    font-size: 0;
}

/* Responsive Payment Info */
@media (max-width: 768px) {
    .payment-info {
        font-size: 0.85em;
    }
    
    .payment-summary {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .quick-amount {
        margin-bottom: 0.5rem;
    }
}

/* Enhanced Stats Cards for Payment Tracking */
.stats-card-partial {
    background: linear-gradient(135deg, #fd7e14 0%, #ff8f40 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.stats-card-partial,
.stats-card-partial h1,
.stats-card-partial h2,
.stats-card-partial h3,
.stats-card-partial h4,
.stats-card-partial h5,
.stats-card-partial h6,
.stats-card-partial p,
.stats-card-partial span,
.stats-card-partial div,
.stats-card-partial .card-title,
.stats-card-partial .card-text,
.stats-card-partial i {
    color: white !important;
}

.stats-card-partial::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.stats-card-partial:hover::before {
    right: -30%;
}

/* Enhanced Amount Input for Payment */
.amount-input {
    font-family: 'Vazirmatn', Arial, sans-serif;
    font-size: 1.2em !important;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.5px;
    direction: ltr;
}

.amount-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

.amount-input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

/* Input Group Enhancement for Amount */
.input-group:has(.amount-input) {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.input-group:has(.amount-input) .input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
    font-weight: 500;
    color: #495057;
}

/* Form Validation Enhancements */
.amount-input.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

.amount-input.is-valid {
    border-color: #28a745;
    background-image: none;
}

/* Loading State for Amount Input */
.amount-input.loading {
    background-image: url("data:image/svg+xml,%3csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM3.5 7.5a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm5 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm5 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

/* Clean Debt Amount Cell in Table */
.debt-amount-cell {
    min-width: 140px;
    text-align: right;
}

.debt-amount-cell .amount-main {
    font-size: 1.1em;
    margin-bottom: 4px;
    direction: ltr;
    text-align: right;
}

.debt-amount-cell .amount-main::after {
    content: ' تومان';
    font-size: 0.85em;
    font-weight: normal;
    color: #6c757d;
    margin-right: 4px;
}

/* Enhanced styling for partially paid amounts */
.debt-amount-cell .amount-main.text-warning {
    color: #f57c00 !important;
}

.debt-amount-cell .amount-status {
    font-size: 0.8em;
    margin-bottom: 2px;
}

.debt-amount-cell .payment-progress {
    margin-top: 4px;
}

.debt-amount-cell .progress {
    margin-bottom: 2px !important;
    background-color: #f1f3f4;
    border-radius: 2px;
}

.debt-amount-cell .progress-bar {
    border-radius: 2px;
}

/* Warning progress bar styling */
.debt-amount-cell .progress-bar.bg-warning {
    background-color: #f57c00 !important;
}

/* Compact Table Styling */
.table td {
    vertical-align: middle;
    padding: 0.75rem 0.5rem;
}

.table th {
    padding: 0.75rem 0.5rem;
    font-weight: 600;
    font-size: 0.9em;
    border-bottom: 2px solid #dee2e6;
}

/* Status Badge Improvements */
.status-badge {
    font-size: 0.75em;
    padding: 0.4em 0.8em;
    border-radius: 12px;
    font-weight: 500;
}

/* Clean Row Styling */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .debt-amount-cell {
        min-width: auto;
        text-align: center;
    }
    
    .debt-amount-cell .amount-main {
        font-size: 1em;
        text-align: center;
    }
    
    .table th, .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.85em;
    }
}
