/* ============================================================================
   SkyeScraper — signed-out screens (login / register)

   The left-hand stage is a Dubai skyline drawn entirely in SVG + CSS: no photo,
   no external asset, nothing to download. Its palette is driven by a single
   [data-daypart] attribute on <html>, so the whole scene re-grades itself for
   the time of day (dawn / day / dusk / night).

   Everything on the form side is built on the app's own --th-* theme tokens, so
   these pages keep following the platform palette like the rest of the product.
   ========================================================================== */

/* ---------------------------------------------------------------- palettes */
/* Each daypart only redefines colour + light position. Geometry never moves,
   which is what lets the whole scene cross-fade on a single attribute swap. */

.auth-shell {
    /* Fallback = golden hour, so an unknown daypart still looks deliberate. */
    --sky-1: #10406e;
    --sky-2: #3d84b8;
    --sky-3: #f7c887;
    --sky-4: #ffb268;

    --sun-core: #fff6dd;
    --sun-glow: #ffb45e;
    --sun-x: 1062px;
    --sun-y: 430px;
    --sun-r: 62px;
    --sun-opacity: 1;

    --star-opacity: 0;
    --moon-opacity: 0;

    --cloud: #ffe4c4;
    --cloud-opacity: .55;

    --far: #7ea6c6;
    --mid: #4d789b;
    --near: #24405c;
    --rim: #ffd9a0;
    --rim-opacity: .55;

    --window: #fff0cc;
    --window-opacity: .30;

    --water-1: #35719d;
    --water-2: #1d4468;
    --shimmer: #ffd9a0;

    --haze: #ffc98a;
    --haze-opacity: .40;

    --beacon: #ff6b5a;
    --stage-ink: #ffffff;
    --stage-ink-soft: rgba(255, 255, 255, .78);
}

/* Fresh, cool, high-altitude morning. Low contrast, lots of air. */
.auth-shell[data-daypart="dawn"] {
    --sky-1: #1d5c93;
    --sky-2: #74b4d8;
    --sky-3: #cfe7ef;
    --sky-4: #ffe0c4;

    --sun-core: #ffffff;
    --sun-glow: #ffd5a8;
    --sun-x: 1062px;
    --sun-y: 520px;
    --sun-r: 48px;
    --sun-opacity: .95;

    --star-opacity: 0;
    --moon-opacity: 0;

    --cloud: #ffffff;
    --cloud-opacity: .8;

    --far: #b9d3e2;
    --mid: #8bb0c8;
    --near: #4f7590;
    --rim: #ffffff;
    --rim-opacity: .5;

    --window: #eaf6ff;
    --window-opacity: .14;

    --water-1: #8dbdd8;
    --water-2: #4d84a8;
    --shimmer: #ffffff;

    --haze: #dff0f7;
    --haze-opacity: .55;
}

/* Golden hour — the "noon" look the brand palette is built around. */
.auth-shell[data-daypart="day"] {
    --sky-1: #10406e;
    --sky-2: #3d84b8;
    --sky-3: #f7c887;
    --sky-4: #ffb268;

    --sun-core: #fff6dd;
    --sun-glow: #ffb45e;
    --sun-x: 1062px;
    --sun-y: 430px;
    --sun-r: 62px;
    --sun-opacity: 1;

    --star-opacity: 0;
    --moon-opacity: 0;

    --cloud: #ffe4c4;
    --cloud-opacity: .55;

    --far: #7ea6c6;
    --mid: #4d789b;
    --near: #24405c;
    --rim: #ffd9a0;
    --rim-opacity: .55;

    --window: #fff0cc;
    --window-opacity: .3;

    --water-1: #35719d;
    --water-2: #1d4468;
    --shimmer: #ffd9a0;

    --haze: #ffc98a;
    --haze-opacity: .4;
}

/* Sunset — the hand-off between gold and night. */
.auth-shell[data-daypart="dusk"] {
    --sky-1: #131b45;
    --sky-2: #5b3577;
    --sky-3: #d95f6b;
    --sky-4: #ff9d54;

    --sun-core: #ffd9a0;
    --sun-glow: #ff7a4d;
    --sun-x: 1062px;
    --sun-y: 556px;
    --sun-r: 74px;
    --sun-opacity: 1;

    --star-opacity: .35;
    --moon-opacity: 0;

    --cloud: #ff9d78;
    --cloud-opacity: .5;

    --far: #57497e;
    --mid: #37305c;
    --near: #191634;
    --rim: #ff9d54;
    --rim-opacity: .7;

    --window: #ffce7a;
    --window-opacity: .8;

    --water-1: #3a3162;
    --water-2: #171331;
    --shimmer: #ff9d54;

    --haze: #ff8f5e;
    --haze-opacity: .38;
}

