/* ===== Base layout ===== */
.auth-page .content { padding-top: 20px; min-height: calc(100vh - 182px); }
.auth-page .auth-hint { text-align:center; margin:8px 0 6px; font-size:12px; }
.auth-page .auth-hint__danger { color:#b70015; background:#ffd7d7; display:inline-block; padding:4px 8px; border-radius:6px; }

.auth-page .auth-oauth { display:flex; justify-content:center; margin:6px 0 10px; }
.auth-page .auth-google { display:flex; gap:8px; align-items:center; justify-content:center; border:1px solid #e2e6ea; padding:10px 14px; border-radius:10px; background:#fff; }
.auth-page .auth-google img { width:18px; height:18px; }

.auth-page .auth-card {
  max-width: 560px; margin: 0 auto 40px; padding: 12px;
  background: transparent;
}

/* ===== Tabs (Авторизация / Регистрация) ===== */
.auth-page .auth-tabs{
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 44px;
  margin-bottom: 12px;
  border: 1px solid #e2e6ea;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.auth-page .auth-tab{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 10px;
  font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  box-shadow: none;
  outline: none;
  z-index: 2;                   /* текст выше полосы */
}
.auth-page .auth-tab:focus-visible{
  box-shadow: 0 0 0 3px rgba(28,150,117,.16);
  border-radius: 8px;
}
.auth-page .auth-tab[aria-selected="true"]{
  color: #fff;
}

/* Активная «заливка» половины */
.auth-page .auth-tabs__underline{
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50%;
  height: 100%;
  background: #1c9675;
  transform: translateX(0);
  transition: transform .25s ease;
  z-index: 1;                   
  border-radius: 10px;
}

/* ===== Forms ===== */
.auth-page .auth-form { display: none; }
.auth-page .auth-form.is-active {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-page .auth-form label { display:block; margin:10px 0 6px; font-size:14px; font-weight:600; }
.auth-page .auth-form input {
  width:100%; padding:12px 14px; border:1px solid #dfe3e6; border-radius:12px; font-size:16px; background:#fff;
}
.auth-page .auth-form input:focus { outline: none; border-color:#1c9675; box-shadow:0 0 0 3px rgba(28,150,117,.16); }

.auth-page .btn-primary {
  width:100%; margin-top:14px; padding:14px 16px; border:0; border-radius:12px;
  background:#1c9675; color:#fff; font-weight:800; font-size:16px; box-shadow:0 6px 14px rgba(28,150,117,.28);
}
.auth-page .btn-primary:active { transform: translateY(1px); }
.auth-page .btn-link { display:block; text-align:center; margin-top:12px; text-decoration:underline; }

/* ===== Desktop tweak (≥992px) ===== */
@media (min-width: 992px) { .auth-page .auth-card { padding: 0 8px; } }

/* ===== FARM/EN auth: Google button + mobile consent fix ===== */
.auth-page .auth-google--google {
  min-width: 280px;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
}

.auth-page .auth-google__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  border: 1px solid #dfe3e6;
  font-weight: 900;
  font-family: Arial, sans-serif;
  line-height: 1;
}

.auth-page .auth-consent {
  margin: 16px 0 8px;
  font-size: 14px;
  line-height: 1.35;
}

.auth-page .auth-consent__label {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  max-width: 100%;
  width: 100%;
}

.auth-page .auth-consent__checkbox {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border-radius: 6px !important;
}

.auth-page .auth-consent__text {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 991px) {
  .auth-page .auth-google {
    width: 100%;
    max-width: 440px;
  }

  .auth-page .auth-consent {
    margin: 14px 0 8px;
    padding: 0 2px;
    font-size: 13px;
  }

  .auth-page .auth-consent__label {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 9px;
  }

  .auth-page .auth-consent__checkbox {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px;
  }
}



/* Telegram e-mail completion page */
.verify-card .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: 12px;
  background: #1c9675;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(28, 150, 117, 0.22);
}

.verify-card .btn-primary:hover {
  background: #168565;
}

.verify-card .btn-primary:active {
  transform: translateY(1px);
}

.verify-card form .btn-primary {
  width: 100%;
}

@media (max-width: 767px) {
  .verify-card {
    margin: 18px 10px;
    padding: 18px;
  }

  .verify-card .btn-primary {
    width: 100%;
  }
}


/* clean auth page: Yandex + Telegram + legacy email login */
.auth-clean-page {
  padding-top: 12px;
}

.auth-clean-card {
  width: min(560px, calc(100% - 32px));
  margin: 0 auto 44px;
  padding: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.auth-clean-head {
  text-align: center;
  margin-bottom: 22px;
}

.auth-clean-head h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 900;
  color: #1f2937;
}

.auth-clean-head p {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.4;
}

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

.auth-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #111827;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

.auth-provider:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.auth-provider:active {
  transform: translateY(0);
}

.auth-provider__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.auth-provider__icon img {
  width: 22px;
  height: 22px;
  display: block;
}

.auth-provider--telegram {
  border: 0;
  background: linear-gradient(135deg, #2ea6e6, #168bd1);
  color: #fff;
  box-shadow: 0 12px 26px rgba(46, 166, 230, 0.24);
}

.auth-provider--telegram[disabled] {
  opacity: .72;
  cursor: wait;
}

.auth-provider__icon--telegram {
  color: #fff;
  font-size: 18px;
}

.telegram-code-login {
  width: 100%;
}

.telegram-code-box {
  display: none;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #dbe7f3;
  border-radius: 16px;
  background: #f7fbff;
  text-align: center;
}

.telegram-code-box__label {
  margin-bottom: 8px;
  color: #334155;
  font-size: 13px;
}

.telegram-code-box__value {
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 5px;
}

.telegram-code-box__link {
  display: inline-block;
  color: #168bd1;
  font-weight: 800;
  text-decoration: none;
}

.telegram-code-box__ttl {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
}

.telegram-code-error {
  display: none;
  margin-top: 10px;
  color: #b91c1c;
  font-size: 13px;
  text-align: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e5e7eb;
}

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

.auth-email-form label {
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

.auth-email-form input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid #cfd8dc;
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
}

.auth-email-form input:focus {
  outline: none;
  border-color: #1c9675;
  box-shadow: 0 0 0 3px rgba(28, 150, 117, 0.12);
}

.auth-primary-btn,
.auth-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: 100%;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}

.auth-primary-btn {
  margin-top: 8px;
  background: linear-gradient(135deg, #1c9675, #0a8f43);
  color: #fff;
  box-shadow: 0 12px 24px rgba(28, 150, 117, 0.22);
}

.auth-secondary-btn {
  background: #eef7f3;
  color: #16765b;
}

.auth-link {
  margin-top: 4px;
  color: #111827;
  text-align: center;
  text-decoration: underline;
  font-weight: 700;
}

.auth-clean-note,
.auth-muted {
  margin-top: 18px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.auth-top-alert {
  max-width: 560px;
  margin: 0 auto 16px;
  padding: 12px 14px;
  border: 1px solid #f3b7b7;
  border-radius: 12px;
  background: #ffe8e8;
  color: #a12222;
  text-align: center;
  font-weight: 700;
}

.auth-messages {
  max-width: 560px;
  margin: 0 auto 16px;
}

.auth-message {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.4;
}

.auth-message--error {
  background: #ffe8e8;
  color: #a12222;
  border: 1px solid #f3b7b7;
}

.auth-message--success {
  background: #e9f8ee;
  color: #1f7a3f;
  border: 1px solid #b9e3c7;
}

.auth-message--warning {
  background: #fff6df;
  color: #8a6510;
  border: 1px solid #efd48f;
}

.auth-message--info {
  background: #eef5ff;
  color: #1f4f99;
  border: 1px solid #c8daf8;
}

.verify-code-form {
  max-width: 420px;
  margin: 18px auto 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.verify-code-form--resend {
  margin-top: 8px;
}

.verify-code-form label {
  font-weight: 700;
  text-align: left;
}

.verify-code-form input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid #cfd8dc;
  border-radius: 12px;
  font-size: 18px;
  text-align: center;
  letter-spacing: 4px;
}

@media (max-width: 767px) {
  .auth-clean-page {
    padding-top: 18px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .auth-clean-card {
    width: 100%;
    margin-bottom: 34px;
    padding: 18px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  }

  .auth-clean-head h1 {
    font-size: 23px;
  }

  .auth-clean-head p {
    font-size: 14px;
  }

  .auth-provider {
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 13px;
    font-size: 15px;
  }

  .telegram-code-box {
    padding: 14px;
    border-radius: 14px;
  }

  .telegram-code-box__value {
    font-size: 30px;
    letter-spacing: 4px;
  }

  .auth-divider {
    margin: 20px 0 16px;
  }

  .auth-email-form input {
    height: 45px;
    font-size: 16px;
  }

  .auth-clean-note {
    font-size: 12px;
  }
}


/* auth providers: equal compact buttons */
.auth-clean-page .auth-provider-stack {
  align-items: center;
}

.auth-clean-page .auth-provider,
.auth-clean-page .telegram-code-login {
  width: min(322px, 100%);
}

@media (max-width: 767px) {
  .auth-clean-page .auth-provider,
  .auth-clean-page .telegram-code-login {
    width: min(294px, 100%);
  }
}

