/* =========================================================
   Эфир 51 — оформление
   Оформление намеренно простое: без flexbox, grid, CSS-переменных
   и внешних шрифтов, чтобы работало в старых браузерах.
   ========================================================= */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: #edf3f8;
  color: #1a2a36;
  font: 13px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, Tahoma, sans-serif;
}

.clear {
  clear: both;
  height: 0;
  font-size: 0;
  line-height: 0;
}

.wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Шапка ---------- */

.topbar {
  background: #091a27;
  border-bottom: 2px solid #028090;
  box-shadow: 0 2px 12px rgba(9, 26, 39, 0.25);
  padding: 10px 0;
  overflow: hidden;
}

.topbar-inner {
  min-height: 40px;
}

.brand {
  float: left;
}

.brand-mark {
  float: left;
  width: 42px;
  height: 42px;
  line-height: 42px;
  margin-right: 12px;
  background: transparent;
  text-align: center;
  border-radius: 50%;
}

.brand-logo-img {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.brand-text {
  float: left;
  padding-top: 1px;
}

.brand-name {
  display: block;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  line-height: 22px;
  letter-spacing: 0.2px;
}

.brand-sub {
  display: block;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
}

.topbar-right {
  float: right;
  padding-top: 8px;
  text-align: right;
  white-space: nowrap;
}

.proto-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 7px;
  border: 1px solid #3f7186;
  border-radius: 9px;
  color: #bfe0ea;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.topbar-note {
  color: #7fa4b4;
  font-size: 10px;
}

/* ---------- Каркас ---------- */

body.in-app {
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.in-app .topbar {
  flex-shrink: 0;
  padding: 8px 0;
}

body.in-app .dev-banner {
  flex-shrink: 0;
  padding: 3px 0;
  font-size: 11px;
}

body.in-app .verify-banner {
  flex-shrink: 0;
  padding: 4px 0;
}

body.in-app .page-footer {
  display: none !important;
}

body.in-app #landingView {
  display: none !important;
}

body.in-app .shell {
  flex: 1;
  min-height: 0;
  height: auto;
  display: flex !important;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 16px 12px;
  box-sizing: border-box;
  overflow: hidden;
  gap: 14px;
}

.shell {
  padding-top: 16px;
  padding-bottom: 28px;
}

.sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.sidebar-mobile-bar {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dce4ec;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(9, 26, 39, 0.05);
}

.card {
  background: #ffffff;
  border: 1px solid #dce4ec;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(9, 26, 39, 0.05);
  padding: 15px;
  margin-bottom: 14px;
}

/* ---------- Профиль ---------- */

.profile-top {
  margin-bottom: 10px;
}

