/* The auth pages share the landing page's visual language: same variables,
   same hairlines, one card on paper. Values come from the reference app's
   styles.css (apps/marketing/src/styles.css) so the surfaces never drift. */

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

:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --paper: #fbfbfa;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --ink: #111113;
  --ink-2: #56565c;
  --ink-3: #8b8b92;
  --line: rgba(17, 17, 19, 0.07);
  --line-2: rgba(17, 17, 19, 0.13);
  --accent: #0b9a6d;
  --accent-ink: #077553;
  --spend: #b0532a;
  --shadow-lg: 0 1px 2px rgba(17, 17, 19, 0.04), 0 24px 60px rgba(17, 17, 19, 0.1);
}

:root[data-theme='dark'] {
  --paper: #08080a;
  --surface: #0e0e11;
  --surface-2: #16161a;
  --ink: #f3f3f4;
  --ink-2: #9a9aa2;
  --ink-3: #6a6a73;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.11);
  --accent: #35d39a;
  --accent-ink: #6fe3ba;
  --spend: #e8875a;
  --shadow-lg: 0 1px 2px rgba(0, 0, 0, 0.4), 0 24px 60px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #08080a;
    --surface: #0e0e11;
    --surface-2: #16161a;
    --ink: #f3f3f4;
    --ink-2: #9a9aa2;
    --ink-3: #6a6a73;
    --line: rgba(255, 255, 255, 0.06);
    --line-2: rgba(255, 255, 255, 0.11);
    --accent: #35d39a;
    --accent-ink: #6fe3ba;
    --spend: #e8875a;
    --shadow-lg: 0 1px 2px rgba(0, 0, 0, 0.4), 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

body.page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.6875rem;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 160ms, color 160ms;
}
.theme-toggle:hover { border-color: var(--line-2); color: var(--ink); }

.card-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 2.5rem 1.25rem;
}

.card {
  width: min(24rem, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.75rem 1.75rem;
}

.eyebrow {
  margin: 0 0 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

h1 {
  margin: 0 0 1.5rem;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

label {
  display: block;
  margin: 0 0 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
}

input {
  width: 100%;
  margin: 0 0 1rem;
  padding: 0.5625rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 8px;
}
input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.hint {
  margin: -0.5rem 0 1rem;
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* x-show drives the visibility with an inline style; CSS only styles the
   text itself. */
.error {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--spend);
}

button[type='submit'] {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.625rem 1.125rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 1;
  transition: opacity 160ms;
}
button[type='submit']:disabled { opacity: 0.35; cursor: default; }

.switch {
  margin: 1.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.switch a { color: var(--accent-ink); font-weight: 600; }

.foot {
  padding: 1.25rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.foot p { margin: 0; font-size: 0.75rem; color: var(--ink-3); }
