/* =========================================================================
   Silver Suits — Auth Pages (login.php + signup.php)
   Self-contained: these pages do not load style.css, so everything the
   markup needs (skip link, eyebrow, alerts) lives here.
   ========================================================================= */

:root {
    --ss-black:      #0a0a0a;
    --ss-charcoal:   #101010;
    --ss-panel:      #161616;
    --ss-panel-2:    #1b1b1b;
    --ss-line:       #272727;
    --ss-line-soft:  #202020;
    --ss-silver:     #c0c0c0;
    --ss-silver-dim: #8f8f8f;
    --ss-muted:      #7d7d7d;
    --ss-faint:      #565656;
    --ss-white:      #ffffff;
    --ss-copper:     #c0785a;
    --ss-danger:     #ff8b8b;
    --ss-success:    #8ed3a4;
    --ss-serif:      'Playfair Display', Georgia, serif;
    --ss-sans:       'Montserrat', Arial, sans-serif;
    --ss-radius:     3px;
    --ss-ease:       cubic-bezier(.22, .61, .36, 1);
    --ss-ease-out:   cubic-bezier(.16, .84, .44, 1);
}

/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    background: var(--ss-black);
    /* The form panel scrolls, not the document — avoid double scrollbars. */
    height: 100%;
}

.auth-body {
    min-height: 100svh;
    background: var(--ss-black);
    color: #d1d1d1;
    font-family: var(--ss-sans);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(192,120,90,.35); color: #fff; }

/* Skip link — was previously unstyled here and showed up as stray text. */
.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 9999;
    padding: 10px 16px;
    background: var(--ss-white);
    color: #000;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    border-radius: var(--ss-radius);
    transition: top .2s var(--ss-ease);
}
.skip-link:focus { top: 16px; }

/* Consistent keyboard focus ring everywhere. */
:where(a, button, input, [tabindex]):focus-visible {
    outline: 2px solid rgba(192,192,192,.65);
    outline-offset: 3px;
}

/* ── Layout shell ─────────────────────────────────────────────────────────── */
.auth-shell {
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    min-height: 100svh;
}

/* ── Visual panel (left) ──────────────────────────────────────────────────── */
.auth-panel--visual {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    /* Colour close to the photo's average tone, so there is no black flash
       while the (large) JPEG decodes. */
    background: #1a1613 radial-gradient(120% 90% at 30% 15%, #2b241f 0%, #12100e 60%, #0a0a0a 100%);
}

/* Two layers so the pointer parallax and the slow drift never fight over
   `transform`: the wrapper is moved by auth.js, the image animates itself. */
.auth-panel-media {
    position: absolute;
    inset: -3%;
    transform: translate3d(0, 0, 0);
    transition: transform .8s var(--ss-ease-out);
    will-change: transform;
}

.auth-panel-image {
    position: absolute;
    inset: 0;
    background-image: var(--auth-bg);
    background-size: cover;
    background-position: center 22%;
    animation: authImgIn 1.1s var(--ss-ease) both,
               authDrift 30s ease-in-out infinite alternate;
}

.auth-panel-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(155deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,.52) 48%, rgba(0,0,0,.86) 100%),
        radial-gradient(90% 70% at 50% 40%, transparent 40%, rgba(0,0,0,.55) 100%);
}

/* Fine film grain — keeps the large flat gradient from banding. */
.auth-panel-grain {
    position: absolute;
    inset: 0;
    opacity: .30;
    mix-blend-mode: overlay;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* Warm accent wash at the foot of the panel + hairline seam. */
.auth-panel--visual::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 55%, rgba(192,120,90,.10) 100%);
    border-right: 1px solid rgba(255,255,255,.07);
}

.auth-panel-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    height: 100%;
    padding: clamp(32px, 4vw, 56px);
}

/* ── Brand ────────────────────────────────────────────────────────────────── */
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    align-self: flex-start;
    color: var(--ss-white);
    text-transform: uppercase;
    animation: authFadeDown .7s var(--ss-ease) both;
}

.auth-brand-logo {
    display: block;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 2px;
}

.auth-brand-name {
    font-family: var(--ss-serif);
    font-size: .95rem;
    letter-spacing: .16em;
    color: var(--ss-white);
}

.auth-brand--mobile { display: none; }

/* ── Quote block ──────────────────────────────────────────────────────────── */
.auth-panel-foot {
    display: grid;
    gap: 26px;
}

