@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("geist-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("geist-mono-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --radius: 0.45rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.985 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0 0 0);
  --muted: oklch(0.205 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.708 0 0);
  --success: oklch(0.795 0.144 170.07);
  --font-sans: "Geist Variable", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono Variable", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
a,
input {
  outline: none;
}

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

::selection {
  background: var(--primary);
  color: var(--primary-foreground);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-mark {
  display: flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
}

.auth-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  line-height: 1.2;
}

.auth-brand-name {
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-brand-tag {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.card {
  width: min(100%, 24rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: calc(var(--radius) * 1.4);
  background: var(--card);
  color: var(--card-foreground);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent);
}

.card-header {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1rem 0;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.375;
  text-wrap: balance;
}

.card-description {
  margin: 0;
  max-width: 65ch;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.5;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.card-footer {
  margin: 0;
  padding: 1rem;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 50%, transparent);
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
}

.alert {
  display: grid;
  gap: 0.125rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.875rem;
}

.alert-destructive {
  color: var(--destructive);
}

.alert-title {
  font-weight: 500;
}

.alert-description {
  color: color-mix(in oklab, var(--destructive) 90%, transparent);
}

.alert-destructive .alert-description {
  color: color-mix(in oklab, var(--destructive) 90%, transparent);
}

.actions,
form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

form {
  gap: 1.25rem;
}

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

.field-label {
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
}

.input {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--input) 30%, transparent);
  color: var(--foreground);
  font: inherit;
  font-size: 1rem;
}

.input:focus-visible {
  border-color: var(--ring);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
}

.input[aria-invalid="true"] {
  border-color: var(--destructive);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--destructive) 20%, transparent);
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: color-mix(in oklab, var(--primary) 80%, transparent);
}

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
}

.button-outline {
  background: color-mix(in oklab, var(--input) 30%, transparent);
  border-color: var(--input);
  color: var(--foreground);
}

.button-outline:hover {
  background: color-mix(in oklab, var(--input) 50%, transparent);
}

.ip-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.4);
}

.ip-label {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.ip-value {
  margin: 0;
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .auth-shell {
    padding: 1.25rem 1rem 2rem;
    justify-content: flex-start;
    padding-top: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
