/* Layout Styles */
.authentication-inner {
    max-width: 900px;
    margin: auto;
}

.auth-card {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* App Brand */
.app-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.app-brand img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.app-brand-text {
    text-align: center;
    font-weight: 600;
    color: var(--bs-primary);
    line-height: 1.3;
    font-size: 1.1rem;
}

.app-brand-text small {
    font-weight: 400;
    color: var(--bs-body-color);
    font-size: 0.9rem;
}

/* Form Column */
.form-column {
    padding: 2rem;
}

/* Image Column */
.image-column {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.image-column img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

/* Password Toggle */
.password-toggle-btn {
    cursor: pointer;
    background: transparent;
    padding: 0.5rem 0.75rem;
}

.password-toggle-btn:hover {
    color: var(--bs-primary);
}

/* Language Switcher - Desktop */
.lang-switcher-desktop {
    position: absolute;
    top: 20px;
    z-index: 1050;
}

[dir="ltr"] .lang-switcher-desktop {
    right: 30px;
}

[dir="rtl"] .lang-switcher-desktop {
    left: 30px;
}

.lang-switcher-mobile {
    display: none;
}

/* Dropdown Improvements */
.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.flag-icon {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

/* Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    /* Maintain button height */
}

.btn-loading .btn-text {
    display: none;
    /* Completely hide text */
}

.btn-loading .btn-spinner {
    margin: 0;
    /* Remove any margins */
}

/* Footer */
.auth-footer {
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lang-switcher-desktop {
        display: none !important;
    }

    .lang-switcher-mobile {
        display: block !important;
        margin-bottom: 1.5rem;
    }

    .form-column {
        padding: 1.5rem;
    }

    .auth-card {
        min-height: auto;
    }

    .app-brand img {
        width: 50px;
        height: 50px;
    }

    .app-brand-text {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .form-column {
        padding: 1rem;
    }

    .authentication-inner {
        padding: 0;
    }

    .auth-footer {
        margin-top: 0.70rem;
    }

    .image-column {
        display: none !important;
    }
}

/* RTL/LTR Column Ordering */
@media (min-width: 769px) {
    [dir="rtl"] .form-column {
        order: 2;
    }

    [dir="rtl"] .image-column {
        order: 1;
    }

    [dir="ltr"] .form-column {
        order: 1;
    }

    [dir="ltr"] .image-column {
        order: 2;
    }
}

/* Accessibility */
.form-control:focus,
.btn:focus,
.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Form Validation */
.is-invalid {
    border-color: #dc3545 !important;
}

.alert {
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

.app-brand-link {
    gap: inherit;
}

/* Password Strength Indicator */
#password-strength {
    display: none;
}

#password-strength.show {
    display: block;
}

.password-strength-meter {
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.password-strength-weak .password-strength-bar {
    background-color: #dc3545;
    width: 25%;
}

.password-strength-fair .password-strength-bar {
    background-color: #fd7e14;
    width: 50%;
}

.password-strength-good .password-strength-bar {
    background-color: #ffc107;
    width: 75%;
}

.password-strength-strong .password-strength-bar {
    background-color: #28a745;
    width: 100%;
}

.password-strength-text {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

#password-strength.password-strength-weak .password-strength-text {
    color: #dc3545;
}

#password-strength.password-strength-fair .password-strength-text {
    color: #fd7e14;
}

#password-strength.password-strength-good .password-strength-text {
    color: #ffc107;
}

#password-strength.password-strength-strong .password-strength-text {
    color: #28a745;
}

.password-requirements {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.requirement i {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.requirement.met i {
    color: #28a745;
}

.requirement.met i:before {
    content: "\ea5a";
    /* bx-check */
}

.requirement:not(.met) i {
    color: #6c757d;
}

.requirement:not(.met) i:before {
    content: "\ea5b";
    /* bx-x */
}