/* =====================================================================
   /login — Airbnb-style card (variant B) + pure-CSS travel panel (variant A)
   Loaded after landing.css; everything is scoped under .auth-page so it
   overrides the generic auth styles without touching other pages.
   ===================================================================== */
.auth-page {
    --radius: 16px;
    --grad: linear-gradient(135deg, #6366f1, #ec4899);
    /* art composition — desktop values (panel is hidden below 960px) */
    --globe-size: 420px; --globe-right: -120px; --globe-y: calc(50% - 170px);
    --sim-w: 200px; --sim-h: 140px; --sim-x: 90px; --sim-y: calc(50% - 10px); --sim-rot: -12deg;
    --sig-size: 300px; --sig-x: 40px; --sig-y: calc(50% - 250px);
    --path-w: 520px; --path-h: 260px; --path-x: 60px; --path-y: calc(50% - 120px); --path-rot: -10deg;
    --plane-x: 540px; --plane-y: calc(50% - 200px); --plane-rot: 60deg;
    --dot1-x: 78px; --dot1-y: calc(50% + 120px); --dot2-x: 470px; --dot2-y: calc(50% - 40px);

    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: var(--nav-h, 80px);
    background: var(--light-gray);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
}

/* ---------------- card column ---------------- */
.auth-page .auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px 16px 40px;
}
.auth-page .auth-container {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(30,41,59,.04), 0 8px 24px rgba(30,41,59,.06);
    overflow: hidden;
}

/* tabs: hairline + gradient underline */
.auth-page .auth-tabs {
    display: flex;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}
.auth-page .auth-tab {
    flex: 1;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray);
    position: relative;
    cursor: pointer;
}
.auth-page .auth-tab.active { color: var(--dark); background: none; box-shadow: none; }
.auth-page .auth-tab.active::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}
.auth-page .auth-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -4px; border-radius: 8px; }

.auth-page .form-container { padding: 0; }
.auth-page .auth-form { display: none; padding: 24px; }
.auth-page .auth-form.active { display: block; animation: none; }
.auth-page .auth-form > * + * { margin-top: 20px; }

.auth-page .auth-heading h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin: 0; }
.auth-page .auth-heading p { font-size: 14px; color: var(--gray); margin: 6px 0 0; line-height: 1.5; }

