/* Dashboard Container */
.user-dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Dashboard Auth Loading State */
.dashboard-auth-loading {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.dashboard-auth-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

.dashboard-auth-loading .loading-spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #FFD700, #FFA500, #FFD700);
    position: relative;
    margin: 0 auto 25px;
    animation: spin 1.2s linear infinite;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    transform-origin: center center;
}

.dashboard-auth-loading .loading-spinner::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-auth-loading .loading-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.dashboard-auth-loading .loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.dashboard-auth-loading .loading-dot {
    width: 8px;
    height: 8px;
    background: #FFD700;
    border-radius: 50%;
    animation: loadingDots 1.4s ease-in-out infinite both;
}

.dashboard-auth-loading .loading-dot:nth-child(1) { animation-delay: -0.32s; }
.dashboard-auth-loading .loading-dot:nth-child(2) { animation-delay: -0.16s; }
.dashboard-auth-loading .loading-dot:nth-child(3) { animation-delay: 0s; }

.dashboard-auth-loading p {
    margin: 0;
    color: #475569;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.dashboard-auth-loading .loading-subtitle {
    margin-top: 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.8;
}

/* Enhanced animations for dashboard auth loading */
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

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

/* Counter animation for dashboard stats */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard card entrance animations */
@keyframes slideInUp {
    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 slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Dashboard card animations */
.dashboard-application-card {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.dashboard-application-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-application-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-application-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-application-card:nth-child(4) { animation-delay: 0.4s; }
.dashboard-application-card:nth-child(5) { animation-delay: 0.5s; }
.dashboard-application-card:nth-child(6) { animation-delay: 0.6s; }

/* Recommendation card animations */
.recommendation-card {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.recommendation-card:nth-child(1) { animation-delay: 0.1s; }
.recommendation-card:nth-child(2) { animation-delay: 0.2s; }
.recommendation-card:nth-child(3) { animation-delay: 0.3s; }

/* Counter animation classes */
.counter-animate {
    animation: countUp 0.8s ease-out;
}

/* Dashboard section animations */
.dashboard-recommendations {
    animation: slideInUp 0.6s ease-out;
}

.dashboard-applications {
    animation: slideInUp 0.6s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

/* Tab transition animations */
.dashboard-tabs-inline .tab-link {
    transition: all 0.3s ease;
}

.dashboard-tabs-inline .tab-link:hover {
    transform: translateY(-2px);
}

.dashboard-tabs-inline .tab-link.active {
    transform: translateY(-1px);
}

/* Dashboard Header */
.dashboard-header {
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

/* Add subtle background pattern */
.dashboard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 165, 0, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Grid pattern overlay */
.dashboard-header {
    background-image: 
        linear-gradient(rgba(255, 215, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 215, 0, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: -1px -1px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.dashboard-icon {
    width: 60px;
    height: 60px;
    background: #1e5186;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(30, 81, 134, 0.2);
}

.header-info h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 5px 0;
}

.header-info p {
    color: #6c757d;
    margin: 0;
    font-size: 14px;
}

/* Dashboard Tabs Inline - integrated into header */
.dashboard-tabs-inline {
    display: flex;
    gap: 20px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.dashboard-tabs-inline .tab-link {
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none !important;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid transparent;
    position: relative;
    white-space: nowrap;
    min-width: fit-content;
}

.dashboard-tabs-inline .tab-link:hover {
    background: #e9ecef;
    color: #495057;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.dashboard-tabs-inline .tab-link.active {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    color: #2c3e50;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
    text-decoration: none !important;
}

.dashboard-tabs-inline .tab-link i {
    font-size: 16px;
}

.dashboard-tabs-inline .tab-link span {
    white-space: nowrap;
}

/* Remove underlines from all links in dashboard */
.dashboard-tabs-inline a,
.dashboard-tabs-inline a:hover,
.dashboard-tabs-inline a:focus,
.dashboard-tabs-inline a:active {
    text-decoration: none !important;
}

/* Remove old dashboard tabs styles */
.dashboard-tabs {
    display: none;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #1B3A5F;
    font-weight: 600;
}

/* Applications Grid */
.dashboard-applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

/* Application Card */
.dashboard-application-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 20px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-application-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-application-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: #e0e0e0;
}

.dashboard-application-card:hover::before {
    opacity: 1;
}

.application-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f5f5f5;
    flex-wrap: wrap;
    gap: 8px;
}

.application-date {
    color: #8b92a0;
    font-size: 0.875rem;
    font-weight: 500;
}

.application-status {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #475569;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

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

.application-status.status-applied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.25);
}

.application-status.status-applied:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.application-status.status-submitted {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.25);
}

.application-status.status-submitted:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.application-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    position: relative;
}

.detail-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #f0f0f0 20%, #f0f0f0 80%, transparent);
}

.detail-group:last-child::after {
    display: none;
}

.detail-label {
    color: #8b92a0;
    font-size: 0.8125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    opacity: 0.6;
}

.detail-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Special styling for loan amount */
.detail-group:first-child .detail-value {
    font-size: 1.125rem;
    color: #1e5186;
}

/* Applied To section */
.application-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f5f5f5;
}

.applied-to-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.applied-to-label {
    color: #8b92a0;
    font-size: 0.875rem;
    font-weight: 500;
}

.applied-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.875rem;
}

.applied-status i {
    font-size: 16px;
}

/* Lender clicks link */
.lender-clicks {
    margin-top: 8px;
}

.lender-clicks a {
    color: #1e5186;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.lender-clicks a:hover {
    color: #FFA500;
    transform: translateX(2px);
}

.lender-clicks a::after {
    content: '→';
    font-size: 12px;
    transition: transform 0.2s ease;
}

.lender-clicks a:hover::after {
    transform: translateX(3px);
}

/* Empty State */
.dashboard-empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #01455216;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f9;
    border-radius: 50%;
}

.empty-icon i {
    font-size: 32px;
    color: #1B3A5F;
}

.dashboard-empty-state p {
    margin: 0 0 8px;
    color: #1B3A5F;
}

.empty-subtitle {
    color: #718096;
    font-size: 0.875rem;
    margin-bottom: 24px;
}

/* Pagination */
.dashboard-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    color: #1B3A5F;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.page-numbers:hover {
    background: #eef2f900;
}

.page-numbers.current {
    background: #1B3A5F;
    color: white;
}

/* Buttons */
.dashboard-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.dashboard-button i {
    font-size: 14px;
}

.dashboard-button-primary {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    color: white;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}

