/* ==========================================================================
   Account pages - sign in, set up, confirm, reset, lockout, access denied (Stage 8)
   Built on the tokens in site.css. Every class is prefixed auth- so nothing here
   leaks into the dashboards. Design: crease-account-pages.html.
   ========================================================================== */

.auth {
    background: var(--bg);
    padding: 48px 16px 64px;
    min-height: calc(100vh - 120px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--lav-line);
    border-radius: var(--r-card);
    padding: 30px 28px 26px;
    color: var(--text);
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    text-decoration: none;
}

    .auth-brand:hover { color: var(--green); }

    .auth-brand img {
        width: 64px;
        height: 64px;
        border-radius: 50%;
    }

.auth-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    background: var(--green);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.auth-badge--warn { background: var(--warn); }
.auth-badge--info { background: var(--lav-tint); color: var(--lav-ink); }
.auth-badge--muted { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

.auth-title {
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--ink);
    text-align: center;
    margin: 0 0 6px;
}

.auth-rule {
    width: 40px;
    height: 2px;
    background: var(--lavender);
    margin: 0 auto 14px;
}

.auth-lead {
    text-align: center;
    color: var(--muted);
    font-size: 14.5px;
    margin: 0 0 20px;
}

.auth-field { margin-bottom: 16px; }

    .auth-field label {
        display: block;
        font-size: 13.5px;
        font-weight: 600;
        color: var(--text);
        margin-bottom: 6px;
    }

.auth-input {
    display: block;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--lav-line);
    border-radius: var(--r-input);
    padding: 10px 12px;
    font-size: 15px;
    color: var(--text);
    background: #fff;
}

    .auth-input:focus {
        outline: 3px solid rgba(43, 126, 85, .3);
        outline-offset: 0;
        border-color: var(--green);
    }

    .auth-input.input-validation-error { border-color: var(--dan); }

.auth-pw { position: relative; }

    .auth-pw .auth-input { padding-right: 76px; }

.auth-show {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 36px;
    min-width: 60px;
    border: none;
    border-radius: 6px;
    background: none;
    color: var(--green);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

    .auth-show:hover { background: var(--green-tint); }

.auth-hint {
    font-size: 12.5px;
    color: var(--muted);
    margin: 6px 0 0;
}

.auth-error {
    display: block;
    font-size: 12.5px;
    color: var(--dan);
    margin-top: 6px;
}

    .auth-error:empty { display: none; }

.auth-rules {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 12.5px;
    color: var(--muted);
}

    .auth-rules li::before {
        content: "\25CB\00a0";
    }

    .auth-rules li.is-met { color: var(--green); font-weight: 600; }

        .auth-rules li.is-met::before { content: "\2713\00a0"; }

.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: 16px;
    font-size: 13.5px;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    cursor: pointer;
}

    .auth-check input {
        width: 18px;
        height: 18px;
        accent-color: var(--green);
    }

.auth-card a:not(.auth-btn):not(.auth-brand) {
    color: var(--green);
    font-weight: 600;
}

.auth-btn {
    display: block;
    width: 100%;
    min-height: 46px;
    border: 1.5px solid var(--green);
    border-radius: 99px;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 11px 20px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

    .auth-btn:hover { background: #236846; border-color: #236846; color: #fff; }

    .auth-btn[disabled], .auth-btn[aria-disabled="true"] {
        background: #A9C3B6;
        border-color: #A9C3B6;
        cursor: not-allowed;
    }

.auth-btn--outline {
    background: #fff;
    color: var(--green);
    border-color: var(--lav-line);
}

    .auth-btn--outline:hover { background: var(--green-tint); color: var(--green); border-color: var(--lav-line); }

    .auth-btn--outline[disabled] { background: #fff; color: var(--muted); border-color: var(--line); }

.auth-btn + .auth-btn, .auth-btn + form, form + .auth-btn, form + form { margin-top: 10px; }

.auth-or {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12.5px;
    margin: 18px 0;
}

    .auth-or::before, .auth-or::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--line);
    }

.auth-note {
    background: var(--bg);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13.5px;
    margin: 16px 0 0;
}

    .auth-note p { margin: 0; }
    .auth-note p + p { margin-top: 6px; }

.auth-alert {
    border: 1px solid var(--dan-line);
    background: var(--dan-bg);
    color: #6E1722;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13.5px;
    margin-bottom: 16px;
}

    .auth-alert:focus { outline: 3px solid rgba(156, 34, 48, .3); }
    .auth-alert strong { display: block; margin-bottom: 2px; }
    .auth-alert ul { margin: 0; padding-left: 18px; }
    .auth-alert p { margin: 0; }
    .auth-alert p + p, .auth-alert p + form { margin-top: 8px; }

.auth-alert--warn { border-color: var(--warn-line); background: var(--warn-bg); color: #5A3308; }
.auth-alert--ok { border-color: var(--green-bright); background: var(--green-tint); color: #1E5A3C; }

.auth-address {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin: 0 0 12px;
    font-weight: 700;
    color: var(--ink);
    word-break: break-all;
}

    .auth-address a { font-size: 13px; }

.auth-small {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    margin: 14px 0 0;
}

.auth-back {
    display: block;
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
}

    .auth-card a.auth-back { color: var(--muted); font-weight: 400; }

.auth-countdown {
    font-size: 34px;
    font-weight: 700;
    text-align: center;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    margin: 0 0 4px;
}

.auth-stats {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 16px;
}

    .auth-stats div {
        min-width: 92px;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 8px 10px;
        text-align: center;
        font-size: 12px;
        color: var(--muted);
    }

    .auth-stats b {
        display: block;
        font-size: 20px;
        color: var(--green);
    }

.auth-card a:focus-visible, .auth-card button:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 2px;
}

/* Phones: the page becomes the card - a bordered box inside 390px wastes both edges. */
@media (max-width: 575px) {
    .auth {
        padding: 20px 0 40px;
        background: #fff;
    }

    .auth-card {
        border: none;
        border-radius: 0;
        padding: 8px 20px 24px;
    }
}
