/* Authentication System Styles */

@font-face {
    font-family: 'Kook';
    src: url('../fonts/Kook.woff') format('woff');
    font-style: normal;
    font-display: swap;
}
*{
    font-family: "Kook" !important;
        font-feature-settings: "lnum" 0, "ss01" !important;
}

html {
    text-align: right;
}

:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Dark theme variables */
[data-theme="dark"] {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --light-color: #212529;
    --white: #2d3748;
    --dark-color: #f8f9fa;
    --border-color: #495057;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 30%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.theme-toggle button {
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.theme-toggle button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .auth-card {
    background: rgba(45, 55, 72, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
}

/* Auth Form */
.auth-form {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.logo i {
    font-size: 2rem;
    color: white;
}

.auth-header h2 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.auth-header p {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
}

.input-wrapper .form-control {
    padding-right: 45px;
    padding-left: 45px;
    height: 50px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

.input-wrapper .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background: var(--white);
}

.input-wrapper .input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.password-toggle,
.forgot-password-toggle {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.password-toggle:hover,
.forgot-password-toggle:hover {
    color: var(--primary-color);
}

/* Role Selection */
.role-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.role-option {
    position: relative;
}

.role-option input[type="radio"] {
    display: none;
}

.role-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
    text-align: center;
    min-height: 100px;
    justify-content: center;
}

.role-option label:hover {
    border-color: var(--primary-color);
    background: rgba(0, 123, 255, 0.05);
}

.role-option input[type="radio"]:checked + label {
    border-color: var(--primary-color);
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
}

.role-option label i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.role-option label span {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Buttons */
.auth-btn {
    height: 50px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Back to Role Button */
.back-to-role-btn {
    margin-bottom: 20px;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* OTP Input */
.otp-input-group {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: var(--transition);
}

/* Hide number input spinners for OTP inputs */
.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.otp-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.otp-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.otp-timer {
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.otp-timer #resendOtp {
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.otp-timer #resendOtp:hover {
    background: linear-gradient(45deg, #0056b3, #117a8b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.otp-timer #resendOtp:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.otp-timer #resendOtp i {
    font-size: 1rem;
}

.otp-timer-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.otp-timer-text i {
    color: var(--info-color);
}

/* Success Animation */
.success-animation {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: successPulse 1s ease-in-out;
}

.success-icon i {
    font-size: 3rem;
    color: white;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-animation h2 {
    color: var(--success-color);
    margin-bottom: 10px;
}

.success-animation p {
    color: var(--secondary-color);
    margin-bottom: 30px;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.auth-footer p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Invalid Feedback */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 0.875rem;
    color: var(--danger-color);
    line-height: 1.4;
}

/* Form group invalid state */
.form-group.is-invalid .invalid-feedback {
    display: block;
}

.form-group.is-invalid .role-selection,
.form-group.is-invalid .gender-segment,
.form-group.is-invalid .segment-control,
.is-invalid + .select2 .select2-selection {
    border: 2px solid var(--danger-color) !important;
    border-radius: 8px;
    padding: 4px;
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    height: 50px;
    border: 2px solid #e9ecef !important;
    border-radius: 10px;
    transition: var(--transition);
    background: var(--white);
    box-shadow: none !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px;
    padding-right: 15px;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
    left: 15px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--secondary-color) transparent transparent transparent;
    margin-top: -2px;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--secondary-color) transparent;
    margin-top: -7px;
}

.select2-dropdown {
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
    background: var(--white);
}

.select2-container--default .select2-results__option {
    padding: 12px 15px;
    font-size: 0.95rem;
    color: var(--dark-color);
    transition: var(--transition);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--primary-color);
    color: white;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Loading States for Select Fields */
.form-group.loading {
    position: relative;
}

.form-group.loading::after {
    content: '';
    position: absolute;
    top: 70%;
    right: 50%;
    transform: translate(50%, -50%);
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

.form-group.loading .select2-container {
    opacity: 0.6;
    pointer-events: none;
}

@keyframes spin {
    0% { transform: translate(50%, -50%) rotate(0deg); }
    100% { transform: translate(50%, -50%) rotate(360deg); }
}

/* Dark theme Select2 */
[data-theme="dark"] .select2-container--default .select2-selection--single {
    background: var(--white);
    border-color: var(--border-color);
}

[data-theme="dark"] .select2-dropdown {
    background: var(--white);
    border-color: var(--primary-color);
}

[data-theme="dark"] .select2-container--default .select2-results__option {
    color: var(--dark-color);
}

[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
    background: var(--white);
    color: var(--dark-color);
    border-color: var(--border-color);
}

/* Required field asterisk styling */
label .required-asterisk,
label:has-text("*") {
    color: var(--danger-color);
}

/* Make asterisks red */
.form-group label::after {
    content: "";
}

.form-group label[for] {
    position: relative;
}

/* Target labels that end with asterisk */
.form-group label:contains("*") {
    color: var(--dark-color);
}

/* Style for required asterisks */
.required-asterisk {
    color: var(--danger-color) !important;
    font-weight: bold;
}

.gender-segment {
    position: relative;
    display: inline-block;
    display: flex;
    background: #e9ecef;
    border-radius: 8px;
    padding: 4px;
}

.gender-radio {
    display: none;
}

.gender-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.gender-radio:checked + .gender-option {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    transition: var(--transition);
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: var(--transition);
    border-radius: 2px;
}

.password-strength.weak .password-strength-bar {
    width: 25%;
    background-color: var(--danger-color);
}

.password-strength.fair .password-strength-bar {
    width: 50%;
    background-color: var(--warning-color);
}

.password-strength.good .password-strength-bar {
    width: 75%;
    background-color: var(--info-color);
}

.password-strength.strong .password-strength-bar {
    width: 100%;
    background-color: var(--success-color);
}

.password-strength-text {
    font-size: 0.8rem;
    margin-top: 4px;
    font-weight: 500;
}

.password-strength.weak .password-strength-text {
    color: var(--danger-color);
}

.password-strength.fair .password-strength-text {
    color: var(--warning-color);
}

.password-strength.good .password-strength-text {
    color: var(--info-color);
}

.password-strength.strong .password-strength-text {
    color: var(--success-color);
}


.segment-control {
    position: relative;
    display: inline-block;
    display: flex;
    background: #e9ecef;
    border-radius: 8px;
    padding: 4px;
}

.segment-radio {
    display: none;
}

.segment-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.segment-radio:checked + .segment-option {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        /* padding: 30px 20px;
        margin: 10px; */
    }
    
    .role-selection {
        grid-template-columns: 1fr;
    }
    
    .otp-input-group {
        gap: 8px;
    }
    
    .otp-input {
        width: 45px;
        height: 45px;
    }
    
    .theme-toggle {
        top: 15px;
        left: 15px;
    }
    
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 15px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
}

/* Loading States */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

.loading .btn-text {
    opacity: 0;
}

.loading .btn-loader {
    display: block !important;
}

/* Form Validation States */
.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid {
    border-color: var(--success-color);
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

/* SweetAlert2 RTL Support */
.rtl-popup {
    direction: rtl !important;
    text-align: right !important;
}

.rtl-popup .swal2-title,
.rtl-popup .swal2-content {
    text-align: right !important;
}

.rtl-popup .swal2-actions {
    flex-direction: row-reverse !important;
}

.select2-container input {
    text-align: right !important;
    direction: rtl;
}

#itaUsername {
    padding-right: 15px;
    direction: ltr;
}

#itaUsername + i {
    left: 15px;
    right: auto;
}

#shadUsername {
    padding-right: 15px;
    direction: ltr;
}

#shadUsername + i {
    left: 15px;
    right: auto;
}

/* Loading state for role fields */
#roleSpecificFields .spinner-border {
    width: 2rem;
    height: 2rem;
}

#roleSpecificFields .text-center p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0;
}

/* Prevent text selection during loading */
.loading-fields {
    user-select: none;
    pointer-events: none;
}

/* Role loading animation */
.role-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.role-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 20px;
    border-width: 0.3em;
}