/* Night — the city doing what Dubai is famous for. */
.auth-shell[data-daypart="night"] {
    --sky-1: #04081c;
    --sky-2: #0b1738;
    --sky-3: #16305c;
    --sky-4: #274a74;

    --sun-core: #eef4ff;
    --sun-glow: #7fa8d8;
    --sun-x: 1062px;
    --sun-y: 238px;
    --sun-r: 40px;
    --sun-opacity: 0;

    --star-opacity: 1;
    --moon-opacity: 1;

    --cloud: #35507d;
    --cloud-opacity: .38;

    --far: #1b2c4e;
    --mid: #131f3b;
    --near: #070c1c;
    --rim: #6ea3dd;
    --rim-opacity: .35;

    --window: #ffd08a;
    --window-opacity: 1;

    --water-1: #0d1a34;
    --water-2: #04081a;
    --shimmer: #ffc978;

    --haze: #24406b;
    --haze-opacity: .45;
}

/* ------------------------------------------------------------------- shell */

.auth-shell {
    min-height: 100%;
    margin: 0;
    background: var(--th-body-bg, #0b1120);
    font-family: 'Poppins', var(--bs-family, sans-serif);
    /* The stage is a fixed, non-scrolling backdrop on desktop; only the form
       column scrolls. Set here rather than on <html> so the mobile layout can
       opt back into normal document scrolling. */
    overflow-x: hidden;
}

.auth {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* ======================================================================
   STAGE — the animated skyline
   ====================================================================== */

.auth__stage {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--sky-1);
    transition: background 1.6s ease;
}

.auth__scene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth__scene svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Every tinted element eases between dayparts rather than snapping. */
.auth__scene [class^='sc-'],
.auth__scene [class*=' sc-'] {
    transition: fill 1.6s ease, stop-color 1.6s ease, opacity 1.6s ease,
                stroke 1.6s ease;
}

/* --- sky ---------------------------------------------------------------- */
.sc-sky-1 { stop-color: var(--sky-1); }
.sc-sky-2 { stop-color: var(--sky-2); }
.sc-sky-3 { stop-color: var(--sky-3); }
.sc-sky-4 { stop-color: var(--sky-4); }

/* --- celestial ---------------------------------------------------------- */
.sc-sun-core { fill: var(--sun-core); }
.sc-sun-glow-1 { stop-color: var(--sun-glow); }
.sc-sun-glow-2 { stop-color: var(--sun-glow); }

/* Position lives on the outer group and the idle scale on the inner one, so
   the two never fight over the single `transform` property. The transform here
   overrides the fallback translate() attribute in the markup. */
.sc-sun {
    opacity: var(--sun-opacity);
    transform-box: view-box;
    transform: translate(var(--sun-x), var(--sun-y));
    transition: opacity 1.6s ease, transform 1.6s ease;
}

.sc-sun-inner {
    transform-box: fill-box;
    transform-origin: center;
    animation: sun-breathe 9s ease-in-out infinite;
}

/* Geometry properties as CSS — supported everywhere the rest of this scene is.
   The r="62" attribute in the markup covers anything that disagrees. */
.sc-sun-core { r: var(--sun-r); }

@keyframes sun-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.045); }
}

.sc-moon { opacity: var(--moon-opacity); }
.sc-moon-body { fill: #eef4ff; }
.sc-moon-shadow { fill: var(--sky-1); }

.sc-stars { opacity: var(--star-opacity); }

.sc-star {
    fill: #ffffff;
    animation: twinkle 4s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: .25; }
    50%      { opacity: 1; }
}

/* --- atmosphere --------------------------------------------------------- */
.sc-haze-1 { stop-color: var(--haze); }
.sc-haze { opacity: var(--haze-opacity); }

.sc-cloud {
    fill: var(--cloud);
    opacity: var(--cloud-opacity);
}

/* Clouds loop across the full viewBox width and are duplicated one width to
   the left, so the wrap is seamless. */