.auth-quote {
    max-width: 380px;
    animation: authFadeUp .9s var(--ss-ease) .25s both;
}

.auth-quote::before {
    content: '\201C';
    display: block;
    font-family: var(--ss-serif);
    font-size: 3.6rem;
    line-height: .8;
    color: rgba(192,120,90,.55);
    margin-bottom: 10px;
}

.auth-quote p {
    font-family: var(--ss-serif);
    font-style: italic;
    font-size: clamp(1.12rem, 1.7vw, 1.5rem);
    line-height: 1.45;
    color: rgba(255,255,255,.9);
}

/* Small reassurance row under the quote. */
.auth-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    list-style: none;
    animation: authFadeUp .9s var(--ss-ease) .4s both;
}

.auth-points li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,.62);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.auth-points svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: var(--ss-copper);
}

/* ── Form panel (right) ───────────────────────────────────────────────────── */
.auth-panel--form {
    position: relative;
    display: flex;
    padding: clamp(40px, 5vh, 72px) clamp(24px, 4vw, 56px);
    background: var(--ss-charcoal);
    /* Scroll inside the panel; `margin:auto` on the child centres short forms
       without ever clipping the top of a tall one (the old flex centring did). */
    max-height: 100svh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #2e2e2e transparent;
}

.auth-panel--form::-webkit-scrollbar { width: 9px; }
.auth-panel--form::-webkit-scrollbar-track { background: transparent; }
.auth-panel--form::-webkit-scrollbar-thumb {
    background: #2b2b2b;
    border: 3px solid var(--ss-charcoal);
    border-radius: 99px;
}
.auth-panel--form::-webkit-scrollbar-thumb:hover { background: #3d3d3d; }

/* Ambient glow so the dark panel is not a flat rectangle. */
.auth-panel--form::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(70% 45% at 82% 6%,  rgba(192,120,90,.10) 0%, transparent 70%),
        radial-gradient(65% 50% at 12% 95%, rgba(192,192,192,.05) 0%, transparent 72%);
}

.auth-form-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 428px;
    margin: auto;
}

/* Staggered entrance. The <form> itself is skipped — it would animate its
   already-animating children a second time. */
.auth-form-wrap > *:not(.auth-form),
.auth-form > * {
    animation: authFadeUp .6s var(--ss-ease) both;
    animation-delay: calc(var(--d, 0) * 55ms);
}

/* ── Heading ──────────────────────────────────────────────────────────────── */
.auth-heading { margin-bottom: 30px; }

.eyebrow {
    margin: 0 0 12px;
    color: var(--ss-copper);
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.auth-title {
    font-family: var(--ss-serif);
    font-size: clamp(2.05rem, 3.2vw, 2.7rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -.02em;
    color: var(--ss-white);
    margin: 0 0 10px;
}

.auth-subtitle {
    color: var(--ss-muted);
    font-size: .88rem;
    letter-spacing: .01em;
}

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 20px;
    padding: 13px 40px 13px 14px;
    border: 1px solid var(--ss-line);
    border-radius: var(--ss-radius);
    background: var(--ss-panel);
    color: #eee;
    font-size: .84rem;
    line-height: 1.55;
}

.alert::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: currentColor;
    opacity: .7;
}

.alert-icon { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; }

.alert.error   { border-color: rgba(255,139,139,.38); background: rgba(255,110,110,.07); color: #ffcfcf; }
.alert.success { border-color: rgba(142,211,164,.38); background: rgba(110,200,140,.07); color: #ccffdb; }

.alert-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 2px;
    color: currentColor;
    opacity: .5;
    transition: opacity .2s, background .2s;
}
.alert-close:hover { opacity: 1; background: rgba(255,255,255,.08); }
.alert-close svg { width: 12px; height: 12px; }

.alert.is-leaving {
    animation: authAlertOut .3s var(--ss-ease) forwards;
}

/* ── Form fields ──────────────────────────────────────────────────────────── */
.auth-form { display: block; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    /* No `gap` here on purpose: the collapsed .field-msg would still claim a
       gap and leave dead space under every input. Margins are used instead. */
    margin-bottom: 18px;
    min-width: 0;
}

.form-label {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 7px;
    font-size: .69rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ss-silver-dim);
    transition: color .2s var(--ss-ease);
}

