:root {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #20372e;
  background: #f4f6f2;
  font-synthesis: none;
  --green: #248264;
  --green-dark: #1a634a;
  --lime: #d8f392;
  --ink: #20372e;
  --muted: #7b867e;
  --line: #e7ece5;
  --panel: #fff;
  --radius: 18px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.58;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9bc9b9;
  outline-offset: 3px;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px #24826412;
}
[hidden] {
  display: none !important;
}
.boot {
  height: 100vh;
  display: grid;
  place-items: center;
}
.loader {
  width: 28px;
  height: 28px;
  border: 3px solid #dbe8de;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 228px;
  background: #172f26;
  color: #cad8cf;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 18px;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 32px;
}
.brand-mark {
  width: 42px;
  height: 46px;
  border-radius: 14px;
  background: var(--lime);
  color: #1a3828;
  display: grid;
  place-items: center;
}
.brand-mark svg {
  width: 27px;
  height: 27px;
}
.brand strong {
  font-size: 20px;
  font-weight: 760;
  letter-spacing: 3px;
  color: white;
  display: block;
  line-height: 1.2;
}
.brand small {
  display: block;
  font-size: 11px;
  margin-top: 5px;
  letter-spacing: 1.5px;
  color: #a3b8aa;
}
.nav-caption {
  font-size: 9px;
  letter-spacing: 1.4px;
  font-weight: 650;
  padding: 0 14px;
  color: #748f7c;
  margin: 10px 0 15px;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav-list a {
  padding: 13px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #9db4a6;
  position: relative;
}
.nav-list a:hover {
  background: #ffffff08;
  color: #fff;
}
.nav-list a.active {
  background: #ffffff0d;
  color: #effcd9;
  font-weight: 600;
}
.nav-list a.active:before {
  content: '';
  position: absolute;
  width: 3px;
  height: 20px;
  border-radius: 4px;
  background: var(--lime);
  left: -18px;
}
.nav-list a svg {
  width: 19px;
  height: 19px;
}
.nav-dot {
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 100%;
  margin-left: auto;
  opacity: 0;
}
.nav-list a.active .nav-dot {
  opacity: 1;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
}
.session-line {
  font-size: 10px;
  color: #99aea0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 15px 12px;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8bddaf;
}
.live-dot.disconnected {
  background: #d4b581;
}
.operator {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  background: #ffffff06;
  border: 1px solid #ffffff08;
  color: #bacabe;
  padding: 12px;
  border-radius: 12px;
  font-size: 11px;
  text-align: left;
}
.operator > svg {
  margin-left: auto;
  width: 16px;
}
.operator-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #35583f;
  color: var(--lime);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}
