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

:root {
    /* Premium Financial Color Palette */
    --primary-color: #1e3a5f;
    --primary-light: #2a4d75;
    --primary-dark: #14293f;
    --success-color: #10b981;
    --success-light: #34d399;
    --accent-color: #f59e0b;
    --accent-light: #fbbf24;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --secondary-color: #6b7280;
    
    /* Sophisticated Background System */
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #21262d;
    --bg-card: #161b22;
    --bg-elevated: #1c2128;
    
    /* Modern Border & Surface Colors */
    --border-primary: #30363d;
    --border-secondary: #21262d;
    --border-accent: rgba(31, 111, 235, 0.3);
    
    /* Enhanced Text Hierarchy - WCAG AA Compliant */
    --text-primary: #ffffff;
    --text-secondary: #e6edf3;
    --text-tertiary: #c9d1d9;
    --text-muted: #9ca3af; /* Improved from #8b949e for better contrast */
    --text-subtle: #6b7280; /* Improved from #656d76 for better contrast */
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --backdrop-blur: blur(20px);
    
    /* Animation Variables */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-quick: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-elevation: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-elevated: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    
    /* Accessibility Variables */
    --focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.5);
    --focus-ring-accent: 0 0 0 3px rgba(245, 158, 11, 0.5);
    --focus-ring-success: 0 0 0 3px rgba(16, 185, 129, 0.5);
    --focus-ring-danger: 0 0 0 3px rgba(239, 68, 68, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-secondary);
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

/* Improve general text contrast throughout the app - WCAG AA Compliant */
.text-white {
    color: #ffffff !important;
}

.text-light {
    color: #e6edf3 !important;
}

.text-muted {
    color: #9ca3af !important; /* Improved contrast ratio for WCAG AA compliance */
}

.text-subtle {
    color: #6b7280 !important; /* Improved contrast ratio for WCAG AA compliance */
}

/* Enhanced Glassmorphism Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--shadow-elevation);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1000;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    z-index: -1;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.375rem;
    color: var(--text-primary) !important;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.navbar-brand:hover {
    color: var(--accent-light) !important;
    transform: translateY(-1px);
}

.navbar-brand:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring-accent);
    border-radius: 8px;
    color: var(--accent-light) !important;
}

.navbar-brand i {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 0.75rem;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    margin: 0 0.25rem;
    position: relative;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.navbar-nav .nav-link:hover {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: var(--text-primary) !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::before {
    width: 80%;
}

.navbar-nav .nav-link:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Section management */
.section {
    display: none;
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
}

.section.active {
    display: block;
}

/* Premium Card System with Glassmorphism */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-elevation);
    margin-bottom: 2rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--border-accent);
}

.card:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring), var(--shadow-elevated);
    border-color: var(--info-color);
}

.card.premium {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--accent-color);
    box-shadow: var(--shadow-premium), 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.card-header {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-elevated));
    border-bottom: 1px solid var(--border-primary);
    border-radius: 16px 16px 0 0;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    padding: 1.25rem 1.5rem;
    position: relative;
    letter-spacing: -0.01em;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-primary), transparent);
}

/* Custom Fields & Eligibility Styling */
.platform-option {
    transition: all 0.2s ease;
    cursor: pointer;
}

.platform-option.eligible .platform-card {
    background: rgba(25, 135, 84, 0.1);
}

.platform-option.not-eligible .platform-card {
    background: rgba(255, 193, 7, 0.1);
    opacity: 0.7;
}

.platform-option.eligible:hover .platform-card {
    background: rgba(25, 135, 84, 0.15);
    transform: translateY(-1px);
}

.platform-option:focus-visible {
    outline: none;
}

.platform-option:focus-visible .platform-card {
    box-shadow: var(--focus-ring);
    transform: translateY(-1px);
    border-color: var(--info-color);
}

.platform-card {
    transition: all 0.2s ease;
}

.custom-fields-modal .modal-dialog {
    max-width: 95%;
}

