:root {
  color-scheme: light;
  --bg: #fff;
  --sidebar: #f7f8fa;
  --surface: #fff;
  --subtle: #f8f9fa;
  --ink: #20242b;
  --muted: #707783;
  --border: #e5e8ec;
  --brand: #157a65;
  --brand-hover: #106450;
  --tint: #eaf5f0;
  --danger: #b94747;
  --focus: #86bbae;
  --blue: #3578cc;
  --shadow: 0 18px 55px #17252e22;
  font-family:
    "Funnel Display",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 14px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181b20;
  --sidebar: #14171c;
  --surface: #1d2128;
  --subtle: #23272f;
  --ink: #edf0f4;
  --muted: #a0a7b2;
  --border: #343a44;
  --brand: #51bca0;
  --brand-hover: #7aceb4;
  --tint: #223c35;
  --danger: #ed9292;
  --focus: #79c7b2;
  --blue: #8ab7f0;
  --shadow: 0 18px 55px #0005;
}
* {
  box-sizing: border-box;
  letter-spacing: 0;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-width: 320px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
input:disabled,
select:disabled {
  background: var(--subtle);
  color: var(--muted);
  cursor: not-allowed;
}
a {
  color: var(--brand);
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
}
h2 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}
h3 {
  font-size: 15px;
  font-weight: 550;
}
svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 1.8;
  pointer-events: none;
}
[hidden] {
  display: none !important;
}
.muted,
.optional {
  color: var(--muted);
  font-size: 13px;
}
.optional {
  font-weight: 400;
  margin-left: 4px;
}
.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 7px;
}
.app-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 24px 14px 12px;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 26px;
  font-weight: 650;
  color: var(--ink);
  padding: 0 10px 24px;
}
.brand-mark {
  width: 31px;
  height: 33px;
  background: var(--brand);
  color: var(--bg);
  border-radius: 7px;
  font-size: 25px;
  display: grid;
  place-items: center;
  line-height: 1;
  font-weight: 600;
}
.brand-dot {
  color: var(--brand);
}
.workspace-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  width: 100%;
  padding: 10px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 25px;
  min-width: 0;
}
.workspace-avatar {
  width: 29px;
  height: 29px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: #eee9f7;
  color: #71618a;
  font-size: 10px;
  flex-shrink: 0;
}
.workspace-switch > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.workspace-switch strong {
  font-size: 12px;
  font-weight: 550;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 126px;
}
.workspace-switch small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  display: block;
}
.workspace-switch svg {
  width: 13px;
  color: var(--muted);
}
.nav-caption {
  font-size: 11px;
  color: var(--muted);
  padding: 0 12px;
  margin: 0 0 9px;
}
.sidebar nav {
  display: grid;
  gap: 3px;
  margin-bottom: 18px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  min-height: 39px;
  border-radius: 5px;
  font-weight: 450;
  font-size: 13px;
  line-height: 1.25;
  min-width: 0;
}
.nav-item svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.nav-item.active {
  background: var(--tint);
  color: var(--brand);
  font-weight: 550;
}
.nav-item.active svg {
  color: var(--brand);
}
.nav-item:hover {
  background: var(--border);
}
.nav-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.connection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  margin-left: auto;
}
.connection-dot.connected {
  background: var(--brand);
}
.sidebar-bottom {
  margin-top: auto;
  padding: 20px 10px 0;
}
.usage-heading,
.sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.usage-heading strong {
  font-weight: 500;
  color: var(--ink);
}
.usage-meter {
  height: 3px;
  background: var(--border);
  margin: 10px 0 20px;
  border-radius: 2px;
  overflow: hidden;
}
.usage-meter span {
  display: block;
  height: 100%;
  background: var(--brand);
  width: 0;
}
.sidebar-foot {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.local-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}
.local-badge > span {
  width: 5px;
  height: 5px;
  background: var(--brand);
  border-radius: 50%;
}
.main-area {
  min-width: 0;
}
.topbar {
  height: 69px;
  padding: 0 36px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
}
.breadcrumb > svg {
  width: 12px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
#save-status {
  font-size: 12px;
  color: var(--muted);
}
#save-status.dirty {
  color: #ad6c27;
}
.page-body {
  padding: 34px 38px 70px;
  max-width: 1440px;
  margin: auto;
}
.section {
  display: none;
}
.section.active {
  display: block;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.primary-button,
.secondary-button,
.icon-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 5px;
  min-height: 35px;
  line-height: 1.3;
  font-weight: 500;
  white-space: nowrap;
  font-size: 13px;
}
.primary-button {
  background: var(--brand);
  color: var(--bg);
  border: 1px solid var(--brand);
  padding: 8px 13px;
}
.primary-button:hover {
  background: var(--brand-hover);
}
.secondary-button {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 8px 12px;
}
.secondary-button:hover,
.icon-button:hover {
  background: var(--subtle);
}
.icon-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  flex-shrink: 0;
}
.icon-button svg {
  width: 16px;
  height: 16px;
}
.text-button {
  background: none;
  border: 0;
  color: var(--brand);
  padding: 6px 0;
}
.text-button svg {
  width: 15px;
}
.danger {
  color: var(--danger);
}
.platform-switch {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px;
  background: var(--subtle);
  gap: 2px;
}
.platform-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: none;
  color: var(--muted);
  height: 34px;
  min-width: 94px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 13px;
}
.platform-switch button[aria-pressed="true"] {
  background: var(--surface);
  box-shadow: 0 1px 3px #00000012;
  color: var(--ink);
}
.platform-letter {
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}
.fiverr {
  color: #229a72;
}
.upwork {
  color: #5b982a;
}
.agent-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 0 25px;
}
.agent-summary > div {
  display: flex;
  align-items: center;
  gap: 13px;
}
.agent-avatar {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  background: var(--tint);
  color: var(--brand);
  border-radius: 8px;
}
.agent-avatar svg {
  width: 22px;
  height: 22px;
}
.agent-summary h2 {
  margin-bottom: 3px;
}
.agent-summary .muted {
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 27px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs > button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 11px 0 15px;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 450;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.tabs > button[aria-selected="true"] {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 550;
}
.tabs svg {
  width: 15px;
  height: 15px;
}
.list-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0 10px;
  height: 36px;
  min-width: 180px;
  width: 260px;
  max-width: 100%;
  color: var(--muted);
}
.search-field:focus-within {
  border-color: var(--focus);
}
.search-field svg {
  width: 16px;
}
.search-field input {
  border: 0;
  background: none;
  padding: 0;
  box-shadow: none;
  outline: none;
  min-width: 0;
  height: 100%;
  width: 100%;
  font-size: 13px;
}
.search-field input:focus-visible {
  outline: 0;
}
.list-toolbar .push {
  margin-left: auto;
}
.filter-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.filter-control select {
  width: auto;
  min-height: 34px;
  padding: 6px 28px 6px 10px;
  font-size: 12px;
}
.filter-control input {
  width: 14px;
  height: 14px;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.library-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-size: 13px;
}
.library-table th {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  padding: 12px 10px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--subtle);
}
.library-table td {
  padding: 19px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.library-table th:first-child,
.library-table td:first-child {
  width: 32px;
  padding-left: 9px;
}
.library-table th:nth-last-child(3) {
  width: 160px;
}
.library-table th:nth-last-child(2) {
  width: 88px;
}
.library-table th:last-child {
  width: 77px;
}
.row-title {
  display: block;
  font-weight: 450;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.row-meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.row-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.row-actions {
  display: flex;
  gap: 2px;
}
.channel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.channel-badge {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 5px;
  white-space: nowrap;
}
.channel-badge.order {
  color: var(--blue);
  background: var(--subtle);
}
.channel-badge.audio {
  color: #93735b;
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 400;
}
.switch input {
  appearance: none;
  width: 29px;
  height: 17px;
  min-width: 29px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #b9bec6;
  position: relative;
  margin: 0;
  cursor: pointer;
}
.switch input:after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
}
.switch input:checked {
  background: var(--brand);
}
.switch input:checked:after {
  transform: translateX(12px);
}
input[type="checkbox"] {
  accent-color: var(--brand);
}
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--tint);
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 12px;
}
.bulk-bar span {
  margin-right: auto;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 65px 20px;
  color: var(--muted);
}
.empty-state > svg {
  width: 32px;
  height: 32px;
  stroke-width: 1.3;
  color: var(--focus);
}
.empty-state h3 {
  font-weight: 450;
}
.list-footer {
  font-size: 11px;
  color: var(--muted);
  padding: 14px 0;
}
.settings-form {
  max-width: 880px;
}
.settings-band {
  border-bottom: 1px solid var(--border);
  padding: 24px 0 30px;
  max-width: 960px;
}
.settings-band:first-child {
  padding-top: 0;
}
.settings-band:last-child {
  border-bottom: 0;
}
.settings-band h2 {
  margin-bottom: 18px;
}
.band-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
}
.band-heading h2 {
  margin: 0;
}
.band-heading > .status-badge {
  margin-left: auto;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 21px;
}
.field-grid .full {
  grid-column: 1/-1;
}
label:not(.switch):not(.search-field):not(.filter-control):not(.check-option) {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
input,
textarea,
select {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 5px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  padding: 9px 11px;
  width: 100%;
  margin: 0;
  min-width: 0;
}
label > input:not([type="checkbox"]),
label > textarea,
label > select {
  display: block;
  margin-top: 8px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  font-weight: 400;
  opacity: 0.8;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
input[type="range"] {
  padding: 0;
  accent-color: var(--brand);
}
input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
}
select {
  min-height: 39px;
}
.switch input[type="checkbox"] {
  width: 29px;
  height: 17px;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:first-child {
  padding-top: 0;
}
.toggle-row:last-child {
  border: 0;
}
.toggle-row > span {
  font-size: 14px;
}
.question-entry {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.question-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}
.question-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  font-size: 14px;
  line-height: 1.5;
}
.question-list li > span:first-child {
  color: var(--muted);
  font-size: 11px;
  min-width: 16px;
}
.question-list li > span:nth-child(2) {
  flex: 1;
  overflow-wrap: anywhere;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  background: var(--tint);
  color: var(--brand);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
}
.status-badge.neutral {
  background: var(--subtle);
  color: var(--muted);
}
.status-badge[data-connected="false"] {
  color: var(--danger);
  background: var(--subtle);
}
.intent-preview {
  padding: 25px 0;
  display: flex;
  align-items: center;
  gap: 13px;
}
.intent-preview svg {
  width: 25px;
  height: 25px;
  color: var(--blue);
}
.intent-preview .text-button {
  margin-left: auto;
}
.compact-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: var(--muted) !important;
  font-size: 12px !important;
}
.compact-label select {
  width: 130px;
  margin: 0;
}
.playground-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  min-height: 500px;
}
.playground-input {
  display: grid;
  gap: 22px;
  align-content: start;
}
.playground-input > .primary-button {
  justify-self: start;
}
.playground-output {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--subtle);
  padding: 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.output-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 13px;
}
.playground-output .empty-state {
  flex: 1;
}
#assistant-output {
  font:
    400 15px/1.8 "Funnel Display",
    sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 20px 0;
  min-height: 260px;
}
#assistant-source {
  margin-top: auto;
  font-size: 11px;
}
.knowledge-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--border);
}
.knowledge-row > .integration-icon {
  width: 34px;
  height: 34px;
  border-radius: 5px;
}
.knowledge-row > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.knowledge-row h3 {
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.integration-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 7px;
  background: var(--tint);
  color: var(--brand);
  flex-shrink: 0;
}
.integration-icon.chrome {
  background: #edf1fb;
  color: #607ca7;
}
.integration-icon.faq {
  background: #f5eef4;
  color: #986b8c;
}
.connection-details {
  display: flex;
  gap: 18px;
  align-items: flex-end;
}
.connection-details label {
  flex: 1;
}
.connection-details input {
  color: var(--muted);
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.form-actions > a {
  margin-right: auto;
  display: flex;
  align-items: center;
  font-size: 12px;
  gap: 5px;
}
.form-actions > a svg {
  width: 14px;
}
#ai-connection-form {
  max-width: 640px;
}
.setup-steps {
  display: flex;
  gap: 0;
  margin-bottom: 35px;
  border-bottom: 1px solid var(--border);
}
.setup-steps button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 15px 24px 15px 0;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
}
.setup-steps button.active {
  color: var(--brand);
  border-color: var(--brand);
}
.setup-steps span {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.setup-steps .active span {
  background: var(--tint);
  border-color: var(--tint);
}
.setup-actions {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 25px;
}
.billing-disclaimer {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 10px;
}
dialog {
  width: 560px;
  max-width: calc(100vw - 32px);
  max-height: 85dvh;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--ink);
  background: var(--surface);
}
dialog::backdrop {
  background: #19252b60;
  backdrop-filter: blur(2px);
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 26px;
  border-bottom: 1px solid var(--border);
}
.dialog-heading h2 {
  font-size: 21px;
}
.dialog-heading .eyebrow {
  font-size: 12px;
}
.dialog-fields {
  display: grid;
  gap: 20px;
  padding: 24px 26px;
  overflow-y: auto;
  max-height: calc(85dvh - 180px);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 17px 26px;
  border-top: 1px solid var(--border);
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
legend {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}
.checkbox-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.check-option {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: calc(50% + 112px);
  transform: translate(-50%, 15px);
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  display: flex;
  gap: 16px;
  align-items: center;
  z-index: 100;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.toast button {
  background: none;
  border: 0;
  color: inherit;
  text-decoration: underline;
  padding: 0;
}
.error-banner {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  background: var(--subtle);
  color: var(--danger);
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.mobile-menu,
.sidebar-overlay {
  display: none;
}
.inline-error {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}
@media (min-width: 1600px) {
  .page-body {
    padding-top: 45px;
  }
  .page-heading {
    margin-bottom: 38px;
  }
}
@media (max-width: 1120px) {
  .topbar {
    padding: 0 24px;
  }
  .page-body {
    padding: 28px 24px 55px;
  }
  .tabs {
    gap: 21px;
  }
  .tabs svg {
    display: none;
  }
  .library-table th:nth-last-child(3) {
    width: 116px;
  }
  .library-table th:nth-last-child(2) {
    width: 64px;
  }
  .library-table td {
    padding: 16px 7px;
  }
  .platform-switch button {
    min-width: 80px;
  }
  .playground-grid {
    gap: 24px;
  }
}
@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 25px 9px 12px;
  }
  .workspace-switch {
    gap: 6px;
  }
  .workspace-switch strong {
    max-width: 107px;
  }
  .tabs {
    gap: 17px;
  }
  .page-body {
    padding: 25px 20px 50px;
  }
  .topbar {
    padding: 0 20px;
  }
  .topbar-actions {
    gap: 10px;
  }
  #save-status {
    display: none;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .playground-grid {
    grid-template-columns: 1fr;
  }
  .playground-output {
    min-height: 320px;
  }
  .list-toolbar .push {
    margin-left: 0;
  }
  .library-table th:nth-last-child(3) {
    width: 85px;
  }
  .connection-details {
    align-items: flex-start;
    flex-direction: column;
  }
  .connection-details label {
    width: 100%;
  }
  .toast {
    left: calc(50% + 95px);
  }
}
@media (max-width: 680px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 224px;
    z-index: 40;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
    visibility: visible;
  }
  body.nav-open {
    overflow: hidden;
  }
  .sidebar-overlay:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: #10182065;
    border: 0;
  }
  .mobile-menu {
    display: inline-flex;
    margin-left: -7px;
  }
  .breadcrumb {
    gap: 6px;
  }
  .breadcrumb > span,
  .breadcrumb > svg {
    display: none;
  }
  .topbar {
    height: 61px;
    padding: 0 20px;
  }
  .topbar .primary-button {
    min-height: 32px;
    padding: 7px 9px;
    font-size: 12px;
  }
  .page-body {
    padding: 25px 20px 45px;
  }
  .page-heading {
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }
  h1 {
    font-size: 26px;
  }
  .page-heading .eyebrow {
    font-size: 12px;
  }
  .platform-switch button {
    min-width: 76px;
    height: 31px;
    padding: 0 10px;
  }
  .platform-switch {
    margin-left: 0;
  }
  .agent-summary {
    padding-bottom: 21px;
  }
  .agent-summary h2 {
    font-size: 16px;
  }
  .agent-summary .muted {
    font-size: 11px;
  }
  .agent-summary .text-button {
    font-size: 12px;
  }
  .agent-avatar {
    width: 36px;
    height: 36px;
  }
  .tabs {
    margin-right: -20px;
    margin-left: -20px;
    padding: 0 20px;
    gap: 22px;
  }
  .tabs > button {
    font-size: 12px;
    padding-bottom: 13px;
  }
  .list-toolbar {
    gap: 10px;
  }
  .search-field {
    width: 100%;
  }
  .filter-control {
    font-size: 11px;
  }
  .list-toolbar .push {
    margin-left: auto;
  }
  .library-table {
    table-layout: auto;
  }
  .library-table thead {
    display: none;
  }
  .library-table tbody {
    display: block;
  }
  .library-table tr {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 38px 69px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
  }
  .library-table td {
    display: block;
    padding: 0;
    border: 0;
  }
  .library-table td:first-child {
    width: auto;
    padding: 7px 0 0;
  }
  .library-table td:nth-child(2) {
    grid-column: 2/5;
    padding-left: 7px;
    padding-right: 3px;
  }
  .library-table td:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    padding: 14px 0 0 7px;
  }
  .library-table td:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
    padding-top: 17px;
  }
  .library-table td:last-child {
    grid-column: 4;
    grid-row: 2;
    padding-top: 10px;
  }
  .row-title {
    font-size: 13px;
  }
  .row-preview {
    font-size: 12px;
  }
  .row-meta {
    font-size: 10px;
  }
  .channel-badge {
    font-size: 9px;
    padding: 2px 4px;
  }
  .channel-list {
    gap: 3px;
  }
  .row-actions .icon-button {
    width: 31px;
  }
  .band-heading {
    flex-wrap: wrap;
    gap: 10px;
  }
  .band-heading > .status-badge {
    margin-left: 0;
  }
  .settings-band {
    padding: 22px 0;
  }
  .field-grid {
    gap: 20px;
  }
  .form-actions {
    flex-wrap: wrap;
  }
  .form-actions > a {
    width: 100%;
    margin-bottom: 3px;
  }
  .intent-preview {
    flex-wrap: wrap;
  }
  .intent-preview .text-button {
    margin-left: 0;
  }
  .setup-steps button {
    padding-right: 16px;
    font-size: 12px;
    gap: 6px;
  }
  .setup-steps span {
    width: 19px;
    height: 19px;
  }
  .toast {
    left: 50%;
    bottom: 15px;
    width: max-content;
  }
  .knowledge-row {
    gap: 9px;
  }
  .knowledge-row > .integration-icon {
    display: none;
  }
  .knowledge-row .row-actions {
    flex-direction: column;
  }
  .dialog-heading,
  .dialog-fields {
    padding: 21px;
  }
  .dialog-actions {
    padding: 16px 21px;
  }
  .bulk-bar {
    flex-wrap: wrap;
    gap: 6px;
  }
  .bulk-bar span {
    width: 100%;
  }
  .playground-output {
    padding: 16px;
  }
  .question-entry {
    gap: 6px;
  }
  .question-entry .primary-button {
    padding: 8px;
  }
  .question-entry input {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.pairing-controls { display: grid; grid-template-columns: auto minmax(0, 1fr) 36px; gap: 10px; align-items: center; margin-top: 18px; }
.pairing-controls input { min-width: 0; }
#pairing-status { font-size: 13px; line-height: 1.5; color: var(--muted, #68756d); margin-top: 10px; }
@media (max-width: 600px) {
  .pairing-controls { grid-template-columns: minmax(0, 1fr) 36px; }
  #create-pairing-code { grid-column: 1 / -1; justify-self: start; }
}
