/* ==========================================================
   Úcademy · Login / Sign-up pages
   Loaded AFTER about.css (re-uses its colors, buttons, fields)
   ========================================================== */

.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar__back {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.15s;
}
.topbar__back:hover { color: var(--primary); }

/* ---------- Card ---------- */
.auth {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 18px;
}

.auth__card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth__card h1 {
  margin: 14px 0 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth__sub {
  margin-bottom: 22px;
  font-size: 13px;
  color: var(--muted);
}

.auth__form { display: grid; gap: 14px; }

/* ---------- Fields ---------- */
.field__hint,
.field__error { font-size: 11.5px; }
.field__hint { color: var(--muted); }
.field__error { color: #dc2626; }
.field__error:empty { display: none; }

.password { position: relative; }
.password input { padding-right: 62px; }
.password__toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  padding: 4px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.password__toggle:hover { background: var(--primary-soft); }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-soft);
  cursor: pointer;
}
.check input { accent-color: var(--primary); width: 15px; height: 15px; margin: 0; }

/* ---------- Buttons / status ---------- */
.btn--block { width: 100%; padding: 11px 18px; }
.btn[disabled] { opacity: 0.65; cursor: wait; }

.auth__form .form-status { min-height: 0; text-align: center; }
.auth__form .form-status:empty { display: none; }

.auth__switch {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.auth__switch a { color: var(--primary); font-weight: 500; }
.auth__switch a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  /* about.css wraps the top bar on small screens; this page has no menu to hide */
  .auth-page .topbar__inner { flex-wrap: nowrap; min-height: 58px; }
  .auth__card { padding: 24px 20px; }
}
