*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0f1419;
  --bg-accent: #1a2332;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-focus: rgba(37, 99, 235, 0.35);
  --radius: 12px;
  --shadow: 0 24px 48px rgba(15, 20, 25, 0.35);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(ellipse at top left, #1e3a5f 0%, var(--bg) 45%),
    radial-gradient(ellipse at bottom right, #312e81 0%, transparent 50%),
    var(--bg);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
}

.card__header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  color: var(--primary);
  background: #eff6ff;
  border-radius: 10px;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input::placeholder {
  color: #94a3b8;
}

input:hover {
  border-color: #cbd5e1;
}

input:focus {
  outline: none;
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.button {
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.8125rem 1rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.button:hover {
  background: var(--primary-hover);
}

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.button:active {
  transform: scale(0.98);
}

.link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-text {
  margin: 1.75rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
