/* ============================================
   Auth Pages: Login / Signup / Reset Password
   ============================================ */

body {
    background-color: #fff;
}

/* ----- Auth Header Bar (same gradient as portal topbar) ----- */
.auth-header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(
        90deg,
        #00343A 0%,
        #D1AA2B 100%
    );
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    padding: 0 2rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 250ms cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-header-inner {
    max-width: 1400px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.auth-logo-img {
    height: 50px;
    width: 80px;
    object-fit: cover;
    filter: brightness(0) invert(1);
}

.auth-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Reuse portal's sammail-action-icon-button style */
.auth-header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
}

.auth-header-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    text-decoration: none;
}

/* Icon styling — gold filter same as portal topbar */
.auth-header-btn .sammail-icon-language,
.auth-header-btn .sammail-icon-dark-mode {
    color: inherit;
    filter: brightness(0) saturate(100%) invert(79%) sepia(98%) saturate(1352%) hue-rotate(358deg) brightness(102%) contrast(85%) opacity(0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: filter 250ms cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
}

.auth-header-btn:hover .sammail-icon-language,
.auth-header-btn:hover .sammail-icon-dark-mode {
    filter: brightness(0) saturate(100%) invert(79%) sepia(98%) saturate(1352%) hue-rotate(358deg) brightness(102%) contrast(85%) opacity(1);
}

/* ----- OTP Verification Section ----- */
.otp-section .btn-outline-secondary {
    border-color: #D1AA2B;
    color: #D1AA2B;
    font-weight: 500;
    border-radius: 8px;
    padding: 8px 16px;
}

.otp-section .btn-outline-secondary:hover {
    background-color: #D1AA2B;
    color: #fff;
}

#otp-code {
    border-color: #D1AA2B !important;
    border-radius: 8px;
}

#otp-code:focus {
    box-shadow: 0 0 0 0.2rem rgba(209, 170, 43, 0.25);
}

#btn-verify-otp {
    background-color: #D1AA2B;
    border-color: #D1AA2B;
    color: #fff;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 500;
}

#btn-verify-otp:hover {
    background-color: #b8932a;
    border-color: #b8932a;
}

/* Dark mode OTP */
[data-theme="dark"] .otp-section .btn-outline-secondary {
    border-color: #B455FF;
    color: #B455FF;
}

[data-theme="dark"] .otp-section .btn-outline-secondary:hover {
    background-color: #B455FF;
    color: #fff;
}

[data-theme="dark"] #otp-code {
    border-color: #B455FF !important;
    background: #0f172a !important;
    color: #f8fafc !important;
}

[data-theme="dark"] #otp-code:focus {
    box-shadow: 0 0 0 0.2rem rgba(180, 85, 255, 0.25);
}

[data-theme="dark"] #btn-verify-otp {
    background-color: #B455FF;
    border-color: #B455FF;
}

[data-theme="dark"] #btn-verify-otp:hover {
    background-color: #9a3de6;
    border-color: #9a3de6;
}

/* ----- Push content below fixed header ----- */
.oe_website_login_container,
.oe_login_form,
.oe_signup_form,
.oe_reset_password_form {
    margin-top: 80px;
}

.oe_login_form,
.oe_signup_form,
.oe_reset_password_form {
    max-width: 550px !important;
    padding: 40px 50px !important;
}

/* ----- Original Auth Layout (preserved) ----- */
#auth-right {
    background: url(../../assets_homepage/img/4853433.png?45649b87e0b3f50bfa1372c6cdb4595f), linear-gradient(90deg, #2d499d00, #3f5491);
    background-repeat: no-repeat;
    height: 100%;
}

#auth #auth-left {
    padding: 5rem 8rem;
}

#auth #auth-left .auth-title {
    font-size: 4rem;
    margin-bottom: 1rem;
}

#auth #auth-left .auth-subtitle {
    color: #a8aebb;
    font-size: 1.7rem;
    line-height: 2.5rem;
}

#auth #auth-left .auth-logo {
    margin-bottom: 7rem;
}

#auth #auth-left .auth-logo img {
    height: auto;
}

