*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Локальные — тёмная тема ЛК */
  --bg:        #0f1117;
  --surface:   #1a1d27;
  --surface2:  #22263a;
  --border:    #2e3248;
  --text:      #e8eaf6;
  --text2:     #8b90b8;
  --text3:     #555a7a;
  --hint-40:   rgba(255,255,255,.4);
  --nav-w:     60px;

  /* Алиасы на общую палитру */
  --danger:    var(--red);
  --gradient:  var(--gradient-brand);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.lk {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-left: var(--nav-w);
}

/* ── НАВ ── */
.lk-nav {
  position: fixed;
  top: 0; left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
  z-index: 100;
}
.lk-nav__logo {
  font-size: 22px;
  margin-bottom: 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none;
}
.lk-nav__btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text2);
  margin-bottom: 2px;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.lk-nav__btn:hover  { background: var(--surface2); color: var(--text); }
.lk-nav__btn.active { background: var(--surface2); color: var(--accent); }
.lk-nav__spacer { flex: 1; }

/* ── БАННЕР ── */
.lk-banner {
  background: #2e1212;
  border-bottom: 1px solid #6b2020;
  padding: 12px 24px;
}
.lk-banner__body {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.lk-banner__text    { color: #ffbaba; font-size: 13px; flex: 1; min-width: 200px; line-height: 1.6; }
.lk-banner__timer   { font-family: monospace; font-size: 13px; margin-left: 8px; opacity: .8; }
.lk-banner__actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── LAYOUT ── */
.lk-layout { flex-wrap: wrap;
  display: flex;
  gap: 28px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 28px;
  width: 100%;
}

/* ── SIDEBAR ── */
.lk-sidebar {
  flex: 0 0 270px;
  width: 270px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lk-sidebar-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lk-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lk-sidebar__link {
  text-decoration: none;
  text-align: center;
  width: 100%;
}

/* ── КАРТОЧКИ ── */
.lk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ── ПРОФИЛЬ ── */
.lk-profile {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: start;
  text-align: left;
}
.lk-profile .lk-avatar-wrap { grid-row: 1 / 3; }
.lk-profile__name, .lk-profile__email, .lk-profile__phone { grid-column: 2; }
.lk-profile__edit-btn { grid-column: 2; justify-self: start; margin-top: 15px; }

/* Обёртка аватара профиля */
.lk-avatar-wrap {
  position: relative;
  width: 50px;
  height: 50px;
  cursor: pointer;
  flex-shrink: 0;
}
.lk-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px;
  background-size: cover;
  background-position: center;
  user-select: none;
}
.lk-avatar--photo {
  font-size: 0;
}
.lk-avatar svg {
  width: 60%;
  height: 60%;
  opacity: 0.9;
}
.lk-avatar--photo svg { display: none; }
.lk-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s;
  font-size: 16px;
}
.lk-avatar-wrap:hover .lk-avatar-overlay { opacity: 1; }

/* Кнопка удаления аватара профиля */
.lk-avatar-del {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity .15s;
}
.lk-avatar-wrap:hover .lk-avatar-del { opacity: 1; }

.lk-profile__name     { font-weight: 600; font-size: 20px; color: var(--accent); }
.lk-profile__email    { color: var(--text2); font-size: 14px; white-space: normal; word-break: break-word; width: max-content; max-width: calc(100vw - 32px); text-align: center; overflow: hidden; text-overflow: ellipsis; max-width: 100%; margin-bottom: 20px; }
.lk-profile__email:hover { overflow: visible; white-space: normal; word-break: break-all; cursor: pointer; }
.lk-profile__edit-btn { font-size: 13px; padding: 9px 18px; }

/* ── ТАРИФ ── */
.lk-tariff { display: flex; flex-direction: column; gap: 8px; }
.lk-tariff__label {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: -5px;
}
.lk-tariff__name          { font-size: 17px; font-weight: 700; color: var(--accent); }
.lk-tariff__name--expired { color: var(--danger); }
.lk-tariff__row           { display: flex; justify-content: space-between; color: var(--text2); font-size: 14px; margin-bottom: 4px; }
.lk-tariff__btn           { margin-top: 4px; width: 100%; justify-content: center; }

/* ── MAIN ── */
.lk-main { flex: 1; min-width: 0; }

.lk-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.lk-section-title { font-size: 20px; font-weight: 700; }

/* ── КНОПКИ ── */
.lk-btn-primary {
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 18px;
  min-height: 33px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
}
.lk-btn-primary:hover { opacity: .85; }

.lk-btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 18px;
  min-height: 33px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
  width: 100%;
  margin-top: auto !important;
}
.lk-btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* ── СЕТКА СВЯЗОК ── */
.lk-bridges-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.lk-bridge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .15s;
}
.lk-bridge-card:hover   { border-color: var(--accent); }
.lk-bridge-card--paused { opacity: .65; }

.lk-bridge-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lk-bridge-card__info { flex: 1; min-width: 0; }
.lk-bridge-card__name {
  font-weight: 600;
  white-space: normal; word-break: break-word; overflow-wrap: anywhere;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lk-bridge-card__pub   { color: var(--text2); font-size: 13px; margin-top: 3px; }
.lk-bridge-card__tag   { color: var(--accent); font-size: 13px; margin-top: 2px; }
.lk-bridge-card__chats { color: var(--text3); font-size: 13px; }

/* Аватар связки */
.lk-bridge-avatar-wrap {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  cursor: pointer;
}
.lk-bridge-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient);
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  flex-shrink: 0;
}
.lk-bridge-avatar--photo { font-size: 0; }
.lk-bridge-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s;
  font-size: 13px;
}
.lk-bridge-avatar-wrap:hover .lk-bridge-avatar-overlay { opacity: 1; }

