/*
 * Auth surface design system — login, registration wizard, password reset,
 * OTP / 2FA, ban. Self-contained: it does NOT depend on the dashboard-only
 * fintech-theme.css. It reads --base-h/s/l from color.php (loaded just
 * before this file) and re-declares the token layer it needs, copied from
 * fintech-theme.css so the investor-portal look matches exactly.
 *
 * Used by resources/views/layouts/auth.blade.php for BOTH the investor and
 * the admin auth pages (admin intentionally shares the investor palette
 * here).
 */

:root {
    /* Core neutrals (from main.css) */
    --heading: 232 33% 31%;
    --body: 223 22% 41%;
    --border: 0 0% 90%;
    --white: 0 0% 100%;

    /* Brand ramp derived from color.php's --base-h/s/l */
    --base: var(--base-h) var(--base-s) var(--base-l);
    --base-600: var(--base-h) var(--base-s) calc(var(--base-l) - 5%);
    --base-700: var(--base-h) var(--base-s) calc(var(--base-l) - 10%);
    --base-800: var(--base-h) var(--base-s) calc(var(--base-l) - 15%);
    --base-tint: var(--base-h) calc(var(--base-s) * 0.5) 94%;

    /* Semantic + accent (FarmX palette, from fintech-theme.css) */
    --success: 122 51% 45%;
    --warning: 33 89% 54%;
    --danger: 1 87% 59%;
    --gold: 40 68% 55%;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-full: 999px;

    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .06);
    --shadow-sm: 0 2px 8px rgba(16, 24, 40, .08);
    --shadow-md: 0 10px 30px rgba(16, 24, 40, .10);
    --shadow-lg: 0 24px 60px rgba(16, 24, 40, .16);

    /* 3D icon-badge treatment (gradient fill + colored glow + inset spec) */
    --grad-base: linear-gradient(155deg, hsl(var(--base-h) var(--base-s) 62%), hsl(var(--base-h) var(--base-s) 38%));
    --grad-gold: linear-gradient(155deg, color-mix(in srgb, hsl(var(--gold)) 78%, white), color-mix(in srgb, hsl(var(--gold)) 88%, black));
    --grad-success: linear-gradient(155deg, color-mix(in srgb, hsl(var(--success)) 75%, white), color-mix(in srgb, hsl(var(--success)) 85%, black));
    --glow-base: 0 6px 16px hsl(var(--base) / .38), inset 0 1px 1px rgba(255, 255, 255, .45);
    --glow-gold: 0 6px 16px hsl(var(--gold) / .38), inset 0 1px 1px rgba(255, 255, 255, .45);
}

/* ------------------------------------------------------------------ base */

html { overflow-x: hidden; }

.auth-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    color: hsl(var(--body));
    background: hsl(var(--base-h) 30% 97%);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.auth-body *,
.auth-body *::before,
.auth-body *::after { box-sizing: border-box; }

/* Any grid/flex child that holds a full-width input needs this or the
   input's intrinsic min-width blows the track out and the page scrolls
   sideways on small screens. */
.auth-body input,
.auth-body select,
.auth-body textarea { min-width: 0; max-width: 100%; }

.auth-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    height: 100vh;
    height: 100svh;
    width: 100%;
    max-width: 100%;
    overflow: hidden;               /* the shell itself never scrolls */
}

/* --------------------------------------------------------- brand panel */

.auth-brand {
    /* Overridden with url('…') by pages that have a background photo. */
    --auth-bg: linear-gradient(155deg, hsl(var(--base-h) var(--base-s) 30%), hsl(var(--base-h) var(--base-s) 13%));
    position: relative;
    overflow: hidden;
    height: 100svh;
    padding: 56px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    color: #fff;
    isolation: isolate;
    background:
        linear-gradient(155deg, hsl(var(--base-h) var(--base-s) 22%), hsl(var(--base-h) calc(var(--base-s) * .8) 11%));
}

/* Layer 1 — optional photo, darkened and brand-tinted so text stays crisp */
.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(160deg, hsl(var(--base-h) var(--base-s) 20% / .82), hsl(var(--base-h) var(--base-s) 10% / .94)),
        var(--auth-bg) center / cover no-repeat;
}