.eligibility-score-bar {
    height: 6px;
    background: #30363d;
    border-radius: 3px;
    overflow: hidden;
}

.eligibility-score-bar .progress-bar {
    transition: width 0.8s ease;
}

/* Template fields styling */
.template-field-group {
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.template-field-group h6 {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #30363d;
}

/* Platform eligibility list */
.platform-eligibility-list .form-check-input:checked ~ .form-check-label .platform-card {
    border-color: #20c997 !important;
    background: rgba(32, 201, 151, 0.1) !important;
}

.platform-eligibility-list .form-check-input:disabled ~ .form-check-label {
    opacity: 0.6;
}

/* Accordion styling for ineligible platforms */
.accordion-button {
    background: #21262d;
    border-color: #30363d;
    color: #e6edf3;
}

.accordion-button:not(.collapsed) {
    background: #20c997;
    color: #000;
}

.accordion-body {
    background: #161b22;
    border-color: #30363d;
}

.card-body {
    background: transparent;
    color: var(--text-secondary);
    padding: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-footer {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    border-top: 1px solid var(--border-primary);
    border-radius: 0 0 16px 16px;
    color: var(--text-muted);
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    position: relative;
}

.card-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-primary), transparent);
}

/* Premium Financial Metrics Cards */
.stats-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    transition: var(--transition-smooth);
    overflow: hidden;
    height: 100%;
    min-height: 140px;
    position: relative;
    cursor: pointer;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--glass-bg), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 1;
}

.stats-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-premium);
    border-color: var(--border-accent);
}

.stats-card:hover::before {
    opacity: 1;
}

.stats-card:hover .stats-glow {
    opacity: 0.6;
    transform: scale(1.1);
}

.stats-card:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring), var(--shadow-premium);
    border-color: var(--info-color);
}

.stats-card:focus-visible::before {
    opacity: 1;
}

.stats-card:focus-visible .stats-glow {
    opacity: 0.6;
    transform: scale(1.1);
}

/* Animated Glow Effect */
.stats-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-color), transparent 70%);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 0;
}

/* Success Card Variant */
.stats-card.success-variant {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), var(--bg-elevated));
    border-color: rgba(16, 185, 129, 0.3);
}

.stats-card.success-variant .stats-glow {
    background: radial-gradient(circle, var(--success-color), transparent 70%);
}

/* Warning Card Variant */
.stats-card.warning-variant {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--bg-elevated));
    border-color: rgba(245, 158, 11, 0.3);
}

.stats-card.warning-variant .stats-glow {
    background: radial-gradient(circle, var(--warning-color), transparent 70%);
}

/* Info Card Variant */
.stats-card.info-variant {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), var(--bg-elevated));
    border-color: rgba(59, 130, 246, 0.3);
}

.stats-card.info-variant .stats-glow {
    background: radial-gradient(circle, var(--info-color), transparent 70%);
}

/* Updated Status Badge Styles */
.status-badge.status-new {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.status-pending {
    background-color: #fff3e0;
    color: #f57c00;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.status-ready {
    background-color: #e8f5e8;
    color: #2e7d32;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.status-closing {
    background-color: #e8f5e8;
    color: #1b5e20;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Dashboard Category Cards */
.category-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.category-card:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring), 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--info-color);
    transform: translateY(-5px);
}

.category-card .btn {
    pointer-events: auto; /* Enable button clicks */
    position: relative;
    z-index: 10; /* Ensure button is clickable above card */
}

.cursor-pointer {
    cursor: pointer;
}

.status-badge.status-review {
    background-color: #f3e5f5;
    color: #7b1fa2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.status-submitted {
    background-color: #e1f5fe;
    color: #0277bd;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.status-processing {
    background-color: #fff3cd;
    color: #e66100;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: processing-pulse 2s infinite ease-in-out;
}

