/* Auth Page Layout */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    background: #fff;
}

/* Left Side - Branding */
.auth-left-side {
    background: radial-gradient(87.17% 61.1% at 76.6% 60.72%, #3478F6 0%, rgba(52, 120, 246, 0.23) 100%),
        radial-gradient(108.76% 113.48% at 85.5% 5.78%, #A8E063 0%, rgba(168, 224, 99, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 52px;
    position: relative;
}

.auth-branding {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-logo-top {
    margin-top: 0;
}

.website-logo {
    max-height: 50px;
}

.auth-message {
    display: flex;
    flex-direction: column;
    gap: 11.1px;
}

.auth-message .auth-message-title {
    font-family: "DM Sans", sans-serif !important;
    font-weight: 400;
    font-size: 13px;
    line-height: 100%;
    letter-spacing: 0.4px;
    vertical-align: middle;
    color: #181818;
    margin: 0;
}

.auth-message .auth-message-subtitle {
    font-family: "Manrope", sans-serif !important;
    font-weight: 700;
    font-size: 26px;
    line-height: 35.1px;
    letter-spacing: 0;
    vertical-align: middle;
    color: #181818;
    margin: 0;
    max-width: 340px;
}

/* Right Side - Form */
.auth-right-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: white;
}

.auth-form-container {
    width: 100%;
    max-width: 440px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.auth-logo-mobile {
    text-align: center;
}

.auth-logo-mobile img {
    max-height: 40px;
}

.auth-title {
    font-family: "Manrope", sans-serif !important;
    font-weight: 700;
    font-size: 26px;
    line-height: 100%;
    letter-spacing: 0;
    color: #181818;
    margin: 0
}

.auth-subtitle {
    font-family: "DM Sans", sans-serif !important;
    font-weight: 400;
    font-size: 14px;
    line-height: 21.1px;
    letter-spacing: 0;
    color: #555555;
    margin: 0;
}

.auth-right-side .oe_signup_form {
    margin: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-right-side .oe_login_form {
    margin: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-right-side .oe_reset_password_form {
    margin: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* User Type Tabs */
.user-type-tabs {
    display: flex;
    gap: 4px;
    background: #F4F4F5;
    padding: 4px;
    border-radius: 10px;
}

.user-type-tab {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-type-tab .user-type-tab-text {
    font-family: "DM Sans", sans-serif !important;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0;
    margin: 0;
}

.user-type-tab.active {
    color: #FFFFFF;
}

.user-type-tab:not(.active) {
    color: #888888;
}

.user-type-tab:first-child {
    border-radius: 7px;
}

.user-type-tab:last-child {
    border-radius: 7px;
}

.user-type-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Form Elements */
.form-label {
    font-family: "DM Sans", sans-serif !important;
    font-weight: 500;
    font-size: 13px;
    line-height: 100%;
    letter-spacing: 0;
    color: #181818;
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    padding: 13px 14px;
    transition: all 0.2s;
    background: white;
    font-family: "DM Sans", sans-serif !important;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0;
}

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

.form-control::placeholder {
    color: #999;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
    transition: top 0.3s ease;
}

/* Move password toggle right when there's an error */
.form-control.is-invalid~.password-toggle {
    right: 20px;
}

.password-toggle:hover {
    color: #333;
}

/* Buttons */
.signup-btn {
    padding: 12px 24px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    height: 48px;
}

.signup-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.signup-btn p {
    margin: 0;
    font-family: "DM Sans", sans-serif !important;
    font-weight: 500;
    font-size: 15px;
    line-height: 100%;
    letter-spacing: 0;
}

.signup-link {
    font-family: "DM Sans", sans-serif !important;
    font-weight: 400;
    font-size: 13px;
    line-height: 100%;
    letter-spacing: 0;
    color: #555555;
    margin: 0;
}

.signup-link a {
    font-weight: 500;
}

.auth-link-small {
    font-family: "DM Sans", sans-serif !important;
    font-weight: 400;
    font-size: 13px;
    line-height: 100%;
    letter-spacing: 0;
    color: var(--primary);
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-check-input {
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    font-family: "DM Sans", sans-serif !important;
    font-weight: 400;
    font-size: 13px;
    line-height: 20.15px;
    letter-spacing: 0;
    color: #555555;
}

.form-check-label a {
    font-weight: 600;
    color: var(--primary);
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Login link */
.text-center small {
    font-size: 13px;
    color: #666;
}

.text-center small a {
    color: var(--primary, #667eea);
    text-decoration: none;
    font-weight: 500;
}

.text-center small a:hover {
    text-decoration: underline;
}

/* Hide Odoo default elements */
/* Hide header/footer only on auth pages */
.auth-page-wrapper ~ .o_main_navbar,
.auth-page-wrapper ~ .o_footer,
body:has(.auth-page-wrapper) header,
body:has(.auth-page-wrapper) footer,
body:has(.auth-page-wrapper) .market_master_widget_container {
    display: none !important;
}

/* Responsive */
@media (max-width: 992px) {
    .auth-page-wrapper {
        flex-direction: column;
    }

    .auth-left-side {
        padding: 40px 30px;
        min-height: 300px;
        width: 100%;
    }

    .auth-message {
        margin-bottom: 0;
    }

    .auth-message h1 {
        font-size: 32px;
    }

    .auth-logo-mobile {
        display: block;
    }

    .auth-form-container {
        padding: 0;
    }
}

@media (max-width: 576px) {
    .auth-left-side {
        padding: 30px 20px;
    }

    .auth-right-side {
        padding: 30px 20px;
    }

    .auth-title {
        font-size: 24px;
    }
}

/* Form Validation Errors */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545 !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-check-input.is-invalid {
    border-color: #dc3545;
}

.form-check-input.is-invalid:checked {
    background-color: #dc3545;
}

.form-check-input.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.password-input-wrapper .form-control.is-invalid {
    padding-right: calc(2.5em + 0.75rem);
}

/* Password Requirements Tooltip */
.password-field-wrapper {
    position: relative;
}

.password-requirements {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    margin-top: 0;
}

.password-requirements.show {
    max-height: 200px;
    opacity: 1;
    margin-top: 8px;
}

.password-requirements ul {
    margin: 0;
    padding: 8px 12px;
    list-style: none;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.password-requirements li {
    font-family: "DM Sans", sans-serif !important;
    font-size: 12px;
    color: #666;
    margin: 4px 0;
    padding-left: 20px;
    position: relative;
    transition: color 0.2s;
}

.password-requirements li::before {
    content: '○';
    position: absolute;
    left: 0;
    color: #999;
    font-weight: 600;
}

.password-requirements li.valid {
    color: #28a745;
}

.password-requirements li.valid::before {
    content: '✓';
    color: #28a745;
}