/* Layer 2 — colourful gradient mesh + faint grid, floats gently */
.auth-brand::after {
    content: "";
    position: absolute;
    inset: -20%;
    z-index: -1;
    background:
        radial-gradient(46% 40% at 14% 8%, hsl(var(--base-h) var(--base-s) 52% / .55) 0%, transparent 70%),
        radial-gradient(42% 46% at 92% 96%, hsl(var(--gold) / .5) 0%, transparent 68%),
        radial-gradient(38% 34% at 78% 12%, hsl(var(--success) / .35) 0%, transparent 72%),
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 46px 46px,
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 46px 46px;
    animation: authMesh 22s ease-in-out infinite alternate;
}

@keyframes authMesh {
    from { transform: translate3d(-2%, -1%, 0) rotate(-1.5deg); }
    to   { transform: translate3d(3%, 2%, 0) rotate(1.5deg); }
}

/* Floating 3D orbs */
.auth-brand__orb {
    position: absolute;
    border-radius: 50%;
    z-index: -1;
    filter: blur(2px);
    opacity: .9;
    pointer-events: none;
}
.auth-brand__orb--1 {
    width: 190px; height: 190px; right: -46px; top: 16%;
    background: radial-gradient(circle at 32% 30%, #fff9, transparent 45%), var(--grad-gold);
    box-shadow: 0 30px 60px hsl(var(--gold) / .35);
    animation: authFloat 9s ease-in-out infinite;
}
.auth-brand__orb--2 {
    width: 120px; height: 120px; left: -34px; bottom: 12%;
    background: radial-gradient(circle at 32% 30%, #fff8, transparent 45%), var(--grad-base);
    box-shadow: 0 24px 50px hsl(var(--base) / .45);
    animation: authFloat 11s ease-in-out infinite reverse;
}
.auth-brand__orb--3 {
    width: 64px; height: 64px; right: 22%; bottom: 24%;
    background: radial-gradient(circle at 32% 30%, #fff9, transparent 45%), var(--grad-success);
    box-shadow: 0 16px 34px hsl(var(--success) / .4);
    animation: authFloat 7s ease-in-out infinite .6s;
}
@keyframes authFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50%      { transform: translateY(-18px) rotate(6deg); }
}

.auth-brand > *:not(.auth-brand__orb):not(.auth-orb-card) { position: relative; z-index: 1; }

/* Floating glass "portfolio" card — decorative */
.auth-orb-card {
    position: absolute;
    right: 40px;
    bottom: 96px;
    width: 244px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    transform: perspective(900px) rotateX(6deg) rotateY(-9deg);
    animation: authFloat 12s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}
.auth-orb-card__label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.auth-orb-card__value { font-size: 1.5rem; font-weight: 700; color: #fff; margin: 2px 0 12px; }
.auth-orb-card__spark { display: flex; align-items: flex-end; gap: 5px; height: 40px; }
.auth-orb-card__spark span {
    flex: 1;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, hsl(var(--gold)), hsl(var(--gold) / .35));
}
.auth-orb-card__spark span:nth-child(1) { height: 40%; }
.auth-orb-card__spark span:nth-child(2) { height: 65%; }
.auth-orb-card__spark span:nth-child(3) { height: 48%; }
.auth-orb-card__spark span:nth-child(4) { height: 82%; }
.auth-orb-card__spark span:nth-child(5) { height: 60%; background: linear-gradient(180deg, hsl(var(--success)), hsl(var(--success) / .35)); }
.auth-orb-card__spark span:nth-child(6) { height: 100%; background: linear-gradient(180deg, hsl(var(--success)), hsl(var(--success) / .35)); }

@media (prefers-reduced-motion: reduce) {
    .auth-brand::after,
    .auth-brand__orb,
    .auth-orb-card { animation: none !important; }
}

.auth-brand__logo {
    position: absolute;
    top: 40px;
    left: 56px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    text-decoration: none;
}
.auth-brand__logo img {
    height: 34px;
    width: 34px;
    object-fit: contain;
    border-radius: 8px;
}
.auth-brand__logo-name { letter-spacing: -.01em; }

.auth-brand__emblem {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: var(--radius-xl);
    display: grid;
    place-items: center;
    font-size: 2.5rem;
    color: #fff;
    background: var(--grad-base);
    box-shadow:
        0 18px 40px hsl(var(--base) / .5),
        0 6px 12px hsl(var(--base) / .4),
        inset 0 2px 2px rgba(255, 255, 255, .55),
        inset 0 -6px 14px rgba(0, 0, 0, .25);
    margin-bottom: 26px;
    transform: perspective(600px) rotateX(8deg);
}
.auth-brand__emblem::after { /* glossy top highlight */
    content: "";
    position: absolute;
    inset: 3px 3px 44% 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 40% 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, .38), transparent);
    pointer-events: none;
}

