.login-hero {
    background: linear-gradient(135deg, #D6FAE3 0%, #E9FFF9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.3rem 0;
    top: 100px;
    position: relative;
}

.ai-diagnostic-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15), 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-diagnostic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(102, 126, 234, 0.2), 0 15px 30px rgba(0, 0, 0, 0.1);
}

.ai-brand-section {
    background: linear-gradient(135deg, #e4faec 0%, #f6fffd 100%);
    color: black;
    padding: 2rem 1.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.ai-feature-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 0.75rem;
    margin: 10px 0;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.ai-feature-badge:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.3);
}

.ai-form-section {
    padding: 2rem 2rem;
    background: white;
}

.ai-input-icon {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    padding: 0 1.2rem;
}

.ai-primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    width: 100%;
    color: white;
    position: relative;
    overflow: hidden;
}
.ai-form-section .btn-lg {
    padding: 0.7rem 1.5rem;
}

.ai-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.25);
    color: white;
}

.ai-primary-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.7s ease;
}

.ai-primary-btn:hover:before {
    left: 100%;
}

.ai-captcha-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.2rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.ai-captcha-container:focus-within {
    border-color: #667eea;
    background: white;
}

.ai-captcha-img {
    border-radius: 8px;
    height: 65px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.ai-divider {
    position: relative;
    text-align: center;
    margin: 1rem 0;
    color: #64748b;
    font-size: 0.9rem;
}

.ai-divider:before,
.ai-divider:after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0);
}

.ai-divider:before {
    left: 0;
}

.ai-divider:after {
    right: 0;
}

.ai-stats-badge {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.ai-remember-check {
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    width: 20px;
    height: 20px;
}

.ai-remember-check:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.ai-input-group {
    display: flex;
    align-items: center; /* THIS fixes vertical alignment */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.ai-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 1.2rem;
    color: #64748b;
}

.ai-input-group .form-control {
    height: 44px;
    line-height: 44px;
    padding-left: 0;
}

.ai-input-icon {
    height: 44px;
}

.ai-captcha-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.2rem;
    border: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ai-captcha-container .d-flex {
    align-items: center;
}

.ai-captcha-img {
    height: 56px;               /* match form-control-lg */
    object-fit: cover;
    border-radius: 8px;
}
.ai-captcha-container .form-control-lg {
    height: 56px;
    line-height: 56px;
    padding: 0 1rem;
    background: transparent;
}
.ai-captcha-container:focus-within {
    border-color: #667eea;
    background: #ffffff;
}

@media (max-width: 768px) {
    .login-hero {
        padding: 1rem;
    }
    
    .ai-brand-section {
        padding: 2rem 1.5rem;
        border-radius: 20px 20px 0 0;
    }
    
    .ai-form-section {
        padding: 2rem 1.5rem;
        border-radius: 0 0 20px 20px;
    }
    
    .ai-diagnostic-card {
        margin: 0.5rem;
    }
}
.ai-captcha-container {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
}

/* STRICT control on image */
.ai-captcha-img {
    max-width: 100%;
    height: 50px;         /* control height */
    object-fit: contain;  /* prevent stretching */
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    object-fit: contain;
}

/* Prevent flex stretching */
.ai-captcha-container .d-flex {
    align-items: center;
}

.ai-captcha-container img {
    display: block;
}
.ai-form-section .mb-4 {
    margin-bottom: 1rem !important;
}

.ai-form-section .mb-3 {
    margin-bottom: 0.75rem !important;
}