/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for theming */
:root {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9ecef;
    --text-primary: #333;
    --text-secondary: #6c757d;
    --text-muted: #868e96;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --input-bg: #ffffff;
    --input-border: #ced4da;
    --card-bg: #ffffff;
    --header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --sidebar-bg: #ffffff;
    --font-mono: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: var(--font-mono);
    font-size: 14px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ===== BEAUTIFUL TOP HEADER ===== */
.top-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.top-header::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 20"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.03"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.03"/></pattern></defs><rect width="100" height="20" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

/* Header Left - Logo & Branding */
.header-left {
    flex: 1;
}

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

.header-logo-icon {
    font-size: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.header-brand h1.brand-name {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-brand .brand-tagline {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Header Center - Breadcrumb */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
}

.breadcrumb-item.current {
    color: white;
    font-weight: 600;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
}

/* Header Right - Stats & User Profile */
.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

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

.header-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: rgb(27, 25, 48);
    line-height: 1;
}

.stat-label {
    font-size: 10px;
    color: rgba(31, 31, 72, 0.75);
    margin-top: 2px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.user-profile .user-avatar {
    background: rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.user-profile .user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-profile .user-name {
    color: black;
    font-weight: 600;
    font-size: 13px;
}

.user-profile .user-role {
    color: rgba(0, 0, 0, 0.75);
    font-size: 11px;
}

.profile-dropdown {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.profile-dropdown:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* ===== MODERN SIDEBAR NAVIGATION ===== */
.modern-sidebar {
    width: 280px;
    background: #ffffff;
    border: 1px solid #f3f4f6;
    height: calc(100vh - 80px);
    position: fixed;
    top: 80px;
    left: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: contain;
    z-index: 1000;
    border-radius: 12px;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid #f3f4f6;
    background: #ffffff;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #374151;
}

.sidebar-header .logo-icon {
    font-size: 28px;
    animation: pulse 2s infinite;
}

.sidebar-header .logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar-header .logo-text strong {
    font-size: 18px;
    font-weight: 700;
    color: #374151;
}

.sidebar-header .logo-text small {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

.sidebar-nav {
    padding: 15px 0;
    flex: 1 1 0;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    overscroll-behavior: contain;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid #f9fafb;
}

.sidebar-link:hover {
    background: #f9fafb;
    color: #374151;
}

.sidebar-link.active {
    background: #f3f4f6;
    color: #374151;
    font-weight: 500;
}

.sidebar-link .nav-icon {
    font-size: 18px;
    width: 22px;
    text-align: center;
}

.sidebar-link .nav-text {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    color: rgb(20, 21, 30);
}

.sidebar-link .nav-arrow {
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
    font-size: 16px;
    color: inherit;
    margin-left: auto;
    width: 20px;
    text-align: center;
}

.sidebar-link:hover .nav-arrow,
.sidebar-link.active .nav-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Sidebar Footer - Enhanced Design */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    margin-top: auto;
    flex: 0 0 auto;
    min-height: 72px;
    position: relative;
    z-index: 10;
    display: block !important;
    width: 100%;
    box-sizing: border-box;
}

.user-profile-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.user-profile-section:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.sidebar-footer .user-info {
    display: flex !important;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
    visibility: visible;
}

.sidebar-footer .user-avatar {
    position: relative;
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer .avatar-circle {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border: 3px solid #ffffff;
}

.sidebar-footer .user-details {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    gap: 4px;
    visibility: visible;
}

.sidebar-footer .user-greeting {
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-footer .user-name {
    color: #1f2937;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
}

.sidebar-footer .user-role {
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
}

.sidebar-footer .user-role-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
}

.sidebar-footer .role-text {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.sidebar-footer .user-actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

.sidebar-footer .logout-button {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    width: 100%;
    justify-content: center;
}

.sidebar-footer .logout-button:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
}

.sidebar-footer .logout-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.sidebar-footer .logout-icon {
    font-size: 16px;
}

.sidebar-footer .logout-text {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Global Toast Notifications - High Priority Z-Index */
.toast, #successToast, .notification, .alert {
    z-index: 99999 !important;
    position: fixed !important;
}

/* Ensure all notification elements appear above headers */
.toast-container, .notification-container,
.notification, .toast, .alert,
[class*="notification"], [class*="toast"],
.swal2-container, .sweet-alert {
    z-index: 100000 !important;
    position: fixed !important;
}

/* Global Dropdown Z-Index Fix */
.client-dropdown, .dropdown, [class*="dropdown"] {
    z-index: 99998 !important;
}

/* Form groups containing dropdowns need relative positioning */
.form-group:has(.client-dropdown),
.form-group:has([class*="dropdown"]) {
    position: relative;
}

/* Apply Inter font with tabular numbers for data elements */
code, pre, kbd, samp,
input[type="number"],
.amount, .currency, .money,
.loan-amount, .monthly-payment,
table td, table th,
.table-cell, .data-value,
.pension-amount, .balance,
.total, .subtotal,
.ar-number, .client-id,
.loan-id, .reference-number {
    font-family: var(--font-mono) !important;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
    letter-spacing: -0.01em;
}

/* Logo Section */
.logo-section {
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}

.logo-icon {
    font-size: 32px;
    animation: pulse 2s infinite;
}

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

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text strong {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text small {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 400;
}

/* Top Navigation */
.top-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::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;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-text {
    font-size: 14px;
    white-space: nowrap;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: black;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.user-greeting {
    font-size: 14px;
    font-weight: 500;
}

.user-avatar {
    background: rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
}

.hamburger {
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .header-left, .header-center, .header-right {
        flex: none;
        width: 100%;
    }
    
    .header-center {
        justify-content: flex-start;
    }
    
    .header-right {
        justify-content: flex-start;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        width: 100%;
    }
    
    .header-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .header-brand h1.brand-name {
        font-size: 18px;
    }
    
    .header-brand .brand-tagline {
        font-size: 11px;
    }
    
    .header-logo-icon {
        font-size: 28px;
        padding: 6px;
    }

    /* Enhanced Sidebar Footer Mobile Styles */
    .sidebar-footer {
        padding: 12px;
    }

    .user-profile-section {
        padding: 16px;
        border-radius: 12px;
    }

    .sidebar-footer .avatar-circle {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .sidebar-footer .user-name {
        font-size: 14px;
    }

    .sidebar-footer .user-greeting {
        font-size: 11px;
    }

    .sidebar-footer .role-text {
        font-size: 10px;
        padding: 3px 10px;
    }

    .sidebar-footer .logout-button {
        padding: 10px 20px;
        font-size: 13px;
        border-radius: 10px;
    }

    .container {
        flex-direction: column;
        margin: 10px;
        padding: 15px;
        padding-left: 15px;
        gap: 15px;
    }
    
    .modern-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        left: 0;
        height: auto;
    }
    
    .sidebar-header {
        padding: 20px 15px;
    }
    
    .sidebar-header .logo-text strong {
        font-size: 16px;
    }
    
    .sidebar-header .logo-text small {
        font-size: 11px;
    }
    
    .sidebar-nav {
        padding: 10px 0;
    }
    
    .sidebar-link {
        padding: 12px 20px;
        margin: 2px 10px;
    }
    
    .sidebar-link .nav-text {
        font-size: 13px;
    }
    
    .sidebar-footer {
        padding: 15px;
    }
    
    .sidebar-footer .user-name {
        font-size: 13px;
    }
    
    .page-header {
        margin: -15px -15px 20px -15px;
        padding: 1.5rem 1rem;
        border-radius: 15px 15px 0 0;
    }
    
    .header-content h1 {
        font-size: 1.875rem;
    }
}

.container {
    max-width: 2500px;
    margin: 0 auto;
    padding: 20px;
    padding-left: 320px;
    display: block;
}

.container.app-layout {
    display: flex;
    gap: 20px;
    max-width: 100%;
    padding: 20px;
}

.main-content {
    flex: 1;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.main-content main {
    flex: 1;
    padding: 2rem;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar-header {
    background: linear-gradient(135deg, #ffffff, #ffffff);
    color: white;
    padding: 1.5rem;
    border-radius: 10px 10px 0 0;
    text-align: center;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: #f8f9fa;
    border-left: 3px solid #3498db;
    color: #ffffff;
}

.sidebar-icon {
    font-size: 1.2rem;
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

.sidebar-text {
    font-weight: 500;
}

.main-content {
    flex: 1;
    min-width: 0;
}

header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    text-align: center;
    padding: 0.25rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.loan-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ecf0f1;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 500;
    padding-left: 10px;
    border-left: 4px solid #3498db;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group label[for]:not([for=""]):not([for="personPhoto"]):not([for="creditCardPhoto"]):not([for="lrCr"])::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.form-group input[type="file"] {
    padding: 0.5rem;
    background-color: #f8f9fa;
    cursor: pointer;
}

.image-preview {
    margin-top: 0.5rem;
    min-height: 150px;
    border: 2px dashed #ddd;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.image-preview.has-image {
    border-color: #3498db;
    background-color: white;
}

.image-preview img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    border-radius: 3px;
}

.image-preview .placeholder {
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
}

.image-preview .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview .remove-image:hover {
    background: #c0392b;
}

.record-images {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.record-image {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.record-image h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.record-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.record-image img:hover {
    transform: scale(1.05);
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.image-modal img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #ecf0f1;
}

.form-actions button {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 150px;
}

button[type="submit"] {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#calculateBtn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

#calculateBtn:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button[type="reset"] {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

button[type="reset"]:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.records-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.records-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 500;
    padding-left: 10px;
    border-left: 4px solid #e74c3c;
}

.record-item {
    background: #f8f9fa;
    padding: 1rem;
    margin-bottom: 2.5rem;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.record-item h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.record-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5rem;
    font-size: 0.9rem;
}

.record-detail {
    background: white;
    padding: 0.5rem;
    border-radius: 3px;
}

.record-detail strong {
    color: #555;
}

.error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border-left: 4px solid #28a745;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }
    
    .container.app-layout {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        order: -1;
    }
    
    .sidebar-nav {
        display: flex;
        padding: 0.5rem 0;
    }
    
    .sidebar-link {
        flex: 1;
        padding: 0.75rem 1rem;
        text-align: center;
        flex-direction: column;
        gap: 0.5rem;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .sidebar-link:hover {
        border-left: none;
        border-bottom: 3px solid #3498db;
    }
    
    .sidebar-icon {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
    
    .sidebar-text {
        font-size: 0.9rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .form-actions button {
        width: 100%;
        max-width: 300px;
    }
}

/* Summary Section Styles */
.summary-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.summary-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #3498db;
    font-size: 1.8rem;
}

.summary-content .summary-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.summary-content .summary-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
    font-size: 1.3rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 600;
    color: #495057;
    flex: 1;
    margin-right: 1rem;
}

.summary-value {
    font-weight: 500;
    color: #212529;
    text-align: right;
    flex: 1;
}

.summary-actions {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #e9ecef;
}

.summary-actions .btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.summary-actions .btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-2px);
}

/* Responsive design for summary */
@media (max-width: 768px) {
    .summary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .summary-label,
    .summary-value {
        text-align: left;
        flex: none;
    }
    
    .summary-value {
        font-weight: 400;
        color: #6c757d;
    }
}

/* Navigation Styles */
.navigation {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.navigation a {
    display: inline-block;
    margin: 0 1rem;
    padding: 0.75rem 2rem;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navigation a:hover {
    background: #545b62;
    transform: translateY(-2px);
}

/* Records Page Specific Styles */
.records-header {
    margin-bottom: 2rem;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.btn-success {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.btn-print {
    background-color: #6f42c1;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    min-height: 40px;
    margin: 0.25rem;
}

.btn-print:hover {
    background-color: #5a2a9e;
    transform: translateY(-1px);
}

.btn-delete {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    min-height: 40px;
    margin: 0.25rem;
}

.btn-delete:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.record-actions {
    display: flex;
    gap: 3rem;
    align-items: center;
    flex-wrap: wrap;
}

.details-section {
    margin-bottom: 1.5rem;
}

.details-section h4 {
    color: #495057;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #dee2e6;
    font-size: 1rem;
}

.record-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 0.85rem;
}

.no-records {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.no-records h3 {
    color: #495057;
    margin-bottom: 1rem;
}

.no-records p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.loading-message {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

/* Responsive design for records page */
@media (max-width: 768px) {
    .records-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .records-controls {
        width: 100%;
        justify-content: center;
    }
    
    .record-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .navigation a {
        display: block;
        margin: 0.5rem 0;
        text-align: center;
    }
}

/* Success Notification Styles */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-overlay.show {
    opacity: 1;
}

.notification-overlay.hide {
    opacity: 0;
}

.success-notification {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
    transform: translateY(-30px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-overlay.show .success-notification {
    transform: translateY(0) scale(1);
}

.notification-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.notification-content h3 {
    color: #28a745;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.notification-content p {
    margin: 0.5rem 0;
    color: #495057;
    font-size: 1rem;
}

.notification-content strong {
    color: #2c3e50;
}

.notification-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.notification-actions .btn-primary {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-actions .btn-primary:hover {
    background: #218838;
    transform: translateY(-2px);
}

.notification-actions .btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.notification-actions .btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

/* Draft Restore Modal Specific Styles */
.draft-restore-modal {
    backdrop-filter: blur(12px);
}

/* New Loan Confirmation Modal Specific Styles */
.new-loan-confirmation {
    backdrop-filter: blur(12px);
}

.new-loan-confirmation .success-notification {
    max-width: 550px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid rgba(40, 167, 69, 0.1);
}

.new-loan-confirmation .notification-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.new-loan-confirmation .notification-content h3 {
    color: #28a745;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    text-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
}

.new-loan-confirmation .notification-actions {
    margin-top: 2rem;
    gap: 1rem;
}

.new-loan-confirmation .new-loan-confirm-btn:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.new-loan-confirmation .new-loan-cancel-btn:hover {
    background: linear-gradient(135deg, #545b62 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.draft-restore-modal .success-notification {
    max-width: 550px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid rgba(111, 66, 193, 0.1);
}

.draft-restore-modal .notification-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.draft-restore-modal .notification-content h3 {
    color: #6f42c1;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    text-shadow: 0 2px 4px rgba(111, 66, 193, 0.1);
}

.draft-restore-modal .notification-actions {
    margin-top: 2rem;
    gap: 1rem;
}

.draft-restore-modal .draft-restore-btn {
    background: linear-gradient(135deg, #6f42c1 0%, #9c27b0 100%);
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
    transition: all 0.3s ease;
}

.draft-restore-modal .draft-restore-btn:hover {
    background: linear-gradient(135deg, #5a2d8f 0%, #7b1fa2 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(111, 66, 193, 0.4);
}

.draft-restore-modal .draft-clear-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    transition: all 0.3s ease;
}

.draft-restore-modal .draft-clear-btn:hover {
    background: linear-gradient(135deg, #b02a37 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

/* Mobile responsive for notification */
@media (max-width: 768px) {
    .success-notification {
        margin: 1rem;
        padding: 1.5rem;
        max-width: calc(100vw - 2rem);
    }
    
    .notification-content h3 {
        font-size: 1.3rem;
    }
    
    .notification-actions {
        flex-direction: column;
        gap: 0.8rem;
        margin-top: 1.5rem;
    }
    
    .notification-actions .btn-primary,
    .notification-actions .btn-secondary {
        width: 100%;
        padding: 1rem;
        font-size: 16px;
    }
    
    .draft-restore-modal .success-notification {
        padding: 1.5rem;
    }
    
    .draft-restore-modal .notification-icon {
        font-size: 3rem;
    }
}

/* Search Functionality Styles */
.search-container {
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

#searchInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#searchInput::placeholder {
    color: #999;
}

.btn-search {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-search:hover {
    background: #2980b9;
}

.btn-clear {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-clear:hover {
    background: #7f8c8d;
}

.btn-warning {
    background: #f39c12;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-warning:hover {
    background: #e67e22;
}

.search-results {
    min-height: 24px;
}

.search-info {
    padding: 8px 16px;
    background: #e8f6f3;
    border: 1px solid #26a69a;
    border-radius: 4px;
    color: #00695c;
    font-size: 14px;
    font-weight: 500;
}

/* Mobile responsive for search */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-search, .btn-clear {
        width: 100%;
        padding: 14px 16px;
    }
    
    #searchInput {
        width: 100%;
    }
}

/* Compact Record Layout Styles */
.record-basic-info {
    flex: 1;
}

.record-basic-info h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #2c3e50;
    font-weight: 600;
}

.record-summary {
    margin: 5px 0 0 0;
    color: #7f8c8d;
    font-size: 0.95rem;
    font-weight: 500;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid #e9ecef;
    min-height: 80px;
}

.record-actions {
    display: flex;
    gap: 3rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-view {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    min-width: 110px;
    min-height: 40px;
    justify-content: center;
    margin: 0.25rem;
}

.btn-view:hover {
    background: #138496;
    transform: translateY(-1px);
}

.btn-view.expanded {
    background: #fd7e14;
}

.btn-view.expanded:hover {
    background: #e8690b;
}

.view-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.btn-view.expanded .view-icon {
    transform: rotate(180deg);
}

.record-details {
    border-top: 1px solid #e9ecef;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive for compact layout */
@media (max-width: 768px) {
    .record-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .record-basic-info h3 {
        font-size: 1.2rem;
    }
    
    .record-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .btn-view {
        flex: 1;
        min-width: 100px;
    }
}

/* Enhanced Visual Styles */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Enhanced Header */
.main-content header {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 50%, #5dade2 100%);
    position: relative;
    overflow: hidden;
}

.main-content header::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 20"><defs><radialGradient id="a" cx="50%" cy="40%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>');
    animation: pulse 4s ease-in-out infinite;
}

.main-content header h1 {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 700;
    letter-spacing: 1px;
}

.main-content header p {
    position: relative;
    z-index: 2;
    opacity: 0.9;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Clean Modern Header */
.page-header {
    text-align: center;
    padding: 2rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 2px solid #e2e8f0;
    margin: -20px -20px 30px -20px;
    border-radius: 15px 15px 0 0;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
}

.header-content h1 {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 700;
    color: #1e293b !important;
    letter-spacing: -0.025em;
}

.header-content p, .page-description {
    margin: 0.5rem 0 0 0;
    color: #64748b !important;
    font-size: 1rem;
    font-weight: 500;
}

/* Separate Filter Bar */
.filter-bar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.filter-container {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-group.inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-group.inline label {
    color: #374151;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    margin: 0;
}

.filter-select.compact {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 110px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-select.compact:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select.compact:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select.compact option {
    background: #ffffff;
    color: #374151;
    padding: 0.5rem;
}

/* Clean Records Layout */
.records-main-layout {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
}

.records-section {
    width: 100%;
    animation: fadeInUp 0.8s ease-out;
}

/* Remove the old h2 styling since filters are now in header */

/* Clean Search Container */
.search-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    margin-bottom: 3rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

#searchInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #ffffff;
    transition: all 0.2s ease;
    font-weight: 500;
}

#searchInput:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#searchInput::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.btn-search, .btn-clear {
    padding: 0.75rem 1.5rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-search {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-search:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4);
}

.btn-clear {
    background: #ffffff;
    color: #6b7280;
    border-color: #d1d5db;
}

.btn-clear:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

/* Clean Client Grouping */
.client-group {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
    overflow: hidden;
    border: 1px solid #e1e8ed;
    transition: all 0.2s ease;
}

.client-group:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Clean Client Header */
.client-header {
    background: #f8f9fa;
    color: #495057;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e1e8ed;
}

.client-header::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.8s ease;
}

.client-group:hover .client-header::before {
    left: 100%;
}

.client-info h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.client-info .client-details {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.client-summary {
    display: flex;
    gap: 2rem;
    align-items: center;
}

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

.summary-stat .stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
}

.summary-stat .stat-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 0.2rem;
}

.client-actions {
    display: flex;
    gap: 0.5rem;
}

/* Enhanced Client Action Buttons */
.btn-client-toggle {
    background: rgba(30, 163, 50, 0.2);
    border: 2px solid rgba(59, 199, 124, 0.3);
    color: rgb(14, 22, 61);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-client-toggle::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.6s ease;
}

.btn-client-toggle:hover::before {
    left: 100%;
}

.btn-client-toggle:hover {
    background: rgba(77, 210, 104, 0.3);
    border-color: rgba(78, 181, 102, 0.5);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.btn-client-profile {
    background: linear-gradient(135deg, #00b894, #00a085);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-client-profile::before {
    content: '👤';
    margin-right: 0.5rem;
    font-size: 1rem;
}

.btn-client-profile:hover {
    background: linear-gradient(135deg, #00a085, #008a6b);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 168, 133, 0.3);
}

/* Enhanced Client Loans Container */
.client-loans {
    background: linear-gradient(135deg, #f0f8ff 0%, #ffffff 100%);
    padding: 0;
    position: relative;
}

.client-loans::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #2980b9, #3498db, #5dade2);
}

/* Enhanced Client Loan Items */
.client-loan-item {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease-out;
}

.client-loan-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.client-loan-item:hover {
    background: linear-gradient(135deg, #ffffff 0%, #e6f3ff 100%);
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.15);
}

/* Enhanced Status Indicators */
.loan-status-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    border-radius: 0 3px 3px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.loan-status-indicator.active {
    background: linear-gradient(135deg, #00b894, #00a085);
}

.loan-status-indicator.completed {
    background: linear-gradient(135deg, #636e72, #2d3436);
}

.loan-status-indicator.overdue {
    background: linear-gradient(135deg, #e17055, #d63031);
    animation: pulse 2s ease-in-out infinite;
}

.loan-status-indicator.pending {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
}

.loan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.loan-info h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.loan-info .loan-details {
    margin-top: 0.3rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.loan-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 2rem;
}

.loan-status-badge.active {
    background: #d4edda;
    color: #155724;
}

.loan-status-badge.completed {
    background: #d1ecf1;
    color: #0c5460;
}

.loan-status-badge.overdue {
    background: #f8d7da;
    color: #721c24;
}

.loan-status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

/* Remove old filter sidebar styles since filters are now in header */

/* Filter Column for Sidebar */
.filter-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-row {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    align-items: stretch;
    text-align: left;
}

/* Sidebar specific filter group styling */
.filter-column .filter-group {
    flex: none;
    width: 100%;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

/* Clean Filter Selects */
.filter-select {
    padding: 0.6rem 0.8rem;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    background: #f8f9fa;
    font-size: 0.9rem;
    width: 100%;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    align-items: flex-start;
    text-align: left;
    flex: 1;
    min-width: 180px;
    max-width: 250px;
}

.filter-group label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    display: block;
}

/* Enhanced Search Results */
.search-info.enhanced {
    background: linear-gradient(135deg, #e8f6f3, #d5f4e6);
    border: 2px solid #26a69a;
    border-radius: 15px;
    padding: 1.5rem;
    color: #00695c;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(38, 166, 154, 0.2);
    animation: fadeInUp 0.5s ease-out;
}

.search-info.enhanced::before {
    content: '🔍';
    font-size: 1.5rem;
    margin-right: 1rem;
}

.search-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

/* Enhanced Loading Animations */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

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

.loading-message {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e3e3e3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.no-records {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.no-records h3 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.no-records::before {
    content: '📋';
    display: block;
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Clean Record Controls */
.records-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 0;
}

.records-controls button {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    background: white;
    color: #374151;
}

.records-controls button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4);
}

.btn-warning {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border-color: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
    border-color: #4b5563;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 2rem 1.5rem;
    }
    
    .header-content h1 {
        font-size: 1.875rem;
    }
    
    .filter-bar {
        padding: 1.25rem 1rem;
    }
    
    .filter-container {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .filter-group.inline {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.5rem 0;
    }
    
    .filter-group.inline label {
        flex-shrink: 0;
        min-width: 60px;
    }
    
    .filter-select.compact {
        flex: 1;
        min-width: 0;
    }
    
    .client-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }
    
    .client-summary {
        justify-content: center;
        gap: 1rem;
    }
    
    .client-actions {
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }
    
    .loan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .filter-group {
        flex: none;
        min-width: auto;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .search-box {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-search, .btn-clear {
        width: 100%;
    }
    
    .records-controls {
        flex-direction: column;
    }
    
    .records-controls button {
        width: 100%;
    }
}

/* Edit Modal Styles */
.edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.edit-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.edit-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.edit-form {
    padding: 25px;
}

.edit-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.edit-form .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.edit-form label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.9rem;
}

.edit-form input,
.edit-form select {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.edit-form input:focus,
.edit-form select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.edit-form input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn-edit {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 80px;
    min-height: 40px;
    margin: 0.25rem;
}

.btn-edit:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-save {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Mobile responsive for edit modal */
@media (max-width: 768px) {
    .edit-modal {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .edit-form .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-save,
    .btn-cancel {
        width: 100%;
        padding: 14px;
    }
}

/* Beautiful White Gradient Design */
/* Removed conflicting body background for new layout */

/* Removed conflicting pseudo-element background */

.header-content {
    text-align: center;
    position: relative;
}

.header-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #64748b, #94a3b8, #cbd5e1);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
}

.header-content h1 {
    margin: 0;
    font-size: 2.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b 0%, #475569 50%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content p {
    margin: 0.75rem 0 0 0;
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

/* Beautiful White Form Styling */
.loan-form {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(20px);
    padding: 2rem 2.5rem;
    border-radius: 15px;
    box-shadow: 
        0 10px 25px -5px rgba(100, 116, 139, 0.1),
        0 4px 6px -1px rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.5);
    margin: 0;
    position: relative;
    animation: formSlideIn 0.8s ease-out;
}

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

.loan-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 24px;
    z-index: -1;
}

.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.7) 100%);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    backdrop-filter: blur(10px);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 4px -1px rgba(148, 163, 184, 0.1),
        0 1px 2px -1px rgba(203, 213, 225, 0.06);
}

.form-section:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px -8px rgba(100, 116, 139, 0.15),
        0 4px 6px -1px rgba(148, 163, 184, 0.1);
    border-color: rgba(203, 213, 225, 0.8);
}

.form-section:last-of-type {
    margin-bottom: 2rem;
}

.form-section h2 {
    color: #334155;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding-left: 1rem;
}

.form-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #64748b, #94a3b8, #cbd5e1);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(100, 116, 139, 0.3);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-group input,
.form-group select {
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.9);
    color: #1a202c;
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #64748b;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 
        0 0 0 3px rgba(100, 116, 139, 0.1),
        0 4px 6px -1px rgba(148, 163, 184, 0.15),
        0 2px 4px -1px rgba(203, 213, 225, 0.08);
    transform: translateY(-1px);
}

.form-group input:hover:not(:focus):not([readonly]),
.form-group select:hover:not(:focus) {
    border-color: rgba(100, 116, 139, 0.6);
    transform: translateY(-1px);
    box-shadow: 
        0 8px 15px -3px rgba(100, 116, 139, 0.1),
        0 4px 6px -2px rgba(148, 163, 184, 0.08);
}

.form-group input[readonly] {
    background: rgba(249, 250, 251, 0.8);
    color: #6b7280;
    cursor: not-allowed;
    border-color: rgba(229, 231, 235, 0.8);
}

.form-group input::placeholder,
.form-group select option:first-child {
    color: rgba(107, 114, 128, 0.8);
    font-weight: 400;
}

/* Beautiful White File Upload */
.form-group input[type="file"] {
    padding: 1.5rem;
    border: 2px dashed rgba(100, 116, 139, 0.3);
    background: rgba(100, 116, 139, 0.05);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-group input[type="file"]:hover {
    border-color: rgba(100, 116, 139, 0.5);
    background: rgba(100, 116, 139, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.15);
}

.form-group input[type="file"]:focus {
    outline: none;
    border-color: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
}

.image-preview {
    margin-top: 1rem;
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
}

/* Beautiful Form Actions */
.form-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    padding-top: 3rem;
    margin-top: 2rem;
    position: relative;
}

.form-actions::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(100, 116, 139, 0.3), transparent);
}

.form-actions button {
    padding: 1.125rem 2.5rem;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    min-width: 160px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-actions button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.form-actions button:hover::before {
    transform: translateX(100%);
}

.form-actions button[type="submit"] {
    background: linear-gradient(135deg, #1e293b 0%, #475569 50%, #64748b 100%);
    color: white;
    box-shadow: 
        0 10px 20px -5px rgba(30, 41, 59, 0.4),
        0 4px 6px -2px rgba(100, 116, 139, 0.2);
}

.form-actions button[type="submit"]:hover {
    background: linear-gradient(135deg, #0f172a 0%, #334155 50%, #475569 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 20px 25px -5px rgba(30, 41, 59, 0.4),
        0 10px 10px -5px rgba(100, 116, 139, 0.2);
}

.form-actions button[type="reset"] {
    background: rgba(255, 255, 255, 0.9);
    color: #6b7280;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.form-actions button[type="reset"]:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(100, 116, 139, 0.3);
    color: #1e293b;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 15px -3px rgba(100, 116, 139, 0.1),
        0 4px 6px -2px rgba(148, 163, 184, 0.08);
}

/* Beautiful White Mobile Responsiveness */
@media (max-width: 768px) {
    /* Removed conflicting mobile body background */
    
    .header-content h1 {
        font-size: 2.25rem;
    }
    
    .header-content::before {
        width: 60px;
        top: -15px;
    }
    
    .loan-form {
        padding: 1.5rem 1rem;
        border-radius: 12px;
        margin: 0;
    }
    
    .main-content main {
        padding: 1rem;
    }
    
    .form-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
        border-radius: 10px;
    }
    
    .form-section h2 {
        font-size: 0.9rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 0.875rem 1rem;
        border-radius: 10px;
        font-size: 1rem;
    }
    
    .form-group input[type="file"] {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
        padding-top: 2.5rem;
    }
    
    .form-actions::before {
        width: 60px;
    }
    
    .form-actions button {
        width: 100%;
        padding: 1rem 2rem;
        border-radius: 12px;
        font-size: 1rem;
    }
}

/* Additional Beautiful Animations */
.form-group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

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

/* Beautiful White Focus Ring Animation */
.form-group input:focus,
.form-group select:focus {
    animation: focusGlow 0.3s ease-out;
}

@keyframes focusGlow {
    0% {
        box-shadow: 
            0 0 0 0px rgba(100, 116, 139, 0.4),
            0 4px 6px -1px rgba(148, 163, 184, 0.15),
            0 2px 4px -1px rgba(203, 213, 225, 0.08);
    }
    50% {
        box-shadow: 
            0 0 0 6px rgba(100, 116, 139, 0.2),
            0 4px 6px -1px rgba(148, 163, 184, 0.15),
            0 2px 4px -1px rgba(203, 213, 225, 0.08);
    }
    100% {
        box-shadow: 
            0 0 0 3px rgba(100, 116, 139, 0.1),
            0 4px 6px -1px rgba(148, 163, 184, 0.15),
            0 2px 4px -1px rgba(203, 213, 225, 0.08);
    }
}

/* Floating particles effect */
body:has(.loan-form)::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255, 255, 255, 0.15), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: floatingParticles 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes floatingParticles {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200px 100px;
    }
}

/* Beautiful required field asterisks */
.form-group label[for]:not([for=""]):not([for="personPhoto"]):not([for="creditCardPhoto"]):not([for="lrCr"])::after {
    content: " *";
    color: #ef4444;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    animation: pulseRed 2s ease-in-out infinite;
}

@keyframes pulseRed {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    }
    50% {
        opacity: 0.7;
        text-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    }
}
/* User Info Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content h1 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.header-content p {
    color: #7f8c8d;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    background: #ecf0f1;
    border-radius: 25px;
    font-size: 14px;
}

.user-info span {
    color: #2c3e50;
}

.user-role {
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Role-based visibility */
[data-role="admin"] { display: block; }
[data-role="loan_officer"] { display: block; }
[data-role="viewer"] { display: block; }

/* Bulk TS# Assignment Styles */
.bulk-ts-controls {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.bulk-ts-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.bulk-ts-input {
    flex: 1;
    min-width: 250px;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
}

.bulk-ts-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.bulk-apply-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-apply-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.bulk-clear-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bulk-clear-btn:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* Checkbox styling for bulk selection */
.record-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

/* TS# column styling */
.ts-number {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #1e40af;
}

/* Mobile responsive for bulk controls */
@media (max-width: 768px) {
    .bulk-ts-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-ts-input {
        min-width: unset;
        width: 100%;
    }

    .bulk-apply-btn,
    .bulk-clear-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== SIDEBAR DROPDOWN STYLES ===== */
.sidebar-dropdown {
    position: relative;
}

.dropdown-toggle {
    position: relative;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 14px;
    margin-left: auto;
}

.sidebar-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.sidebar-dropdown .dropdown-menu {
    max-height: 0 !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 4px 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0 !important;
}

.sidebar-dropdown.open .dropdown-menu {
    max-height: 300px !important;
    opacity: 1 !important;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 40px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 2px 8px;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
}

.dropdown-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
}

/* Animation for smooth transitions */
.sidebar-nav a,
.sidebar-dropdown {
    transition: all 0.2s ease;
}

/* Hover effect for dropdown toggles */
.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}


