@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --canvas: #f5f5f5;
    --paper: #ffffff;
    --surface-alt: #fafafa;
    --ink: #0a0a0a;
    --ink-soft: #171717;
    --mid-gray: #737373;
    --hairline: #e5e5e5;
    --ember: #e7000b;
    --radius-control: 18px;
    --radius-card: 24px;
    --shadow-card: 0 16px 48px rgba(10, 10, 10, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background: var(--canvas);
    color: var(--ink-soft);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; }
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; }
.auth-header {
    min-height: 72px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
}
.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--ink);
    color: var(--paper);
    font-size: 12px;
    letter-spacing: -0.04em;
}
.header-link { color: var(--ink-soft); font-size: 14px; font-weight: 700; text-underline-offset: 4px; }
.auth-main { flex: 1; width: 100%; padding: 32px 16px; display: grid; place-items: center; }
.auth-card {
    width: min(100%, 480px);
    padding: 28px 20px;
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}
.auth-intro { margin-bottom: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--mid-gray); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; }
h1 { margin: 0; color: var(--ink); font-size: clamp(30px, 9vw, 42px); line-height: 1.05; letter-spacing: -0.055em; }
.auth-intro > p:last-child { margin: 14px 0 0; color: var(--mid-gray); font-size: 15px; line-height: 1.6; }
.form-alert {
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid var(--ember);
    border-radius: var(--radius-control);
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.5;
}
.form-alert strong { color: var(--ember); }
.form-alert ul { margin: 6px 0 0; padding-left: 20px; }
.auth-form { display: grid; gap: 20px; }
.form-field { display: grid; gap: 9px; }
.form-field label, .field-heading { color: var(--ink); font-size: 14px; font-weight: 700; }
.field-heading { display: flex; justify-content: space-between; gap: 16px; }
.field-heading a { color: var(--mid-gray); font-size: 13px; font-weight: 600; text-underline-offset: 3px; }
.form-field input {
    width: 100%;
    min-height: 56px;
    padding: 0 17px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-control);
    outline: 0;
    background: var(--surface-alt);
    color: var(--ink);
    font-size: 16px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.form-field input::placeholder { color: var(--mid-gray); }
.form-field input:focus { border-color: var(--ink); background: var(--paper); box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08); }
.password-field { position: relative; }
.password-field input { padding-right: 88px; }
.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-height: 40px;
    padding: 0 12px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.password-toggle:hover, .password-toggle:focus-visible { background: var(--hairline); outline: 0; }
.remember-option { display: flex; align-items: center; gap: 11px; color: var(--mid-gray); font-size: 14px; cursor: pointer; }
.remember-option input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.primary-button {
    width: 100%;
    min-height: 56px;
    border: 1px solid var(--ink);
    border-radius: var(--radius-control);
    background: var(--ink);
    color: var(--paper);
    font-weight: 800;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}
.primary-button:hover { background: var(--ink-soft); }
.primary-button:active { transform: translateY(1px); }
.primary-button:focus-visible { outline: 3px solid rgba(10, 10, 10, 0.2); outline-offset: 3px; }
.auth-footer { margin: 24px 0 0; padding-top: 24px; border-top: 1px solid var(--hairline); color: var(--mid-gray); font-size: 14px; line-height: 1.5; text-align: center; }
.auth-footer a { color: var(--ink); font-weight: 800; text-underline-offset: 4px; }
@media (min-width: 48rem) {
    .auth-header { padding-inline: 40px; }
    .brand { font-size: 17px; }
    .auth-main { padding: 56px 24px; }
    .auth-card { padding: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

.brand-logo { display: block; height: 40px; width: auto; }