.sc-cloud-layer-a { animation: drift 96s linear infinite; }
.sc-cloud-layer-b { animation: drift 148s linear infinite; }
.sc-cloud-layer-c { animation: drift 210s linear infinite; }

@keyframes drift {
    from { transform: translateX(0); }
    to   { transform: translateX(1600px); }
}

/* --- skyline ------------------------------------------------------------ */
.sc-far   { fill: var(--far); }
.sc-mid   { fill: var(--mid); }
.sc-near  { fill: var(--near); }

/* A hairline of sun on the edge that faces the light. */
.sc-rim {
    fill: none;
    stroke: var(--rim);
    stroke-width: 1.5;
    opacity: var(--rim-opacity);
}

.sc-window {
    fill: var(--window);
    opacity: var(--window-opacity);
}

/* Only a minority of windows animate. Several hundred concurrent CSS
   animations costs real frames on weak hardware, and nobody can consciously
   track more than a few flickers at once anyway. */
.sc-window--live {
    animation: window-flicker 4s ease-in-out infinite;
}

/* Windows breathe very slightly and at wildly different rates, which reads as
   a lived-in building rather than a texture. */
@keyframes window-flicker {
    0%, 100% { opacity: calc(var(--window-opacity) * .55); }
    50%      { opacity: var(--window-opacity); }
}

/* Aircraft-warning beacon on the Burj Khalifa spire. */
.sc-beacon {
    fill: var(--beacon);
    animation: beacon 2.6s ease-in-out infinite;
}

@keyframes beacon {
    0%, 62%, 100% { opacity: .12; }
    72%, 84%      { opacity: 1; }
}

/* --- water -------------------------------------------------------------- */
.sc-water-1 { stop-color: var(--water-1); }
.sc-water-2 { stop-color: var(--water-2); }

.sc-shimmer {
    fill: var(--shimmer);
    opacity: .22;
    animation: shimmer 7s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(0)     scaleX(1);    opacity: .10; }
    50%      { transform: translateX(-14px) scaleX(1.08); opacity: .28; }
}

/* Reflection of the skyline, flipped and softened. */
.sc-reflection {
    opacity: .16;
    animation: ripple 11s ease-in-out infinite;
}

@keyframes ripple {
    0%, 100% { transform: scaleY(-1) translateY(0)   skewX(0deg); }
    50%      { transform: scaleY(-1) translateY(-3px) skewX(.6deg); }
}

/* --- foreground light motes --------------------------------------------- */
.auth__motes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth__mote {
    position: absolute;
    bottom: -12%;
    border-radius: 50%;
    background: var(--shimmer);
    filter: blur(.5px);
    opacity: 0;
    animation: mote-rise linear infinite;
}

@keyframes mote-rise {
    0%        { transform: translateY(0) translateX(0);        opacity: 0; }
    12%       {                                                opacity: .7; }
    88%       {                                                opacity: .5; }
    100%      { transform: translateY(-104vh) translateX(38px); opacity: 0; }
}

/* A slow bar of light sweeping the glass. Sells "premium" cheaply. */
.auth__sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(104deg,
        transparent 38%,
        rgba(255, 255, 255, .07) 47%,
        rgba(255, 255, 255, .14) 50%,
        rgba(255, 255, 255, .07) 53%,
        transparent 62%);
    background-size: 260% 100%;
    animation: sheen 14s ease-in-out infinite;
    mix-blend-mode: overlay;
}

@keyframes sheen {
    0%, 100% { background-position: 130% 0; }
    50%      { background-position: -30% 0; }
}

/* Vignette so the copy always has something to sit on. */
.auth__stage::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(120% 82% at 50% 106%, rgba(0, 0, 0, .58), transparent 62%),
        linear-gradient(180deg, rgba(0, 0, 0, .30) 0%, transparent 34%);
}

/* ======================================================================
   STAGE COPY
   ====================================================================== */

.auth__copy {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 56px 60px 64px;
    color: var(--stage-ink);
    text-shadow: 0 2px 24px rgba(0, 0, 0, .45);
}

.auth__badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px 8px 12px;
    margin-bottom: auto;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .26);
    background: rgba(255, 255, 255, .11);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .01em;
    white-space: nowrap;
}

.auth__badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--shimmer);
    box-shadow: 0 0 0 0 var(--shimmer);
    animation: pulse-dot 2.4s ease-out infinite;
}

