/* 19-login.css — LOGIN PAGE — CLEAN CENTERED / SINGLE CARD */

:root {
  --login-ink: #202020;
  --login-ink-2: #4c4c4c;
  --login-ink-3: #7b7b7b;

  --login-line: rgba(32, 32, 32, 0.09);
  --login-line-strong: rgba(32, 32, 32, 0.16);
  --login-line-soft: rgba(255, 255, 255, 0.44);

  --login-accent: #ff4d4d;
  --login-accent-hover: #f90202;

  --login-card: rgba(255, 255, 255, 0.82);

  --login-success-bg: rgba(223, 247, 239, 0.92);
  --login-success-bd: rgba(103, 181, 146, 0.35);
  --login-success-tx: #246b56;

  --login-danger-bg: rgba(239, 68, 68, 0.08);
  --login-danger-bd: rgba(239, 68, 68, 0.18);
  --login-danger-tx: #b53b3b;

  --login-shadow-xs: 0 8px 18px rgba(0, 0, 0, 0.04);
  --login-shadow-sm: 0 14px 30px rgba(0, 0, 0, 0.06);
  --login-shadow-lg: 0 34px 90px rgba(0, 0, 0, 0.12);

  --login-radius-sm: 18px;
  --login-radius-md: 28px;
  --login-radius-lg: 38px;

  --login-ease: cubic-bezier(.2, .8, .2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.loginStandalone {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 15% 14%,
      rgba(255, 255, 255, .82) 0 180px,
      transparent 360px
    ),
    radial-gradient(
      circle at 85% 12%,
      rgba(255, 77, 77, .045) 0 140px,
      transparent 320px
    ),
    radial-gradient(
      circle at 82% 80%,
      rgba(255, 77, 77, .05) 0 180px,
      transparent 360px
    ),
    linear-gradient(
      180deg,
      #f0f0f0 0%,
      #ebebeb 100%
    );
  color: var(--login-ink);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-repeat: no-repeat;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.hidden,
[hidden] {
  display: none !important;
}

/* =========================================================
   PAGE
========================================================= */

.loginPage {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.loginPage::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, .28),
      rgba(255, 255, 255, 0) 26%,
      rgba(255, 255, 255, .24) 100%
    );
}

.loginPage::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .35;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 96px,
      rgba(0, 0, 0, .018) 96px,
      rgba(0, 0, 0, .018) 97px
    );
}

.loginShell {
  width: 100%;
  max-width: 560px;
}

/* =========================================================
   CARD
========================================================= */

.loginCard {
  position: relative;
  overflow: hidden;
  border-radius: var(--login-radius-lg);
  border: 1px solid var(--login-line);
  background:
    radial-gradient(
      circle at 8% 0%,
      rgba(255, 255, 255, .82) 0,
      transparent 34%
    ),
    radial-gradient(
      circle at 100% 0%,
      rgba(255, 77, 77, .06) 0,
      transparent 26%
    ),
    radial-gradient(
      circle at 88% 100%,
      rgba(255, 255, 255, .6) 0,
      transparent 30%
    ),
    var(--login-card);
  box-shadow: var(--login-shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px 28px 24px;
}

.loginCard::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid var(--login-line-soft);
}

/* =========================================================
   TOP
========================================================= */

.loginCardTop {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.loginBackBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--login-line);
  background: rgba(255, 255, 255, .72);
  color: var(--login-ink);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--login-shadow-xs);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform .24s var(--login-ease),
    box-shadow .24s var(--login-ease),
    border-color .24s var(--login-ease),
    background .24s var(--login-ease),
    color .24s var(--login-ease);
}

.loginBackBtn:hover {
  transform: translateY(-2px);
  box-shadow: var(--login-shadow-sm);
  border-color: var(--login-line-strong);
  background: rgba(255, 255, 255, .92);
  color: var(--login-accent);
}

/* =========================================================
   HEAD
========================================================= */

.loginHead {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
  text-align: center;
}

.loginLogo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}

