/*
 * Login page (ah_spiffy/views/login_templates.xml), in the look of the backend
 * theme (ah_spiffy top bar and home page): Rubik, teal primary colour,
 * light inputs, dark brand panel with the showroom picture.
 * Logical properties (inline-start/end) keep the layout right in Arabic.
 */
:root {
    --ahl-primary: #12808a;
    --ahl-primary-dark: #0e6a73;
    --ahl-primary-soft: rgba(18, 128, 138, 0.12);
    --ahl-text: #0f1d2e;
    --ahl-label: #233247;
    --ahl-muted: #6b7889;
    --ahl-border: #e6ebf1;
    --ahl-input-bg: #f7f9fc;
    --ahl-brand-1: #0a2a31;
    --ahl-brand-2: #0f4a50;
    --ahl-accent: #5fd0cf;
}

html, body.o_ahl_body {
    height: 100%;
}
body.o_ahl_body {
    margin: 0;
    background: #fff;
    color: var(--ahl-text);
    font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}
body.o_ahl_body #wrapwrap,
body.o_ahl_body #wrapwrap > main {
    min-height: 100%;
}

.o_ahl {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(460px, 1fr);
    min-height: 100vh;
}

/* Brand panel ---------------------------------------------------------- */
.o_ahl_brand {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 48px 64px 0;
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(95, 208, 207, 0.18) 0%, rgba(95, 208, 207, 0) 55%),
        linear-gradient(160deg, var(--ahl-brand-1) 0%, var(--ahl-brand-2) 70%, #12606a 100%);
    color: #fff;
}
.o_ahl_brand_logo {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    width: auto;
    height: 64px;
}
.o_ahl_brand_copy {
    position: relative;
    z-index: 1;
    margin-top: auto;
    margin-bottom: 36px;
    padding-top: 40px;
}
.o_ahl_eyebrow {
    margin-bottom: 18px;
    color: var(--ahl-accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.o_ahl[dir="rtl"] .o_ahl_eyebrow {
    letter-spacing: 0;
    font-size: 15px;
}
.o_ahl_tagline {
    margin: 0;
    color: #fff;
    font-size: 46px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.o_ahl_tagline span {
    color: var(--ahl-accent);
}
.o_ahl_rule {
    display: block;
    width: 64px;
    height: 4px;
    margin: 26px 0 22px;
    border-radius: 2px;
    background: var(--ahl-primary);
    box-shadow: 0 0 0 1px rgba(95, 208, 207, 0.25);
}
.o_ahl_brand_text {
    max-width: 480px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 16.5px;
    line-height: 1.6;
}
.o_ahl_features {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.o_ahl_features li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px 6px 6px;
    padding-inline: 6px 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}
.o_ahl_feature_icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(95, 208, 207, 0.16);
}
.o_ahl_feature_icon svg {
    width: 19px;
    height: 19px;
    fill: var(--ahl-accent);
}
/* Showroom picture, fading into the panel colour. */
.o_ahl_photo {
    position: relative;
    flex: 0 0 auto;
    height: clamp(220px, 34vh, 360px);
    margin: 0 -64px;
    background: url("/ah_spiffy/static/src/login/login_showroom.jpg") center 60% / cover no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 38%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 38%);
}
.o_ahl_photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 42, 49, 0.35), rgba(10, 42, 49, 0) 45%);
}

