:root {
  --auth-accent: #6478f3;
  --auth-accent-hover: #5267e8;
  --auth-text: #1d2433;
  --auth-muted: #6f7787;
  --auth-border: #dfe3ec;
  --auth-surface: rgba(255, 255, 255, 0.96);
  --auth-focus: rgba(100, 120, 243, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f4f6fb;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  padding: 40px 20px;
  display: grid;
  place-items: center;
  color: var(--auth-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 8%, rgba(100, 120, 243, 0.14), transparent 34rem),
    linear-gradient(180deg, #f8f9fd 0%, #f1f4fa 100%);
}

.auth-shell {
  width: min(100%, 420px);
}

.auth-brand {
  margin-bottom: 26px;
  text-align: center;
}

.auth-brand h1 {
  margin: 0;
  color: #25325a;
  font-size: clamp(2.25rem, 7vw, 2.8rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.05;
  text-indent: 0.12em;
}

.auth-brand p {
  margin: 9px 0 0;
  color: var(--auth-muted);
  font-size: 0.96rem;
  letter-spacing: 0.025em;
}

.auth-card {
  width: 100%;
  padding: 32px;
  border: 1px solid rgba(211, 216, 229, 0.92);
  border-radius: 20px;
  background: var(--auth-surface);
  box-shadow: 0 20px 55px rgba(35, 45, 77, 0.12);
  backdrop-filter: blur(12px);
}

.auth-card-heading {
  margin-bottom: 25px;
  text-align: center;
}

.auth-card-heading h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 720;
  line-height: 1.25;
}

.auth-card-heading p {
  margin: 8px 0 0;
  color: var(--auth-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.auth-field {
  width: 100%;
}

.auth-field label {
  display: block;
  margin-bottom: 7px;
  color: #414a5d;
  font-size: 0.88rem;
  font-weight: 650;
}

.auth-field input {
  display: block;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--auth-text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-field input:hover {
  border-color: #c8cedd;
}

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

.auth-field small {
  display: block;
  margin-top: 6px;
  color: var(--auth-muted);
  font-size: 0.78rem;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 3px;
  padding: 11px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--auth-accent);
  color: #fff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(82, 103, 232, 0.22);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-submit:hover {
  background: var(--auth-accent-hover);
  box-shadow: 0 10px 22px rgba(82, 103, 232, 0.28);
  transform: translateY(-1px);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:focus-visible,
.auth-switch a:focus-visible {
  outline: 3px solid var(--auth-focus);
  outline-offset: 3px;
}

.auth-message {
  margin-bottom: 19px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-message-error {
  border: 1px solid #f3c6c9;
  background: #fff1f2;
  color: #ad2831;
}

.auth-message-success {
  border: 1px solid #b9dfc8;
  background: #edf9f1;
  color: #216a3a;
}

.auth-switch {
  margin-top: 24px;
  padding-top: 21px;
  border-top: 1px solid #eceef4;
  color: var(--auth-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.auth-switch span {
  margin-right: 4px;
}

.auth-switch a {
  color: #5267e8;
  font-weight: 700;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  body.auth-page {
    padding: 28px 14px;
    place-items: start center;
  }

  .auth-shell {
    margin: auto 0;
  }

  .auth-brand {
    margin-bottom: 21px;
  }

  .auth-card {
    padding: 25px 20px;
    border-radius: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-field input,
  .auth-submit {
    transition: none;
  }
}
