/* The login page: served without a session, so it shares nothing with app.css.
   Same colours as app.css, light and dark. */
@font-face {
    font-family: "InterVariable";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/fonts/InterVariable.woff2") format("woff2");
}

:root {
    color-scheme: light dark;
    --text: light-dark(#1b1b1f, #e3e4e8);
    --text-muted: light-dark(#6b6f76, #8b8f98);
    --background: light-dark(#f7f7f8, #0b0c0d);
    --surface: light-dark(#ffffff, #18191b);
    --line: light-dark(#e8e8eb, #26272a);
    --line-strong: light-dark(#d9d9de, #34353a);
    --accent: #5e6ad2;
    --accent-hover: light-dark(#4f5bc4, #6d78db);
    --danger: light-dark(#cf3f36, #f0736a);
    --shadow: light-dark(0 8px 30px rgb(0 0 0 / 0.06), 0 8px 30px rgb(0 0 0 / 0.5));
    --font: "InterVariable", "Inter", system-ui, sans-serif;
}

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

html {
    background: var(--background);
    color: var(--text);
    font-family: var(--font);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    font-size: 0.875rem;
}

.login {
    width: min(22rem, 100% - 3rem);
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

h1 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1.25rem;
}

form {
    display: grid;
    gap: 0.5rem;
}

label {
    color: var(--text-muted);
    font-weight: 500;
}

input,
button {
    font: inherit;
    height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: 6px;
}

input {
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text);
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

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

button {
    margin-top: 0.75rem;
    border: 0;
    background: var(--accent);
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
}

button:hover {
    background: var(--accent-hover);
}

.failed {
    margin: 0;
    color: var(--danger);
}
