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

:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4f;
  --text: #e8eef4;
  --muted: #8b9cb3;
  --accent: #3d8bfd;
  --accent-hover: #5a9dff;
  --focus-ring: #7eb6ff;
  --success: #3ecf8e;
  --success-bg: rgba(62, 207, 142, 0.12);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.12);
  --info-bg: rgba(61, 139, 253, 0.12);
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #1e3a5f 0%, var(--bg) 55%);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.card {
  width: 100%;
  max-width: 28rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

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

.lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

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

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

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

.field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: #5c6d82;
}

.field input:hover {
  border-color: #4a5f7a;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.25);
}

.submit {
  margin-top: 0.25rem;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.submit:hover {
  background: var(--accent-hover);
}

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

.submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

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

.form-feedback {
  margin-top: 0.25rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  line-height: 1.45;
  border-radius: 8px;
  border: 1px solid transparent;
}

.form-feedback[data-variant="loading"] {
  color: var(--accent);
  background: var(--info-bg);
  border-color: rgba(61, 139, 253, 0.35);
}

.form-feedback[data-variant="success"] {
  color: var(--success);
  background: var(--success-bg);
  border-color: rgba(62, 207, 142, 0.35);
}

.form-feedback[data-variant="error"] {
  color: var(--error);
  background: var(--error-bg);
  border-color: rgba(248, 113, 113, 0.35);
}