/* ---------------- provider buttons ---------------- */
.auth-page .provider-block { margin-bottom: 0; width: 100%; }
.auth-page .provider-buttons { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 360px; margin: 0 auto; align-items: stretch; }
.auth-page .provider-btn,
.auth-page .g_id_signin {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 100%; max-width: none; height: 44px;
    border-radius: 10px;
    font: inherit; font-size: 15px; font-weight: 600;
    border: 1px solid transparent;
    padding: 0 44px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, box-shadow .15s, transform .15s;
}
.auth-page .provider-btn svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; }
.auth-page .provider-btn:active { transform: scale(.99); }
.auth-page .provider-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.auth-page .provider-apple { background: #000; color: #fff; border-color: #000; }
.auth-page .provider-apple:hover { background: #111; box-shadow: none; }
.auth-page .provider-passkey { background: #fff; color: var(--dark); border-color: var(--dark); }
.auth-page .provider-passkey:hover { background: var(--light-gray); box-shadow: none; }
.auth-page .provider-passkey svg { color: var(--primary); }
.auth-page .provider-helper { font-size: 13px; color: var(--gray); text-align: center; margin: -4px 0 0; line-height: 1.4; }
/* Google's iframe button renders its own chrome; just give it the row */
.auth-page .g_id_signin { padding: 0; border: 0; height: auto; min-height: 44px; overflow: hidden; justify-content: center; }
.auth-page .g_id_signin > div { width: 100% !important; }
.auth-page .provider-error {
    margin: 0 auto; max-width: 360px;
    padding: 10px 14px; border-radius: 10px;
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
    font-size: 14px; text-align: center;
}

/* divider */
.auth-page .divider {
    display: flex; align-items: center; gap: 12px;
    max-width: 360px; margin: 20px auto 0;
    font-size: 13px; color: var(--gray);
    text-transform: none; letter-spacing: 0; font-weight: 400;
}
.auth-page .divider::before, .auth-page .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-page .divider span { padding: 0; background: none; }

/* ---------------- grouped inputs (Airbnb) ---------------- */
.auth-page .field-group { max-width: 360px; margin: 0 auto; border: 1px solid #94a3b8; border-radius: 10px; overflow: hidden; background: #fff; }
.auth-page .field-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.auth-page .field { position: relative; height: 56px; background: #fff; margin: 0; }
.auth-page .field + .field { border-top: 1px solid var(--border); }
.auth-page .field .form-input {
    width: 100%; height: 100%;
    border: 0; border-radius: 0; background: none; box-shadow: none;
    font: inherit; font-size: 16px; color: var(--dark);
    padding: 22px 48px 6px 14px;
    outline: none;
}
.auth-page .field .form-input::placeholder { color: transparent; }
.auth-page .field label {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    font-size: 15px; color: var(--gray); pointer-events: none;
    transition: all .15s;
}
.auth-page .field .form-input:focus + label,
.auth-page .field .form-input:not(:placeholder-shown) + label { top: 10px; transform: none; font-size: 12px; }
.auth-page .field .form-input:-webkit-autofill + label { top: 10px; transform: none; font-size: 12px; }
.auth-page .field .password-toggle {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
    color: var(--gray); display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.auth-page .field .password-toggle:hover { color: var(--dark); }
.auth-page .field .password-toggle svg { width: 20px; height: 20px; }

/* remember + forgot row */
.auth-page .auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; max-width: 360px; margin: 16px auto 0; }
.auth-page .remember-me { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; min-height: 44px; cursor: pointer; }
.auth-page .toggle-switch { width: 40px; height: 24px; border-radius: 12px; background: var(--primary); position: relative; flex: none; margin: 0; transition: background .15s; }
.auth-page .toggle-switch::after { content: ""; position: absolute; top: 3px; left: 19px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; transform: none; }
.auth-page .toggle-switch.off { background: #cbd5e1; }
.auth-page .toggle-switch.off::after { left: 3px; }
.auth-page .toggle-label { margin: 0; font-size: 14px; font-weight: 500; color: var(--dark); cursor: pointer; }
.auth-page .forgot-password { font-size: 14px; font-weight: 600; color: var(--dark); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; margin: 0; }
.auth-page .forgot-password:hover { color: var(--primary-dark); }

/* primary CTA */
.auth-page .btn-auth-primary {
    display: block; width: 100%; max-width: 360px; margin: 16px auto 0;
    height: 48px; border: 1px solid var(--primary); border-radius: 10px;
    background: var(--primary); color: #fff;
    font: inherit; font-size: 15px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    cursor: pointer; box-shadow: none; transition: background .15s, box-shadow .15s;
}
.auth-page .btn-auth-primary:hover { background: var(--primary-dark); box-shadow: 0 6px 16px rgba(99,102,241,.28); transform: none; }
.auth-page .btn-auth-primary:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }

.auth-page .auth-note { font-size: 13px; color: var(--gray); line-height: 1.5; max-width: 360px; margin: 8px auto 0; }
.auth-page .auth-foot { font-size: 13px; color: var(--gray); text-align: center; line-height: 1.5; max-width: 360px; margin: 20px auto 0; }

/* messages (keep ids auth.js toggles) */
.auth-page .message-box { max-width: 360px; margin: 0 auto; border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.5; display: flex; gap: 10px; align-items: flex-start; background: #f8fafc; border: 1px solid var(--border); color: var(--dark); }
.auth-page .message-box.error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; display: block; }
.auth-page .message-box.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.auth-page .message-box.verifying { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }
.auth-page .message-box .message-icon { flex: none; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.auth-page .message-box .message-icon svg { width: 20px; height: 20px; }
.auth-page .cloudflare-branding { display: none; }
.auth-page .turnstile-frame { max-width: 360px; margin: 16px auto 0; }

/* trust + legal */
.auth-page .auth-trust {
    border-top: 1px solid var(--border); background: #f8fafc;
    padding: 14px 20px; font-size: 13px; color: var(--gray); text-align: center; line-height: 1.5;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.auth-page .auth-trust svg { width: 16px; height: 16px; color: var(--success); flex: none; }
.auth-page .auth-legal { text-align: center; font-size: 13px; color: var(--gray); padding: 20px 16px 0; line-height: 1.6; max-width: 420px; }
.auth-page .auth-legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- pure-CSS travel panel (desktop only) ---------------- */
.auth-page .art { display: none; }

@media (min-width: 960px) {
    .auth-page { flex-direction: row; }
    .auth-page .art {
        display: block; position: relative; overflow: hidden;
        flex: 0 0 46%; background: var(--primary);
    }
    .auth-page .auth-main { align-items: center; padding: 48px 24px; }
    .auth-page .auth-container { max-width: 480px; }
    .auth-page .auth-form { padding: 32px 40px; }
    .auth-page .auth-heading h1 { font-size: 24px; }
    .auth-page .auth-trust { font-size: 12.5px; white-space: nowrap; }

    .auth-page .shape { position: absolute; }
    .auth-page .globe { width: var(--globe-size); height: var(--globe-size); right: var(--globe-right); top: var(--globe-y); border-radius: 50%; background: var(--dark); }
    .auth-page .globe::before, .auth-page .globe::after { content: ""; position: absolute; border: 3px solid var(--primary); border-radius: 50%; opacity: .9; }
    .auth-page .globe::before { left: 27%; top: -1px; width: 46%; height: 100%; }
    .auth-page .globe::after { left: -1px; top: 28%; width: 100%; height: 44%; }
    .auth-page .globe .eq { position: absolute; left: 0; right: 0; top: 50%; height: 3px; background: var(--primary); transform: translateY(-50%); }
    .auth-page .globe .land { position: absolute; background: var(--secondary); border-radius: 50% 60% 40% 55% / 60% 45% 55% 40%; }
    .auth-page .globe .land.a { width: 34%; height: 28%; left: 18%; top: 22%; }
    .auth-page .globe .land.b { width: 22%; height: 20%; left: 52%; top: 55%; border-radius: 60% 40% 50% 50%; }

    .auth-page .sim { width: var(--sim-w); height: var(--sim-h); left: var(--sim-x); top: var(--sim-y); transform: rotate(var(--sim-rot)); background: #fff; border-radius: 10px; clip-path: polygon(0 0, 74% 0, 100% 22%, 100% 100%, 0 100%); box-shadow: 0 18px 40px -12px rgba(15,23,42,.45); z-index: 3; }
    .auth-page .sim .chip { position: absolute; left: 14%; top: 20%; width: 46%; height: 60%; background: var(--secondary); border-radius: 6px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 2px; padding: 3px; }
    .auth-page .sim .chip i { display: block; background: #fff; opacity: .55; border-radius: 2px; }
    .auth-page .sim .e { position: absolute; right: 10%; bottom: 12%; font-weight: 800; color: var(--dark); font-size: 22px; letter-spacing: -.02em; }

    .auth-page .sig { width: var(--sig-size); height: var(--sig-size); left: var(--sig-x); top: var(--sig-y); z-index: 2; }
    .auth-page .sig i { position: absolute; inset: 0; border-radius: 50%; border: 10px solid #fff; border-color: #fff transparent transparent transparent; transform: rotate(45deg); opacity: .9; }
    .auth-page .sig i:nth-child(2) { inset: 18%; opacity: .65; }
    .auth-page .sig i:nth-child(3) { inset: 36%; opacity: .4; }
    .auth-page .sig b { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; background: #fff; border-radius: 50%; }

    .auth-page .path { width: var(--path-w); height: var(--path-h); left: var(--path-x); top: var(--path-y); transform: rotate(var(--path-rot)); border-top: 3px dashed rgba(255,255,255,.85); border-radius: 50% / 100% 100% 0 0; z-index: 1; }
    .auth-page .plane { left: var(--plane-x); top: var(--plane-y); width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent; border-bottom: 26px solid #fff; transform: rotate(var(--plane-rot)); z-index: 4; filter: drop-shadow(0 6px 10px rgba(15,23,42,.35)); }
    .auth-page .plane::after { content: ""; position: absolute; left: -4px; top: 12px; width: 8px; height: 12px; background: var(--primary); border-radius: 50%; }
    .auth-page .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--secondary); box-shadow: 0 0 0 5px rgba(236,72,153,.25); }
    .auth-page .dot.d1 { left: var(--dot1-x); top: var(--dot1-y); }
    .auth-page .dot.d2 { left: var(--dot2-x); top: var(--dot2-y); }

    .auth-page .art .copy { position: absolute; left: 56px; bottom: 48px; color: #fff; z-index: 5; max-width: 400px; }
    .auth-page .art .copy h2 { white-space: pre-line; font-weight: 800; font-size: 34px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 10px; color: #fff; }
    .auth-page .art .copy p { font-size: 15px; opacity: .92; margin: 0; color: #fff; }
}
@media (min-width: 1280px) {
    .auth-page { --globe-size: 480px; --sim-w: 230px; --sim-h: 160px; --sig-size: 340px; }
}
