:root {
  --purple: #7228e2;
  --purple-hover: #5f1fc7;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f4f6fb;
  --card: #ffffff;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 4rem;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
  text-align: center;
}

.brand__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.3;
  max-width: 22rem;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 12px 32px rgba(15, 23, 42, 0.08);
  padding: 2rem 2rem 1.75rem;
}

.card__title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

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

.field {
  margin-bottom: 1.25rem;
}

.field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.field__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.field__link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--purple);
  text-decoration: none;
}

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

.input-wrap {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap:focus-within {
  border-color: #c4b5fd;
  box-shadow: 0 0 0 3px rgba(114, 40, 226, 0.12);
}

.input-wrap svg {
  flex-shrink: 0;
  color: #9ca3af;
}

.input-wrap input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 0.9375rem;
  min-width: 0;
  background: transparent;
}

.input-wrap input::placeholder {
  color: #9ca3af;
}

.remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.remember input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--purple);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--purple);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  background: var(--purple-hover);
}

.btn:active {
  transform: scale(0.99);
}

.card__footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

.card__footer a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
}

.card__footer a:hover {
  text-decoration: underline;
}

.alert {
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.875rem;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.site-footer {
  margin-top: auto;
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  max-width: 960px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

@media (max-width: 520px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