.dashboard-button-primary:hover {
    background: linear-gradient(90deg, #FF7E1B, #FFAE00);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 126, 27, 0.4); /* Enhanced shadow on hover */
}

.dashboard-button-secondary {
    background: #eef2f9;
    color: #1B3A5F;
}

.dashboard-button-secondary:hover {
    background: #e2e8f0;
    color: #1B3A5F;
}

/* Laptop and smaller screens responsive adjustments */
@media (max-width: 1024px) {
    .user-dashboard-signin-modern {
        max-height: 95vh;
        min-height: 400px;
        margin: 16px auto;
    }
    
    .signin-form-section {
        padding: 24px;
    }
    
    .signin-content-section {
        padding: 24px;
    }
    
    .signin-benefit-item {
        padding: 16px;
        gap: 12px;
    }
    
    .signin-benefit-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* Tablet and smaller screens */
@media (max-width: 900px) {
    .user-dashboard-signin-modern {
        max-height: 98vh;
        min-height: 350px;
        margin: 12px auto;
    }
    
    .signin-form-section {
        padding: 20px;
    }
    
    .signin-content-section {
        padding: 20px;
    }
    
    .signin-form-header h1 {
        font-size: 1.8rem;
    }
    
    .signin-form-header p {
        font-size: 0.9rem;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .user-dashboard-container {
        padding: 16px;
    }
    
    /* Adjust signin/signup forms for mobile */
    .user-dashboard-signin {
        max-width: 100%;
        margin: 24px auto;
        padding: 24px;
        border-radius: 8px;
    }
    
    /* Signup responsive layout */
    .user-dashboard-signup {
        max-width: 100%;
        margin: 16px;
        flex-direction: column;
        height: auto; /* Allow natural height on mobile */
        min-height: auto;
    }
    
    .signup-form-section {
        padding: 24px; /* Reduced mobile padding */
    }
    
    .signup-content-section {
        display: none !important; /* Hide the "Why Choose" section on mobile */
    }
    
    .signup-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .signup-form-row .dashboard-form-group {
        margin-bottom: 20px;
    }
    
    .signup-content-header h2 {
        font-size: 1.8rem;
    }
    
    .signup-feature {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .signup-feature-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .signup-feature-content h3 {
        font-size: 1.1rem;
    }
    
    .signup-floating-element {
        display: none; /* Hide animations on mobile for better performance */
    }
    
    .signup-logo-image {
        max-height: 45px; /* Smaller on mobile */
        max-width: 150px;
    }
    
    .signup-header-inline {
        flex-direction: column; /* Stack vertically on mobile */
        gap: 8px;
        text-align: center;
    }
    
    .signup-logo-inline-img {
        height: 1em; /* Slightly smaller on mobile */
        margin: 0 2px;
    }
    
    /* Modern Signin Mobile Responsive */
    .user-dashboard-signin-modern {
        max-width: 100%;
        margin: 16px;
        display: block; /* Override flex display on mobile */
        min-height: auto;
        max-height: none; /* Remove height restrictions on mobile */
        background: #ffffff; /* Ensure white background */
        border-radius: 12px; /* Smaller border radius on mobile */
    }
    
    .signin-form-section {
        padding: 24px;
        flex: none; /* Remove flex to take full width when right side is hidden */
        width: 100%; /* Take full width on mobile */
    }
    
    .user-dashboard-signin-modern .signin-content-section {
        display: none !important; /* Hide right side content on mobile */
    }
    
    .signin-welcome-header h2 {
        font-size: 1.5rem;
    }
    
    .signin-benefits {
        gap: 18px;
    }
    
    .signin-benefit-item {
        padding: 18px;
        gap: 16px;
    }
    
    .signin-benefit-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .signin-benefit-content h3 {
        font-size: 1.1rem;
    }
    
    .signin-benefit-content p {
        font-size: 0.9rem;
    }
    
    .signin-floating-circle {
        display: none; /* Hide animations on mobile */
    }
    
    .signin-header-inline {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .signin-logo-inline-img {
        height: 1em;
        margin: 0 2px;
    }
    
    .user-dashboard-signin .dashboard-header {
        margin-bottom: 24px;
    }
    
    .dashboard-form-group {
        margin-bottom: 20px;
    }
    
    .dashboard-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .dashboard-form-actions .dashboard-button {
        height: 48px;
        font-size: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 16px;
    }

    .header-left {
        flex-direction: column;
    }

    .dashboard-tabs {
        flex-direction: row;
        overflow-x: auto;
        padding: 0;
        margin: 0 -16px 24px;
        padding: 0 16px;
    }

    .tab-link {
        white-space: nowrap;
    }

    .dashboard-applications-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-button {
        width: 100%;
        justify-content: center;
    }
}

/* Responsive adjustments for dashboard header */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        background-size: 40px 40px;
    }
    
    .dashboard-header::before {
        width: 250px;
        height: 250px;
        top: -40%;
        right: -20%;
    }
    
    .dashboard-header::after {
        width: 200px;
        height: 200px;
        bottom: -20%;
        left: -10%;
    }
    
    .header-left {
        margin-bottom: 2px; /* Ultra-tight spacing - almost connected */
        width: 100%;
    }
    
    .dashboard-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .header-info h1 {
        font-size: 20px;
    }
    
    .header-info p {
        font-size: 13px;
    }
    
    .dashboard-tabs-inline {
        width: 100%;
        justify-content: space-between;
        gap: 15px;
    }
    
    .dashboard-tabs-inline .tab-link {
        padding: 8px 12px;
        font-size: 14px;
        flex: 1;
        justify-content: center;
        white-space: nowrap;
        min-width: fit-content;
    }
    
    .dashboard-tabs-inline .tab-link i {
        font-size: 14px;
    }
}

/* Credit Score Blurb - Mobile Optimized */
.credit-score-blurb {
    background: linear-gradient(135deg, #2c5aa0 0%, #4a90e2 100%);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0 30px 0;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.2);
    position: relative;
    overflow: hidden;
}

.credit-score-blurb::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.credit-score-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.credit-score-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.credit-score-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
    min-width: 200px;
}

.credit-score-link {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.credit-score-link:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive for Credit Score Blurb */
@media (max-width: 768px) {
    .credit-score-blurb {
        padding: 12px 16px;
        margin: 15px auto 25px auto;
        max-width: 90%;
        text-align: center;
    }
    
    .credit-score-content {
        gap: 8px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .credit-score-icon {
        display: none;
    }
    
    .credit-score-text {
        font-size: 12px;
        min-width: auto;
        width: 100%;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    .credit-score-link {
        align-self: center;
        padding: 6px 12px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .credit-score-blurb {
        padding: 10px 12px;
        margin: 10px auto 15px auto;
        max-width: 95%;
    }
    
    .credit-score-content {
        gap: 6px;
    }
    
    .credit-score-text {
        font-size: 11px;
        line-height: 1.2;
    }
    
    .credit-score-link {
        padding: 4px 10px;
        font-size: 10px;
    }
}

/* Small mobile devices (Samsung S23, etc.) - show icons only */
@media (max-width: 400px) {
    .dashboard-tabs-inline {
        gap: 8px;
    }
    
    .dashboard-tabs-inline .tab-link {
        padding: 8px;
        min-width: 0;
        flex: 1;
        justify-content: center;
    }
    
    .dashboard-tabs-inline .tab-link span {
        display: none;
    }
    
    .dashboard-tabs-inline .tab-link i {
        margin: 0;
        font-size: 16px;
    }
    
    /* Application cards on mobile */
    .dashboard-applications-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dashboard-application-card {
        padding: 18px;
    }
    
    .application-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .detail-group {
        padding: 6px 0;
    }
    
    .detail-label {
        font-size: 0.8125rem;
    }
    
    .detail-value {
        font-size: 0.875rem;
    }
    
    .detail-group:first-child .detail-value {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        padding: 15px;
        background-size: 30px 30px;
    }
    
    .dashboard-header::before,
    .dashboard-header::after {
        display: none;
    }
    
    .header-left {
        margin-bottom: -20px; /* No spacing - directly connected */
    }
    
    .dashboard-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .header-info h1 {
        font-size: 18px;
        margin-bottom: 1px; /* Ultra-tight spacing between name and email */
    }
    
    .header-info p {
        font-size: 12px;
        word-break: break-word;
        margin: 0; /* Remove any default margins */
    }
    
    .dashboard-tabs-inline {
        gap: 8px;
    }
    
    .dashboard-tabs-inline .tab-link {
        padding: 8px 10px;
        font-size: 12px;
        border-radius: 8px;
        white-space: nowrap;
        min-width: fit-content;
    }
    
    .dashboard-tabs-inline .tab-link i {
        font-size: 14px;
        margin-right: 4px;
    }
    
    /* Show only icons on very small screens */
    @media (max-width: 360px) {
        .header-left {
            margin-bottom: 0px; /* No spacing - directly connected on very small screens */
        }
        
        .header-info h1 {
            margin-bottom: 0px; /* No spacing - directly connected */
        }
        
        .dashboard-tabs-inline .tab-link {
            padding: 8px;
            min-width: 0;
        }
        
        .dashboard-tabs-inline .tab-link span {
            display: none;
        }
        
        .dashboard-tabs-inline .tab-link i {
            margin: 0;
            font-size: 16px;
        }
    }
}

/* Sign In/Sign Up Styles - Enhanced for better desktop experience */
.user-dashboard-signin {
    max-width: 480px; /* Keep signin form compact */
    margin: 48px auto;
    text-align: center;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Signup Specific Styles - Horizontal Layout */
.user-dashboard-signup {
    max-width: 1000px; /* Wider container for horizontal layout */
    margin: 40px auto; /* Reduced margin for more compact layout */
    padding: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    min-height: 580px; /* Use min-height instead of fixed height */
    max-height: none; /* Remove height restriction to allow stretching */
}

.signup-form-section {
    flex: 1;
    padding: 24px; /* Reduced padding for more compact layout */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    overflow: visible; /* Remove scroll bar */
}

.signup-form-wrapper {
    margin: 20px 0; /* Reduced vertical spacing */
    padding: 0 8px; /* Reduced horizontal padding */
}

.signup-content-section {
    flex: 1;
    background: linear-gradient(135deg, #1B3A5F 0%, #2856a2 100%);
    color: white;
    padding: 32px; /* Reduced padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.signup-content-section::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 400 400"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.15)" stroke-width="1"/><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><rect x="15" y="15" width="10" height="10" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="0.5"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.6;
    animation: slideGrid 25s linear infinite;
}

@keyframes slideGrid {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-40px) translateY(-40px); }
}

@keyframes slideBackground {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-80px) translateY(-80px); }
}

.signup-content-header {
    text-align: center;
    margin-bottom: 24px; /* Reduced spacing */
    position: relative;
    z-index: 2;
}

.signup-content-header h2 {
    font-size: 2rem; /* Reduced size */
    font-weight: 700;
    margin: 0; /* Remove margin for better alignment */
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.signup-content-header p {
    font-size: 1rem; /* Reduced size */
    margin: 16px 0 0 0; /* Add top margin for spacing from header */
    opacity: 0.9;
    line-height: 1.4; /* Tighter line height */
}

.signup-logo {
    margin: 16px 0;
    display: flex;
    justify-content: center;
}

.signup-logo-image {
    max-height: 60px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.1); /* Enhance logo visibility on blue background */
}

/* Simple inline logo styling */
.signup-header-inline {
    display: flex;
    align-items: self-end;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.signup-logo-inline-img {
    height: 1.2em; /* Scale with text size */
    width: auto;
    vertical-align: middle;
    filter: brightness(1.2) contrast(1.1);
    margin: 0 4px; /* Small margin for spacing */
}

/* Modern Signin Layout */
.user-dashboard-signin-modern {
    max-width: 1000px;
    margin: 24px auto;
    padding: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    min-height: 500px;
    max-height: 90vh;
}

.signin-form-section {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.signin-content-section {
    flex: 1;
    background: linear-gradient(135deg, #1B3A5F 0%, #2856a2 100%); /* Match signup form bluish gradient */
    color: white;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.signin-content-section::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 400 400"><defs><pattern id="signin-grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.15)" stroke-width="1"/><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><rect x="15" y="15" width="10" height="10" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="0.5"/></pattern></defs><rect width="100%" height="100%" fill="url(%23signin-grid)"/></svg>');
    opacity: 0.6;
    animation: slideSigninGrid 25s linear infinite;
}

@keyframes slideSigninGrid {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-40px) translateY(-40px); }
}

@keyframes slideSigninPattern {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-60px) translateY(-60px); }
}

/* Signin Form Header */
.signin-form-header {
    text-align: center;
    margin-bottom: 24px;
}

.signin-form-header .dashboard-icon {
    margin: 0 auto 16px;
    width: 64px;
    height: 64px;
    font-size: 28px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); /* Yellow/Orange gradient */
    color: white;
    box-shadow: 0 4px 16px rgba(255, 165, 0, 0.3); /* Orange shadow */
}

.signin-form-header h1 {
    margin: 0 0 8px;
    color: #1B3A5F;
    font-size: 2rem;
    font-weight: 700;
}

.signin-form-header p {
    margin: 0;
    color: #718096;
    font-size: 1rem;
}

/* Signin Content Styling */
.signin-floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.signin-floating-circle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatCircle 8s ease-in-out infinite;
}

.signin-floating-circle:nth-child(1) {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.signin-floating-circle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.signin-floating-circle:nth-child(3) {
    width: 80px;
    height: 80px;
    top: 80%;
    right: 5%;
    animation-delay: 4s;
}

@keyframes floatCircle {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

.signin-welcome-content {
    position: relative;
    z-index: 2;
}

.signin-welcome-header {
    text-align: center;
    margin-bottom: 32px;
}

.signin-header-inline {
    display: flex;
    align-items: self-end; /* Match signup form alignment */
    justify-content: center;
    gap: 6px; /* Match signup form gap */
    flex-wrap: wrap;
}

.signin-logo-inline-img {
    height: 1.2em;
    width: auto;
    vertical-align: middle;
    filter: brightness(1.2) contrast(1.1);
    margin: 0 4px;
}

.signin-welcome-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: white;
}

.signin-welcome-header p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
    line-height: 1.4;
}

.signin-benefits {
    display: flex;
    flex-direction: column;
    gap: 16px; /* Reduced gap */
}

.signin-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 16px; /* Reduced gap */
    padding: 18px; /* Reduced padding */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 12px; /* Smaller border radius */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.signin-benefit-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 100%);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s ease;
}

.signin-benefit-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.signin-benefit-item:hover::before {
    transform: scaleY(1);
}

.signin-benefit-icon {
    width: 48px; /* Reduced size */
    height: 48px; /* Reduced size */
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 165, 0, 0.2) 100%);
    border-radius: 12px; /* Smaller border radius */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px; /* Reduced font size */
    color: #FFD700;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
}

.signin-benefit-item:hover .signin-benefit-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(255, 215, 0, 0.4);
}

