/* Meetings — экран «Аккаунты»: те же токены, что в styles.css (--bg, --accent #e91e63, …) */

#accounts {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Не сжимать секцию по высоте viewport (иначе список аккаунтов обрезается без скролла) */
#accounts.section {
  flex: 0 0 auto;
  min-height: auto;
}

.account-readonly-phone {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-alt, #14141b);
  border: 1px solid var(--border);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.account-edit-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

@media (max-width: 400px) {
  .account-edit-name-row {
    grid-template-columns: 1fr;
  }
}

.account-edit-name-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

.account-edit-modal .account-edit-name-input {
  margin-bottom: 0;
}

.account-edit-avatar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.account-edit-avatar-label {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.btn-account-delete-photos {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.08);
  color: #f87171;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-account-delete-photos:hover {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.65);
  color: #fca5a5;
}

.account-username-hint {
  margin: 8px 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
}

.sessions-page-header {
  margin-bottom: 26px;
}

.sessions-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(233, 30, 99, 0.1);
  border: 1px solid rgba(233, 30, 99, 0.28);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 14px;
}

.sessions-page-header h1 {
  margin: 0 0 10px;
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--text);
}

.sessions-page-header .sessions-sub {
  margin: 0;
  max-width: 36rem;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.sessions-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.sessions-toolbar--add-only {
  justify-content: flex-end;
}

/* Поиск и «Добавить аккаунт» в одну строку */
.sessions-toolbar--with-search {
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
}

.sessions-toolbar--with-search .sessions-search-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.sessions-toolbar--with-search .sessions-btn-add {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
}

.sessions-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.sessions-kind-toggle {
  display: inline-flex;
  align-items: stretch;
  padding: 3px;
  border-radius: 14px;
  background: var(--bg-alt, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.sessions-kind-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 9px 14px;
  border-radius: 11px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sessions-kind-btn:hover {
  color: var(--text);
}

.sessions-kind-btn.is-active {
  background: var(--panel, #1c1c22);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 4px 12px rgba(0, 0, 0, 0.18);
}

@media (max-width: 640px) {
  .sessions-toolbar--with-search {
    flex-wrap: wrap;
  }

  .sessions-toolbar-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .sessions-kind-toggle {
    flex: 1 1 auto;
  }

  .sessions-kind-btn {
    flex: 1 1 0;
    text-align: center;
    justify-content: center;
  }

  .sessions-toolbar--with-search .sessions-btn-add {
    width: 100%;
    justify-content: center;
  }
}

.sessions-toolbar-left {
  flex: 1;
  min-width: 200px;
}

.sessions-toolbar-left p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 420px;
  line-height: 1.45;
}

/* Мастер добавления аккаунта — инструкция my.telegram.org */
.sess-wiz-instruction {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--panel-2, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

.sess-wiz-instruction-lead {
  margin: 0 0 10px;
  color: var(--text);
}

.sess-wiz-instruction a {
  color: var(--accent, #e91e63);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sess-wiz-instruction a:hover {
  opacity: 0.9;
}

.sess-wiz-instruction-list {
  margin: 0;
  padding-left: 1.25rem;
}

.sess-wiz-instruction-list li {
  margin-bottom: 6px;
}

.sess-wiz-instruction-list li:last-child {
  margin-bottom: 0;
}

.sessions-btn-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  background: var(--accent);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 4px 20px rgba(233, 30, 99, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.sessions-btn-add:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 6px 28px rgba(233, 30, 99, 0.45);
}

.sessions-btn-add:active {
  transform: translateY(0);
}

.sessions-search-wrap {
  flex: 1;
  min-width: 220px;
  position: relative;
}

.sessions-search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.45;
  pointer-events: none;
  color: var(--muted);
}

.sessions-search {
  width: 100%;
  padding: 12px 16px 12px 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sessions-search::placeholder {
  color: var(--muted);
  font-weight: 400;
}

.sessions-search:focus {
  border-color: var(--accent);
}

.sessions-btn-select-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.sessions-btn-select-all:hover {
  background: var(--panel);
  border-color: var(--border);
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sessions-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-radius: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  overflow: visible;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sessions-card:hover {
  border-color: #3d3d52;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

.sessions-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
}

.sessions-card-identity {
  min-width: 0;
  flex: 1;
}

.sessions-card-phone {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.sessions-card-meta {
  margin-top: 4px;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sessions-card-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
  max-width: 100%;
}

.sessions-card-head-actions .sessions-status {
  flex-shrink: 0;
  margin-top: 2px;
}

.sessions-card-head-row-mobile {
  display: none;
}

.sessions-card-layout-mobile {
  display: none;
}

.sessions-card-foot-mobile {
  display: none;
}

.sessions-card-tools--head {
  display: none !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.sessions-card-actions-panel {
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  padding: 8px 12px 10px;
}

.sessions-card-mobile-body {
  display: none;
}

.sessions-card-niche-wrap--inline {
  position: relative;
}

.sessions-niche-bar {
  display: none;
}

.sessions-card.is-actions-open {
  border-color: rgba(233, 30, 99, 0.28);
}

.sessions-card-niche-wrap.is-open .sessions-niche-bar {
  filter: brightness(1.06);
}

.sessions-card-tools--mobile {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sessions-card-tools--mobile .sessions-action {
  width: 100%;
  justify-content: flex-start;
  padding: 10px 12px;
}

/* Ниша CRM — компактный контрол в ряду действий */
.sessions-card-niche-wrap {
  --niche-color: var(--accent, #e91e63);
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 0;
  position: relative;
}

.sessions-card-niche-wrap--frozen {
  padding: 0;
}

    .sessions-niche-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      margin: 0;
      min-height: 0;
      max-width: 196px;
      padding: 7px 11px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font-family: inherit;
      font-size: 0.8125rem;
      font-weight: 500;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-align: left;
      transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.12s ease;
    }

    .sessions-niche-btn--proj {
      color: var(--chip-color, #a78bfa);
      border-color: color-mix(in srgb, var(--chip-color, #7c3aed) 38%, var(--border));
      background: color-mix(in srgb, var(--chip-color, #7c3aed) 10%, transparent);
    }

    .sessions-niche-btn--free {
      color: var(--muted);
    }

    .sessions-niche-btn--block {
      color: #f87171;
      border-color: rgba(248, 113, 113, 0.35);
      background: rgba(248, 113, 113, 0.08);
      cursor: default;
      pointer-events: none;
    }

    .sessions-niche-btn:hover:not(:disabled):not(.sessions-niche-btn--block) {
      color: var(--text);
      border-color: #4a4a62;
      background: rgba(233, 30, 99, 0.06);
    }

    .sessions-niche-btn--proj:hover:not(:disabled) {
      border-color: color-mix(in srgb, var(--chip-color, #7c3aed) 55%, var(--border));
      background: color-mix(in srgb, var(--chip-color, #7c3aed) 16%, transparent);
      color: var(--chip-color, #a78bfa);
    }

    .sessions-niche-btn:active:not(:disabled):not(.sessions-niche-btn--block) {
      transform: scale(0.98);
    }

.sessions-niche-btn-desktop {
  display: inline-flex;
  align-items: center;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.sessions-niche-btn-mobile {
  display: none;
}

.sessions-niche-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(260px, calc(100vw - 48px));
  max-height: min(360px, calc(100vh - 140px));
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.sessions-niche-panel.hidden {
  display: none;
}

.sessions-niche-panel-empty {
  padding: 10px 12px;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

.sessions-niche-picker-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--proj-color, var(--border)) 38%, var(--border));
  background: color-mix(in srgb, var(--proj-color, #64748b) 14%, var(--panel-2));
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, filter 0.12s ease, border-color 0.12s ease;
}

.sessions-niche-picker-item:hover {
  filter: brightness(1.06);
  border-color: color-mix(in srgb, var(--proj-color, var(--accent)) 55%, var(--border));
}

.sessions-niche-picker-item:active {
  transform: scale(0.98);
}

.sessions-niche-picker-item--free {
  --proj-color: #94a3b8;
  font-weight: 500;
  color: var(--muted);
}

.sessions-niche-picker-ico {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 0.9rem;
  background: color-mix(in srgb, var(--proj-color, #64748b) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--proj-color, var(--border)) 35%, transparent);
}

/* Единая кнопка закрытия модалок (× в правом верхнем углу) */
.btn-modal-x {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.btn-modal-x:hover {
  color: var(--text);
  border-color: var(--crm-proj-accent, var(--accent));
  background: color-mix(in srgb, var(--crm-proj-accent, var(--accent)) 14%, var(--panel-2));
}

.modal-header {
  position: relative;
  align-items: center;
  padding-right: 44px;
}

.modal-header .btn-modal-x {
  position: absolute;
  top: 0;
  right: 0;
}

.modal-header--centered {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  min-height: 36px;
}

.modal-header--centered .modal-title {
  flex: 1;
  width: 100%;
  margin: 0;
  padding: 0 44px;
  box-sizing: border-box;
  text-align: center;
}

.modal-header--centered .btn-modal-x {
  position: absolute;
  top: 50%;
  right: 0;
  left: auto;
  transform: translateY(-50%);
}

.crm-lead-detail-modal {
  position: relative;
}

.crm-lead-detail-modal > .btn-modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
}

.crm-lead-detail-header {
  padding-right: 48px !important;
}

.crm-back-btn .crm-back-label {
  display: inline;
}

.crm-accounts-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1190;
}

.crm-accounts-backdrop.hidden {
  display: none;
}

@media (max-width: 768px) {
  #crmAccountsDropdown.crm-accounts-dropdown--mobile {
    position: fixed !important;
    left: 14px !important;
    right: 14px !important;
    top: auto !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-height: min(72vh, calc(100dvh - 120px)) !important;
    border-radius: 16px !important;
    border: 1px solid var(--border) !important;
    z-index: 1200 !important;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.55) !important;
  }

  body.crm-accounts-open {
    overflow: hidden;
  }

  .crm-back-label {
    display: none;
  }

  .crm-back-btn {
    padding: 8px 11px !important;
    min-width: 38px;
  }
}

.sessions-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
  cursor: default;
}

button.sessions-chip {
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

button.sessions-chip:active {
  transform: scale(0.98);
}

.sessions-chip--free {
  color: var(--muted);
}

.sessions-chip--proj {
  color: var(--chip-color, #a78bfa);
  border-color: color-mix(in srgb, var(--chip-color, #7c3aed) 35%, transparent);
  background: color-mix(in srgb, var(--chip-color, #7c3aed) 14%, transparent);
}

.sessions-chip--block {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
}

.sessions-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

.sessions-card-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.sessions-card-tools--extra {
  justify-content: flex-end;
}

.sessions-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.12s ease;
}

.sessions-action:active:not(:disabled) {
  transform: scale(0.98);
}

.sessions-action-ico {
  font-size: 0.95rem;
  line-height: 1;
}

.sessions-action:hover:not(:disabled) {
  color: var(--text);
  border-color: #4a4a62;
  background: rgba(255, 255, 255, 0.04);
}

.sessions-action--danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.sessions-action--danger:hover:not(:disabled) {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.08);
}

.sessions-action--freeze {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.sessions-action--freeze:hover:not(:disabled) {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.08);
}

.sessions-action--thaw {
  color: #fb923c;
  border-color: rgba(251, 146, 60, 0.35);
  font-weight: 600;
}

.sessions-action--thaw:hover:not(:disabled) {
  color: #fdba74;
  background: rgba(251, 146, 60, 0.1);
}

/* legacy aliases — toolbar uses .sessions-action */
.sessions-card-main {
  min-width: 0;
}

.sessions-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.sessions-tag {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(233, 30, 99, 0.12);
  color: var(--accent);
  border: 1px solid rgba(233, 30, 99, 0.28);
}

.sessions-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.sessions-btn-ghost {
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.sessions-btn-ghost.sessions-action {
  padding: 7px 11px;
  border-radius: 10px;
}

.sessions-btn-ghost:hover {
  color: var(--text);
  border-color: #4a4a62;
  background: rgba(233, 30, 99, 0.06);
}

/* CRM-проект на карточке — одна прямоугольная кнопка как «Проверить» / SpamBot */
.btn-crm-proj.sessions-chip {
  display: none;
}

.sessions-btn-delete {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
}

.sessions-btn-delete:hover {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.1);
}

.sessions-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sessions-status-active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.sessions-status-no-session,
.sessions-status-pending {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.sessions-status-frozen {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.sessions-status-broken {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.sessions-status-unknown {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.sessions-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.2);
}

/* Wizard modal */
.sess-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.sess-modal.hidden {
  display: none;
}

.sess-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 10, 0.78);
  backdrop-filter: blur(8px);
}

.sess-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.sess-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 8px;
}

.sess-modal-head h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.sess-modal-head .sess-modal-sub {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.sess-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sess-modal-close:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(233, 30, 99, 0.08);
}

.sess-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px 20px;
}

.sess-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--panel-2);
  border: 2px solid var(--border);
  color: var(--muted);
  transition: all 0.25s ease;
}

.sess-step-dot.active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 18px rgba(233, 30, 99, 0.35);
}

.sess-step-dot.done {
  background: rgba(233, 30, 99, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.sess-step-line {
  width: 32px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
}

.sess-step-line.done {
  background: linear-gradient(90deg, var(--accent), #ff4d8d);
}

.sess-modal-body {
  padding: 0 24px 24px;
}

.sess-form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sess-form-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sess-form-input:focus {
  border-color: var(--accent);
}

.sess-textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.45;
}

.sess-file-input {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.sess-form-input.sess-code-input {
  font-size: 1.5rem;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, monospace;
  caret-color: var(--accent);
  -webkit-appearance: none;
  appearance: none;
}
.sess-form-input.sess-code-input::-webkit-credentials-auto-fill-button,
.sess-form-input.sess-code-input::-webkit-contacts-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
  height: 0;
  width: 0;
  margin: 0;
}

.sess-form-input.sess-password-highlight {
  border-color: var(--accent);
}

.sess-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: -8px 0 16px;
  line-height: 1.45;
}

.sess-qr-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  align-items: center;
  gap: 16px;
  margin: 4px 0 16px;
  padding: 14px;
  border: 1px solid rgba(233, 30, 99, 0.28);
  border-radius: 16px;
  background: rgba(233, 30, 99, 0.08);
}

.sess-qr-box.hidden {
  display: none;
}

.sess-qr-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text);
}

.sess-qr-text span {
  color: var(--muted);
  line-height: 1.45;
}

.sess-qr-frame {
  width: 176px;
  height: 176px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}

.sess-qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sess-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
}

.sess-btn-primary {
  flex: 1;
  min-width: 140px;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: var(--accent);
  box-shadow: 0 4px 20px rgba(233, 30, 99, 0.35);
  transition: filter 0.15s, transform 0.15s;
}

.sess-btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.sess-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sess-btn-secondary {
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.sess-btn-secondary:hover {
  color: var(--text);
  border-color: #4a4a62;
}

.sess-alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-bottom: 14px;
  line-height: 1.4;
}

.sess-alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.sess-alert-info {
  background: rgba(233, 30, 99, 0.1);
  border: 1px solid rgba(233, 30, 99, 0.28);
  color: #f9a8d4;
}

.sess-success-block {
  text-align: center;
  padding: 12px 0 8px;
}

.sess-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid rgba(34, 197, 94, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.sess-verify-result {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
  color: var(--text);
}

.sess-verify-result .mono {
  font-family: ui-monospace, monospace;
  color: var(--accent);
}

.account-edit-modal .modal-content {
  max-width: 420px;
  border-radius: 20px;
  gap: 8px;
}

.account-edit-modal-header {
  align-items: center;
}

.account-edit-modal-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.account-edit-modal-close {
  flex-shrink: 0;
}

.account-edit-modal .form-group {
  margin-bottom: 10px;
}

.account-edit-modal .sess-textarea-wrap {
  margin-bottom: 6px;
}

.account-edit-modal #accountEditUsername {
  margin-bottom: 6px;
}

.account-edit-modal .account-edit-avatar-group {
  margin-bottom: 6px;
  margin-top: 2px;
}

.account-edit-modal .sess-avatar-upload {
  margin-bottom: 4px;
}

.account-edit-modal .sess-avatar-placeholder {
  padding: 16px 12px;
}

.account-edit-profile-msg {
  margin: 2px 0 6px;
  min-height: 0;
}

.account-edit-modal-footer {
  margin-top: 2px;
  padding-top: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.toast-error {
  background: rgba(180, 40, 60, 0.95) !important;
}

/* ── Bio textarea with char counter ──────────────────────────────────────── */
.sess-textarea-wrap {
  position: relative;
  margin-bottom: 16px;
}

.sess-textarea-wrap .sess-form-input {
  margin-bottom: 0;
  padding-bottom: 28px;
}

.sess-char-counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.75rem;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.15s;
}

.sess-char-counter--warn {
  color: #fbbf24;
}

.sess-char-counter--full {
  color: #f87171;
}

/* ── Styled avatar upload area ──────────────────────────────────────────── */
.sess-avatar-upload {
  position: relative;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1.5px dashed var(--border);
  background: var(--bg-alt);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
}

.sess-avatar-upload:hover,
.sess-avatar-upload.sess-avatar-drag {
  border-color: var(--accent);
  background: rgba(233, 30, 99, 0.05);
}

.sess-avatar-input {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sess-avatar-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 16px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  pointer-events: none;
}

.sess-avatar-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

.sess-avatar-hint {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.65;
}

.sess-avatar-preview {
  /* hidden by default via JS (style.display); flex when shown */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-height: 120px;
}

/* wrapper keeps ✕ glued to the top-left corner of the image */
.sess-avatar-img-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.sess-avatar-img-wrap img {
  max-height: 180px;
  max-width: 100%;
  border-radius: 10px;
  object-fit: contain;
  display: block;
}

.sess-avatar-clear {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 15, 20, 0.75);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1;
}

.sess-avatar-clear:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(239, 68, 68, 0.6);
}

/* CRM: выбор проекта для аккаунта (кнопка → список, без вложенного select) */
.crm-proj-picker-popover {
  position: fixed;
  z-index: 10050;
  min-width: 280px;
  max-width: min(360px, calc(100vw - 24px));
  max-height: min(380px, calc(100vh - 24px));
  overflow-y: auto;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
}

.crm-proj-picker-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin: 0 0 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.1s ease;
}

.crm-proj-picker-item:last-child {
  margin-bottom: 0;
}

.crm-proj-picker-item:hover {
  background: var(--panel-2);
}

.crm-proj-picker-item:active {
  transform: scale(0.98);
}

.crm-proj-picker-item--free {
  color: var(--muted);
}

.crm-proj-picker-item--current {
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.45);
  background: rgba(124, 58, 237, 0.1);
}

.crm-proj-picker-hr {
  height: 1px;
  margin: 8px 6px;
  background: var(--border);
  border: none;
}

.sessions-card-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sessions-card-menu-btn:hover {
  background: rgba(233, 30, 99, 0.1);
  border-color: rgba(233, 30, 99, 0.35);
}

.sessions-card-foot--desktop {
  /* desktop toolbar */
}

/* ── Bottom sheet (mobile menus) ─────────────────────────────────────────── */
.mobile-sheet.hidden {
  display: none !important;
  pointer-events: none;
}

.mobile-sheet {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.mobile-sheet:not(.hidden) {
  pointer-events: auto;
}

.mobile-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  animation: mobileSheetFadeIn 0.22s ease;
}

.mobile-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(78vh, 520px);
  margin: 0 auto;
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px 20px 0 0;
  background: var(--panel, #1a1a24);
  border: 1px solid var(--border);
  border-bottom: none;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  animation: mobileSheetSlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mobile-sheet-handle {
  width: 40px;
  height: 4px;
  margin: 4px auto 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
}

.mobile-sheet-title {
  padding: 0 8px 10px;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.4;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.mobile-sheet-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.mobile-sheet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.mobile-sheet-item:hover:not(:disabled),
.mobile-sheet-item:focus-visible {
  background: rgba(255, 255, 255, 0.05);
}

.mobile-sheet-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mobile-sheet-item--spambot {
  color: #86efac !important;
  font-weight: 650;
}

.mobile-sheet-item--spambot:not(:disabled):hover {
  background: rgba(22, 101, 52, 0.18) !important;
}

.mobile-sheet-item--freeze {
  color: #7dd3fc;
}

.mobile-sheet-item--thaw {
  color: #fdba74;
  font-weight: 600;
}

.mobile-sheet-item--danger {
  color: #f87171;
  margin-top: 4px;
}

.mobile-sheet-item--accounts {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-sheet-item--accounts .mobile-sheet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  flex-shrink: 0;
}

body.mobile-sheet-open {
  overflow: hidden;
}

@keyframes mobileSheetSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes mobileSheetFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.crm-mobile-menu-btn {
  display: none;
}

.crm-topbar-desktop-only {
  /* visible on desktop */
}

@media (max-width: 768px) {
  body.crm-kanban-open .mobile-topbar {
    display: none !important;
  }

  body.crm-kanban-open .content {
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
    min-height: 100dvh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden !important;
  }

  body.crm-kanban-open #projects.section:not(.hidden) {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    height: 100dvh;
    max-height: 100dvh;
    flex: 1;
    min-height: 0;
  }

  #accounts .sessions-page-header {
    display: none;
  }

  #accounts.section:not(.hidden) .panel {
    padding: 14px 14px 24px !important;
    border-radius: 16px;
  }

  .sessions-card-mobile-body {
    display: none;
    padding: 0 14px 14px;
  }

  .sessions-card.is-actions-open .sessions-card-mobile-body {
    display: block;
  }

  .sessions-card-head {
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .sessions-card-identity--desktop,
  .sessions-card-head-actions--desktop {
    display: none !important;
  }

  .sessions-card-layout-mobile {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .sessions-card-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
  }

  .sessions-card-layout-mobile .sessions-card-phone {
    font-size: 0.95rem;
    min-width: 0;
  }

  .sessions-card-layout-mobile .sessions-card-meta {
    margin: 0 0 10px;
    white-space: normal;
    text-overflow: unset;
    overflow: visible;
    line-height: 1.35;
    font-size: 0.78rem;
  }

  .sessions-card-foot-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .sessions-card-menu-btn {
    display: inline-flex;
    margin-left: auto;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-color: rgba(233, 30, 99, 0.28);
    background: rgba(233, 30, 99, 0.08);
  }

  .sessions-card.is-actions-open .sessions-card-menu-btn {
    border-color: rgba(233, 30, 99, 0.55);
    background: rgba(233, 30, 99, 0.16);
  }

  .sessions-niche-foot-status {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.08);
    color: #f87171;
    font-size: 0.78rem;
    font-weight: 500;
  }

  .sessions-card-niche-wrap--foot {
    position: relative;
    flex: 1;
    min-width: 0;
  }

  .sessions-card.is-niche-open {
    position: relative;
    z-index: 15;
  }

  .sessions-card-tools--head {
    display: none !important;
  }

  .sessions-niche-btn {
    display: none;
  }

  .sessions-niche-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 7px 11px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.12s ease;
  }

  .sessions-niche-bar--foot {
    justify-content: flex-start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sessions-niche-bar.sessions-niche-btn--proj {
    color: var(--chip-color, #a78bfa);
    border-color: color-mix(in srgb, var(--chip-color, #7c3aed) 42%, var(--border));
    background: color-mix(in srgb, var(--chip-color, #7c3aed) 16%, transparent);
    font-weight: 600;
  }

  .sessions-niche-bar.sessions-niche-btn--free {
    color: var(--muted);
    border-color: var(--border);
    background: transparent;
  }

  .sessions-niche-bar:active:not(:disabled) {
    transform: scale(0.99);
  }

  .sessions-card-niche-wrap--foot .sessions-niche-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 80;
    width: auto;
    max-height: min(260px, 46dvh);
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.52);
    display: flex;
    flex-direction: column;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .sessions-card-niche-wrap--foot .sessions-niche-panel.hidden {
    display: none;
  }

  .sessions-card-niche-wrap--foot .sessions-niche-picker-item {
    gap: 8px;
    padding: 9px 10px;
    border-radius: 9px;
    border: 1px solid color-mix(in srgb, var(--proj-color, var(--border)) 38%, var(--border));
    background: color-mix(in srgb, var(--proj-color, #64748b) 14%, var(--panel-2));
    font-size: 0.8125rem;
    font-weight: 600;
  }

  .sessions-card-niche-wrap--foot .sessions-niche-picker-item--free {
    --proj-color: #94a3b8;
    font-weight: 500;
    color: var(--muted);
  }

  .sessions-card-niche-wrap--foot .sessions-niche-picker-ico {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--proj-color, #64748b) 22%, transparent);
    font-size: 0.85rem;
  }

  .sessions-card-actions-panel {
    padding: 6px 0 0;
    border-top: none;
    background: transparent;
  }

  .sessions-card-actions-panel.hidden {
    display: none;
  }

  .sessions-card-tools--mobile {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .sessions-card-tools--mobile .sessions-action {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    padding: 11px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 500;
  }

  .sessions-card-tools--mobile .sessions-action:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    border-color: transparent;
  }

  .sessions-card-tools--mobile .sessions-action--freeze:hover:not(:disabled),
  .sessions-card-tools--mobile .sessions-action--thaw:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.14);
  }

  .sessions-card-tools--mobile .sessions-action--danger {
    color: #f87171;
    border: none;
  }

  .sessions-card-tools--mobile .sessions-action--danger:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.1);
  }

  .sessions-card-tools--mobile .btn-spambot:not(:disabled) {
    color: #4ade80;
  }

  .sessions-card-meta {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sessions-card-foot {
    display: none;
  }

  body.crm-kanban-open .crm-topbar-desktop-only {
    display: none !important;
  }

  body.crm-kanban-open .crm-mobile-menu-btn {
    display: inline-flex !important;
  }

  body.crm-kanban-open #crmKanbanTopbar {
    height: auto;
    min-height: 52px;
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  body.crm-kanban-open .crm-kanban-title {
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.crm-kanban-open .crm-funnel-tabs-row {
    display: none;
  }

  body.crm-kanban-open .crm-kanban-body-root {
    padding: 8px 6px 20px;
  }

  body.crm-kanban-open #crm-kanban {
    min-height: 0;
  }

  #projects.section:not(.hidden):not(.crm-kanban-active) {
    display: block !important;
    flex: none;
    min-height: auto;
    overflow: visible !important;
    height: auto !important;
  }

  body.crm-kanban-open #projects.section:not(.hidden) {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    height: 100dvh;
  }

  #accounts.section:not(.hidden) .panel {
    overflow-y: visible;
    max-height: none;
    padding: 18px 18px 28px !important;
    border-radius: 18px;
  }

  #crm-list {
    padding: 20px 18px 80px !important;
  }

  #crm-list > div:first-child > div:last-child {
    width: 100%;
    justify-content: flex-start;
  }

  #crmNewProjectBtn {
    margin-left: auto;
  }

  #projects:not(.hidden) {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }

  body.crm-kanban-open #crmKanbanTopbar {
    border-radius: 0;
    padding: 10px 18px !important;
  }

  body.crm-kanban-open .crm-kanban-body-root {
    padding: 10px 0 20px !important;
  }

  /* CRM и аккаунты: окна по центру, не bottom sheet */
  .content .modal,
  #projects .modal,
  #accounts .modal,
  body > .modal[id^="crmModal"],
  body > .modal.crm-accounts-modal {
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
    z-index: 1500 !important;
  }

  .content .modal .modal-content,
  #projects .modal .modal-content,
  #accounts .modal .modal-content,
  body > .modal[id^="crmModal"] .modal-content,
  body > .modal.crm-accounts-modal .modal-content,
  .content .sess-modal-panel,
  #accounts .sess-modal-panel {
    width: 100% !important;
    max-width: calc(100% - 8px) !important;
    border-radius: 16px !important;
    max-height: min(
      calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)),
      920px
    ) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }

  .content .modal .modal-header,
  #projects .modal .modal-header,
  #accounts .modal .modal-header {
    flex-direction: row !important;
  }

  .sess-qr-box {
    grid-template-columns: minmax(0, 1fr);
  }

  .sess-qr-frame {
    width: min(220px, 100%);
    height: auto;
    aspect-ratio: 1 / 1;
    justify-self: center;
  }
}

@media (min-width: 769px) {
  .sessions-card-mobile-body {
    display: none !important;
  }

  .sessions-card-layout-mobile {
    display: none !important;
  }

  .sessions-niche-bar {
    display: none !important;
  }

  .sessions-card-head {
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
  }

  .sessions-card-identity {
    flex: 1;
    min-width: 140px;
  }

  .sessions-card-tools--head {
    display: flex !important;
  }

  .sessions-card-menu-btn {
    display: none !important;
  }

  .sessions-card-actions-panel {
    display: none !important;
  }

  .crm-mobile-menu-btn {
    display: none !important;
  }
}

/* ── SpamBot modal ──────────────────────────────────────────────────────── */
.btn-spambot {
  color: #86efac !important;
  border-color: rgba(22, 101, 52, 0.45) !important;
  background: rgba(22, 101, 52, 0.12) !important;
  font-weight: 600 !important;
}

.btn-spambot:hover:not(:disabled) {
  color: #bbf7d0 !important;
  border-color: rgba(22, 101, 52, 0.65) !important;
  background: rgba(22, 101, 52, 0.2) !important;
}

.btn-spambot:disabled,
.btn-spambot.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.spambot-modal-panel {
  max-width: 520px;
}

.spambot-modal-panel .sess-modal-sub {
  color: #166534;
  font-weight: 600;
}

.spambot-account-line {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}

.spambot-account-line strong {
  color: var(--text);
}

.spambot-result-body {
  padding: 16px;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  min-height: 120px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  font-size: 0.9375rem;
  line-height: 1.55;
  word-break: break-word;
}

.spambot-message-text {
  margin-top: 12px;
  white-space: pre-wrap;
  line-height: 1.55;
}

.spambot-bot-line {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  line-height: 1.45;
}

.spambot-result-body.spambot-ok {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.spambot-result-body.spambot-warn {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
}

.spambot-result-body.spambot-error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
}

.spambot-loading {
  color: var(--muted);
  font-style: italic;
}

.spambot-meta {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--muted);
}

