:root {
  --bg: #f5f7f9;
  --surface: #fff;
  --ink: #1b2735;
  --muted: #7a8593;
  --line: #e8edf1;
  --green: #138463;
  --green-soft: #e8f7f0;
  --nav: #121a24;
  --blue: #427ace;
  --orange: #b27918;
  --purple: #7c61b1;
  --shadow: 0 4px 18px #142c4510;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  font-size: 14px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #63bd9b;
  outline-offset: 3px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #a3d8c3;
  outline-offset: 0;
  border-color: var(--green);
}
[hidden] {
  display: none !important;
}
.app {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 224px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--nav);
  padding: 29px 17px 16px;
  color: #c2ccd7;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 760;
  letter-spacing: -1px;
  color: #fff;
  text-decoration: none !important;
  padding: 0 7px;
}
.brand-mark {
  position: relative;
  background: #65e6b3;
  color: #122820;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 28px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
}
.brand-mark > span {
  position: absolute;
  right: 4px;
  top: 5px;
  width: 5px;
  height: 5px;
  background: #122820;
  border-radius: 50%;
}
.brand-beta {
  font-size: 10px;
  letter-spacing: 0;
  color: #708392;
  border: 1px solid #344351;
  padding: 3px 4px;
  border-radius: 4px;
  margin-left: auto;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 32px 2px 27px;
  background: #1c2632;
  border: 1px solid #2b3745;
  padding: 12px;
  border-radius: 9px;
}
.flag {
  font-size: 23px;
}
.workspace strong {
  display: block;
  color: #eef4f9;
  font-size: 13px;
}
.workspace small {
  display: block;
  font-size: 11px;
  color: #7f91a3;
  margin-top: 4px;
}
.workspace-arrow {
  margin-left: auto;
  color: #8495a5;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: #607285;
  font-weight: 700;
  margin: 0 12px 14px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 12px 13px;
  margin: 3px 0;
  border-radius: 7px;
  color: #9faebe;
  font-size: 13px;
  font-weight: 530;
}
.nav-item:hover {
  background: #202d3b;
}
.nav-item.active {
  background: #233930;
  color: #78e5b9;
}
.nav-item svg {
  width: 18px;
  height: 18px;
}
.nav-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #35463e;
  color: #91f3c5;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 40px;
}
.network-card {
  border: 1px solid #2b3847;
  border-radius: 8px;
  padding: 13px 12px;
  font-size: 11px;
}
.network-card .status-dot {
  vertical-align: middle;
  margin-right: 5px;
}
.network-card strong {
  font-size: 11px;
  font-weight: 550;
}
.network-card small {
  display: block;
  color: #738699;
  margin: 7px 0 0 15px;
  line-height: 1.5;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: #56dba6;
}
.user-card {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px 4px;
  background: none;
  border: 0;
  text-align: left;
}
.avatar {
  width: 31px;
  height: 31px;
  background: #2a3b4f;
  color: #bcd0e4;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.user-card strong {
  display: block;
  color: #d8e3ed;
  font-size: 12px;
}
.user-card small {
  display: block;
  color: #73879c;
  font-size: 10px;
  margin-top: 3px;
}
.user-card > span:last-child {
  margin-left: auto;
  color: #728497;
}
.main {
  margin-left: 224px;
  width: calc(100% - 224px);
}
.topbar {
  height: 67px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.breadcrumb {
  font-size: 11px;
  color: #909ba7;
  display: flex;
  gap: 12px;
  align-items: center;
}
.breadcrumb strong {
  font-weight: 550;
  color: #536272;
}
.breadcrumb > span {
  color: #c5ced7;
}
.topbar-right {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 11px;
  color: #788695;
}
.connection {
  display: flex;
  align-items: center;
  gap: 7px;
}
.connection i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1caf7e;
}
.connection.offline i {
  background: #d69435;
}
.topbar-divider {
  height: 16px;
  width: 1px;
  background: var(--line);
}
.mode-banner {
  padding: 9px 31px;
  display: flex;
  gap: 9px;
  align-items: center;
  background: #eef4f8;
  color: #697e90;
  font-size: 11px;
  border-bottom: 1px solid #e2ebf1;
}
.mode-banner strong {
  font-weight: 650;
  color: #456176;
}
.mode-banner a {
  margin-left: auto;
  color: #456176;
  font-weight: 600;
}
.page-wrap {
  padding: 29px 31px 35px;
  max-width: 1800px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: #97a2ae;
  font-weight: 650;
  margin-bottom: 10px;
}
.page-heading h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.8px;
  font-weight: 700;
}
.page-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.heading-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #dde4ea;
  background: #fff;
  border-radius: 7px;
  padding: 10px 13px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  min-height: 36px;
}
.button:hover {
  background: #f7fafb;
  border-color: #bdcbd6;
  text-decoration: none;
}
.button svg {
  width: 14px;
  height: 14px;
}
.button.primary {
  background: #158663;
  color: white;
  border-color: #158663;
  box-shadow: 0 2px 3px #0a77511a;
}
.button.primary:hover {
  background: #107453;
}
.button.subtle {
  background: transparent;
}
.button.danger {
  color: #b95353;
  border-color: #ebcece;
}
.button.small {
  padding: 6px 9px;
  min-height: 29px;
  font-size: 11px;
}
.button.urgent {
  background: #fff5e5;
  border-color: #eedbb7;
  color: #a07221;
}
.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #798b9b;
}
.icon-button:hover {
  background: #eff5f6;
}
.icon-button svg {
  width: 15px;
  height: 15px;
}
.mobile-menu {
  display: none;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 23px;
}
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 17px 18px;
  position: relative;
}
.metric-label {
  font-size: 11px;
  color: #7c8996;
  display: flex;
  align-items: center;
  gap: 8px;
}
.metric-label svg {
  width: 14px;
  height: 14px;
  color: #8897a5;
}
.metric-value {
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -0.7px;
  margin: 11px 0 7px;
}
.metric-foot {
  font-size: 10px;
  color: #96a1aa;
  display: flex;
  align-items: center;
  gap: 5px;
}
.metric-foot.green {
  color: #389879;
}
.metric-spark {
  position: absolute;
  width: 72px;
  height: 26px;
  right: 15px;
  bottom: 21px;
  color: #a8daca;
}
.desk {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) 352px;
  gap: 19px;
  align-items: start;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.panel-title {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13px;
  font-weight: 650;
}
.live-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  letter-spacing: 0.8px;
  font-weight: 650;
  color: #158c63;
  background: #eaf8f1;
  padding: 4px 6px;
  border-radius: 4px;
}
.panel-caption {
  font-size: 10px;
  color: #9aa6b0;
}
.feed-toolbar {
  padding: 14px 18px 0;
}
.tabs {
  display: flex;
  gap: 23px;
  border-bottom: 1px solid var(--line);
}
.tab {
  border: none;
  background: none;
  padding: 0 0 12px;
  color: #8995a1;
  font-size: 11px;
  position: relative;
  display: flex;
  gap: 6px;
  align-items: center;
}
.tab.active {
  color: #1e755d;
  font-weight: 650;
}
.tab.active:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #1a936d;
}
.tab-count {
  font-size: 9px;
  padding: 2px 5px;
  background: #eef1f4;
  border-radius: 4px;
  color: #84919c;
}
.tab.active .tab-count {
  background: #e5f4ed;
  color: #268b69;
}
.filters {
  display: flex;
  gap: 8px;
  margin: 13px 0;
  align-items: center;
}
.searchbox {
  flex: 1;
  position: relative;
  min-width: 90px;
}
.searchbox svg {
  position: absolute;
  left: 10px;
  top: 9px;
  width: 13px;
  height: 13px;
  color: #95a3af;
}
.searchbox input {
  padding: 8px 10px 8px 31px;
  width: 100%;
  font-size: 11px;
  background: #f8fafb;
  border: 1px solid #e7ecf0;
  border-radius: 6px;
  height: 32px;
}
.filters select {
  font-size: 10px;
  padding: 7px 22px 7px 9px;
  max-width: 140px;
  height: 32px;
  border: 1px solid #e6ecf0;
  border-radius: 6px;
  background: white;
  color: #667786;
}
.event-list {
  max-height: 650px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.event-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid #edf1f4;
  background: #fff;
  padding: 17px 20px;
  position: relative;
}
.event-card:hover {
  background: #f8fbfa;
}
.event-card.selected {
  background: #f0f8f5;
}
.event-card.selected:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #189a72;
}
.event-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  color: #98a4ad;
  margin-bottom: 10px;
}
.source-initial {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 5px;
  background: #eaf1f6;
  color: #557591;
  font-size: 10px;
  font-weight: 650;
}
.source-initial.monitoring {
  background: #fff1dd;
  color: #ad7b29;
}
.source-initial.alert {
  background: #f9eaea;
  color: #be6a6a;
}
.source-name {
  font-size: 10px;
  color: #788693;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.event-top time {
  margin-left: auto;
  white-space: nowrap;
}
.event-card h3 {
  font-size: 13px;
  line-height: 1.55;
  font-weight: 620;
  margin: 0 0 8px;
  letter-spacing: -0.1px;
}
.event-excerpt {
  font-size: 11px;
  line-height: 1.65;
  color: #8b98a3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 11px;
  gap: 8px;
}
.event-tags {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.tag {
  font-size: 9px;
  background: #f1f4f7;
  color: #788794;
  padding: 4px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.tag.green {
  background: #e9f7ef;
  color: #2a8965;
}
.tag.orange {
  background: #fff4df;
  color: #a97822;
}
.tag.red {
  background: #fceeee;
  color: #b36464;
}
.tag.purple {
  background: #f2eef9;
  color: #8b6db6;
}
.tag.blue {
  background: #edf3fc;
  color: #5a7db0;
}
.score {
  font-size: 10px;
  color: #749284;
  display: flex;
  gap: 5px;
  align-items: center;
}
.score > span {
  display: flex;
  gap: 2px;
}
.score i {
  display: block;
  width: 3px;
  height: 8px;
  background: #dce8e2;
  border-radius: 1px;
}
.score i.on {
  background: #6db39a;
}
.list-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #9ca6ae;
}
.preview-panel {
  position: sticky;
  top: 16px;
}
.preview-panel .panel-header {
  padding: 16px 17px;
}
.preview-tabs {
  display: flex;
  gap: 14px;
  padding: 13px 17px 0;
  border-bottom: 1px solid var(--line);
}
.preview-tabs button {
  font-size: 10px;
  background: none;
  border: 0;
  padding: 0 0 11px;
  color: #8d99a5;
}
.preview-tabs button.active {
  color: #238565;
  border-bottom: 2px solid #289576;
}
.preview-content {
  padding: 17px;
}
.preview-empty {
  padding: 80px 30px;
  color: #91a0ad;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}
.telegram-preview {
  background: #e6edf1;
  border-radius: 8px;
  padding: 12px;
  position: relative;
}
.telegram-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  font-size: 10px;
  color: #60768a;
}
.telegram-avatar {
  background: #2e8ac4;
  color: white;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.telegram-header strong {
  font-size: 11px;
  display: block;
  color: #375e7a;
}
.telegram-header small {
  font-size: 9px;
}
.telegram-bubble {
  background: #fff;
  border-radius: 2px 9px 9px;
  padding: 13px 12px;
  box-shadow: 0 1px 2px #324d661a;
}
.telegram-bubble h4 {
  font-size: 11px;
  color: #3486b6;
  margin: 0 0 9px;
  font-weight: 650;
}
.telegram-body {
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.telegram-meta {
  font-size: 9px;
  color: #9aabb7;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.preview-info {
  font-size: 10px;
  color: #94a1ab;
  line-height: 1.7;
  margin: 12px 0;
}
.preview-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.preview-detail span {
  font-size: 9px;
  color: #9ca6af;
  display: block;
  margin-bottom: 6px;
}
.preview-detail strong {
  font-size: 11px;
  font-weight: 550;
}
.preview-actions {
  display: flex;
  gap: 7px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.preview-actions .button {
  flex: 1;
}
.detail-text {
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  margin-bottom: 16px;
  max-height: 450px;
  overflow: auto;
}
.source-block {
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 10px;
  padding: 12px;
  font-size: 11px;
  line-height: 1.65;
}
.source-block strong {
  display: block;
  margin-bottom: 5px;
}
.source-block p {
  white-space: pre-wrap;
  color: #85919c;
  margin: 8px 0;
  max-height: 180px;
  overflow: auto;
}
.source-block a {
  font-size: 10px;
}
.history-row {
  font-size: 11px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  line-height: 1.7;
}
.history-row small {
  font-size: 9px;
  color: var(--muted);
}
.editor-form label {
  font-size: 10px;
  display: block;
  color: #82909c;
  margin-bottom: 12px;
}
.editor-form input,
.editor-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.65;
}
.editor-form textarea {
  min-height: 260px;
  resize: vertical;
}
.editor-note {
  font-size: 10px;
  background: #fff7e8;
  color: #a18143;
  padding: 9px;
  border-radius: 6px;
  margin-bottom: 12px;
  line-height: 1.6;
}
.section-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 17px;
  gap: 12px;
}
.section-toolbar .searchbox {
  max-width: 320px;
}
.section-toolbar .searchbox input {
  height: 36px;
}
.section-toolbar .searchbox svg {
  top: 11px;
}
.section-count {
  font-size: 11px;
  color: #8b99a4;
}
.table-wrap {
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
  font-size: 11px;
}
.data-table th {
  padding: 13px 18px;
  background: #fbfcfd;
  color: #91a0ad;
  font-size: 9px;
  letter-spacing: 0.4px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  color: #748392;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tr:hover td {
  background: #fafcfc;
}
.table-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.table-name strong {
  color: #344858;
  font-weight: 600;
  display: block;
  font-size: 12px;
}
.table-name small {
  font-size: 9px;
  color: #9aa7b1;
  display: block;
  margin-top: 5px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table-actions {
  display: flex;
  gap: 7px;
}
.switch {
  width: 31px;
  height: 18px;
  border: 0;
  background: #dce3e9;
  border-radius: 20px;
  position: relative;
  padding: 0;
  flex-shrink: 0;
}
.switch:after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  left: 3px;
  top: 3px;
  box-shadow: 0 1px 2px #0002;
}
.switch.on {
  background: #249771;
}
.switch.on:after {
  left: 16px;
}
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 17px;
}
.channel-card {
  padding: 21px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.channel-head {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 19px;
}
.channel-avatar {
  background: #e9f3f9;
  color: #4e8db6;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
}
.channel-avatar svg {
  width: 23px;
  height: 23px;
}
.channel-head h3 {
  font-size: 14px;
  margin: 0 0 6px;
}
.channel-head small {
  font-size: 10px;
  color: #96a3af;
}
.channel-head .switch {
  margin-left: auto;
}
.channel-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.channel-stats {
  display: flex;
  gap: 25px;
  border-top: 1px solid var(--line);
  padding: 17px 0;
}
.channel-stats strong {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: #324b5b;
}
.channel-stats small {
  font-size: 10px;
  color: #9aa7b1;
  display: block;
  margin-top: 5px;
}
.channel-footer {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #90a0ad;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.profile-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 23px;
}
.profile-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.profile-top h3 {
  margin: 0;
  font-size: 14px;
  flex: 1;
}
.profile-prompt {
  font-size: 12px;
  line-height: 1.8;
  color: #7c8c98;
  white-space: pre-wrap;
  min-height: 70px;
  margin: 0 0 20px;
}
.profile-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: #99a5ae;
  font-size: 10px;
}
.settings-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 23px;
}
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.settings-nav a {
  font-size: 12px;
  color: #8996a2;
  padding: 11px 13px;
  border-radius: 6px;
}
.settings-nav a.active {
  background: #e9f4ef;
  color: #258062;
  font-weight: 600;
}
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 830px;
}
.form-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 24px;
}
.form-section h2 {
  font-size: 15px;
  margin: 0 0 8px;
  font-weight: 650;
}
.form-section > p {
  font-size: 11px;
  color: #909eaa;
  margin: 0 0 24px;
  line-height: 1.7;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  color: #5f7383;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #dde5eb;
  background: #fff;
  border-radius: 6px;
  font-size: 12px;
  color: #354d5d;
  min-height: 38px;
}
.field textarea {
  resize: vertical;
  line-height: 1.65;
  min-height: 100px;
}
.field small {
  font-size: 10px;
  color: #9ba7b0;
  line-height: 1.6;
}
.field.wide {
  grid-column: 1/-1;
}
.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #5f7383;
  line-height: 1.6;
}
.check-field input {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.check-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.savebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  position: sticky;
  bottom: 12px;
  box-shadow: var(--shadow);
  font-size: 11px;
  color: #9aa7b1;
}
.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 23px;
}
.integration-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  padding: 22px;
}
.integration-icon {
  width: 38px;
  height: 38px;
  background: #eef5fa;
  color: #5887a6;
  display: grid;
  place-items: center;
  border-radius: 9px;
  margin-bottom: 17px;
}
.integration-icon svg {
  width: 21px;
  height: 21px;
}
.integration-card h3 {
  font-size: 14px;
  margin: 0 0 8px;
}
.integration-card p {
  font-size: 11px;
  line-height: 1.7;
  color: #9ba8b2;
  margin: 0 0 16px;
}
.integration-card .tag {
  font-size: 10px;
}
.integration-forms {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
.notice {
  padding: 12px 14px;
  font-size: 11px;
  line-height: 1.7;
  background: #eef5f8;
  color: #698497;
  border-radius: 7px;
  margin-bottom: 18px;
}
.form-error {
  font-size: 11px;
  color: #b05f5f;
  line-height: 1.6;
  margin-top: 9px;
}
.analytics-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}
.chart-panel {
  padding: 22px;
}
.chart-panel h2 {
  font-size: 14px;
  margin: 0 0 6px;
}
.chart-panel p {
  font-size: 11px;
  color: #96a3af;
  margin: 0;
}
.chart {
  height: 230px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 25px 0 25px;
  border-bottom: 1px solid var(--line);
  margin: 12px 0 0;
}
.chart-bar {
  flex: 1;
  min-height: 2px;
  background: #6dc5a5;
  border-radius: 4px 4px 0 0;
  position: relative;
  max-height: 100%;
}
.chart-bar span {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  color: #78978a;
}
.chart-bar small {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8px;
  color: #9aa8b1;
}
.bar-row {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.bar-row > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #718494;
}
.bar-track {
  height: 5px;
  background: #edf2f4;
  border-radius: 5px;
  overflow: hidden;
}
.bar-track i {
  display: block;
  height: 100%;
  background: #72bfa4;
  border-radius: 5px;
}
.audit-panel {
  margin-top: 20px;
}
.audit-detail {
  max-width: 400px;
  white-space: normal;
  line-height: 1.6;
}
.empty-state {
  padding: 55px 24px;
  text-align: center;
  color: #9aa7b0;
  font-size: 12px;
  line-height: 1.8;
}
.empty-state svg {
  width: 29px;
  height: 29px;
  margin-bottom: 14px;
  color: #b4c5d0;
}
.empty-state strong {
  display: block;
  color: #738594;
  font-size: 14px;
  font-weight: 550;
}
.loading-state {
  padding: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #889aa8;
}
.loader {
  width: 18px;
  height: 18px;
  border: 2px solid #dfeae5;
  border-top-color: #21916b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
dialog {
  border: 0;
  padding: 0;
  border-radius: 12px;
  width: min(620px, calc(100vw - 32px));
  max-height: 90vh;
  box-shadow: 0 22px 90px #12273833;
  color: var(--ink);
}
dialog::backdrop {
  background: #10233370;
  backdrop-filter: blur(3px);
}
.modal-header {
  padding: 23px 25px 19px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.modal-header h2 {
  font-size: 19px;
  letter-spacing: -0.3px;
  margin: 0 0 7px;
}
.modal-header p {
  font-size: 11px;
  line-height: 1.7;
  color: #8c9ca8;
  margin: 0;
}
.modal-header .icon-button {
  margin-left: auto;
  flex-shrink: 0;
}
.modal-body {
  padding: 24px 25px;
  max-height: 65vh;
  overflow: auto;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 17px 25px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}
.modal-footer .form-error {
  margin-right: auto;
}
.toast {
  position: fixed;
  bottom: 25px;
  right: 26px;
  padding: 13px 18px;
  border-radius: 8px;
  background: #183e32;
  color: #d4f9e8;
  box-shadow: 0 6px 30px #102d4226;
  max-width: 440px;
  font-size: 12px;
  line-height: 1.65;
  z-index: 100;
  opacity: 0;
  transform: translateY(15px);
  transition: 0.2s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: none;
}
.toast.error {
  background: #71403f;
  color: #ffe9e8;
}
.login-screen {
  position: fixed;
  inset: 0;
  background: #121a24;
  z-index: 200;
  display: grid;
  place-items: center;
}
.login-card {
  background: #fff;
  border-radius: 13px;
  padding: 35px;
  width: min(390px, 90vw);
}
.login-card .brand {
  color: #263c4c;
  padding: 0;
  margin-bottom: 28px;
}
.login-card h1 {
  font-size: 22px;
  margin: 0 0 10px;
}
.login-card p {
  font-size: 12px;
  color: #8a98a4;
  margin-bottom: 25px;
}
.login-card label {
  font-size: 12px;
  display: block;
  color: #718391;
}
.login-card input {
  display: block;
  padding: 12px;
  border: 1px solid #dde5eb;
  border-radius: 6px;
  margin: 8px 0 18px;
  width: 100%;
}
.login-card .button {
  width: 100%;
}
.search-hint {
  font-size: 9px;
  color: #a3afb8;
}
.preview-channel-select {
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px;
  max-width: 150px;
}
.time-remaining {
  font-variant-numeric: tabular-nums;
}
.details-banner {
  font-size: 10px;
  background: #f4f8fa;
  padding: 9px 11px;
  border-radius: 6px;
  line-height: 1.7;
  margin-bottom: 13px;
  color: #8598a5;
}
.link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.integration-form-buttons {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.numeric {
  font-variant-numeric: tabular-nums;
}
.table-title-cell {
  max-width: 290px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.publication-body {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.8;
}
.flex-spacer {
  flex: 1;
}
.inline-message {
  font-size: 10px;
  color: #9a7b49;
  line-height: 1.6;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 10px;
}
svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.source-initial svg {
  width: 12px;
  height: 12px;
}
.mode-banner svg {
  width: 13px;
  height: 13px;
}
.preview-empty svg {
  width: 27px;
  height: 27px;
}
.panel-header > svg {
  color: #95a4ae;
  width: 15px;
  height: 15px;
}
@media (min-width: 1550px) {
  .desk {
    grid-template-columns: minmax(400px, 1fr) 420px;
  }
  .event-list {
    max-height: 740px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 190px;
    padding: 25px 12px 15px;
  }
  .main {
    margin-left: 190px;
    width: calc(100% - 190px);
  }
  .brand {
    font-size: 21px;
  }
  .brand-beta {
    display: none;
  }
  .page-wrap {
    padding: 23px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .mode-banner {
    padding: 9px 22px;
  }
  .desk {
    grid-template-columns: minmax(290px, 1fr) 310px;
    gap: 13px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 15px;
  }
  .heading-actions .button {
    padding: 9px 10px;
    font-size: 11px;
  }
  .metric-spark {
    display: none;
  }
  .filters {
    flex-wrap: wrap;
  }
  .filters .searchbox {
    flex-basis: 100%;
  }
  .integration-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .integration-forms {
    grid-template-columns: 1fr;
  }
  .settings-layout {
    grid-template-columns: 155px 1fr;
  }
  .preview-content {
    padding: 13px;
  }
}
@media (max-width: 900px) {
  .desk {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    position: static;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-heading {
    align-items: flex-start;
  }
  .heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .heading-actions .button {
    font-size: 10px;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .integration-grid {
    grid-template-columns: 1fr;
  }
  .integration-card {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 12px;
    align-items: center;
  }
  .integration-icon {
    grid-row: 1/3;
    margin: 0;
  }
  .integration-card h3 {
    margin: 0;
  }
  .integration-card p {
    grid-column: 2;
    margin: 0;
  }
  .integration-card .tag {
    grid-column: 3;
    grid-row: 1/3;
  }
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
@media (max-width: 640px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 224px;
    box-shadow: 10px 0 40px #142c4530;
  }
  .sidebar.open {
    transform: none;
  }
  .main {
    margin-left: 0;
    width: 100%;
  }
  .topbar {
    padding: 0 16px;
    height: 56px;
  }
  .mobile-menu {
    display: grid;
    flex-shrink: 0;
  }
  .breadcrumb {
    font-size: 10px;
    gap: 7px;
    flex: 1;
  }
  .breadcrumb > span,
  .breadcrumb > strong {
    display: none;
  }
  .topbar-right {
    gap: 0;
    font-size: 10px;
  }
  .topbar-right time,
  .topbar-divider {
    display: none;
  }
  .mode-banner {
    padding: 9px 16px;
    font-size: 10px;
    line-height: 1.5;
    flex-wrap: wrap;
  }
  .mode-banner a {
    margin-left: 0;
  }
  .page-wrap {
    padding: 22px 15px;
  }
  .page-heading {
    display: block;
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .heading-actions {
    justify-content: flex-start;
    margin-top: 17px;
  }
  .heading-actions .button {
    font-size: 11px;
    padding: 9px 12px;
  }
  .metrics {
    gap: 9px;
  }
  .metric {
    padding: 14px;
  }
  .metric-value {
    font-size: 25px;
    margin: 9px 0 6px;
  }
  .metric-label {
    font-size: 10px;
  }
  .metric-foot {
    font-size: 9px;
  }
  .tabs {
    gap: 18px;
  }
  .event-card {
    padding: 16px;
  }
  .event-card h3 {
    font-size: 12px;
  }
  .source-name {
    max-width: 170px;
  }
  .event-list {
    max-height: 520px;
  }
  .source-block {
    font-size: 10px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .form-section {
    padding: 20px;
  }
  .channel-grid {
    grid-template-columns: 1fr;
  }
  .integration-card {
    padding: 17px;
    grid-template-columns: 32px 1fr;
  }
  .integration-card .tag {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
  }
  .integration-icon {
    width: 32px;
    height: 32px;
  }
  .settings-nav {
    display: none;
  }
  .savebar {
    padding: 13px;
  }
  .savebar span {
    font-size: 10px;
    line-height: 1.6;
  }
  .section-toolbar .searchbox {
    max-width: 210px;
  }
  .toast {
    left: 15px;
    right: 15px;
    bottom: 15px;
    max-width: none;
  }
  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .panel-header {
    padding: 15px;
  }
  .page-heading .eyebrow {
    font-size: 8px;
  }
  .preview-detail {
    grid-template-columns: 1fr 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.telegram-photo { display: block; width: 100%; max-height: 280px; object-fit: cover; border-radius: 9px; margin-bottom: 12px; }
.telegram-body a { color: #278091; text-decoration: none; }
.channel-format { min-width: 0; margin: 0 0 28px; padding: 18px; border: 1px solid #cbded5; border-radius: 10px; background: #f7fbf9; }
.channel-format legend { padding: 0 8px; font-size: 15px; font-weight: 650; color: #2c6753; }
.channel-format > p { margin: 0 0 18px; font-size: 12px; color: #6c8278; line-height: 1.6; }
.channel-rules-heading { margin: 0 0 18px; font-size: 14px; color: #354d5d; }
.footer-sample { padding: 12px; background: #fff; border: 1px solid #dde5eb; border-radius: 8px; white-space: pre-wrap; line-height: 1.7; }
.footer-sample a { color: #278091; }
.selection-note { padding: 12px; background: #f7fbf9; border-radius: 8px; font-size: 12px; line-height: 1.6; }
.selection-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.selection-scores div { padding: 10px; border: 1px solid #dde5eb; border-radius: 8px; display: flex; justify-content: space-between; font-size: 12px; }
