/* ============================================================
   LeadFluxA — authentication pages

   Split-screen layout: brand panel on the left, form on the right.
   Collapses to a single column on mobile, where the brand panel
   becomes a compact header rather than being hidden entirely — a
   sign-in page with no branding looks like a phishing form.
   ============================================================ */

:root {
    --auth-primary: #f97316;
    --auth-primary-dark: #ea580c;
    --auth-ink: #0f172a;
    --auth-body: #475569;
    --auth-muted: #94a3b8;
    --auth-line: #e2e8f0;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
    background: #fff;
    font-family: 'DM Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Brand panel ---------- */

.auth-brand {
    position: relative;
    overflow: hidden;
    padding: 52px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(150deg, #0f172a 0%, #1e293b 55%, #331d0d 100%);
    color: #fff;
}

.auth-brand::after {
    content: "";
    position: absolute;
    top: -140px;
    right: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, .30), transparent 68%);
}
.auth-brand::before {
    content: "";
    position: absolute;
    bottom: -180px;
    left: -100px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, .16), transparent 70%);
}

.auth-brand > * { position: relative; z-index: 1; }

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -.01em;
}
.auth-logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(249, 115, 22, .34);
}
.auth-logo-mark .material-icons { color: #fff; font-size: 21px; }

.auth-pitch h2 {
    font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.15rem);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -.028em;
    margin: 0 0 14px;
    color: #fff;
    max-width: 18ch;
}
.auth-pitch p {
    margin: 0 0 30px;
    color: #cbd5e1;
    font-size: .9688rem;
    line-height: 1.7;
    max-width: 44ch;
}

.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { display: flex; align-items: flex-start; gap: 11px; font-size: .9rem; color: #e2e8f0; }
.auth-points .material-icons {
    font-size: 19px;
    color: #4ade80;
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-proof {
    display: flex;
    gap: 30px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    flex-wrap: wrap;
}
.auth-proof div span { display: block; }
.auth-proof .n {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.auth-proof .l {
    font-size: .7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-top: 5px;
    font-weight: 600;
}

/* ---------- Form panel ---------- */

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 40px;
    overflow-y: auto;
}
.auth-form-wrap { width: 100%; max-width: 420px; }
.auth-form-wrap.wide { max-width: 520px; }

.auth-head { margin-bottom: 26px; }
.auth-head h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--auth-ink);
    letter-spacing: -.024em;
    margin: 0 0 7px;
}
.auth-head p { margin: 0; color: var(--auth-muted); font-size: .9375rem; line-height: 1.6; }

/* Google button */
.auth-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 20px;
    border: 1px solid var(--auth-line);
    border-radius: 11px;
    background: #fff;
    color: #334155;
    font-size: .9375rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.auth-oauth:hover {
    border-color: #cbd5e1;
    background: #fafbfc;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
}
.auth-oauth img, .auth-oauth svg { width: 19px; height: 19px; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: var(--auth-muted);
    font-size: .8125rem;
}
.auth-divider::before, .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--auth-line);
}

/* Fields */
.auth-field { margin-bottom: 17px; }
.auth-field label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
}
.auth-input-wrap { position: relative; }
.auth-input-wrap > .material-icons {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 19px;
    color: var(--auth-muted);
    pointer-events: none;
}
.auth-input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    border: 1px solid var(--auth-line);
    border-radius: 11px;
    font-size: .9375rem;
    font-family: inherit;
    color: var(--auth-ink);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-input::placeholder { color: #cbd5e1; }
.auth-input:focus {
    outline: 0;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .12);
}
.auth-input.no-icon { padding-left: 14px; }

.auth-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    padding: 6px;
    cursor: pointer;
    color: var(--auth-muted);
    border-radius: 7px;
    display: flex;
}
.auth-toggle:hover { color: var(--auth-body); background: #f1f5f9; }
.auth-toggle .material-icons { font-size: 19px; }

.auth-hint { display: block; font-size: .78rem; color: var(--auth-muted); margin-top: 6px; }
.auth-error { display: block; font-size: .78rem; color: #dc2626; margin-top: 6px; font-weight: 500; }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 22px;
    flex-wrap: wrap;
}
.auth-check { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--auth-body); cursor: pointer; }
.auth-link { font-size: .875rem; color: var(--auth-primary-dark); text-decoration: none; font-weight: 600; }
.auth-link:hover { text-decoration: underline; }

.auth-submit {
    width: 100%;
    padding: 14px 24px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    color: #fff;
    font-size: .9688rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(249, 115, 22, .26);
    transition: transform .12s ease, box-shadow .16s ease;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(249, 115, 22, .34); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { opacity: .6; cursor: wait; transform: none; }

.auth-foot { margin-top: 24px; text-align: center; font-size: .9rem; color: var(--auth-body); }
.auth-foot a { color: var(--auth-primary-dark); font-weight: 600; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 11px;
    font-size: .875rem;
    line-height: 1.55;
    margin-bottom: 20px;
}
.auth-alert .material-icons { font-size: 19px; flex-shrink: 0; margin-top: 1px; }
.auth-alert.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert.ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

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

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; min-height: 100dvh; }
    .auth-brand {
        padding: 28px 24px;
        min-height: auto;
    }
    /* Keep the logo and headline; drop the supporting detail so the form
       is reachable without scrolling. */
    .auth-pitch p, .auth-points, .auth-proof { display: none; }
    .auth-pitch h2 { font-size: 1.35rem; margin: 16px 0 0; max-width: none; }
    .auth-panel { padding: 32px 20px 48px; }
}

@media (max-width: 480px) {
    .auth-grid { grid-template-columns: 1fr; }
    .auth-head h1 { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-submit:hover { transform: none; }
}
