.dropdown-submenu {
    position: relative;
}

.dropdown-submenu a::after {
    transform: rotate(-90deg);
    position: absolute;
    right: 6px;
    top: .8em;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: .1rem;
    margin-right: .1rem;
}

#bsCaptchaTarget{
    z-index: -9999;
}

.form-invalid {
    border: red solid 1px;
    border-radius: 3px;
    padding: 5px
}

/* ===== CAPTCHA STYLING ===== */
.captcha-container {
    margin: 20px 0;
    max-width: 400px;
}

.captcha-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    font-size: 14px;
}

.captcha-label i {
    color: #3b82f6;
    font-size: 16px;
}

.captcha-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.captcha-image-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-image-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background: #ffffff;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.captcha-image-wrapper:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #d1d5db;
}

.captcha-image {
    display: block;
    width: 200px;
    height: 80px;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.captcha-refresh-btn {
    background: #3b82f6;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.captcha-refresh-btn:hover {
    background: #2563eb;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.captcha-refresh-btn:active {
    transform: scale(0.95);
}

.captcha-refresh-btn.loading {
    pointer-events: none;
    background: #9ca3af;
}

.captcha-refresh-btn.loading i {
    animation: spin 1s linear infinite;
}

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

.captcha-input-section {
    position: relative;
}

.captcha-input {
    width: 200px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    background: #ffffff;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

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

.captcha-input.is-invalid {
    border-color: #ef4444;
    background: #fef2f2;
}

.captcha-input.is-invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.captcha-input-section.focused .captcha-input {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.captcha-error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    animation: slideIn 0.3s ease;
}

.captcha-error i {
    font-size: 14px;
}

.captcha-help {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 12px;
    margin-top: 8px;
    padding: 6px 0;
}

.captcha-help i {
    color: #9ca3af;
    font-size: 13px;
}

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

/* Responsive design */
@media (max-width: 480px) {
    .captcha-container {
        max-width: 100%;
    }
    
    .captcha-content {
        align-items: center;
    }
    
    .captcha-image-section {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .captcha-image-wrapper {
        width: 100%;
        max-width: 280px;
    }
    
    .captcha-image {
        width: 100%;
        height: auto;
        min-height: 60px;
    }
    
    .captcha-refresh-btn {
        width: 36px;
        height: 36px;
    }
    
    .captcha-input {
        width: 100%;
        max-width: 200px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .captcha-label {
        color: #f3f4f6;
    }
    
    .captcha-image-wrapper {
        background: #374151;
        border-color: #4b5563;
    }
    
    .captcha-input {
        background: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }
    
    .captcha-input:focus {
        background: #4b5563;
        border-color: #60a5fa;
    }
    
    .captcha-help {
        color: #9ca3af;
    }
}