.signin-benefit-content {
    flex: 1;
    padding-top: 2px; /* Reduced padding */
}

.signin-benefit-content h3 {
    margin: 0 0 6px; /* Reduced margin */
    font-size: 1.1rem; /* Reduced font size */
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.signin-benefit-content p {
    margin: 0;
    font-size: 0.9rem; /* Reduced font size */
    opacity: 0.9;
    color: white;
    line-height: 1.4; /* Tighter line height */
}

.signup-features {
    position: relative;
    z-index: 2;
}

.signup-feature {
    display: flex;
    align-items: center;
    gap: 16px; /* Reduced gap */
    margin-bottom: 16px; /* Reduced spacing */
    padding: 16px; /* Reduced padding */
    background: rgba(255, 255, 255, 0.15); /* More visible background */
    border-radius: 12px;
    backdrop-filter: blur(15px); /* Stronger blur */
    border: 1px solid rgba(255, 255, 255, 0.3); /* More visible border */
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Add subtle shadow */
}

.signup-feature:hover {
    background: rgba(255, 255, 255, 0.25); /* Brighter on hover */
    transform: translateY(-2px); /* More pronounced movement */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); /* Enhanced shadow */
}

.signup-feature-icon {
    width: 48px; /* Reduced size */
    height: 48px;
    background: rgba(255, 215, 0, 0.3); /* More visible background */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px; /* Reduced size */
    color: #FFD700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2); /* Golden glow */
}