/* Sign-in side --------------------------------------------------------- */
.o_ahl_main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 88px 40px 24px;
    background: #fff;
}
.o_ahl_lang {
    position: absolute;
    top: 28px;
    inset-inline-end: 32px;
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--ahl-border);
    border-radius: 999px;
    background: var(--ahl-input-bg);
}
.o_ahl_lang a {
    padding: 6px 16px;
    border-radius: 999px;
    color: var(--ahl-muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.o_ahl_lang a:hover {
    color: var(--ahl-text);
}
.o_ahl_lang a.active {
    background: var(--ahl-primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(18, 128, 138, 0.3);
}

.card.o_database_list.o_ahl_card {
    width: 100%;
    max-width: 420px !important;
    max-height: none;
    /* in the page flow (Spiffy centres it with position: absolute, which cuts
       the top of the long forms - sign up - on small screens) */
    position: relative;
    /* all four sides: Odoo's RTL frontend bundle flips Spiffy's left offset to
       "right", which pushed the card off-screen on /ar/ pages */
    inset: auto;
    transform: none;
    overflow: visible;
    margin: auto 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    text-align: start;
}
.o_ahl_card > .card-body {
    padding: 0;
}
.o_ahl_footer {
    margin-top: 32px;
    color: #98a2b0;
    font-size: 13px;
    text-align: center;
}

/* Form ----------------------------------------------------------------- */
form.o_ahl_form {
    margin: 0;
}
.o_ahl_form_logo {
    display: none;
    width: auto;
    height: 64px;
    margin: 0 auto 28px;
}
.o_ahl_heading {
    margin-bottom: 30px;
}
.o_ahl_heading h1 {
    margin: 0 0 8px;
    color: var(--ahl-text);
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.o_ahl_heading p {
    margin: 0;
    color: var(--ahl-muted);
    font-size: 16px;
}
.o_ahl_field {
    margin-bottom: 18px;
    text-align: start;
}
.o_ahl_field > label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--ahl-label);
    font-size: 14.5px;
    font-weight: 500;
}
/* Odoo's "Choose a user" link (web.user_switch) lands in the email label. */
.o_ahl_field > label .o_user_switch_btn {
    color: var(--ahl-primary);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
}
.o_ahl_input {
    position: relative;
}
.o_ahl_input input {
    width: 100%;
    height: 54px;
    padding-block: 0;
    padding-inline: 48px 16px;
    border: 1px solid var(--ahl-border);
    border-radius: 14px;
    background: var(--ahl-input-bg);
    color: var(--ahl-text);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.o_ahl_input input::placeholder {
    color: #9aa4b2;
}
.o_ahl_input input:hover {
    border-color: #d3dbe5;
}
.o_ahl_input input:focus {
    border-color: var(--ahl-primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--ahl-primary-soft);
}
.o_ahl_input input#password {
    padding-inline-end: 52px;
}
.o_ahl_input_icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 16px;
    width: 20px;
    height: 20px;
    fill: #8a95a5;
    transform: translateY(-50%);
    pointer-events: none;
    transition: fill 0.15s ease;
}
.o_ahl_input:focus-within .o_ahl_input_icon {
    fill: var(--ahl-primary);
}
.o_ahl_eye {
    position: absolute;
    top: 50%;
    inset-inline-end: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    transform: translateY(-50%);
    cursor: pointer;
}
.o_ahl_eye:hover {
    background: #eef2f6;
}
.o_ahl_eye svg {
    width: 20px;
    height: 20px;
    fill: #7d8899;
}
.o_ahl_eye .o_ahl_eye_hide,
.o_ahl_eye.o_ahl_eye_on .o_ahl_eye_show {
    display: none;
}
.o_ahl_eye.o_ahl_eye_on .o_ahl_eye_hide {
    display: block;
}

.o_ahl_actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 24px;
    font-size: 14.5px;
}
.o_ahl_remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--ahl-label);
    cursor: default;
}
.o_ahl_remember input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.o_ahl_check {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: var(--ahl-primary);
}
.o_ahl_check::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.o_ahl_link,
.o_ahl_link:hover {
    padding: 0;
    color: var(--ahl-primary);
    font-weight: 500;
    text-decoration: none;
}
.o_ahl_link:hover {
    color: var(--ahl-primary-dark);
    text-decoration: underline;
}

.o_ahl_alert {
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14.5px;
}

.o_ahl_buttons {
    display: grid;
    gap: 8px;
}
.btn.o_ahl_submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 14px;
    background: var(--ahl-primary);
    box-shadow: 0 8px 18px rgba(18, 128, 138, 0.25);
    color: #fff;
    font-family: inherit;
    font-size: 16.5px;
    font-weight: 600;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.btn.o_ahl_submit:hover,
.btn.o_ahl_submit:focus-visible {
    background: var(--ahl-primary-dark);
    color: #fff;
    box-shadow: 0 10px 22px rgba(18, 128, 138, 0.32);
}
.btn.o_ahl_submit:active {
    transform: translateY(1px);
}
.o_ahl_submit svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.o_ahl[dir="rtl"] .o_ahl_submit svg {
    transform: scaleX(-1);
}

/* OAuth providers (auth_oauth.providers): "- or -" divider + outline buttons. */
.o_ahl .o_login_auth > em {
    display: flex !important;
    align-items: center;
    gap: 14px;
    margin: 14px 0 !important;
    color: var(--ahl-muted) !important;
    font-size: 13px !important;
    font-style: normal;
}
.o_ahl .o_login_auth > em::before,
.o_ahl .o_login_auth > em::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ahl-border);
}
.o_ahl .o_auth_oauth_providers {
    gap: 10px;
    margin: 0 !important;
}
.o_ahl .o_auth_oauth_providers .list-group-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 50px;
    border: 1px solid var(--ahl-border) !important;
    border-radius: 14px !important;
    background: #fff;
    color: var(--ahl-label);
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}
.o_ahl .o_auth_oauth_providers .list-group-item:hover {
    border-color: var(--ahl-primary) !important;
    background: var(--ahl-input-bg);
}
.o_ahl_signup {
    margin: 22px 0 0;
    color: var(--ahl-muted);
    font-size: 14.5px;
    text-align: center;
}

