/*
 * Login ("workshop access") — a job card / key tag like the ones hung on a bodyshop board.
 * Signature: a hi-vis hazard stripe down the card spine + a reinforced eyelet (key-tag hole).
 */

.auth {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 2rem 1.25rem;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(0, 222, 145, 0.10), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(255, 255, 255, 0.04), transparent 55%),
        var(--bs-ink);
    color: var(--bs-text);
}

.auth__card {
    width: min(880px, 100%);
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    background: var(--bs-paper);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04),
        0 30px 70px -30px rgba(0, 0, 0, 0.75);
}

/* ---- Left: the tag ---- */
.auth__tag {
    position: relative;
    background:
        linear-gradient(180deg, var(--bs-steel-2), var(--bs-steel) 55%, var(--bs-ink-2));
    color: #eef1f5;
    padding: 2.5rem 2.25rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    isolation: isolate;
}

/* Hazard stripe down the spine (the card's binding edge) */
.auth__tag::after {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    width: 10px;
    height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        var(--bs-hi-vis) 0 12px,
        var(--bs-ink-2) 12px 24px
    );
    opacity: 0.92;
}

/* Reinforced eyelet — the key-tag hole */
.auth__punch {
    position: absolute;
    top: 1.15rem;
    inset-inline-start: 1.25rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bs-ink-2);
    border: 2px solid var(--bs-hi-vis);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.auth__brand {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth__eyebrow-light {
    color: var(--bs-hi-vis);
}

.auth__wordmark {
    font-family: var(--bs-font-display);
    font-size: clamp(3rem, 7vw, 4.4rem);
    line-height: 0.86;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
}
.auth__logo { display: block; width: 100%; max-width: 320px; height: auto; flex-shrink: 0; }

.auth__tagline {
    margin: 0;
    color: #aeb6c2;
    font-size: 0.95rem;
    max-width: 24ch;
}

.auth__meta {
    margin-top: auto;
    font-family: var(--bs-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #7e879a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth__meta::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bs-hi-vis);
    box-shadow: 0 0 0 3px rgba(0, 222, 145, 0.18);
}

/* ---- Right: the form ---- */
.auth__form {
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth__title {
    font-family: var(--bs-font-ui);
    font-weight: 700;
    font-size: 1.9rem;
    letter-spacing: -0.01em;
    margin: 0.35rem 0 0.15rem;
}

.auth__lead {
    color: var(--bs-muted);
    margin: 0 0 1.4rem;
    font-size: 0.95rem;
}

.auth__error {
    margin: 0 0 1.1rem;
    padding: 0.7rem 0.9rem;
    border-radius: 9px;
    background: #fdecec;
    border: 1px solid #f3b4b4;
    color: #8f1d1d;
    font-size: 0.9rem;
}

.auth__fields {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field label {
    font-family: var(--bs-font-mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.7rem;
    color: var(--bs-muted);
}

.field input {
    font-family: var(--bs-font-ui);
    font-size: 1rem;
    padding: 0.8rem 0.9rem;
    border: 1.5px solid var(--bs-line);
    border-radius: 10px;
    background: #fff;
    color: var(--bs-text);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.field input::placeholder {
    color: #aab0bb;
}

.field input:focus {
    outline: none;
    border-color: var(--bs-hi-vis);
    box-shadow: 0 0 0 4px rgba(0, 222, 145, 0.22);
}

.auth__submit {
    margin-top: 0.6rem;
    font-family: var(--bs-font-ui);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-ink-2);
    background: var(--bs-hi-vis);
    border: none;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: background-color 0.12s ease, transform 0.04s ease;
}

.auth__submit:hover {
    background: var(--bs-hi-vis-press);
}

.auth__submit:active {
    transform: translateY(1px);
}

.auth__submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 222, 145, 0.35), 0 0 0 1.5px var(--bs-ink-2);
}

.auth__foot {
    margin: 1.5rem 0 0;
}
/* Sign out is a POST form now (CSRF-protected logout); the button must read as the link it replaced. */
.auth__foot-link {
    background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
    color: inherit; text-decoration: underline;
}

/* ---- Responsive: stack the tag above the form ---- */
@media (max-width: 720px) {
    .auth__card {
        grid-template-columns: 1fr;
    }

    .auth__tag {
        padding: 1.75rem 1.5rem 1.5rem;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem 1.25rem;
    }

    .auth__tag::after {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 8px;
        background: repeating-linear-gradient(-45deg, var(--bs-hi-vis) 0 12px, var(--bs-ink-2) 12px 24px);
    }

    .auth__brand {
        margin-top: 0;
    }

    .auth__tagline {
        display: none;
    }

    .auth__meta {
        margin-top: 0;
        width: 100%;
    }

    .auth__form {
        padding: 1.75rem 1.5rem 2rem;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .auth__card {
        animation: auth-rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

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

/* ==== Sign-in, in the marketing site's dark look ====
   Two halves: a blurred workshop photo carrying the pitch, and the form on the site's near-black with a
   green rule between them. Scoped to .lg so the card-style pages that still share .auth (change password,
   invites) are untouched; the .field/.auth__* form classes are reused and re-coloured here. */
.lg {
    --lg-bg: #05090b;
    --lg-line: rgba(120, 255, 220, 0.12);
    --lg-text: #e9f3f1;
    --lg-muted: #8ea5a2;
    --lg-green: #22e3a5;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    background: var(--lg-bg);
    color: var(--lg-text);
    font-family: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Left: the pitch over the workshop photo ---- */
.lg__hero { position: relative; overflow: hidden; isolation: isolate; }
.lg__photo {
    position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px);
    object-fit: cover; object-position: 70% center; z-index: -2;
    filter: blur(3px) brightness(0.8) saturate(0.85);
}
.lg__hero::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(5, 9, 11, 0.86) 0%, rgba(5, 9, 11, 0.5) 55%, rgba(5, 9, 11, 0.18) 100%),
        linear-gradient(0deg, rgba(5, 9, 11, 0.85) 0%, rgba(5, 9, 11, 0) 35%);
}
.lg__hero-inner {
    min-height: 100%; display: flex; flex-direction: column; gap: 2.5rem;
    padding: clamp(1.75rem, 4vw, 3.75rem);
}
.lg__brand { display: block; width: max-content; }
.lg__brand img { display: block; height: 60px; width: auto; }
.lg__pitch { margin: auto 0; max-width: 34rem; }
.lg__eyebrow { margin: 0 0 1.1rem; font: 500 0.8rem/1.4 var(--bs-font-mono, monospace); letter-spacing: 0.3em; text-transform: uppercase; color: var(--lg-green); }
.lg__headline { margin: 0; font-weight: 700; font-size: clamp(2.4rem, 4.4vw, 4rem); line-height: 1.02; letter-spacing: -0.035em; color: #fff; }
.lg__headline em { font-style: normal; color: var(--lg-green); }
.lg__lead { margin: 1.4rem 0 0; font-size: 1.05rem; line-height: 1.55; color: #b4c4c1; max-width: 30em; }
.lg__points { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; gap: 1.15rem; }
.lg__points li { display: flex; align-items: center; gap: 1rem; }
.lg__points i {
    flex: none; width: 3.1rem; height: 3.1rem; border-radius: 12px; display: grid; place-items: center;
    background: rgba(34, 227, 165, 0.14); color: var(--lg-green);
}
.lg__points svg { width: 1.45rem; height: 1.45rem; }
.lg__points span { display: block; font-size: 0.92rem; line-height: 1.4; color: var(--lg-muted); }
.lg__points strong { display: block; font-size: 1.05rem; font-weight: 600; color: #fff; }
.lg__tag { margin: 0; display: flex; align-items: center; gap: 0.9rem; font: 400 0.7rem/1.4 var(--bs-font-mono, monospace); letter-spacing: 0.22em; text-transform: uppercase; color: var(--lg-muted); }
.lg__tag::before { content: ''; width: 2.6rem; height: 2px; background: var(--lg-green); flex: none; }

/* ---- Right: the form ---- */
.lg__panel {
    position: relative; display: flex; flex-direction: column;
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
    border-inline-start: 5px solid var(--lg-green);
    box-shadow: inset 12px 0 40px -24px rgba(34, 227, 165, 0.5);
    background:
        radial-gradient(700px 420px at 90% 0%, rgba(34, 227, 165, 0.06), transparent 70%),
        var(--lg-bg);
}
.lg__signup { margin: 0; text-align: end; font-size: 0.95rem; color: var(--lg-text); }
.lg__signup a { display: inline-flex; align-items: center; gap: 0.45rem; margin-inline-start: 0.6rem; font-weight: 600; color: var(--lg-green); text-decoration: none; }
.lg__signup a:hover { text-decoration: underline; text-underline-offset: 4px; }
.lg__signup svg { width: 1.1rem; height: 1.1rem; }
.lg__form { margin: auto 0; width: 100%; max-width: 31rem; }
.lg__kicker { margin: 0 0 1.25rem; font: 500 0.8rem/1.4 var(--bs-font-mono, monospace); letter-spacing: 0.3em; text-transform: uppercase; color: var(--lg-green); }
.lg__title { margin: 0; font-weight: 700; font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.1; letter-spacing: -0.02em; color: #fff; }
.lg__sub { margin: 1rem 0 2rem; font-size: 1.05rem; color: #aebfbc; }
.lg .field label { color: var(--lg-muted); }
.lg .field input {
    background: rgba(255, 255, 255, 0.03); color: var(--lg-text);
    border: 1.5px solid rgba(255, 255, 255, 0.14); border-radius: 12px; padding: 1rem 1.1rem;
}
.lg .field input::placeholder { color: #667a77; }
.lg .field input:focus { border-color: var(--lg-green); box-shadow: 0 0 0 4px rgba(34, 227, 165, 0.18); }
.lg .auth__fields { gap: 1.35rem; }
.lg .auth__submit {
    margin-top: 0.75rem; padding: 1.05rem 1rem; border-radius: 12px; font-size: 1.05rem;
    background: linear-gradient(180deg, #3deeb4, var(--lg-green)); color: #03231a;
    box-shadow: 0 0 28px rgba(34, 227, 165, 0.28);
}
.lg .auth__submit:hover { background: #4cf0bc; }
.lg .auth__submit:focus-visible { box-shadow: 0 0 0 4px rgba(34, 227, 165, 0.4), 0 0 0 1.5px #03231a; }
.lg .auth__error { background: rgba(229, 72, 77, 0.12); border-color: rgba(229, 72, 77, 0.45); color: #ffb4b6; }
.lg .auth__notice { margin: 0 0 1.25rem; }
.lg__secure { margin: 2rem 0 0; display: flex; align-items: center; gap: 0.7rem; font: 400 0.75rem/1.4 var(--bs-font-mono, monospace); letter-spacing: 0.2em; text-transform: uppercase; color: var(--lg-muted); }
.lg__secure svg { width: 1.25rem; height: 1.25rem; color: var(--lg-green); flex: none; }

/* ---- Narrow screens: the pitch shrinks to the brand and headline above the form ---- */
@media (max-width: 900px) {
    .lg { grid-template-columns: 1fr; min-height: 0; }
    .lg__hero-inner { gap: 1.25rem; padding: 1.5rem 1.25rem 1.75rem; }
    .lg__brand img { height: 46px; }
    .lg__pitch { margin: 0; }
    .lg__lead, .lg__points, .lg__tag { display: none; }
    .lg__headline { font-size: 2rem; }
    .lg__panel { border-inline-start: 0; border-block-start: 4px solid var(--lg-green); box-shadow: none; padding-block: 1.5rem 2rem; }
    .lg__signup { text-align: start; }
    .lg__form { margin: 2rem 0; max-width: none; }
}