.loginLogo img {
  width: auto;
  height: 36px;
}

.loginTitle {
  margin: 0 0 12px;
  font-size: clamp(36px, 6vw, 50px);
  line-height: .96;
  font-weight: 700;
  letter-spacing: -.06em;
  color: var(--login-ink);
  text-wrap: balance;
}

.loginSub {
  margin: 0 auto;
  max-width: 420px;
  color: var(--login-ink-2);
  font-size: 14px;
  line-height: 1.72;
}

/* =========================================================
   SOCIAL WRAPPER
========================================================= */

.socialAuthRow {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  padding: 14px;
  border-radius: var(--login-radius-md);
  border: 1px solid var(--login-line);
  background: rgba(255, 255, 255, .5);
  box-shadow: var(--login-shadow-xs);
}

.socialAuthRow--stack {
  display: grid;
  gap: 12px;
}

/* =========================================================
   SOCIAL BUTTONS BASE
========================================================= */

.tgDeepIcon,
.googleDeepBtn,
.yandexDeepBtn,
.mailruDeepBtn,
.maxDeepBtn {
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(32, 32, 32, .08);
  background: rgba(255, 255, 255, .94);
  color: var(--login-ink);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .80),
    0 10px 24px rgba(0, 0, 0, .045);
  transition:
    transform .24s var(--login-ease),
    box-shadow .24s var(--login-ease),
    border-color .24s var(--login-ease),
    background .24s var(--login-ease);
  -webkit-tap-highlight-color: transparent;
}

.tgDeepIcon:hover,
.googleDeepBtn:hover,
.yandexDeepBtn:hover,
.mailruDeepBtn:hover,
.maxDeepBtn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .99);
  box-shadow: var(--login-shadow-sm);
}

.tgDeepIcon:active,
.googleDeepBtn:active,
.yandexDeepBtn:active,
.mailruDeepBtn:active,
.maxDeepBtn:active {
  transform: translateY(0) scale(.995);
}

.tgDeepIcon:focus-visible,
.googleDeepBtn:focus-visible,
.yandexDeepBtn:focus-visible,
.mailruDeepBtn:focus-visible,
.maxDeepBtn:focus-visible {
  outline: 3px solid rgba(255, 77, 77, .12);
  outline-offset: 2px;
}

/* =========================================================
   TELEGRAM
========================================================= */

.tgDeepIcon:hover {
  border-color: rgba(38, 165, 228, .25);
}

.tgDeepMark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  line-height: 0;
}

.tgDeepSvg {
  width: 28px;
  height: 28px;
}

.tgDeepText {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

/* =========================================================
   GOOGLE
========================================================= */

.googleDeepBtn:hover {
  border-color: rgba(66, 133, 244, .22);
}

.googleDeepBtn__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(66, 133, 244, .10);
  color: #4285f4;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.googleDeepBtn__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #202020;
  font-size: 14px;
  font-weight: 800;
}

/* =========================================================
   YANDEX
========================================================= */

.yandexDeepBtn:hover {
  border-color: rgba(252, 63, 29, .22);
}

.yandexDeepBtn__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(252, 63, 29, .08);
  color: #fc3f1d;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.yandexDeepBtn__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #202020;
  font-size: 14px;
  font-weight: 800;
}

/* =========================================================
   MAIL.RU
========================================================= */

.mailruDeepBtn:hover {
  border-color: rgba(0, 95, 249, .22);
}

.mailruDeepBtn__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #005ff9;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.04em;
  box-shadow: 0 7px 15px rgba(0, 95, 249, .18);
}

.mailruDeepBtn__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #202020;
  font-size: 14px;
  font-weight: 800;
}

/* =========================================================
   MAX
========================================================= */

.maxDeepBtn {
  position: relative;
  overflow: hidden;
}

.maxDeepBtn::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      circle at 28% 50%,
      rgba(46, 212, 255, .10),
      transparent 34%
    ),
    radial-gradient(
      circle at 72% 50%,
      rgba(107, 76, 255, .09),
      transparent 38%
    );
  transition: opacity .24s var(--login-ease);
}

