/* ═══════════════════════════════════════════════════════════════════════
   auth.css — Shared stylesheet for the sign-in / OTP / password-reset /
   password-change family. Editorial canvas + iOS-refined surfaces.
   Instrument Serif for display, Satoshi for everything else.
═══════════════════════════════════════════════════════════════════════ */
@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap");

/* ─── Tokens ──────────────────────────────────────────────────────── */
:root {
    --canvas: #fbf8f3;
    --canvas-2: #f4efe6;
    --canvas-3: #ece5d7;
    --surface: #ffffff;
    --surface-alt: #f8f4ec;

    --ink: #1a1f2e;
    --ink-2: #3a4354;
    --ink-3: #6a7185;
    --ink-4: #a3a9b8;
    --ink-5: #c8cdd8;

    --brand: #2A9D8F;
    --brand-d: #1e7a6e;

    --amber: #b87333;
    --amber-d: #8a5121;
    --amber-lt: rgba(184, 115, 51, 0.10);
    --amber-bd: rgba(184, 115, 51, 0.32);

    --success: #1f7a5a;
    --success-lt: rgba(31, 122, 90, 0.10);
    --success-bd: rgba(31, 122, 90, 0.32);
    --danger: #b4331f;
    --danger-lt: rgba(180, 51, 31, 0.08);
    --danger-bd: rgba(180, 51, 31, 0.32);
    --warning: #a16207;
    --warning-lt: rgba(161, 98, 7, 0.10);
    --warning-bd: rgba(161, 98, 7, 0.32);

    --hairline: rgba(26, 31, 46, 0.10);
    --hairline-strong: rgba(26, 31, 46, 0.16);

    --shadow-xs: 0 1px 2px rgba(26, 31, 46, 0.04);
    --shadow-sm: 0 2px 8px rgba(26, 31, 46, 0.05), 0 1px 2px rgba(26, 31, 46, 0.04);
    --shadow-md: 0 10px 28px -12px rgba(26, 31, 46, 0.18), 0 2px 6px rgba(26, 31, 46, 0.05);
    --shadow-lg: 0 30px 60px -24px rgba(26, 31, 46, 0.25), 0 4px 12px rgba(26, 31, 46, 0.05);

    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-pill: 999px;

    --serif: "Instrument Serif", "Playfair Display", Georgia, serif;
    --font: 'Satoshi-Variable', 'Satoshi-Regular', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --ease: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

html.dark-mode {
    color-scheme: dark;

    --canvas: #12141b;
    --canvas-2: #191c25;
    --canvas-3: #222734;
    --surface: #191c25;
    --surface-alt: #1d2230;

    --ink: #f4efe6;
    --ink-2: #d6d3cb;
    --ink-3: #9aa0b0;
    --ink-4: #6b7289;
    --ink-5: #4a5065;

    --amber: #d8915c;
    --amber-d: #b87333;
    --amber-lt: rgba(216, 145, 92, 0.14);
    --amber-bd: rgba(216, 145, 92, 0.38);

    --success: #4ade80;
    --success-lt: rgba(31, 122, 90, 0.22);
    --success-bd: rgba(74, 222, 128, 0.36);
    --danger: #f87171;
    --danger-lt: rgba(180, 51, 31, 0.18);
    --danger-bd: rgba(248, 113, 113, 0.36);
    --warning: #fbbf24;
    --warning-lt: rgba(161, 98, 7, 0.22);
    --warning-bd: rgba(251, 191, 36, 0.36);

    --hairline: rgba(244, 239, 230, 0.10);
    --hairline-strong: rgba(244, 239, 230, 0.18);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 14px 32px -14px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 4px 12px rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--canvas);
    color: var(--ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    position: relative;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

/* Atmospheric noise overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.12 0 0 0 0.12 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: 0.5;
    mix-blend-mode: multiply;
}

html.dark-mode body::before { opacity: 0.3; mix-blend-mode: screen; }

.helptext, ul.errorlist { display: none; }

/* ═══════════════════════════════════════════════════════════════════════
   CENTERED SINGLE-CARD LAYOUT (reset, done, complete, change-password)
═══════════════════════════════════════════════════════════════════════ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2rem);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    padding: clamp(1.75rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

.auth-card--centered { text-align: center; }

/* ═══════════════════════════════════════════════════════════════════════
   SPLIT LAYOUT (login only)
═══════════════════════════════════════════════════════════════════════ */
.login-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.login-brand {
    flex: 0 0 46%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: clamp(1.75rem, 4vw, 3rem);
    position: relative;
    overflow: hidden;
    background: var(--ink);
}

.brand-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.38;
    filter: saturate(0.85) contrast(1.02);
}

/* Architectural rule grid + gradient wash */
.login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 96px);
    pointer-events: none;
    z-index: 0;
}

