/* imbrada sign-in. Same palette and type as the admin site (Imbrada.Web). */
:root {
    --paper: #f3f7f6;
    --surface: #ffffff;
    --ink: #17302f;
    --muted: #4f6c6a;
    --line: #d2dfdd;
    --teal: #168a86;
    --teal-strong: #0f6e6b;
    --teal-soft: #d6ecea;
    --orange: #ee7623;
    --orange-strong: #c95c10;
    --error: #b42318;
    --error-soft: #fdecea;
    --focus: #168a86;
    --font: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
    --radius-control: 10px;
    --radius-panel: 18px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #0e1c1b;
        --surface: #142624;
        --ink: #e5efed;
        --muted: #9cb4b1;
        --line: #284240;
        --teal: #3fbdb6;
        --teal-strong: #6fd3cd;
        --teal-soft: #1b3735;
        --orange: #f48a3e;
        --orange-strong: #f7a266;
        --error: #ff8a80;
        --error-soft: #3a1714;
        --focus: #6fd3cd;
        color-scheme: dark;
    }
}

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

body {
    margin: 0;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.55;
}

.stage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.card {
    width: 100%;
    max-width: 26rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    padding: 2rem 1.75rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.wordmark {
    font-weight: 500;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
}

.brand-mark-lines line { stroke: var(--teal); stroke-width: 6; stroke-linecap: round; }
.brand-mark-node { fill: var(--teal); }
.brand-mark-center { fill: var(--orange); }

h1 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 0 0.4rem;
    letter-spacing: -0.01em;
}

.lede { color: var(--muted); margin: 0 0 1.25rem; }
.muted { color: var(--muted); }
.footnote { color: var(--muted); font-size: 0.85rem; margin-top: 1rem; text-align: center; }

a { color: var(--teal-strong); }

.providers { display: grid; gap: 0.6rem; }
.google-button { min-height: 44px; display: flex; justify-content: center; }

.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--muted);
    font-size: 0.85rem;
}
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.form { display: grid; gap: 0.9rem; }
.form-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.9rem; font-size: 0.9rem; }
.field { display: grid; gap: 0.3rem; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 420px) { .field-row { grid-template-columns: 1fr; } }

label { font-size: 0.9rem; font-weight: 500; }

input[type="text"], input[type="email"] {
    width: 100%;
    font: inherit;
    font-weight: 400;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    padding: 0.65rem 0.8rem;
}
.code-input { letter-spacing: 0.35em; font-size: 1.25rem; text-align: center; }

input:focus-visible, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 44px;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
.button-primary { background: var(--teal); color: #fff; }
.button-primary:hover { background: var(--teal-strong); }
.button-secondary { background: var(--teal-soft); color: var(--teal-strong); }
.button-secondary:hover { border-color: var(--teal); }
.button-apple { background: #000; color: #fff; }
.button-apple:disabled { opacity: 0.6; cursor: progress; }
@media (prefers-color-scheme: dark) { .button-apple { background: #fff; color: #000; } }

.link-button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--teal-strong);
    text-decoration: underline;
    cursor: pointer;
}

.notice {
    border-radius: var(--radius-control);
    padding: 0.7rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}
.notice-error { background: var(--error-soft); color: var(--error); }
.notice-info { background: var(--teal-soft); color: var(--teal-strong); }

.details { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.75rem; font-size: 0.9rem; }
.details dt { font-weight: 500; }
.details dd { margin: 0; overflow-wrap: anywhere; }

/* ---- Organization branding (see Pages/Shared/_Layout.cshtml) ---- */

.card { position: relative; overflow: hidden; }

.brand-stripe {
    height: 5px;
    margin: -2rem -1.75rem 1.5rem;
    background: var(--brand-accent);
}

.brand-logo {
    display: block;
    max-height: 48px;
    max-width: 220px;
    object-fit: contain;
}

/* Branded buttons: white text on the organization's primary color, which the
   console only accepts when the contrast is high enough (4.5:1). */
.card.is-branded .button-primary,
.card.is-branded .button-secondary {
    background: var(--brand, var(--teal));
    color: #fff;
    border-color: transparent;
}
.card.is-branded .button-primary:hover,
.card.is-branded .button-secondary:hover { filter: brightness(0.92); }

.card.is-branded a,
.card.is-branded .link-button { color: var(--brand, var(--teal-strong)); }
.card.is-branded input:focus-visible { outline-color: var(--brand, var(--focus)); }

/* On dark backgrounds a dark brand color would be unreadable as link text. */
@media (prefers-color-scheme: dark) {
    .card.is-branded a,
    .card.is-branded .link-button { color: var(--teal-strong); }
}

.policy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin: 1.5rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
}

.footnote a { color: var(--muted); }

/* ---- About page ---- */

.card-wide { max-width: 40rem; }

.about-points { display: grid; gap: 1.1rem; margin: 1.5rem 0; }
.about-points h2 { font-size: 1.05rem; font-weight: 500; margin: 0 0 0.25rem; }
.about-points p { margin: 0; color: var(--muted); }
.about-close { font-size: 0.9rem; margin-bottom: 0; }

/* Cloudflare Turnstile (email-code forms). Usually empty: it only shows a
   checkbox when it can't tell on its own. */
.turnstile { display: flex; justify-content: center; }
.form-inline .turnstile { flex-basis: 100%; justify-content: flex-start; }
.turnstile-error { font-size: 0.9rem; }