.spambot-status-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  font-style: normal;
}

.spambot-status-badge.spambot-status-ok {
  color: #166534;
  background: rgba(22, 101, 52, 0.15);
  border: 1px solid rgba(22, 101, 52, 0.35);
}

.spambot-status-badge.spambot-status-limited {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.spambot-status-badge.spambot-status-unknown {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border);
}

/* ── Skeleton loading (Meetings / CRM) ── */
@keyframes meetings-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.meetings-skel-block,
.meetings-skel-inline {
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.07) 0%,
    rgba(148, 163, 184, 0.16) 45%,
    rgba(148, 163, 184, 0.07) 100%
  );
  background-size: 200% 100%;
  animation: meetings-shimmer 1.35s ease-in-out infinite;
  border-radius: 8px;
}

.meetings-skel-inline {
  display: inline-block;
  vertical-align: middle;
  min-width: 2.4rem;
  min-height: 1.15em;
  color: transparent !important;
}

#summaryStatus.meetings-skel-inline {
  min-width: 8rem;
  max-width: 100%;
}

.meetings-skel-card {
  pointer-events: none;
  cursor: default;
}

.meetings-skel-card:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: var(--border) !important;
}

.project-card.meetings-skel-card::before {
  display: none !important;
}

.crm-proj-card.meetings-skel-card {
  cursor: default;
}

