/* Authentication and standalone pages: login, register, forgot password,
   OTP, reset password, and the two error pages. Reset, navbar, buttons and
   form fields come from public.css; colours from brand.css.

   This was one stylesheet pasted into five views with the class names
   swapped -- .login-button on one page, .register-button on the next, the
   same twelve declarations under each. Grouping the names keeps every page
   pixel-identical while the rules exist once. */

.login-container,
.register-container {
  max-width: 460px;
  margin: 4rem auto;
  background: var(--surface);
  padding: 2rem 2rem 1.75rem;
  border-radius: 12px;
  box-shadow: var(--shadow-2);
}

.login-header,
.register-header {
  text-align: center;
  margin-bottom: 1.75rem;
  color: var(--ink);
}

.login-header h2,
.register-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.login-header p,
.register-header p {
  color: var(--ink-3);
  font-size: 0.95rem;
}

.login-button,
.register-button {
  width: 100%;
  padding: 0.8rem;
  background: var(--brand-fill);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: background 0.15s;
  margin-top: 0.75rem;
}

.login-button:hover,
.register-button:hover {
  background: var(--brand-fill-hover);
}

.register-link,
.login-link {
  text-align: center;
  margin-top: 1.25rem;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.register-link a,
.login-link a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.forgot-password {
  text-align: right;
  margin-bottom: 0.5rem;
}

.forgot-password a {
  color: var(--brand);
  text-decoration: none;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .login-container,
  .register-container {
    width: 92%;
    margin: 2rem auto;
    padding: 1.5rem;
  }
}

/* ---- error pages (tooManyAttempts, token_error) ---- */

body.error-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 400px;
  padding: 0 20px;
}

.message-box {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  padding: 30px;
  text-align: center;
}

.message-box i {
  font-size: 4rem;
  color: var(--danger);
  margin-bottom: 20px;
}

.message-box h1 {
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 15px;
}

.error-message {
  font-size: 16px;
  color: var(--ink-2);
  margin-bottom: 15px;
}

.retry-message {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 25px;
}

.back-button {
  display: inline-block;
  width: 100%;
  padding: 12px;
  background: var(--brand-fill);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.15s;
  text-align: center;
}

.back-button:hover {
  background: var(--brand-fill-hover);
}

/* A button that reads as a link, for "resend the code" inside a sentence */
.link-button {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