@media screen and (max-width: 767px) {
    #auth #auth-left {
        padding: 5rem;
    }
}

@media screen and (max-width: 576px) {
    #auth #auth-left {
        padding: 5rem 3rem;
    }
}

body.theme-dark #auth-right {
    background: url(../../../assets/images/4853433.png?45649b87e0b3f50bfa1372c6cdb4595f), linear-gradient(90deg, #2d499d, #3f5491);
}

/* ----- Form Field Borders ----- */
.oe_signup_form .form-control,
.oe_login_form .form-control,
.oe_reset_password_form .form-control {
    border: 1.5px solid #D1AA2B !important;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    background: #ffffff;
    color: #333;
    transition: border-color 250ms ease, box-shadow 250ms ease;
    height: auto;
    min-height: 44px;
}

.oe_signup_form .form-control:focus,
.oe_login_form .form-control:focus,
.oe_reset_password_form .form-control:focus {
    border-color: #00343A !important;
    box-shadow: 0 0 0 3px rgba(2, 104, 116, 0.15);
    outline: none;
}

.oe_signup_form .form-control::placeholder,
.oe_login_form .form-control::placeholder,
.oe_reset_password_form .form-control::placeholder {
    color: #aaa;
}

/* ----- Select / Dropdown borders ----- */
.oe_signup_form select.form-control,
.oe_login_form select.form-control,
.oe_reset_password_form select.form-control {
    border: 1.5px solid #D1AA2B !important;
    appearance: auto;
}

/* ----- Input Group (email suffix) borders ----- */
.oe_signup_form .input-group .form-control,
.oe_signup_form .input-group .input-group-text {
    border: 1.5px solid #D1AA2B !important;
}

.oe_signup_form .input-group .input-group-text {
    background: #f9f5eb;
    color: #5a4e34;
    font-weight: 500;
}

/* ----- Submit Button (gold accent in light mode) ----- */
.oe_login_form .oe_login_buttons .btn-primary,
.oe_signup_form .oe_login_buttons .btn-primary,
.oe_reset_password_form .oe_login_buttons .btn-primary {
    background-color: #D1AA2B !important;
    border-color: #D1AA2B !important;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    color: #fff !important;
}

.oe_login_form .oe_login_buttons .btn-primary:hover,
.oe_signup_form .oe_login_buttons .btn-primary:hover,
.oe_reset_password_form .oe_login_buttons .btn-primary:hover {
    background-color: #b8932a !important;
    border-color: #b8932a !important;
}

/* ----- Account links (Already have / Don't have) ----- */
.signup-text {
    text-align: center;
    padding: 10px 0;
    margin-top: 15px;
}

.signup-text p {
    margin: 0;
    color: #667085;
    font-size: 14px;
}

.signup-text a {
    color: #D1AA2B;
    font-weight: 600;
    text-decoration: none;
}

.signup-text a:hover {
    color: #b8932a;
    text-decoration: underline;
}

.oe_login_buttons a {
    color: #D1AA2B;
    text-align: center;
    display: block;
    margin-top: 10px;
    font-size: 14px;
}


/* =============================================
   DARK MODE (same data-theme approach as portal)
   ============================================= */

