/**
 * The login page - illustration-led, on one card.
 *
 * A single rounded surface holding two halves: the drawn side with the record's
 * real numbers, and the form. The artwork is inline SVG and CSS only, so there is
 * no image asset to ship. Scoped to .login-* : no other auth page is affected.
 */

.login-page {
    max-width: 64rem;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

@media (min-width: 64rem) {
    .login-page { padding-top: 3.5rem; }
}

/* ---------- the one card ---------- */

.login-card {
    display: grid;
    overflow: hidden;
    border-radius: 2rem;
    background: #fff;
    box-shadow: 0 26px 60px rgba(11, 31, 24, 0.12), 0 2px 6px rgba(11, 31, 24, 0.04);
}

@media (min-width: 60rem) {
    .login-card { grid-template-columns: 1.08fr 1fr; }
}

/* ---------- the drawn half ---------- */

.login-art {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 2.25rem;
    background: linear-gradient(155deg, #edf7f2 0%, #dcefe6 52%, #cde7db 100%);
}

.login-art-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    color: #0b1f18;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.login-art-wordmark::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #b45309;
}

.login-art h1 {
    margin: 0.4rem 0 0;
    color: #0b1f18;
    font-size: clamp(1.6rem, 2.6vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
}

.login-art p {
    margin: 0.55rem 0 0;
    max-width: 24rem;
    color: #3f574c;
    font-size: 0.94rem;
    line-height: 1.62;
}

.login-art-stage { width: min(100%, 19rem); align-self: center; margin: 0.25rem 0; }
.login-art-stage svg { display: block; width: 100%; height: auto; }

.login-chip { animation: login-float 6s ease-in-out infinite; }
.login-chip-b { animation-delay: -3s; }

@keyframes login-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) {
    .login-chip { animation: none; }
}

/* ---------- the numbers ---------- */

.login-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin: auto 0 0;
    padding: 0;
}

.login-stat {
    padding: 0.7rem 0.75rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
}

.login-stat dt {
    color: #4f6b5f;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-stat dd {
    margin: 0.15rem 0 0;
    color: #0b1f18;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

/* ---------- the form half ---------- */

.login-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2.25rem;
}

.login-eyebrow {
    margin: 0;
    color: #b45309;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.login-form h2 {
    margin: 0.3rem 0 0.35rem;
    color: #0b1f18;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.login-sub {
    margin: 0 0 1.5rem;
    color: #6b7f76;
    font-size: 0.92rem;
}

.login-alert {
    margin-bottom: 1.25rem;
    padding: 0.8rem 1rem;
    border-radius: 0.9rem;
    background: #fdf1ee;
    color: #8f3520;
    font-size: 0.88rem;
    line-height: 1.5;
}

.login-field { display: grid; gap: 0.4rem; margin-bottom: 1.1rem; }

.login-field > span {
    color: #0b1f18;
    font-size: 0.82rem;
    font-weight: 800;
}

.login-field input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.9rem;
    background: #f4f8f6;
    color: #0b1f18;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-field input::placeholder { color: #9aada4; }

.login-field input:focus {
    background: #fff;
    border-color: #0b1f18;
    box-shadow: 0 0 0 4px rgba(11, 31, 24, 0.08);
}

/* Positioned against the input, not the whole label: the wrapper is exactly the
   field, so the toggle sits on its centre line. */
.login-password .password-input-wrap { position: relative; }
.login-password input { padding-right: 4.4rem; }

.login-mark-mobile {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
    color: #0b1f18;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.login-mark-mobile::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #b45309;
}

.login-password button {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    padding: 0.35rem 0.6rem;
    border: 0;
    border-radius: 0.6rem;
    background: none;
    color: #4b5a53;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.login-password button:hover { background: #e7efeb; }

.login-row { display: flex; justify-content: flex-end; margin: -0.2rem 0 1.3rem; }

.login-row a { color: #4b5a53; font-size: 0.83rem; font-weight: 700; text-decoration: none; }
.login-row a:hover { color: #0b1f18; text-decoration: underline; }

.login-submit {
    width: 100%;
    padding: 0.95rem 1.25rem;
    border: 0;
    border-radius: 0.9rem;
    background: #0b1f18;
    color: #fff;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.login-submit:hover { background: #17402f; }
.login-submit:active { transform: translateY(1px); }

/* ---------------------------------------------------- choosing how to sign in
   Two radios drive it, so the switch works before any script runs. */
.login-mode-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.login-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
    margin-bottom: 1.35rem;
    padding: 0.28rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.95rem;
    background: #f4f7f6;
}

.login-mode-tab {
    padding: 0.6rem 0.75rem;
    border-radius: 0.72rem;
    color: #55665e;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

#login-mode-password:checked ~ .login-mode-switch label[for="login-mode-password"],
#login-mode-code:checked ~ .login-mode-switch label[for="login-mode-code"] {
    background: #ffffff;
    color: #0b1f18;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}

#login-mode-password:focus-visible ~ .login-mode-switch label[for="login-mode-password"],
#login-mode-code:focus-visible ~ .login-mode-switch label[for="login-mode-code"] {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

/* Only the chosen panel is shown. Without JavaScript this is still true. */
#login-mode-password:checked ~ .login-panel-code,
#login-mode-code:checked ~ .login-panel-password {
    display: none;
}

.login-mode-hint {
    margin: 0 0 1.2rem;
    color: #6b7f76;
    font-size: 0.86rem;
    line-height: 1.6;
}

/* The second way in, deliberately quieter than the first. */
.login-code-submit {
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.8rem 1.25rem;
    border: 1px solid #d7e2dc;
    border-radius: 0.9rem;
    background: transparent;
    color: #0b1f18;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.login-code-submit:hover {
    background: #f1f6f3;
    border-color: #b9cdc4;
}

.login-switch { margin: 1.4rem 0 0; color: #6b7f76; font-size: 0.88rem; text-align: center; }
.login-switch a { color: #0b1f18; font-weight: 800; text-decoration: none; }
.login-switch a:hover { text-decoration: underline; }

/* Phones: the illustration and the counts are dropped entirely. The page is the form,
   full width and comfortable, with a small wordmark so it still reads as ManifestoHub. */
@media (max-width: 47.99rem) {
    .login-art { display: none; }
    .login-card { border-radius: 1.25rem; }
    .login-form { padding: 1.9rem 1.5rem; }
    .login-mark-mobile { display: inline-flex; }
    .login-page { padding: 1.25rem 1rem 3rem; }
}