.auth-brand__title {
    font-size: clamp(1.8rem, 3.2vw, 2.7rem);
    line-height: 1.15;
    font-weight: 700;
    margin: 0 0 14px;
    max-width: 20ch;
}
.auth-brand__title .grad {
    background: linear-gradient(100deg, #fff 0%, hsl(var(--gold) / 1) 120%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-brand__sub {
    font-size: 1.02rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .82);
    margin: 0 0 30px;
    max-width: 42ch;
}

.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.auth-points li { display: flex; align-items: flex-start; gap: 14px; font-size: .95rem; color: rgba(255, 255, 255, .9); }
.auth-points__ic {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, .25);
}
.auth-points li strong { display: block; font-weight: 600; color: #fff; margin-bottom: 2px; }

.auth-brand__foot {
    position: absolute;
    bottom: 26px;
    left: 56px;
    z-index: 2;
    font-size: .82rem;
    color: rgba(255, 255, 255, .55);
}

/* --------------------------------------------------------- form panel */

.auth-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100svh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px;
    background: hsl(var(--base-h) 30% 97%);
}
/* Flex spacers: centre the card when there's room, collapse and let the
   panel scroll when a form is taller than the screen (bulletproof — no
   flexbox top-clipping). */
.auth-panel::before,
.auth-panel::after { content: ""; flex: 1 1 0; min-height: 12px; }
.auth-panel > * { flex-shrink: 0; }

.auth-topbar {
    width: 100%;
    max-width: 460px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.auth-topbar__logo { display: none; align-items: center; gap: 10px; font-weight: 600; color: hsl(var(--heading)); text-decoration: none; }
.auth-topbar__logo img { height: 32px; }
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .86rem;
    color: hsl(var(--body));
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    background: #fff;
    box-shadow: var(--shadow-xs);
}
.auth-back:hover { color: hsl(var(--base-700)); }

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 30px 30px 26px;
}

/* The registration wizard's nav row stays pinned to the bottom of the
   card while a tall step (step 2) scrolls above it, so Next is never
   lost. Opaque white strip — the buttons inside keep their own fill. */
.auth-card form > .auth-btn-row {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: 16px;
    padding: 12px 0 4px;
    background: #fff;
}

.auth-card__head { margin-bottom: 20px; }
.auth-card__eyebrow {
    display: inline-block;
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 600;
    color: hsl(var(--base-700));
    background: hsl(var(--base-tint));
    padding: 5px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}
.auth-card__title { font-size: 1.5rem; font-weight: 700; color: hsl(var(--heading)); margin: 0 0 8px; }
.auth-card__desc { font-size: .92rem; line-height: 1.6; color: hsl(var(--body)); margin: 0; }

/* ------------------------------------------------------------- stepper */

.auth-stepper { margin-bottom: 24px; }
.auth-stepper__dots { display: flex; gap: 8px; margin-bottom: 10px; }
.auth-stepper__dot {
    flex: 1;
    height: 6px;
    border-radius: var(--radius-full);
    background: hsl(var(--border));
    transition: background .25s ease;
}
.auth-stepper__dot.is-done { background: hsl(var(--success)); }
.auth-stepper__dot.is-active { background: var(--grad-base); box-shadow: 0 2px 8px hsl(var(--base) / .4); }
.auth-stepper__meta { display: flex; justify-content: space-between; align-items: baseline; }
.auth-stepper__count { font-size: .78rem; font-weight: 600; color: hsl(var(--base-700)); }
.auth-stepper__label { font-size: .82rem; color: hsl(var(--body)); }

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

.auth-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-grid-2 > * { min-width: 0; }

.auth-field { margin-bottom: 16px; }
.auth-field > label,
.auth-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: hsl(var(--heading));
    margin-bottom: 6px;
}
.auth-label .req { color: hsl(var(--danger)); }
.auth-hint { font-size: .78rem; color: hsl(var(--body)); margin-top: 5px; line-height: 1.5; }
.auth-hint--ok { color: hsl(var(--success)); font-weight: 600; }
.auth-hint--bad { color: hsl(var(--danger)); font-weight: 600; }

