:root {
    color-scheme: dark;
    --canvas: #050506;
    --surface: #111113;
    --surface-active: #17171a;
    --border: #2a2a2e;
    --border-strong: #424248;
    --text: #f4f4f5;
    --muted: #96969f;
    --accent: #62d9ef;
    --danger: #ff8f98;
    --danger-surface: #2b1519;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--canvas);
}

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    overflow-x: hidden;
    background: var(--canvas);
    color: var(--text);
    font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.login-shell {
    position: relative;
    width: min(100%, 432px);
}

.login-shell::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: var(--accent);
}

.login-card {
    position: relative;
    padding: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
}

.login-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 32px;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: #09090a;
    color: var(--accent);
    font-size: 13px;
    font-weight: 750;
}

.brand-copy {
    min-width: 0;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font: 600 11px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: var(--text);
    font-size: 26px;
    line-height: 1.16;
    font-weight: 650;
    letter-spacing: 0;
    text-wrap: balance;
}

form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

label {
    color: #cfcfd4;
    font-size: 13px;
    font-weight: 600;
}

input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    outline: none;
    background: #0a0a0b;
    color: var(--text);
    caret-color: var(--accent);
    font: inherit;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

input:hover {
    border-color: var(--border-strong);
}

input:focus-visible {
    border-color: var(--accent);
    background: var(--surface-active);
    box-shadow: 0 0 0 3px rgba(98, 217, 239, 0.12);
}

button {
    width: 100%;
    min-height: 50px;
    margin-top: 4px;
    border: 1px solid #ffffff;
    border-radius: 7px;
    background: #ffffff;
    color: #09090a;
    font: 700 15px/1 Inter, ui-sans-serif, system-ui, sans-serif;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

button:hover {
    border-color: #d8fbff;
    background: #d8fbff;
    transform: translateY(-1px);
}

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

.error {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #6b3038;
    border-radius: 7px;
    background: var(--danger-surface);
    color: var(--danger);
    font-size: 13px;
}

@media (max-width: 560px) {
    body {
        align-items: center;
        padding: 16px;
    }

    .login-card {
        padding: 28px 22px;
    }

    .login-header {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 13px;
        margin-bottom: 28px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
    }

    h1 {
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    input,
    button {
        transition: none;
    }

    button:hover {
        transform: none;
    }
}