.signup-feature-content h3 {
    margin: 0; /* Remove bottom margin */
    font-size: 1.1rem; /* Reduced size */
    font-weight: 600;
    color: white; /* White text for better contrast */
}

/* Remove feature descriptions - only show titles */
.signup-feature-content p {
    display: none; /* Hide descriptions */
}

.signup-animation {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    width: 120px;
    height: 120px;
    z-index: 1;
}

.signup-floating-element {
    position: absolute;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.signup-floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 15%;
    animation-delay: 0s;
}

.signup-floating-element:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 25%;
    animation-delay: 2s;
}

.signup-floating-element:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 80%;
    right: 10%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.user-dashboard-signin .dashboard-header {
    flex-direction: column;
    text-align: center;
    padding: 0;
    margin-bottom: 40px; /* Increased spacing after header */
    box-shadow: none;
    background: none;
}

.user-dashboard-signin .dashboard-icon {
    margin: 0 auto 16px;
}

.user-dashboard-signin h1 {
    margin: 0 0 8px;
    color: #1B3A5F;
    font-size: 1.75rem;
    font-weight: 600;
}

.user-dashboard-signin p {
    margin: 0;
    color: #718096;
}

.dashboard-signin-form {
    text-align: left;
}

.dashboard-form-group {
    margin-bottom: 28px; /* Increased spacing between form groups */
}

/* Adjust spacing for signup form specifically */
.user-dashboard-signup .dashboard-form-group {
    margin-bottom: 18px; /* Reduced spacing for signup form */
}

.signup-form-header {
    margin-bottom: 24px; /* Reduced spacing below header */
}

.user-dashboard-signup .dashboard-form-actions {
    margin-top: 20px; /* Reduced spacing above button */
}

.user-dashboard-signup .dashboard-form-footer {
    margin-top: 20px; /* Reduced spacing above footer */
}

/* Signup Form Field Combinations */
.signup-form-row {
    display: flex;
    gap: 16px; /* Reduced gap between name fields */
    margin-bottom: 18px; /* Further reduced spacing */
}

.signup-form-row .dashboard-form-group {
    flex: 1;
    margin-bottom: 0;
}

.signup-form-header {
    text-align: center;
    margin-bottom: 24px; /* Reduced spacing */
}

.signup-form-header .dashboard-icon {
    margin: 0 auto 16px;
    width: 64px;
    height: 64px;
    font-size: 28px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); /* Yellow/Orange gradient */
    color: white; /* White icon */
    box-shadow: 0 4px 16px rgba(255, 165, 0, 0.3); /* Subtle shadow */
}

.signup-form-header h1 {
    margin: 0 0 8px;
    color: #1B3A5F;
    font-size: 2rem;
    font-weight: 700;
}

.signup-form-header p {
    margin: 0;
    color: #718096;
    font-size: 1.1rem;
}

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

.dashboard-input {
    width: 100%;
    padding: 16px 18px; /* Increased padding for better readability */
    border: 2px solid #e2e8f0; /* Slightly thicker border */
    border-radius: 10px; /* Smoother, more rounded edges */
    font-size: 1rem;
    transition: all 0.3s ease; /* Smoother transition */
    background-color: #ffffff;
}

