/* Чтобы стили не лезли в другие страницы */
body.page-login{
  min-height: 100vh;
  display: grid;
  place-items: center;
}

/* Modal */
.page-login .modal{
  width: min(520px, calc(100vw - 48px));
  background: var(--panel);
  border-radius: var(--modal-radius);
  padding: 44px 48px 40px; /* важно: низ 40px как было */
}

.page-login .modal-inner{
  max-width: 360px;
  margin: 0 auto;
}

/* Ошибка (теперь без “магических” rgba) */
.page-login .form-error{
  margin: 6px 0 12px;
  padding: 10px 12px;
  border-radius: var(--r-10);

  border: 1px solid var(--primary-border);
  background: var(--primary-soft);

  color: var(--text);
  font-size: 14px;
}

/* кнопка-ссылка */
.page-login a.btn-outline{ text-decoration: none; }

/* Mobile */
@media (max-width: 560px){
  body.page-login{
    padding: 18px;
    min-height: 100dvh;
  }

  .page-login .modal{
    width: calc(100vw - 36px);
    padding: 28px 22px 24px;
  }

  .page-login .modal-inner{
    max-width: 100%;
  }

  .page-login .field{
    height: 52px;
    font-size: 16px;
    padding: 0 16px;
    margin-bottom: 12px;
  }

  .page-login .row{
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
  }

  .page-login .btn{
    font-size: 16px;
    line-height: 45px; /* оставляем как было */
  }

  .page-login .btn-outline{
    font-size: 15px;
  }

  .page-login .btn-outline.gos{
    flex-wrap: wrap;
    text-align: center;
    line-height: 1.2;
    padding: 0 12px;
  }

  .page-login .goslogosvg{
    height: 20px;
  }

  .page-login .goslogosvg svg{
    max-width: 100%;
    height: 100%;
  }
}

@media (max-width: 360px){
  .page-login .modal{
    padding: 22px 16px 18px;
  }
}

@media (max-height: 640px){
  body.page-login{
    place-items: start center;
    padding-top: 16px;
    padding-bottom: 16px;
  }
}
/* ====================================================================== */
/*  GATE PAGE (needs_approval / no role)                                  */
/* ====================================================================== */

body.page-gate{
  min-height: 100vh;
  min-height: 100dvh;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 14px;
  padding: 28px 18px 18px;

  background:
    radial-gradient(1200px 520px at 50% -180px, rgba(13, 76, 211, .28), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
}

/* Modal */
.page-gate .modal{
  width: min(720px, calc(100vw - 48px));
  background: var(--panel);
  border-radius: var(--modal-radius);
  padding: 44px 48px 44px;

  position: relative;
  overflow: hidden;

  border: 1px solid var(--border-1);
  box-shadow: var(--shadow-panel);
}

/* Text */
.page-gate .lead{
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  opacity: .92;
}

.page-gate .lead + .lead{
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  opacity: .78;
}

/* Button area */
.page-gate .actions{
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

/* важно: в base.css у .btn стоит flex:1 — тут нельзя */
.page-gate .actions .btn{
  flex: 0 0 auto;
  width: min(420px, 100%);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .2px;
}

/* Footer */
.page-gate .gate-footer,
.page-gate .footer{
  opacity: .75;
  font-size: 12px;
  text-align: center;
  padding-bottom: 6px;
  color: var(--muted);
}

/* Glow */
.page-gate .glow{
  position: absolute;
  inset: -120px -120px auto auto;
  width: 260px;
  height: 260px;

  background: radial-gradient(circle at center, var(--primary-glow), transparent 65%);
  pointer-events: none;

  filter: blur(2px);
  opacity: .9;
}

/* ============================ Mobile ============================ */
@media (max-width: 560px){
  body.page-gate{
    padding: 18px 14px 14px;
    gap: 12px;
  }

  .page-gate .modal{
    width: 100%;
    padding: 28px 20px 24px;
  }

  .page-gate .lead{
    font-size: 15px;
    line-height: 1.55;
  }

  .page-gate .lead + .lead{
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.55;
  }

  .page-gate .actions{ margin-top: 18px; }

  .page-gate .actions .btn{
    width: 100%;
    height: 52px;
    font-size: 15px;
    letter-spacing: .15px;
  }

  .page-gate .glow{
    width: 220px;
    height: 220px;
    inset: -110px -110px auto auto;
    opacity: .8;
  }
}

/* мало высоты — компактнее, но центр сохраняем */
@media (max-height: 640px){
  body.page-gate{
    padding: 14px 12px 12px;
    gap: 10px;
  }

  .page-gate .modal{
    padding: 22px 16px 18px;
  }

  .page-gate .lead{
    font-size: 14px;
    line-height: 1.5;
    opacity: .9;
  }

  .page-gate .lead + .lead{
    margin-top: 8px;
    font-size: 12.5px;
    line-height: 1.5;
    opacity: .75;
  }

  .page-gate .actions{ margin-top: 14px; }

  .page-gate .actions .btn{
    height: 48px;
    font-size: 14px;
  }

  .page-gate .glow{
    width: 210px;
    height: 210px;
    inset: -105px -105px auto auto;
    opacity: .75;
  }
}

@media (max-height: 520px){
  .page-gate .modal{
    padding: 18px 14px 14px;
  }

  .page-gate .lead{ font-size: 13px; }
  .page-gate .lead + .lead{ font-size: 12px; }

  .page-gate .actions{ margin-top: 12px; }

  .page-gate .actions .btn{
    height: 44px;
    font-size: 13.5px;
  }

  .page-gate .glow{
    width: 200px;
    height: 200px;
    inset: -100px -100px auto auto;
    opacity: .7;
  }
}