.role-loading h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.role-loading p {
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin: 0;
}

/* Loading dots animation */
.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Enhanced Role Loading Animation */
.role-loading-enhanced {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    min-height: 300px;
}

.loading-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.loading-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    margin: 0 8px;
    animation: loadingBounce 1.4s ease-in-out infinite both;
}

.loading-circle:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-circle:nth-child(2) {
    animation-delay: -0.16s;
}

.loading-circle:nth-child(3) {
    animation-delay: 0s;
}

@keyframes loadingBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.loading-content {
    width: 100%;
    max-width: 400px;
}

.loading-title {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 12px;
    animation: fadeInUp 0.6s ease-out;
}

.loading-subtitle {
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.loading-progress {
    width: 100%;
    height: 4px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 2px;
    width: 0%;
    transition: width 3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar.animate {
    width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark theme support for enhanced loading */
[data-theme="dark"] .loading-title {
    color: var(--primary-color);
}

[data-theme="dark"] .loading-subtitle {
    color: var(--secondary-color);
}

[data-theme="dark"] .loading-progress {
    background: rgba(13, 110, 253, 0.15);
}

/* Responsive design for loading animation */
@media (max-width: 768px) {
    .role-loading-enhanced {
        padding: 40px 15px;
        min-height: 250px;
    }
    
    .loading-title {
        font-size: 1.2rem;
    }
    
    .loading-subtitle {
        font-size: 0.9rem;
    }
    
    .loading-circle {
        width: 16px;
        height: 16px;
        margin: 0 6px;
    }
}

[data-theme="dark"] input, [data-theme="dark"] ::before, [data-theme="dark"] .password-strength-text, [data-theme="dark"]  textarea  {
    color: #fff !important;
}

[data-theme="dark"] .gender-segment, [data-theme="dark"]  .segment-control, [data-theme="dark"]  textarea {
    background: #5e6a7e !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered, .select2-container--default .select2-results__option {
    direction: rtl !important;
}

input#registerPassword, input#confirmPassword, input#loginPassword {
    direction: ltr;
}

#swal2-title {
    text-align: center !important;
}

#phone, #nationalId, #personnelNumber, #postalCode {
    padding-left: 10px;
    letter-spacing: 5px;
    direction: ltr;
}