@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(255, 217, 160, .7); }
    70%  { box-shadow: 0 0 0 9px rgba(255, 217, 160, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 217, 160, 0); }
}

.auth__eyebrow {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .85;
    margin: 0 0 14px;
}

.auth__title {
    font-size: clamp(38px, 4.4vw, 62px);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 18px;
}

.auth__title span {
    background: linear-gradient(96deg, #ffffff 12%, var(--shimmer) 92%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth__lede {
    font-size: 17px;
    line-height: 1.6;
    max-width: 46ch;
    margin: 0 0 34px;
    color: var(--stage-ink-soft);
}

.auth__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.auth__stat {
    flex: 1 1 130px;
    min-width: 130px;
    padding: 15px 18px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .09);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), background .35s;
}

.auth__stat:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, .15);
}

.auth__stat b {
    display: block;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.2;
}

.auth__stat span {
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--stage-ink-soft);
}

/* ======================================================================
   ENTRANCE CHOREOGRAPHY
   Elements carry --d (delay index); one rule animates all of them.
   ====================================================================== */

/* fill-mode `both` rather than a base `opacity: 0` + `forwards`: the hidden
   state then lives only inside the animation. If the animation never runs — no
   animation support, a frozen timeline, reduced motion — the element simply
   stays visible instead of leaving the page blank. */
.rise {
    animation: rise .85s cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: calc(var(--d, 0) * 90ms + 120ms);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}

/* ======================================================================
   PANEL — the form column
   ====================================================================== */

.auth__panel {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 32px 24px;
    background: var(--th-surface, #fff);
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Faint brand wash top and bottom so the panel is not a flat slab. */
.auth__panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(88% 44% at 100% 0%,   var(--th-primary-soft, rgba(224, 168, 0, .16)), transparent 70%),
        radial-gradient(76% 40% at 0%   100%, var(--th-primary-soft, rgba(224, 168, 0, .16)), transparent 72%);
    opacity: .75;
}

.auth__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 452px;
    margin: auto 0;
}

/* Sign-up has far more fields than sign-in, so it gets a wider card and pairs
   its short fields two-up (see .auth__grid) to keep the form near one screen. */
.auth__card--wide { max-width: 528px; }

.auth__heading {
    text-align: center;
    margin: 0 0 3px;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -.015em;
    color: var(--th-heading, #16202c);
}

.auth__sub {
    text-align: center;
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--th-text-muted, #667);
}

/* Two-up field pairing. Collapses before the columns get too narrow to hold a
   placeholder. jQuery .show()/.hide() on a child still works — display:block on
   a grid item keeps it a grid item. */
.auth__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
}

@media (max-width: 660px) {
    .auth__grid { grid-template-columns: 1fr; }
}

/* Tighter than Bootstrap's 1rem, applied only inside the card. */
.auth__card .mb-3 { margin-bottom: 11px; }

/* ---------------------------------------------------------------- fields */

.auth__card .form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
    color: var(--th-text, #24303f);
}

.auth__card .required {
    color: #e5484d;
    margin-left: 2px;
}

