/* ============================================================
   OpticTrend — СКИН личного кабинета / авторизации под редизайн.
   Грузится ТОЛЬКО на /personal/ (см. header.php). Скоуп — .profile/.bx-authform/.login-form
   (классы этой страницы), системный шрифт + наша палитра. Компоненты Bitrix НЕ трогаем, только CSS.
   ============================================================ */

/* Серый фон страницы (как в PDP/карточке) */
.main:has(.profile) { background: #f3f3f3; }

/* Системный шрифт на всём контенте кабинета (вместо сайтового Circe) */
.profile, .profile * , .bx-authform, .bx-authform * {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif !important;
  box-sizing: border-box;
}

/* ---------- Карточка авторизации (гость) ---------- */
.profile:has(.bx-authform) {
  max-width: 460px;
  margin: 40px auto;
}
.bx-authform {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 30px 28px 26px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}
.bx-authform .bx-title,
.bx-authform h3 {
  font-size: 21px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin: 0 0 18px;
  letter-spacing: -0.3px;
}
/* Сообщение «нужно авторизоваться» — мягкое, не пугающее (правило ТЗ: без красных плашек) */
.bx-authform .alert-danger,
.bx-authform .alert {
  background: #f7f3ec;
  color: #5a4a25;
  border: 1px solid #e8dfca;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.45;
  text-align: center;
  margin: 0 0 18px;
}

/* Поля ввода */
.bx-authform input[type="text"],
.bx-authform input[type="password"],
.login-form input[type="text"],
.login-form input[type="password"],
.bx-auth-input {
  width: 100% !important;
  height: auto !important;
  padding: 12px 14px !important;
  border: 1.5px solid #e5e5e5 !important;
  border-radius: 10px !important;
  background: #fff !important;
  font-size: 15px !important;
  color: #1a1a1a !important;
  margin: 0 0 12px !important;
  transition: border-color .15s;
  outline: none;
}
.bx-authform input[type="text"]:focus,
.bx-authform input[type="password"]:focus,
.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
  border-color: #1a1a1a !important;
}
.login-form .form__row { margin: 0; }

/* Кнопка входа — тёмная скруглённая CTA (как в карточке) */
.bx-authform .btn,
.login-form .btn,
.login-form__actions input[type="submit"] {
  display: block;
  width: 100%;
  height: auto !important;
  line-height: normal !important;
  padding: 14px 16px !important;
  background: #1a1a1a !important;
  border: none !important;
  border-radius: 30px !important;
  color: #fff !important;
  font-size: 15.5px !important;
  font-weight: 500 !important;
  letter-spacing: .3px;
  cursor: pointer;
  margin: 6px 0 10px !important;
  transition: background .15s;
}
.bx-authform .btn:hover,
.login-form .btn:hover { background: #000 !important; }

/* Кнопка входа через Яндекс рендерится в этот контейнер (если активен SDK) */
#login_using_yandex_id { margin: 4px 0 6px; display: flex; justify-content: center; }
#login_using_yandex_id:empty { display: none; }

/* Ссылки (забыли пароль / регистрация) */
.login-form__actions .row { display: flex; gap: 14px; justify-content: center; margin-top: 6px; }
.login-form__actions .col-xs-12 { width: auto; padding: 0; }
.login-form__link {
  font-size: 13px;
  color: #6b6b6b;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-form__link:hover { color: #1a1a1a; }

/* Мёртвые легаси соц-иконки (Livejournal / Blogger / Mail.Ru OpenID / Liveinternet / OpenID) — скрыть */
.bx-authform-social { display: none !important; }

/* Чекбокс «Запомнить меня»: использует классы фильтра (.bx-filter-param-*), из-за чего выводится ДВА квадрата
   (нативный + фейковый псевдо-бокс). Оставляем один аккуратный нативный, фейковый :before/:after убираем. */
.bx-authform .checkbox { margin: 4px 0 14px; }
.bx-authform .bx-filter-param-label {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 13.5px; color: #6b6b6b;
  position: static; padding: 0;
}
.bx-authform .bx-filter-param-label input[type="checkbox"] {
  -webkit-appearance: auto !important; appearance: auto !important;
  position: static !important; opacity: 1 !important; clip: auto !important;
  width: 16px !important; height: 16px !important; margin: 0 !important; left: auto !important;
}
.bx-authform .bx-filter-param-text { position: static !important; padding: 0 !important; }
.bx-authform .bx-filter-param-text::before,
.bx-authform .bx-filter-param-text::after { content: none !important; display: none !important; }

/* Шапка кабинета с кнопкой «Выйти» (только у авторизованных) */
.profile__account-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 18px; padding: 0 2px;
}
.profile__account-title { font-size: 21px; font-weight: 700; color: #1a1a1a; letter-spacing: -0.3px; }
.profile__logout {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; color: #6b6b6b; text-decoration: none;
  border: 1px solid #e5e5e5; border-radius: 22px; padding: 8px 16px; background: #fff;
  transition: border-color .15s, color .15s; white-space: nowrap;
}
.profile__logout:hover { border-color: #1a1a1a; color: #1a1a1a; }
.profile__logout svg { flex-shrink: 0; }

/* ---------- Авторизованный вид (история заказов + профиль) ---------- */
.profile:not(:has(.bx-authform)) { max-width: 1100px; margin: 24px auto; }

/* Тема задаёт .profile__block{background:#F5F5F5; margin:0 -12px; padding:40px 30px} и .profile__contacts{font-size:25px}
   (2×-вёрстка). Перебиваем повышенной специфичностью (.profile .profile__block): белая карточка + нормальные размеры под 1×. */
.profile .profile__block {
  margin: 0 0 16px !important;
  padding: 22px 24px !important;
  background: #fff !important;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
}
.profile .profile__block .title,
.profile .profile__block h2,
.profile .profile__block h3 { font-size: 18px !important; font-weight: 700; color: #1a1a1a; margin: 0 0 14px !important; line-height: 1.3 !important; }
.profile .profile__contacts { margin: 0 !important; font-size: 14.5px !important; line-height: 1.5 !important; }
.profile .profile__contacts__item { padding: 0 0 14px !important; }
.profile .profile__contacts__item + .profile__contacts__item { padding-top: 14px !important; border-top: 1px solid #efefef; }
.profile .profile__contacts__item:last-child { padding-bottom: 0 !important; }
.profile .profile__contacts .font-weight-bold { color: #6b6b6b; font-weight: 500; }
.profile .profile__contacts .item__data span { color: #1a1a1a; }
.profile .profile__contacts__edit { font-size: 20px !important; line-height: 1 !important; color: #8a8a8a; }
.profile .profile__contacts__edit:hover { color: #1a1a1a; }
.profile .profile__block .link--next { color: #1c3d6e; font-weight: 600; font-size: 14px; }
.profile .profile__block .btn { width: auto; }