.dashboard-input:hover {
    border-color: #cbd5e1; /* Light hover state */
    background-color: #fafbfc; /* Subtle background change on hover */
}

.dashboard-input:focus {
    border-color: #1B3A5F;
    box-shadow: 0 0 0 3px rgba(27, 58, 95, 0.15); /* Slightly more prominent focus shadow */
    outline: none;
    background-color: #ffffff;
}

/* Smaller input padding for signup form */
.user-dashboard-signup .dashboard-input {
    padding: 14px 16px; /* Reduced padding for signup form */
}

.dashboard-password-field {
    position: relative;
}

.dashboard-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0;
}

.dashboard-password-requirements {
    margin-top: 8px;
    font-size: 0.875rem;
    color: #718096;
}

.dashboard-error {
    padding: 12px 14px; /* Reduced padding */
    background: #fff5f5;
    color: #c53030;
    border-radius: 8px;
    margin: 16px 0; /* Reduced vertical margin */
    text-align: center;
    min-height: 40px; /* Use min-height instead of fixed height to allow stretching */
    display: flex !important; /* Force display */
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1.4;
    border: 1px solid #fed7d7;
    transition: all 0.3s ease;
    visibility: hidden;
    opacity: 0;
}

/* When error has content and is visible, show it */
.dashboard-error.show-error {
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
}

/* Override any inline styles */
.dashboard-error[style*="display: none"].show-error {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* When error is empty, keep it hidden */
.dashboard-error:empty {
    visibility: hidden !important;
    opacity: 0 !important;
}

.dashboard-form-actions {
    margin-top: 20px; /* Reduced spacing from 32px */
}

.dashboard-form-actions .dashboard-button {
    width: 100%;
    height: 56px; /* Increased height to match improved input fields */
    display: flex;
    align-items: center;
    justify-content: center; /* Ensure perfect centering */
    font-size: 1.1rem; /* Slightly larger text */
    font-weight: 600;
    border-radius: 10px; /* Match input field border-radius */
}

/* Smaller button for signup form */
.user-dashboard-signup .dashboard-button {
    height: 48px; /* Reduced height for signup form */
    font-size: 1rem; /* Slightly smaller font */
}

.dashboard-form-footer {
    margin-top: 32px; /* Increased spacing above footer */
    text-align: center;
    color: #718096;
    font-size: 0.95rem; /* Slightly larger text for better readability */
}

.dashboard-link {
    color: #1B3A5F;
    text-decoration: none;
    font-weight: 500;
}

.dashboard-link:hover {
    text-decoration: underline;
}

/* Lender Logo Styles */
.applied-lenders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.applied-lender-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.lender-logo-small {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 2px;
}

.lender-name,
.lender-name-fallback {
    font-weight: 500;
    color: #2d3748;
}

.applied-lender-item .text-green-600 {
    margin-left: auto;
    font-size: 0.875rem;
}

.lender-info-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Recommendations Section */
.dashboard-recommendations {
    margin-bottom: 2rem;
}

.dashboard-recommendations .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.dashboard-recommendations .section-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

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

.recommendation-card {
    background: linear-gradient(135deg, 
        var(--gradient-start) 0%,
        var(--gradient-end) 100%);
    border-radius: 20px;
    padding: 1.5rem;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1),
                0 8px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.recommendation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.recommendation-card:nth-child(1) {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --primary-color-rgb: 99, 102, 241;
    --gradient-start: #4338ca;
    --gradient-end: #5b21b6;
}

.recommendation-card:nth-child(2) {
    --primary-color: #ec4899;
    --secondary-color: #f43f5e;
    --primary-color-rgb: 236, 72, 153;
    --gradient-start: #be185d;
    --gradient-end: #9d174d;
}

.recommendation-card:nth-child(3) {
    --primary-color: #0ea5e9;
    --secondary-color: #06b6d4;
    --primary-color-rgb: 14, 165, 233;
    --gradient-start: #0369a1;
    --gradient-end: #0c4a6e;
}

.recommendation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15),
                0 15px 35px rgba(0, 0, 0, 0.2);
}

