/*
 * Auth pages on the public site layout (issue #197): login, register, forgot password (+ sent), reset password and
 * the email verification notice (resources/views/auth/). One card design, previously copied into each page.
 * Loaded after public/css/public-site.css; the header and footer keep their own styles. Scoped to .auth-page except
 * for the body rules, which every page on the layout sets for itself.
 */

:root {
    --auth-bg: #060606;
    --auth-card: #090909;
    --auth-line: rgba(255, 255, 255, 0.08);
    --auth-line-strong: rgba(255, 255, 255, 0.12);
    --auth-text: #f3f3ee;
    --auth-muted: rgba(243, 243, 238, 0.56);
    --auth-soft: rgba(243, 243, 238, 0.46);
    --auth-accent: #6a7540;
    --auth-accent-text: #f3f3ee;
    --auth-link: #9eaf53;
    --auth-link-hover: #b8ca66;
    --auth-error: #f38c8c;
    --auth-success-bg: #102013;
    --auth-success-border: #315b3a;
    --auth-success-text: #8fe29c;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.auth-page,
.auth-page *,
.auth-page *::before,
.auth-page *::after {
    box-sizing: border-box;
}

.auth-page {
    display: grid;
    place-items: start center;
    padding: 52px 24px 56px;
    min-height: 60vh;
}

/* a plain message page (reset link sent): vertically centred, no card */
.auth-page--message {
    place-items: center;
}

.auth-wrap {
    width: 100%;
    max-width: 472px;
}

.auth-page .eyebrow {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 0.75rem;
    color: var(--auth-muted);
    margin: 0 0 18px;
}

.auth-page h1 {
    text-align: center;
    font-weight: 400;
    font-size: 3rem;
    letter-spacing: -0.9px;
    line-height: 1.1;
    margin: 0 0 44px;
}

.auth-page .card {
    border: 1px solid var(--auth-line);
    background: var(--auth-card);
    padding: 30px 32px 26px;
}

.auth-page .notice {
    border: 1px solid var(--auth-success-border);
    background: var(--auth-success-bg);
    color: var(--auth-success-text);
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 0.84rem;
    line-height: 1.45;
}

.auth-page .field {
    margin-bottom: 26px;
}

.auth-page .field:last-of-type {
    margin-bottom: 18px;
}

.auth-page .field-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}

.auth-page label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    font-size: 0.75rem;
    color: var(--auth-text);
}

.auth-page .field > label {
    margin-bottom: 10px;
}

.auth-page .field-row label {
    margin-bottom: 0;
}

.auth-page .forgot-link {
    color: var(--auth-muted);
    text-decoration: none;
    font-size: 0.77rem;
}

.auth-page .forgot-link:hover {
    color: #dcdcd6;
}

.auth-page input:not([type="hidden"]) {
    width: 100%;
    height: 54px;
    margin: 0;
    border: 1px solid var(--auth-line);
    border-radius: 0;
    background: transparent;
    color: var(--auth-text);
    padding: 0 12px;
    font: inherit;
}

.auth-page input::placeholder {
    color: var(--auth-soft);
}

.auth-page input:focus {
    outline: none;
    border-color: var(--auth-line-strong);
}

.auth-page .captcha {
    margin-bottom: 16px;
}

.auth-page .error-text {
    margin-top: 8px;
    color: var(--auth-error);
    font-size: 0.78rem;
    line-height: 1.4;
}

.auth-page .error-text--top {
    margin: 0 0 14px;
}

.auth-page .submit-btn {
    width: 100%;
    height: 54px;
    border: 1px solid var(--auth-accent);
    border-radius: 0;
    background: var(--auth-accent);
    color: var(--auth-accent-text);
    text-transform: uppercase;
    letter-spacing: 2px;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 8px;
    transition: filter 0.2s ease;
}

.auth-page .submit-btn:hover {
    filter: brightness(1.08);
}

.auth-page .submit-btn:focus-visible {
    outline: 2px solid var(--auth-text);
    outline-offset: 2px;
}

.auth-page .bottom-note {
    margin-top: 16px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.auth-page .bottom-note a {
    color: var(--auth-link);
    text-decoration: none;
}

.auth-page .bottom-note a:hover {
    color: var(--auth-link-hover);
}

/* ---------- Message page (reset link sent) ---------- */

.auth-page .message-wrap {
    width: 100%;
    max-width: 520px;
    text-align: center;
}

.auth-page .message-wrap h1 {
    font-size: 2.72rem;
    letter-spacing: -0.7px;
    margin-bottom: 14px;
}

.auth-page .message-wrap p {
    color: rgba(243, 243, 238, 0.86);
    font-size: 0.88rem;
    line-height: 1.42;
    margin: 0 auto 42px;
    max-width: 390px;
}

.auth-page .message-wrap .bottom-note {
    color: var(--auth-soft);
    font-size: 0.72rem;
}

/* ---------- Email verification notice ---------- */

.auth-page .verify-wrap {
    width: 100%;
    max-width: 640px;
    text-align: center;
}

.auth-page .verify-wrap img {
    display: block;
    max-width: 100%;
    width: 420px;
    height: auto;
    margin: 0 auto 36px;
}

.auth-page .verify-wrap p {
    color: var(--auth-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 auto 36px;
    max-width: 520px;
}

.auth-page .verify-wrap .notice {
    text-align: left;
}

.auth-page .verify-wrap form {
    max-width: 320px;
    margin: 0 auto;
}

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

@media (max-width: 860px) {
    .auth-page .message-wrap h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 640px) {
    .auth-page {
        padding: 28px 14px 28px;
    }

    .auth-page h1 {
        font-size: 2.3rem;
        margin-bottom: 28px;
    }

    .auth-page .card {
        padding: 20px 16px 18px;
    }

    .auth-page input:not([type="hidden"]),
    .auth-page .submit-btn {
        height: 48px;
    }
}

@media (max-width: 480px) {
    .auth-page .message-wrap h1 {
        font-size: 1.88rem;
    }

    .auth-page .message-wrap p {
        font-size: 0.78rem;
    }
}