.login-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 14, 22, 0.88) 0%,
        rgba(10, 14, 22, 0.55) 45%,
        rgba(10, 14, 22, 0.25) 100%
    );
    pointer-events: none;
}

.brand-inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
    color: var(--canvas);
    animation: brandIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--amber);
    margin-bottom: 1rem;
    opacity: 0.95;
}

.brand-eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--amber);
}

.brand-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.3rem, 4.2vw, 3.3rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--canvas);
    margin: 0 0 1rem;
}

.brand-title em {
    font-style: italic;
    color: var(--amber);
}

.brand-blurb {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.55;
    color: rgba(251, 248, 243, 0.75);
    max-width: 380px;
}

.brand-footnote {
    position: absolute;
    bottom: clamp(1.25rem, 3vw, 2rem);
    right: clamp(1.25rem, 3vw, 2rem);
    font-family: var(--font);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(251, 248, 243, 0.45);
    z-index: 1;
}

.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    background: var(--canvas);
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 420px;
    animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.1s;
}

/* ═══════════════════════════════════════════════════════════════════════
   HEADER BLOCKS — editorial hero for each card
═══════════════════════════════════════════════════════════════════════ */
.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--amber);
    margin-bottom: 10px;
}

.auth-eyebrow i { font-size: 0.32rem; }

.auth-card h1,
.lc-header h1,
.auth-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.7rem, 3vw, 2.1rem);
    line-height: 1.02;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0 0 8px;
}

.auth-card--centered h1,
.auth-card--centered .auth-title { text-align: center; }

.auth-sub,
.lc-header p,
.auth-card p {
    font-family: var(--font);
    font-size: 0.92rem;
    color: var(--ink-3);
    line-height: 1.55;
    margin: 0 0 1.75rem;
}

.auth-card--centered .auth-sub,
.auth-card--centered .auth-card p { text-align: center; }

.auth-card p strong {
    font-family: var(--font);
    font-weight: 700;
    color: var(--ink-2);
}

.lc-header { margin-bottom: 1.75rem; }

/* ─── Icon pill (centered layout) ─────────────────────────────────── */
.auth-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    border-radius: var(--r-md);
    background: var(--ink);
    color: var(--canvas);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    position: relative;
}

.auth-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border: 1px solid var(--amber-bd);
    border-radius: calc(var(--r-md) + 3px);
    opacity: 0.7;
    pointer-events: none;
}

html.dark-mode .auth-icon { background: var(--amber); color: var(--canvas); }

.auth-icon.ok {
    background: var(--brand);
    color: #fff;
}

.auth-icon.ok::after { border-color: rgba(42, 157, 143, 0.4); }

.auth-icon.success-ok {
    background: var(--success);
    color: #fff;
}

.auth-icon.success-ok::after { border-color: var(--success-bd); }

.auth-icon.err {
    background: var(--danger);
    color: #fff;
}

.auth-icon.err::after { border-color: var(--danger-bd); }

/* OTP-specific icon alias */
.otp-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    border-radius: var(--r-md);
    background: var(--ink);
    color: var(--canvas);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    position: relative;
}

.otp-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border: 1px solid var(--amber-bd);
    border-radius: calc(var(--r-md) + 3px);
    opacity: 0.7;
    pointer-events: none;
}

html.dark-mode .otp-icon { background: var(--amber); color: var(--canvas); }

.otp-card h1 { text-align: center; }
.otp-sub {
    font-family: var(--font);
    font-size: 0.92rem;
    color: var(--ink-3);
    line-height: 1.55;
    text-align: center;
    margin: 0 0 1.75rem;
}
.otp-sub strong {
    font-family: var(--font);
    font-weight: 700;
    color: var(--ink);
}

/* ═══════════════════════════════════════════════════════════════════════
   ALERTS (error / success / notice / detail)
═══════════════════════════════════════════════════════════════════════ */
.auth-error,
.login-error,
.otp-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.85rem 1rem;
    border-radius: var(--r-md);
    background: var(--danger-lt);
    border: 1px solid var(--danger-bd);
    border-left: 3px solid var(--danger);
    margin-bottom: 1.25rem;
    animation: errShake 0.4s ease;
}

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