@keyframes processing-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.status-badge.status-approved {
    background-color: #e8f5e8;
    color: #388e3c;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.status-conditions {
    background-color: #fff8e1;
    color: #f9a825;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.status-final {
    background-color: #c8e6c9;
    color: #1b5e20;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.status-funded {
    background-color: #a5d6a7;
    color: #1b5e20;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.status-declined {
    background-color: #ffebee;
    color: #c62828;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.status-withdrawn {
    background-color: #f5f5f5;
    color: #616161;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.status-unknown {
    background-color: #f5f5f5;
    color: #757575;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.stats-card .card-body {
    padding: 1.75rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.stats-card .d-flex {
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
}

.stats-card .stats-number {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    transition: var(--transition-smooth);
    counter-reset: number-counter;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stats-card .stats-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    line-height: 1.4;
    transition: var(--transition-smooth);
}

.stats-card:hover .stats-number {
    color: var(--accent-light);
    transform: scale(1.05);
}

.stats-card:hover .stats-label {
    color: var(--text-secondary);
}

.stats-card i {
    font-size: 2.5rem;
    color: var(--text-tertiary);
    opacity: 0.7;
    transition: var(--transition-smooth);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.stats-card:hover i {
    color: var(--accent-color);
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
}

/* Trend Indicators */
.trend-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    margin-top: 0.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.trend-up {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.trend-down {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.trend-neutral {
    background: rgba(156, 163, 175, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(156, 163, 175, 0.3);
}

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

@keyframes countUp {
    from { counter-increment: number-counter 0; }
    to { counter-increment: number-counter var(--target-number); }
}

/* Sparkline Container */
.sparkline-container {
    height: 30px;
    margin-top: 0.75rem;
    opacity: 0.7;
    transition: var(--transition-smooth);
}

.stats-card:hover .sparkline-container {
    opacity: 1;
}

/* Responsive adjustments for stats cards */
@media (max-width: 768px) {
    .stats-card .stats-number {
        font-size: 1.5rem;
    }
    
    .stats-card .stats-label {
        font-size: 0.7rem;
    }
    
    .stats-card i {
        font-size: 1.5rem !important;
    }
    
    .stats-card .card-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .stats-card .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-card .me-3 {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
}

/* Modern Form System */
.form-step {
    display: none;
    animation: fadeInSlide 0.4s ease-out;
}

.form-step.active {
    display: block;
}

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

/* Enhanced Form Labels */
.form-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label.required::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 0.25rem;
}

.form-label i {
    color: var(--accent-color);
    font-size: 0.875rem;
}

/* Modern Form Controls */
.form-control, .form-select {
    background: var(--bg-elevated);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
}

.form-control:focus, .form-select:focus {
    background: var(--bg-card);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.15), 0 4px 12px rgba(30, 58, 95, 0.1);
    color: var(--text-primary);
    outline: none;
    transform: translateY(-1px);
}

.form-control:hover:not(:focus), .form-select:hover:not(:focus) {
    border-color: var(--border-accent);
    background: var(--bg-card);
}

.form-control:focus-visible, .form-select:focus-visible {
    outline: none;
    background: var(--bg-card);
    border-color: var(--primary-color);
    box-shadow: var(--focus-ring), 0 4px 12px rgba(30, 58, 95, 0.1);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Floating Label Animation */
.floating-label {
    position: relative;
    margin-bottom: 1.5rem;
}

.floating-label .form-control {
    padding: 1.25rem 1.25rem 0.5rem 1.25rem;
}

.floating-label label {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    pointer-events: none;
    background: transparent;
}

.floating-label .form-control:focus + label,
.floating-label .form-control:not(:placeholder-shown) + label {
    top: 0.75rem;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    transform: translateY(0);
}

/* Input Group Enhancements */
.input-group {
    position: relative;
}

.input-group-text {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    transition: var(--transition-smooth);
}

.input-group .form-control:focus + .input-group-text,
.input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-card);
}

/* Validation States */
.form-control.is-valid, .form-select.is-valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.valid-feedback {
    color: var(--success-color);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Checkbox and Radio Enhancements */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-primary);
    border-radius: 6px;
    background: var(--bg-elevated);
    transition: var(--transition-smooth);
}

.form-check-input:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.2);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.15);
}

