﻿body {
    background: #f8f9fa;
    min-height: 100vh;
}

.page-header {
    display: none;
}
.auth-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    padding: 20px;
}
.auth-content {
    position: relative;
    width: 100%;
    padding: 30px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
/*    flex: 1;*/
    overflow: hidden;
}
.auth-bg {
    position: absolute;
    inset: 0;
    background: url('/images/bg/bg-pattern.svg') center / cover no-repeat;
    z-index: 0;
}

    .auth-bg::after {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.97);
    }

.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.language-selector {
    position: absolute;
    top: 10px;
    left: 20px;
    right:auto;
    z-index: 100;
}
    .language-selector:dir(rtl) {
        right: 20px;
        left: auto;
    }

    .language-btn {
        background: transparent;
        border: none;
        /*    border-radius: 3.2px;*/
        padding: 8px 12px;
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        font-size: 14px;
        color: #132744;
        transition: all 0.3s ease;
        /*    min-width: 120px;*/
    }

    .language-btn:hover {
        border-color: #91111C;
        box-shadow: 0 2px 8px rgba(145, 17, 28, 0.1);
    }

    .language-btn i {
        color: #91111C;
        font-size: 16px;
    }

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right:auto;
    margin-top: 4px;
    background: white;
    border: 1.5px solid #D4D7E3;
    border-radius: 3.2px;
    min-width: 150px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
}
    .language-dropdown:dir(rtl) {
        right: 0;
        left: auto;
    }
    .language-dropdown.show {
        display: block;
    }

.language-option {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #132744;
    text-decoration:none;
}

    .language-option:hover {
        background: #F7FBFF;
    }

    .language-option.active {
        background: #F7FBFF;
        color: #91111C;
        font-weight: 500;
    }

    .language-option i {
        width: 16px;
        text-align: center;
    }

/* Close dropdown when clicking outside */
.language-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

    .language-overlay.show {
        display: block;
    }
.title-section {
    margin-bottom: 16px;
    text-align: center;
}

    .title-section h1 {
        font-size: 24px;
        color: #132744;
        margin-bottom: 8px;
        font-weight: 700;
        line-height: 1.3;
    }

    .title-section p {
        color: #6c757d;
        font-size: 14px;
        line-height: 1.5;
    }
.logo {
    text-align: center;
    margin-bottom: 8px;
}

    .logo img {
        width: 100px;
        height: 80px;
    }
/* Form Styles */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 8px;
}

.form-label {
    display: block;
    color: #132744;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 13px;
}

.input-group {
    position: relative;
    width: 100%;
}

.iti {
    width: 100%;
}

.iti__country-list {
    z-index: 9999;
}

.iti--separate-dial-code .iti__selected-flag {
    background-color: #F7FBFF;
}

.form-input,
.form-select {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1.5px solid #D4D7E3;
    border-radius: 3.2px;
    font-size: 15px;
    color: #132744;
    background: #F7FBFF;
    transition: all 0.3s ease;
}

    .form-input:focus,
    .form-select:focus {
        outline: none;
        border-color: #91111C;
        box-shadow: 0 0 0 3px rgba(145, 17, 28, 0.1);
    }

.input-hint {
    color: #6c757d;
    font-size: 11px;
    margin-top: 4px;
    display: block;
}
/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}
.password-toggle:dir(rtl) {
   
    left: 16px;
    right: auto;
  
}
/* Forgot Password Link */
.forgot-password {
    text-align: right;
    margin:0px 0 8px;
}

    .forgot-password a {
        color: #91111C;
        text-decoration: none;
        font-size: 13px;
        font-weight: 500;
        transition: color 0.2s ease;
    }

        .forgot-password a:hover {
            text-decoration: underline;
            color: #6c0f16;
        }
/* Terms Checkbox */
.terms-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.checkbox-container {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

    .checkbox-container input {
        opacity: 0;
        position: absolute;
        width: 100%;
        height: 100%;
        cursor: pointer;
        z-index: 2;
    }

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #D4D7E3;
    border-radius: 4px;
    background: white;
    transition: all 0.3s ease;
}

.checkbox-container input:checked ~ .checkmark {
    background: #91111C;
    border-color: #91111C;
}

    .checkbox-container input:checked ~ .checkmark:after {
        content: '';
        position: absolute;
        left: 3px;
        top: 1px;
        width: 6px;
        height: 10px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }

.terms-text {
    color: #132744;
    font-size: 12px;
    line-height: 1.5;
    flex: 1;
}

    .terms-text a {
        color: #91111C;
        text-decoration: none;
        font-weight: 500;
    }

        .terms-text a:hover {
            text-decoration: underline;
        }