.auth-error i,
.login-error i,
.otp-error i {
    color: var(--danger);
    font-size: 0.92rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-error span,
.login-error span,
.otp-error span {
    font-family: var(--font);
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--danger);
    line-height: 1.45;
}

.auth-error {
    flex-direction: column;
    gap: 4px;
}

.auth-error span + span { margin-top: 4px; }

.otp-error { justify-content: center; }

.auth-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.85rem 1rem;
    border-radius: var(--r-md);
    background: var(--warning-lt);
    border: 1px solid var(--warning-bd);
    border-left: 3px solid var(--warning);
    color: var(--warning);
    font-family: var(--font);
    font-weight: 500;
    font-size: 0.85rem;
    line-height: 1.45;
    margin-bottom: 1.25rem;
}

.auth-notice i {
    color: var(--warning);
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-detail {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: var(--r-md);
    background: var(--canvas-2);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--amber);
    font-family: var(--font);
    font-size: 0.82rem;
    color: var(--ink-3);
    line-height: 1.55;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

html.dark-mode .auth-detail { background: var(--surface-alt); }

.auth-detail i {
    color: var(--amber);
    flex-shrink: 0;
    font-size: 0.9rem;
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════
   FIELDS & INPUTS (pill style, iOS-refined)
═══════════════════════════════════════════════════════════════════════ */
.ff { margin-bottom: 1rem; }
.ff:last-of-type { margin-bottom: 0.5rem; }

.ff label {
    display: block;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.76rem;
    color: var(--ink-2);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

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

.ff-wrap .ff-icon {
    position: absolute;
    left: 14px;
    color: var(--ink-4);
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 2;
    transition: color var(--ease);
}

.ff-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 40px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font-family: var(--font);
    font-size: 0.92rem;
    color: var(--ink);
    background: var(--canvas-2);
    outline: none;
    transition: background var(--ease), border-color var(--ease), box-shadow var(--ease);
}

html.dark-mode .ff-wrap input { background: var(--surface-alt); }

.ff-wrap input::placeholder {
    color: var(--ink-4);
    font-style: italic;
}

.ff-wrap input:hover:not(:focus) {
    background: var(--canvas-3);
}

html.dark-mode .ff-wrap input:hover:not(:focus) {
    background: var(--canvas-3);
}

.ff-wrap input:focus {
    background: var(--surface);
    border-color: var(--amber);
    box-shadow: 0 0 0 3px var(--amber-lt);
}

.ff-wrap:focus-within .ff-icon { color: var(--amber); }

/* Password-visibility toggle */
.pw-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--ink-4);
    cursor: pointer;
    padding: 6px 8px;
    font-size: 0.9rem;
    line-height: 1;
    border-radius: 999px;
    transition: color var(--ease), background var(--ease);
    z-index: 3;
}

.pw-toggle:hover {
    color: var(--ink);
    background: var(--canvas-3);
}

html.dark-mode .pw-toggle:hover { background: var(--surface-alt); }

/* Password rules list */
.pw-rules {
    list-style: none;
    padding: 0.85rem 1rem;
    background: var(--canvas-2);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--amber);
    border-radius: var(--r-md);
    font-family: var(--font);
    font-size: 0.78rem;
    color: var(--ink-3);
    line-height: 1.65;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

html.dark-mode .pw-rules { background: var(--surface-alt); }

.pw-rules li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
}

.pw-rules li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--amber);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   OTP INPUTS
═══════════════════════════════════════════════════════════════════════ */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.otp-digit {
    width: 48px;
    height: 58px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-md);
    background: var(--canvas-2);
    color: var(--ink);
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 1.8rem;
    text-align: center;
    outline: none;
    caret-color: var(--amber);
    transition: all var(--ease-spring);
}

html.dark-mode .otp-digit { background: var(--surface-alt); }

.otp-digit:focus {
    background: var(--surface);
    border-color: var(--amber);
    box-shadow: 0 0 0 3px var(--amber-lt);
    transform: translateY(-1px);
}

.otp-digit.has-value {
    border-color: var(--amber);
    background: var(--amber-lt);
    color: var(--amber-d);
}

html.dark-mode .otp-digit.has-value { color: var(--amber); }

.otp-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.otp-timer {
    margin-top: 1rem;
    font-family: var(--font);
    font-size: 0.76rem;
    color: var(--ink-4);
    text-align: center;
    font-style: italic;
}

