/* CareMoney Fintech - Modern CSS Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e1e1;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #d1d1d1;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
    border-color: #28a745;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-color: #dc3545;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border-color: #ffc107;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: #0c5460;
    border-color: #17a2b8;
}

/* Dashboard Layout */
.dashboard-wrapper {
    background: #f8f9fa;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    height: 100vh; /* Fixed height instead of min-height */
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    padding: 20px 0;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Hide horizontal scrolling */
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    text-align: center;
    padding: 20px;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar-menu {
    list-style: none;
    flex: 1; /* Take remaining space */
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu li.active a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: #667eea;
}

.sidebar-menu .badge {
    background: #ff4757;
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: auto;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
}

.main-content {
    margin-left: 250px;
    padding: 20px;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Content wrapper for pages */
.content-wrapper {
    background: transparent;
    padding: 0;
}

/* Page Header */
.page-header {
    background: white;
    padding: 25px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h2 i {
    color: #667eea;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: between;
    align-items: center;
}

.header h1 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 300;
}

/* Enhanced Header Styles */
.enhanced-header {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 25px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.enhanced-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: headerFlow 3s ease-in-out infinite;
}

@keyframes headerFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
}

.page-title-section h1 {
    color: #2d3748;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

.page-breadcrumb i {
    font-size: 0.8rem;
}

.page-breadcrumb .fa-chevron-right {
    font-size: 0.7rem;
    opacity: 0.6;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.05));
    border-radius: 12px;
    border: 1px solid rgba(102,126,234,0.2);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(102,126,234,0.3);
}

.user-profile-enhanced {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4));
    border-radius: 25px;
    border: 2px solid rgba(102,126,234,0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
}

.user-profile-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102,126,234,0.2);
    border-color: rgba(102,126,234,0.4);
}

