/* Modern Split-Screen Login Design - CRM Professional Style */

.login-container {
    min-height: 100vh;
    overflow: hidden;
}

.login-container .row {
    min-height: 100vh;
    margin: 0;
}

.login-container .row.h-100 {
    height: 100vh;
}

/* Left Side - Login Form (4 columns) */
.login-form-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    padding: 2rem;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.login-form-wrapper {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.login-form-section .login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-form-section .login-header img {
    max-height: 50px;
    margin-bottom: 1rem;
}

.login-form-section .login-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.login-form-section .login-header p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Login Title */
.login-form-section h3.text-capitalize {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    text-align: left;
    width: 100%;
}

/* Right Side - Image Section with Slider (8 columns) */
.login-image-section {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    display: flex;
    min-height: 100vh;
}

.login-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.login-image-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 1.2s, transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #667eea;
    pointer-events: none;
    z-index: 0;
    transform: scale(1.05);
}

.login-image-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    pointer-events: auto;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s, transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

/* If no background image, show gradient */
.login-image-slide:not([style*="background-image"]) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Background image layer */
.login-image-slide[style*="background-image"] {
    background-color: transparent;
}

.login-image-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 1.2s ease;
}

.login-image-slide.active::before {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.login-image-slide .image-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 5rem;
    color: white;
    text-align: left;
    max-width: 600px;
}

.login-image-slide .image-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: #ffffff;
}

.login-image-slide .image-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    opacity: 0.95;
    max-width: 520px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    animation: slideInRight 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.login-image-slide.active .image-content h2,
.login-image-slide.active .image-content p {
    animation-play-state: running;
}

/* Slider Navigation Dots */
.login-slider-dots {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.login-slider-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.login-slider-dot:hover::before {
    width: 20px;
    height: 20px;
}

.login-slider-dot.active {
    background: #ffffff;
    border-color: #ffffff;
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.login-slider-dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.15);
}

/* Slider Navigation Arrows */
.login-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.25rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.login-slider-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.login-slider-arrow:hover::before {
    width: 100%;
    height: 100%;
}

.login-slider-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.login-slider-arrow:active {
    transform: translateY(-50%) scale(1.05);
}

.login-slider-arrow.prev {
    left: 2rem;
    padding-right: 2px;
}

.login-slider-arrow.next {
    right: 2rem;
    padding-left: 2px;
}

.login-slider-arrow i {
    transition: transform 0.3s ease;
}

.login-slider-arrow:hover i {
    transform: scale(1.2);
}

/* Animations for content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* Progress indicator for active dot */
.login-slider-dot.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    animation: pulse 2s infinite;
}

/* Slide Counter */
.login-slider-counter {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Progress Bar */
.login-slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 10;
    width: 0%;
    transition: width 0.3s ease;
}

.login-slider-progress.active {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Legacy support for single image */
.login-image-section .image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Form Styles */
.login-form-section .form-group {
    margin-bottom: 1.5rem;
}

.login-form-section .form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.login-form-section .form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #1f2937;
}

.login-form-section .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-form-section .form-control:hover:not(:focus) {
    border-color: #d1d5db;
}

.login-form-section .form-control::placeholder {
    color: #9ca3af;
}

/* Input Group with Toggle */
.login-form-section .input-group {
    position: relative;
}

.login-form-section .input-group .form-control {
    padding-right: 50px;
}

.login-form-section .input-group .toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10;
}

.login-form-section .input-group .toggle-password:hover {
    color: #667eea;
}

/* Social Login Buttons */
.login-form-section .social-login {
    margin-bottom: 1.5rem;
}

.login-form-section .social-login a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
    background: #ffffff;
}

.login-form-section .social-login a:hover {
    border-color: #667eea;
    background: #f9fafb;
    transform: translateY(-1px);
}

.login-form-section .social-login a img {
    width: 20px;
    height: 20px;
}

.login-form-section .divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.875rem;
}

.login-form-section .divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.login-form-section .divider span {
    position: relative;
    background: #ffffff;
    padding: 0 1rem;
}

