/* Страницы входа: вход, восстановление пароля, заявка на доступ, завершение регистрации.
   Часть бывшего pages.css. Файлы pages/*.css подключаются в порядке Config::PAGE_STYLES —
   порядок важен: правило, которое переопределяет правило другого раздела, лежит в более позднем файле. */

/* Partner portal auth pages */
.wpa-auth-page {
  min-height: calc(100vh - 1px);
  padding: 48px 24px;
  background: #f8f9fb;
  color: var(--tc-text);
}

.wpa-auth-hero {
  background-color: #f8f9fb;
}

.wpa-auth-header {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.wpa-auth-title {
  line-height: 1.15;
}

.wpa-auth-subtitle {
  line-height: 1.45;
}

.wpa-auth-success,
.wpa-auth-error {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.wpa-auth-success {
  background: var(--tc-success-bg);
  color: var(--tc-success);
}

.wpa-auth-error {
  background: var(--tc-danger-bg);
  color: var(--tc-danger);
}

.wpa-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.wpa-auth-actions--split {
  justify-content: space-between;
}

.wpa-auth-link {
  color: var(--tc-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.wpa-auth-link:hover {
  color: var(--tc-text);
}

@media (max-width: 900px) {

    .wpa-auth-page {
    padding: 24px 16px;
  }
}

@media (max-width: 520px) {

    .wpa-auth-page {
    padding: 0;
  }

    .wpa-auth-actions,
  .wpa-auth-actions--split {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Two-stage partner onboarding. */
.wpa-auth-page--complete-registration .wpa-auth-hero {
  display: grid;
  place-items: center;
  min-height: 680px;
  padding: 36px 24px;
}

.wpa-auth-page--complete-registration .wpa-auth-card {
  position: relative;
  top: auto;
  left: auto;
  width: min(480px, 100%);
  max-width: 100%;
}

.wpa-auth-page--complete-registration .wpa-auth-subtitle {
  margin-bottom: 20px;
}

.wpa-registration-navigation .wpa-auth-submit {
  flex: 1 1 auto;
}

.wpa-auth-page--complete-registration .wpa-auth-actions {
  justify-content: center;
}
@media (max-width: 520px) {

    .wpa-auth-page--complete-registration .wpa-auth-hero {
    min-height: 100vh;
    padding: 24px 16px;
  }
}

.wpa-levelbar

/* Auth pages final override. Keep this last so site template styles cannot flatten the login scene. */
.wpa-auth-page {
  padding: 40px;
  background: #f8f9fb;
}

.wpa-auth-hero {
  position: relative;
  width: min(1320px, 100%);
  min-height: 660px;
  margin: 0 auto;
  padding: 80px 100px;
  border-radius: 15px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-image: url("https://porotherm.ru/upload/medialibrary/bfb/93qo5fw0h0eg2nkr2xinu85r4d3dga6n/image_48.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.wpa-auth-card {
  position: relative;
  left: auto;
  top: auto;
  width: 450px;
  max-width: calc(100% - 32px);
  padding: 40px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
}

.wpa-auth-title {
  margin: 0 0 10px;
  color: var(--tc-text);
  font-size: 24px;
  font-weight: 500;
}

.wpa-auth-subtitle {
  margin: 0 0 30px;
  color: var(--tc-muted);
  font-size: 16px;
}

.wpa-auth-card input[type="text"],
.wpa-auth-card input[type="email"],
.wpa-auth-card input[type="tel"],
.wpa-auth-card input[type="password"] {
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--tc-radius-md);
  background: var(--tc-field-bg);
  color: var(--tc-text);
  font-size: 14px;
  font-weight: 500;
  box-sizing: border-box;
}

.wpa-auth-card input[type="submit"],
.wpa-auth-card button[type="submit"],
.wpa-auth-submit {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: var(--tc-radius-md);
  background: var(--tc-accent);
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.wpa-auth-card,
.wpa-auth-card * {
  box-sizing: border-box;
}

.wpa-auth-card form {
  margin: 0;
}

.wpa-auth-card table,
.wpa-auth-card tbody,
.wpa-auth-card tr,
.wpa-auth-card td {
  width: 100% !important;
  max-width: 100%;
  display: block;
  border: 0 !important;
  background: transparent !important;
}

.wpa-auth-card table {
  margin: 0 !important;
  border-collapse: collapse;
}

.wpa-auth-card td {
  padding: 0 !important;
}

.wpa-auth-card br {
  display: none;
}

.wpa-auth-page:not(.wpa-auth-page--complete-registration) .wpa-auth-card form h1,
.wpa-auth-page:not(.wpa-auth-page--complete-registration) .wpa-auth-card form h2,
.wpa-auth-page:not(.wpa-auth-page--complete-registration) .wpa-auth-card form h3,
.wpa-auth-page:not(.wpa-auth-page--complete-registration) .wpa-auth-card form legend,
.wpa-auth-page:not(.wpa-auth-page--complete-registration) .wpa-auth-card form .bx-auth-title {
  display: none;
}

.wpa-auth-card form p,
.wpa-auth-card form .bx-auth-note,
.wpa-auth-card form .bx-authform-description,
.wpa-auth-card form .notetext {
  margin: 0 0 18px;
  color: var(--tc-muted);
  font-size: 14px;
  line-height: 1.45;
}

.wpa-auth-card form img {
  max-width: 100%;
  height: auto;
}

.wpa-auth-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0 8px 0 0;
  accent-color: var(--tc-accent);
}

.wpa-auth-card a {
  color: var(--tc-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.wpa-auth-actions a,
.wpa-auth-actions button {
  min-width: 0;
}

.wpa-auth-form--forgot form {
  display: grid;
  gap: 14px;
}

.wpa-auth-form--forgot table,
.wpa-auth-form--forgot tbody,
.wpa-auth-form--forgot tr,
.wpa-auth-form--forgot td {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.wpa-auth-form--forgot table {
  padding: 0 !important;
}

.wpa-auth-form--forgot tr {
  margin: 0;
}

.wpa-auth-form--forgot br {
  display: initial;
}

.wpa-auth-form--forgot img {
  display: block;
  max-width: 180px;
  margin: 8px 0 10px;
}

.wpa-auth-form--forgot input[type="submit"] {
  width: 100% !important;
  margin-top: 4px;
}

.wpa-auth-form--forgot input[type="button"],
.wpa-auth-form--forgot button:not([type="submit"]) {
  display: none !important;
}
@media (max-width: 768px) {

    .wpa-auth-page {
    padding: 16px;
  }

    .wpa-auth-hero {
    min-height: calc(100vh - 32px);
    padding: 64px 16px;
    align-items: flex-start;
    justify-content: center;
  }

    .wpa-auth-card {
    width: auto;
    max-width: 100%;
    padding: 28px;
  }
}

/* Вход в кабинет (2026-10-23): в стандартной форме Bitrix (system.auth.form) строка
   «Запомнить меня» — единственная строка таблицы с двумя ячейками: флажок и подпись.
   Ячейки таблицы здесь блочные, и флажок стоял отдельной строкой над подписью. */
.wpa-auth-card tr:has(> td > input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wpa-auth-card tr:has(> td > input[type="checkbox"]) > td {
  width: auto !important;
}

.wpa-auth-card tr:has(> td > input[type="checkbox"]) input[type="checkbox"] {
  display: block;
  margin: 0;
}

.wpa-auth-card tr:has(> td > input[type="checkbox"]) label {
  cursor: pointer;
}

/* Строки стандартной формы входа (таблица Битрикса, ячейки блочные) — с отступом, как поля заявки на доступ:
   «Пароль:» не прилипает к полю логина, «Запомнить меня» — к полю пароля и кнопке (18.11.2026). */
.wpa-auth-card .bx-system-auth-form tr + tr {
  margin-top: 14px;
}

/* Ссылка «Забыли свой пароль?» из формы Битрикса повторяла «Забыли пароль?» под формой — оставлена одна */
.wpa-auth-card .bx-system-auth-form tr:has(a[href*="forgot_password"]) {
  display: none !important;
}

/* Техподдержка в Telegram под формой входа, регистрации и восстановления пароля (2026-10-26). */
.wpa-auth-support {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--tc-divider);
  color: var(--tc-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.wpa-auth-support a {
  color: var(--tc-accent);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.wpa-auth-support a:hover {
  color: var(--tc-accent-hover);
  text-decoration: underline;
}

/* Сообщения страниц входа (12.11.2026, по просьбе владельца): одна плашка со значком вместо серого
   текста, синих и красных блоков Intec. .wpa-auth-success — готово (письмо отправлено, пароль изменён,
   регистрация завершена, заявка принята); .wpa-auth-error — ошибка, в том числе .errortext Битрикса
   на входе; .wpa-auth-info — подсказка. Первый <strong> — заголовок плашки. Значки — wc-icons/Warning. */
.wpa-auth-card .wpa-auth-success,
.wpa-auth-card .wpa-auth-error,
.wpa-auth-card .wpa-auth-info,
.wpa-auth-card .errortext,
.wpa-auth-card font.errortext {
  position: relative;
  display: block;
  margin: 0 0 18px;
  padding: 14px 16px 14px 48px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
}

.wpa-auth-card .wpa-auth-success::before,
.wpa-auth-card .wpa-auth-error::before,
.wpa-auth-card .wpa-auth-info::before,
.wpa-auth-card .errortext::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 16px;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--wpa-alert-icon) center / contain no-repeat;
  mask: var(--wpa-alert-icon) center / contain no-repeat;
}

.wpa-auth-card .wpa-auth-success {
  --wpa-alert-icon: url("/local/lib/Warmcontour/wc-icons/Warning/Circle_Check.svg");
  background: var(--tc-success-bg);
  color: var(--tc-success);
}

.wpa-auth-card .wpa-auth-error,
.wpa-auth-card .errortext,
.wpa-auth-card font.errortext {
  --wpa-alert-icon: url("/local/lib/Warmcontour/wc-icons/Warning/Circle_Warning.svg");
  background: var(--tc-danger-bg);
  color: var(--tc-danger) !important;
}

.wpa-auth-card .wpa-auth-info {
  --wpa-alert-icon: url("/local/lib/Warmcontour/wc-icons/Warning/Info.svg");
  background: var(--tc-fill);
  color: var(--tc-text);
}

.wpa-auth-card .wpa-auth-success strong,
.wpa-auth-card .wpa-auth-error strong,
.wpa-auth-card .wpa-auth-info strong {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
}

.wpa-auth-card .wpa-auth-success + .wpa-auth-actions {
  margin-top: 0;
}
