/* Deliberately small: the sign in screens are the only pages Keyva serves, and they
   must stay readable on a phone without a build step or a framework. */
:root {
    color-scheme: light dark;
    --surface: #ffffff;
    --text: #16181d;
    --muted: #5b6270;
    --border: #d6d9e0;
    --accent: #2f5bd7;
    --error: #b3261e;
}

@media (prefers-color-scheme: dark) {
    :root {
        --surface: #1b1d23;
        --text: #f0f1f4;
        --muted: #a2a8b6;
        --border: #343843;
        --accent: #7ba0ff;
        --error: #f2b8b5;
    }
}

body {
    margin: 0;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background: color-mix(in srgb, var(--surface) 92%, #000 8%);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.card {
    width: min(100%, 380px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 24px;
}

h1 { margin: 0 0 20px; font-size: 22px; }

label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--muted); }

input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 16px; /* below 16px iOS zooms the page on focus */
}

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

button {
    width: 100%;
    padding: 11px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.error {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--error) 12%, transparent);
    color: var(--error);
    font-size: 14px;
}

.notice {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    font-size: 14px;
}