.form-check-input:focus-visible {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--focus-ring);
}

.form-check-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 0.75rem;
    cursor: pointer;
}

/* Select Enhancement - Clean dropdown arrow using CSS triangle */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px 8px;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%), 
                      linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1em + 2px), calc(100% - 15px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.form-select:focus {
    background-image: linear-gradient(45deg, transparent 50%, var(--primary-color) 50%), 
                      linear-gradient(135deg, var(--primary-color) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1em + 2px), calc(100% - 15px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

/* Progress bar */
.progress {
    background-color: var(--bs-secondary);
    border-radius: 3px;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    transition: width 0.3s ease;
}

/* Premium Button System */
.btn {
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border: none;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: -0.01em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: scale(0.98);
}

/* Primary Button - Professional Blue */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.4);
    color: var(--text-primary);
}

/* Success Button - Trust Green */
.btn-success {
    background: linear-gradient(135deg, var(--success-color), var(--success-light));
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-light), var(--success-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    color: var(--text-primary);
}

/* Accent Button - Premium Gold */
.btn-warning {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
    color: var(--text-primary);
}

/* Secondary Button - Subtle Glass */
.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
}

/* Outline Buttons */
.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.3);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, var(--danger-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
    color: var(--text-primary);
}

/* Loading State */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: buttonSpin 1s linear infinite;
}

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

/* Button Sizes */
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 16px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* Focus-visible styles for all button variants */
.btn:focus-visible {
    outline: none;
    transform: translateY(-2px);
    box-shadow: var(--focus-ring);
}

.btn-primary:focus-visible {
    box-shadow: var(--focus-ring), 0 8px 20px rgba(30, 58, 95, 0.4);
}

.btn-success:focus-visible {
    box-shadow: var(--focus-ring-success), 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-warning:focus-visible {
    box-shadow: var(--focus-ring-accent), 0 8px 20px rgba(245, 158, 11, 0.4);
}

.btn-danger:focus-visible {
    box-shadow: var(--focus-ring-danger), 0 8px 20px rgba(239, 68, 68, 0.4);
}

.btn-secondary:focus-visible {
    box-shadow: var(--focus-ring), 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-outline-primary:focus-visible {
    box-shadow: var(--focus-ring), 0 8px 20px rgba(30, 58, 95, 0.3);
}

/* Table styling */
.table {
    background-color: var(--bs-dark);
}

.table th {
    border-bottom: 2px solid var(--bs-border-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table td {
    border-bottom: 1px solid var(--bs-border-color);
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: var(--bs-secondary);
}

/* Status badges */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border-radius: 4px;
}

.badge.status-draft {
    background-color: var(--warning-color);
    color: var(--bs-dark);
}

.badge.status-submitted {
    background-color: var(--success-color);
}

.badge.status-error {
    background-color: var(--danger-color);
}

.badge.status-active {
    background-color: var(--success-color);
}

.badge.status-inactive {
    background-color: var(--secondary-color);
}

/* TPO Platform cards */
.tpo-platform-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.tpo-platform-card:hover {
    border-color: var(--primary-color);
}

.tpo-platform-card:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-color: var(--info-color);
}

.tpo-platform-card.active {
    border-color: var(--success-color);
    background-color: rgba(25, 135, 84, 0.1);
}

.tpo-platform-card.inactive {
    border-color: var(--secondary-color);
    background-color: rgba(108, 117, 125, 0.1);
}

/* Requirements display */
.requirements-list {
    background-color: var(--bs-secondary);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.requirements-list h6 {
    color: var(--info-color);
    margin-bottom: 0.5rem;
}

.requirements-list ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

/* Modal styling */
.modal-content {
    border: none;
    border-radius: 8px;
}

.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
    background-color: var(--bs-secondary);
}

.modal-footer {
    border-top: 1px solid var(--bs-border-color);
    background-color: var(--bs-secondary);
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0 1rem;
    }
    
    .section {
        padding: 1rem 0;
    }
    
    .stats-card .stats-number {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
}

/* Motion Accessibility - Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .navbar-brand,
    .navbar-nav .nav-link,
    .card,
    .stats-card,
    .btn,
    .form-control,
    .form-select,
    .category-card,
    .application-card,
    .platform-option,
    .tpo-platform-card {
        transform: none !important;
        transition: none !important;
    }
    
    .stats-card::before,
    .stats-glow {
        opacity: 0 !important;
        transform: none !important;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

/* Modern Alert System */
.alert {
    border-radius: 16px;
    border: 1px solid transparent;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.15));
    color: var(--success-light);
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-success::before {
    background: var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.15));
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-danger::before {
    background: var(--danger-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.15));
    color: var(--accent-light);
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-warning::before {
    background: var(--warning-color);
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.15));
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.2);
}