/* Odoo's "Choose a user" list (web.user_switch) */
.o_ahl .o_user_switch {
    margin: 0 !important;
}
.o_ahl .o_user_switch > p {
    margin: 0 0 6px;
    color: var(--ahl-text);
    font-size: 26px;
    font-weight: 600;
}
.o_ahl .o_user_switch .list-group {
    gap: 8px;
}
.o_ahl .o_user_switch .list-group-item {
    padding: 10px 14px;
    border: 1px solid var(--ahl-border) !important;
    border-radius: 14px !important;
    color: var(--ahl-text);
    font-weight: 500;
}
.o_ahl .o_user_switch .list-group-item:hover,
.o_ahl .o_user_switch .list-group-item:focus {
    border-color: var(--ahl-primary) !important;
    background: var(--ahl-input-bg);
}
.o_ahl .o_user_switch .o_user_avatar {
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    margin-inline-end: 10px !important;
    margin-right: 0 !important;
}
.o_ahl .o_user_switch .btn-link {
    color: var(--ahl-primary);
    font-weight: 500;
    text-decoration: none;
}

/* Smaller screens ------------------------------------------------------ */
@media (max-width: 1199.98px) {
    .o_ahl_brand {
        padding: 40px 44px 0;
    }
    .o_ahl_photo {
        margin: 0 -44px;
    }
    .o_ahl_tagline {
        font-size: 38px;
    }
}
@media (max-width: 991.98px) {
    .o_ahl {
        grid-template-columns: 1fr;
    }
    .o_ahl_brand {
        display: none;
    }
    .o_ahl_main {
        justify-content: flex-start;
        padding: 84px 20px 20px;
        background:
            linear-gradient(180deg, rgba(18, 128, 138, 0.08) 0%, rgba(18, 128, 138, 0) 260px),
            #f6f8fb;
    }
    .o_ahl_lang {
        top: 20px;
        inset-inline-end: 20px;
    }
    .card.o_database_list.o_ahl_card {
        margin: 0 0 auto;
        padding: 32px 26px !important;
        border-radius: 22px;
        background: #fff !important;
        box-shadow: 0 12px 32px rgba(15, 29, 46, 0.08);
    }
    .o_ahl_form_logo {
        display: block;
        height: 56px;
    }
    .o_ahl_heading {
        text-align: center;
    }
    .o_ahl_heading h1 {
        font-size: 28px;
    }
    /* Title and text of the other sign-in pages, centred like the login. */
    .o_ahl_auth .card-title,
    .o_ahl_auth .card-title + form > .text-muted:first-child {
        text-align: center;
    }
    .o_ahl_auth .card-title {
        font-size: 28px;
    }
}
@media (max-height: 760px) and (min-width: 992px) {
    .o_ahl_brand_copy {
        margin-bottom: 24px;
    }
    .o_ahl_tagline {
        font-size: 36px;
    }
    .o_ahl_rule {
        margin: 18px 0 16px;
    }
    .o_ahl_brand_text {
        margin-bottom: 20px;
    }
}

/* Other sign-in pages (reset password, sign up, two-factor authentication):
 * Odoo's own forms in the card of the login page (auth_layout). ----------- */
