/* Auth pages are full-screen — cancel the nav offset set by Browse.css */
main { padding-top: 0 !important; }

/* ─── Auth Split Layout ──────────────────────────────────────── */
:root {
    --au-green:    #10B981;
    --au-green-dk: #0B3D2E;
    --au-ink:      #0F172A;
    --au-ink2:     #64748B;
    --au-line:     #E2E8F0;
    --au-bg2:      #F8FAFC;
    --au-danger:   #DC2626;
    --au-success:  #16A34A;
    --au-grad:     linear-gradient(135deg, #10B981, #047857);
    --au-r-btn:    12px;
    --au-r-input:  12px;
}

html, body {
    margin: 0;
    min-height: 100%;
}

/* Full-viewport 2-column split — exactly 100vh, no overflow */
.au-shell {
    height: 100vh;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: var(--au-ink);
    background: #fff;
    overflow: hidden;
}

/* ─── Left: brand panel ──────────────────────────────────────── */
.au-panel {
    position: relative;
    background: var(--au-green-dk);
    color: #fff;
    padding: 44px 48px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.au-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 60% at 10% 0%, rgba(16,185,129,0.28), transparent 55%);
    pointer-events: none;
}

.au-panel-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.au-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: color 0.15s;
}

.au-back-link:hover { color: #fff; }

.au-logo {
    height: 52px;
    width: auto;
    max-width: 160px;
    display: block;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    object-fit: contain;
    object-position: left center;
}

@media (max-width: 860px) {
    .au-logo { height: 40px; max-width: 130px; }
}

.au-panel-body {
    position: relative;
    z-index: 2;
    margin-top: auto;
    margin-bottom: auto;
    padding-right: 20px;
    padding-bottom: 260px; /* clear the 240px pine area */
}

.au-headline {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin: 0;
    color: #fff;
}

.au-desc {
    font-size: 15.5px;
    line-height: 1.6;
    color: rgba(233,242,238,0.82);
    margin-top: 18px;
    max-width: 400px;
}

.au-bullets {
    list-style: none;
    padding: 0;
    margin: 30px 0 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.au-bullets li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
}

.au-bullet-check {
    flex-shrink: 0;
}

/* Pine silhouette */
.au-pines {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 240px;
    z-index: 1;
    pointer-events: none;
}

.au-pines svg {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* ─── Right: form panel ──────────────────────────────────────── */
.au-form-panel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 52px 32px 44px;
    background: #fff;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
}

.au-form-panel::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.au-form-inner {
    width: 100%;
    max-width: 420px;
}

/* Tabs */
.au-tabs {
    display: flex;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--au-line);
}

.au-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--au-ink2);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
    display: block;
}

.au-tab:hover {
    color: var(--au-ink);
}

.au-tab--active {
    border-bottom-color: var(--au-green);
    color: var(--au-green-dk);
}

/* Heading */
.au-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: var(--au-ink);
}

.au-subtitle {
    font-size: 14px;
    color: var(--au-ink2);
    margin: 0 0 26px;
    line-height: 1.5;
}

/* Form field */
.au-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
}

.au-field > label,
.au-field-header label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--au-ink);
}

.au-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.au-forgot {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--au-green);
    text-decoration: none;
    transition: opacity 0.15s;
}

.au-forgot:hover { opacity: 0.75; }

/* Input */
.au-input {
    border: 1px solid var(--au-line);
    border-radius: var(--au-r-input);
    padding: 13px 15px;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--au-ink);
    background: #fff;
    outline: none;
    width: 100%;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.au-input:focus { border-color: var(--au-green); }

/* Password input with eye button */
.au-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.au-input-wrap .au-input { padding-right: 48px; }

.au-eye-btn {
    position: absolute;
    right: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--au-ink2);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.au-eye-btn:hover { color: var(--au-green); }
.au-eye-btn svg { width: 18px; height: 18px; }

/* Checkbox row */
.au-checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--au-ink2);
    cursor: pointer;
}

.au-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--au-green);
    cursor: pointer;
    flex-shrink: 0;
}

/* Two fields side by side */
.au-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.au-field-row .au-field {
    margin-bottom: 0;
}

/* Submit button */
.au-btn-primary {
    width: 100%;
    background: var(--au-grad);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: var(--au-r-btn);
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 12px 28px -12px rgba(16,185,129,0.6);
    transition: opacity 0.2s, transform 0.2s;
}

.au-btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* Divider */
.au-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--au-ink2);
    font-size: 12.5px;
    margin: 22px 0 18px;
}

.au-divider::before,
.au-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--au-line);
}

/* Switch link */
.au-switch {
    text-align: center;
    font-size: 13.5px;
    color: var(--au-ink2);
    margin: 18px 0 0;
}

.au-switch a {
    color: var(--au-green);
    font-weight: 600;
    text-decoration: none;
}

.au-switch a:hover { text-decoration: underline; }

/* Validation */
.validation-message {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--au-danger);
}

.au-validation-summary {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(220,38,38,0.18);
    background: rgba(220,38,38,0.06);
    font-size: 13.5px;
    color: var(--au-danger);
    margin-bottom: 18px;
}

.au-validation-summary ul {
    margin: 0;
    padding-left: 16px;
}

