
        :root {
            --primary: #1976d2;
            --primary-dark: #0d47a1;
            --secondary: #00a86b;
            --danger: #d32f2f;
            --warning: #ffa000;
            --success: #388e3c;
            --dark: #121826;
            --light: #f8f9fa;
            --gray: #636e72;
            --border: #e0e0e0;
            --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
            --transition: all 0.3s ease;
        }

        .loan-hist__wrapper {
            margin: 0 auto;
            max-width: 1300px;
            padding: 2rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .loan-dashboard {
            max-width: 1200px;
            margin: 0 auto;
        }

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

        .dashboard-title {
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--dark);
            position: relative;
        }

        .dashboard-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 0;
            width: 80px;
            height: 4px;
            background: var(--primary);
            border-radius: 2px;
        }

        .dashboard-stats {
            display: flex;
            gap: 20px;
        }

        .stat-card {
            background: white;
            padding: 15px 25px;
            border-radius: 16px;
            box-shadow: var(--card-shadow);
            text-align: center;
            min-width: 180px;
        }

        .stat-value {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 5px;
        }

        .stat-label {
            font-size: 0.9rem;
            color: var(--gray);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .loan-filters {
            display: flex;
            justify-content: space-between;
            margin-bottom: 30px;
            gap: 20px;
            flex-wrap: wrap;
        }

        .search-box {
            position: relative;
            flex: 1;
            max-width: 400px;
        }

        .search-box input {
            width: 100%;
            padding: 14px 20px 14px 50px;
            border: none;
            border-radius: 12px;
            background: white;
            box-shadow: var(--card-shadow);
            font-size: 1rem;
            transition: var(--transition);
        }

        .search-box input:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
        }

        .search-box i {
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gray);
        }

        .filter-tabs {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .filter-tab {
            padding: 12px 24px;
            border-radius: 30px;
            background: white;
            border: 1px solid var(--border);
            cursor: pointer;
            font-weight: 500;
            transition: var(--transition);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
        }

        .filter-tab:hover, .filter-tab.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
        }

        .loan-list {
            display: grid;
            gap: 25px;
        }

        .loan-card {
            background: white;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            transition: var(--transition);
        }

        .loan-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
        }

        .loan-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 25px 30px;
            border-bottom: 1px solid var(--border);
            cursor: pointer;
        }

        .loan-id {
            font-size: 0.9rem;
            color: var(--gray);
            font-weight: 500;
        }

        .loan-status {
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .status-approved {
            background: #e3f2fd;
            color: var(--primary);
        }

        .loan-main {
            padding: 25px 30px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        .loan-summary {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .loan-amount {
            font-size: 2.2rem;
            font-weight: 800;
            color: var(--dark);
            margin-bottom: 5px;
        }

        .loan-meta {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }

        .loan-meta-item {
            background: var(--light);
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .loan-meta-item i {
            color: var(--primary);
        }

        .loan-details {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
        }

        .detail-item {
            margin-bottom: 15px;
        }

        .detail-label {
            font-size: 0.85rem;
            color: var(--gray);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 5px;
            display: block;
        }

        .detail-value {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--dark);
        }

        .loan-timeline {
            padding: 25px 30px;
            background: #f8fafd;
            border-top: 1px solid var(--border);
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 25px;
        }

        .timeline-item {
            display: flex;
            gap: 15px;
        }

        .timeline-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            flex-shrink: 0;
        }

        .timeline-content h4 {
            font-size: 1rem;
            margin-bottom: 5px;
            color: var(--dark);
        }

        .timeline-content p {
            font-size: 0.95rem;
            color: var(--gray);
        }

        .loan-actions {
            padding: 25px 30px;
            background: var(--dark);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
        }

        .action-info {
            color: white;
        }

        .action-info h3 {
            font-size: 1.3rem;
            margin-bottom: 5px;
        }

        .action-info p {
            font-size: 1rem;
            opacity: 0.8;
        }

        .action-button {
            background: white;
            color: black;
            border: none;
            padding: 16px 40px;
            border-radius: 12px;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        .action-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
        }

        /* Status Colors */
        .status-approved { background: #e3f2fd; color: var(--primary); }
        .status-pending { background: #fffae6; color: #8a6800; }
        .status-repaid { background: #e3fcef; color: #006644; }
        .status-rejected { background: #ffebee; color: var(--danger); }

        /* Responsive Design */
        @media (max-width: 992px) {
            .dashboard-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 25px;
            }
            
            .dashboard-stats {
                width: 100%;
                justify-content: space-between;
            }
            
            .stat-card {
                min-width: auto;
                flex: 1;
            }
        }

        @media (max-width: 768px) {
            .dashboard-title {
                font-size: 2rem;
            }
            
            .loan-main {
                grid-template-columns: 1fr;
            }
            
            .loan-timeline {
                grid-template-columns: 1fr;
            }
            
            .loan-actions {
                flex-direction: column;
                text-align: center;
            }
            
            .action-button {
                width: 100%;
                justify-content: center;
            }
        }

        @media (max-width: 576px) {
            .dashboard-stats {
                flex-direction: column;
            }
            
            .filter-tabs {
                width: 100%;
                justify-content: center;
            }
            
            .filter-tab {
                flex: 1;
                text-align: center;
                padding: 12px 15px;
            }
        }
/* place in your stylesheet */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal {
  background: #fff;
  padding: 1.5rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.modal input {
  width: 100%;
  padding: 0.75rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.btn-cancel, .btn-repay {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}
.btn-cancel { background: #eee; }
.btn-repay { background: #2a9d8f; color: #fff; }

.custom-toast {
  position: fixed; top: 1rem; right: 1rem;
  background: #2a9d8f; color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  opacity: 0; transform: translateY(-20px);
  transition: all 0.3s;
  z-index: 1100;
}
.custom-toast.visible {
  opacity: 1; transform: translateY(0);
}
.custom-toast.error { background: #e76f51; }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
  gap: 0.5rem;
}
.pagination button {
  padding: 0.4rem 0.8rem;
  border: none;
  background: #264653;
  color: #fff;
  border-radius: 0.5rem;
  cursor: pointer;
}
.pagination button:hover {
  background: #1b3330;
}