.footer {
    text-align: center;
    margin-top: 16px;
    color: #6c757d;
    font-size: 11px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}
.validation-error {
    color: #dc3545;
    font-size: 11px;
    margin-top: 4px;
    display: none;
}

.form-input.error,
.form-select.error {
    border-color: #dc3545;
}

.validation-error.show {
    display: block;
}
/* Error Message Styles */
.error-message {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
    line-height: 1.5;
}

    .error-message.show {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }

.error-icon {
    color: #dc2626;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.error-text {
    flex: 1;
}
/* Buttons */
.submit-btn {
    width: 100%;
    height: 50px;
    background: #132744;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    margin: 16px 0 8px;
}

    .submit-btn:hover {
        background: #0d1c36;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(19, 39, 68, 0.2);
    }

    .submit-btn:disabled {
        background: #e9ecef;
        color: #6c757d;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }
.signin-link {
    text-align: center;
    margin-top: 16px;
    color: #132744;
    font-size: 14px;
}

    .signin-link a {
        color: #91111C;
        text-decoration: none;
        font-weight: 600;
    }

        .signin-link a:hover {
            text-decoration: underline;
        }
/* Sign Up Link */
.signup-link {
    text-align: center;
    margin-top: 24px;
/*    padding-top: 20px;*/
    /* border-top: 1px solid #e9ecef; */
    color: #132744;
    font-size: 14px;
}

    .signup-link a {
        color: #91111C;
        text-decoration: none;
        font-weight: 600;
        margin-left: 4px;
    }

        .signup-link a:hover {
            text-decoration: underline;
        }

.step {
    display: none;
    width: 100%;
}

    .step.active {
        display: block;
    }

.otp-container {
    display: flex;
    gap: 6px;
    margin: 24px 0;
    justify-content: center;
    direction:ltr;
}

.otp-input {
    width: 40px;
    height: 40px;
    text-align: center;
    font-size: 18px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #132744;
    transition: all 0.3s ease;
}

    .otp-input:focus {
        border-color: #91111C;
        outline: none;
        box-shadow: 0 0 0 3px rgba(145, 17, 28, 0.1);
    }

.otp-dash {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    color: #6c757d;
    font-size: 18px;
    font-weight: bold;
}

.phone-number-display {
    text-align: center;
    color: #132744;
    font-size: 15px;
    font-weight: 500;
    margin: 12px 0 24px;
    line-height: 1.4;
}

    .phone-number-display span {
        color: #91111C;
        font-weight: 600;
        direction: ltr;
        unicode-bidi: embed;
    }

.resend-otp {
    text-align: center;
    margin: 16px 0;
    color: #6c757d;
    font-size: 13px;
}

    .resend-otp a {
        color: #91111C;
        text-decoration: none;
        font-weight: 500;
        cursor: pointer;
    }

        .resend-otp a.disabled {
            color: #6c757d;
            cursor: not-allowed;
            opacity: 0.7;
        }

.back-link {
    text-align: center;
    margin-top: 16px;
}

    .back-link a {
        color: #91111C;
        text-decoration: none;
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }


@media (min-width: 640px) {
    .auth-container {
        padding:0px;
    }
        .auth-wrapper {
        padding: 30px;
        max-width: 500px;
    }

    .otp-input {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .title-section h1 {
        font-size: 24px;
    }

    .title-section p {
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    .auth-container {
        flex-direction: row;
        padding: 0;
    }

    .auth-content {
        width: 50%;
        padding: 40px;
        min-height: 100vh;
    }

    .signup-image {
        width: 50%;
        min-height: 100vh;
        background-image: url('/images/account/signup.svg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        display: block;
        margin: 24px;
        border-radius: 12px;
    }
    .signin-image {
        width: 50%;
        min-height: 100vh;
        background-image: url('/images/account/signin.svg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        display: block;
        margin: 24px;
        border-radius: 12px;
    }
    .auth-wrapper {
        max-width: 450px;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .terms-text {
        font-size: 13px;
    }
    .language-selector {
        top: 30px;
        left: 30px;
    }
}

@media (min-width: 1024px) {
    .auth-wrapper {
        max-width: 500px;
    }

    .otp-input {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    .language-selector {
        top: 10px;
        left: 40px;
    }
}

.image-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 16px;
}

.image-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    position: relative;
}

.default-avatar {
    font-size: 48px;
    color: #6c757d;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-controls {
    display: flex;
    gap: 10px;
}

.upload-btn, .remove-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.upload-btn {
    background-color: #092E47;
    color: white;
}

    .upload-btn:hover {
        background-color: #092E47;
    }

.remove-btn {
    background-color: #dc3545;
    color: white;
}

    .remove-btn:hover {
        background-color: #c82333;
    }

/* Company Fields Styles */
.company-fields {
    background-color: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
/*    display: grid;*/
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

    .company-fields .form-group {
        margin-bottom: 12px;
    }

/*@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
    }

    .auth-wrapper {
        background: #1e1e1e;
    }

    .form-input,
    .form-select {
        background: #2d2d2d;
        border-color: #404040;
        color: #ffffff;
    }

        .form-input:focus,
        .form-select:focus {
            border-color: #91111C;
        }

    .terms-group {
        background: #2d2d2d;
    }

    .terms-text {
        color: #e0e0e0;
    }

    .title-section h1 {
        color: #ffffff;
    }

    .title-section p {
        color: #b0b0b0;
    }

    .form-label {
        color: #e0e0e0;
    }

    .input-hint {
        color: #b0b0b0;
    }
    .signup-link {
        color: #e0e0e0;
    }

    .error-message {
        background-color: #3c1a1a;
        border-color: #7f1d1d;
        color: #fca5a5;
    }*/
/* Dark mode for language selector */
/*.language-btn {
        background: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }

    .language-dropdown {
        background: #2d2d2d;
        border-color: #404040;
    }

    .language-option {
        color: #e0e0e0;
    }

        .language-option:hover {
            background: #3d3d3d;
        }

        .language-option.active {
            background: #3d3d3d;
            color: #91111C;
        }
}*/
/*modal*/
.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.92);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
    will-change: opacity, visibility;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

    .error-modal.show {
        opacity: 1;
        visibility: visible;
    }

.error-modal-content {
    position: relative;
    background: #ffffff;
    padding: 48px 40px 40px;
    border-radius: 12px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
    overflow: hidden;
}

.error-modal.show .error-modal-content {
    transform: translateY(0) scale(1);
}


.error-modal-icon-container {
    width: 86px;
    height: 86px;
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    position: relative;
    animation: iconFloat 3s ease-in-out infinite;
}

    .error-modal-icon-container::after {
        content: '';
        position: absolute;
        top: -6px;
        left: -6px;
        right: -6px;
        bottom: -6px;
        border-radius: 50%;
        background: linear-gradient(135deg, #FCA5A5, #F87171);
        z-index: -1;
        opacity: 0.15;
        filter: blur(12px);
    }

.error-modal-icon {
   font-size:40px;
    color: #DC2626;
    animation: iconPulse 2s ease-in-out infinite;
    will-change: transform;
}

.error-modal-text {
    font-size: 17px;
    color: #1F2937;
    margin-bottom: 32px;
    line-height: 1.6;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 0 8px;
}

.error-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #F3F4F6;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6B7280;
    will-change: transform, background-color;
}

    .error-modal-close:hover {
        background: #DC2626;
        color: white;
        transform: rotate(90deg) scale(1.1);
        box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
    }

    .error-modal-close:active {
        transform: rotate(90deg) scale(0.95);
    }


.error-modal-action {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    will-change: transform, box-shadow;
    position: relative;
    overflow: hidden;
}

    .error-modal-action::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.6s ease;
    }

    .error-modal-action:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }

        .error-modal-action:hover::before {
            left: 100%;
        }

    .error-modal-action:active {
        transform: translateY(0);
    }


@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}


@media (prefers-reduced-motion: reduce) {
    .error-modal,
    .error-modal-content,
    .error-modal-close,
    .error-modal-action,
    .error-modal-icon-container,
    .error-modal-icon {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

        .error-modal.show .error-modal-content {
            transform: none;
        }
}


@media (max-width: 480px) {
    .error-modal-content {
        padding: 40px 28px 32px;
        border-radius: 20px;
        max-width: 92%;
    }

    .error-modal-icon-container {
        width: 80px;
        height: 80px;
    }

    .error-modal-icon {
        width: 40px;
        height: 40px;
    }

    .error-modal-text {
        font-size: 16px;
    }
}



.alert-box {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .alert-box.success {
        background: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }

    .alert-box.error {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }

    .alert-box.info {
        background: #d1ecf1;
        color: #0c5460;
        border: 1px solid #bee5eb;
    }

    .alert-box.warning {
        background: #fff3cd;
        color: #856404;
        border: 1px solid #ffeaa7;
    }

    .alert-box i {
        font-size: 16px;
    }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