.user-avatar-enhanced {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-ring {
    position: absolute;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #667eea, #764ba2, #667eea);
    animation: avatarRotate 8s linear infinite;
}

@keyframes avatarRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.avatar-inner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    position: relative;
    z-index: 2;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.user-details-enhanced .user-name {
    color: #2d3748;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.user-details-enhanced .user-role {
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 2px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-status {
    position: relative;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
}

.status-indicator.online {
    background: #48bb78;
    box-shadow: 0 0 10px rgba(72, 187, 120, 0.5);
}

.status-indicator.online::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #48bb78;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.5); }
}

.user-info {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.user-info .dropdown {
    position: relative;
    display: inline-block;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 10px;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.card-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 500;
    font-size: 1.1rem;
}

.card-body {
    padding: 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
    flex-shrink: 0;
}

.stat-icon.pending { 
    background: linear-gradient(135deg, #ffc107, #e0a800); 
}

.stat-icon.approved { 
    background: linear-gradient(135deg, #28a745, #1e7e34); 
}

.stat-icon.rejected { 
    background: linear-gradient(135deg, #dc3545, #c82333); 
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.stat-content p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Content Cards */
.content-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 25px;
}

.content-card .card-header {
    padding: 25px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.content-card .card-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filters select {
    min-width: 160px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
}

.table-responsive {
    padding: 0;
    background: white;
}

.stat-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.1;
}

/* DataTable Improvements - Common styles for all table types */
.data-table,
.users-data-table,
.loans-data-table, 
.branches-data-table,
.reports-data-table,
.audit-data-table,
.branch-reports-data-table,
.user-reports-data-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th,
.users-data-table thead th,
.loans-data-table thead th,
.branches-data-table thead th,
.reports-data-table thead th,
.audit-data-table thead th,
.branch-reports-data-table thead th,
.user-reports-data-table thead th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 15px 12px;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody td,
.users-data-table tbody td,
.loans-data-table tbody td,
.branches-data-table tbody td,
.reports-data-table tbody td,
.audit-data-table tbody td,
.branch-reports-data-table tbody td,
.user-reports-data-table tbody td {
    padding: 15px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.data-table tbody tr:hover,
.users-data-table tbody tr:hover,
.loans-data-table tbody tr:hover,
.branches-data-table tbody tr:hover,
.reports-data-table tbody tr:hover,
.audit-data-table tbody tr:hover,
.branch-reports-data-table tbody tr:hover,
.user-reports-data-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Action buttons styling */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    width: 34px;
    height: 34px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sm i {
    font-size: 0.9rem;
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Ensure all action buttons have same size regardless of tag */
.action-buttons a,
.action-buttons button {
    padding: 6px 10px !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 34px !important;
    min-height: 34px !important;
    width: 34px !important;
    height: 34px !important;
    border: none !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.action-buttons a:hover,
.action-buttons button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    text-decoration: none !important;
}
.btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #a02622);
    color: white;
}

/* User info styling */
.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-info strong {
    color: #2c3e50;
    font-weight: 600;
}

.user-info small {
    color: #666;
    font-size: 0.8rem;
}
.table-container {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    margin: 0;
}

.table thead th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 500;
    border: none;
}

.table tbody td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Status badges */
.status-badge {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.status-pending { 
    background: #fff3cd; 
    color: #856404; 
    border: 1px solid #ffecb5;
}

.status-approved { 
    background: #d1e7dd; 
    color: #0f5132; 
    border: 1px solid #c3e6cb;
}

.status-rejected { 
    background: #f8d7da; 
    color: #721c24; 
    border: 1px solid #f5c6cb;
}

.status-disbursed { 
    background: #cfe2ff; 
    color: #084298; 
    border: 1px solid #b6d7ff;
}

/* Status Badge */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.badge-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.badge-info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.badge-secondary {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
}

.form-col-2 {
    flex: 2;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    margin: 0 2px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Search and Filter */
.search-filters {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.filter-row {
    display: flex;
    gap: 20px;
    align-items: end;
}

.filter-col {
    flex: 1;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.chart-title {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 10px;
        width: 100%;
    }
    
    .content-wrapper {
        padding: 0;
        margin: 0;
    }
    
    .row {
        margin: 0;
    }
    
    .col-md-6 {
        padding: 0 5px;
        margin-bottom: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
        gap: 15px;
    }
    
    .content-card .card-header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filters select {
        min-width: 100%;
    }
    
    .page-header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .action-buttons {
        gap: 3px;
    }
    
    .btn-sm {
        min-width: 28px;
        height: 28px;
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    /* Table responsiveness */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table,
    .users-data-table,
    .loans-data-table {
        min-width: 600px;
    }
    
    /* Card responsiveness */
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Form responsiveness */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Login page mobile */
    .login-card {
        padding: 25px 20px;
        margin: 10px;
    }
    
    .login-logo {
        font-size: 2rem;
    }
    
    /* Profile page mobile */
    .content-wrapper .row {
        flex-direction: column;
    }
    
    .content-wrapper .col-md-6 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    /* Enhanced header mobile */
    .enhanced-header {
        padding: 15px;
    }
    
    .header-left {
        gap: 10px;
    }
    
    .page-title-section h1 {
        font-size: 1.5rem;
    }
    
    .user-profile-enhanced {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .avatar-ring, .avatar-inner {
        width: 35px;
        height: 35px;
    }
    
    .avatar-inner {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .user-details-enhanced .user-name {
        font-size: 0.85rem;
    }
    
    .user-details-enhanced .user-role {
        font-size: 0.7rem;
    }
}
/* Mobile responsiveness for enhanced header */
@media (max-width: 992px) {
    .enhanced-header {
        flex-direction: column;
        gap: 20px;
        padding: 20px 25px;
    }
    
    .header-left, .header-right {
        width: 100%;
    }
    
    .header-right {
        justify-content: space-between;
    }
    
    .header-stats {
        padding: 12px 15px;
        gap: 15px;
    }
    
    .page-title-section h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .enhanced-header {
        padding: 15px 20px;
    }
    
    .header-left {
        gap: 15px;
    }
    
    .header-stats {
        display: none;
    }
    
    .user-profile-enhanced {
        padding: 10px 15px;
        gap: 12px;
    }
    
    .avatar-ring, .avatar-inner {
        width: 40px;
        height: 40px;
    }
    
    .avatar-inner {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .page-title-section h1 {
        font-size: 1.5rem;
    }
    
    .page-breadcrumb {
        font-size: 0.8rem;
    }
    
    .user-details-enhanced .user-name {
        font-size: 0.9rem;
    }
    
    .user-details-enhanced .user-role {
        font-size: 0.75rem;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #2c3e50;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    background: rgba(102, 126, 234, 0.05);
    margin: 20px 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.15);
}

.file-upload-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: between;
    padding: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
}

.file-item .file-name {
    flex: 1;
}

.file-item .file-size {
    color: #666;
    font-size: 0.9rem;
    margin: 0 10px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        color: #e1e1e1;
    }
    
    .card, .login-card, .header, .search-filters, .stat-card, .chart-card {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #e1e1e1;
    }
    
    .form-control {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #e1e1e1;
    }
    
    .table tbody td {
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Mobile Action Buttons */
@media (max-width: 768px) {
    .action-buttons {
        gap: 3px;
        justify-content: center;
    }
    
    .action-buttons a,
    .action-buttons button {
        min-width: 30px !important;
        width: 30px !important;
        height: 30px !important;
        font-size: 0.7rem !important;
        padding: 4px !important;
    }
    
    .action-buttons a i,
    .action-buttons button i {
        font-size: 0.8rem;
    }
}

/* Loan Forms and Details Pages */
.loan-form {
    max-width: 100%;
}

.loan-header-card {
    margin-bottom: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.loan-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ff6b6b, #4ecdc4, #45b7d1);
    background-size: 300% 300%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.loan-header-card .card-body {
    padding: 35px;
    position: relative;
}

.loan-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    flex-wrap: wrap;
    gap: 25px;
    position: relative;
}

.loan-id-section {
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
}

.loan-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.loan-icon:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.loan-id-info h2 {
    color: white;
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background: linear-gradient(45deg, #ffffff, #e8f4f8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loan-id-info p {
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0 0 0;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loan-status-section {
    text-align: right;
    position: relative;
}

.status-xl {
    font-size: 1.3rem;
    padding: 15px 30px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status-xl::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: all 0.5s;
}

.status-xl:hover::before {
    left: 100%;
}

.status-xl.status-approved {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.4);
}

.status-xl.status-rejected {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.4);
}

.status-xl.status-processing {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
    color: white;
    box-shadow: 0 10px 30px rgba(23, 162, 184, 0.4);
}

.status-xl.status-pending {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.4);
}

.loan-status-section p {
    color: rgba(255, 255, 255, 0.9);
    margin: 12px 0 0 0;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loan Metrics */
.loan-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    background: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loan-metrics::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%), 
                linear-gradient(-45deg, rgba(255,255,255,0.02) 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.02) 75%), 
                linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.02) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 18px;
    text-align: left;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.metric-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.metric-icon {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.metric-item:hover .metric-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1) rotate(5deg);
}

.metric-info h4 {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.metric-info span {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loan-id-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 25px;
}

.loan-id-card .card-body {
    padding: 25px 30px;
}

.loan-id-card h4 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}

.loan-id-card p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Info Grid for View Page */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.info-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 15px;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #333;
}

.info-value i {
    color: #667eea;
    width: 16px;
    text-align: center;
}

.loan-amount span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.document-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.document-icon {
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.document-info {
    flex: 1;
}

.document-name {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.document-size {
    display: block;
    font-size: 0.85rem;
    color: #666;
}

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

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-block {
    width: 100%;
    margin-bottom: 8px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding-left: 35px;
}

.timeline-marker {
    position: absolute;
    left: -45px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #666;
}

.timeline-item.active .timeline-marker {
    background: #667eea;
    color: white;
}

.timeline-content h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.timeline-content p {
    margin: 0 0 3px 0;
    font-size: 0.9rem;
    color: #666;
}

.timeline-content small {
    color: #999;
    font-size: 0.8rem;
}

/* Form Actions */
.form-actions {
    background: white;
    padding: 25px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    align-items: center;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

/* Responsive adjustments for new pages */
@media (max-width: 768px) {
    .loan-details-container .row {
        margin: 0;
    }
    
    .loan-details-container .col-lg-4 {
        margin-top: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .loan-header-card .card-body {
        padding: 20px;
        text-align: center;
    }
    
    .loan-status-display {
        text-align: center;
        margin-top: 15px;
    }
}

/* Applicant Profile Section */
.applicant-profile {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    min-width: 80px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 3px solid rgba(255,255,255,0.3);
}

.profile-info {
    flex: 1;
}

.profile-name {
    margin: 0 0 10px 0;
    color: #2d3748;
    font-size: 1.4rem;
    font-weight: 700;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    font-size: 0.9rem;
}

.profile-meta-item i {
    width: 16px;
    color: #667eea;
    text-align: center;
}

.contact-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
    color: white;
    text-decoration: none;
}

.contact-btn.secondary {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.contact-btn.secondary:hover {
    box-shadow: 0 4px 15px rgba(72,187,120,0.4);
}

/* Loan Summary Cards */
.loan-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.summary-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.summary-item.primary {
    background: linear-gradient(135deg, rgba(102,126,234,0.15), rgba(118,75,162,0.1));
    border-color: rgba(102,126,234,0.3);
}

.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.summary-content h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.2;
}

.summary-content h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.2;
}

.summary-content p {
    margin: 5px 0 0 0;
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Purpose and Remarks Sections */
.purpose-section, .remarks-section {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.purpose-section h5, .remarks-section h5 {
    margin: 0 0 15px 0;
    color: #2d3748;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.purpose-section h5 i, .remarks-section h5 i {
    color: #667eea;
    width: 18px;
}

.purpose-content, .remarks-content {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.95rem;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* Enhanced Mobile Responsiveness for New Layouts */
@media (max-width: 768px) {
    .applicant-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-meta {
        justify-content: center;
    }
    
    .contact-actions {
        justify-content: center;
    }
    
    .loan-summary {
        grid-template-columns: 1fr;
    }
    
    .summary-item {
        text-align: center;
    }
    
    /* Enhanced loan header mobile styles */
    .loan-header-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .loan-id-section {
        justify-content: center;
        gap: 20px;
    }
    
    .loan-id-info h2 {
        font-size: 2.2rem;
    }
    
    .loan-status-section {
        text-align: center;
    }
    
    .status-xl {
        font-size: 1.1rem;
        padding: 12px 24px;
    }
    
    .loan-metrics {
        grid-template-columns: 1fr;
        padding: 25px 20px;
    }
    
    .metric-item {
        justify-content: center;
        text-align: center;
    }
    
    .loan-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .loan-header-card .card-body {
        padding: 25px 20px;
    }
}

/* Edit Mode Banner */
.edit-mode-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    margin-top: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.edit-mode-banner:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
}

.edit-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffd700, #ffed4a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #333;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
    animation: editPulse 2s ease-in-out infinite;
}

@keyframes editPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.edit-info h5 {
    color: white;
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.edit-info p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.95rem;
}

/* Enhanced Form Styling for Edit Page */
.loan-form .content-card {
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.loan-form .content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.loan-form .card-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d3748;
    font-weight: 600;
}

.loan-form .card-header h3 i {
    color: #667eea;
    width: 20px;
}

/* Form Enhancement */
.form-group label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
    transform: translateY(-1px);
}

/* Enhanced Form Actions */
.form-actions-enhanced {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(15px);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    margin-top: 30px;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.action-primary {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.action-secondary {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-xl {
    padding: 16px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    min-width: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-xl:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.btn-xl span {
    position: relative;
    z-index: 2;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: all 0.5s;
    z-index: 1;
}

.btn-xl:hover .btn-shine {
    left: 100%;
}

/* Mobile responsiveness for form actions */
@media (max-width: 768px) {
    .form-actions-enhanced {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }
    
    .action-primary {
        width: 100%;
        justify-content: center;
        margin-bottom: 20px;
    }
    
    .btn-xl {
        width: 100%;
        min-width: auto;
    }
    
    .action-secondary {
        width: 100%;
        justify-content: center;
        flex-direction: column;
    }
    
    .action-secondary .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .edit-mode-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .edit-info h5 {
        font-size: 1.1rem;
    }
}

/* Enhanced Header Mobile Responsiveness */
@media (max-width: 992px) {
    .enhanced-header {
        flex-direction: column;
        gap: 20px;
        padding: 20px 25px;
    }
    
    .header-left, .header-right {
        width: 100%;
    }
    
    .header-right {
        justify-content: space-between;
    }
    
    .header-stats {
        padding: 12px 15px;
        gap: 15px;
    }
    
    .page-title-section h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .enhanced-header {
        padding: 15px 20px;
    }
    
    .header-left {
        gap: 15px;
    }
    
    .header-stats {
        display: none;
    }
    
    .user-profile-enhanced {
        padding: 10px 15px;
        gap: 12px;
    }
    
    .avatar-ring, .avatar-inner {
        width: 40px;
        height: 40px;
    }
    
    .avatar-inner {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .page-title-section h1 {
        font-size: 1.5rem;
    }
    
    .page-breadcrumb {
        font-size: 0.8rem;
    }
    
    .user-details-enhanced .user-name {
        font-size: 0.9rem;
    }
    
    .user-details-enhanced .user-role {
        font-size: 0.75rem;
    }
}