.alert-info::before {
    background: var(--info-color);
}

/* LTV Display - Essential underwriting metric */
.ltv-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.3);
    border-radius: 6px;
}

.ltv-label {
    font-weight: 500;
    color: #e6edf3;
}

.ltv-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--bs-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 1rem;
    color: var(--bs-light);
}

.empty-state p {
    margin-bottom: 2rem;
}

/* Enhanced Application Cards - High Contrast Professional Design */
.application-card {
    transition: all 0.2s ease-in-out;
    border: 1px solid #30363d;
    background-color: #21262d;
}

.application-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #58a6ff;
}

.application-card:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring), 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: var(--info-color);
    transform: translateY(-2px);
}

/* High-contrast borrower names - Most prominent text */
.application-card .borrower-name {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    margin-bottom: 0.25rem !important;
}

/* Primary application details - High visibility */
.application-card .primary-text {
    color: #e6edf3 !important;
    font-weight: 500 !important;
}

/* Secondary information - Still readable but less prominent */
.application-card .secondary-text {
    color: #c9d1d9 !important;
    font-weight: 400 !important;
}

/* Muted text - For less important info but still readable */
.application-card .text-muted {
    color: #8b949e !important;
    font-weight: 400 !important;
}

/* REMOVED: Broker portal financial metrics styling */
/* LTV calculations preserved for application form use */

/* LTV indicators - High contrast colored text */
.ltv-good {
    color: #56d364 !important;
    font-weight: 600 !important;
}

.ltv-warning {
    color: #f1c40f !important;
    font-weight: 600 !important;
}

.ltv-danger {
    color: #f85149 !important;
    font-weight: 600 !important;
}

/* Improve modal readability */
.modal-content {
    background-color: #161b22 !important;
    border: 1px solid #30363d !important;
    color: #e6edf3 !important;
}

.modal-header {
    background-color: #21262d !important;
    border-bottom: 1px solid #30363d !important;
    color: #ffffff !important;
}

.modal-body {
    background-color: #161b22 !important;
    color: #e6edf3 !important;
}

.modal-footer {
    background-color: #21262d !important;
    border-top: 1px solid #30363d !important;
}

/* Table improvements for better readability */
.table {
    color: #e6edf3 !important;
}

.table-borderless td {
    color: #c9d1d9 !important;
}

.table-borderless td strong {
    color: #ffffff !important;
}

/* Navigation and status badges - high contrast */
.nav-tabs .nav-link {
    color: #c9d1d9 !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

.nav-tabs .nav-link.active {
    color: #ffffff !important;
    background-color: #21262d !important;
    border-color: #30363d #30363d #21262d !important;
}

/* Status badges - professional and readable */
.badge {
    font-weight: 600 !important;
}

.badge.bg-primary {
    background-color: #0969da !important;
    color: #ffffff !important;
}

.badge.bg-success {
    background-color: #1a7f37 !important;
    color: #ffffff !important;
}

.badge.bg-warning {
    background-color: #bf8700 !important;
    color: #ffffff !important;
}

.badge.bg-danger {
    background-color: #cf222e !important;
    color: #ffffff !important;
}

.favorite-card {
    border-color: #f9c23c !important;
    box-shadow: 0 0 0 1px rgba(249, 194, 60, 0.3);
}

.favorite-card:hover {
    border-color: #f9c23c !important;
    box-shadow: 0 4px 12px rgba(249, 194, 60, 0.4);
}

/* Enhanced Application Modal Styles */
.badge-lg {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 0;
    list-style: none;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    border-left: 2px solid #30363d;
    margin-left: 1rem;
    padding-left: 2rem;
}

.timeline-item:last-child {
    border-left: none;
}

.timeline-marker {
    position: absolute;
    left: -8px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #0d1117;
}

.timeline-content {
    background: #21262d;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #30363d;
}

.timeline-title {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #f0f6fc;
}

.timeline-text {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: #8b949e;
}

/* Progress Timeline for Status Workflow */
.progress-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 80px;
    position: relative;
}

