:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --line: #d8e1ee;
  --text: #122033;
  --muted: #5d6b82;
  --primary: #2267ff;
  --primary-soft: #e8f0ff;
  --green: #138a4b;
  --red: #c13e4a;
  --shadow: 0 18px 40px rgba(18, 32, 51, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button, input, textarea, select {
  font: inherit;
}

body.locked .app-shell {
  display: none;
}

body.locked .auth-shell {
  display: grid;
}

.auth-shell {
  min-height: 100vh;
  display: none;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(960px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.brand-block h1,
.brand-block h2 {
  margin: 0;
}

.brand-block p {
  margin: 6px 0 0;
  color: var(--muted);
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin: 24px 0 18px;
}

.auth-tabs button,
.nav button,
.ghost-button,
.chat-actions button,
.button-row button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.auth-tabs button.active,
.nav button.active {
  background: var(--primary-soft);
  border-color: #b8cdfc;
  color: var(--primary);
}

.auth-form {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-form.active {
  display: grid;
}

.auth-form label,
.stack-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.auth-form label:last-of-type,
.stack-form label:last-of-type {
  margin-bottom: 2px;
}

.auth-form input,
.stack-form input,
.stack-form textarea,
.stack-form select,
.reply-box textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}

.stack-form textarea { resize: vertical; }
.hidden { display: none !important; }

.primary-button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}

.form-message {
  margin: 0;
  color: var(--red);
}

.form-message.ok {
  color: var(--green);
}

.app-shell {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #111c2e;
  color: #fff;
  padding: 14px 12px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
}

.sidebar .brand-block { gap: 9px; }
.sidebar .brand-mark { width: 38px; height: 38px; border-radius: 10px; font-size: 18px; }
.sidebar .brand-block h2 { font-size: 16px; }
.sidebar .brand-block p { margin-top: 2px; font-size: 11px; }

.sidebar-brand p,
.status-card span {
  color: rgba(255, 255, 255, 0.7);
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.nav button.active {
  background: rgba(34, 103, 255, 0.28);
  border-color: rgba(93, 150, 255, 0.5);
  color: #fff;
}

.status-card {
  align-self: end;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 9px;
  display: flex;
  gap: 8px;
  font-size: 11px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #39c16d;
  margin-top: 6px;
}

.status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.status-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.telegram-status-card {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #f8fafc;
}

.telegram-status-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.telegram-status-head .status-dot {
  margin-top: 0;
}

.main-shell {
  padding: 12px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
}

.topbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-actions .ghost-button { padding: 7px 10px; font-size: 12px; }

.current-user {
  color: var(--muted);
}

.stats-grid {
  margin: 10px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.stats-grid article,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.stats-grid article {
  padding: 9px 12px;
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stats-grid strong {
  display: block;
  margin-top: 0;
  font-size: 22px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 252px minmax(660px, 1fr) 250px;
  gap: 10px;
  align-items: start;
}

.workspace-grid.profile-collapsed {
  grid-template-columns: 252px minmax(0, 1fr);
}

.workspace-grid.profile-collapsed > .profile-panel {
  display: none;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 103px);
  min-height: 620px;
  max-height: none;
  overflow: hidden;
  position: sticky;
  top: 8px;
}

.presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: middle;
}

.presence-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.presence-badge.online { color: #138a4b; background: #e8f8ef; }
.presence-badge.offline { color: #7a8494; background: #edf0f4; }

.customer-page-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

#profile-page-host .profile-panel {
  width: auto;
}

.customer-directory {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  max-height: 72vh;
  overflow: auto;
}

.customer-directory-item {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 12px;
  text-align: left;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.customer-directory-item:hover,
.customer-directory-item.active {
  border-color: #9ebcf8;
  background: var(--primary-soft);
}

.customer-directory-item span,
.customer-directory-item strong,
.customer-directory-item small {
  display: block;
}

.customer-directory-item small {
  margin-top: 3px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel {
  padding: 12px;
}

.panel-head,
.chat-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.conversation-list,
.messages,
.user-list {
  margin-top: 9px;
  overflow: auto;
}

.conversation-list {
  max-height: calc(100vh - 265px);
}

.conversation-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 0 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.conversation-tab {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.conversation-tab.active {
  border-color: #9ebcf8;
  background: var(--primary-soft);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.conversation-tab-main,
.conversation-tab-close {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.conversation-tab-main {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 180px;
  padding: 8px 5px 8px 10px;
  color: var(--text);
}

.conversation-tab-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-tab-main b {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 11px;
  line-height: 18px;
}

.conversation-tab-close { padding: 8px 9px; color: var(--muted); font-size: 17px; }
.conversation-tab-close:hover { color: var(--red); }
.conversation-tabs-empty { color: var(--muted); font-size: 13px; padding: 7px 2px; }

.queue-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 9px;
}

.queue-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 6px 5px;
  cursor: pointer;
  color: var(--muted);
}

.queue-tabs button.active {
  color: var(--primary);
  border-color: #b8cdfc;
  background: var(--primary-soft);
}

.search-input {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}

.conversation-item {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 7px;
  background: #fff;
}

.conversation-item.active {
  border-color: #b8cdfc;
  background: var(--primary-soft);
}

.conversation-item.unread { border-left: 4px solid var(--primary); }
.conversation-item .unread-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 6px;
  color: #fff;
  background: var(--red);
  font-size: 12px;
}

.status-badge { font-size: 12px; color: var(--muted); }
.status-badge.waiting { color: var(--red); }
.status-badge.active { color: var(--green); }

.conversation-item p,
.conversation-item small {
  margin: 5px 0 0;
}

.conversation-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.messages {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding-right: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  user-select: text;
  -webkit-user-select: text;
}

.chat-customer-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin-top: 6px;
  padding: 7px 9px;
  border: 1px solid #c9d8f5;
  border-radius: 10px;
  background: #f4f8ff;
  color: var(--text);
  font-size: 13px;
}

.chat-customer-note span {
  color: var(--primary);
  font-weight: 700;
}

.chat-customer-note strong {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-customer-note.empty strong { color: var(--muted); font-weight: 400; }

.conversation-note {
  display: block;
  color: #9a5a00;
  background: #fff7e6;
  border-radius: 7px;
  padding: 5px 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-location {
  display: block;
  padding: 7px 9px;
  border-radius: 8px;
  color: #31547d;
  background: #eef6ff;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.conversation-location b { color: var(--primary); font-weight: 700; }

.status-badge.ip-blocked {
  color: #9f1239;
  background: #ffe4e6;
}

.danger-button {
  color: #b42318 !important;
  border-color: #fda29b !important;
  background: #fff1f0 !important;
}

.danger-button.blocked {
  color: #067647 !important;
  border-color: #75e0a7 !important;
  background: #ecfdf3 !important;
}

.message {
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  max-width: 80%;
  user-select: text;
  -webkit-user-select: text;
}

.message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}

.message.customer {
  background: #eff4fb;
}

.message.agent {
  background: var(--primary);
  color: #fff;
  margin-left: auto;
}

.message small {
  display: block;
  margin-top: 8px;
  opacity: 0.78;
}

.message.revoked {
  background: #eef1f5;
  color: var(--muted);
  border: 1px dashed var(--line);
}

.message-revoked { font-style: italic; }
.message-read-state { font-weight: 700; }
.message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 8px;
  user-select: none;
  -webkit-user-select: none;
}
.message-copy-button,
.message-revoke-button {
  display: inline-block;
  margin: 0;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  user-select: none;
  -webkit-user-select: none;
}
.message-revoke-button:disabled { opacity: .5; cursor: wait; }

.message-media {
  display: block;
  max-width: min(100%, 520px);
  max-height: 390px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #111827;
}

.message-file { display: block; color: inherit; margin-bottom: 8px; overflow-wrap: anywhere; }
.button-row.compact-actions { margin-top: 0; justify-content: flex-end; }

.reply-box textarea {
  resize: vertical;
  min-height: 92px;
  max-height: 300px;
}

.workspace-grid.profile-collapsed .reply-box textarea { min-height: 110px; }

.profile-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-panel-header h2 { margin: 0; }
.profile-collapse-button { padding: 8px 12px; }

.standalone-settings-page {
  width: min(100%, 1080px);
}

.standalone-settings-page > .panel {
  min-height: 360px;
}

.reply-box {
  flex: 0 0 auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.reply-actions,
.button-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

#reply-state.error {
  color: var(--red);
}

.profile-grid,
.info-list,
.user-list,
.stack-form {
  display: grid;
  gap: 12px;
}

.profile-form,
.profile-extra-fields,
.history-block { margin-top: 16px; }

.profile-panel > .profile-form { margin-top: 10px; }

.profile-note-editor {
  padding: 11px;
  border: 1px solid #b8cdfc;
  border-radius: 12px;
  background: var(--primary-soft);
}

.profile-save-button { width: 100%; }

.quick-reply-buttons {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 8px;
}

.quick-reply-buttons button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #f8fbff;
  color: var(--primary);
  border-radius: 999px;
  padding: 6px 11px;
  cursor: pointer;
}

.quick-reply-buttons button:hover { border-color: var(--primary); }
.quick-reply-empty { color: var(--muted); font-size: 13px; }
.language-picker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}
.language-picker select {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 8px 10px;
}
.chat-body-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 9px;
}
.chat-main-stack {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.quick-reply-sidebar {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: width .2s ease;
}
.quick-reply-sidebar.collapsed {
  width: 42px;
  overflow: hidden;
  padding-left: 8px;
}
.quick-reply-sidebar.collapsed .search-input,
.quick-reply-sidebar.collapsed .quick-reply-group-filter,
.quick-reply-sidebar.collapsed .quick-reply-side-list,
.quick-reply-sidebar.collapsed strong { display: none; }
.quick-reply-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}
.quick-reply-sidebar-head button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  width: 34px;
  height: 34px;
}
.quick-reply-group-filter {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
}
.quick-reply-side-list {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
}
.quick-reply-group { display: grid; gap: 7px; }
.quick-reply-group h4 {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.quick-reply-side-item {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
  cursor: pointer;
}
.quick-reply-side-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.quick-reply-side-item strong,
.quick-reply-side-item small { display: block; }
.quick-reply-side-item small { margin-top: 4px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-stack {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 5000;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}
.message-toast {
  background: #122033;
  color: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 13px 15px;
  animation: toast-in .2s ease-out;
}
.message-toast strong,
.message-toast span { display: block; }
.message-toast span { margin-top: 4px; opacity: .82; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } }

@media (max-width: 1120px) {
  .chat-body-layout { grid-template-columns: minmax(0, 1fr); }
  .quick-reply-sidebar { border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; max-height: 230px; }
  .quick-reply-sidebar.collapsed { width: auto; max-height: 42px; }
}
.quick-reply-form { margin-top: 14px; }
.quick-reply-list { display: grid; gap: 10px; margin-top: 18px; }
.quick-reply-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.quick-reply-row p { margin: 6px 0; white-space: pre-wrap; color: var(--text); }
.quick-reply-row small { color: var(--muted); }
.quick-reply-actions { display: flex; gap: 8px; align-items: flex-start; flex: 0 0 auto; }

.history-block h3 { margin: 0 0 10px; }
.history-list { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.history-item { border-left: 2px solid var(--line); padding: 2px 0 8px 10px; }
.history-item strong, .history-item small { display: block; }
.history-item small { color: var(--muted); margin-top: 3px; }

.profile-grid div,
.info-list div,
.user-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.profile-grid span,
.info-list span,
.user-row span,
.user-row small {
  display: block;
  color: var(--muted);
}

.panel-note {
  color: var(--muted);
  margin: 6px 0 14px;
  line-height: 1.6;
}

.user-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.user-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 7px 10px;
  cursor: pointer;
}

.user-actions button.approve { color: var(--green); border-color: #9bd5b8; }
.user-actions button.reject { color: var(--red); border-color: #e4a7ae; }

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wide-panel {
  grid-column: 1 / -1;
}

pre {
  margin: 0;
  padding: 14px;
  background: #0f172a;
  color: #dbeafe;
  border-radius: 12px;
  overflow: auto;
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.section-heading-row h2 { margin-bottom: 8px; }
.sdk-downloads { flex: 0 0 auto; margin-top: 0; }
.sdk-downloads a { text-decoration: none; white-space: nowrap; }
.sdk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.sdk-grid article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.sdk-grid h3 { margin: 0 0 10px; }
.sdk-grid pre { min-height: 235px; margin-bottom: 12px; }
.sdk-security-note { margin-top: 14px; }

.client-session-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.client-session-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.client-session-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.client-session-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-session-head small { color: var(--muted); }

.channel-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  color: #fff;
  background: #64748b;
}
.channel-chip.app { background: #2563eb; }
.channel-chip.web { background: #059669; }
.channel-chip.telegram { background: #0284c7; }
.channel-chip.api { background: #7c3aed; }

.session-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
}

.session-meta-grid span {
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.session-meta-grid b {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.integration-details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.integration-details summary {
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 12px;
}

.empty-state {
  color: var(--muted);
  padding: 18px 0;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-rows: auto;
  }

  .workspace-grid,
  .customer-page-grid,
  .two-column,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .section-heading-row { display: block; }
  .sdk-downloads { margin-top: 14px; }
  .sdk-grid { grid-template-columns: 1fr; }
  .sdk-grid pre { min-height: 0; }
  .session-meta-grid { grid-template-columns: 1fr; }
  .client-session-head { align-items: flex-start; flex-direction: column; }
  .chat-panel {
    position: static;
    height: 72vh;
    min-height: 520px;
    max-height: none;
  }
}