.meetings-skel-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  flex-shrink: 0;
}

.meetings-skel-line {
  height: 14px;
  margin-bottom: 8px;
}

.meetings-skel-line--title {
  height: 16px;
  width: 72%;
}

.meetings-skel-line--slug {
  height: 12px;
  width: 46%;
  margin-bottom: 0;
}

.meetings-skel-line--metric {
  height: 12px;
  width: 88px;
  margin-bottom: 0;
}

.meetings-skel-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
}

.meetings-skel-phone {
  height: 18px;
  width: 148px;
  max-width: 55%;
}

.meetings-skel-meta {
  height: 13px;
  width: 200px;
  max-width: 72%;
  margin-top: 7px;
}

.meetings-skel-status {
  width: 76px;
  height: 26px;
  border-radius: 999px;
  flex-shrink: 0;
}

.meetings-skel-bar {
  height: 34px;
  margin: 0 16px 14px;
  border-radius: 10px;
}

.meetings-skel-stripe {
  height: 4px;
  width: 100%;
  border-radius: 0;
}

.meetings-skel-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  margin-bottom: 12px;
}

.meetings-skel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.meetings-skel-stat {
  height: 38px;
  border-radius: 8px;
}

/* ── Meetings dashboard ─────────────────────────────────────────────────── */
.md-dash-kpi-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.35;
}