/* Primary Button */
.login-form-section .btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-form-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.login-form-section .btn-primary:active {
    transform: translateY(0);
}

.login-form-section .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button */
.login-form-section .btn-secondary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #ffffff;
    color: #667eea;
    border: 1.5px solid #667eea;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.login-form-section .btn-secondary:hover {
    background: #667eea;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Links */
.login-form-section .forgot_pswd {
    text-align: right;
    margin-bottom: 1rem;
}

.login-form-section .forgot_pswd a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-form-section .forgot_pswd a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Checkbox */
.login-form-section .form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: #667eea;
}

.login-form-section .form-group label.cursor-pointer {
    display: flex;
    align-items: center;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
}

/* Error Messages */
.login-form-section .invalid-feedback {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.login-form-section .form-control.is-invalid {
    border-color: #ef4444;
}

.login-form-section .alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.login-form-section .alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Language Switcher */
.login-form-section .language-switcher {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.login-form-section .language-switcher a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0.5rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.login-form-section .language-switcher a:hover {
    color: #667eea;
}

/* Responsive Design */
@media (min-width: 768px) {
    .login-form-section {
        padding: 3rem;
    }
}

@media (max-width: 767px) {
    .login-form-section {
        min-height: auto;
        padding: 1.5rem;
    }
    
    .login-image-section {
        display: none;
        min-height: auto;
    }
    
    .login-container .row {
        min-height: auto;
    }
    
    .login-slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .login-slider-arrow.prev {
        left: 1rem;
    }
    
    .login-slider-arrow.next {
        right: 1rem;
    }
    
    .login-image-slide .image-content {
        padding: 2rem;
    }
    
    .login-image-slide .image-content h2 {
        font-size: 2rem;
    }
    
    .login-image-slide .image-content p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .login-form-section {
        padding: 1rem;
    }
    
    .login-form-wrapper {
        max-width: 100%;
    }
    
    .login-form-section .login-header h3 {
        font-size: 1.25rem;
    }
}

/* Dark Theme Support */
.dark-theme .login-form-section {
    background: #1f2937;
}

.dark-theme .login-form-section .login-header h3 {
    color: #f9fafb;
}

.dark-theme .login-form-section .form-group label {
    color: #e5e7eb;
}

.dark-theme .login-form-section .form-control {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark-theme .login-form-section .form-control:focus {
    border-color: #667eea;
    background: #374151;
}

.dark-theme .login-form-section .form-control::placeholder {
    color: #9ca3af;
}

.dark-theme .login-form-section .social-login a {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark-theme .login-form-section .social-login a:hover {
    background: #4b5563;
}

.dark-theme .login-form-section .divider {
    color: #9ca3af;
}

.dark-theme .login-form-section .divider::before {
    background: #4b5563;
}

.dark-theme .login-form-section .divider span {
    background: #1f2937;
}

.dark-theme .login-form-section .form-group label.cursor-pointer {
    color: #e5e7eb;
}

.dark-theme .login-form-section .language-switcher {
    border-top-color: #4b5563;
}

.dark-theme .login-form-section .language-switcher a {
    color: #9ca3af;
}

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

.login-form-wrapper {
    animation: fadeIn 0.5s ease-out;
}

/* Loading State */
.login-form-section .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Compatibility with existing classes */
.login-form-section .height-50 {
    height: 50px;
}

.login-form-section .f-w-500 {
    font-weight: 500;
}

.login-form-section .f-15 {
    font-size: 0.9375rem;
}

.login-form-section .f-18 {
    font-size: 1.125rem;
}

.login-form-section .light_text {
    color: #374151;
}

.dark-theme .login-form-section .light_text {
    color: #e5e7eb;
}

/* ReCAPTCHA Container */
.login-form-section #captcha_container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

/* Ensure proper spacing for form sections */
.login-form-section #password-section {
    margin-top: 0;
}

/* Fix for input group append button */
.login-form-section .input-group-append {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    z-index: 10;
}

.login-form-section .input-group-append .btn {
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 1rem;
}


.no-padding {
    padding: 0 !important;
}