/* Dark mode header gradient (same as portal dark topbar) */
[data-theme="dark"] .auth-header-bar {
    background: linear-gradient(
        90deg,
        #00343A 0%,
        #B455FF 100%
    );
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Dark Mode - Topbar Icons — same as portal */
[data-theme="dark"] .auth-header-btn {
    color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .auth-header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
}

[data-theme="dark"] .auth-header-btn .sammail-icon-language,
[data-theme="dark"] .auth-header-btn .sammail-icon-dark-mode {
    color: inherit;
    /* Dark mode: Purple tint (#B455FF) to match topbar gradient end */
    filter: brightness(0) saturate(100%) invert(58%) sepia(100%) saturate(2000%) hue-rotate(260deg) brightness(110%) contrast(100%) opacity(0.95);
}

[data-theme="dark"] .auth-header-btn:hover .sammail-icon-language,
[data-theme="dark"] .auth-header-btn:hover .sammail-icon-dark-mode {
    /* Dark mode hover: Brighter purple */
    filter: brightness(0) saturate(100%) invert(58%) sepia(100%) saturate(2000%) hue-rotate(260deg) brightness(110%) contrast(100%) opacity(1);
}

/* Dark mode body */
[data-theme="dark"] body {
    background-color: #0f172a !important;
}

/* Dark mode form container */
[data-theme="dark"] .oe_login_form,
[data-theme="dark"] .oe_signup_form,
[data-theme="dark"] .oe_reset_password_form {
    background: transparent;
    color: #f8fafc;
}

[data-theme="dark"] .oe_login_form label,
[data-theme="dark"] .oe_signup_form label,
[data-theme="dark"] .oe_reset_password_form label,
[data-theme="dark"] .col-form-label {
    color: #f1f5f9 !important;
}

/* Dark mode fields */
[data-theme="dark"] .oe_signup_form .form-control,
[data-theme="dark"] .oe_login_form .form-control,
[data-theme="dark"] .oe_reset_password_form .form-control {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #f1f5f9;
}

[data-theme="dark"] .oe_signup_form .form-control:focus,
[data-theme="dark"] .oe_login_form .form-control:focus,
[data-theme="dark"] .oe_reset_password_form .form-control:focus {
    border-color: #B455FF !important;
    box-shadow: 0 0 0 3px rgba(180, 85, 255, 0.15);
}

[data-theme="dark"] .oe_signup_form .form-control::placeholder,
[data-theme="dark"] .oe_login_form .form-control::placeholder,
[data-theme="dark"] .oe_reset_password_form .form-control::placeholder {
    color: #64748b;
}

[data-theme="dark"] .oe_signup_form .input-group .input-group-text {
    background: #334155;
    border-color: #475569 !important;
    color: #cbd5e1;
}

/* Dark mode title */
[data-theme="dark"] .title-form-login {
    color: #f1f5f9;
}

[data-theme="dark"] .title-form-login:before {
    filter: brightness(0) invert(1);
}

/* Dark mode buttons (purple accent) */
[data-theme="dark"] .oe_login_form .oe_login_buttons .btn-primary,
[data-theme="dark"] .oe_signup_form .oe_login_buttons .btn-primary,
[data-theme="dark"] .oe_reset_password_form .oe_login_buttons .btn-primary {
    background-color: #B455FF !important;
    border-color: #B455FF !important;
}

[data-theme="dark"] .oe_login_form .oe_login_buttons .btn-primary:hover,
[data-theme="dark"] .oe_signup_form .oe_login_buttons .btn-primary:hover,
[data-theme="dark"] .oe_reset_password_form .oe_login_buttons .btn-primary:hover {
    background-color: #9a3de6 !important;
    border-color: #9a3de6 !important;
}

/* Dark mode links */
[data-theme="dark"] .oe_login_buttons a,
[data-theme="dark"] .form-group.field-password a,
[data-theme="dark"] .signup-text a {
    color: #B455FF;
}

[data-theme="dark"] .signup-text a:hover,
[data-theme="dark"] .oe_login_buttons a:hover {
    color: #c77dff;
}

/* Dark mode toggle icon */
[data-theme="dark"] .field-icon,
[data-theme="dark"] .toggle-password,
[data-theme="dark"] .toggle-confirm-password {
    color: #cbd5e1 !important;
}

/* Dark mode alerts */
[data-theme="dark"] .alert-danger {
    background: rgba(92, 10, 21, 0.3);
    border-color: rgba(92, 10, 21, 0.5);
    color: #fca5a5;
}

/* RTL support for header */
.o_rtl .auth-header-bar {
    background: linear-gradient(
        90deg,
        #D1AA2B 0%,
        #00343A 100%
    );
}

[data-theme="dark"] .o_rtl .auth-header-bar {
    background: linear-gradient(
        90deg,
        #B455FF 0%,
        #00343A 100%
    );
}

/* ----- Responsive ----- */
@media screen and (max-width: 576px) {
    .auth-header-bar {
        padding: 0 1rem;
        min-height: 50px;
    }

    .auth-logo-img {
        height: 32px;
    }

    .auth-header-btn {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }
}
