/* =========================================================
   Pusto • Login page (minimal / professional)
   - Centered form
   - Equal widths
   - No icons inside inputs
   - Stable rendering across browsers
   ========================================================= */

/* ---- Design tokens ---- */
:root{
  --bg1: rgba(17,24,39,0.04);
  --bg: #F2F3F8;

  --text: #111827;
  --muted: rgba(17,24,39,0.55);

  --border: rgba(17,24,39,0.08);
  --borderFocus: rgba(17,24,39,0.16);

  --fieldBg: rgba(255,255,255,0.72);
  --fieldBgFocus: rgba(255,255,255,0.92);

  --btn: rgba(17,24,39,0.92);
  --radius: 14px;

  --w: 420px;

  /* IMPORTANT:
     Если у тебя сверху хедер (логотип + поиск), он визуально "съедает" место.
     Подстрой это число под высоту твоего хедера. */
  --header-offset: 120px;
}

/* ---- Base ---- */
*{ box-sizing: border-box; }

body{
  margin: 0;
  background:
    radial-gradient(900px 420px at 50% 0%, var(--bg1), transparent 60%),
    var(--bg);

  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   Layout / Centering
   ========================================================= */

/* Центрируем форму по экрану (с поправкой на хедер) */
.auth{
  display: flex;
  justify-content: center;  /* горизонталь */
  align-items: center;      /* вертикаль */
  padding: var(--header-offset) 16px 48px; /* top / sides / bottom */
}

/* Контейнер формы фиксированной ширины */
.login-page{
  width: min(var(--w), 92vw);
  margin: 0 auto;
}

/* =========================================================
   Typography
   ========================================================= */

.login-page h2{
  margin: 0;
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.auth-sub{
  margin: 10px 0 28px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* =========================================================
   Form layout
   ========================================================= */

.auth-form{
  width: 100%;
  display: grid;
  gap: 18px;
}

/* Django form.as_p -> <p> wrappers */
.auth-form p{
  width: 100%;
  margin: 0;
  display: grid;
  gap: 8px;
  position: relative;
}

/* Если у Django выводятся label — скрываем (работаем через placeholder) */
.auth-form label{
  display: none;
}

/* На всякий случай вырубить любые иконки, если где-то осталось ::before */
.auth-form p::before{
  content: none !important;
  display: none !important;
}

/* =========================================================
   Inputs
   ========================================================= */

/* Стабилизируем рендеринг email/password (бывает разный в браузерах) */
.auth-form input{
  -webkit-appearance: none;
  appearance: none;
}

/* Единые стили для всех input */
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="number"]{
  width: 100% !important;
  display: block;
  height: 52px;
  padding: 0 14px;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background: var(--fieldBg);
  color: var(--text);
  font-size: 16px;

  outline: none;
  transition: background 140ms ease, border-color 140ms ease;
}

.auth-form input::placeholder{
  color: rgba(17,24,39,0.28);
}

.auth-form input:focus{
  background: var(--fieldBgFocus);
  border-color: var(--borderFocus);
}

/* Убираем синий autofill у Chrome */
.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:focus,
.auth-form input:-webkit-autofill:active{
  -webkit-box-shadow: 0 0 0 1000px var(--fieldBgFocus) inset !important;
  box-shadow: 0 0 0 1000px var(--fieldBgFocus) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  transition: background-color 9999s ease-out 0s;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn-primary{
  width: 100% !important;
  display: block;
  height: 52px;

  border: none;
  border-radius: var(--radius);

  background: #202B6C;
  color: #ffffff;

  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;

  cursor: pointer;
  transition: opacity 140ms ease;
}



/* Ghost button (resend) */
.btn-ghost{
  margin-top: 10px;
  width: 100%;
  height: 44px;

  background: transparent;
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: var(--radius);

  color: rgba(17,24,39,0.75);
  cursor: pointer;
}


/* =========================================================
   Errors / Messages
   ========================================================= */

.login-page ul.errorlist{
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}

.login-page ul.errorlist li{
  font-size: 13px;
  color: rgba(185,28,28,0.95);
}

.login-msg{
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: rgba(17,24,39,0.55);
}

/* =========================================================
   Links
   ========================================================= */

.login-links{
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;

  font-size: 14px;
  color: rgba(17,24,39,0.35);
}

.login-links a{
  color: rgba(17,24,39,0.60);
  text-decoration: none;
  transition: color 120ms ease;
}

.login-links a:hover{
  color: rgba(17,24,39,0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dot{ opacity: .6; }

/* =========================================================
   Adaptive
   добавить в конец файла
   ========================================================= */

/* laptop / small desktop */
@media (max-width: 1024px){
  :root{
    --w: 400px;
    --header-offset: 100px;
  }

  .auth{
    padding: var(--header-offset) 20px 40px;
  }

  .login-page h2{
    font-size: 32px;
  }

  .auth-sub{
    margin: 10px 0 24px;
  }
}

/* tablet */
@media (max-width: 768px){
  :root{
    --w: 100%;
    --header-offset: 84px;
    --radius: 12px;
  }

  .auth{
    min-height: auto;
    align-items: flex-start;
    padding: var(--header-offset) 16px 32px;
  }

  .login-page{
    width: 100%;
    max-width: 460px;
  }

  .login-page h2{
    font-size: 28px;
    line-height: 1.1;
  }

  .auth-sub{
    margin: 8px 0 22px;
    font-size: 13px;
  }

  .auth-form{
    gap: 14px;
  }

  .auth-form p{
    gap: 6px;
  }

  .auth-form input[type="text"],
  .auth-form input[type="email"],
  .auth-form input[type="password"],
  .auth-form input[type="number"]{
    height: 48px;
    padding: 0 14px;
    font-size: 16px; /* чтобы iPhone не зумил */
  }

  .btn-primary{
    height: 48px;
    font-size: 15px;
  }

  .btn-ghost{
    height: 42px;
    font-size: 14px;
  }

  .login-links{
    margin-top: 18px;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
  }

  .login-msg{
    font-size: 12px;
  }
}

/* mobile */
@media (max-width: 480px){
  :root{
    --header-offset: 72px;
    --radius: 12px;
  }

  body{
    background:
      radial-gradient(700px 280px at 50% 0%, var(--bg1), transparent 60%),
      var(--bg);
  }

  .auth{
    padding: var(--header-offset) 12px 24px;
  }

  .login-page{
    width: 100%;
  }

  .login-page h2{
    font-size: 24px;
    letter-spacing: -0.03em;
  }

  .auth-sub{
    margin: 8px 0 18px;
    font-size: 13px;
    line-height: 1.45;
  }

  .auth-form{
    gap: 12px;
  }

  .auth-form input[type="text"],
  .auth-form input[type="email"],
  .auth-form input[type="password"],
  .auth-form input[type="number"]{
    height: 46px;
    padding: 0 12px;
    font-size: 16px;
    border-radius: 12px;
  }

  .btn-primary{
    height: 46px;
    border-radius: 12px;
    font-size: 15px;
  }

  .btn-ghost{
    height: 40px;
    border-radius: 12px;
    font-size: 13px;
  }

  .login-page ul.errorlist li{
    font-size: 12px;
    line-height: 1.4;
  }

  .login-msg{
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.45;
  }

  .login-links{
    margin-top: 16px;
    gap: 6px 10px;
    font-size: 13px;
  }

  .dot{
    display: none;
  }
}

/* very small phones */
@media (max-width: 360px){
  :root{
    --header-offset: 64px;
  }

  .auth{
    padding: var(--header-offset) 10px 20px;
  }

  .login-page h2{
    font-size: 22px;
  }

  .auth-sub{
    font-size: 12px;
  }

  .auth-form input[type="text"],
  .auth-form input[type="email"],
  .auth-form input[type="password"],
  .auth-form input[type="number"]{
    height: 44px;
  }

  .btn-primary{
    height: 44px;
    font-size: 14px;
  }
}

hover