.main-shell {
  margin-left: 228px;
  padding: 30px 30px 24px;
  max-width: 2000px;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  min-height: 78px;
}
.header-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  letter-spacing: 2px;
  color: #738c79;
  font-weight: 700;
  margin-bottom: 5px;
}
.page-header h1 {
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin: 0;
  font-weight: 650;
}
.page-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.page-actions {
  flex-shrink: 0;
}
.button {
  border: 0;
  background: var(--green);
  color: white;
  border-radius: 9px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 3px 7px #1f735610;
}
.button:hover {
  background: var(--green-dark);
}
.button svg {
  width: 16px;
  height: 16px;
}
.button.secondary {
  background: white;
  border: 1px solid #dfe6dd;
  color: #476051;
  box-shadow: none;
}
.button.secondary:hover {
  background: #f5f8f2;
}
.button.ghost {
  background: transparent;
  color: var(--green);
  box-shadow: none;
  padding: 8px 10px;
}
.button.danger {
  background: #b24842;
}
.button.small {
  padding: 7px 11px;
  font-size: 11px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: #7c8b80;
  padding: 6px;
  border-radius: 7px;
}
.icon-button:hover {
  background: #eef4eb;
  color: var(--green);
}
.icon-button svg {
  width: 17px;
  height: 17px;
}
.icon-button.danger:hover {
  color: #b34e49;
  background: #fff0ef;
}
.mobile-menu {
  display: none;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px 19px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat-icon {
  width: 39px;
  height: 39px;
  background: #edf5e8;
  color: #5e835c;
  display: grid;
  place-items: center;
  border-radius: 12px;
  flex-shrink: 0;
}
.stat:nth-child(2) .stat-icon {
  background: #fff6e7;
  color: #a98940;
}
.stat:nth-child(3) .stat-icon {
  background: #edf1fa;
  color: #7a92b2;
}
.stat:nth-child(4) .stat-icon {
  background: #f2edf7;
  color: #9a81ac;
}
.stat strong {
  display: block;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -1px;
}
.stat small {
  display: block;
  margin-top: 4px;
  color: #879086;
  font-size: 10px;
}
.chat-tabs {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 16px;
}
.tab {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  border: 1px solid #e0e7de;
  background: #fff;
  color: #7c887c;
  border-radius: 8px;
  padding: 9px 13px;
}
.tab svg {
  width: 15px;
  height: 15px;
}
.tab.active {
  color: #fff;
  background: #285e47;
  border-color: #285e47;
  font-weight: 600;
}
.tab .count {
  font-size: 10px;
  border-radius: 4px;
  background: #ffffff20;
  padding: 0 5px;
}
.chat-grid {
  display: grid;
  grid-template-columns: 210px minmax(300px, 1fr) 260px;
  gap: 15px;
  height: calc(100vh - 282px);
  min-height: 535px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  overflow: hidden;
}
.panel-heading {
  padding: 18px 17px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.panel-heading h2 {
  font-size: 12px;
  margin: 0;
  font-weight: 600;
}
.panel-heading .hint {
  font-size: 9px;
  color: #9ca69d;
}
.conversation-panel {
  display: flex;
  flex-direction: column;
}
.conversation-list {
  overflow: auto;
  flex: 1;
  padding: 8px;
}
.conversation {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  background: transparent;
  width: 100%;
  border-radius: 10px;
  padding: 12px 9px;
}
.conversation:hover,
.conversation.active {
  background: #f1f7ed;
}
.conversation .avatar {
  width: 33px;
  height: 33px;
  font-size: 10px;
}
.conversation-copy {
  min-width: 0;
  flex: 1;
}
.conversation-copy strong {
  font-size: 11px;
  font-weight: 600;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.conversation-copy p {
  margin: 2px 0 0;
  font-size: 10px;
  color: #909c91;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.conversation time {
  font-size: 9px;
  color: #9fa89e;
  align-self: flex-start;
}
.small-empty {
  padding: 35px 16px;
  color: #95a191;
  font-size: 11px;
  text-align: center;
}
.feed-panel {
  display: flex;
  flex-direction: column;
}
.feed-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.feed-header h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.feed-header p {
  font-size: 10px;
  color: #98a291;
  margin: 3px 0 0;
}
.search-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  gap: 7px;
  max-width: 240px;
  background: #fcfdfb;
}
.search-field svg {
  width: 14px;
  color: #95a38e;
}
.search-field input {
  width: 100%;
  border: 0;
  box-shadow: none !important;
  background: transparent;
  font-size: 11px;
  padding: 9px 0;
  min-width: 0;
}
.feed-filter {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 20px;
  background: #fafcf8;
  color: #8a9989;
  font-size: 10px;
}
.feed-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 21px;
  scrollbar-width: thin;
}
.day-separator {
  text-align: center;
  font-size: 9px;
  color: #a1ac9d;
  position: relative;
  margin: 10px 0 22px;
}
.message {
  display: flex;
  gap: 10px;
  margin: 0 0 17px;
  max-width: 94%;
  position: relative;
}
.avatar {
  background: #e6eddd;
  color: #6c845e;
  border-radius: 11px;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  font-weight: 650;
  font-size: 10px;
  flex-shrink: 0;
}
.message:nth-of-type(3n) .avatar {
  background: #e4eff1;
  color: #6a8d91;
}
.message-body {
  min-width: 0;
}
.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.message-meta strong {
  font-size: 11px;
  font-weight: 600;
}
.message-meta time {
  font-size: 9px;
  color: #a3aa9c;
}
.channel-tag {
  font-size: 8px;
  color: #91a07f;
  border: 1px solid #e8edde;
  border-radius: 4px;
  padding: 0 5px;
}
.message-text {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 10px 13px;
  background: #f4f7f0;
  border: 1px solid #eff3e9;
  border-radius: 0 11px 11px 11px;
  line-height: 1.65;
  color: #536249;
}
.message.outgoing {
  margin-left: auto;
  flex-direction: row-reverse;
}
.outgoing .message-meta {
  justify-content: flex-end;
}
.outgoing .message-text {
  background: #ecf6ee;
  color: #42674a;
  border-color: #e2efdf;
  border-radius: 11px 0 11px 11px;
}
.outgoing .avatar {
  background: #dfefcd;
}
.message.system {
  max-width: 100%;
  display: block;
  border: 1px solid #f0ecdf;
  background: #fffdf7;
  padding: 10px 13px;
  border-radius: 10px;
}
.system .message-text {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  font-size: 11px;
  color: #a18c5e;
}
.system .message-meta strong {
  color: #ae9668;
}
.message-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.message-footer small {
  font-size: 8px;
  color: #acb4a5;
}
.message-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.message-actions button {
  background: none;
  border: 0;
  color: #8ca17b;
  padding: 2px 3px;
  font-size: 9px;
}
.message-actions button:hover {
  color: #2b7e58;
}
.delivery {
  font-size: 9px;
  color: #85a083;
}
.delivery.failed,
.delivery.rejected {
  color: #b37b70;
}
.delivery.unconfirmed {
  color: #b2a078;
}
.composer {
  padding: 15px 20px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.composer-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 9px;
}
.composer label {
  font-size: 9px;
  color: #8c9987;
  display: block;
  margin-bottom: 4px;
}
.composer select,
.composer input {
  width: 100%;
  background: #fbfcf8;
  border: 1px solid #e6eddf;
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 10px;
  color: #617357;
  min-width: 0;
}
.recipient-row {
  margin-bottom: 9px;
}
.compose-row {
  display: flex;
  border: 1px solid #e2e9da;
  border-radius: 9px;
  padding: 8px;
  gap: 8px;
  background: #fff;
}
.compose-row:focus-within {
  border-color: #88b598;
}
.compose-row textarea {
  border: 0 !important;
  box-shadow: none !important;
  resize: vertical;
  min-height: 43px;
  max-height: 160px;
  width: 100%;
  font-size: 11px;
  padding: 3px 5px;
}
.send-button {
  width: 36px;
  height: 36px;
  align-self: flex-end;
  border-radius: 8px;
  border: 0;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.send-button:hover {
  background: var(--green-dark);
}
.send-button svg {
  width: 17px;
}
.composer-hint {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #a1aa98;
  font-size: 9px;
  margin-top: 7px;
}
.cost-hint {
  margin: 8px 0 0;
  font-size: 9px;
  color: #a28e62;
}
.guild-scope {
  margin: -1px 0 9px;
  padding: 8px 10px;
  border: 1px solid #cfe7d3;
  border-radius: 8px;
  background: #f0f8f1;
  color: #3f7952;
  font-size: 9px;
  line-height: 1.45;
}
.account-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.account-panel .panel-heading {
  flex: 0 0 auto;
  padding: 16px 15px 12px;
}
.account-panel h2 {
  font-size: 9px;
  letter-spacing: 1px;
  color: #92a083;
}
#chat-accounts {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 9px 10px;
  scrollbar-width: thin;
}
.account-mini {
  margin: 0 0 8px;
  padding: 11px;
  border: 1px solid #e7ede2;
  border-radius: 11px;
  background: #fff;
}
.account-mini:last-child {
  margin-bottom: 0;
}
.account-reply-card {
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
.account-reply-card:hover,
.account-reply-card:focus-visible {
  border-color: #cbdcc5;
  background: #f8fbf5;
  box-shadow: 0 6px 18px #264b3210;
  outline: 0;
  transform: translateY(-1px);
}
.account-reply-card.has-unread {
  border-color: #e7c2bd;
  background: #fffafa;
}
.account-mini-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.account-mini-head > svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #9aaa91;
}
.account-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.account-mini-head .avatar {
  background: #f0f4e8;
  color: #8ca277;
}
.account-unread-badge {
  position: absolute;
  top: -7px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #d94f4f;
  color: #fff;
  box-shadow: 0 2px 7px #9d2f2f2e;
  font-size: 8px;
  font-weight: 750;
  line-height: 1;
}
.account-guild-unread-badge {
  position: absolute;
  right: -8px;
  bottom: -7px;
  z-index: 1;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #3b9b61;
  color: #fff;
  box-shadow: 0 2px 7px #246d4138;
  font-size: 8px;
  font-weight: 750;
  line-height: 1;
}
.account-guild-unread-badge:hover,
.account-guild-unread-badge:focus-visible {
  background: #28794a;
  outline: 2px solid #b9dfc5;
  outline-offset: 1px;
}
.account-mini-copy {
  min-width: 0;
  flex: 1;
}
.account-mini strong {
  font-size: 11px;
  display: block;
  font-weight: 600;
}
.account-mini small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  color: #a4ad9c;
}
.account-private-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px;
  margin: 9px 0 0;
  padding: 8px 9px;
  border-radius: 7px;
  background: #f5f8f1;
  color: #899681;
  font-size: 9px;
  line-height: 1.35;
}
.has-unread .account-private-preview {
  background: #fff0ef;
  color: #9b6a65;
}
.account-private-preview strong,
.account-private-preview span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-private-preview strong {
  color: #64765e;
  font-size: 9px;
}
.account-private-preview.empty {
  display: block;
  color: #a9b1a4;
  font-style: italic;
}
.account-mini-info {
  font-size: 10px;
  color: #8fa186;
  margin-top: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
}
.account-mini .status-badge {
  font-size: 8px;
}
.account-mini-error {
  font-size: 9px;
  color: #ae8170;
  line-height: 1.5;
  margin-top: 6px;
}
.panel-bottom {
  padding: 14px;
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
}
.panel-bottom .button {
  width: 100%;
  font-size: 10px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  color: #9b9f98;
  background: #f4f5f2;
  padding: 4px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.status-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status-online {
  color: #3c926b;
  background: #edf8ed;
}
.status-authenticating,
.status-connecting,
.status-reconnecting {
  color: #aa965b;
  background: #fcf8e9;
}
.status-error {
  color: #b36c61;
  background: #fff1ed;
}
.status-paused {
  color: #9a927c;
  background: #f5f2e9;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 55px 25px;
  min-height: 260px;
}
.feed-scroll > .empty-state {
  height: 100%;
}
.empty-visual {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 25px;
  background: #f3f7eb;
  border: 1px solid #e9f0dd;
  color: #a2b991;
  position: relative;
  margin-bottom: 19px;
}
.empty-visual:before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px dashed #e3ead8;
  border-radius: 31px;
}
.empty-visual svg {
  width: 33px;
  height: 33px;
  stroke-width: 1.2;
}
.empty-state h3 {
  font-size: 15px;
  margin: 10px 0 6px;
  font-weight: 600;
  color: #718367;
  max-width: 330px;
}
.empty-state p {
  font-size: 11px;
  color: #a0ac96;
  line-height: 1.7;
  max-width: 330px;
  margin: 0 0 19px;
}
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.section-toolbar h2 {
  font-size: 14px;
  margin: 0;
  font-weight: 600;
}
.section-toolbar p {
  font-size: 11px;
  color: #8b9984;
  margin: 5px 0 0;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 10px;
  font-weight: 500;
  color: #99a38f;
  padding: 14px 22px;
  background: #fbfcf9;
  white-space: nowrap;
}
td {
  padding: 19px 22px;
  border-top: 1px solid #edf1e6;
  vertical-align: middle;
  font-size: 12px;
  min-width: 120px;
}
.table-name {
  display: flex;
  align-items: center;
  gap: 11px;
}
.table-name strong {
  font-size: 12px;
  display: block;
  font-weight: 600;
}
.table-name small,
.table-secondary {
  font-size: 10px;
  display: block;
  color: #a0aa94;
  margin-top: 3px;
}
.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.table-error {
  font-size: 10px;
  max-width: 220px;
  color: #b78676;
  margin-top: 7px;
}
.toggle {
  display: inline-flex;
  position: relative;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
}
.toggle-track {
  width: 31px;
  height: 18px;
  border-radius: 12px;
  background: #dbe1d4;
  padding: 3px;
  transition: background 0.2s;
}
.toggle-track:after {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px #66705722;
}
.toggle input:checked + .toggle-track {
  background: #559977;
}
.toggle input:checked + .toggle-track:after {
  transform: translateX(13px);
}
.toggle input:focus-visible + .toggle-track {
  outline: 3px solid #a2c4a1;
}
.toggle-copy {
  font-size: 11px;
  color: #7d8c74;
}
.catalog-banner {
  background: #eef5e6;
  border: 1px solid #e2ecd7;
  border-radius: 13px;
  padding: 17px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.catalog-banner > .catalog-symbol {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: #e0eccc;
  border-radius: 10px;
  color: #7b9a5f;
}
.catalog-banner strong {
  font-size: 12px;
  font-weight: 600;
  color: #6d845d;
}
.catalog-banner p {
  margin: 3px 0 0;
  color: #93a184;
  font-size: 10px;
}
.catalog-banner .button {
  margin-left: auto;
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.rule-card {
  padding: 23px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px #24463108;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.rule-card:hover {
  border-color: #cfdcc9;
  box-shadow: 0 12px 30px #24463110;
  transform: translateY(-1px);
}
.rule-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.rule-kind {
  font-size: 9px;
  color: #a39574;
  background: #fbf5e8;
  padding: 4px 7px;
  border-radius: 5px;
}
.rule-kind.pass {
  color: #749282;
  background: #edf4ee;
}
.rule-card h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 13px 0 8px;
  letter-spacing: -0.3px;
}
.rule-description {
  font-size: 11px;
  color: #9aa38f;
  margin: 10px 0 7px;
  line-height: 1.65;
  min-height: 18px;
}
.rule-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.rule-summary span {
  padding: 5px 8px;
  border-radius: 7px;
  background: #f2f6ed;
  color: #718966;
  font-size: 9px;
  font-weight: 600;
}
.rule-account-row {
  display: flex;
  align-items: center;
  margin-top: 16px;
  gap: 7px;
  color: #8d9d81;
  font-size: 10px;
}
.rule-account-row .avatar {
  height: 25px;
  width: 25px;
  border-radius: 8px;
  font-size: 8px;
  margin-right: -4px;
  border: 2px solid white;
}
.rule-timing {
  font-size: 10px;
  color: #879b79;
  padding-top: 17px;
  margin-top: 17px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 7px;
}
.rule-timing svg {
  width: 14px;
  height: 14px;
}
.rule-send-count {
  margin-left: auto;
}
.rule-next {
  font-size: 9px;
  color: #b0b79f;
  margin: 5px 0 0 21px;
}
.rule-result {
  font-size: 10px;
  color: #91a082;
  padding: 8px 0 0;
  min-height: 23px;
}
.rule-result.error {
  color: #b58575;
}
.rule-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
}
.rule-actions .spacer {
  flex: 1;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.4fr) minmax(250px, 1fr);
  gap: 20px;
  align-items: start;
}
.settings-card {
  padding: 24px;
}
.settings-card h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.settings-card h2 svg {
  color: #92a481;
  width: 18px;
}
.settings-section + .settings-section {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
}
.field {
  display: block;
  margin-bottom: 18px;
}
.field > span,
.field > label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #708469;
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  border: 1px solid #e1e8db;
  background: #fcfdfb;
  color: #5d7157;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  min-width: 0;
}
.field textarea {
  resize: vertical;
  min-height: 80px;
}
.field small,
.field-hint {
  display: block;
  font-size: 10px;
  color: #a0ab93;
  line-height: 1.7;
  margin-top: 7px;
  font-weight: 400;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.settings-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
}
.settings-note {
  padding: 23px;
}
.telegram-link-card {
  grid-column: 1 / -1;
}
.settings-note h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 10px;
}
.settings-note p {
  font-size: 11px;
  color: #8e9f83;
  line-height: 1.8;
  margin: 0;
}
.settings-note-icon {
  display: inline-grid;
  place-items: center;
  background: #eff5e7;
  color: #8d9f78;
  width: 37px;
  height: 37px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.settings-notes {
  display: grid;
  gap: 18px;
}
.key-indicator {
  display: inline-flex;
  margin-bottom: 14px;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #82996c;
}
.key-indicator svg {
  width: 14px;
}
.key-indicator.missing {
  color: #b09d67;
}
.dialog {
  padding: 0;
  border: 1px solid #e0e9da;
  border-radius: 19px;
  width: 640px;
  max-width: calc(100vw - 32px);
  max-height: 92vh;
  box-shadow: 0 30px 80px #1b362443;
  color: var(--ink);
}
.dialog::backdrop {
  background: #19372655;
  backdrop-filter: blur(3px);
}
.dialog-header {
  padding: 22px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.dialog-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.dialog-body {
  padding: 23px 25px;
  max-height: calc(92vh - 155px);
  overflow: auto;
  scrollbar-width: thin;
}
.dialog-footer {
  padding: 16px 25px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fbfcf9;
}
.dialog .field > span {
  font-size: 11px;
}
.small-dialog {
  width: 390px;
}
.rule-dialog {
  width: 1120px;
  max-height: 94vh;
}
.rule-dialog .dialog-body {
  max-height: calc(94vh - 164px);
}
.rule-dialog-header {
  padding: 19px 24px;
}
.rule-dialog-header > div {
  min-width: 0;
}
.dialog-eyebrow {
  display: block;
  color: #759069;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.1px;
  margin-bottom: 5px;
  text-transform: uppercase;
}
.rule-dialog-header p {
  color: #96a28f;
  font-size: 10px;
  line-height: 1.5;
  margin: 4px 0 0;
}
.rule-dialog-body {
  padding: 18px;
  background: #f5f7f2;
}
.rule-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.82fr);
  align-items: start;
  gap: 16px;
}
.rule-form-main,
.rule-form-aside {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.rule-form-aside {
  position: sticky;
  top: 0;
}
.rule-form-section {
  border: 1px solid #e0e7da;
  border-radius: 13px;
  background: #fff;
  padding: 17px;
  box-shadow: 0 3px 12px #243e2b08;
}
.rule-basics {
  margin-bottom: 16px;
}
.rule-section-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 13px;
  margin-bottom: 15px;
  border-bottom: 1px solid #edf1e9;
}
.rule-section-title > span {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e9f2df;
  color: #5f8252;
  font-size: 10px;
  font-weight: 700;
}
.rule-section-title h3 {
  color: #425640;
  font-size: 13px;
  font-weight: 650;
  margin: 0;
}
.rule-section-title p {
  color: #9ba494;
  font-size: 9px;
  line-height: 1.55;
  margin: 3px 0 0;
}
.rule-basics-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1.2fr);
  gap: 16px;
  align-items: start;
}
.rule-form-section .field {
  margin-bottom: 15px;
}
.rule-form-section .field > span,
.rule-form-section .selector-title {
  color: #657a61;
  font-size: 11px;
}
.rule-form-section .field input,
.rule-form-section .field textarea {
  background: #fff;
  font-size: 12px;
}
.section-last-field,
.rule-basics-grid .field {
  margin-bottom: 0 !important;
}
.account-select-table {
  max-height: 224px;
  overflow: auto;
  border: 1px solid #dfe7d8;
  border-radius: 10px;
  background: #fff;
  scrollbar-width: thin;
}
.account-select-head,
.account-select-row {
  display: grid;
  grid-template-columns: 24px minmax(105px, 1.15fr) minmax(105px, 1.1fr) 82px minmax(90px, 0.9fr);
  align-items: center;
  gap: 10px;
  min-width: 550px;
}
.account-select-head {
  position: sticky;
  z-index: 1;
  top: 0;
  padding: 9px 12px;
  border-bottom: 1px solid #e2e9dc;
  background: #f4f7f1;
  color: #899681;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.2px;
}
.account-select-row {
  min-height: 43px;
  padding: 9px 12px;
  border-bottom: 1px solid #edf1e9;
  color: #667961;
  cursor: pointer;
  font-size: 11px;
  transition: background 0.15s;
}
.account-select-row:last-child {
  border-bottom: 0;
}
.account-select-row:hover {
  background: #f7faf4;
}
.account-select-row:has(input:checked) {
  background: #edf5e5;
  color: #4f7348;
}
.account-select-row:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.48;
}
.account-select-row input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--green);
}
.account-select-row strong,
.account-select-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-select-row strong {
  color: #40543f;
  font-weight: 650;
}
.account-select-username {
  color: #687a64;
}
.account-select-power {
  color: #3f765b;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}
.account-select-server {
  color: #87947e;
}
.top-note,
.clone-note {
  margin: 0 0 16px;
  background: #eef5e7;
  color: #6e8663;
}
.selector-search-wrap {
  position: relative;
}
.selector-search-wrap > svg {
  position: absolute;
  z-index: 1;
  top: 9px;
  left: 10px;
  width: 14px;
  height: 14px;
  color: #91a188;
  pointer-events: none;
}
.selector-search-wrap .selector-search {
  padding-left: 32px;
}
.stage-catalog .catalog-choice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  min-height: 47px;
  gap: 10px;
}
.catalog-choice-copy {
  min-width: 0;
}
.catalog-choice-copy strong,
.catalog-choice-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.catalog-choice-copy strong {
  color: #5e715a;
  font-size: 11px;
  font-weight: 600;
}
.stage-catalog .catalog-choice-copy small {
  margin: 3px 0 0;
}
.stage-catalog .catalog-tip-count {
  margin: 0;
  padding: 4px 7px;
  border-radius: 6px;
  background: #f0f5eb;
  color: #809273;
  white-space: nowrap;
}
.run-settings-section .field {
  margin-bottom: 13px;
}
.compact-fields {
  gap: 10px;
}
.compact-fields .field > span {
  min-height: 30px;
  display: flex;
  align-items: flex-end;
  line-height: 1.45;
}
.aside-hint {
  display: block;
  color: #a0ab93;
  font-size: 9px;
  line-height: 1.5;
  margin: -7px 0 13px;
}
.enable-rule-toggle {
  padding: 11px 12px;
  border: 1px solid #dfe8d7;
  border-radius: 9px;
  background: #f7faf3;
}
.preview-section {
  padding: 0;
  overflow: hidden;
}
.preview-section .preview {
  border: 0;
  border-bottom: 1px solid #e4ebdc;
  border-radius: 0;
  margin: 0;
  padding: 16px 17px;
}
.preview-section .form-note {
  margin: 0;
  border-radius: 0;
  background: #fffaf0;
  padding: 14px 17px;
}
.selector-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #809373;
  font-size: 11px;
  font-weight: 600;
}
.check-list {
  border: 1px solid #e2e9da;
  border-radius: 10px;
  overflow: auto;
  max-height: 170px;
  padding: 6px;
  background: #fcfdfb;
}
.check-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  padding: 8px 9px;
  font-size: 11px;
  color: #788b6b;
  border-radius: 6px;
}
.check-list label:hover {
  background: #f0f6e9;
}
.check-list input {
  accent-color: var(--green);
}
.check-list small {
  color: #a2af95;
  margin-left: auto;
  font-size: 9px;
}
.check-list label:has(input:checked) {
  background: #f0f6e7;
  color: #5c8347;
}
.check-list label:has(input:disabled) {
  opacity: 0.45;
}
.selector-search {
  width: 100%;
  border: 1px solid #e2e9da;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 11px;
  margin-bottom: 7px;
}
.stage-catalog {
  max-height: 230px;
}
.inline-action {
  display: flex;
  gap: 8px;
  align-items: center;
}
.inline-action input {
  flex: 1;
}
.inline-action .button {
  flex-shrink: 0;
}
.stage-wait-grid {
  display: grid;
  gap: 7px;
}
.stage-wait {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto 76px auto;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #e2e9da;
  border-radius: 8px;
  color: #788b6b;
  font-size: 10px;
}
.stage-wait strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-wait small,
.stage-wait em {
  color: #a2af95;
  font-style: normal;
}
.stage-wait input {
  width: 76px;
  padding: 7px 8px;
}
.drop-table {
  border: 1px solid #e2e9da;
  border-radius: 10px;
  overflow: auto;
  max-height: 310px;
  background: #fcfdfb;
}
.drop-row {
  display: grid;
  grid-template-columns: 22px 64px minmax(130px, 1fr) 72px 58px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 8px 10px;
  border-bottom: 1px solid #edf1e8;
  color: #788b6b;
  font-size: 10px;
}
.drop-row:last-child {
  border-bottom: 0;
}
.drop-row:not(.drop-head):hover {
  background: #f0f6e9;
}
.drop-row small {
  color: #a2af95;
}
.drop-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f9f2;
  color: #8d9d81;
  font-weight: 600;
}
.list-placeholder {
  margin: 0;
  padding: 20px;
  text-align: center;
  color: #a2af95;
  font-size: 10px;
}
.selection-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.selection-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 9px;
  color: #80986c;
  background: #eff6e5;
}
.selection-chip button {
  border: 0;
  background: none;
  color: inherit;
  font-size: 12px;
  padding: 0 2px;
}
.form-note {
  padding: 13px 15px;
  border-radius: 10px;
  background: #faf6ea;
  color: #a39778;
  font-size: 10px;
  line-height: 1.7;
  margin: 18px 0 0;
  display: flex;
  gap: 9px;
}
.form-note svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.preview {
  border: 1px dashed #d5e5c4;
  background: #f8fbf2;
  border-radius: 10px;
  padding: 13px 16px;
  color: #829e64;
  font-size: 11px;
  line-height: 1.8;
  margin-top: 17px;
  overflow-wrap: anywhere;
}
.preview strong {
  display: block;
  font-size: 9px;
  color: #a5b793;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.error-inline {
  color: #b77564;
  background: #fff4ee;
  padding: 10px 13px;
  border-radius: 8px;
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.6;
}
.toasts {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 400px;
}
.toast {
  padding: 13px 19px;
  border: 1px solid #dae7d0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 7px 25px #1d3f2417;
  font-size: 12px;
  color: #678254;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.15s ease-out;
}
.toast.error {
  color: #b27463;
  border-color: #edcec2;
}
.toast svg {
  width: 17px;
}
.toast-text {
  line-height: 1.6;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f6f8f2;
}
.auth-hero {
  background: #19392a;
  color: #d5e5c6;
  padding: 9vw 8vw;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-hero:before {
  content: '';
  position: absolute;
  width: 460px;
  height: 460px;
  border: 1px solid #d5e5c612;
  border-radius: 50%;
  top: 16%;
  left: 30%;
}
.auth-hero:after {
  content: '';
  position: absolute;
  width: 620px;
  height: 620px;
  border: 1px solid #d5e5c609;
  border-radius: 50%;
  top: 8%;
  left: 18%;
}
.auth-hero .brand {
  padding: 0 0 72px;
  position: relative;
  z-index: 1;
}
.auth-hero h1 {
  font-size: 44px;
  line-height: 1.25;
  font-weight: 550;
  letter-spacing: -1.5px;
  max-width: 430px;
  margin: 0 0 23px;
  position: relative;
  z-index: 1;
  color: #ecf7dd;
}
.auth-hero p {
  font-size: 14px;
  line-height: 1.9;
  max-width: 350px;
  color: #a1b793;
  position: relative;
  z-index: 1;
}
.auth-hero-icons {
  display: flex;
  gap: 13px;
  margin-top: 43px;
  position: relative;
  z-index: 1;
}
.auth-hero-icons span {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid #bdd7991c;
  display: grid;
  place-items: center;
  color: #a7c580;
  background: #d5e5c605;
}
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.auth-form {
  width: 330px;
}
.auth-form > .brand-mark {
  width: 45px;
  height: 45px;
  margin-bottom: 24px;
  background: #e4edda;
  color: #7a9866;
}
.auth-form h2 {
  font-size: 23px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}
.auth-form > p {
  font-size: 12px;
  color: #99a88b;
  line-height: 1.9;
  margin: 0 0 30px;
}
.auth-form .button {
  width: 100%;
  margin-top: 10px;
  padding: 13px;
}
.auth-form input {
  background: white;
}
.notice-source-tag {
  font-size: 9px;
  color: #a4b591;
}
.activity-level {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 5px;
  color: #8fa476;
  background: #f1f6e9;
  font-size: 10px;
}
.activity-level.success {
  color: #779a70;
  background: #edf7e8;
}
.activity-level.error {
  color: #b7836f;
  background: #fff2e9;
}
.activity-level.warning {
  color: #b09e6a;
  background: #fcf7e8;
}
.activity-row td:nth-child(2) {
  width: 70%;
  font-size: 11px;
}
.activity-row td:first-child {
  white-space: nowrap;
  color: #9bab8e;
  font-size: 10px;
}
.list-footer {
  padding: 12px 20px;
  font-size: 10px;
  color: #a3af98;
  border-top: 1px solid var(--line);
}
.older-button {
  display: block;
  margin: 4px auto 20px;
  font-size: 10px;
  background: #f5f9ee;
  border: 1px solid #e7eedd;
  border-radius: 6px;
  padding: 5px 10px;
  color: #8da376;
}
.dialog .button {
  font-size: 11px;
}
.busy {
  opacity: 0.65;
}
.scroll-note {
  font-size: 10px;
  color: #a5b693;
  padding: 5px 9px;
}
.field:has(input:invalid:not(:placeholder-shown)) {
  color: inherit;
}
@media (min-width: 1550px) {
  .main-shell {
    padding: 35px 38px;
  }
  .chat-grid {
    grid-template-columns: 235px minmax(300px, 1fr) 260px;
  }
  .message {
    max-width: 88%;
  }
  .page-header h1 {
    font-size: 31px;
  }
  .stat {
    padding: 19px 24px;
  }
  .chat-grid {
    height: calc(100vh - 306px);
  }
}
@media (max-width: 1240px) {
  .chat-grid {
    grid-template-columns: 180px minmax(300px, 1fr) 220px;
  }
  .main-shell {
    padding: 25px 23px;
  }
  .stat {
    padding: 15px 12px;
    gap: 10px;
  }
  .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .stat-icon svg {
    width: 17px;
  }
  .stat small {
    font-size: 9px;
  }
  .stats-grid {
    gap: 10px;
  }
  .settings-grid {
    grid-template-columns: 1fr 290px;
  }
  .feed-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
  .feed-header .search-field {
    max-width: none;
    width: 100%;
  }
}
@media (max-width: 1000px) {
  .sidebar {
    width: 194px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .nav-list a {
    font-size: 11px;
    gap: 9px;
  }
  .brand strong {
    font-size: 18px;
  }
  .brand-mark {
    width: 36px;
    height: 40px;
  }
  .brand small {
    font-size: 9px;
  }
  .nav-list a.active:before {
    left: -12px;
  }
  .main-shell {
    margin-left: 194px;
    padding: 22px 20px;
  }
  .chat-grid {
    grid-template-columns: 165px minmax(270px, 1fr);
    gap: 11px;
  }
  .account-panel {
    display: none;
  }
  .stat {
    gap: 8px;
  }
  .stat strong {
    font-size: 21px;
  }
  .stat small {
    font-size: 8px;
  }
  .stat-icon {
    width: 28px;
    height: 30px;
  }
  .chat-tabs {
    gap: 6px;
  }
  .tab {
    font-size: 10px;
    padding: 8px 10px;
    gap: 5px;
  }
  .page-header h1 {
    font-size: 26px;
  }
  .page-header p {
    max-width: 330px;
    line-height: 1.8;
    font-size: 11px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-notes {
    grid-template-columns: 1fr 1fr;
  }
  .rules-grid {
    grid-template-columns: 1fr;
  }
  .conversation {
    padding: 10px 7px;
    gap: 6px;
  }
  .conversation .avatar {
    width: 28px;
    height: 28px;
  }
  .conversation time {
    display: none;
  }
  .feed-scroll {
    padding: 12px 15px;
  }
  .composer {
    padding: 13px 15px;
  }
  .auth-hero h1 {
    font-size: 34px;
  }
  .auth-hero {
    padding: 9vw 7vw;
  }
}
@media (max-width: 780px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 224px;
    box-shadow: 10px 0 25px #162d2719;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-shell {
    margin-left: 0;
    padding: 20px 16px;
  }
  .mobile-menu {
    display: inline-grid;
    padding: 0;
  }
  .header-eyebrow {
    margin-bottom: 8px;
  }
  .page-header {
    margin-bottom: 19px;
    gap: 15px;
  }
  .page-header p {
    font-size: 11px;
    max-width: 380px;
  }
  .page-header h1 {
    font-size: 25px;
  }
  .page-header .button {
    padding: 9px 12px;
    font-size: 10px;
  }
  .stats-grid {
    margin-bottom: 19px;
  }
  .stat {
    padding: 13px 14px;
  }
  .stat small {
    font-size: 9px;
  }
  .stat strong {
    font-size: 22px;
  }
  .stat-icon {
    width: 33px;
    height: 33px;
  }
  .chat-grid {
    height: calc(100vh - 270px);
    grid-template-columns: 190px minmax(240px, 1fr);
    min-height: 565px;
  }
  .chat-tabs {
    flex-wrap: wrap;
    gap: 8px;
  }
  .tab {
    font-size: 11px;
    padding: 8px 11px;
  }
  .settings-card {
    padding: 21px;
  }
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    display: none;
  }
  .auth-form-wrap {
    min-height: 100vh;
    background: #f3f7ed;
  }
  .auth-form {
    max-width: 340px;
    width: 100%;
  }
  .catalog-banner {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }
  .catalog-banner .button {
    font-size: 10px;
  }
  .auth-form-wrap {
    padding: 28px;
  }
  .toasts {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
  .settings-footer {
    flex-wrap: wrap;
  }
}
@media (max-width: 720px) {
  .rule-form-layout,
  .rule-basics-grid {
    grid-template-columns: 1fr;
  }
  .rule-form-aside {
    position: static;
  }
  .rule-dialog-header p {
    max-width: 500px;
  }
  .rule-actions {
    flex-wrap: wrap;
  }
  .rule-actions .spacer {
    display: none;
  }
}
@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .page-header {
    align-items: flex-start;
  }
  .header-copy {
    min-width: 0;
  }
  .page-header p {
    font-size: 10px;
    line-height: 1.8;
  }
  .page-header h1 {
    font-size: 23px;
  }
  .page-header .button svg {
    display: none;
  }
  .page-header .button {
    padding: 9px;
    font-size: 9px;
  }
  .header-eyebrow {
    font-size: 8px;
    letter-spacing: 1.3px;
  }
  .chat-grid {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 345px);
    min-height: 600px;
    gap: 10px;
  }
  .conversation-panel {
    display: none;
    flex-shrink: 0;
  }
  #view[data-filter='private'] .conversation-panel {
    display: flex;
    max-height: 155px;
  }
  .conversation-panel .panel-heading {
    padding: 10px 15px;
  }
  .conversation-list {
    display: flex;
    flex-direction: row;
    gap: 6px;
    min-height: 74px;
  }
  .conversation {
    width: 160px;
    flex-shrink: 0;
  }
  .feed-panel {
    flex: 1;
  }
  .feed-header {
    padding: 15px 17px;
  }
  .feed-scroll {
    padding: 13px 15px;
  }
  .composer-fields {
    gap: 9px;
  }
  .composer {
    padding: 13px;
  }
  .composer select {
    font-size: 9px;
  }
  .composer-hint {
    font-size: 8px;
  }
  .message {
    max-width: 98%;
  }
  .message-text {
    font-size: 11px;
  }
  .empty-state {
    padding: 35px 15px;
  }
  .empty-state h3 {
    font-size: 13px;
  }
  .empty-state p {
    font-size: 10px;
  }
  .empty-visual {
    width: 63px;
    height: 63px;
  }
  .chat-tabs {
    gap: 6px;
  }
  .tab {
    font-size: 9px;
    padding: 8px 9px;
    gap: 4px;
  }
  .tab svg {
    width: 13px;
    height: 13px;
  }
  .stat small {
    font-size: 9px;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .compact-fields .field > span {
    min-height: 0;
  }
  .settings-notes {
    grid-template-columns: 1fr;
  }
  .settings-card h2 {
    font-size: 14px;
  }
  .dialog-header {
    padding: 17px 19px;
  }
  .dialog-header h2 {
    font-size: 16px;
  }
  .dialog-body {
    padding: 18px 19px;
  }
  .dialog-footer {
    padding: 14px 19px;
  }
  .rule-card {
    padding: 20px;
  }
  .section-toolbar {
    padding: 16px 18px;
  }
  .table-error {
    max-width: 165px;
  }
  .catalog-banner {
    padding: 15px;
  }
  .catalog-banner .button {
    width: 100%;
    margin: 3px 0 0;
  }
  .account-mini-error {
    font-size: 9px;
  }
  .message-footer {
    flex-wrap: wrap;
  }
}

