/*
 * Sign-in / sign-up pages (DEV-3772): identify, new account, create account, sign in, verification code,
 * forgot password, set a new password, password updated. Loaded by template/common/simple_header.tpl,
 * which only these pages use.
 *
 * Colours: the store's own come from diwan as --brand-<key> on :root (simple_header.tpl, from
 * theme.colors); each falls back to Dumyah's value in diwan. Tints are mixed from those, so they follow
 * any store. Neutrals and the red/green states are the prototype's.
 *   --brand-primary                        buttons, links, focus, highlights          (#FF3F98)
 *   --brand-auth_page_background           form side background (optional)           (#FFFFFF)
 *   --brand-auth_panel_background          brand panel background (optional)         (#F6F4F5)
 *   --brand-auth_panel_text                brand panel text (optional)               (#2B2226)
 *   --brand-auth_panel_subheading_accent   panel subheading's [accent] (optional)    (the primary)
 */
/* Fonts: DM Sans (English) and Cairo (Arabic), self-hosted in font/auth/ (SIL OFL, variable weight)
 * so the headings never fall back to Helvetica/Arial when Google Fonts is slow or blocked. Own family
 * names, so the storefront's Arabic-only 'Cairo' faces (css/fonts.css) can't interfere. */
@font-face {
    font-family: 'Auth DM Sans';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('../font/auth/dm-sans-latin-wght-normal.woff2') format('woff2-variations'), url('../font/auth/dm-sans-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Auth DM Sans';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('../font/auth/dm-sans-latin-ext-wght-normal.woff2') format('woff2-variations'), url('../font/auth/dm-sans-latin-ext-wght-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Auth Cairo';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('../font/auth/cairo-arabic-wght-normal.woff2') format('woff2-variations'), url('../font/auth/cairo-arabic-wght-normal.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Auth Cairo';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('../font/auth/cairo-latin-wght-normal.woff2') format('woff2-variations'), url('../font/auth/cairo-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Auth Cairo';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('../font/auth/cairo-latin-ext-wght-normal.woff2') format('woff2-variations'), url('../font/auth/cairo-latin-ext-wght-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.auth {
    --auth-primary: var(--brand-primary, #ff3f98);
    /* Button and link hover: the primary a shade darker. Not --brand-button_hover_background_color, which
     * is the pale favourites/stepper hover (Dumyah's is #FFF0F6) and turned the white-text button and the links white. */
    --auth-primary-hover: color-mix(in srgb, var(--auth-primary) 86%, #000);
    --auth-primary-soft: color-mix(in srgb, var(--auth-primary) 6%, #fff);
    --auth-primary-tint: color-mix(in srgb, var(--auth-primary) 12%, #fff);
    --auth-primary-line: color-mix(in srgb, var(--auth-primary) 35%, #fff);
    --auth-mart: #0e8fa3; /* backdrop tint behind the panel's right picture: fixed teal, as in the design */
    --auth-mart-tint: color-mix(in srgb, var(--auth-mart) 12%, #fff);
    --auth-page-bg: var(--brand-auth_page_background, #fff);
    --auth-panel-bg: var(--brand-auth_panel_background, #f6f4f5);
    --auth-panel-text: var(--brand-auth_panel_text, #2b2226);
    --auth-panel-sub-accent: var(--brand-auth_panel_subheading_accent, var(--auth-primary));

    --auth-text: #2b2226;
    --auth-text-2: #4a4045;
    --auth-muted: #8b8286;
    --auth-faint: #a29a9e;
    --auth-line: #ece7e9;
    --auth-field-line: #e2dade;
    --auth-field-bg: #f9f7f8;
    --auth-chip-bg: #f4eff1;
    --auth-error: #d94a4a;
    --auth-error-text: #c33c3c;
    --auth-error-bg: #fdecec;
    --auth-error-line: #f7d4d4;
    --auth-success: #2f9e6b;
    --auth-success-text: #24734f;
    --auth-success-bg: #eaf7f0;
    --auth-success-line: #cfead9;
    --auth-warning: #e0a03a;

    --auth-radius: 12px;
    --auth-shadow-btn: 0 10px 22px -12px color-mix(in srgb, var(--auth-primary) 55%, transparent);
    --auth-shadow-card: 0 24px 48px -24px rgba(60, 20, 40, 0.28);

    display: flex;
    min-height: 100vh;
    min-height: 100dvh; /* phones: the visible height (address bar excluded), so a short page never scrolls */
    background: var(--auth-page-bg);
    color: var(--auth-text);
    font: 400 15px/1.5 'Auth DM Sans', 'Auth Cairo', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* The theme still loads its own CSS on these pages (bootstrap.css, stylesheet.css and the active skin,
 * e.g. blue/stylesheet.css: `h1..h6 { font-family: 'Signika Negative' }`, `body { overflow: hidden }`,
 * `button, input { border: 1px solid #ccc }`). This reset undoes those element rules inside .auth. It is
 * one class strong, so it beats a bare element rule, and every component class below still wins. */
body { margin: 0; overflow: visible; }
.auth[dir='rtl'] { font-family: 'Auth Cairo', 'Auth DM Sans', Helvetica, Arial, sans-serif; }
.auth *, .auth *::before, .auth *::after { box-sizing: border-box; }
.auth a { color: var(--auth-primary); text-decoration: none; }
.auth a:hover, .auth a:focus { color: var(--auth-primary-hover); }
.auth :where(p, h1, h2, h3, h4, h5, h6) { margin: 0; font-family: inherit; line-height: inherit; text-transform: none; }
.auth :where(button, input, select, textarea) { font: inherit; color: inherit; }
.auth :where(button) { border: 0; }
.auth :where(a) { font-size: inherit; line-height: inherit; }
.auth :where(form) { display: block; margin: 0; padding: 0; }
.auth :where(label) { display: block; max-width: none; margin: 0; font-weight: inherit; }
/* The theme's input[type='text'|'password'] rule (padding, border, grey background) is more specific than a
 * single class, so the field components below are written as `.auth .auth-…` (two classes) to win. */
.auth :focus-visible { outline: 2px solid var(--auth-primary); outline-offset: 2px; }

.auth-icon { display: inline-block; flex: 0 0 auto; width: 1em; height: 1em; vertical-align: middle; }
.auth[dir='rtl'] .auth-icon--dir { transform: scaleX(-1); }
.auth-icon--back { transform: scaleX(-1); }
.auth[dir='rtl'] .auth-icon--back { transform: none; }

/* ---- Layout: form column + brand panel (the panel hides below 1000px) --------------------------------- */
.auth__main {
    display: flex;
    flex: 0 0 clamp(460px, 42%, 640px);
    flex-direction: column;
    min-width: 0;
    padding: 22px 36px 28px;
    border-inline-end: 1px solid var(--auth-line);
}

.auth__body {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    padding: 14px 0;
}

.auth-card { width: 100%; max-width: 436px; }

/* ---- Top bar ------------------------------------------------------------------------------------- */
.auth-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth a.auth-top__back,
.auth a.auth-top__help {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--auth-muted);
    font-size: 14px;
    font-weight: 500;
}

.auth a.auth-top__back:hover,
.auth a.auth-top__help:hover { color: var(--auth-text); }
.auth-top__back .auth-icon { font-size: 18px; }
.auth-top__end { display: flex; align-items: center; gap: 14px; }
.auth-foot-help { display: none; }   /* phones only, see the 639px query */

.auth-lang {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 100px;
    background: var(--auth-chip-bg);
}

.auth .auth-lang__item {
    display: flex;
    align-items: center;
    height: 30px;
    padding: 0 15px;
    border-radius: 100px;
    color: var(--auth-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.auth .auth-lang__item[lang='ar'] { font-family: 'Auth Cairo', sans-serif; }
.auth a.auth-lang__item:hover { color: var(--auth-text); }

.auth .auth-lang__item[aria-current='page'] {
    background: #fff;
    color: var(--auth-text);
    box-shadow: 0 1px 3px rgba(60, 20, 40, 0.12);
}

/* ---- Headings ------------------------------------------------------------------------------------- */
.auth-title {
    color: var(--auth-text);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.auth[dir='rtl'] .auth-title { letter-spacing: 0; }

.auth-subtitle {
    margin-top: 10px;
    color: var(--auth-muted);
    font-size: 14.5px;
    line-height: 1.55;
    text-wrap: pretty;
}

.auth-subtitle--small { font-size: 13.5px; font-weight: 500; }
.auth-subtitle__strong { color: var(--auth-text); font-weight: 600; }

.auth a.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    color: var(--auth-muted);
    font-size: 13.5px;
    font-weight: 600;
}

.auth a.auth-back:hover { color: var(--auth-text); }
.auth-back .auth-icon { font-size: 18px; }

/* ---- Fields ---------------------------------------------------------------------------------------- */
/* DEV-4000: a little more room between the label, the field and the next field than DEV-3772 had. */
.auth-form { margin-top: 28px; }
.auth-field + .auth-field { margin-top: 20px; }
.auth-identity + .auth-field,
.auth-field--identity + .auth-field { margin-top: 20px; }

.auth-field__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.auth-field__label {
    display: block;
    margin-bottom: 8px;
    color: var(--auth-text-2);
    font-size: 14px;
    font-weight: 600;
}

.auth-field__head .auth-field__label { margin-bottom: 0; }
.auth a.auth-field__link { font-size: 13px; font-weight: 600; }

.auth .auth-input {
    display: block;
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--auth-field-line);
    border-radius: var(--auth-radius);
    background: var(--auth-field-bg);
    color: var(--auth-text);
    font: inherit;
    font-size: 16px; /* 16px and up: iPhones don't zoom in when the field is tapped */
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.auth-input::placeholder { color: var(--auth-faint); opacity: 1; }
/* Arabic pages: an empty email/phone field (dir="auto", or inside the LTR dial-code box) would put the
 * Arabic placeholder on the left; while the placeholder shows, read it right-to-left. Typed text keeps
 * its own direction (an email or a number stays LTR). */
.auth[dir='rtl'] input:placeholder-shown { direction: rtl; text-align: right; }

.auth-input:focus,
.auth-input--prefixed:focus-within {
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-primary) 12%, transparent);
}

.auth-input.is-invalid,
.auth-input.is-invalid:focus,
.auth-input--prefixed.is-invalid:focus-within {
    border-color: var(--auth-error);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-error) 12%, transparent);
}

.auth .auth-input--prefixed {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    padding: 0;
}

.auth-input--prefixed input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    outline: none;
}

.auth-input__prefix {
    display: flex;
    align-items: center;
    padding-inline: 14px;
    border-inline-end: 1px solid var(--auth-field-line);
    background: var(--auth-chip-bg);
    color: var(--auth-primary);
    font-weight: 600;
}

.auth-input__prefix[hidden] { display: none; }

/* Country-code picker on the email-or-mobile field (Identify, Forgot password). account-country-picker.js
 * shows the code button only for a number and opens / closes the list; country-search.js adds the search
 * row at the top of the list. */
.auth .auth-picker { position: relative; }

.auth .auth-picker__button {
    gap: 6px;
    margin: 0;
    border-top: 0;
    border-bottom: 0;
    border-inline-start: 0;
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.auth .auth-picker__button:focus-visible { outline: 2px solid var(--auth-primary); outline-offset: -2px; }
.auth .auth-picker__caret { width: 14px; height: 14px; }

.auth .auth-picker__panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    z-index: 30;
}

.auth .auth-picker__list {
    display: none;
    box-sizing: border-box;
    max-height: 260px;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
    list-style: none;
    border: 1px solid var(--auth-field-line);
    border-radius: var(--auth-radius);
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 17, 17, .14);
}

.auth .auth-picker__list .country-search-row { padding: 4px 8px 6px; }

.auth .auth-picker__list .country-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    color: var(--auth-text);
    font-size: 15px;
    cursor: pointer;
}

.auth .auth-picker__list .country-item:hover,
.auth .auth-picker__list .country-item:focus { background: var(--auth-chip-bg); outline: none; }
.auth .auth-picker__list .picker-flag { flex: 0 0 22px; font-size: 17px; text-align: center; }

.auth .auth-field__error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    color: var(--auth-error);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.auth .auth-field__error[hidden] { display: none; }
.auth-field__error .auth-icon { font-size: 16px; }

/* Password with a show/hide button (one button can drive the confirmation field too) */
.auth-password { position: relative; }
.auth-password .auth-input { padding-inline-end: 48px; }

.auth-password__toggle {
    position: absolute;
    top: 5px;
    bottom: 5px;
    inset-inline-end: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--auth-faint);
    font-size: 19px;
    cursor: pointer;
}

.auth-password__toggle:hover { background: var(--auth-chip-bg); color: var(--auth-text); }
.auth-password__toggle .auth-icon--hide,
.auth-password__toggle[aria-pressed='true'] .auth-icon--show { display: none; }
.auth-password__toggle[aria-pressed='true'] .auth-icon--hide { display: inline-block; }

/* The address chosen on Identify, with "Change" */
.auth-identity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding: 14px 16px;
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    background: var(--auth-field-bg);
}

.auth-form > .auth-identity:first-of-type,
.auth-form > .auth-field--identity:first-of-type .auth-identity { margin-top: 0; }

.auth .auth-identity__value {
    overflow: hidden;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--auth-text);
    font: inherit;
    font-size: 16px; /* a field too (read-only): 16px, so tapping it never zooms an iPhone */
    font-weight: 600;
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
    outline: none;
}

input.auth-identity__value { flex: 1 1 auto; }
.auth a.auth-identity__change { flex: 0 0 auto; font-size: 13.5px; font-weight: 600; }

/* Password strength */
.auth-strength { margin-top: 10px; }
.auth-strength[hidden] { display: none; }
.auth-strength__row { display: flex; align-items: center; gap: 10px; }
.auth-strength__bars { display: flex; flex: 1 1 0; gap: 4px; }
.auth-strength__bars i { flex: 1 1 0; height: 4px; border-radius: 100px; background: var(--auth-line); transition: background-color 0.2s; }

.auth-strength__label {
    flex: 0 0 auto;
    min-width: 62px;
    color: var(--auth-muted);
    font-size: 12.5px;
    font-weight: 600;
    text-align: end;
}

.auth-strength__tip { margin-top: 6px; color: var(--auth-muted); font-size: 12.5px; font-weight: 500; }
.auth-strength[data-level='1'] { --auth-level: var(--auth-error); }
.auth-strength[data-level='2'] { --auth-level: var(--auth-warning); }
.auth-strength[data-level='3'],
.auth-strength[data-level='4'] { --auth-level: var(--auth-success); }
.auth-strength[data-level='1'] i:nth-child(-n + 1),
.auth-strength[data-level='2'] i:nth-child(-n + 2),
.auth-strength[data-level='3'] i:nth-child(-n + 3),
.auth-strength[data-level='4'] i { background: var(--auth-level); }
.auth-strength:not([data-level='0']) .auth-strength__label { color: var(--auth-level); }

/* ---- Buttons --------------------------------------------------------------------------------------- */
.auth .auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 54px;
    margin-top: 24px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--auth-radius);
    background: var(--auth-primary);
    box-shadow: var(--auth-shadow-btn);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.auth .auth-btn:hover { background: var(--auth-primary-hover); color: #fff; }
.auth .auth-btn:disabled { opacity: 0.6; cursor: default; }
.auth-btn .auth-icon { font-size: 18px; }
.auth-form--single .auth-btn { margin-top: 20px; }
.auth-subtitle + .auth-btn { margin-top: 24px; }

.auth .auth-btn--ghost {
    margin-top: 12px;
    border: 1px solid var(--auth-field-line);
    background: #fff;
    box-shadow: none;
    color: var(--auth-text);
    font-size: 15.5px;
}

.auth .auth-btn--ghost:hover { border-color: var(--auth-primary-line); background: var(--auth-primary-soft); color: var(--auth-text); }

/* ---- Notes, divider, social sign-in ----------------------------------------------------------------- */
.auth-note {
    margin-top: 16px;
    color: var(--auth-muted);
    font-size: 12.5px;
    line-height: 1.6;
    text-wrap: pretty;
}

.auth-note a { font-weight: 600; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    color: var(--auth-faint);
    font-size: 12.5px;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after { content: ''; flex: 1 1 0; height: 1px; background: var(--auth-line); }

/* Whatever buttons the store offers (diwan): each a third of the row, the row centred — so one or two
   buttons sit in the middle. Left-to-right in Arabic too, as in the prototype. Narrow rows stack the logo
   above the word so the word always stays inside its button. */
.auth-social {
    --auth-social-gap: 8px;
    display: flex;
    justify-content: center;
    gap: var(--auth-social-gap);
    direction: ltr;
    container-type: inline-size;
}

.auth .auth-social__btn {
    display: flex;
    flex: 0 1 calc((100% - 2 * var(--auth-social-gap)) / 3);
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    height: 44px;
    padding: 0 4px; /* DEV-4000: room for "Facebook" at 13px in a third of a 360px phone (it needed 61px of 60) */
    border: 1px solid #e8e1e4;
    border-radius: 10px;
    background: #fff;
    color: var(--auth-text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.auth .auth-social__btn:hover { border-color: var(--auth-primary-line); background: var(--auth-primary-soft); color: var(--auth-text); }
.auth-social__btn .auth-icon { font-size: 16px; }
.auth-social__btn span { overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; }

@container (max-width: 300px) {
    .auth .auth-social__btn { flex-direction: column; gap: 3px; height: 52px; padding: 6px 4px; }
}

.auth-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-line);
    color: var(--auth-muted);
    font-size: 13.5px;
    text-align: center;
}

.auth-foot a { font-weight: 600; }

/* ---- Alerts and info ------------------------------------------------------------------------------- */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 18px;
    padding: 11px 13px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
}

.auth-alert .auth-icon { font-size: 17px; }
.auth-alert--error { border-color: var(--auth-error-line); background: var(--auth-error-bg); color: var(--auth-error-text); }
.auth-alert--error .auth-icon { color: var(--auth-error); }
.auth-alert--success { border-color: var(--auth-success-line); background: var(--auth-success-bg); color: var(--auth-success-text); }
.auth-alert--success .auth-icon { color: var(--auth-success); }

.auth-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    background: var(--auth-field-bg);
    color: var(--auth-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.auth-info .auth-icon { font-size: 17px; }
.auth-info a { font-weight: 600; }

.auth-done {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--auth-success-bg);
    color: var(--auth-success);
    font-size: 28px;
}

/* ---- Verification code ---------------------------------------------------------------------------- */
.auth-otp { display: flex; gap: 10px; }

.auth .auth-otp__digit {
    width: 100%;
    min-width: 0;
    height: 60px;
    padding: 0;
    border: 1.5px solid var(--auth-field-line);
    border-radius: 14px;
    background: var(--auth-field-bg);
    color: var(--auth-text);
    font: inherit;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.auth-otp__digit:focus {
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-primary) 12%, transparent);
}

.auth-otp.is-invalid .auth-otp__digit { border-color: var(--auth-error); background: #fff; }
.auth-otp-feedback .auth-alert { margin-top: 10px; }

.auth-otp-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    color: var(--auth-muted);
    font-size: 13.5px;
    font-weight: 600;
}

.auth-otp-meta__timer { display: inline-flex; align-items: center; gap: 7px; }
.auth-otp-meta__timer .auth-icon { font-size: 17px; }

.auth-otp-meta__resend {
    padding: 0;
    border: 0;
    background: none;
    color: var(--auth-primary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}

.auth-otp-meta__resend:disabled { color: var(--auth-faint); cursor: default; }
.auth-otp-meta__resend:not(:disabled):hover { color: var(--auth-primary-hover); }

/* ---- Brand panel ----------------------------------------------------------------------------------- */
.auth-panel {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(16px, 3vh, 48px);
    min-width: 0;
    overflow: hidden;
    padding: 36px clamp(32px, 3.4vw, 56px) clamp(40px, 5vh, 64px);
    background: var(--auth-panel-bg);
    color: var(--auth-panel-text);
}

/* The logo is a link to the home page (DEV-4000): only as wide as the logo, not the whole panel row. */
.auth a.auth-panel__logo { display: block; align-self: flex-start; cursor: pointer; }
.auth-panel__logo img { display: block; width: auto; max-width: 220px; height: 44px; object-fit: contain; object-position: left center; }
.auth[dir='rtl'] .auth-panel__logo img { object-position: right center; }
.auth-panel__name { color: var(--auth-primary); font-size: 28px; font-weight: 700; line-height: 44px; }

.auth-panel__stage {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-height: 0;
    container-type: size;
}

.auth-panel__art { position: relative; width: min(100%, 100cqh, 860px); aspect-ratio: 1; }

.auth-panel__frame {
    position: absolute;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--auth-shadow-card);
}

.auth-panel__frame img,
.auth-panel__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.auth-panel__frame--center { top: 2%; inset-inline-start: 16%; width: 52%; height: 76%; border-radius: 28px; }

.auth-panel__frame--right {
    top: 48%;
    inset-inline-start: 59%;
    display: flex;
    width: 34%;
    height: 48%;
    padding: 6px;
    border-radius: 20px;
    transform: rotate(-3deg);
}


.auth-panel__photo { flex: 1 1 auto; min-height: 0; overflow: hidden; border-radius: 14px; background: var(--auth-mart-tint); }

.auth-panel__frame--left {
    top: 57%;
    inset-inline-start: 2%;
    width: 33%;
    aspect-ratio: 1;
    border: 5px solid #fff;
    border-radius: 30px;
    box-shadow: 0 24px 48px -20px rgba(60, 20, 40, 0.35);
    transform: rotate(-5deg);
}

.auth-panel__badge {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border: 4px solid #fff;
    border-radius: 50%;
    color: #fff;
}

.auth-panel__badge .auth-icon { width: 44%; height: 44%; }
.auth-panel__badge--bag { top: 43%; inset-inline-start: 87%; width: 11%; background: var(--auth-primary); box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--auth-primary) 60%, transparent); }
.auth-panel__badge--gift { top: 13%; inset-inline-start: 5%; width: 10%; border-width: 3px; background: var(--auth-primary-tint); box-shadow: 0 12px 24px -12px rgba(60, 20, 40, 0.3); color: var(--auth-primary); }

.auth-panel__text { position: relative; max-width: 860px; }

.auth-panel__heading {
    color: var(--auth-panel-text);
    font-size: clamp(28px, min(3.2vw, 5.4vh), 60px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.auth[dir='rtl'] .auth-panel__heading { line-height: 1.25; letter-spacing: 0; }
.auth-panel__accent { color: var(--auth-primary); }

.auth-panel__sub {
    max-width: 560px; /* the text box widened for the heading; body-size lines stay short */
    margin-top: 18px;
    color: color-mix(in srgb, var(--auth-panel-text) 82%, var(--auth-panel-bg));
    font-size: clamp(15px, 1.15vw, 18px);
    font-weight: 500;
    line-height: 1.4;
}

.auth-panel__sub-accent { color: var(--auth-panel-sub-accent); font-weight: 700; }

/* ---- Tablet and phone ------------------------------------------------------------------------------ */
@media (max-width: 999px) {
    .auth-panel { display: none; }
    .auth__main { flex: 1 1 auto; border-inline-end: 0; }
}

@media (max-width: 639px) {
    .auth__main { padding: 10px 20px 30px; }
    .auth__body { align-items: flex-start; padding-top: 28px; } /* phones: the form sits under the header, not mid-screen */
    .auth a.auth-top__help { display: none; }
    .auth-foot-help { display: flex; justify-content: center; padding-top: 24px; }
    .auth a.auth-foot-help__link { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; color: var(--auth-muted); font-size: 14px; font-weight: 500; }
    .auth a.auth-foot-help__link:hover { color: var(--auth-text); }
    .auth-title { font-size: 23px; }
    .auth-otp { gap: 8px; }
    .auth .auth-otp__digit { height: 54px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth *, .auth *::before, .auth *::after { transition: none !important; }
}