.lk-badge {
  font-size: 14px;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
  font-weight: 600;
}
.lk-badge--active { background: #162a1e; color: #4ade80; }
.lk-badge--paused { background: #27240f; color: #facc15; }

.lk-bridge-card__actions { display: flex; gap: 6px; }

.lk-icon-btn {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
}
.lk-icon-btn:hover         { background: var(--surface2); color:var(--text); border-color: var(--text3); }
.lk-icon-btn--danger:hover { border-color: var(--danger); color:var(--danger); background: #2e1212; }

/* ── АРХИВ ── */
.lk-archive {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.lk-archive__toggle {
  width: 100%;
  background: var(--surface);
  border: none;
  color: var(--text2);
  font-size: 14px;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color .15s;
}
.lk-archive__toggle:hover { color: var(--text); }
.lk-archive__arrow        { font-size: 12px; }
.lk-archive__list         { background: var(--surface); }

.lk-archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  gap: 12px;
}
.lk-archive-row__info { display: flex; align-items: center; gap:10px; flex: 1; min-width: 0; }
.lk-archive-row__name { white-space: normal; word-break: break-word; width: max-content; max-width: calc(100vw - 32px); text-align: center; overflow: hidden; text-overflow: ellipsis; }
.lk-archive-row__tag  { color: var(--accent); font-size: 12px; flex-shrink: 0; }
.lk-archive-row__btns { display: flex; gap: 6px; flex-shrink: 0;}

/* ── ПУСТО ── */
.lk-empty {
  color: var(--text2);
  margin-bottom: 2px;
  font-size: 14px;
  padding: 32px 0;
  text-align: center;
  grid-column: 1 / -1;
}

/* ── ЧАТЫ В МОДАЛКЕ ── */
.lk-chats-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 4px;
}
.lk-chats-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lk-chats-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lk-chats-empty {
  color: var(--text2);
  margin-bottom: 2px;
  font-size: 13px;
  padding: 8px 0;
}
.lk-chat-row {
  flex-wrap: wrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  gap: 8px;
}
.lk-chat-row__left {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.lk-chat-row__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lk-chat-row__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: normal; word-break: break-word; width: max-content; max-width: calc(100vw - 32px); text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lk-chat-row__messenger {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(108,111,255,.12);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.lk-chat-row__id {
  font-size: 13px;
  color: var(--text2);
  white-space: normal; word-break: break-word; width: max-content; max-width: calc(100vw - 32px); text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lk-chat-add__title {
  display: block;
  margin-top: 0; padding-top: 24px; border-top: 1px solid var(--border);
}
.lk-chat-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.lk-chat-add__select {
  width: 110px;
  flex-shrink: 0;
  padding: 8px 10px;
}
.lk-chat-add__input {
  flex: 1;
  min-width: 0;
}
.lk-chat-add__btn {
  flex-shrink: 0;
  white-space: normal; word-break: break-word; width: max-content; max-width: calc(100vw - 32px); text-align: center;
  padding: 8px 14px;
}
.lk-chats-block__hint {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 2px;
  line-height: 1.5;
}

/* ── ТОСТ ── */
.lk-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  z-index: 300;
  white-space: normal; word-break: break-word; width: max-content; max-width: calc(100vw - 32px); text-align: center;
}
.lk-toast--ok    { border-color: #2a4a35; color: #4ade80; }
.lk-toast--error { border-color: #4a1e1e; color: #ff7070; }

/* ── МОДАЛКИ ── */
.lk-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}
.lk-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}
.lk-modal--wide { max-width: 640px; }

.lk-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.lk-modal__title { font-size: 16px; font-weight: 700; }
.lk-modal__close {
  background: none;
  border: none;
  color: var(--text2);
  margin-bottom: 2px;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color .15s;
}
.lk-modal__close:hover { color: var(--text); }

.lk-modal__body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.lk-modal__foot {
  padding: 14px 20px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
}

/* ── ПОЛЯ ── */
.lk-field { display: flex; flex-direction: column; gap: 6px; }
.lk-field__label { font-size: 13px; color: var(--text2); }
.lk-field__input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
.lk-field__input:focus { border-color: var(--accent); }

/* Поле даты: иконка календаря — белая под тёмную тему, открывается по клику на поле */
.lk-field__input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}
.lk-field__input[type="date"]::-webkit-date-and-time-value {
  color: var(--text);
}
.lk-field__tag-wrap {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  transition: border-color .15s;
}
.lk-field__tag-wrap:focus-within { border-color: var(--accent); }
.lk-field__tag-prefix            { color: var(--accent); font-weight: 600; margin-right: 4px; }
.lk-field__input--tag            { background: transparent; border: none; padding: 9px 0; }
.lk-field__input--tag:focus      { border-color: transparent; }
/* Подсказка под полем формы */
.lk-field__hint { display: block; margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--hint-40); }

/* Заметка-плашка в модалке (информационная, без ошибок) */
.lk-modal__note { padding: 12px 14px; border-radius: var(--radius, 10px); background: var(--surface2); border: 1px solid var(--border); font-size: 13px; line-height: 1.45; color: var(--text2); }

/* ── ТАРИФНЫЕ ПЛАНЫ ── */
.lk-tariff-plans {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.lk-plan {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}
.lk-plan--featured { border-color: var(--accent); }
.lk-plan__name     { font-size: 16px; font-weight: 700; }
.lk-plan__desc     { font-size: 13px; color: var(--text2); line-height: 1.5; }
.lk-plan__btn      { margin-top: 4px; width: 100%; justify-content: center; }

/* ── АДАПТИВ ── */
@media (max-width: 1023px) {
  .lk-layout { flex-wrap: wrap;
    flex-direction: column;
    padding: 20px 16px;
  }
  .lk-chat-add__select { width: 100%; }
}
@media (max-width: 480px) {
  .lk-bridges-grid { grid-template-columns: 1fr; }
  .lk-tariff-plans { grid-template-columns: 1fr; }
  .lk-banner { padding: 10px 16px; }
  .lk-banner__body { gap: 8px; }
  .lk-banner__text { min-width: 0; font-size: 12px; }
  .lk-banner__actions { flex-shrink: 1; flex-wrap: wrap; width: 100%; }
  .lk-banner__actions .lk-btn-primary, .lk-banner__actions .lk-btn-ghost { flex: 1; text-align: center; font-size: 12px; padding: 6px 10px; }
}

@media (max-width: 360px) {
  .lk-banner { padding: 8px 12px; }
  .lk-banner__timer { display: none; }
}

.lk-profile__project--empty { font-size: 13px !important; opacity: 0.35; font-style: normal; }
.lk-profile__project { color: var(--text2); font-size: 14px; margin-top: 2px; }

.lk-profile__phone { font-size: 14px; color: var(--text2); margin-top: 2px; display: none; }
.lk-profile__name--empty { font-weight: 400; opacity: 0.35; font-size: 14px; }
.lk-profile__phone--empty { opacity: 0.35; font-size: 14px; display: none; }

/* Карточка проекта */
.lk-project {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: start;
}
.lk-project .lk-project-avatar-wrap { grid-row: 1 / 3; }
.lk-project .lk-project__info { text-align: left; justify-self: start; }
.lk-project__edit-btn { grid-column: 2; justify-self: start; margin-top: 15px; }
.lk-project-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: var(--gradient);
}
.lk-project__info { min-width: 0; }
.lk-project__label {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 2px;
}
.lk-project__name {
  font-size: 18px;
  font-weight: 700;
  word-break: break-word;
  margin-bottom: 20px;
  color: var(--accent);
}
.lk-project__name--empty {
  font-weight: 400;
  opacity: 0.35;
  font-size: 14px;
}

/* Обёртка аватара проекта */
.lk-project-avatar-wrap { position: relative; width: 50px; height: 50px; flex-shrink: 0; }
/* Фон-фото аватара проекта */
.lk-project-avatar--photo { background-size: cover; background-position: center; color: transparent; }
/* Слой при наведении */
.lk-project-avatar-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0,0,0,0.45); opacity: 0; cursor: pointer; transition: opacity 0.15s; }
.lk-project-avatar-wrap:hover .lk-project-avatar-overlay { opacity: 1; }
/* Кнопка удаления */
.lk-project-avatar-del { position: absolute; top: -4px; right: -4px; width: 20px; height: 20px; border: none; border-radius: 50%; background: #e23b3b; color: #fff; font-size: 12px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Крестик аватара проекта: скрыт, появляется при наведении */
.lk-project-avatar-del { opacity: 0; transition: opacity 0.15s; }
.lk-project-avatar-wrap:hover .lk-project-avatar-del { opacity: 1; }

.lk-card.lk-tariff { text-align: left; align-items: stretch; }
.lk-tariff__label { text-align: left; }

.lk-tariff__row   { width: 100%; }


/* Блок доступа сотрудников в модалке */
.lk-access-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.08); }
.lk-access-block__head { margin-bottom: 10px; }
.lk-access-list { display: flex; flex-direction: column; gap: 4px; }
.lk-access-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background 0.15s; }
.lk-access-item:hover { background: rgba(255,255,255,0.04); }
.lk-access-item__check { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); cursor: pointer; }
.lk-access-item__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lk-access-item__name { font-size: 14px; color: #fff; }
.lk-access-item__email { font-size: 12px; color: rgba(255,255,255,0.45); }
.lk-access-block__hint { margin-top: 0; margin-bottom: 12px; font-size: 12px; color: var(--hint-40); line-height: 1.4; }
.lk-access-empty { font-size: 13px; color: rgba(255,255,255,0.45); padding: 8px 0; }


/* Кнопка получения ключа */
.lk-link-row { margin-top: 10px; }
.lk-link-row__btn { width: 100%; }
/* Блок вывода ключа */
.lk-link-box { margin-top: 12px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.lk-link-box__hint { font-size: 13px; opacity: 0.75; margin-bottom: 10px; }
.lk-link-box__cmd { display: flex; align-items: center; gap: 8px; }
.lk-link-box__cmd code { flex: 1; padding: 8px 12px; border-radius: 8px; background: rgba(0,0,0,0.35); font-family: monospace; font-size: 15px; letter-spacing: 1px; }
.lk-link-box__copy { white-space: normal; word-break: break-word; width: max-content; max-width: calc(100vw - 32px); text-align: center; }
.lk-link-box__status { margin-top: 10px; font-size: 13px; opacity: 0.7; }
.lk-link-box__status--ok { color: #4ade80; opacity: 1; }

/* Шаги привязки чата */
.lk-steps { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.lk-step { display: flex; align-items: flex-start; gap: 10px; }
.lk-step__num { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: #4263eb; color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.lk-step__text { font-size: 14px; line-height: 1.4; color: #333; padding-top: 1px; }
.lk-step__text b { color: #1a1a1a; }
.lk-step__soon { font-size: 14px; color: #888; padding: 8px 0; font-style: italic; }
/* Ссылка раскрытия ручного блока */
.lk-manual-toggle { display: inline-block; margin: 10px 0 4px; font-size: 13px; color: #4263eb; text-decoration: none; border-bottom: 1px dashed #4263eb; }
.lk-manual-toggle:hover { color: #2b4acb; border-bottom-color: #2b4acb; }
/* Ручной ввод ID чата */
.lk-manual { margin-top: 0; padding-top: 0; }

/* Кликабельное имя бота и команды */
.lk-copy-bot {
  color: #8b9cff;
  cursor: pointer;
  font-weight: 600;
  border-bottom: 1px dashed rgba(139, 156, 255, .5);
  transition: color .15s, border-color .15s;
}
.lk-copy-bot:hover {
  color: #aab6ff;
  border-bottom-color: rgba(170, 182, 255, .8);
}

/* Светлый текст шагов и подсказки */
.lk-step__text,
.lk-chats-block__hint {
  color: #cdd3e0;
}

/* Воздух над подсказкой ручного блока */
.lk-manual .lk-chats-block__hint {
  margin-top: 10px;
}

/* Предупреждение про привязку */
.lk-link-box__warn {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 180, 60, .12);
  color: #ffcf8a;
  font-size: 13px;
  line-height: 1.4;
}

/* Жирный текст внутри шагов — светлый */
.lk-step__text b {
  color: #e6e9f2;
}

/* Значок: бот не админ в чате */
.lk-chat-row__msgcol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* Подсказка: бот не админ */

/* Подсказка: бот не админ */
.lk-chat-row__hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #e0a44a;
  white-space: normal;
  max-width: none;
  flex-basis: 100%;
  width: 100%;
  order: 10;
  text-align: left;
}
.lk-chat-row__warn {
  font-size: 15px;
  line-height: 1.4;
  flex-shrink: 0;
}

/* Кнопка перепроверки прав */
.lk-recheck-btn {
  margin-top: 0;
  margin-bottom: 10px;
  align-self: flex-start;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 400;
  color: #d99a3a;
  background: transparent;
  border: 1px solid rgba(217, 154, 58, 0.5);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.lk-recheck-btn:hover { border-color: rgba(217, 154, 58, 0.9); color: #e8b05a; }
.lk-recheck-btn:disabled { opacity: .5; cursor: default; }

/* Баннер рабочего проекта */

/* Баннер рабочего проекта */
.lk-project-banner { width:100%; margin-bottom:0; display:flex; align-items:center; justify-content:space-between; gap:12px; background:var(--surface2); border:1px solid var(--accent); border-radius:var(--radius); padding:12px 16px; }
.lk-project-banner__text { color:var(--text); font-size:14px; }
.lk-project-banner__btn { background:var(--gradient); color:#fff; border:none; border-radius:var(--radius-sm); padding:8px 14px; font-size:13px; cursor:pointer; white-space:nowrap; }
.lk-project-banner__btn:hover { opacity: .85; }
/* Сетка рабочих проектов */
.lk-work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
@media (max-width: 1023px) { .lk-work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .lk-work-grid { grid-template-columns: 1fr; } }
/* Карточка рабочего проекта */
.lk-work-card { position:relative; display:flex; flex-direction:column; gap:14px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:16px; }
.lk-work-card__avatar { width:50px; height:50px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.lk-work-card__avatar--ph { background:var(--gradient); display:flex; align-items:center; justify-content:center; color:#fff; font-weight:600; font-size:18px; }
.lk-work-card__name { color:var(--text); font-size:15px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lk-work-card__btn { width:100%; background:transparent; color:var(--text); border:1px solid var(--border); border-radius:var(--radius-sm); padding:9px 16px; font-size:13px; cursor:pointer; }
.lk-work-card__btn:hover { border-color:var(--accent); }
.lk-work-card__btn:disabled { background:var(--gradient); color:#fff; border:none; cursor:default; }

/* Оператор в чужом проекте — скрытые управляющие блоки */
.lk-role-operator #projectCard { display: none; }
.lk-role-operator .lk-tariff { display: none; }
.lk-role-operator #createBridgeBtn { display: none; }
.lk-role-operator .lk-bridge-card__actions { display: none; }
.lk-role-operator a[href="/team"] { display: none; }
/* Оператор — скрыть поле названия проекта в модалке профиля */
.lk-role-operator #profileModal .lk-field:has(#fieldProjectName) { display: none; }
.lk-work-card__meta { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.lk-work-card__role { color:var(--text); opacity:.55; font-size:12px; }
.lk-work-card__top { display:flex; align-items:center; gap:12px; }

/* Заглушка-фотоаппарат (проект, связка, проект в переключателе) */
.lk-project-avatar, .lk-bridge-avatar, .lk-work-card__avatar--ph {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lk-project-avatar > svg,
.lk-bridge-avatar > svg,
.lk-work-card__avatar--ph > svg {
  width: 46%;
  height: 46%;
  display: block;
}

@media (max-width: 1023px) {
  #projectBanner { order: -1; width: 100%; margin-bottom:0; }
  .lk-project-banner { flex-direction:column; }
}


@media (max-width: 600px) {
  .lk-project-banner__text { white-space:normal; }
  .lk-project-banner__btn { width:100%; text-align:center; }
}

/* Адаптация сетки связок */
@media (max-width: 1023px) {
  #bridgesGrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  #bridgesGrid { grid-template-columns: 1fr; }
}
.lk-btn-primary--sm { padding: 7px 14px; font-size: 13px; white-space: nowrap; }
.lk-btn-ghost--danger { color: var(--danger); border-color: var(--danger); }
.lk-btn-ghost--danger:hover { background: rgba(255,94,94,0.08); }
.lk-bot-active { background: color-mix(in srgb, var(--accent) 8%, var(--surface2)); border-color: var(--accent); }
.lk-tariff__bot--active { color: var(--color-success, #22c55e); font-weight: 600; }

/* Зона бота в карточке тарифа */

/* ── Карточка тарифа: 2 зоны ── */
.lk-tariff__divider { height: 1px; background: var(--border); margin: 6px 0; }
.lk-tariff__name--svc { color: var(--accent); }
.lk-tariff__botzone { margin-bottom: 6px; position: relative; }

/* Заголовок "Тариф: Старт" в одну строку */
.lk-tariff__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.lk-tariff__head .lk-tariff__label { width: auto; margin: 0; }

.lk-botzone__never, .lk-botzone__active, .lk-botzone__expired { display: none; }
.lk-botzone__never-title { color: var(--text1); font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.lk-botzone__never-text { color: var(--text2); font-size: 13px; line-height: 1.5; margin-bottom: 6px; }
.lk-botzone__link { color: var(--accent); font-size: 13px; text-decoration: none; cursor: pointer; }
.lk-botzone__link:hover { text-decoration: underline; }
.lk-botzone__note { color: var(--text2); font-size: 12px; line-height: 1.5; opacity: .8; margin-top: 4px; }
.lk-botzone__expired { background: #2e1212; border: 1px solid #6b2020; border-radius: 8px; padding: 8px 32px 8px 12px; margin-top: 10px; }
.lk-botzone__expired-text { color: #ffbaba; font-size: 12px; line-height: 1.5; opacity: .9; }

/* Карточки моста: выравнивание и прижатие к низу */
.lk-bridge-card__actions { align-items: center; }
.lk-bridge-card__actions .lk-badge { margin-left: auto; }
.lk-bridge-card__chats { margin-top: auto; }
.lk-bridge-card__head { align-items: flex-start; }
.lk-bridge-card__info { text-align: left; }

/* ── Адаптация сайдбара ── */
@media (max-width: 1023px) {
  .lk-sidebar { flex: 1 1 100%; width: 100%; }
  .lk-sidebar { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 12px; align-content: start; }
  .lk-sidebar-cards, .lk-sidebar-links { display: contents; }
  .lk-card.lk-profile { grid-column: 1; grid-row: 1; }
  .lk-card.lk-project { grid-column: 1; grid-row: 2; }
  .lk-card.lk-tariff { grid-column: 2; grid-row: 1 / 3; }
  .lk-sidebar__link[href="/team"] { grid-column: 1; grid-row: 3; }
  #chatLink { grid-column: 2; grid-row: 3; }
  .lk-sidebar__link { align-self: start; }
  .lk-profile { row-gap: 0; grid-template-rows: min-content min-content min-content 1fr min-content; align-content: stretch; }
  .lk-profile .lk-avatar-wrap { grid-row: 1 / span 3; }
  .lk-profile__name  { grid-column: 2; grid-row: 1; align-self: start; margin: 0; }
  .lk-profile__email { grid-column: 2; grid-row: 2; align-self: start; margin: 0; }
  .lk-profile__phone { grid-column: 2; grid-row: 3; align-self: start; margin: 0; }
  .lk-profile__name, .lk-profile__email, .lk-profile__phone {
    text-align: left; width: auto; max-width: 100%; justify-self: start;
  }
  .lk-profile__edit-btn { grid-column: 1 / -1; grid-row: 5; justify-self: stretch; align-self: end; }
  .lk-project .lk-project-avatar-wrap { grid-row: 1; }
  .lk-project__edit-btn { grid-column: 1 / -1; justify-self: stretch; }
}

@media (max-width: 600px) {
  .lk-sidebar { grid-template-columns: 1fr; }
  .lk-card.lk-profile, .lk-card.lk-project, .lk-card.lk-tariff,
  .lk-sidebar__link[href="/team"], #chatLink {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 600px) {
  .lk-section-head { flex-direction: column; gap: 10px; }
  #profileEditBtn { margin-top: 40px !important; }
  .lk-project__name { margin-bottom: 40px; }
  .lk-work-card { gap: 40px; }
}
.lk-botzone__expired { position: relative; }
.lk-botzone__expired-close { position: absolute; top: 8px; right: 10px; background: none; border: none; color: #999; font-size: 14px; line-height: 1; cursor: pointer; opacity: .6; padding: 0; }
.lk-botzone__expired-close:hover { opacity: 1; color: #999; }

.lk-banner { position: relative; }
.lk-banner__close { position: absolute; top: 12px; right: 12px; background: none; border: none; cursor: pointer; font-size: 16px; line-height: 1; padding: 4px; color: inherit; opacity: 0.6; transition: opacity 0.15s; }
.lk-banner__close:hover { opacity: 1; }

.lk-banner { position: relative; }
.lk-banner__close { position: absolute; top: 12px; right: 12px; background: none; border: none; cursor: pointer; font-size: 18px; line-height: 1; padding: 4px 6px; color: inherit; opacity: 0.55; transition: opacity .15s; }
.lk-banner__close:hover { opacity: 1; }
.lk-tariff__val--expired { color: #ffbaba; font-weight: 500; }
.lk-botzone__expired-banner { }
/* ── Модалка «Мои боты» ── */
.lk-bots-list { margin-bottom: 24px; }
.lk-bots-list__empty { text-align: center; padding: 24px 0; color: var(--muted); }
.lk-bot-card { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; }
.lk-bot-card__info { display: flex; align-items: center; gap: 12px; }
.lk-bot-card__icon { font-size: 24px; }
.lk-bot-card__text { display: flex; flex-direction: column; }
.lk-bot-card__name { font-weight: 600; font-size: 14px; }
.lk-bot-card__user { font-size: 12px; color: var(--muted); }
/* ── Форма добавления бота ── */
.lk-bot-add { border-top: 1px solid var(--border); padding-top: 20px; }
.lk-bot-add__head { margin-bottom: 12px; }
.lk-bot-add__messenger { display: flex; gap: 16px; margin-bottom: 12px; }
.lk-bot-add__instruction { margin-bottom: 12px; }
.lk-bot-add__row { display: flex; gap: 8px; }
.lk-bot-add__row .lk-field__input { flex: 1; }
/* ── Блок выбора бота в связке ── */
.lk-bot-select { margin-top: 12px; }
.lk-bot-select__info { margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.lk-bot-select__list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.lk-bot-select__item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: border-color .15s; }
.lk-bot-select__item:hover { border-color: var(--accent); }
.lk-bot-select__item--active { border-color: var(--accent); background: rgba(0,122,255,.06); }
.lk-bot-select__item input[type="radio"] { margin: 0; }
.lk-bot-select__icon { font-size: 20px; }
.lk-bot-select__info { display: flex; flex-direction: column; }
.lk-bot-select__name { font-weight: 600; font-size: 14px; }
.lk-bot-select__user { font-size: 12px; color: var(--muted); }
.lk-bot-select__empty-text { text-align: center; padding: 16px 0; color: var(--muted); font-size: 13px; }
.lk-bot-select__actions { display: flex; gap: 8px; }

/* Блок бота в модалке связки */
.lk-bot-block { padding: 0; }
.lk-bot-block__head { margin-bottom: 12px; }
.lk-bot-radio { display: flex; gap: 16px; margin-bottom: 0; }
.lk-bot-radio__item { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; }
.lk-bot-radio__label { color: var(--text1); }
.lk-bot-upsell { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.lk-bot-upsell__text { color: var(--text2); font-size: 13px; line-height: 1.5; margin-bottom: 10px; }

/* Плашка резервного бота */
.lk-botzone__backup { position: relative; margin-top: 12px; padding: 12px 20px 12px 14px; background: rgba(80, 140, 255, .08); border: 1px solid rgba(80, 140, 255, .25); border-radius: 10px; }
.lk-botzone__backup-text { color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.lk-botzone__backup-close { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--text-secondary); font-size: 14px; line-height: 1; cursor: pointer; opacity: .5; padding: 0; }
.lk-botzone__backup-close:hover { opacity: 1; }

/* Ссылка в плашке резервного бота с новой строки */
.lk-botzone__backup-text .lk-botzone__link { display: block; margin-top: 0;
  margin-bottom: 10px; }
.lk-tariff__row--inline { display: block; }

/* === ТАРИФЫ: модалка с 4 карточками === */
.lk-modal--tariffs { max-width: 860px; }
.lk-tariff-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .lk-tariff-plans { grid-template-columns: 1fr; } }
.lk-plan { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid rgba(105,66,192,0.45); border-radius: 14px; background: rgba(105,66,192,0.04); transition: border-color .15s, background .15s; }
.lk-plan--combo { border-color: #6942c0; background: rgba(105,66,192,0.10); box-shadow: 0 0 0 1px #6942c0 inset; }
.lk-plan:hover { border-color: rgba(105,66,192,0.75); background: rgba(105,66,192,0.07); }
.lk-plan--combo:hover { border-color: #6942c0; background: rgba(105,66,192,0.14); }
.lk-plan__badge { position: absolute; top: -10px; right: 14px; padding: 3px 10px; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; letter-spacing: 0.3px; }
.lk-plan__price { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.lk-plan__price-old { font-size: 14px; color: var(--text2); text-decoration: line-through; }
.lk-plan__price-now { font-size: 22px; font-weight: 700; color: var(--text1); }
.lk-plan__price-period { font-size: 13px; font-weight: 500; color: var(--text2); }
.lk-plan__btn { margin-top: auto; }

/* Ссылка «Сменить тариф» под кнопкой продления */
.lk-tariff__change { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--text2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lk-tariff__change:hover { color: var(--accent); }


/* Подсказка для админа при оплате */
.lk-modal--narrow { max-width: 420px; }
.lk-pay-hint__text { font-size: 14px; line-height: 1.5; color: #ccc; }

/* Футер модалки подсказки — кнопки 50/50 */
#adminPayHintModal .lk-modal__foot { display: flex; gap: 12px; }
#adminPayHintModal .lk-modal__foot button { flex: 1; white-space: nowrap; }

/* Адаптив модалки подсказки */
#adminPayHintModal .lk-modal--narrow { max-width: calc(100vw - 32px); width: 420px; box-sizing: border-box; }
#adminPayHintModal .lk-modal__body { word-wrap: break-word; overflow-wrap: break-word; }

/* Кнопка триала */
.lk-btn-trial {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 16px;
  border: 1.5px solid #4a90d9;
  border-radius: 8px;
  background: transparent;
  color: #4a90d9;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lk-btn-trial:hover {
  background: #4a90d9;
  color: #fff;
}
.lk-btn-trial:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Бейдж подарка */
.lk-botzone__gift-badge { margin-left: auto; padding: 4px 10px; border-radius: 12px; background: #6c5ce7; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }

/* Модалка бота */
.modal-box.modal-box--bot { max-width: 440px; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.modal-bot__header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-bot__title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }
.modal-bot__badge { padding: 4px 10px; border-radius: 12px; background: #4a90d9; color: #fff; font-size: 11px; font-weight: 600; }
.modal-bot__desc { font-size: 14px; color: var(--text); line-height: 1.5; margin-bottom: 16px; }
.modal-bot__features { list-style: none; padding: 0; margin: 0 0 24px 0; }
.modal-bot__features li { position: relative; padding-left: 20px; font-size: 13px; color: var(--text); line-height: 1.6; margin-bottom: 6px; }
.modal-bot__features li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.modal-bot__footer { text-align: center; }
.modal-bot__hint { margin-top: 10px; font-size: 12px; color: var(--text2); }

/* ── Модалка «Свой бот» ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; z-index: 300; padding: 16px; }
.modal-overlay.active { display: flex; }
.modal-box { position: relative; background: #fff; border-radius: 16px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 24px; line-height: 1; color: #999; cursor: pointer; padding: 0; }
.modal-close:hover { color: #999; }

/* Строка спящего тарифа */
.tariff-frozen {
  border-top: 1px solid #2e3248;
  padding-top: 15px;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text2);
}

/* Акцент «Заморожено:» */
.tariff-frozen-label { color: var(--accent); font-weight: 600; }

/* Пояснение в модалке тарифов */
.lk-tariff-hint { color: var(--text2); font-size: 13px; line-height: 1.5; padding: 0 0 15px; }

/* Блок успеха в модалке «Свой бот» */
.modal-bot__success{display:flex;flex-direction:column;align-items:center;gap:10px;margin:24px 0 28px}
.modal-bot__success-icon{width:48px;height:48px;border-radius:50%;background:#22c55e;color:#fff;display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:700;line-height:1}
.modal-bot__success-text{font-size:17px;font-weight:600;color:#fff;text-align:center}
.modal-bot__success-sub{font-size:14px;color:#a1a1aa;text-align:center}
.modal-bot__go-btn{width:100%;padding:12px 24px;font-size:15px}

/* Область под плашками — свой бот */
.lk-own-info { padding: 16px; background: #f8f9fb; border-radius: 12px; margin-bottom: 16px; }
.lk-own-info__title { font-size: 15px; font-weight: 600; color: #1a1a1a; margin-bottom: 6px; }
.lk-own-info__text { font-size: 14px; color: #555; line-height: 1.5; margin-bottom: 12px; }
.lk-own-info__btn { padding: 10px 18px; background: #2ea6ff; color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.lk-own-info__btn:hover { background: #1a95ee; }

/* Карточка CTA под плашками «Свой/Наш» */
.lk-own-cta { padding: 16px; border-radius: 12px; background: #f6f8fa; margin-top: 12px; text-align: center; }
.lk-own-cta__title { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: #1a1a1a; }
.lk-own-cta__text { font-size: 13px; color: #555; margin-bottom: 12px; line-height: 1.4; }
.lk-own-cta__btn { padding: 10px 20px; border: none; border-radius: 8px; background: #4f46e5; color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
.lk-own-cta__btn:hover { background: #4338ca; }
.lk-own-cta__btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Блок выбора бота по умолчанию */
.lk-bot-mass{}
.lk-bot-mass__title{font-size:15px;font-weight:600;color:#1a1a1a;margin-bottom:12px}
.lk-bot-mass__opt{display:flex;align-items:center;gap:10px;padding:8px 0;cursor:pointer;font-size:14px;color:#333}
.lk-bot-mass__opt input{cursor:pointer}
.lk-bot-mass__note{margin:10px 0 16px;font-size:12px;font-style:italic;line-height:1.5;color:#8a8a8a}
.lk-bot-mass__apply{margin-top:4px}
.lk-mass-confirm__text{font-size:14px;line-height:1.55;color:#444;margin:0}
.lk-bot-mass__title{color:#e8e8e8}
.lk-bot-mass__opt{color:#cfcfcf}
.lk-bot-mass__note{color:#8f96a3}
.lk-mass-confirm__text{color:#cfcfcf}

/* Блок бота связки — контент под выбором */
.lk-bot-content{margin:12px 0 4px}
.lk-bot-content__text{margin:0 0 10px;font-size:14px;line-height:1.5;color:#2c2c2c}
.lk-btn-primary--sm{padding:8px 16px;font-size:13px}
.lk-bot-warn{margin:10px 0 0;padding:10px 12px;font-size:13px;line-height:1.45;color:#6b6b6b;background:#f5f6f8;border-radius:8px}
.lk-bot-save{margin-top:14px}

/* Блок бота связки — контент под выбором */
.lk-bot-content{margin:12px 0 4px}
.lk-bot-content__text{margin:0 0 10px;font-size:14px;line-height:1.5;color:var(--text)}
.lk-bot-warn{margin:10px 0 0;padding:10px 12px;font-size:13px;line-height:1.45;color:var(--text2);background:var(--surface2);border-radius:8px}
.lk-bot-save{margin-top:14px}

/* Плашка 'Свой бот' в модалке связки */
.lk-botmodal__never-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lk-botmodal__never-title { font-size: 15px; font-weight: 600; color: var(--text); }
.lk-botmodal__gift-badge { font-size: 12px; font-weight: 600; color: var(--accent); background: rgba(108,140,255,.12); padding: 2px 8px; border-radius: 10px; }
.lk-botmodal__never-text { margin: 0 0 16px; font-size: 12px; line-height: 1.5; color: var(--text); }
/* Обводка-плашка только для состояния «свой бот не подключён» */
#botStateNever{padding:15px;border:1px solid var(--accent);border-radius:10px}

/* Плашка expired в связке: фон и рамка как у lk-botzone__expired */
#botStateExpired .lk-botzone__expired-banner { background: #2e1212; border: 1px solid #6b2020; border-radius: 8px; padding: 10px 12px; }
/* Отступ между плашкой и кнопкой Продлить */
#botStateExpired #botRenewBtn { margin-top: 12px; }


/* Читаемая строка статуса под названием чата */
.lk-chat-row__status-line {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  cursor: help;
}
.lk-chat-row__status-line--ok    { background: #e8f5e9; color: #2e7d32; }
.lk-chat-row__status-line--warn  { background: #fff8e1; color: #ef6c00; }
.lk-chat-row__status-line--bad   { background: #ffebee; color: #c62828; }
.lk-chat-row__status-line--pause { background: #eceff1; color: #546e7a; }

/* === Карточка чата: шапка с кнопками справа === */
.lk-chat-row { display: flex; flex-direction: column; gap: 8px; }
.lk-chat-row__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lk-chat-row__actions { display: flex; gap: 6px; flex-shrink: 0; }

/* === Плашка статуса чата — общая база === */
.lk-chat-status { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 12px; line-height: 1.4; }
.lk-chat-status__icon { flex-shrink: 0; font-size: 13px; line-height: 1.4; }
.lk-chat-status__body { flex: 1; }
.lk-chat-status__recheck { flex-shrink: 0; margin-left: auto; padding: 3px 10px; font-size: 11px; background: transparent; border: 1px solid currentColor; border-radius: 6px; color: inherit; cursor: pointer; opacity: .7; }
.lk-chat-status__recheck:hover { opacity: 1; }
.lk-chat-status__recheck:disabled { opacity: .4; cursor: default; }

/* === Статус ok — зелёный текст без плашки === */
.lk-chat-status--ok { background: transparent; padding: 4px 0; color: #4ade80; }

/* === Статус warn — жёлтая плашка в стилистике lk-help-note === */
.lk-chat-status--warn { background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .3); color: var(--text1); }

/* === Статус bad — красная плашка в стилистике lk-botzone__expired === */
.lk-chat-status--bad { background: #2e1212; border: 1px solid #6b2020; color: #ffbaba; }

/* === Статус pause — серый нейтральный === */
.lk-chat-status--pause { background: rgba(148, 163, 184, .1); border: 1px solid rgba(148, 163, 184, .25); color: var(--text2); }

/* Шапка карточки чата: контент слева, кнопки справа */
.lk-chat-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.lk-chat-row__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Плашка статуса под шапкой */
.lk-chat-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
}
.lk-chat-status__body {
  width: 100%;
  color: var(--text1);
}
.lk-chat-status__icon {
  margin-right: 2px;
}
.lk-chat-status__recheck {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.lk-chat-status__recheck:hover {
  opacity: 0.75;
}
.lk-chat-status__recheck:disabled {
  cursor: default;
  opacity: 0.5;
}

/* Жёлтая (warn) */
.lk-chat-status--warn {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}
.lk-chat-status--warn .lk-chat-status__body {
  color: var(--text1);
}
.lk-chat-status--warn .lk-chat-status__recheck {
  color: rgba(251, 191, 36, 0.6);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Красная (bad) */
.lk-chat-status--bad {
  background: #2e1212;
  border-color: #6b2020;
}
.lk-chat-status--bad .lk-chat-status__body {
  color: #ffbaba;
}
.lk-chat-status--bad .lk-chat-status__recheck {
  color: #eb455a;
  border: 1px solid #eb455a;
}

/* Зелёная (ok) */
.lk-chat-status--ok {
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.25);
  padding: 6px 10px;
}
.lk-chat-status--ok .lk-chat-status__body {
  color: rgb(134, 239, 172);
}

/* Серая (pause) */
.lk-chat-status--pause {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.2);
}
.lk-chat-status--pause .lk-chat-status__body {
  color: rgb(148, 163, 184);
}

/* Плашка "Проверяю..." при live-probe */
.lk-chat-status-loading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text2);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 8px;
}

/* Замыленность списка чатов во время фонового обновления */
.lk-chats-updating {
  filter: blur(1.5px);
  opacity: 0.75;
  transition: filter 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

/* Skeleton карточки чата пока идёт probe */
.lk-chat-skeleton { opacity: 0.6; }
.lk-chat-status-skeleton {
  color: #888;
  font-size: 13px;
  font-style: italic;
  padding: 4px 0;
}

/* === TD-26: список смежных связок в модалке === */
.lk-linked-list{ list-style:none; margin:12px 0 0; padding:6px; background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius-sm); }
.lk-linked-list li{ display:flex; align-items:center; gap:8px; padding:8px 10px; color:var(--text); font-size:14px; border-bottom:1px solid var(--border); }
.lk-linked-list li:last-child{ border-bottom:none; }
.lk-linked-tag{ font-size:12px; color:var(--text2); background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:2px 8px; white-space:nowrap; }

/* Ярлычок активной связки */
.lk-linked-tag--active{ color:#4ade80; background:#162a1e; border-color:#2b5138; }
/* Ярлычок связки на паузе */
.lk-linked-tag--paused{ color:#facc15; background:#2a2610; border-color:#5c531a; }
/* Коррекция блока ручного добавления чата */
.lk-chat-add { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.lk-chat-add__input { width: 100%; box-sizing: border-box; }
.lk-chat-add__btn { width: 100%; box-sizing: border-box; justify-content: center; text-align: center; }

/* Прелоадер личного кабинета */
.lk-preloader { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: var(--bg); transition: opacity .4s ease, visibility .4s ease; }
.lk-preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.lk-preloader__spinner { width: 48px; height: 48px; border-radius: 50%; border: 3px solid rgba(108,140,255,.18); border-top-color: #6c8cff; border-right-color: #9d6cff; animation: lkspin .7s linear infinite; }
@keyframes lkspin { to { transform: rotate(360deg); } }

/* Строка ожидания заморозки тарифа */
.tariff-freeze-icon { color: var(--text2); }
.tariff-pending-freeze { color: var(--accent); font-weight: 600; }
.tariff-freeze-dates { color: var(--text2); }
.tariff-freeze-block { margin-top: 8px; }

/* Пост-баннер превышения — оранжевый */
.lk-banner--warn { background: #3a2a12; border-color: #a8651a; }
.lk-banner--warn .lk-banner__text { color: #ffcf99; }
.lk-banner--warn .lk-banner__text strong { color: #ffb14d; }
/* Отступ между несколькими баннерами в стопке */
.lk-banner + .lk-banner { margin-top: 10px; }

/* Пред-баннеры (предупреждения) */
.lk-banner--purple {
  margin-top: 0 !important;
  margin-bottom: 10px !important;
  background: #867cff57;
  border-color: transparent;
  color: var(--text);
}
.lk-banner--purple strong {
  color: var(--text);
  font-weight: 600;
}
.lk-banner--purple .lk-banner__body {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.lk-banner--purple .lk-banner__text {
  flex: 0 1 auto; /* Запрещаем растягиваться, чтобы кнопка подошла вплотную */
  text-align: center;
  color: var(--text) !important;
}
.lk-work-card__btn:disabled { background: transparent !important; border: 1px solid #4a4d5e !important; color: #8c90a6 !important; opacity: 1 !important; box-shadow: none !important; }
.lk-work__btn:disabled { font-family: "Gilroy", sans-serif !important; font-size: 14px !important; }

/* Финальные стили заблокированной кнопки */
.lk-work__btn:disabled {
    font-family: inherit !important;
    font-size: 14px !important;
    min-height: 33px !important;
    height: 33px !important;
    padding: 0 18px !important;
    line-height: normal !important;
}

/* Тумблер «связать чаты / связать каналы» в модалке связки */
.lk-kind-toggle {
  display: flex;
  gap: 6px;
}
.lk-kind-toggle__btn {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s ease;
}
.lk-kind-toggle__btn--active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}

/* Переменная для ссылок: знак вопроса и подробное объяснение */
.lk-field__q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.lk-field__q:hover { color: var(--text); }
.lk-label-help {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 12px;
  line-height: 1.5;
}
.lk-label-more { color: var(--accent); cursor: pointer; text-decoration: underline; }
.lk-label-help ol { margin: 6px 0 6px 16px; padding: 0; }
.lk-label-help li { margin: 3px 0; }
.lk-label-help p { margin: 6px 0 0; }

/* Единый вертикальный ритм в модалке связки: 20px вокруг разделителей,
   16px между блоками (даёт flex gap), 10px внутри блока каналов */
.lk-modal .lk-bot-sep { margin: 4px 0; }
.lk-modal .lk-chats-block { margin-top: 4px; padding-top: 20px; }
.lk-modal .lk-chat-add__title { margin-top: 0; padding-top: 10px; }
.lk-modal .lk-access-block { margin-top: 4px; padding-top: 20px; }
.lk-modal .lk-steps { margin: 0; }
.lk-modal .lk-link-row { margin-top: 0; }
.lk-modal .lk-link-box { margin-top: 0; }
#bridgePausedNotice { margin: 0 !important; }

/* Ссылка на статью внутри подсказки меток */
.lk-label-help a { color: var(--accent); }
/* Вложенный список в подсказке меток */
.lk-label-help li ul { margin: 4px 0 4px 16px; padding: 0; }

/* Подсказка меток: единые отступы между блоками и у списков */
.lk-label-help b { display: block; margin: 10px 0 0; }
.lk-label-help p { margin: 6px 0 0; }
.lk-label-help ul { margin: 6px 0 6px 16px; padding: 0; }