.o_ahl_auth {
    text-align: start;
}
.o_ahl_auth .oe_login_form,
.o_ahl_auth .oe_signup_form,
.o_ahl_auth .oe_reset_password_form {
    max-width: none;
    margin: 0;
}
.o_ahl_auth h1,
.o_ahl_auth h2,
.o_ahl_auth h3,
.o_ahl_auth h4,
.o_ahl_auth h5,
.o_ahl_auth .card-title {
    margin: 0 0 10px;
    color: var(--ahl-text);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.o_ahl_auth .text-muted,
.o_ahl_auth .o_ahl_sub {
    color: var(--ahl-muted) !important;
    font-size: 15px;
    line-height: 1.55;
}
.o_ahl_auth .o_ahl_sub {
    margin: 0 0 26px;
}
.o_ahl_auth .text-muted a,
.o_ahl_auth a:not(.btn) {
    color: var(--ahl-primary);
    font-weight: 500;
    text-decoration: none;
}
.o_ahl_auth a:not(.btn):hover {
    color: var(--ahl-primary-dark);
    text-decoration: underline;
}
.o_ahl_auth label,
.o_ahl_auth .form-label,
.o_ahl_auth .col-form-label {
    display: block;
    margin-bottom: 8px;
    padding: 0;
    color: var(--ahl-label);
    font-size: 14.5px;
    font-weight: 500 !important;
}
.o_ahl_auth .mb-3,
.o_ahl_auth .form-group {
    margin-bottom: 18px !important;
    text-align: start;
}
.o_ahl_auth .form-control {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid var(--ahl-border);
    border-radius: 14px;
    background: var(--ahl-input-bg);
    color: var(--ahl-text);
    font-family: inherit;
    font-size: 16px;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.o_ahl_auth .form-control::placeholder {
    color: #9aa4b2;
}
.o_ahl_auth .form-control:focus {
    border-color: var(--ahl-primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--ahl-primary-soft);
}
.o_ahl_auth .form-control[readonly] {
    color: var(--ahl-muted);
}
/* Spiffy's icon inside the inputs of the reset password page */
.o_ahl_auth .input-group {
    flex-wrap: nowrap;
}
.o_ahl_auth .input-group > .input-group-text,
.o_ahl_auth .input-group > span:first-child {
    border: 1px solid var(--ahl-border);
    border-inline-end: 0;
    border-radius: 14px 0 0 14px;
    background: var(--ahl-input-bg);
    color: #8a95a5;
}
.o_ahl[dir="rtl"] .o_ahl_auth .input-group > .input-group-text,
.o_ahl[dir="rtl"] .o_ahl_auth .input-group > span:first-child {
    border-radius: 0 14px 14px 0;
}
.o_ahl_auth .input-group > .input-group-text + .form-control,
.o_ahl_auth .input-group > span:first-child + .form-control {
    border-inline-start: 0;
}
.o_ahl_auth .border-top,
.o_ahl_auth .border-bottom {
    border: 0 !important;
}
.o_ahl_auth input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    vertical-align: middle;
    accent-color: var(--ahl-primary);
}
.o_ahl_auth input[type="checkbox"] + label {
    display: inline;
    margin: 0 0 0 8px;
    vertical-align: middle;
}
.o_ahl[dir="rtl"] .o_ahl_auth input[type="checkbox"] + label {
    margin: 0 8px 0 0;
}
.o_ahl_auth .oe_login_buttons {
    display: grid;
    gap: 8px;
    padding-top: 6px !important;
}
.o_ahl_auth .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 14px;
    background: var(--ahl-primary) !important;
    box-shadow: 0 8px 18px rgba(18, 128, 138, 0.25);
    color: #fff !important;
    font-family: inherit;
    font-size: 16.5px;
    font-weight: 600;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.o_ahl_auth .btn-primary:hover,
.o_ahl_auth .btn-primary:focus-visible {
    background: var(--ahl-primary-dark) !important;
    box-shadow: 0 10px 22px rgba(18, 128, 138, 0.32);
}
.o_ahl_auth .btn-link {
    color: var(--ahl-primary) !important;
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
}
.o_ahl_auth .btn-link:hover {
    color: var(--ahl-primary-dark) !important;
    text-decoration: underline;
}
.o_ahl_auth .alert {
    margin: 0 0 18px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14.5px;
    text-align: start;
}
.o_ahl_auth .small,
.o_ahl_auth small {
    font-size: 13.5px;
}
.o_ahl_auth .o_ahl_heading h1 {
    font-size: 30px;
}
/* Spiffy's fields (label, icon, input on one line): label above, icon in the input. */
.o_ahl_auth .form-group.d-flex {
    position: relative;
    display: block !important;
}
.o_ahl_auth .form-group.d-flex > .login-icon {
    position: absolute;
    bottom: 17px;
    inset-inline-start: 16px;
    z-index: 1;
    margin: 0 !important;
    color: #8a95a5 !important;
    font-size: 17px;
    pointer-events: none;
}
.o_ahl_auth .form-group.d-flex:focus-within > .login-icon {
    color: var(--ahl-primary) !important;
}
.o_ahl_auth .form-group.d-flex > .login-icon + .form-control {
    padding-inline-start: 46px;
}
.o_ahl_auth .oe_login_buttons > .d-flex {
    justify-content: center !important;
    margin-top: 14px !important;
    font-size: 14.5px;
}
/* Odoo caps the login forms at 300px: the card sets the width. */
.o_ahl form.oe_login_form,
.o_ahl .oe_login_form,
.o_ahl .oe_signup_form,
.o_ahl .oe_reset_password_form {
    max-width: none;
}
