/*
 * The sign-in pages (resources/views/auth). Hand-written, no build step. Colours, type and shadows are the design
 * tokens of @bigbluelettings/ui (apps/packages/ui/src/styles/tokens.css), copied here; keep them in step.
 */
@font-face {
    font-family: "Geist Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("geist-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
    --font-ui: "Geist Variable", ui-sans-serif, system-ui, sans-serif;
    --foreground: oklch(0.22 0.02 252);
    --card: oklch(1 0 0);
    --primary: oklch(0.5 0.12 252);
    --primary-foreground: oklch(1 0 0);
    --muted: oklch(0.975 0.004 252);
    --muted-foreground: oklch(0.52 0.016 252);
    --link: oklch(0.5 0.12 252);
    --input: oklch(0.665 0.012 252);
    --ring: oklch(0.643 0.093 247.6);
    --destructive: oklch(0.53 0.17 22);
    --destructive-subtle: oklch(0.97 0.014 18);
    --destructive-subtle-foreground: oklch(0.48 0.16 22);
    --success-subtle: oklch(0.97 0.025 155);
    --success-subtle-foreground: oklch(0.44 0.1 155);
    --shadow-panel: 0 0 0 1px oklch(0.22 0.02 252 / 0.07), 0 1px 2px oklch(0.22 0.02 252 / 0.05),
        0 4px 16px -4px oklch(0.22 0.02 252 / 0.08);
    --shadow-button: 0 0 0 1px oklch(0.22 0.02 252 / 0.1), 0 1px 2px oklch(0.22 0.02 252 / 0.08);
    --control-height: 2rem;
    --text-small: 0.8125rem;
    --text-caption: 0.75rem;
}

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

body.auth {
    margin: 0;
    background: var(--muted);
    color: var(--foreground);
    font-family: var(--font-ui);
    font-size: 0.875rem;
    line-height: 1.25rem;
    -webkit-font-smoothing: antialiased;
}

.auth-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.auth-column { display: flex; width: 100%; max-width: 24rem; flex-direction: column; gap: 2rem; }

.auth-logo { height: 2.75rem; width: auto; align-self: flex-start; }

.auth-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-radius: 0.75rem;
    background: var(--card);
    padding: 1.75rem;
    box-shadow: var(--shadow-panel);
}

.auth-heading { display: flex; flex-direction: column; gap: 0.375rem; }

.auth-heading h1 { margin: 0; font-size: 1.375rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }

.auth-intro, .auth-footer { margin: 0; color: var(--muted-foreground); }

.auth-intro, .auth-small, .auth-message, .auth-field label, .auth-checkbox, .auth-field-error, .auth-button {
    font-size: var(--text-small);
    line-height: 1.125rem;
}

.auth-small { margin: 0; }

.auth-footer { text-align: center; font-size: var(--text-caption); line-height: 1rem; }

.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }

.auth-field { display: flex; flex-direction: column; gap: 0.375rem; }

.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }

.auth-field label { font-weight: 500; }

.auth-field input {
    height: var(--control-height);
    width: 100%;
    border: 1px solid var(--input);
    border-radius: 0.5rem;
    background: var(--card);
    padding: 0 0.625rem;
    color: inherit;
    font: inherit;
    outline: none;
}

.auth-field input:focus-visible { border-color: var(--ring); box-shadow: 0 0 0 2px var(--ring); }

.auth-field input[aria-invalid="true"] { border-color: var(--destructive); }

.auth-field-error { margin: 0; color: var(--destructive); }

.auth-checkbox { display: flex; align-items: center; gap: 0.5rem; }

.auth-checkbox input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--primary); }

.auth-button {
    display: inline-flex;
    height: var(--control-height);
    width: 100%;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.5rem;
    background: var(--primary);
    padding: 0 0.75rem;
    color: var(--primary-foreground);
    font-family: inherit;
    font-weight: 500;
    box-shadow: var(--shadow-button);
    cursor: pointer;
}

.auth-button:hover { background: oklch(0.5 0.12 252 / 0.9); }

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

.auth-link { color: var(--link); font-weight: 500; text-decoration: none; text-underline-offset: 2px; }

.auth-link:hover { text-decoration: underline; }

.auth-message { margin: 0; border-radius: 0.5rem; padding: 0.625rem 0.75rem; }

.auth-message a { color: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

.auth-message-error { background: var(--destructive-subtle); color: var(--destructive-subtle-foreground); }

.auth-message-success { background: var(--success-subtle); color: var(--success-subtle-foreground); }

.auth-actions { display: flex; gap: 0.75rem; }

.auth-actions form { flex: 1; }