/* Forgot Password Styles */
#forgotPasswordMobile {
    padding-left: 10px;
    letter-spacing: 3px;
    direction: ltr;
}

.otp-input-forgot {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: var(--transition);
    direction: ltr;
}

/* Hide number input spinners for forgot password OTP inputs */
.otp-input-forgot::-webkit-outer-spin-button,
.otp-input-forgot::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.otp-input-forgot[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.otp-input-forgot:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

#newPassword, #confirmNewPassword {
    direction: ltr;
}

/* Resend OTP button for forgot password */
#resendForgotPasswordOtp {
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#resendForgotPasswordOtp:hover {
    background: linear-gradient(45deg, #0056b3, #117a8b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

#resendForgotPasswordOtp:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#resendForgotPasswordOtp i {
    font-size: 1rem;
}

/* Auth Footer for forgot password - multiple links */
.auth-footer p:last-child {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

/* Password Strength Indicator for Forgot Password */
.password-strength-indicator {
    margin-top: 8px;
}

.strength-bars {
    display: flex;
    gap: 6px;
    height: 6px;
    margin-bottom: 8px;
}

.strength-bar {
    flex: 1;
    background-color: #e9ecef;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.strength-bar.weak {
    background-color: #dc3545;
}

.strength-bar.medium {
    background-color: #ffc107;
}

.strength-bar.strong {
    background-color: #28a745;
}

.strength-bar.very-strong {
    background-color: #007bff;
}

#passwordStrengthText {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

#passwordStrengthText:empty {
    display: none;
}

/* Dark theme support for password strength */
[data-theme="dark"] .strength-bar {
    background-color: #495057;
}

[data-theme="dark"] .strength-bar.weak {
    background-color: #e74c3c;
}

[data-theme="dark"] .strength-bar.medium {
    background-color: #f39c12;
}

[data-theme="dark"] .strength-bar.strong {
    background-color: #2ecc71;
}

[data-theme="dark"] .strength-bar.very-strong {
    background-color: #3498db;
}

/* Responsive adjustments for forgot password OTP inputs */
@media (max-width: 768px) {
    .otp-input-forgot {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .otp-input-forgot {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .strength-bars {
        gap: 4px;
        height: 5px;
    }

    #passwordStrengthText {
        font-size: 0.8rem;
    }
}