.management-page {
  display: grid;
  gap: 15px;
}
.management-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.management-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
}
.management-stat .stat-icon {
  width: 38px;
  height: 38px;
  margin: 0;
}
.management-stat strong,
.management-stat small {
  display: block;
}
.management-stat strong {
  font-size: 20px;
  line-height: 1.15;
}
.management-stat small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.management-page > .panel {
  overflow: hidden;
}
.management-toolbar {
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.management-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(340px, 100%);
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #dfe6dd;
  border-radius: 10px;
  color: #8b9984;
  background: #fbfcf9;
}
.management-search svg {
  width: 16px;
  height: 16px;
}
.management-search input {
  width: 100%;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}
.management-search input:focus {
  box-shadow: none;
}
.management-owner-list {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}
.management-owner {
  border-radius: 13px;
}
.management-owner-header {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto minmax(190px, auto);
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcf9;
}
.management-owner-avatar {
  width: 40px;
  height: 40px;
  font-size: 11px;
}
.management-owner-identity strong,
.management-owner-identity small {
  display: block;
}
.management-owner-identity strong {
  font-size: 13px;
}
.management-owner-identity small,
.management-meta {
  margin-top: 3px;
  color: #89958c;
  font-size: 10px;
}
.management-owner-metrics {
  display: flex;
  align-items: center;
  gap: 18px;
}
.management-owner-metrics span {
  display: grid;
  color: #7f8a80;
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
}
.management-owner-metrics strong {
  color: var(--ink);
  font-size: 15px;
}
.management-owner-telegram {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.management-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 20px;
  background: #f0f2ed;
  color: #7d887e;
  font-size: 10px;
  white-space: nowrap;
}
.management-pill svg {
  width: 13px;
  height: 13px;
}
.management-pill.linked {
  color: #217d5c;
  background: #eaf6ee;
}
.management-owner-telegram .management-meta {
  width: 100%;
  margin: -5px 5px 0 0;
  text-align: right;
}
.management-owner .table-wrap table {
  min-width: 760px;
}
.management-owner .table-wrap th {
  padding-top: 11px;
  padding-bottom: 11px;
}
.management-owner .table-wrap td {
  padding-top: 13px;
  padding-bottom: 13px;
}
.management-owner .table-actions {
  justify-content: flex-start;
}
.management-owner .button {
  padding: 8px 11px;
  font-size: 11px;
}
.management-owner .button svg {
  width: 14px;
  height: 14px;
}
.management-no-accounts,
.management-loading {
  padding: 22px;
  color: #87928a;
  font-size: 12px;
}
.management-security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 3px;
  color: #819086;
  font-size: 10px;
}
.management-security-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
@media (max-width: 920px) {
  .management-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .management-owner-header {
    grid-template-columns: auto minmax(120px, 1fr) auto;
  }
  .management-owner-telegram {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }
  .management-owner-telegram .management-meta {
    width: auto;
    margin: 0;
    text-align: left;
  }
}
@media (max-width: 620px) {
  .management-summary {
    gap: 8px;
  }
  .management-stat {
    gap: 8px;
    padding: 11px;
  }
  .management-stat .stat-icon {
    width: 32px;
    height: 32px;
  }
  .management-stat strong {
    font-size: 17px;
  }
  .management-stat small {
    font-size: 9px;
  }
  .management-toolbar {
    align-items: stretch;
  }
  .management-search {
    width: 100%;
  }
  .management-owner-list {
    padding: 0 10px 12px;
  }
  .management-owner-header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 13px;
  }
  .management-owner-metrics {
    grid-column: 1 / -1;
    justify-content: space-around;
    padding-top: 9px;
    border-top: 1px solid var(--line);
  }
  .management-owner-telegram {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