.md-dash-kpi-alert {
  color: #f87171 !important;
}

.md-dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.md-dash-panel {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  padding: 16px 18px 18px;
  min-height: 120px;
}

.md-dash-panel--table,
.md-dash-panel--ops {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.md-dash-panel--ops .md-dash-panel-head {
  flex-shrink: 0;
}

.md-dash-panel--wide {
  grid-column: span 1;
}

.md-dash-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.md-dash-panel-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.md-dash-panel-hint {
  font-size: 12px;
  color: var(--muted);
}

.md-dash-chart-wrap {
  position: relative;
  height: 220px;
}

.md-dash-chart-wrap--donut {
  height: 180px;
}

.md-dash-mini-stats {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.md-dash-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.md-dash-mini-row strong {
  color: var(--text);
  font-weight: 600;
}

.md-dash-table-wrap {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
}

.md-dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.md-dash-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0 10px 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.md-dash-table td {
  padding: 10px 10px 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  vertical-align: middle;
}

.md-dash-proj-row {
  cursor: pointer;
  transition: background 0.15s;
}

.md-dash-proj-row:hover td {
  background: rgba(124, 58, 237, 0.06);
}

.md-dash-proj-name {
  font-weight: 500;
}

.md-dash-ops-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.md-dash-ops-item-top .md-dash-ops-headline {
  flex: 1;
  min-width: 0;
}

.md-dash-ops-dismiss {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.md-dash-ops-dismiss:hover {
  color: #fff;
  background: rgba(248, 113, 113, 0.35);
  border-color: rgba(248, 113, 113, 0.45);
}

.md-dash-health {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.md-dash-health--ok {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.md-dash-health--warn {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
}

.md-dash-health--error {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

.md-dash-ops-list {
  list-style: none;
  margin: 0;
  padding: 0 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 280px;
  max-height: none;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.md-dash-ops-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.08);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.md-dash-ops-item:hover {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.16);
}

.md-dash-ops-item--error {
  border-color: rgba(248, 113, 113, 0.25);
  background: rgba(248, 113, 113, 0.06);
}

.md-dash-ops-headline-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.md-dash-ops-project {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--proj-color, #7c3aed) 18%, transparent);
  color: var(--proj-color, #7c3aed);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.md-dash-ops-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.md-dash-ops-headline {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.md-dash-ops-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.md-dash-ops-details {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.md-dash-ops-empty,
.md-dash-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 12px 0;
}

.md-dash-link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.md-dash-link-btn:hover {
  text-decoration: underline;
}

.md-dash-error {
  grid-column: 1 / -1;
  padding: 24px;
  color: #f87171;
  font-size: 14px;
}

.md-dash-skel-chart {
  height: 200px;
  border-radius: 10px;
  margin-top: 12px;
}

.md-dash-skel-donut {
  height: 160px;
  width: 160px;
  border-radius: 50%;
  margin: 12px auto 0;
}

.md-dash-skel-table {
  height: 140px;
  border-radius: 10px;
  margin-top: 12px;
}

.md-dash-skel-list {
  height: 120px;
  border-radius: 10px;
  margin-top: 12px;
}

@media (max-width: 768px) {
  #overview.section {
    overflow-x: hidden;
    max-width: 100%;
    min-width: 0;
  }

  #overview .panel {
    padding: 12px !important;
    border-radius: 16px !important;
    overflow: hidden;
    max-width: 100%;
    min-width: 0;
  }

  #overview .panel > div:first-child {
    margin-bottom: 12px !important;
    gap: 10px !important;
  }

  #overview .panel > div:first-child > div:first-child > div:first-child {
    display: none !important;
  }

  #overview .panel h2 {
    font-size: 1.05rem !important;
  }

  #overview .panel .panel-sub {
    font-size: 0.72rem !important;
  }

  #meetingsDashboard {
    max-width: 100%;
    overflow: hidden;
    min-width: 0;
  }

  .md-dash-panel {
    padding: 10px 12px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .md-dash-panel-head {
    margin-bottom: 10px;
  }

  .md-dash-panel-head h3 {
    font-size: 13px;
  }

  .md-dash-panel-hint {
    font-size: 10px;
  }

  .md-dash-chart-wrap {
    height: 132px;
    max-width: 100%;
    overflow: hidden;
  }

  .md-dash-chart-wrap--donut {
    height: 108px;
  }

  .md-dash-chart-wrap canvas {
    max-width: 100% !important;
  }

  .md-dash-mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 8px;
    margin-top: 10px;
    padding-top: 8px;
  }

  .md-dash-mini-row {
    font-size: 10px;
    gap: 4px;
  }

  .md-dash-mini-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .md-dash-mini-row strong {
    font-size: 11px;
  }

  .md-dash-table-wrap {
    overflow-x: visible;
    max-width: 100%;
  }

  .md-dash-table--mobile-compact thead {
    display: none;
  }

  .md-dash-table--mobile-compact {
    table-layout: fixed;
    width: 100%;
  }

  .md-dash-proj-row--mobile td {
    padding: 4px 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  }

  .md-dash-proj-mobile-cell {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 0 !important;
  }

  .md-dash-proj-mobile-cell .md-dash-proj-name {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .md-dash-proj-mobile-right {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .md-dash-proj-leads {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    min-width: 18px;
    text-align: right;
  }

  .md-dash-panel--ops {
    padding: 10px 12px 12px;
  }

  .md-dash-panel--ops .md-dash-panel-head {
    width: 100%;
    margin-bottom: 8px;
    padding: 0;
  }

  .md-dash-panel--ops .md-dash-link-btn {
    margin-left: auto;
    padding: 0;
    flex-shrink: 0;
  }

  .md-dash-ops-list {
    padding: 0;
    margin: 0;
    width: 100%;
    scrollbar-gutter: auto;
  }

  .md-dash-ops-item {
    padding: 8px 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .md-dash-ops-item-top {
    gap: 6px;
  }

  .md-dash-ops-dismiss {
    flex-shrink: 0;
  }

  .md-dash-table {
    font-size: 11px;
  }

  .md-dash-table th,
  .md-dash-table td {
    padding: 6px 4px;
  }

  .md-dash-table th:nth-child(3),
  .md-dash-table td:nth-child(3),
  .md-dash-table th:nth-child(4),
  .md-dash-table td:nth-child(4) {
    display: none;
  }

  .md-dash-proj-name {
    font-size: 11px;
  }

  .md-dash-health {
    font-size: 9px;
    padding: 2px 5px;
  }

  .md-dash-ops-item {
    padding: 8px 10px;
  }

  .md-dash-ops-headline {
    font-size: 11px;
  }

  .md-dash-ops-time,
  .md-dash-ops-details {
    font-size: 10px;
  }
}

@media (max-width: 960px) {
  .md-dash-grid {
    grid-template-columns: 1fr;
  }

  .md-dash-kpis.cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
    margin-bottom: 16px !important;
  }

  .md-dash-kpi {
    padding: 10px 12px !important;
  }

  .md-dash-kpi .card-title {
    font-size: 10px;
    margin-bottom: 2px;
    line-height: 1.2;
    letter-spacing: 0.04em;
  }

  .md-dash-kpi .card-value-xl {
    font-size: 1.35rem;
    line-height: 1.1;
  }

  .md-dash-kpi-sub {
    font-size: 10px;
    margin-top: 4px;
    line-height: 1.25;
  }
}