.progress-step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #30363d;
    z-index: -1;
}

.progress-step.completed:not(:last-child):after {
    background: #238636;
}

.step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #30363d;
    color: #8b949e;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.progress-step.completed .step-icon {
    background: #238636;
    color: white;
}

.progress-step.active .step-icon {
    background: #1f6feb;
    color: white;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.25);
}

.step-label {
    font-size: 0.75rem;
    text-align: center;
    color: #8b949e;
    line-height: 1.2;
}

.progress-step.completed .step-label {
    color: #238636;
    font-weight: 500;
}

.progress-step.active .step-label {
    color: #1f6feb;
    font-weight: 600;
}

/* Document Management Styles */
.document-category .card-header {
    background: #21262d;
    border-bottom: 1px solid #30363d;
    font-size: 0.875rem;
    font-weight: 600;
}

.document-row {
    transition: background-color 0.2s ease;
}

.document-row:hover {
    background-color: #21262d;
}

/* Enhanced Tab Content */
.nav-tabs {
    border-bottom: 1px solid #30363d;
}

.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    color: #8b949e;
    font-weight: 500;
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: #f0f6fc;
    background-color: #21262d;
    border-color: #30363d;
}

.nav-tabs .nav-link.active {
    color: #f0f6fc;
    background-color: #0d1117;
    border-color: #30363d #30363d transparent;
}