.form-field:focus-within .form-label { color: #e2e2e2; }

.form-req { color: var(--ss-copper); }
.form-opt {
    color: var(--ss-faint);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: .8em;
}

.form-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.form-icon {
    position: absolute;
    left: 15px;
    width: 16px;
    height: 16px;
    color: #4f4f4f;
    pointer-events: none;
    transition: color .22s var(--ss-ease), transform .22s var(--ss-ease);
}

.form-input-wrap:focus-within .form-icon {
    color: var(--ss-silver);
    transform: scale(1.06);
}

.form-input {
    width: 100%;
    height: 52px;
    padding: 0 46px 0 44px;
    background: var(--ss-panel);
    border: 1px solid var(--ss-line);
    border-radius: var(--ss-radius);
    color: #ececec;
    font-family: var(--ss-sans);
    font-size: .92rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .22s var(--ss-ease), background .22s var(--ss-ease), box-shadow .22s var(--ss-ease);
}

/* Inputs with no leading icon (none today, but keeps the class reusable). */
.form-input-wrap--bare .form-input { padding-left: 16px; }

.form-input::placeholder { color: #454545; transition: color .2s, opacity .2s; }
.form-input:focus::placeholder { color: #4f4f4f; opacity: .8; }

.form-input:hover:not(:focus) { border-color: #363636; background: var(--ss-panel-2); }

.form-input:focus {
    border-color: rgba(192,192,192,.75);
    background: #121212;
    box-shadow: 0 0 0 3px rgba(192,192,192,.09);
}

/* Chrome/Safari autofill paints inputs pale blue — force the dark theme back. */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ececec;
    caret-color: #ececec;
    -webkit-box-shadow: 0 0 0 1000px var(--ss-panel) inset;
    box-shadow: 0 0 0 1000px var(--ss-panel) inset;
    transition: background-color 6000s ease-in-out 0s;
}

/* Error state */
.form-field.has-error .form-input {
    border-color: rgba(255,139,139,.6);
    background: rgba(255,110,110,.05);
}
.form-field.has-error .form-input:focus {
    box-shadow: 0 0 0 3px rgba(255,139,139,.12);
}
.form-field.has-error .form-label { color: var(--ss-danger); }
.form-field.has-error .form-icon  { color: rgba(255,139,139,.75); }

/* Valid state — quiet tick, never shouty */
.form-field.is-valid .form-input { border-color: rgba(142,211,164,.42); }

.field-msg {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: .74rem;
    line-height: 1.45;
    letter-spacing: .01em;
    color: var(--ss-danger);
    /* Collapsed until there is something to say, so nothing jumps around. */
    margin-top: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .28s var(--ss-ease), opacity .22s var(--ss-ease), margin-top .28s var(--ss-ease);
}

.field-msg::before {
    content: '';
    width: 13px;
    height: 13px;
    margin-top: 2px;
    flex-shrink: 0;
    background: currentColor;
    -webkit-mask: var(--msg-icon) center / contain no-repeat;
    mask: var(--msg-icon) center / contain no-repeat;
    --msg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='13'/%3E%3Cline x1='12' y1='16.5' x2='12' y2='16.5'/%3E%3C/svg%3E");
}

.form-field.has-error .field-msg,
.field-msg.is-shown {
    margin-top: 7px;
    max-height: 4.5em;
    opacity: 1;
}

.field-msg.is-ok { color: var(--ss-success); }
.field-msg.is-ok::before {
    --msg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.field-msg.is-hint { color: var(--ss-muted); }
.field-msg.is-hint::before { opacity: .8; }

/* Inline "did you mean …" suggestion for mistyped email domains. */
.field-msg .msg-fix {
    color: var(--ss-white);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.field-msg .msg-fix:hover { color: var(--ss-copper); }

/* ── Password toggle ──────────────────────────────────────────────────────── */
.pw-toggle {
    position: absolute;
    right: 10px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 2px;
    color: #575757;
    transition: color .2s var(--ss-ease), background .2s var(--ss-ease);
}

.pw-toggle:hover { color: var(--ss-silver); background: rgba(255,255,255,.06); }
.eye-icon { width: 17px; height: 17px; }

/* ── Caps Lock hint ───────────────────────────────────────────────────────── */
.caps-hint {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid rgba(192,120,90,.4);
    border-radius: 2px;
    background: #1d1613;
    color: #f0c3ac;
    font-size: .64rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity .2s var(--ss-ease), transform .2s var(--ss-ease);
}

.caps-hint.is-shown { opacity: 1; transform: translateY(0); }

/* ── Password strength (4 segments) ───────────────────────────────────────── */
.pw-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 9px;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity .25s var(--ss-ease), transform .25s var(--ss-ease);
}

.pw-strength.visible { opacity: 1; transform: translateY(0); }

.pw-strength-bar {
    display: flex;
    flex: 1;
    gap: 4px;
    min-width: 0;
}

.pw-strength-bar i {
    flex: 1;
    height: 3px;
    border-radius: 99px;
    background: #262626;
    transition: background .35s var(--ss-ease);
}

.pw-strength-label {
    font-size: .63rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--ss-faint);
    min-width: 48px;
    text-align: right;
    transition: color .3s var(--ss-ease);
}

/* ── Checkbox / terms ─────────────────────────────────────────────────────── */
.form-terms { margin-bottom: 22px; }

.check-label {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    cursor: pointer;
    font-size: .81rem;
    line-height: 1.55;
    color: var(--ss-muted);
    transition: color .2s;
}
.check-label:hover { color: #a4a4a4; }

.check-label a {
    color: var(--ss-silver);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s;
}
.check-label a:hover { color: var(--ss-white); }

.check-input {
    position: absolute;
    opacity: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.check-box {
    position: relative;
    flex-shrink: 0;
    width: 19px;
    height: 19px;
    margin-top: 2px;
    border: 1px solid #3a3a3a;
    border-radius: 2px;
    background: var(--ss-panel);
    display: grid;
    place-items: center;
    transition: border-color .2s var(--ss-ease), background .2s var(--ss-ease), transform .15s var(--ss-ease);
}

.check-label:hover .check-box { border-color: #4d4d4d; }

.check-box::after {
    content: '';
    width: 10px;
    height: 5.5px;
    border-left: 1.8px solid var(--ss-black);
    border-bottom: 1.8px solid var(--ss-black);
    transform: rotate(-45deg) translateY(-1px) scale(.4);
    opacity: 0;
    transition: opacity .18s var(--ss-ease), transform .22s var(--ss-ease-out);
}

.check-input:checked ~ .check-box {
    border-color: var(--ss-silver);
    background: var(--ss-silver);
}

.check-input:checked ~ .check-box::after { opacity: 1; transform: rotate(-45deg) translateY(-1px) scale(1); }

.check-input:focus-visible ~ .check-box {
    outline: 2px solid rgba(192,192,192,.6);
    outline-offset: 3px;
}

.form-terms.has-error .check-box { border-color: rgba(255,139,139,.7); }
.form-terms.has-error .check-label { color: #e8b8b8; }
.form-terms .field-msg { margin-left: 30px; }

/* ── Submit button ────────────────────────────────────────────────────────── */
.auth-submit {
    position: relative;
    width: 100%;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    border: 1px solid var(--ss-white);
    border-radius: var(--ss-radius);
    background: var(--ss-white);
    color: var(--ss-black);
    font-family: var(--ss-sans);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    overflow: hidden;
    transition: background .28s var(--ss-ease), color .28s var(--ss-ease),
                transform .16s var(--ss-ease), box-shadow .28s var(--ss-ease);
}

/* Light sweep across the face on hover. */
.auth-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform .7s var(--ss-ease);
    pointer-events: none;
}

.auth-submit:hover:not(:disabled) {
    background: transparent;
    color: var(--ss-white);
    box-shadow: 0 10px 30px -14px rgba(255,255,255,.35);
}
.auth-submit:hover:not(:disabled)::before { transform: translateX(120%); }
.auth-submit:active:not(:disabled) { transform: translateY(1px) scale(.995); }

.auth-submit-text, .auth-submit-arrow { position: relative; z-index: 1; transition: opacity .2s; }

.auth-submit-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform .25s var(--ss-ease-out), opacity .2s;
}
.auth-submit:hover:not(:disabled) .auth-submit-arrow { transform: translateX(5px); }

/* Loading + disabled */
.auth-submit:disabled { cursor: default; }

.auth-submit.loading { background: var(--ss-white); color: var(--ss-black); }
.auth-submit.loading::before { display: none; }
.auth-submit.loading .auth-submit-text,
.auth-submit.loading .auth-submit-arrow { opacity: 0; }
.auth-submit.loading .auth-submit-loader { display: block; }

.auth-submit-loader {
    display: none;
    position: absolute;
    inset: 0;
    margin: auto;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(10,10,10,.22);
    border-top-color: var(--ss-black);
    border-radius: 50%;
    animation: authSpin .7s linear infinite;
}

/* Shake the button when a client-side check blocks the submit. */
.auth-submit.is-rejected { animation: authShake .4s var(--ss-ease); }

/* ── Divider ──────────────────────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    color: var(--ss-faint);
    font-size: .67rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ss-line), transparent);
}

/* ── Secondary buttons ────────────────────────────────────────────────────── */
.auth-google-btn,
.auth-switch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    border-radius: var(--ss-radius);
    font-family: var(--ss-sans);
    font-size: .71rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: transform .18s var(--ss-ease), box-shadow .25s var(--ss-ease),
                border-color .25s var(--ss-ease), color .25s var(--ss-ease), background .25s var(--ss-ease);
}

.auth-google-btn {
    margin-bottom: 18px;
    border: 1px solid #e4e4e4;
    background: var(--ss-white);
    color: #1f1f1f;
}
.auth-google-btn svg { width: 18px; height: 18px; }
.auth-google-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px -14px rgba(255,255,255,.5);
}
.auth-google-btn:active { transform: translateY(0); }

.auth-switch-btn {
    margin-bottom: 22px;
    border: 1px solid var(--ss-line);
    background: transparent;
    color: var(--ss-silver);
    letter-spacing: .14em;
}
.auth-switch-btn svg { width: 14px; height: 14px; transition: transform .25s var(--ss-ease-out); }
.auth-switch-btn:hover {
    border-color: #4d4d4d;
    background: rgba(255,255,255,.04);
    color: var(--ss-white);
}
.auth-switch-btn:hover svg { transform: translateX(5px); }

.auth-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px;
    color: var(--ss-faint);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: color .2s var(--ss-ease);
}
.auth-back svg { width: 14px; height: 14px; transition: transform .25s var(--ss-ease-out); }
.auth-back:hover { color: var(--ss-silver); }
.auth-back:hover svg { transform: translateX(-4px); }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes authFadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-5px); }
    40%      { transform: translateX(5px); }
    60%      { transform: translateX(-3px); }
    80%      { transform: translateX(3px); }
}