.recommendation-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.recommendation-logo {
    width: 140px;
    height: 70px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.recommendation-card:hover .recommendation-logo {
    transform: scale(1.05);
}

.recommendation-lender-name {
    margin: 0 0 0.75rem 0;
    font-size: 1.375rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.recommendation-blurb {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 500;
}

.recommendation-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.feature-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-value {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.recommendation-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.timer-icon {
    font-size: 1.125rem;
}

.timer-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.timer-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timer-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    min-width: 120px; /* Fixed width to prevent layout shift */
    font-family: 'Courier New', monospace; /* Monospace font for consistent character width */
    text-align: left;
    display: inline-block;
    transition: none; /* Disable transitions for countdown updates */
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

.recommendation-actions {
    display: flex;
    justify-content: center;
    padding-top: 0.25rem;
}

.recommendation-cta-button {
    background: #ffffff;
    color: var(--gradient-start);
    height: 44px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 180px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recommendation-cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        var(--gradient-start) 0%,
        var(--gradient-end) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recommendation-cta-button:hover {
    animation: none;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

.recommendation-cta-button:hover::before {
    opacity: 1;
}

.recommendation-cta-button:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.recommendation-cta-button span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    line-height: 1;
}

.recommendation-cta-button:hover span {
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .recommendation-card {
        padding: 1.5rem;
    }
    
    .recommendation-logo {
        width: 44px;
        height: 44px;
        padding: 6px;
    }
    
    .recommendation-lender-name {
        font-size: 1.25rem;
    }
    
    .recommendation-blurb {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }
    
    .recommendation-cta-button {
        padding: 0.75rem 1.75rem;
        font-size: 0.9375rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .recommendations-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .recommendation-card {
        padding: 1.25rem;
    }
    
    .recommendation-header {
        gap: 0.75rem;
    }
    
    .recommendation-logo {
        width: 40px;
        height: 40px;
    }
    
    .recommendation-lender-name {
        font-size: 1.125rem;
    }
}

/* Points Section Styles */
.points-section {
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.points-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.points-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.points-card:hover {
    transform: translateY(-5px);
}

.points-card.total-points {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
}

.points-card.today-points {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.points-card.accuracy {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.points-card.streak {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.card-icon {
    font-size: 30px;
    opacity: 0.9;
}

.card-content {
    flex: 1;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.card-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

.points-info-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.points-info-section h3 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 20px;
}

.earning-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.earning-method {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.method-icon {
    width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.method-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #1e293b;
}

.method-content p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.quiz-history-section h3 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 20px;
}

.no-quiz-history {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
}

.empty-icon {
    font-size: 50px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.no-quiz-history p {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #475569;
}

.empty-subtitle {
    font-size: 14px !important;
    color: #64748b !important;
}

.quiz-history-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    background: #f1f5f9;
    padding: 0;
}

.header-cell {
    padding: 15px 20px;
    font-weight: 600;
    color: #475569;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.table-row:hover {
    background: #f8fafc;
}

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

.table-cell {
    padding: 20px;
    display: flex;
    align-items: center;
}

.article-cell {
    flex-direction: column;
    align-items: flex-start;
}

.article-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 5px;
    font-size: 15px;
}

.quiz-question-preview {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.result-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.result-badge.correct {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.result-badge.incorrect {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.points-earned {
    color: #059669;
    font-weight: 700;
    font-size: 16px;
}

.points-missed {
    color: #94a3b8;
    font-weight: 600;
    font-size: 16px;
}

.date-cell {
    font-size: 14px;
    color: #64748b;
}

.history-note {
    margin-top: 20px;
    text-align: center;
}

.history-note p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

/* Modern Achievements Section */
.achievements-section {
    margin-top: 40px;
}

.achievements-section h3 {
    margin: 0 0 30px 0;
    color: #1e293b;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.achievements-section h3 i {
    color: #f59e0b;
    font-size: 26px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

/* Modern Achievement Cards */
.modern-achievement {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modern-achievement::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--achievement-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-achievement.unlocked::before {
    opacity: 1;
}

.modern-achievement.unlocked {
    border-color: var(--achievement-color);
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.95) 100%);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.modern-achievement.current {
    border-color: var(--achievement-color);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 0 3px rgba(var(--achievement-color), 0.1);
    transform: translateY(-4px);
}

.modern-achievement.locked {
    opacity: 0.6;
    background: #f9fafb;
    border-color: #e5e7eb;
}

.modern-achievement:hover.unlocked {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0);
}

.achievement-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.achievement-card.unlocked .achievement-icon {
    background: #10b981;
    color: white;
}

.achievement-card.locked .achievement-icon {
    background: #e2e8f0;
    color: #94a3b8;
}

.achievement-content {
    flex: 1;
}

.achievement-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #1e293b;
}

.achievement-content p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.achievement-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 3px solid white;
}

/* Achievement Progress Bar */
.achievement-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--achievement-gradient);
    width: var(--progress);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Achievement Emoji */
.achievement-emoji {
    font-size: 36px;
    text-align: center;
    margin-bottom: 12px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.modern-achievement.unlocked .achievement-emoji {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.modern-achievement.current .achievement-emoji {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: scale(1.1) translateY(0); }
    40% { transform: scale(1.1) translateY(-8px); }
    60% { transform: scale(1.1) translateY(-4px); }
}

/* Achievement Content */
.achievement-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 6px 0;
    text-align: center;
}

.modern-achievement.unlocked .achievement-title {
    color: var(--achievement-color);
}

.achievement-description {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 12px 0;
    text-align: center;
    line-height: 1.4;
}

.achievement-points {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.points-required {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 16px;
    border: 2px solid #e5e7eb;
}

.modern-achievement.unlocked .points-required {
    background: var(--achievement-gradient);
    color: white;
    border-color: var(--achievement-color);
}

.achievement-status {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 10px;
}

.unlocked-status {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.locked-status {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Current Badge */
.current-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--achievement-gradient);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Achievement Glow Effect */
.achievement-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--achievement-gradient);
    border-radius: 22px;
    z-index: -1;
    opacity: 0.1;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { opacity: 0.1; transform: scale(1); }
    to { opacity: 0.2; transform: scale(1.02); }
}


.no-achievements {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

/* Quiz History Interactive Rows */
.quiz-history-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-history-row:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quiz-expand-icon {
    margin-left: 8px;
    color: #6b7280;
    font-size: 12px;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.quiz-history-row:hover .quiz-expand-icon {
    color: #3b82f6;
    opacity: 1;
}

/* Quiz Details Modal */
.quiz-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.quiz-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.quiz-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

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

.quiz-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.quiz-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.quiz-modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.quiz-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.quiz-modal-body {
    padding: 0 24px 24px 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.quiz-detail-section {
    margin-bottom: 24px;
}

.quiz-detail-section:last-child {
    margin-bottom: 0;
}

.quiz-detail-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.quiz-detail-section h4 i {
    color: #6b7280;
    width: 16px;
}

.quiz-detail-section p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

.quiz-detail-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-option-item {
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #4b5563;
}

.quiz-option-item.user-selected {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.quiz-option-item.correct-answer {
    background: #dcfce7;
    border-color: #16a34a;
    color: #166534;
}

.quiz-option-item.user-selected.correct-answer {
    background: #dcfce7;
    border-color: #16a34a;
    color: #166534;
}

.quiz-detail-answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.quiz-detail-user-answer {
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 8px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
}

.quiz-detail-user-answer.correct {
    background: #dcfce7;
    border-color: #16a34a;
    color: #166534;
}

.quiz-detail-user-answer.incorrect {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.quiz-detail-correct-answer {
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 8px;
    background: #dcfce7;
    border: 2px solid #16a34a;
    color: #166534;
}

.quiz-detail-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
}

.quiz-detail-result-badge.correct {
    background: #dcfce7;
    color: #166534;
    border: 2px solid #16a34a;
}

.quiz-detail-result-badge.incorrect {
    background: #fef2f2;
    color: #dc2626;
    border: 2px solid #ef4444;
}

.quiz-detail-meta {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.quiz-detail-date {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Points Section Responsive */
@media (max-width: 768px) {
    .points-overview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .points-card {
        padding: 16px;
        text-align: center;
    }
    
    .card-value {
        font-size: 22px;
        margin-bottom: 4px;
    }
    
    .points-card h3 {
        font-size: 13px;
        margin: 0;
        font-weight: 600;
    }
    
    .points-card i {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .earning-methods {
        grid-template-columns: 1fr;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .table-header {
        display: none;
    }
    
    .table-row {
        background: white;
        border-radius: 8px;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: none;
        padding: 15px;
        display: block;
    }
    
    /* Compact mobile layout for quiz history */
    .quiz-history-row .article-cell {
        margin-bottom: 12px;
        padding: 0;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 10px;
    }
    
    .quiz-history-row .article-title {
        font-weight: 600;
        margin-bottom: 4px;
        font-size: 15px;
        line-height: 1.3;
    }
    
    .quiz-history-row .quiz-question-preview {
        font-size: 13px;
        color: #64748b;
        line-height: 1.4;
    }
    
    /* Status and Points on same row */
    .quiz-history-row .result-cell,
    .quiz-history-row .points-cell {
        display: inline-block;
        padding: 0;
        border-bottom: none;
        margin-right: 15px;
    }
    
    .quiz-history-row .result-cell {
        margin-bottom: 8px;
    }
    
    .quiz-history-row .points-cell {
        margin-bottom: 8px;
    }
    
    /* Date on separate row */
    .quiz-history-row .date-cell {
        display: block;
        padding: 8px 0 0 0;
        border-bottom: none;
        font-size: 12px;
        color: #94a3b8;
        border-top: 1px solid #f1f5f9;
        margin-top: 8px;
        padding-top: 8px;
    }
    
    .table-cell {
        padding: 5px 0;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .table-cell:last-child {
        border-bottom: none;
    }
    
    .achievements-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto auto;
        gap: 16px;
    }
    
    /* First 4 achievements in 2x2 grid */
    .modern-achievement:nth-child(1),
    .modern-achievement:nth-child(2),
    .modern-achievement:nth-child(3),
    .modern-achievement:nth-child(4) {
        padding: 16px;
        min-height: 180px;
    }
    
    /* Legend achievement spans full width in third row */
    .modern-achievement:nth-child(5) {
        grid-column: 1 / -1;
        padding: 24px;
        min-height: 220px;
        max-width: 85%;
        margin: 8px auto 0 auto;
    }
    
    /* Enhanced styling for Legend achievement on mobile */
    .modern-achievement:nth-child(5) .achievement-emoji {
        font-size: 40px !important;
        height: 48px !important;
        margin-bottom: 12px !important;
    }
    
    .modern-achievement:nth-child(5) .achievement-title {
        font-size: 18px !important;
        font-weight: 700 !important;
    }
    
    .modern-achievement:nth-child(5) .achievement-description {
        font-size: 14px !important;
        margin: 8px 0 12px 0 !important;
    }
    
    .modern-achievement:nth-child(5) .achievement-points {
        font-size: 16px !important;
    }
    
    .modern-achievement {
        padding: 16px;
        min-height: 180px;
    }
    
    .achievement-emoji {
        font-size: 32px;
        height: 40px;
        margin-bottom: 10px;
    }
    
    .achievement-title {
        font-size: 15px;
    }
    
    .achievement-description {
        font-size: 11px;
    }
    
    .points-required {
        font-size: 13px;
        padding: 3px 8px;
    }
    
    .achievement-status {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    /* Pagination responsive */
    .quiz-history-pagination {
        padding: 16px 12px;
        margin-top: 20px;
    }
    
    .pagination-info {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .pagination-controls {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 16px;
        max-width: none;
    }
    
    .pagination-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100px;
        flex: 0 0 auto;
    }
    
    .pagination-btn-disabled {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100px;
        flex: 0 0 auto;
    }
    
    .pagination-current {
        display: none !important;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .points-overview-grid {
        gap: 12px;
        margin-bottom: 25px;
    }
    
    .points-card {
        padding: 14px;
    }
    
    .card-value {
        font-size: 20px;
        margin-bottom: 3px;
    }
    
    .points-card h3 {
        font-size: 12px;
    }
    
    .points-card i {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto auto;
        gap: 12px;
    }
    
    /* First 4 achievements in 2x2 grid for small mobile */
    .modern-achievement:nth-child(1),
    .modern-achievement:nth-child(2),
    .modern-achievement:nth-child(3),
    .modern-achievement:nth-child(4) {
        padding: 14px;
        min-height: 160px;
    }
    
    /* Legend achievement spans full width for small mobile */
    .modern-achievement:nth-child(5) {
        grid-column: 1 / -1;
        padding: 18px;
        min-height: 180px;
        max-width: 90%;
        margin: 4px auto 0 auto;
    }
    
    /* Enhanced styling for Legend on small mobile */
    .modern-achievement:nth-child(5) .achievement-emoji {
        font-size: 36px !important;
        height: 42px !important;
        margin-bottom: 10px !important;
    }
    
    .modern-achievement:nth-child(5) .achievement-title {
        font-size: 16px !important;
        font-weight: 700 !important;
    }
    
    .modern-achievement:nth-child(5) .achievement-description {
        font-size: 13px !important;
        margin: 6px 0 10px 0 !important;
    }
    
    .modern-achievement:nth-child(5) .achievement-points {
        font-size: 14px !important;
    }
    
    .modern-achievement {
        padding: 14px;
        min-height: 160px;
    }
    
    .achievement-emoji {
        font-size: 28px;
        height: 35px;
        margin-bottom: 8px;
    }
    
    .achievement-title {
        font-size: 14px;
    }
    
    .achievement-description {
        font-size: 10px;
    }
    
    /* Compact quiz history for small mobile */
    .quiz-history-row .article-title {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .quiz-history-row .quiz-question-preview {
        font-size: 12px;
    }
    
    .quiz-history-row .result-cell,
    .quiz-history-row .points-cell {
        margin-right: 12px;
    }
    
    .quiz-history-row .date-cell {
        font-size: 11px;
        margin-top: 6px;
        padding-top: 6px;
    }
    
    .table-row {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    /* Ultra compact pagination for very small screens */
    .quiz-history-pagination {
        padding: 12px 8px;
    }
    
    .pagination-info {
        font-size: 11px;
        margin-bottom: 10px;
    }
    
    .pagination-btn {
        padding: 12px 24px;
        font-size: 14px;
        min-width: 110px;
        flex: 0 0 auto;
    }
    
    .pagination-btn-disabled {
        padding: 12px 24px;
        font-size: 14px;
        min-width: 110px;
        flex: 0 0 auto;
    }
    
    .pagination-current {
        display: none !important;
    }
    
    .pagination-controls {
        gap: 16px;
        padding: 0 8px;
        justify-content: center;
    }
    
    .quiz-history-pagination {
        padding: 16px 12px;
        margin: 20px 0;
    }
}

/* Ultra small screens - prevent horizontal scroll */
@media (max-width: 360px) {
    .pagination-btn {
        padding: 10px 20px;
        font-size: 13px;
        min-width: 90px;
        flex: 0 0 auto;
    }
    
    .pagination-btn-disabled {
        padding: 10px 20px;
        font-size: 13px;
        min-width: 90px;
        flex: 0 0 auto;
    }
    
    .pagination-current {
        display: none !important;
    }
    
    .pagination-controls {
        gap: 12px;
        padding: 0 4px;
        justify-content: center;
    }
    
    .quiz-history-pagination {
        padding: 12px 8px;
        margin: 16px 0;
    }
    
    .pagination-info {
        font-size: 11px;
        margin-bottom: 10px;
    }
    
    /* Quiz modal responsive */
    .quiz-modal {
        padding: 16px;
    }
    
    .quiz-modal-content {
        max-width: none;
        width: 100%;
        max-height: 95vh;
    }
    
    .quiz-modal-header {
        padding: 20px 20px 0 20px;
        margin-bottom: 20px;
    }
    
    .quiz-modal-header h3 {
        font-size: 18px;
    }
    
    .quiz-modal-body {
        padding: 0 20px 20px 20px;
    }
    
    .quiz-detail-answers {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .quiz-detail-section {
        margin-bottom: 20px;
    }
}

/* Mobile-specific pagination override */
@media (max-width: 768px) {
    .quiz-history-pagination .pagination-current {
        display: none !important;
    }
    
    .quiz-history-pagination .pagination-controls {
        justify-content: center !important;
        gap: 16px !important;
    }
    
    .quiz-history-pagination .pagination-btn,
    .quiz-history-pagination .pagination-btn-disabled {
        flex: 0 0 auto !important;
        min-width: 100px !important;
    }
}

/* Quiz History Pagination */
.quiz-history-pagination {
    margin-top: 30px;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e3e6ea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pagination-info {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
    overflow: hidden;
    box-sizing: border-box;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #ffffff;
    color: #475569;
    text-decoration: none;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 100px;
    justify-content: center;
}

.pagination-btn:hover {
    background: #f8fafc;
    color: #334155;
    text-decoration: none;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pagination-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pagination-btn-disabled {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #f9fafb;
    color: #9ca3af;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    min-width: 100px;
    justify-content: center;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-current {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    min-width: 120px;
}

/* OTP Verification Styles */
.otp-verification-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
    max-width: 400px;
    margin: 0 auto;
}

.otp-verification-header {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
}

.otp-email-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.otp-email-icon i {
    font-size: 28px;
    color: #ffffff;
}

.otp-verification-header h2 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    color: #1B3A5F;
    font-weight: 600;
}

.otp-instructions {
    color: #718096;
    font-size: 0.95rem;
    margin: 0;
}

.otp-instructions span {
    font-weight: 500;
    color: #1B3A5F;
}

.otp-verification-form {
    width: 100%;
    max-width: 320px;
}

.otp-input-container {
    margin-bottom: 32px;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.otp-digit {
    width: 56px;
    height: 56px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1B3A5F;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

.otp-digit:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.otp-digit:invalid {
    border-color: #e53e3e;
}

.otp-digit.success {
    border-color: #10b981;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    animation: otpSuccessPulse 0.6s ease-in-out;
}

@keyframes otpSuccessPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    }
}

.otp-helper-text {
    text-align: center;
    color: #ffffff;
    font-size: 0.875rem;
    margin: 16px auto 0;
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    max-width: 280px;
}

.otp-error {
    text-align: center;
    padding: 12px;
    margin: 16px 0;
    border-radius: 6px;
    font-size: 0.875rem;
    display: none;
}

.otp-error.show-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
    display: block;
}

.otp-error.show-success {
    background: #c6f6d5;
    color: #2f855a;
    border: 1px solid #9ae6b4;
    display: block;
}

.otp-form-actions {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.otp-form-actions .dashboard-button {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.otp-resend-section {
    text-align: center;
    margin-bottom: 20px;
}

.resend-text {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.resend-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.resend-btn {
    background: none;
    border: none;
    color: #3182ce;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.resend-btn:hover {
    color: #2c5aa0;
    background: rgba(49, 130, 206, 0);
}

.resend-btn:disabled {
    color: #a0aec0;
    cursor: not-allowed;
    background: none;
}

.resend-cooldown {
    color: #e53e3e;
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(229, 62, 62, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.otp-back-section {
    text-align: center;
    margin-top: 8px;
}

.back-btn {
    background: none;
    border: none;
    color: #3182ce;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    color: #2c5aa0;
    background: rgba(49, 130, 206, 0.1);
}

.back-btn i {
    font-size: 0.8rem;
}

/* Mobile responsiveness for OTP */
@media (max-width: 480px) {
    .otp-inputs {
        gap: 8px;
    }
    
    .otp-digit {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
}

/* Remove old dashboard-error styles and replace with new error styles */
.dashboard-field-error,
.dashboard-general-error {
    color: #c53030;
    font-size: 0.875rem;
    margin-top: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-general-error {
    padding: 12px 14px;
    background: #fff5f5;
    border-radius: 8px;
    margin-top: 16px;
    margin-bottom: 16px;
    font-size: 0.9375rem;
}

.dashboard-general-error i {
    flex-shrink: 0;
}

/* Password requirements styling */
.dashboard-password-requirements {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 6px;
}

.dashboard-password-requirements.error-state {
    color: #c53030;
}

/* Adjust form actions spacing */
.dashboard-form-actions {
    margin-top: 20px; /* Reduced from 32px */
}

/* Specific spacing for signup form */
.user-dashboard-signup .dashboard-form-actions {
    margin-top: 20px; /* Consistent spacing */
}

/* Additional responsive improvements for small laptop screens */
@media (max-width: 1200px) and (min-width: 1025px) {
    .user-dashboard-signin-modern {
        max-height: 92vh;
        min-height: 450px;
    }
    
    .signin-form-section {
        padding: 28px;
    }
    
    .signin-content-section {
        padding: 28px;
    }
}

/* Very small laptop screens (800px - 1024px) */
@media (max-width: 1024px) and (min-width: 801px) {
    .user-dashboard-signin-modern {
        max-height: 95vh;
        min-height: 380px;
    }
    
    .signin-form-section {
        padding: 24px;
    }
    
    .signin-content-section {
        padding: 24px;
    }
    
    .signin-benefit-item {
        padding: 14px;
        gap: 10px;
    }
    
    .signin-benefit-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* Extra small laptop screens (600px - 800px) */
@media (max-width: 800px) and (min-width: 601px) {
    .user-dashboard-signin-modern {
        max-height: 98vh;
        min-height: 350px;
    }
    
    .signin-form-section {
        padding: 20px;
    }
    
    .signin-content-section {
        padding: 20px;
    }
    
    .signin-form-header h1 {
        font-size: 1.7rem;
    }
    
    .signin-form-header p {
        font-size: 0.9rem;
    }
}