.otp-timer strong {
    font-family: var(--font);
    font-weight: 700;
    color: var(--ink-2);
    font-style: normal;
    font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════════════ */
.auth-btn,
.login-btn,
.otp-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--r-pill);
    background: var(--ink);
    color: var(--canvas);
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.005em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 0.5rem;
    box-shadow: 0 4px 14px -6px rgba(26, 31, 46, 0.35);
    transition: all var(--ease-spring);
    text-decoration: none;
}

.auth-btn:hover,
.login-btn:hover,
.otp-btn:hover:not(:disabled) {
    background: var(--amber);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -8px rgba(184, 115, 51, 0.55);
    color: var(--canvas);
}

.auth-btn:active,
.login-btn:active,
.otp-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.99);
}

.auth-btn:disabled,
.login-btn:disabled,
.otp-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: var(--ink-4);
}

/* Centered-card inline CTA (e.g. "Sign in" button on completion screens) */
.auth-card--centered .auth-btn {
    display: inline-flex;
    width: auto;
    padding: 0 clamp(1.5rem, 4vw, 2rem);
    margin-top: 1.5rem;
}

.auth-btn i, .login-btn i, .otp-btn i {
    font-size: 0.78rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER LINKS & META
═══════════════════════════════════════════════════════════════════════ */
.auth-footer,
.lc-footer,
.otp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.auth-footer { justify-content: center; }
.otp-footer { justify-content: center; gap: 1.5rem; }

.auth-footer a,
.lc-footer a,
.otp-footer a {
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--ink-2);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--r-pill);
    transition: all var(--ease);
    letter-spacing: 0.005em;
}

.auth-footer a:hover,
.lc-footer a:hover,
.otp-footer a:hover {
    color: var(--amber);
    background: var(--amber-lt);
}

.auth-footer a i,
.lc-footer a i,
.otp-footer a i {
    font-size: 0.75rem;
    transition: transform var(--ease);
}

.auth-footer a:hover i[class*="arrow-left"],
.lc-footer a:hover i[class*="arrow-left"],
.otp-footer a:hover i[class*="arrow-left"] {
    transform: translateX(-2px);
}

.lc-meta {
    margin-top: 2.5rem;
    text-align: center;
    font-family: var(--font);
    font-weight: 500;
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-4);
}

/* ═══════════════════════════════════════════════════════════════════════
   OTP CARD VARIANT
═══════════════════════════════════════════════════════════════════════ */
.otp-card {
    width: 100%;
    max-width: 460px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    padding: clamp(1.75rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    position: relative;
    z-index: 1;
    margin: auto;
}

body:has(.otp-card) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2rem);
}

/* ═══════════════════════════════════════════════════════════════════════
   STAGGERED ENTRANCE
═══════════════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

.lc-header { animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: 0.15s; }
.login-card form { animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: 0.22s; }
.lc-footer { animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: 0.28s; }
.lc-meta   { animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: 0.32s; }

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .login-brand { display: none; }
    .login-form-side { padding: 1.5rem; }
}

@media (max-width: 560px) {
    .auth-card,
    .otp-card {
        padding: 1.5rem 1.25rem;
    }
    .auth-card h1,
    .auth-title { font-size: 1.5rem; }
    .otp-digit { width: 42px; height: 52px; font-size: 1.55rem; }
    .otp-inputs { gap: 8px; }
    .auth-footer,
    .lc-footer,
    .otp-footer { flex-direction: column; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .auth-error, .login-error, .otp-error { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Page-transition progress strip (auth pages)
═══════════════════════════════════════════════════════════════════════ */

#pt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 9999;
    background: var(--amber, #b87333);
    box-shadow: 0 0 10px rgba(184, 115, 51, 0.5), 0 1px 4px rgba(184, 115, 51, 0.25);
    transform: scaleX(0);
    transform-origin: left center;
    border-radius: 0 1px 1px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#pt-overlay.is-active {
    opacity: 1;
    visibility: visible;
    animation: pt-advance 3s cubic-bezier(0.05, 0.8, 0.2, 1) forwards;
}

@keyframes pt-advance {
    0%   { transform: scaleX(0);    }
    10%  { transform: scaleX(0.28); }
    30%  { transform: scaleX(0.52); }
    60%  { transform: scaleX(0.72); }
    85%  { transform: scaleX(0.84); }
    100% { transform: scaleX(0.88); }
}

@media (prefers-reduced-motion: reduce) {
    #pt-overlay.is-active {
        animation: none;
        transform: scaleX(0.88);
        transition: opacity 0.01ms;
    }
}