/* Layout collapse is handled by removing the node in JS, so this only needs
   to fade — animating max-height from `none` would snap instead of glide. */
@keyframes authAlertOut {
    to { opacity: 0; transform: translateY(-8px); }
}

/* Very slow drift on the photo. Composited transform only. */
@keyframes authDrift {
    from { transform: translate3d(0, 0, 0) scale(1.05); }
    to   { transform: translate3d(-14px, -10px, 0) scale(1.12); }
}

@keyframes authImgIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
    .auth-shell { grid-template-columns: 1fr 1fr; }
    .auth-points { display: none; }
}

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }

    .auth-panel--visual { display: none; }

    .auth-panel--form {
        min-height: 100svh;
        max-height: none;
        overflow: visible;
        padding: 30px 22px 56px;
    }

    /* Top-align on phones so the keyboard never pushes the heading off-screen. */
    .auth-form-wrap { margin: 0 auto; max-width: 460px; }

    .auth-brand--mobile {
        display: inline-flex;
        margin-bottom: 30px;
    }

    .auth-panel--form::before {
        background:
            radial-gradient(90% 40% at 50% -5%, rgba(192,120,90,.13) 0%, transparent 70%),
            radial-gradient(80% 40% at 50% 105%, rgba(192,192,192,.05) 0%, transparent 70%);
    }

    .auth-heading { margin-bottom: 24px; }

    .form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 480px) {
    .auth-panel--form { padding: 24px 18px 46px; }
    .auth-title { font-size: 1.95rem; }
    /* 16px keeps iOS Safari from zooming in when a field is focused. */
    .form-input { font-size: 16px; height: 50px; }
    .auth-submit { height: 52px; letter-spacing: .14em; }
    .caps-hint { font-size: .6rem; }
}

/* Landscape phones: the split layout has no room, drop to one column. */
@media (max-height: 560px) and (min-width: 901px) {
    .auth-panel--form { padding-block: 32px; }
}

/* ── Motion & contrast preferences ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .auth-panel-image {
        animation: authImgIn .01ms both;
        transform: scale(1.04);
    }
    .auth-panel-media { transform: none !important; }
    .auth-submit-loader { animation: authSpin 1s linear infinite !important; }
}

@media (prefers-contrast: more) {
    .form-input { border-color: #5a5a5a; }
    .auth-subtitle, .check-label { color: #b4b4b4; }
    .auth-back { color: #8a8a8a; }
}