.avatar {
  float: left;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  background: #028090;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.avatar-lg {
  width: 48px;
  height: 48px;
  line-height: 48px;
  font-size: 16px;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.profile-info {
  margin-left: 60px;
  min-height: 48px;
}

.profile-name {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  line-height: 19px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-id {
  margin-top: 2px;
  line-height: 18px;
}

.profile-username {
  color: #64748b;
  font-size: 11.5px;
  margin-right: 6px;
}

.profile-stations {
  margin-top: 3px;
  color: #8596a1;
  font-size: 10px;
  line-height: 14px;
}

.station-line {
  white-space: normal;
  line-height: 14px;
  margin-bottom: 1px;
}

/* ---------- Позывной ---------- */

.callsign {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid #cfe1e9;
  border-radius: 3px;
  background: #e9f3f7;
  color: #0f5a6b;
  font: bold 11px/15px Consolas, "Courier New", monospace;
  letter-spacing: 0.4px;
  vertical-align: baseline;
}

/* ---------- Список чатов ---------- */

.panel-title {
  margin: 0 0 8px;
  color: #7f929d;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

.search-label {
  display: block;
  margin: 0 0 3px;
  color: #93a2ab;
  font-size: 9px;
}

.search {
  width: 100%;
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px solid #c7d6de;
  border-radius: 5px;
  background: #ffffff;
  color: #1d2b36;
  font: 12px Tahoma, Verdana, sans-serif;
}

.chats-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  overflow: hidden;
}

.chat-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0 -5px;
  padding: 0 5px;
}

.chat-item {
  display: block;
  margin-bottom: 2px;
  padding: 8px 10px;
  border-left: 3px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.chat-item:hover {
  background: #f1f6fa;
}

.chat-item.active {
  background: #0f3a52;
  border-left-color: #38bdf8;
}

.chat-item.active .chat-name {
  color: #ffffff;
}

.chat-item.active .chat-preview {
  color: #bae6fd;
}

.chat-item.active .chat-online {
  background: #164e63;
  color: #7dd3fc;
  border-color: #028090;
}

.chat-item-top {
  overflow: hidden;
}

.chat-name {
  float: left;
  max-width: 175px;
  color: #1b3b4d;
  font-size: 12px;
  font-weight: bold;
  line-height: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-online {
  float: right;
  margin-top: 1px;
  padding: 0 6px;
  border: 1px solid #d6e9dc;
  border-radius: 8px;
  background: #eef7f1;
  color: #5c8068;
  font-size: 9px;
  line-height: 14px;
}

.chat-preview {
  clear: both;
  color: #93a2ab;
  font-size: 10px;
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-empty {
  padding: 8px 4px;
  color: #93a2ab;
  font-size: 11px;
}

.footnote {
  color: #8fa0aa;
  font-size: 10px;
  line-height: 15px;
  padding: 0 4px;
}

/* ---------- Шапка чата ---------- */

.chat-head {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  min-height: 52px;
  box-sizing: border-box;
}

.sidebar-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.sidebar-toggle-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.icon-bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 14px;
}

.icon-bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: #0f172a;
  border-radius: 2px;
}

.chat-head-titles {
  flex: 1;
  min-width: 0;
}

.chat-title {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 0;
}

.chat-sub {
  color: #64748b;
  font-size: 11px;
  line-height: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 0;
}

.online-pill {
  flex-shrink: 0;
  padding: 3px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #166534;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

/* ---------- Сообщения ---------- */

.messages {
  flex: 1;
  min-height: 0;
  position: relative;
  height: auto;
  padding: 14px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  scroll-behavior: smooth;
}

.cq-panel,
.reply-bar {
  flex-shrink: 0;
}

.composer {
  flex-shrink: 0;
  padding: 10px 16px 12px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.messages::-webkit-scrollbar,
.chat-list::-webkit-scrollbar {
  width: 6px;
}

.messages::-webkit-scrollbar-track,
.chat-list::-webkit-scrollbar-track {
  background: #f8fafc;
}

.messages::-webkit-scrollbar-thumb,
.chat-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.messages::-webkit-scrollbar-thumb:hover,
.chat-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.day-divider {
  margin: 14px 0;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
}

.day-divider span {
  display: inline-block;
  padding: 2px 10px;
  background: #f1f5f9;
  border-radius: 10px;
  color: #475569;
}

.msg {
  margin-bottom: 6px;
  padding: 10px 14px;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  background: #ffffff;
}

.msg:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.msg.own {
  background: #f0fdf4;
  border-color: #dcfce7;
  border-left: 3px solid #10b981;
}

.msg-avatar {
  float: left;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.msg-body {
  margin-left: 48px;
  min-height: 36px;
}

.msg-head {
  overflow: hidden;
}

.msg-name {
  float: left;
  margin-right: 6px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.msg-user {
  float: left;
  margin-right: 6px;
  color: #64748b;
  font-size: 11px;
  line-height: 18px;
}

.msg-head .callsign {
  float: left;
  margin-top: 1px;
}

.msg-time {
  float: right;
  color: #94a3b8;
  font-size: 10px;
  line-height: 18px;
  font-weight: 500;
}

.msg-station {
  clear: both;
  color: #8295a2;
  font-size: 10.5px;
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-text {
  clear: both;
  margin-top: 5px;
  color: #1e293b;
  font-size: 13px;
  line-height: 19px;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.messages-empty {
  padding: 70px 20px;
  color: #93a2ab;
  text-align: center;
  font-size: 12px;
}

.messages-empty-title {
  display: block;
  margin-bottom: 4px;
  color: #6d818d;
  font-size: 14px;
  font-weight: bold;
}

/* ---------- CQ-карточка ---------- */

.cq-card {
  margin-top: 6px;
  padding: 10px 14px;
  border: 1px solid #028090;
  border-radius: 8px;
  background: #091f2f;
  background: -webkit-linear-gradient(135deg, #091f2f 0%, #10364e 100%);
  background: linear-gradient(135deg, #091f2f 0%, #10364e 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(9, 31, 47, 0.2);
}

.cq-label {
  display: inline-block;
  background: #ef4444;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.cq-main {
  margin-top: 2px;
}

.cq-freq {
  color: #38bdf8;
  font: bold 22px/26px Consolas, "Courier New", monospace;
  letter-spacing: 0.5px;
}

.cq-unit {
  color: #94a3b8;
  font-size: 12px;
}

.cq-mode {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #028090;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  vertical-align: 2px;
}

.cq-note {
  margin-top: 5px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 16px;
}

/* ---------- Поле ввода ---------- */

.composer {
  padding: 12px 18px 14px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.composer textarea {
  display: block;
  width: 100%;
  height: 48px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font: 13px/18px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  resize: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.composer textarea:focus,
.text-input:focus,
.search:focus {
  border-color: #028090;
  box-shadow: 0 0 0 3px rgba(2, 128, 144, 0.18);
  outline: none;
}

.composer-actions {
  margin-top: 9px;
  overflow: hidden;
}

.counter {
  float: left;
  color: #94a3b8;
  font-size: 11px;
  line-height: 30px;
  font-weight: 500;
}

.composer-actions .btn {
  float: right;
  margin-left: 8px;
  padding: 6px 16px;
  font-size: 12px;
}

.composer-hint {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 10px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #c2d2da;
  border-radius: 6px;
  background: #ffffff;
  color: #1a384b;
  font: bold 12px/16px inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn:hover {
  background: #f1f6fa;
  border-color: #b0c6d2;
}

.btn:active {
  background: #e5eff5;
}

.btn-lg {
  padding: 10px 18px;
  font-size: 14px;
  line-height: 20px;
}

.btn-disabled,
.btn-disabled:hover {
  opacity: 0.5;
  filter: alpha(opacity=50);
  background: #ffffff;
  cursor: default;
}

.btn-primary {
  border-color: #016a78;
  background: #028090;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 128, 144, 0.25);
}

.btn-primary:hover {
  background: #00a896;
  border-color: #008f80;
  color: #ffffff;
}

.btn-primary:active {
  background: #026673;
}

.btn-small {
  padding: 4px 10px;
  font-size: 10px;
}

.btn-block {
  display: block;
  width: 100%;
  margin-top: 9px;
}

/* ---------- Панель CQ ---------- */

.cq-panel {
  padding: 11px 16px 9px;
  border-top: 1px solid #dce6eb;
  background: #f2f9fb;
}

.cq-panel-head {
  overflow: hidden;
  margin-bottom: 7px;
}

.cq-panel-title {
  float: left;
  color: #1f7a8c;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: 20px;
}

.cq-panel-head .modal-close {
  float: right;
}

.cq-fields {
  overflow: hidden;
}

.cq-field {
  float: left;
  width: 120px;
  margin-right: 10px;
}

.cq-field-note {
  width: 230px;
}

.cq-freq-input {
  font-family: Consolas, "Courier New", monospace;
  font-weight: bold;
}

.cq-panel-foot {
  margin-top: 8px;
  overflow: hidden;
}

.cq-panel-foot .btn {
  float: right;
}

.cq-panel .field-error {
  float: left;
  margin-top: 5px;
}

.cq-panel .hint {
  margin-top: 6px;
}

/* ---------- Формы ---------- */

.field {
  margin-bottom: 13px;
}

.field-label {
  display: block;
  margin-bottom: 4px;
  color: #24485c;
  font-size: 11px;
  font-weight: bold;
}

.label-soft {
  color: #93a2ab;
  font-weight: normal;
}

.text-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #c7d6de;
  border-radius: 4px;
  background: #ffffff;
  color: #1d2b36;
  font: 12px Tahoma, Verdana, sans-serif;
}

.callsign-input {
  font-family: Consolas, "Courier New", monospace;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.text-input.input-error {
  border-color: #c76b6b;
  background: #fffafa;
}

.hint {
  display: block;
  margin-top: 3px;
  color: #8496a1;
  font-size: 10px;
  line-height: 14px;
  font-weight: normal;
}

.field-error {
  color: #b23b3b;
  font-size: 11px;
  line-height: 15px;
}

.form-error {
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid #e5c4c4;
  border-radius: 4px;
  background: #fcf2f2;
}

.field-error:focus {
  outline: none;
}

.radio {
  display: block;
  margin: 2px 0;
  color: #2c4352;
  font-size: 12px;
  font-weight: normal;
  cursor: pointer;
}

.radio input {
  margin: 0 5px 0 0;
  vertical-align: -2px;
}

.station-row {
  margin-bottom: 6px;
  overflow: hidden;
}

.station-row .text-input {
  float: left;
  width: 86%;
}

.station-remove {
  float: right;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #d8c4c4;
  border-radius: 4px;
  background: #fff7f7;
  color: #a34848;
  font: bold 14px/26px Tahoma, sans-serif;
  cursor: pointer;
}

.station-remove:hover {
  background: #fbeaea;
}

/* ---------- Модальное окно ---------- */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
  background: #0d2534;
  background: rgba(13, 37, 52, 0.62);
  overflow-y: auto;
}

.modal {
  position: relative;
  width: 540px;
  max-width: 92%;
  margin: 34px auto 40px;
  background: #ffffff;
  border-radius: 9px;
  overflow: hidden;
}

.modal-head {
  overflow: hidden;
  padding: 12px 18px;
  border-bottom: 1px solid #dce6eb;
  background: #f7fafb;
}

.modal-title {
  float: left;
  color: #123a52;
  font-size: 16px;
  font-weight: bold;
  line-height: 24px;
}

.auth-dev-note {
  clear: both;
  padding-top: 4px;
  color: #7a8d99;
  font-size: 11px;
}

.auth-dev-note a {
  color: #1f7a8c;
  font-weight: bold;
  text-decoration: underline;
}

.auth-dev-note a:hover {
  color: #0f5260;
}

.modal-close {
  float: right;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8a9ca7;
  font: bold 20px/24px Tahoma, sans-serif;
  cursor: pointer;
}

.modal-close:hover {
  color: #b23b3b;
}

.modal-body {
  padding: 14px 18px 4px;
}

.modal-lead {
  margin: 0 0 13px;
  color: #6d818d;
  font-size: 11px;
  line-height: 16px;
}

.modal-foot {
  padding: 10px 18px 14px;
  border-top: 1px solid #e7eef2;
  text-align: right;
}

.modal-foot .btn {
  margin-left: 6px;
}

/* ---------- Адаптивность (IE8 просто проигнорирует) ---------- */

@media (max-width: 820px) {
  .wrap {
    padding: 0 8px;
  }

  body.in-app .shell {
    padding: 0;
    gap: 0;
  }

  .sidebar-toggle-btn {
    display: flex !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px !important;
    max-width: 86vw;
    height: 100dvh;
    z-index: 2000;
    background: #f8fafc;
    box-shadow: 6px 0 24px rgba(15, 23, 42, 0.25);
    transform: translateX(-100%);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    border-right: 1px solid #cbd5e1;
    padding: 12px;
    box-sizing: border-box;
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }

  .sidebar-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px 12px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 10px;
    flex-shrink: 0;
  }

  .sidebar-mobile-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
  }

  .sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #475569;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  .sidebar-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
  }

  .main {
    border: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
  }

  .topbar-right {
    display: none;
  }

  .cq-field,
  .cq-field-note {
    float: none;
    width: auto;
    margin: 0 0 8px;
  }

  .composer-actions .btn {
    margin-left: 4px;
  }
}

@media (max-width: 480px) {
  .brand-sub {
    display: none;
  }

  .profile-name {
    white-space: normal;
  }

  .composer-actions .counter {
    display: none;
  }

  .composer-actions .btn {
    float: none;
    display: block;
    width: 100%;
    margin: 4px 0 0;
  }

  .station-row .text-input {
    width: 82%;
  }

  .composer-textarea {
    min-height: 48px;
  }
}

/* =========================================================
   Компоненты версии с SQL-хранилищем и личными сообщениями
   ========================================================= */

.btn-tiny {
  padding: 2px 8px;
  font-size: 10px;
  line-height: 16px;
}

.btn-ghost {
  background: transparent;
}

#logoutBtn {
  margin-left: 8px;
  border-color: #3f7186;
  background: transparent;
  color: #d7ecf3;
}

#logoutBtn:hover {
  background: #16465e;
  border-color: #4d8499;
}

#logoutBtn:active {
  background: #0e3549;
}

.topbar-right .topbar-note {
  display: inline-block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.topbar-right .btn {
  vertical-align: middle;
}

/* ---------- Вход и регистрация ---------- */

.auth-modal {
  width: 410px;
}

.auth-tabs {
  overflow: hidden;
  margin: 0 0 15px;
  border-bottom: 1px solid #dce6eb;
}

.auth-tab {
  float: left;
  margin-bottom: -1px;
  padding: 7px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #7b8d98;
  font: bold 12px/18px Tahoma, Verdana, sans-serif;
  cursor: pointer;
}

.auth-tab:hover {
  color: #24485c;
}

.auth-tab.active {
  border-bottom-color: #1f7a8c;
  color: #123a52;
}

.auth-modal .modal-body {
  padding-bottom: 18px;
}

.auth-note {
  margin: 16px 0 0;
  padding-top: 10px;
  border-top: 1px solid #eef3f6;
  color: #93a2ab;
  font-size: 10px;
  line-height: 15px;
}

.demo-box {
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px dashed #c7d6de;
  border-radius: 5px;
  background: #f8fbfc;
  color: #5f7785;
  font-size: 10px;
  line-height: 22px;
}

.demo-box b {
  color: #24485c;
}

.demo-box .btn {
  float: right;
  margin-left: 8px;
}

/* ---------- Профиль пользователя ---------- */

.user-modal {
  width: 470px;
}

.user-hero {
  margin-bottom: 14px;
  overflow: hidden;
}

.avatar-xl {
  width: 56px;
  height: 56px;
  font-size: 18px;
  line-height: 56px;
}

.user-hero-info {
  margin-left: 70px;
  min-height: 56px;
}

.user-name {
  color: #123a52;
  font-size: 17px;
  font-weight: bold;
  line-height: 22px;
}

.user-meta {
  margin-top: 3px;
  color: #7b8d98;
  font-size: 10px;
  line-height: 15px;
}

.user-stations-block {
  padding-top: 10px;
  border-top: 1px solid #eef3f6;
}

.user-stations {
  color: #425965;
  font-size: 12px;
  line-height: 18px;
}

.user-modal .modal-body {
  padding-bottom: 12px;
}

/* ---------- Секции и личные чаты ---------- */

.chat-section {
  margin: 10px 0 3px;
  padding: 5px 4px 2px;
  border-top: 1px solid #eef3f6;
  color: #8fa0aa;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.chat-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.chat-online-dm {
  border-color: #c9d7e8;
  background: #eef3fa;
  color: #4a6484;
}

.online-pill-dm {
  border-color: #c9d7e8;
  background: #eef3fa;
  color: #4a6484;
}

/* ---------- Действия с сообщениями ---------- */

.msg-name-clickable {
  cursor: pointer;
}

.msg-name-clickable:hover {
  color: #1f7a8c;
  text-decoration: underline;
}

.msg-menu-btn {
  float: right;
  width: 20px;
  height: 18px;
  margin-left: 6px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #9aa9b2;
  font: bold 14px/18px Tahoma, Verdana, sans-serif;
  text-align: center;
  cursor: pointer;
}

.msg-menu-btn:hover {
  background: #e7f0f4;
  color: #24485c;
}

.msg-edited {
  margin-left: 5px;
  color: #b0bcc3;
  font-size: 9px;
  font-style: italic;
}

.msg-reply-btn {
  float: right;
  width: 20px;
  height: 18px;
  margin-left: 6px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #9aa9b2;
  font: bold 12px/18px Tahoma, Verdana, sans-serif;
  text-align: center;
  cursor: pointer;
}

.msg-reply-btn:hover {
  background: #e7f0f4;
  color: #1f7a8c;
}

.msg-quote {
  clear: both;
  margin-top: 5px;
  padding: 4px 8px;
  border-left: 3px solid #8ab5c4;
  border-radius: 3px;
  background: #f2f7fa;
  color: #55707d;
  font-size: 11px;
  line-height: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.msg-quote:hover {
  background: #e8f1f5;
}

.msg-quote-author {
  margin-right: 2px;
  color: #1f6b83;
  font-weight: bold;
}

.msg-highlight {
  background: #fff8dc !important;
  border-color: #e3d38a !important;
}

/* ---------- Панель ответа ---------- */

.reply-bar {
  overflow: hidden;
  padding: 6px 16px;
  border-top: 1px solid #dce6eb;
  background: #eef6f9;
}

.reply-bar-body {
  margin-right: 34px;
  overflow: hidden;
}

.reply-bar-label {
  display: block;
  color: #1f6b83;
  font-size: 10px;
  font-weight: bold;
  line-height: 15px;
}

.reply-bar-text {
  display: block;
  color: #6d818d;
  font-size: 11px;
  line-height: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-bar-cancel {
  float: right;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #c2d2da;
  border-radius: 4px;
  background: #ffffff;
  color: #6d818d;
  font: bold 15px/20px Tahoma, Verdana, sans-serif;
  text-align: center;
  cursor: pointer;
}

.reply-bar-cancel:hover {
  background: #f2f7fa;
  color: #24485c;
}

/* ---------- Карточка решения бота ---------- */

.admin-bot-card {
  margin-top: 6px;
  padding: 9px 11px;
  border: 1px solid #d9c9e8;
  border-radius: 6px;
  background: #f8f4fc;
}

.admin-bot-head {
  overflow: hidden;
  line-height: 18px;
}

.admin-bot-label {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #6d5b8f;
  color: #ffffff;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.5px;
  vertical-align: 1px;
}

.admin-bot-target {
  color: #16394d;
  font-size: 12px;
  font-weight: bold;
}

.admin-bot-text {
  margin-top: 5px;
  color: #425965;
  font-size: 11px;
  line-height: 16px;
}

.messages-loading {
  padding: 60px 20px;
  color: #93a2ab;
  font-size: 12px;
  text-align: center;
}

/* ---------- Контекстное меню ---------- */

.context-menu {
  position: fixed;
  z-index: 1200;
  width: 150px;
  padding: 4px;
  border: 1px solid #c7d6de;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 4px 14px #10394f;
  box-shadow: 0 4px 14px rgba(16, 57, 79, 0.18);
}

.context-menu button {
  display: block;
  width: 100%;
  padding: 6px 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #24485c;
  font: 12px/16px Tahoma, Verdana, sans-serif;
  text-align: left;
  cursor: pointer;
}

.context-menu button:hover {
  background: #eef5f8;
}

.context-menu .ctx-danger {
  color: #b23b3b;
}

.context-menu .ctx-danger:hover {
  background: #fcf2f2;
}

/* ---------- Уведомление ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 1300;
  max-width: 90%;
  margin-left: 0;
  pointer-events: none;
  padding: 8px 16px;
  border-radius: 6px;
  background: #123a52;
  color: #ffffff;
  font-size: 12px;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 4px 14px #10394f;
  box-shadow: 0 4px 14px rgba(16, 57, 79, 0.28);
}

/* ---------- Редактирование сообщения ---------- */

.edit-textarea {
  height: 92px;
  min-height: 60px;
  font: 12px/17px Tahoma, Verdana, sans-serif;
  resize: vertical;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.6;
  filter: alpha(opacity=60);
  cursor: default;
}

.btn:disabled:hover,
.btn[disabled]:hover {
  background: #ffffff;
}

.btn-primary:disabled:hover,
.btn-primary[disabled]:hover {
  background: #1f7a8c;
}

.composer textarea:disabled {
  background: #f5f7f8;
  color: #8fa0aa;
}

/* ---------- Адаптивность новых блоков ---------- */

@media (max-width: 820px) {
  .topbar-right {
    display: block;
  }

  .proto-badge,
  .topbar-note {
    display: none;
  }

  .auth-modal,
  .user-modal {
    margin-top: 20px;
  }

  .topbar-right .topbar-note {
    display: none;
  }
}

@media (max-width: 480px) {
  .auth-tab {
    padding: 7px 12px;
  }

  .demo-box {
    line-height: 26px;
  }

  .demo-box .btn {
    float: none;
    margin: 2px 0 0;
  }

  .context-menu {
    width: 160px;
  }

  .msg-menu-btn {
    width: 24px;
    height: 24px;
    line-height: 24px;
  }
}

/* =========================================================
   Администрирование, жалобы и удаление аккаунта
   ========================================================= */

.admin-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 6px;
  border: 1px solid #e0d2b4;
  border-radius: 3px;
  background: #f7f2e6;
  color: #7a5c22;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  vertical-align: middle;
}

.profile-role {
  margin-top: 2px;
  color: #7a5c22;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.online-pill-admin {
  border-color: #e0d2b4;
  background: #f7f2e6;
  color: #7a5c22;
}

.chat-online-admin {
  border-color: #e0d2b4;
  background: #f7f2e6;
  color: #7a5c22;
}

.main.admin-mode .messages {
  height: 560px;
  background: #fcfbf7;
}

.main.admin-mode .chat-head {
  background: #f7f3e8;
}

.report-modal {
  width: 450px;
}

.report-target-line {
  margin-bottom: 13px;
  color: #425965;
  font-size: 12px;
  line-height: 18px;
}

.report-target-line span {
  color: #123a52;
  font-weight: bold;
}

.report-card {
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #e6d2d2;
  border-left: 3px solid #b23b3b;
  border-radius: 4px;
  background: #fdf7f7;
}

.report-head {
  color: #5d3b3b;
  font-size: 12px;
  line-height: 17px;
}

.report-target {
  color: #8a2f2f;
  font-weight: bold;
}

.report-user {
  margin-top: 1px;
  color: #a06a6a;
  font-size: 10px;
}

.report-reason {
  margin-top: 4px;
  color: #8a4a4a;
  font-size: 11px;
  font-weight: bold;
}

.report-chat {
  margin-top: 3px;
  color: #1f6b83;
  font-size: 11px;
  font-weight: bold;
}

.report-comment {
  margin-top: 4px;
  color: #5c4b4b;
  font-size: 12px;
  line-height: 17px;
  word-wrap: break-word;
}

.danger-zone {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0dada;
}

.danger-title {
  margin-bottom: 8px;
  color: #b23b3b;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn-danger {
  border: 1px solid #d9b3b3;
  background: #ffffff;
  color: #b23b3b;
}

.btn-danger:hover {
  border-color: #c58e8e;
  background: #fcf2f2;
}

/* ---------- Правила при регистрации ---------- */

.rules-box {
  max-height: 190px;
  overflow-y: auto;
  padding: 9px 11px;
  border: 1px solid #dce6eb;
  border-radius: 5px;
  background: #f7fafb;
  color: #425965;
  font-size: 11px;
  line-height: 16px;
}

.rules-box p {
  margin: 0 0 7px;
}

.rules-box ul {
  margin: 0 0 7px 16px;
  padding: 0;
}

.rules-box li {
  margin-bottom: 3px;
}

.rules-check {
  display: block;
  margin-top: 8px;
  color: #425965;
  font-size: 11px;
  line-height: 16px;
  cursor: pointer;
}

.rules-check input {
  margin-right: 5px;
  vertical-align: top;
}

/* ---------- Санкции и админ-панель ---------- */

.profile-restrictions {
  margin-top: 8px;
}

.profile-restriction {
  margin: 4px 0;
  padding: 5px 7px;
  border-radius: 3px;
  background: #fbf1dc;
  color: #7a5a1e;
  font-size: 11px;
  line-height: 16px;
  overflow: hidden;
  word-wrap: break-word;
}

.profile-restriction-block {
  background: #fbeaea;
  color: #8a2f2f;
}

.profile-restriction-mute_public,
.profile-restriction-mute_dm {
  background: #fbf1dc;
  color: #7a5a1e;
}

.profile-restriction .admin-revoke {
  float: right;
  margin-left: 8px;
}

.profile-warning-count {
  margin-top: 4px;
  color: #8a6a1e;
  font-size: 10px;
  font-weight: bold;
}

.admin-panel {
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid #e6dcc0;
  border-left: 3px solid #b98a2f;
  border-radius: 5px;
  background: #fdfaf0;
}

.admin-panel-title {
  margin-bottom: 8px;
  color: #7a5a1e;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.admin-restrictions {
  margin-bottom: 7px;
}

.admin-restrictions-empty,
.admin-history-empty {
  color: #8a7b57;
  font-size: 11px;
  line-height: 16px;
}

.admin-buttons {
  margin-top: 4px;
}

.admin-buttons .btn {
  margin-right: 6px;
}

.admin-history {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #efe6ce;
}

.admin-history-title {
  margin-bottom: 5px;
  color: #7a5a1e;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.admin-history-row {
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 15px;
}

.admin-history-main {
  color: #5d4a25;
  font-weight: bold;
}

.admin-history-details {
  color: #8a7b57;
}

.admin-user-card {
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #e6dcc0;
  border-left: 3px solid #b98a2f;
  border-radius: 4px;
  background: #fdfaf0;
}

.admin-user-status {
  margin-bottom: 4px;
  overflow: hidden;
}

.status-badge {
  display: inline-block;
  margin: 0 4px 3px 0;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.status-badge-ok {
  background: #e3f1e8;
  color: #3d7a63;
}

.status-badge-block {
  background: #f7dfdf;
  color: #a33030;
}

.status-badge-mute {
  background: #fbf1dc;
  color: #8a6a1e;
}

.admin-user-meta {
  margin-bottom: 5px;
  color: #8a7b57;
  font-size: 10px;
}

.admin-user-open {
  margin-top: 2px;
}

@media (max-width: 820px) {
  .main.admin-mode .messages {
    height: 420px;
  }
}

/* ---------- Плашка «В разработке» и подвал ---------- */

.dev-banner {
  background: #fdf5e6;
  border-bottom: 1px solid #fae3b4;
  color: #7a5c1e;
  font-size: 12px;
  line-height: 18px;
  padding: 8px 0;
  text-align: center;
}

.dev-banner-inner {
  text-align: center;
}

.dev-badge {
  display: inline-block;
  padding: 2px 7px;
  margin-right: 8px;
  background: #d9822b;
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.dev-banner-text {
  vertical-align: middle;
}

.dev-banner-link {
  color: #1f7a8c;
  font-weight: bold;
  text-decoration: underline;
}

.dev-banner-link:hover {
  color: #0f5260;
}

.page-footer {
  margin-top: 14px;
  padding: 18px 0 28px 0;
  border-top: 1px solid #d3dfe6;
  color: #6d828f;
  font-size: 11px;
  line-height: 20px;
}

.footer-left {
  float: left;
}

.footer-right {
  float: right;
  text-align: right;
}

.footer-link {
  color: #1f7a8c;
  font-weight: bold;
  text-decoration: underline;
}

.footer-link:hover {
  color: #0f5260;
}

@media (max-width: 820px) {
  .footer-left,
  .footer-right {
    float: none;
    text-align: center;
    margin-bottom: 6px;
  }
}

/* ---------- Подтверждение Email и Репутация «73!» ---------- */

.verify-banner {
  background: #fff8e1;
  border-bottom: 1px solid #ffe082;
  color: #795548;
  font-size: 11px;
  line-height: 18px;
  padding: 6px 0;
  text-align: center;
}

.verify-banner-inner {
  text-align: center;
}

.verify-banner-icon {
  margin-right: 4px;
}

.verify-banner .btn {
  margin-left: 6px;
  vertical-align: middle;
}

.badge-verified {
  display: inline-block;
  padding: 1px 5px;
  margin-left: 4px;
  border-radius: 3px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

.badge-rep {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 5px;
  border-radius: 10px;
  background: #eef4f8;
  color: #1f7a8c;
  font-size: 10px;
  font-weight: bold;
  border: 1px solid #c8dce4;
  vertical-align: middle;
}

.profile-rep {
  margin-top: 4px;
  color: #1f7a8c;
  font-size: 11px;
  font-weight: bold;
}

.user-rep-line {
  margin-top: 4px;
  color: #1f7a8c;
  font-size: 12px;
  font-weight: bold;
}

.user-verify-line {
  margin-top: 2px;
  font-size: 11px;
}

.p-email-status {
  margin-top: 4px;
  font-size: 11px;
}

.code-input {
  font-family: Consolas, "Courier New", monospace;
  font-size: 18px;
  letter-spacing: 4px;
  text-align: center;
  font-weight: bold;
  width: 160px;
  margin: 6px auto;
  display: block;
}

.msg-rep-btn {
  display: inline-block;
  padding: 1px 7px;
  margin-left: 6px;
  border: 1px solid #c2dbe4;
  border-radius: 4px;
  background: #f7fbfd;
  color: #1f7a8c;
  font-size: 10px;
  cursor: pointer;
  vertical-align: middle;
}

.msg-rep-btn:hover {
  background: #e1f1f7;
  border-color: #1f7a8c;
}

/* =========================================================
   Главная страница (Landing View) для неавторизованных гостей
   ========================================================= */

.landing-view {
  display: block;
}

/* ---------- Герой эфира ---------- */

.hero-section {
  background: #091a27;
  background: -webkit-linear-gradient(135deg, #091a27 0%, #0d283c 50%, #133e56 100%);
  background: linear-gradient(135deg, #091a27 0%, #0d283c 50%, #133e56 100%);
  border-bottom: 2px solid #028090;
  box-shadow: 0 4px 20px rgba(9, 26, 39, 0.35);
  padding: 40px 0 46px 0;
  color: #ffffff;
}

.hero-wrap {
  overflow: hidden;
}

.hero-left {
  float: left;
  width: 58%;
  padding-right: 32px;
}

.hero-right {
  float: right;
  width: 42%;
}

.hero-pill {
  display: inline-block;
  background: rgba(2, 128, 144, 0.25);
  border: 1px solid rgba(2, 128, 144, 0.6);
  color: #7dd3fc;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  margin-right: 6px;
  box-shadow: 0 0 6px #10b981;
  vertical-align: middle;
}

.hero-title {
  margin: 0 0 10px 0;
  color: #ffffff;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
  color: #38bdf8;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 14px;
}

.hero-lead {
  color: #cbd5e1;
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.hero-stats {
  margin-bottom: 22px;
  overflow: hidden;
}

.hero-stat {
  float: left;
  width: 23%;
  margin-right: 2%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
}

.stat-value {
  color: #38bdf8;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
}

.stat-label {
  color: #94a3b8;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
  white-space: nowrap;
}

.hero-actions {
  margin-top: 8px;
}

.btn-hero {
  display: inline-block;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  margin-right: 10px;
}

.btn-hero-reg {
  background: #028090;
  border: 1px solid #00a896;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 128, 144, 0.4);
}

.btn-hero-reg:hover {
  background: #00a896;
  color: #ffffff;
}

.btn-hero-freq {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
}

.btn-hero-freq:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* ---------- Карточка входа на лендинге ---------- */

.landing-auth-card {
  background: #ffffff;
  border: 1px solid #c8d8e4;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  padding: 22px 24px;
}

.landing-auth-head {
  margin-bottom: 12px;
  border-bottom: 1px solid #eef2f5;
  padding-bottom: 10px;
}

.landing-auth-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f2e42;
}

.landing-auth-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* ---------- Секции возможностей ---------- */

.section-wrap {
  padding: 38px 0 16px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 26px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f2e42;
  margin: 0 0 8px 0;
  letter-spacing: -0.3px;
}

.section-sub {
  font-size: 14px;
  color: #526677;
}

.features-grid {
  overflow: hidden;
  margin-bottom: 10px;
}

.feature-card {
  float: left;
  width: 31.3%;
  margin: 1%;
  background: #ffffff;
  border: 1px solid #dce4ec;
  border-radius: 10px;
  padding: 20px 18px;
  box-shadow: 0 3px 12px rgba(11, 31, 46, 0.04);
  min-height: 155px;
}

.feature-icon-box {
  font-size: 26px;
  margin-bottom: 8px;
}

.feature-title {
  font-size: 15px;
  font-weight: bold;
  color: #0f2e42;
  margin-bottom: 6px;
}

.feature-desc {
  font-size: 12.5px;
  color: #526677;
  line-height: 1.5;
}

/* ---------- Частотная сетка ---------- */

.freq-box {
  background: #ffffff;
  border: 1px solid #c9d8e4;
  border-radius: 12px;
  padding: 26px 28px;
  box-shadow: 0 4px 16px rgba(11, 31, 46, 0.05);
  margin-bottom: 26px;
}

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

.freq-icon {
  font-size: 32px;
  margin-bottom: 6px;
}

.freq-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f2e42;
  margin: 0 0 6px 0;
}

.freq-sub {
  font-size: 13px;
  color: #526677;
}

.freq-cards {
  overflow: hidden;
}

.freq-card {
  float: left;
  width: 23%;
  margin: 1%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #028090;
  border-radius: 8px;
  padding: 16px 14px;
  min-height: 130px;
}

.freq-badge {
  display: inline-block;
  background: #0f2e42;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.freq-name {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 4px;
}

.freq-info {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.45;
}

/* ---------- Этика и кодекс ---------- */

.ethics-section {
  padding-top: 10px;
  padding-bottom: 30px;
}

.ethics-card {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 22px 26px;
  text-align: center;
}

.ethics-title {
  font-size: 16px;
  font-weight: bold;
  color: #0f2e42;
  margin: 0 0 8px 0;
}

.ethics-text {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  max-width: 860px;
  margin: 0 auto;
}

/* ---------- Адаптивность лендинга ---------- */

@media (max-width: 840px) {
  .hero-left, .hero-right {
    float: none;
    width: 100%;
    padding-right: 0;
  }
  .hero-right {
    margin-top: 28px;
  }
  .feature-card {
    width: 48%;
    margin: 1%;
  }
  .freq-card {
    width: 48%;
    margin: 1%;
  }
  .hero-stat {
    width: 48%;
    margin: 0 2% 10px 0;
  }
}

@media (max-width: 540px) {
  .feature-card, .freq-card {
    float: none;
    width: 100%;
    margin: 0 0 12px 0;
  }
  .hero-stat {
    float: none;
    width: 100%;
    margin: 0 0 8px 0;
  }
  .hero-title {
    font-size: 28px;
  }
}

/* =========================================================
   Новые компоненты: Пошаговая регистрация, Кадрирование,
   Восстановление пароля, Закреплённые чаты и Города
   ========================================================= */

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.auth-action-tabs {
  display: flex;
  margin-bottom: 18px;
  background: #e2e8f0;
  border-radius: 8px;
  padding: 3px;
  border: none;
}

.auth-action-tabs .auth-tab {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.auth-action-tabs .auth-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.auth-foot-links {
  margin-top: 14px;
  text-align: center;
}

.auth-link-forgot {
  font-size: 12px;
  color: #0284c7;
  text-decoration: none;
  font-weight: 500;
}

.auth-link-forgot:hover {
  text-decoration: underline;
  color: #0369a1;
}

.reg-step-badge {
  display: inline-block;
  padding: 3px 8px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 12px;
}

.reg-step-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 14px;
}

.reg-step-lead {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 14px;
}

.code-input {
  letter-spacing: 6px;
  font-size: 22px;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  text-align: center;
  padding: 10px;
}

.reg-links-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 12px;
}

.btn-link {
  background: transparent;
  border: none;
  color: #0284c7;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  text-decoration: underline;
}

.btn-link:hover {
  color: #0369a1;
}

.rules-toggle-link {
  font-size: 11px;
  color: #0284c7;
  cursor: pointer;
  margin-top: 4px;
  text-decoration: underline;
}

.reg-avatar-field {
  margin-bottom: 16px;
}

.reg-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.reg-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  overflow: hidden;
}

.reg-avatar-actions {
  flex: 1;
  min-width: 0;
}

.reg-presets-hint {
  font-size: 11px;
  color: #64748b;
  margin: 6px 0 4px;
}

.reg-avatar-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.reg-preset-pill {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.reg-preset-pill:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.reg-preset-pill.active {
  border-color: #0284c7;
  background: #e0f2fe;
}

.edit-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.edit-avatar-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label-req {
  color: #dc2626;
  font-weight: 700;
}

/* ---------- Кадрирование аватарки (Crop Modal) ---------- */

.crop-modal {
  width: 380px;
  max-width: 95vw;
}

.crop-hint {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 12px;
  line-height: 1.4;
}

.crop-viewport-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto 14px;
}

.crop-viewport {
  position: relative;
  width: 280px;
  height: 280px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
  cursor: grab;
  touch-action: none;
}

.crop-viewport:active {
  cursor: grabbing;
}

#cropCanvas {
  display: block;
}

.crop-circle-mask {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.65);
  pointer-events: none;
  border: 2px dashed rgba(255, 255, 255, 0.85);
}

.crop-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.crop-controls input[type="range"] {
  flex: 1;
}

.crop-zoom-label {
  font-size: 14px;
  color: #64748b;
  user-select: none;
}

/* ---------- Модалка Забыли пароль ---------- */

.forgot-modal {
  width: 420px;
  max-width: 95vw;
}

/* ---------- Закреплённые чаты в сайдбаре ---------- */

.chat-section-label {
  padding: 8px 10px 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.chat-item-pinned {
  background: #f8fafc;
  border-left: 3px solid #0284c7 !important;
}

.chat-item-pinned:hover {
  background: #f1f5f9;
}

.chat-item-pinned.active {
  background: #e0f2fe !important;
}

.chat-pinned-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

.chat-city-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #059669;
  color: #ffffff;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

.user-city-line {
  font-size: 12px;
  color: #0369a1;
  font-weight: 600;
  margin-top: 2px;
}


/* ---------- Окно поддержки и предложений (support@efir51.ru) ---------- */

.support-modal {
  max-width: 540px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.support-template-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.support-template-bar .field-label {
  margin-bottom: 0;
}

.support-textarea {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  min-height: 140px;
  color: #1e293b;
  background: #ffffff;
}

.support-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.sidebar-support-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.sidebar-support-btn {
  font-size: 12px;
  color: #0369a1;
  text-align: center;
}

.sidebar-support-btn:hover {
  background: #f0f9ff;
  color: #0284c7;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .support-actions {
    flex-direction: column-reverse;
  }
  .support-actions .btn {
    width: 100%;
    text-align: center;
  }
}
