:root {
  color-scheme: dark;
  --bg: 10 10 10;
  --surface: 23 23 23;
  --surface-input: 30 30 30;
  --muted: 161 161 161;
  --accent: 59 130 246;
  --accent-hover: 37 99 235;
  --accent-contrast: 255 255 255;
  --border: 38 38 38;
  --ring: 59 130 246;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --text: 250 250 250;
  --error: 248 113 113;
  --glow: 59 130 246;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: rgb(var(--bg));
  color: rgb(var(--text));
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgb(var(--border));
  background-color: rgba(var(--bg) / 0.8);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.header-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo {
  height: 2.25rem;
  width: auto;
}

.header-title {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.login-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem 2rem;
}

.card {
  width: 100%;
  max-width: 24rem;
  border-radius: 1rem;
  border: 1px solid rgb(var(--border));
  background-color: rgb(var(--surface));
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.subtle {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: rgb(var(--muted));
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.875rem;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgb(var(--muted));
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(var(--border));
  background-color: rgb(var(--surface-input));
  color: rgb(var(--text));
  font-family: inherit;
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  outline: none;
  border-color: rgb(var(--accent));
  box-shadow: 0 0 0 3px rgba(var(--ring) / 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.error {
  margin: 0 0 0.875rem;
  font-size: 0.875rem;
  color: rgb(var(--error));
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 0.75rem;
  background-color: rgb(var(--accent));
  color: rgb(var(--accent-contrast));
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px -6px rgba(var(--glow) / 0.5);
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background-color: rgb(var(--accent-hover));
  box-shadow: 0 10px 28px -8px rgba(var(--glow) / 0.65);
  transform: translateY(-1px);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--ring) / 0.5);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

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