.auth-input,
.auth-body .form-control,
.auth-body .form--control {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: .95rem;
    color: hsl(var(--heading));
    background: #fff;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.auth-body textarea.form-control { height: auto; padding: 12px 14px; }
.auth-input:focus,
.auth-body .form-control:focus,
.auth-body .form--control:focus,
.auth-body .select2-container--focus .select2-selection {
    border-color: hsl(var(--base));
    box-shadow: 0 0 0 4px hsl(var(--base) / .14);
}
.auth-input::placeholder { color: hsl(var(--body) / .6); }

.auth-input-group { display: flex; align-items: stretch; min-width: 0; }
.auth-input-group .auth-input { flex: 1 1 auto; min-width: 0; }
.auth-input-group__addon {
    display: grid;
    place-items: center;
    min-width: 58px;
    padding: 0 10px;
    font-size: .9rem;
    font-weight: 600;
    color: hsl(var(--base-700));
    background: hsl(var(--base-tint));
    border: 1px solid hsl(var(--border));
    border-right: 0;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.auth-input-group .auth-input { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* select2 sizing so the plugin dropdown matches */
.auth-body .select2-container .select2-selection--single { height: 48px; border-radius: var(--radius-md); border-color: hsl(var(--border)); }
.auth-body .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 46px; padding-left: 14px; }
.auth-body .select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; }

/* checkbox row */
.auth-check { display: flex; align-items: flex-start; gap: 10px; font-size: .86rem; color: hsl(var(--body)); line-height: 1.5; }
.auth-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: hsl(var(--base)); flex: 0 0 auto; }
.auth-check a { color: hsl(var(--base-700)); font-weight: 600; }

.auth-inline-error { display: block; font-size: .78rem; font-weight: 600; color: hsl(var(--danger)); margin-top: 5px; }

/* show / hide password toggle (added by the layout script) */
.auth-pw { position: relative; }
.auth-pw > .auth-input { padding-right: 46px; }
.auth-pw__toggle {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: hsl(var(--body));
    font-size: 1.05rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.auth-pw__toggle:hover { color: hsl(var(--base-700)); background: hsl(var(--base-tint)); }

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

.auth-btn,
.auth-body input[type="submit"],
.auth-body .btn--base {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    padding: 0 20px;
    font-size: .98rem;
    font-weight: 600;
    color: #fff;
    border: 0;
    border-radius: var(--radius-md);
    /* Solid brand-green ALWAYS renders; the gradient sits on top only when
       the brand-colour variables resolve. Never transparent, never white. */
    background-color: #1e7d32;
    background-color: hsl(var(--base-h, 133) var(--base-s, 60%) 30%);
    background-image: linear-gradient(155deg, hsl(var(--base-h, 133) var(--base-s, 60%) 46%), hsl(var(--base-h, 133) var(--base-s, 60%) 28%));
    box-shadow: var(--glow-base);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.auth-btn:hover,
.auth-body input[type="submit"]:hover,
.auth-body .btn--base:hover { transform: translateY(-1px); box-shadow: 0 10px 24px hsl(var(--base) / .45), inset 0 1px 1px rgba(255, 255, 255, .45); color: #fff; }
.auth-btn:disabled, .auth-btn.is-disabled { opacity: .5; cursor: not-allowed; transform: none; }

.auth-btn--ghost {
    background-color: #fff;
    background-image: none;
    color: hsl(var(--base-700, 133 60% 22%));
    border: 1px solid hsl(var(--border, 0 0% 88%));
    box-shadow: var(--shadow-xs);
}
.auth-btn--ghost:hover { background: hsl(var(--base-tint)); color: hsl(var(--base-700)); box-shadow: var(--shadow-xs); }

.auth-btn-row { display: flex; gap: 12px; margin-top: 22px; }
.auth-btn-row .auth-btn { flex: 1; }

.auth-alt { text-align: center; font-size: .88rem; color: hsl(var(--body)); margin-top: 20px; }
.auth-alt a { color: hsl(var(--base-700)); font-weight: 600; }

.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 0 18px;
    font-size: .85rem;
}
.auth-links a { color: hsl(var(--base-700)); font-weight: 600; text-decoration: none; }

/* ------------------------------------------------------------- wizard steps */

.auth-step { display: none; }
.auth-step.is-active { display: block; animation: authStepIn .25s ease; }
@keyframes authStepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.auth-divider {
    height: 1px;
    background: hsl(var(--border));
    margin: 6px 0 18px;
}

.auth-step__title { font-size: 1.05rem; font-weight: 700; color: hsl(var(--heading)); margin: 0 0 4px; }
.auth-step__desc { font-size: .86rem; line-height: 1.55; color: hsl(var(--body)); margin: 0 0 18px; }

.auth-review { border: 1px solid hsl(var(--border)); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 18px; }
.auth-review__row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; font-size: .86rem; }
.auth-review__row + .auth-review__row { border-top: 1px solid hsl(var(--border)); }
.auth-review__row span:first-child { color: hsl(var(--body)); }
.auth-review__row span:last-child { color: hsl(var(--heading)); font-weight: 600; text-align: right; word-break: break-word; }

/* --------------------------------------------------------------- OTP boxes */

.auth-body .verification-code { position: relative; }
.auth-body .verification-code input {
    letter-spacing: 38px;
    padding-left: 26px;
    font-size: 1.4rem;
    font-weight: 700;
    color: transparent;
    text-shadow: 0 0 0 hsl(var(--heading));
    background: transparent;
    border: 0;
    width: 100%;
    height: 62px;
    caret-color: hsl(var(--base));
    position: relative;
    z-index: 2;
}
.auth-body .verification-code .boxes {
    position: absolute;
    inset: 0;
    display: flex;
    gap: 8px;
    z-index: 1;
}
.auth-body .verification-code .boxes span {
    flex: 1;
    display: grid;
    place-items: center;
    height: 62px;
    color: transparent;
    background: hsl(var(--base-h) 30% 97%);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-md);
}

