/* Sign in and Register pages: dark glass card on the car photo, no big banner, slim footer */
body.auth-page.au4 { background: #0b0b0d; }
body.auth-page .mmc-footer .mmc-grid { display: none; }

.auth-stage {
    position: relative; overflow: hidden;
    min-height: calc(100vh - 150px);
    padding: 56px 0 72px;
    display: flex; align-items: center;
    background-color: #0b0b0d;
    isolation: isolate;
}
/* black and white car wallpaper at 22% to break up the darkness */
.auth-stage:before {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background: var(--wall) center / cover no-repeat;
    filter: grayscale(1) contrast(1.08) brightness(1.15);
    opacity: .22;
}
.auth-stage:after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(900px 460px at 50% 0%, rgba(221,26,34,.16), transparent 70%),
        radial-gradient(130% 95% at 50% 45%, transparent 58%, rgba(0,0,0,.38) 100%),
        linear-gradient(180deg, transparent 82%, #0b0b0d 100%);
}
.auth-stage[data-bg="login"] { --wall: url(../images/bg/auth-wall.webp); }
.auth-stage[data-bg="register"] { --wall: url(../images/bg/auth-wall-register.webp); }
.auth-stage .container { display: flex; justify-content: center; }

.auth-card {
    width: 100%; max-width: 440px;
    padding: 34px 32px 30px;
    color: #e8e9ec;
    background: rgba(12,12,15,.46);
    -webkit-backdrop-filter: blur(6px) saturate(1.1); backdrop-filter: blur(6px) saturate(1.1);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
}
.auth-card.wide { max-width: 600px; }
.auth-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #ff3b43; }
.auth-kicker:before { content: ""; width: 24px; height: 2px; background: #dd1a22; }
.auth-card h1 { margin: 0 0 8px; font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; color: #fff; text-transform: none; }
.auth-sub { margin: 0 0 24px; font-size: 14.5px; line-height: 1.5; color: #9ca0a8; }

/* Google */
.auth-google {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    height: 50px; width: 100%; margin: 0 0 20px;
    background: #fff; color: #1f1f1f !important;
    border-radius: 12px; font-size: 15px; font-weight: 600; text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease;
}
.auth-google:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.auth-google svg { width: 20px; height: 20px; flex: 0 0 20px; }
.auth-or { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #9a9da5; }
.auth-or:before, .auth-or:after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.1); }

/* fields */
.auth-card .form-group { position: relative; margin: 0 0 16px; padding: 0; }
.auth-card .row { margin-left: -8px; margin-right: -8px; }
.auth-card .row > [class*="col-"] { padding-left: 8px; padding-right: 8px; }
.auth-card label { display: block; margin: 0 0 7px; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #c9ccd2; }
.auth-card .form-control,
.auth-card select {
    display: block; width: 100%; height: 50px; padding: 0 16px;
    color: #fff; font-size: 15px; font-weight: 500;
    background: #151518; border: 1px solid #2c2d33; border-radius: 12px; box-shadow: none; outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    -webkit-appearance: none; appearance: none;
}
.auth-card .form-control:hover, .auth-card select:hover { border-color: #3b3c44; }
.auth-card .form-control:focus, .auth-card select:focus { border-color: #dd1a22; background: #17171a; box-shadow: 0 0 0 4px rgba(221,26,34,.18); color: #fff; }
.auth-card .form-control::placeholder { color: #5f626a; }
.auth-card input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 100px #151518 inset; caret-color: #fff; }
/* Browser autofill (and the suggestion preview) paints its own pale background; keep the dark field and white text in every state,
   and keep the red focus ring. These selectors are more specific than the .form-control:focus rule above, which used to replace the inset shadow. */
.auth-card .form-control:-webkit-autofill,
.auth-card .form-control:-webkit-autofill:hover,
.auth-card .form-control:-webkit-autofill:active,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 100px #151518 inset;
    box-shadow: 0 0 0 100px #151518 inset;
    caret-color: #fff;
    transition: background-color 600000s 0s, color 600000s 0s;
}
.auth-card .form-control:-webkit-autofill:focus,
.auth-card input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 100px #17171a inset, 0 0 0 4px rgba(221,26,34,.18);
    box-shadow: 0 0 0 100px #17171a inset, 0 0 0 4px rgba(221,26,34,.18);
    border-color: #dd1a22;
    caret-color: #fff;
    transition: background-color 600000s 0s, color 600000s 0s;
}
.auth-card .form-control:autofill,
.auth-card input:autofill {
    -webkit-text-fill-color: #fff;
    box-shadow: 0 0 0 100px #151518 inset;
    caret-color: #fff;
}
.auth-card select {
    padding-right: 42px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239ca0a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px;
}
.auth-card select option { background: #fff; color: #191a1e; }
.auth-card .selected-box { height: auto !important; margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; }
.auth-card .selected-box:before, .auth-card .selected-box:after { display: none !important; }
.auth-card .has-error .form-control, .auth-card .has-error select { border-color: #ff4a52; }
.auth-card .help-block-error, .auth-card span.help-block { display: block; margin: 6px 2px 0; font-size: 12.5px; font-weight: 600; color: #ff6b72; }

/* show / hide password: the existing icons, moved inside the field */
.auth-card .showpass, .auth-card .hidepass { position: absolute; top: 40px; right: 16px; z-index: 3; font-size: 16px; line-height: 1; color: #8b8f98; cursor: pointer; }
.auth-card .showpass:hover, .auth-card .hidepass:hover { color: #fff; }
.auth-card .has-eye .form-control { padding-right: 46px; }

/* remember me / forgot */
.auth-card p, .auth-card h1, .auth-kicker { text-align: start; }
.auth-card label.auth-check { margin: 0; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 20px; }
.auth-card label.auth-check, .auth-check { display: inline-flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 13.5px; font-weight: 500; line-height: 1.4; color: #b7bac1; cursor: pointer; }
.auth-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-check .box { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid #4a4c55; border-radius: 6px; background: #151518; display: grid; place-items: center; transition: all .15s ease; }
.auth-check .box svg { width: 12px; height: 12px; opacity: 0; transform: scale(.6); transition: all .15s ease; }
.auth-check input:checked + .box { background: #dd1a22; border-color: #dd1a22; }
.auth-check input:checked + .box svg { opacity: 1; transform: none; }
.auth-check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(221,26,34,.25); }
.auth-check a { color: #ff5a62; text-decoration: underline; }
.auth-link { font-size: 13.5px; font-weight: 600; color: #ff5a62 !important; text-decoration: none !important; }
.auth-link:hover { color: #fff !important; }

/* buttons */
.auth-card .auth-submit {
    display: block; width: 100%; height: 52px; margin: 6px 0 0; padding: 0;
    color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .01em; text-transform: none;
    background: linear-gradient(180deg, #ee2a32 0%, #cf141c 100%);
    border: 0; border-radius: 12px; cursor: pointer;
    box-shadow: 0 10px 26px rgba(221,26,34,.38), inset 0 1px 0 rgba(255,255,255,.22);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.auth-card .auth-submit:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 32px rgba(221,26,34,.5), inset 0 1px 0 rgba(255,255,255,.22); }
.auth-card .auth-submit:disabled { opacity: .6; cursor: default; transform: none; }
.auth-alt { margin: 22px 0 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); text-align: center; font-size: 14px; color: #9ca0a8; }
.auth-alt a { display: inline-block; margin-inline-start: 6px; font-weight: 700; color: #fff !important; text-decoration: none !important; border-bottom: 2px solid #dd1a22; }
.auth-alt a:hover { color: #ff5a62 !important; }
.auth-card .cf-turnstile { margin: 4px 0 16px; min-height: 0; }
.auth-secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 0; font-size: 12px; color: #6b6e76; }
.auth-secure svg { width: 14px; height: 14px; }

/* register: role chips */
.role-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.role-chip {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 44px; padding: 8px 10px; margin: 0;
    font-size: 13px; font-weight: 600; line-height: 1.2; color: #c9ccd2;
    background: #151518; border: 1px solid #2c2d33; border-radius: 12px; cursor: pointer;
    transition: all .15s ease; user-select: none;
}
.role-chip:hover { border-color: #4a4c55; color: #fff; }
.role-chip.on { color: #fff; background: rgba(221,26,34,.16); border-color: #dd1a22; box-shadow: 0 0 0 3px rgba(221,26,34,.14); }
.role-chip:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(221,26,34,.25); }
.has-error .role-chips { outline: 1px solid #ff4a52; outline-offset: 4px; border-radius: 12px; }
.pw-meter { height: 4px; margin: 8px 0 0; border-radius: 4px; background: #24252a; overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; border-radius: 4px; background: #ff4a52; transition: width .2s ease, background-color .2s ease; }
.pw-hint { margin: 6px 0 0; font-size: 12px; color: #6b6e76; }

/* right-to-left */
[dir="rtl"] .auth-card .showpass, [dir="rtl"] .auth-card .hidepass, html[lang="ar"] .auth-card .showpass, html[lang="ar"] .auth-card .hidepass { right: auto; left: 16px; }
[dir="rtl"] .auth-card .has-eye .form-control, html[lang="ar"] .auth-card .has-eye .form-control { padding-right: 16px; padding-left: 46px; }
[dir="rtl"] .auth-card select, html[lang="ar"] .auth-card select { padding-right: 16px; padding-left: 42px; background-position: left 16px center; }

@media (min-width: 993px) {
    .auth-stage { padding-top: 190px; }
}
@media (max-width: 575px) {
    .auth-stage { padding: 20px 0 40px; min-height: 0; align-items: flex-start; }
    .auth-stage .container { padding-left: 14px; padding-right: 14px; }
    .auth-card { padding: 26px 20px 24px; border-radius: 20px; }
    .auth-card h1 { font-size: 25px; }
    .auth-card .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
}



/* register: benefits row and Google note */
.auth-perks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: -8px 0 22px; padding: 0; }
.auth-perks li { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; color: #c9ccd2; list-style: none; }
.auth-perks svg { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: rgba(221,26,34,.9); fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.auth-note { margin: -8px 0 18px; font-size: 12.5px; line-height: 1.45; color: #8d9199; text-align: start; }
.auth-card .cf-turnstile { width: 100%; }
.auth-card .cf-turnstile iframe { max-width: 100%; }

/* very see-through card: keep the text readable over the photo */
.auth-card h1, .auth-card .auth-sub, .auth-card label, .auth-card .auth-kicker, .auth-card .auth-check, .auth-card .auth-or, .auth-card .auth-alt, .auth-card .auth-link, .auth-card .auth-note, .auth-card .auth-perks li { text-shadow: 0 1px 8px rgba(0,0,0,.75), 0 0 2px rgba(0,0,0,.6); }
.auth-card .form-control, .auth-card select, .role-chip { background-color: rgba(14,14,17,.7); }

/* phones: the photo is cropped to a tall screen, so make it a bit stronger and the card clearer */
@media (max-width: 575px) {
    .auth-stage:before { opacity: .34; background-position: 36% 42%; }
    .auth-card { background: rgba(10,10,13,.44); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); border-color: rgba(255,255,255,.12); }
    .auth-card .form-control, .auth-card select, .role-chip { background-color: rgba(12,12,15,.68); }
}

/* register is a long page: keep the photo fixed to the screen instead of stretching it over the whole form */
.auth-stage[data-bg="register"]:before { position: fixed; top: 0; left: 0; right: 0; bottom: auto; width: 100%; height: 100vh; background-position: 40% 62%; }
@media (max-width: 575px) { .auth-stage[data-bg="register"]:before { background-position: 38% 60%; } }
.auth-stage[data-bg="register"]:before { filter: grayscale(1) contrast(1.1) brightness(1.75); opacity: .3; }
@media (max-width: 575px) { .auth-stage[data-bg="register"]:before { opacity: .38; } }