.tab-content {
    border: 1px solid #30363d;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    background: #0d1117;
    min-height: 300px;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .progress-timeline {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .progress-step {
        flex-direction: row;
        min-width: auto;
        width: 100%;
        text-align: left;
    }
    
    .progress-step:not(:last-child):after {
        display: none;
    }
    
    .step-icon {
        margin-right: 0.75rem;
        margin-bottom: 0;
    }
}

/* Enhanced table styles for application details */
.table-borderless td {
    padding: 0.25rem 0.75rem 0.25rem 0;
    border: none;
    vertical-align: top;
    background: transparent;
}

.table-borderless td:first-child {
    width: 40%;
    font-weight: 500;
    color: #8b949e;
}

.table-borderless td:last-child {
    color: #f0f6fc;
}

/* Color-coded metrics for dark theme - WCAG AA Compliant */
.text-success { color: #34d399 !important; } /* Improved contrast */
.text-warning { color: #fbbf24 !important; } /* Improved contrast */
.text-danger { color: #f87171 !important; } /* Improved contrast */
.text-muted { color: #9ca3af !important; } /* Improved contrast for accessibility */

.border-success { border-color: #238636 !important; }
.border-warning { border-color: #d29922 !important; }
.border-danger { border-color: #da3633 !important; }
.border-muted { border-color: #30363d !important; }

/* Card enhancements for dark theme */
.card.border-primary { border-color: #1f6feb !important; }
.card.border-success { border-color: #238636 !important; }
.card.border-warning { border-color: #d29922 !important; }
.card.border-danger { border-color: #da3633 !important; }

/* DASHBOARD GRID LAYOUT - EXACT EQUAL SIZING */
.dashboard-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-card {
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s;
    cursor: pointer;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    border-color: #63b3ed;
}

.dashboard-card .icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.dashboard-card .count {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}

.dashboard-card .title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.dashboard-card .description {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-bottom: 15px;
}

.dashboard-card .btn {
    width: 100%;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    pointer-events: auto; /* Ensure buttons are clickable */
    position: relative;
    z-index: 10; /* Ensure button is above card */
    margin-top: auto; /* Push button to bottom of card */
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.2);
}

/* FIXED: Consistent Card Layout with equal heights */
.category-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    height: 100%;
    flex: 1; /* Fill available space */
}

.category-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

.category-count {
    text-align: center;
    line-height: 1.2;
    margin-bottom: 8px;
}

.category-name {
    text-align: center;
    font-weight: 600;
    margin-bottom: 12px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-description {
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    min-height: 40px;
    line-height: 1.3;
}

/* Remove old grid styles - using CSS Grid instead */

/* Document Management Styles */
.document-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #30363d;
    background-color: #21262d;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-color: #58a6ff;
}

.document-category {
    margin-bottom: 1.5rem;
}

.document-category h6 {
    border-bottom: 2px solid #30363d;
    padding-bottom: 0.5rem;
    color: #ffffff;
}

/* File upload modal styles */
.upload-preview {
    max-height: 300px;
    overflow-y: auto;
}

.list-group-item {
    border: 1px solid #30363d;
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
    background-color: #21262d;
    color: #e6edf3;
}

/* Document status indicators */
.doc-completion-badge .badge {
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
}

/* Progress bar styling */
.progress {
    height: 8px;
    background-color: #30363d;
    border-radius: 4px;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* Document requirement alerts - dark theme */
.alert {
    border: none;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: rgba(35, 134, 54, 0.2);
    color: #56d364;
    border-left: 4px solid #56d364;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.2);
    color: #d29922;
    border-left: 4px solid #d29922;
}

/* File type icons */
.fa-file-pdf { color: #dc3545; }
.fa-file-word { color: #007bff; }
.fa-file-excel { color: #28a745; }
.fa-file-image { color: #6f42c1; }
.fa-file { color: #6c757d; }

/* Responsive document cards */
@media (max-width: 768px) {
    .document-card .card-body {
        padding: 0.75rem;
    }
    
    .document-card .card-title {
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Document upload drag and drop */
.upload-zone {
    border: 2px dashed #30363d;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s;
    background-color: #21262d;
    color: #8b949e;
}

.upload-zone.dragover {
    border-color: #1f6feb;
    background-color: rgba(31, 111, 235, 0.1);
    color: #58a6ff;
}

/* Version badges */
.version-badge {
    font-size: 0.6rem;
    padding: 0.2em 0.4em;
    background-color: #6c757d;
    color: white;
    border-radius: 0.25rem;
    margin-left: 0.25rem;
}

/* Document category headers */
.document-category h6 i {
    opacity: 0.7;
}

/* Document modal enhancements */
#documentUploadModal .modal-body {
    padding: 1.5rem;
}

#documentUploadModal .form-control {
    background-color: #21262d;
    border-color: #30363d;
    color: #e6edf3;
}

#documentUploadModal .form-select {
    background-color: #21262d;
    border-color: #30363d;
    color: #e6edf3;
}

/* Document requirements styling */
.document-requirements .missing-docs {
    background-color: rgba(248, 81, 73, 0.1);
    border-left: 4px solid #f85149;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.document-requirements .complete-docs {
    background-color: rgba(86, 211, 100, 0.1);
    border-left: 4px solid #56d364;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Form Control Readonly Styling for Address Fields */
.form-control-readonly,
.form-select.form-control-readonly {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: var(--border-secondary) !important;
    opacity: 0.7;
    cursor: not-allowed;
}

.form-control-readonly:focus,
.form-select.form-control-readonly:focus {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: var(--border-secondary) !important;
    box-shadow: none !important;
}

/* Select Readonly - Prevents interaction without disabling (allows form submission) */
.select-readonly {
    pointer-events: none;
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: var(--border-secondary) !important;
    opacity: 0.7;
    cursor: not-allowed;
}

.select-readonly:focus {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: var(--border-secondary) !important;
    box-shadow: none !important;
}
