:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202123;
  background: #ffffff;
  --accent: #10a37f;
  --accent-hover: #0d8d6e;
  --border: #d9d9e3;
  --muted: #6f7075;
  --danger-bg: #fff2f0;
  --danger-border: #ffccc7;
  --danger-text: #a8071a;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: #fff; color: #202123; }
button, input { font: inherit; }
a { color: var(--accent); }

.auth-page {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 28px 24px 20px;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #202123;
  text-decoration: none;
  font-size: 18px;
  font-weight: 750;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #111;
  color: #fff;
  font-size: 18px;
}

.auth-card {
  align-self: center;
  justify-self: center;
  width: min(100%, 410px);
  padding: 36px 0 52px;
}

.auth-card h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(28px, 5vw, 34px);
  line-height: 1.2;
  letter-spacing: -.035em;
}

.auth-subtitle {
  margin: 12px 0 30px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--danger-border);
  border-radius: 10px;
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 14px;
  line-height: 1.45;
}

form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field > span:first-child { font-size: 14px; font-weight: 650; }

.field input {
  width: 100%;
  height: 54px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 15px;
  outline: none;
  background: #fff;
  color: #202123;
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 88px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  height: 38px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  background: transparent;
  color: #565869;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.password-toggle:hover { background: #f1f1f3; }

.primary-button {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  transition: background .15s, transform .08s;
}
.primary-button:hover { background: var(--accent-hover); }
.primary-button:active { transform: scale(.995); }

.switch-auth {
  margin: 25px 0 0;
  text-align: center;
  color: #353740;
  font-size: 14px;
}
.switch-auth a { font-weight: 650; text-decoration: none; }
.switch-auth a:hover { text-decoration: underline; }

.auth-footer {
  justify-self: center;
  max-width: 600px;
  text-align: center;
  color: #8e8ea0;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .auth-page { padding: 18px 20px 16px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 31px; height: 31px; }
  .auth-card { padding: 42px 0; }
  .auth-card h1 { font-size: 29px; }
  .auth-subtitle { margin-bottom: 25px; }
}

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