/* ===== AUTH PAGES (login / signup) ===== */

.auth {
  min-height: calc(100vh - 80px); /* с учётом хедера */
  max-width: 1180px;
  margin: 32px auto 48px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth__card {
  width: 100%;
  max-width: 420px;
  padding: 22px 22px 24px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.24), transparent 55%),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.18), transparent 55%),
    #020617;
  border: 1px solid rgba(31, 41, 55, 0.98);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.98);
}

/* бейдж сверху */

.auth__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e5e7eb;
  background:
    linear-gradient(#020617, #020617) padding-box,
    linear-gradient(130deg, rgba(79, 70, 229, 0.95), rgba(236, 72, 153, 0.9)) border-box;
  border: 1px solid transparent;
  opacity: 0.95;
}

.auth__title {
  margin: 10px 0 18px;
  font-size: 1.4rem;
  font-weight: 600;
}

/* форма */

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

/* общий вид поля (label.field уже есть в шаблоне) */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field > span {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft, #9ca3af);
}

/* инпуты от allauth */

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 8px 11px;
  border-radius: 11px;
  border: 1px solid rgba(31, 41, 55, 0.95);
  background: rgba(15, 23, 42, 0.98);
  color: var(--text-main, #e5e7eb);
  font-size: 0.9rem;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    transform 0.08s ease;
  box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
}

.field input::placeholder {
  color: var(--text-soft, #9ca3af);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(79, 70, 229, 0.95);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.7);
  transform: translateY(-0.5px);
}

/* чекбокс "Запомнить меня" уже стилизуешь inline, но подчищаем инпут */

.field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 4px;
}

/* ошибки allauth */

.errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: #fecaca;
}

.errorlist li {
  margin: 0;
}

.field .errorlist {
  margin-top: -2px;
}

.auth form > .errorlist {
  margin-bottom: 6px;
}

/* подсказка под формой */

.auth__hint {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted, #9ca3af);
}

.auth__hint a {
  color: var(--accent, #ff2a4f);
  text-decoration: none;
}

.auth__hint a:hover {
  text-decoration: underline;
}

/* чекбокс политики на регистрации */

.checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 4px;
  font-size: 0.8rem;
}

.checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 4px;
  border: 1px solid rgba(55, 65, 81, 0.95);
  background: rgba(15, 23, 42, 0.98);
  cursor: pointer;
  position: relative;
  outline: none;
  display: inline-block;
}

.checkbox input[type="checkbox"]:checked {
  border-color: rgba(79, 70, 229, 0.95);
  background: linear-gradient(135deg, #4f46e5, #22c55e);
}

.checkbox input[type="checkbox"]::after {
  content: "";
  position: absolute;
  inset: 3px 4px;
  border-right: 2px solid rgba(15, 23, 42, 0.98);
  border-bottom: 2px solid rgba(15, 23, 42, 0.98);
  transform: rotate(40deg) scale(0);
  transform-origin: center;
  transition: transform 0.12s ease-out;
}

.checkbox input[type="checkbox"]:checked::after {
  transform: rotate(40deg) scale(1);
}

.checkbox__text {
  color: var(--text-main, #e5e7eb);
  line-height: 1.4;
}

.checkbox__text a {
  color: var(--accent, #ff2a4f);
  text-decoration: none;
}

.checkbox__text a:hover {
  text-decoration: underline;
}

/* кнопка .btn уже есть глобально, тут только чуть адаптируем */

.auth .btn {
  width: 100%;
  margin-top: 6px;
  justify-content: center;
}

/* мелкий тюнинг allauth-формы логина (тип поля) */

.auth input[type="email"],
.auth input[type="text"],
.auth input[type="password"] {
  font-size: 0.9rem;
}

/* ===== ЧЕКБОКС "СОГЛАШАЮСЬ" – ФИКС ВЫРАВНИВАНИЯ ===== */

.checkbox {
  display: flex;
  align-items: flex-start;      /* текст и галочка в одной строке */
  gap: 10px;
  margin-top: 8px;
}

/* скрываем нативный чекбокс */
.checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* рисуем свою галочку */
.checkmark {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
  margin-top: 3px;              /* тонкая подстройка, чтобы стояла по центру текста */
}

/* галочка внутри квадрата */
.checkmark::after {
  content: "";
  position: absolute;
  inset: 3px 4px 4px 3px;
  border-radius: 4px;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(0deg);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

/* когда чекбокс активен */
.checkbox input[type="checkbox"]:checked + .checkmark {
  border-color: var(--accent, #ff2a4f);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.6);
}

.checkbox input[type="checkbox"]:checked + .checkmark::after {
  border-color: #f9fafb;
  transform: rotate(40deg);
}

/* текст справа от чекбокса */
.checkbox__text {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-soft, #9ca3af);
}

.checkbox__text a {
  color: var(--accent, #ff2a4f);
  text-decoration: none;
}

.checkbox__text a:hover {
  text-decoration: underline;
}



/* мобилка */

@media (max-width: 720px) {
  .auth {
    margin: 20px auto 32px;
    padding: 0 16px;
    min-height: calc(100vh - 72px);
  }

  .auth__card {
    padding: 18px 18px 22px;
    border-radius: 18px;
  }

  .auth__title {
    font-size: 1.28rem;
    margin-bottom: 16px;
  }
}

@media (max-width: 480px) {
  .auth {
    padding: 0 14px;
  }

  .auth__card {
    padding-inline: 16px;
  }

  .field input,
  .field select {
    font-size: 0.88rem;
  }
}