.maxDeepBtn:hover {
  border-color: rgba(89, 101, 255, .25);
}

.maxDeepBtn:hover::before {
  opacity: 1;
}

.maxDeepBtn__mark {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 11px;
}

.maxDeepBtn__logo {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.maxDeepBtn__text {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #202020;
  font-size: 14px;
  font-weight: 800;
}

/* =========================================================
   DIVIDER
========================================================= */

.loginDivider {
  position: relative;
  z-index: 1;
  margin: 18px 0 16px;
  text-align: center;
}

.loginDivider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--login-line);
}

.loginDivider span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 12px;
  background: rgba(255, 255, 255, .84);
  color: var(--login-ink-3);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* =========================================================
   MESSAGES
========================================================= */

.authHintWrap {
  margin-top: 0;
}

.authProviderHint {
  animation: authProviderHintIn .25s ease both;
}

@keyframes authProviderHintIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hint {
  color: var(--login-ink-2);
  font-size: 13px;
  line-height: 1.45;
}

.hintTop {
  margin-top: 6px;
}

.msgBox {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--login-shadow-xs);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 700;
}

.socialAuthRow .msgBox {
  margin-bottom: 0;
}

.msgBox .ico {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.msgOk {
  background: var(--login-success-bg);
  border-color: var(--login-success-bd);
  color: var(--login-success-tx);
}

.msgOk .ico {
  background: var(--login-success-tx);
}

.msgErr {
  background: var(--login-danger-bg);
  border-color: var(--login-danger-bd);
  color: var(--login-danger-tx);
}

.msgErr .ico {
  background: var(--login-danger-tx);
}

/* =========================================================
   FORM
========================================================= */

.loginFormPage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: 100%;
}

.loginFormPage .field {
  display: grid;
  gap: 7px;
}

.loginFormPage .field label {
  font-size: 12px;
  font-weight: 800;
  color: var(--login-ink-3);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.loginFormPage .input,
.loginFormPage input[type="email"],
.loginFormPage input[type="password"] {
  width: 100%;
  min-height: 54px;
  border-radius: 17px;
  border: 1px solid var(--login-line);
  background: rgba(255, 255, 255, .92);
  padding: 0 16px;
  font-size: 15px;
  color: var(--login-ink);
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .72),
    0 6px 12px rgba(0, 0, 0, .025);
  transition:
    border-color .22s var(--login-ease),
    box-shadow .22s var(--login-ease),
    background .22s var(--login-ease),
    transform .22s var(--login-ease);
}

.loginFormPage .input::placeholder,
.loginFormPage input::placeholder {
  color: var(--login-ink-3);
  font-weight: 600;
}

.loginFormPage .input:focus,
.loginFormPage input:focus {
  border-color: rgba(255, 77, 77, .24);
  box-shadow:
    0 0 0 5px rgba(255, 77, 77, .06),
    0 10px 18px rgba(0, 0, 0, .04),
    inset 0 1px 0 rgba(255, 255, 255, .82);
  background: #fff;
  transform: translateY(-1px);
}

/* =========================================================
   TURNSTILE
========================================================= */

.loginCard .tsBox {
  margin: 8px 0 4px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

/* =========================================================
   MAIN BUTTON
========================================================= */

.loginCard .btn,
.loginCard .authBtnFull,
.loginFormPage .btn,
.loginFormPage .authBtnFull,
#loginPageSubmitBtn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0 !important;
  outline: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
  text-align: center;
  color: #fff !important;
  background: var(--login-accent) !important;
  box-shadow: 0 14px 28px rgba(255, 77, 77, .20);
  transition:
    transform .28s var(--login-ease),
    box-shadow .28s var(--login-ease),
    filter .28s var(--login-ease),
    background .28s var(--login-ease);
}

