@import url("https://fonts.googleapis.com/css2?family=Sora:wght@600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --color-bg: #f7f6ff;
  --color-surface: #ded4ff;
  --color-primary: #7a5cff;
  --color-primary-hover: #6246ea;
  --color-primary-dark: #4a34b7;
  --color-ink: #1d1633;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  font-family: "Inter", sans-serif;
  color: var(--color-ink);
}

/* Login / signup (2026-10-04 shell restyle stage 4, UI style guide §1–4,
   hub level so master brand colours). Styled here only — the pages'
   HTML is untouched (a parallel forgot-password task edits login.html). */
h1,
h2,
h3 {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0 0 0.25rem;
}

.card {
  width: 100%;
  max-width: 400px;
  margin: 16px;
  background: #fff;
  border: 1px solid #e7e2f5;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(29, 22, 51, 0.08);
}

/* ChessSuite mark + wordmark on top of the card (purple mark on white). */
.card::before {
  content: "ChessSuite";
  display: block;
  height: 32px;
  line-height: 32px;
  padding-left: 42px;
  margin-bottom: 1.5rem;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-ink);
  background: url("../assets/logo/favicon-purple.svg") left center / 32px 32px no-repeat;
}

.card h1 {
  font-size: 1.6rem;
}

.card p.subtitle {
  margin: 0 0 1.5rem;
  color: #6b6478;
  font-size: 0.9rem;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #6b6478;
  margin-bottom: 0.35rem;
  margin-top: 1rem;
}

input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1.5px solid #d9d3ee;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--color-ink);
}

input:focus {
  outline: none;
  border-color: var(--color-primary-hover);
  box-shadow: 0 0 0 3px rgba(122, 92, 255, 0.18);
}

/* Primary button — hub level, so the master gradient (style guide §4). */
button {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.75rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #6246ea, #7a5cff);
  box-shadow: 0 10px 22px -8px rgba(98, 70, 234, 0.55);
  color: #fff;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: filter 0.15s ease;
}

button:hover {
  filter: brightness(1.06);
}

button:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
}

button:disabled {
  background: #ece8f7;
  box-shadow: none;
  color: #a79fc2;
  cursor: not-allowed;
  filter: none;
}

.switch-link {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
}

.switch-link a {
  color: var(--color-primary-dark);
  font-weight: 600;
  text-decoration: none;
}

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

.message {
  margin-top: 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  display: none;
}

.message.error {
  display: block;
  background: #fdeaea;
  color: #a5222b;
  border: 1px solid #f3c7c9;
}

.message.success {
  display: block;
  background: #eaf6ee;
  color: #1e7b3c;
  border: 1px solid #c8e8d1;
}

.dashboard {
  text-align: center;
}

.dashboard .badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
}

.dashboard .email {
  margin-top: 1rem;
  color: var(--color-ink);
  font-size: 0.95rem;
}

.dashboard button.logout {
  background: var(--color-ink);
}

.dashboard button.logout:hover {
  background: #322a4d;
}

.forgot-link {
  margin-top: 0.4rem;
  text-align: right;
  font-size: 0.82rem;
}

.forgot-link a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
}

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