.auth__card .form-control,
.auth__card .form-select {
    width: 100%;
    height: 44px;
    padding: 10px 15px;
    border-radius: 12px;
    border: 1.5px solid var(--th-border, #e3e8ef);
    /* background-color, never the `background` shorthand: the shorthand resets
       background-image, which is where .form-select keeps its dropdown caret. */
    background-color: var(--th-input-bg, #fff);
    color: var(--th-input-text, #16202c);
    font-family: inherit;
    font-size: 15px;
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s, background .2s, transform .2s;
}

.auth__card textarea.form-control { height: auto; }

.auth__card .form-control::placeholder { color: var(--th-placeholder, #9aa5b4); }

.auth__card .form-control:hover,
.auth__card .form-select:hover { border-color: var(--th-primary, #e0a800); }

.auth__card .form-control:focus,
.auth__card .form-select:focus {
    outline: none;
    border-color: var(--th-primary, #e0a800);
    background-color: var(--th-input-bg, #fff);
    box-shadow: 0 0 0 4px var(--th-primary-soft, rgba(224, 168, 0, .22));
    transform: translateY(-1px);
}

.auth__card .form-control.is-invalid,
.auth__card .form-control[aria-invalid="true"] {
    border-color: #e5484d;
    box-shadow: 0 0 0 4px rgba(229, 72, 77, .16);
    animation: shake .4s;
}

@keyframes shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-5px); }
    40%, 60% { transform: translateX(5px); }
}

.auth__card input[type="file"].form-control {
    padding: 10px 14px;
    font-size: 12.5px;
}

/* The phone field reads as one control: the dialling code is welded to the
   number rather than sitting in its own box. */
.auth__card .input-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

/* Bootstrap sizes input-group children with `flex: 1 1 auto; width: 1%`, but
   the `width: 100%` above outranks it — both halves then demand a full line and
   .input-group's default flex-wrap drops the number onto its own row. Both
   children therefore get their sizing restated here. */
.auth__card .input-group > .form-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 98px;
    padding-right: 32px;
    border-radius: 12px 0 0 12px;
    border-right: 0;
    background-position: right 12px center;
    background-size: 12px 9px;
}

.auth__card .input-group > .form-control {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    border-radius: 0 12px 12px 0;
}

/* Lifting only one half on focus would tear the seam open; the focus ring is
   raised instead so it is not clipped by the neighbour. */
.auth__card .input-group > .form-select:focus,
.auth__card .input-group > .form-control:focus {
    transform: none;
    z-index: 2;
}

/* Error text reserves no space until it has something to say. */
.auth__card .text-danger:not(:empty) {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.45;
    color: #e5484d;
    animation: rise .3s ease both;
}

.form-note {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--th-text-muted, #77839a);
}

/* ---------------------------------------------------------------- buttons */

.auth-btn {
    position: relative;
    display: block;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 24px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(96deg,
        var(--th-primary, #e0a800),
        var(--th-primary-hover, #f0bd2a));
    color: var(--th-primary-contrast, #1b1400);
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 10px 26px -10px var(--th-primary, rgba(224, 168, 0, .8));
    transition: transform .22s cubic-bezier(.22, 1, .36, 1),
                box-shadow .22s, filter .22s;
}

/* Sweep of light on hover. A pseudo-element, deliberately — the OTP flow
   rewrites this button's text with .text(), which would wipe real markup. */
.auth-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -70%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: skewX(-18deg);
    transition: left .6s cubic-bezier(.22, 1, .36, 1);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -12px var(--th-primary, rgba(224, 168, 0, .9));
    filter: saturate(1.08);
}

.auth-btn:hover::after { left: 125%; }

.auth-btn:active { transform: translateY(0); }

.auth-btn:focus-visible {
    outline: 3px solid var(--th-primary, #e0a800);
    outline-offset: 3px;
}

.auth-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-btn:disabled::after { display: none; }

.auth-btn--ghost {
    background: transparent;
    color: var(--th-link, #0b63ce);
    box-shadow: none;
    height: 46px;
    font-size: 15px;
    font-weight: 500;
}

.auth-btn--ghost:hover {
    background: var(--th-primary-soft, rgba(224, 168, 0, .16));
    transform: none;
    box-shadow: none;
}

.auth__actions { margin-top: 14px; }

/* ---------------------------------------------------------------- divider */

.auth__divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 12px 0 8px;
    font-size: 12.5px;
    color: var(--th-text-muted, #77839a);
}

.auth__divider::before,
.auth__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--th-border, #e3e8ef), transparent);
}

/* ---------------------------------------------------------------- social */

.auth__social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.auth__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid var(--th-border, #e3e8ef);
    background: var(--th-surface, #fff);
    color: var(--th-text, #24303f);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    transition: transform .22s cubic-bezier(.22, 1, .36, 1),
                border-color .22s, box-shadow .22s;
}

.auth__social a:hover {
    transform: translateY(-2px);
    border-color: var(--th-primary, #e0a800);
    box-shadow: 0 10px 22px -12px var(--th-shadow, rgba(15, 23, 42, .45));
}

/* The mark is a square box the SVG fills completely. Sized in its own right
   rather than squeezed into a shared img rule — the previous 20x20 clamp was
   what flattened the old wide-lockup files into an unreadable strip. */
.auth__social-mark {
    flex: 0 0 auto;
    display: block;
    width: 20px;
    height: 20px;
}

.auth__social-mark svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* ---------------------------------------------------------------- footer */

.auth__foot {
    margin-top: 12px;
    text-align: center;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--th-text-muted, #77839a);
}

.auth__foot a {
    color: var(--th-link, #0b63ce);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s, color .2s;
}

.auth__foot a:hover {
    color: var(--th-link-hover, #094ea5);
    border-bottom-color: currentColor;
}

/* The two footer lines do different jobs — "Register Now" is a conversion
   step, "Contact Us" is support — but they were identical in size, weight and
   colour and stacked tightly enough to read as one run-on sentence. A rule
   separates them; demoting the second one ranks them. */
/* font-size is restated, not inherited: style.css and theme.css both carry a
   bare `p { font-size: ... }`, and a direct element rule beats inheritance
   from .auth__foot — leaving these lines at 16px. */
.auth__foot-primary {
    margin: 0;
    font-size: 13.5px;
}

.auth__foot-secondary {
    margin: 11px 0 0;
    padding-top: 11px;
    border-top: 1px solid var(--th-border, #e3e8ef);
    font-size: 12.5px;
}

.auth__foot-secondary a {
    color: var(--th-text-muted, #77839a);
    font-weight: 500;
    border-bottom: 0;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.auth__foot-secondary a:hover {
    color: var(--th-link, #0b63ce);
    border-bottom: 0;
}

/* ---------------------------------------------------------------- OTP step */

/* Revealed by jQuery .show(), which sets display:block — so the animation has
   to be safe to run on an already-visible element. */
.otp-box,
#step2 {
    animation: rise .45s cubic-bezier(.22, 1, .36, 1) both;
}

.otp-box { margin-top: 20px; }

.auth__otp-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    min-height: 22px;
    font-size: 13px;
}

.auth__otp-meta a {
    color: var(--th-link, #0b63ce);
    font-weight: 600;
    text-decoration: none;
}

.auth__otp-meta a:hover { text-decoration: underline; }

#otp-timer { font-size: 13px; }

/* Wide tracking makes a 6-digit code readable as a code. */
#otp {
    letter-spacing: .38em;
    font-size: 19px;
    font-weight: 600;
    text-align: center;
}

#otp::placeholder { letter-spacing: normal; font-weight: 400; }

/* ---------------------------------------------------------------- register bits */

.role-tabs {
    position: relative;
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    padding: 4px;
    border-radius: 12px;
    background: var(--th-surface-alt, #f1f4f9);
    border: 1px solid var(--th-border, #e3e8ef);
}

.role-tab {
    flex: 1 1 0;
    padding: 8px 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--th-text-muted, #77839a);
    cursor: pointer;
    transition: color .22s, background .22s, box-shadow .22s;
}

.role-tab:hover { color: var(--th-text, #24303f); }

.role-tab.is-active {
    background: var(--th-surface, #fff);
    color: var(--th-text, #24303f);
    font-weight: 600;
    box-shadow: 0 2px 10px -4px var(--th-shadow, rgba(15, 23, 42, .4));
}

.role-tab:focus-visible {
    outline: 2px solid var(--th-primary, #e0a800);
    outline-offset: 1px;
}

.country-choice { display: flex; gap: 8px; }

/* Kept as visible buttons rather than a dropdown — the choice drives which
   payment gateway the account gets, so it should not be hidden behind a click.
   Tightened to a single line of name so the row costs ~44px, not ~104px. */
.country-choice-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 7px 10px;
    border: 1.5px solid var(--th-border, #e3e8ef);
    border-radius: 11px;
    background: var(--th-input-bg, #fff);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--th-text, #24303f);
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .2s;
}

/* Long names ("United Arab Emirates") truncate instead of wrapping the button
   to a second line and dragging the whole row taller. */
.country-choice-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.country-choice-btn:hover {
    border-color: var(--th-primary, #e0a800);
    transform: translateY(-1px);
}

.country-choice-btn.is-active {
    border-color: var(--th-primary, #e0a800);
    background: var(--th-primary-soft, rgba(224, 168, 0, .16));
    font-weight: 600;
}

.country-choice-code {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 400;
    opacity: .72;
}

.country-choice-btn:focus-visible {
    outline: 2px solid var(--th-primary, #e0a800);
    outline-offset: 1px;
}

.terms-conditions label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--th-text-muted, #77839a);
    cursor: pointer;
}

.terms-conditions input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: var(--th-primary, #e0a800);
    cursor: pointer;
}

.terms-conditions a {
    color: var(--th-link, #0b63ce);
    font-weight: 600;
    text-decoration: none;
}

.terms-conditions a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- loader */

#loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    place-content: center;
    justify-items: center;
    gap: 14px;
    background: color-mix(in srgb, var(--th-body-bg, #0b1120) 72%, transparent);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 14.5px;
    font-weight: 500;
}

/* jQuery .show() sets display:block; keep the centring it would otherwise kill. */
#loader[style*="block"] { display: grid !important; }

#loader img {
    width: 58px;
    animation: spin 1.1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- modals */

.auth-shell .modal-content {
    border: 1px solid var(--th-border, #e3e8ef);
    border-radius: 20px;
    background: var(--th-surface, #fff);
    color: var(--th-text, #24303f);
    overflow: hidden;
}

.auth-shell .modal-header {
    border-bottom: 1px solid var(--th-border, #e3e8ef);
    padding: 18px 24px;
}

.auth-shell .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--th-heading, #16202c);
}

.auth-shell .modal-body { padding: 24px; }

/* Contact card inside the "Contact us" modal. */
.contact-card-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    align-items: flex-start;
}

.contact-top {
    flex: 1 1 240px;
    display: flex;
    gap: 16px;
    text-align: left;
}

.contact-top h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--th-heading, #16202c);
}

.contact-top .subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--th-text-muted, #77839a);
}

.icon-badge {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--th-primary, #e0a800);
    color: var(--th-primary-contrast, #1b1400);
    font-size: 22px;
}

.contact-info {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--th-border, #e3e8ef);
    border-radius: 14px;
    font-size: 14px;
    transition: border-color .2s, transform .2s;
}

.contact-item:hover {
    border-color: var(--th-primary, #e0a800);
    transform: translateY(-1px);
}

.contact-item .icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--th-primary, #e0a800);
    color: var(--th-primary-contrast, #1b1400);
    font-size: 15px;
}

/* ======================================================================
   RESPONSIVE
   ====================================================================== */

@media (max-width: 1200px) {
    .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .auth__copy { padding: 44px 40px 48px; }
}

@media (max-width: 991px) {
    /* Stage becomes a banner and the page scrolls normally. */
    .auth {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .auth__stage {
        min-height: 330px;
        height: 46vh;
    }

    .auth__panel {
        max-height: none;
        overflow: visible;
        padding: 36px 28px 52px;
    }

    .auth__copy { padding: 30px 32px 34px; }
    .auth__title { font-size: clamp(30px, 6vw, 44px); }
    .auth__lede { display: none; }
    .auth__stats { gap: 10px; }
    .auth__stat { padding: 11px 14px; }
    .auth__stat b { font-size: 17px; }
    .auth__stat span { font-size: 11px; }
}

@media (max-width: 575px) {
    .auth__stage { min-height: 260px; height: 34vh; }
    .auth__copy { padding: 22px 22px 26px; }
    .auth__badge { padding: 6px 13px 6px 10px; font-size: 12px; }
    .auth__eyebrow { font-size: 12px; margin-bottom: 8px; }
    .auth__stats { display: none; }
    .auth__panel { padding: 30px 20px 44px; }
    .auth__heading { font-size: 21px; }
    .auth__social { grid-template-columns: 1fr; }
    .auth__card .input-group > .form-select {
        min-width: 92px;
        padding-left: 14px;
        padding-right: 28px;
    }
    /* Stays a row: the names truncate but the dialling code underneath keeps
       each option unambiguous, and stacking would cost ~100px of scroll. */
    .country-choice { gap: 6px; }
    .country-choice-btn { padding: 7px 8px; font-size: 12px; }
}

/* ======================================================================
   MOTION PREFERENCES
   Kill ambient motion, keep state changes (focus, hover) responsive.
   ====================================================================== */

@media (prefers-reduced-motion: reduce) {
    .sc-cloud-layer-a,
    .sc-cloud-layer-b,
    .sc-cloud-layer-c,
    .sc-star,
    .sc-sun-inner,
    .sc-window--live,
    .sc-beacon,
    .sc-shimmer,
    .sc-reflection,
    .auth__mote,
    .auth__sheen,
    .auth__badge-dot,
    #loader img {
        animation: none !important;
    }

    .rise,
    .otp-box,
    #step2 {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .auth__mote { display: none; }
}