.loginCard .btn:hover,
.loginCard .authBtnFull:hover,
.loginFormPage .btn:hover,
.loginFormPage .authBtnFull:hover,
#loginPageSubmitBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(255, 77, 77, .24);
  filter: saturate(1.03) brightness(1.01);
  background: var(--login-accent-hover) !important;
}

.loginCard .btn:active,
.loginCard .authBtnFull:active,
.loginFormPage .btn:active,
.loginFormPage .authBtnFull:active,
#loginPageSubmitBtn:active {
  transform: translateY(0) scale(.99);
}

/* =========================================================
   FOOTER TEXT
========================================================= */

.loginLinks {
  margin-top: 4px;
  text-align: center;
}

.loginCard .authSwitch {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  line-height: 1.65;
  color: var(--login-ink-2);
}

.loginCard .authLinkBtn {
  color: var(--login-accent);
  font-weight: 800;
}

.loginCard .authLinkBtn:hover {
  text-decoration: underline;
}

.loginLegalNote {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  line-height: 1.55;
  color: var(--login-ink-3);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 760px) {
  .loginPage {
    align-items: flex-start;
    padding: 16px 12px 24px;
  }

  .loginShell {
    max-width: 100%;
  }

  .loginCard {
    padding: 14px 16px 18px;
    border-radius: 28px;
  }

  .loginCardTop {
    margin-bottom: 10px;
  }

  .loginBackBtn {
    min-height: 44px;
    padding: 0 16px;
    font-size: 13px;
  }

  .loginLogo {
    margin-bottom: 18px;
  }

  .loginLogo img {
    height: 32px;
  }

  .loginTitle {
    font-size: 30px;
  }

  .loginSub {
    font-size: 15px;
    line-height: 1.62;
  }

  .socialAuthRow {
    padding: 12px;
    border-radius: 22px;
  }

  .tgDeepIcon,
  .googleDeepBtn,
  .yandexDeepBtn,
  .mailruDeepBtn,
  .maxDeepBtn {
    min-height: 52px;
    border-radius: 16px;
  }

  .loginFormPage .field label {
    font-size: 11px;
  }

  .loginFormPage .input,
  .loginFormPage input[type="email"],
  .loginFormPage input[type="password"] {
    min-height: 50px;
    font-size: 16px;
    border-radius: 16px;
    padding: 0 15px;
  }

  #loginPageSubmitBtn,
  .loginCard .authBtnFull,
  .loginFormPage .authBtnFull {
    min-height: 54px;
    font-size: 15px;
  }
}

@media (max-width: 420px) {
  .loginPage {
    padding: 10px 8px 18px;
  }

  .loginCard {
    padding: 12px 12px 16px;
    border-radius: 24px;
  }

  .loginLogo img {
    height: 30px;
  }

  .loginTitle {
    font-size: 26px;
  }

  .loginSub {
    font-size: 14px;
  }

  .loginFormPage .field label {
    font-size: 10.5px;
  }

  .tgDeepText,
  .googleDeepBtn__text,
  .yandexDeepBtn__text,
  .mailruDeepBtn__text,
  .maxDeepBtn__text {
    font-size: 13px;
  }

  .tgDeepMark,
  .googleDeepBtn__mark,
  .yandexDeepBtn__mark,
  .mailruDeepBtn__mark,
  .maxDeepBtn__mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .maxDeepBtn__logo {
    width: 30px;
    height: 30px;
  }
}

/* =========================================================
   MOTION
========================================================= */

@media (prefers-reduced-motion: no-preference) {
  .loginCard {
    animation: loginCardIn .32s ease;
  }

  @keyframes loginCardIn {
    from {
      opacity: 0;
      transform: translateY(12px) scale(.992);
    }

    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .loginCard,
  .tgDeepIcon,
  .googleDeepBtn,
  .yandexDeepBtn,
  .mailruDeepBtn,
  .maxDeepBtn,
  .authProviderHint,
  #loginPageSubmitBtn,
  .loginBackBtn {
    animation: none !important;
    transition: none !important;
  }
}