/* StatusMessage alerts */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 18px;
}

.alert-danger {
    border: 1px solid rgba(220,38,38,0.18);
    background: rgba(220,38,38,0.06);
    color: var(--au-danger);
}

.alert-success {
    border: 1px solid rgba(22,163,74,0.18);
    background: rgba(22,163,74,0.06);
    color: var(--au-success);
}

/* ExternalLoginPicker */
.auth-external-form { display: grid; }

.auth-external-actions {
    display: flex;
    gap: 12px;
}

.auth-external-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--au-line);
    background: #fff;
    border-radius: var(--au-r-btn);
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--au-ink);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-external-btn:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15,23,42,0.08);
}

.auth-external-empty p {
    text-align: center;
    font-size: 13.5px;
    color: var(--au-ink2);
    margin: 0;
}

/* ─── Focused account flows: confirmation / password recovery ─ */
.au-flow-shell {
    min-height: 100vh;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto 1fr;
    padding: 32px clamp(20px, 5vw, 72px) 56px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: var(--au-ink);
    background:
        radial-gradient(circle at 15% 10%, rgba(16,185,129,0.14), transparent 30%),
        radial-gradient(circle at 90% 85%, rgba(11,61,46,0.10), transparent 34%),
        var(--au-bg2);
}

.au-flow-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.au-flow-brand img {
    display: block;
    width: auto;
    height: 46px;
    object-fit: contain;
}

.au-flow-home {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--au-ink2);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s;
}

.au-flow-home:hover { color: var(--au-green-dk); }

.au-flow-card {
    align-self: center;
    justify-self: center;
    width: min(100%, 470px);
    box-sizing: border-box;
    padding: clamp(28px, 5vw, 44px);
    border: 1px solid rgba(148,163,184,.24);
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 28px 70px -34px rgba(15,23,42,.35);
    text-align: center;
}

.au-flow-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: var(--au-green-dk);
    background: rgba(16,185,129,.12);
}

.au-flow-icon svg { width: 30px; height: 30px; }
.au-flow-icon--success { color: #047857; background: rgba(16,185,129,.14); }
.au-flow-icon--danger { color: var(--au-danger); background: rgba(220,38,38,.08); }

.au-flow-eyebrow {
    margin: 0 0 8px;
    color: var(--au-green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.au-flow-title {
    margin: 0;
    color: var(--au-ink);
    font-size: clamp(26px, 4vw, 32px);
    line-height: 1.15;
    letter-spacing: -.025em;
}

.au-flow-subtitle {
    margin: 12px auto 0;
    max-width: 380px;
    color: var(--au-ink2);
    font-size: 14.5px;
    line-height: 1.6;
}

.au-flow-content {
    margin-top: 28px;
    text-align: left;
}

.au-flow-content .au-field { margin-bottom: 20px; }

.au-flow-note {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid rgba(16,185,129,.16);
    border-radius: 12px;
    color: #386155;
    background: rgba(16,185,129,.06);
    font-size: 13.5px;
    line-height: 1.55;
    text-align: center;
}

.au-flow-actions {
    display: grid;
    gap: 11px;
    margin-top: 22px;
}

.au-btn-secondary {
    width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 16px;
    border: 1px solid var(--au-line);
    border-radius: var(--au-r-btn);
    color: var(--au-ink);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
}

.au-btn-secondary:hover {
    border-color: rgba(16,185,129,.5);
    color: var(--au-green-dk);
    background: rgba(16,185,129,.04);
}

.au-flow-content .account-status {
    margin-bottom: 20px;
    text-align: left;
}

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 860px) {
    /* Stack vertically */
    .au-shell {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        grid-template-columns: unset;
    }

    /* Green top bar — condensed: logo + headline only */
    .au-panel {
        display: flex;
        flex-direction: column;
        padding: 52px 18px 30px;
        flex-shrink: 0;
    }

    .au-panel-body {
        padding-right: 0;
        padding-bottom: 0;
        margin: 20px 0 0;
    }

    .au-headline {
        font-size: 27px;
        letter-spacing: -0.02em;
        line-height: 1.12;
        margin: 0;
    }

    .au-headline br { display: none; } /* wrap naturally on mobile */

    /* Hide desktop-only panel elements on mobile */
    .au-desc,
    .au-bullets { display: none; }

    /* Shorter forest on mobile */
    .au-pines { height: 120px; }

    /* White form card overlaps the green bar */
    .au-form-panel {
        flex: 1;
        margin-top: -14px;
        border-radius: 20px 20px 0 0;
        padding: 22px 18px 48px;
        align-items: flex-start;
        box-shadow: 0 -4px 20px rgba(11,61,46,0.12);
    }

    .au-form-inner {
        max-width: 100%;
        width: 100%;
    }

    .au-title { font-size: 22px; }

    /* Stack social buttons vertically on very small screens */
    .auth-external-actions { flex-direction: column; }

    .au-flow-shell {
        min-height: 100dvh;
        padding: 22px 16px 32px;
    }

    .au-flow-brand img { height: 38px; }

    .au-flow-card {
        margin-top: 28px;
        padding: 28px 20px;
        border-radius: 20px;
    }
}
