/* ==========================================================================
   AUTH PAGE (login / register)
   ========================================================================== */
.auth {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
  background-color: #0a1030;
  background-image:
    linear-gradient(360deg, #00001D 0%, rgba(0, 0, 53, .55) 60%, rgba(0, 0, 29, .2) 121%),
    url("/images/leaderboard-bg.webp");
  background-size: cover;
  background-position: center;
}

.auth__card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #060c18, #0b1526);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 22px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
}
@media (min-width: 1024px) { .auth__card { max-width: 440px; padding: 32px 30px; } }

.auth__logo { display: inline-flex; justify-content: center; margin: 0 auto 20px; }
@media (min-width: 1024px) { .auth__logo { margin-bottom: 24px; } }

/* --- Вкладки --- */
.auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: rgba(4, 10, 26, .6);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.auth__tab {
  padding: 11px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.auth__tab:hover { color: var(--text); }
.auth__tab.is-active {
  background: var(--green);
  color: var(--lightgreen);
  box-shadow: 0 8px 22px -12px var(--lightgreen);
}

/* --- Повідомлення --- */
.auth__msg {
  margin-top: 16px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.auth__msg[hidden] { display: none; }
.auth__msg.is-error { background: rgba(210, 60, 60, .14); border: 1px solid rgba(210, 60, 60, .5); color: #f2b8b8; }
.auth__msg.is-ok { background: rgba(61, 155, 224, .14); border: 1px solid rgba(61, 155, 224, .5); color: var(--blue-2); }

/* --- Панелі / форми --- */
.auth__panel { margin-top: 20px; }
.auth__panel[hidden] { display: none; }

.auth__form { display: flex; flex-direction: column; gap: 15px; }

.auth__field { display: flex; flex-direction: column; gap: 7px; }
.auth__label { color: #cdd6e6; font-size: 13px; font-weight: 500; }

.auth__input {
  width: 100%;
  padding: 13px 14px;
  background: rgba(4, 10, 26, .6);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.auth__input::placeholder { color: var(--dim); }
.auth__input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(61, 155, 224, .18);
}

.auth__submit { margin-top: 6px; }
.auth__submit:disabled { opacity: .7; cursor: default; }

/* --- Перемикання / назад --- */
.auth__switch { margin-top: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.auth__link { color: var(--blue-2); font-weight: 700; font-size: 13px; }
.auth__link:hover { text-decoration: underline; }

.auth__back {
  display: block;
  margin-top: 18px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  transition: color .2s var(--ease);
}
.auth__back:hover { color: var(--text); }