/* --------------------------------------------------------------- states */

.auth-state {
    text-align: center;
}
.auth-state__ic {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: var(--radius-xl);
    display: grid;
    place-items: center;
    font-size: 2rem;
    color: #fff;
    background: var(--grad-base);
    box-shadow: var(--glow-base);
}
.auth-state__ic--danger { background: linear-gradient(155deg, color-mix(in srgb, hsl(var(--danger)) 78%, white), color-mix(in srgb, hsl(var(--danger)) 88%, black)); box-shadow: 0 6px 16px hsl(var(--danger) / .38), inset 0 1px 1px rgba(255,255,255,.45); }
.auth-state__reason {
    background: hsl(var(--base-h) 30% 97%);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: .9rem;
    color: hsl(var(--heading));
    margin: 16px 0;
}

.auth-countdown { font-size: .84rem; color: hsl(var(--body)); margin-top: 14px; text-align: center; }
.auth-countdown a { color: hsl(var(--base-700)); font-weight: 600; }

/* --------------------------------------------------------------- responsive */

@media (max-width: 991px) {
    /* One fixed screen: the shell is exactly the viewport and never
       scrolls; the brand collapses to a slim top strip and the form area
       below it is the single (internal) scroll region. */
    .auth-shell {
        display: flex;
        flex-direction: column;
        height: 100svh;
    }

    .auth-brand {
        flex: 0 0 auto;
        height: auto;
        padding: 12px 16px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        justify-content: flex-start;
    }
    .auth-brand__logo { position: static; }
    .auth-brand__logo img { height: 30px; width: 30px; }
    .auth-brand__logo-name { font-size: 1.05rem; }
    .auth-brand > div,
    .auth-brand__emblem,
    .auth-brand__title,
    .auth-brand__sub,
    .auth-points,
    .auth-brand__foot,
    .auth-orb-card { display: none; }
    .auth-brand__orb--1 { width: 90px; height: 90px; right: -30px; top: -34px; }
    .auth-brand__orb--2,
    .auth-brand__orb--3 { display: none; }

    .auth-panel {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        padding: 14px;
    }
    /* card sits near the top on mobile (keyboard-friendly), not centred */
    .auth-panel::before { flex-grow: 0; min-height: 0; }
    .auth-topbar { max-width: 100%; margin: 0 0 12px; }
    .auth-topbar__logo { display: none; }
    .auth-card {
        margin: 0;
        padding: 22px 18px 24px;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }
    .auth-card__title { font-size: 1.25rem; }
    .auth-card__head { margin-bottom: 16px; }

    .auth-grid-2 { grid-template-columns: 1fr; }
    .auth-field { margin-bottom: 13px; }
}

@media (max-width: 400px) {
    .auth-body .verification-code input { letter-spacing: 28px; font-size: 1.15rem; padding-left: 20px; }
    .auth-body .verification-code .boxes { gap: 6px; }
    .auth-btn-row { flex-wrap: wrap; }
}

/* Short desktop windows: trim the brand panel so its centred content
   never clips, and tighten the card. */
@media (min-width: 992px) and (max-height: 760px) {
    .auth-points { display: none; }
    .auth-brand__emblem { width: 66px; height: 66px; font-size: 2rem; margin-bottom: 18px; }
    .auth-brand__sub { margin-bottom: 0; }
    .auth-card { padding: 24px 28px 22px; }
    .auth-card__head { margin-bottom: 16px; }
    .auth-field { margin-bottom: 13px; }
}
