:root {
  --bg: #091225;
  --panel: #111d32;
  --panel2: #17253c;
  --line: #2a3b56;
  --text: #f7f9fc;
  --muted: #9fb0c8;
  --blue: #36b8f4;
  --purple: #6657f5;
  --green: #22c997;
  --red: #ff7187;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.5 Inter,
    system-ui,
    sans-serif;
}
.staging-banner {
  height: 32px;
  background: #4c21a8;
  text-align: center;
  padding: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand {
  font: 700 27px Outfit;
}
.brand span {
  color: var(--blue);
}
.brand small {
  display: block;
  color: var(--muted);
  font: 500 13px Inter;
}
.auth-view {
  min-height: calc(100vh - 32px);
  display: grid;
  place-items: center;
}
.auth-card {
  width: min(460px, calc(100% - 32px));
  padding: 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.auth-card h1 {
  font: 700 35px Outfit;
  margin: 18px 0 8px;
}
.auth-card p {
  color: var(--muted);
}
.app-shell {
  min-height: calc(100vh - 32px);
  display: grid;
  grid-template-columns: 250px 1fr;
}
.sidebar {
  padding: 28px 18px;
  background: #142137;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.nav-item {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  cursor: pointer;
}
.nav-item:hover,
.nav-item.active {
  background: #26345d;
  color: #fff;
}
.legacy-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--green);
}
.legacy-note small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.workspace {
  padding: 0 34px 48px;
  min-width: 0;
}
.topbar {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.topbar h1,
.view-head h2 {
  font: 700 32px Outfit;
  margin: 0;
}
.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 700;
}
.account {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}
.view {
  max-width: 1500px;
  margin: auto;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.metrics article {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.metrics span {
  color: var(--muted);
}
.metrics strong {
  display: block;
  font: 700 38px Outfit;
  margin-top: 8px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 20px;
}
.panel h2,
.panel h3 {
  font-family: Outfit;
  margin-top: 0;
}
.view-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 20px;
}
.view-head p {
  margin: 5px 0 0;
  color: var(--muted);
}
.button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 15px;
  color: #fff;
  background: transparent;
  font: 600 13px Inter;
  cursor: pointer;
}
.button.primary {
  background: var(--purple);
  border-color: var(--purple);
}
.button.danger {
  background: #8f2944;
  border-color: #b83b5b;
}
.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.table-wrap {
  overflow: auto;
  padding: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
td small {
  display: block;
  color: var(--muted);
}
tbody tr:hover {
  background: #17243a;
}
.link-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  padding: 0;
}
.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #203350;
  color: #b9c9df;
  font-size: 12px;
}
.pill.qualified,
.pill.lead,
.pill.active,
.pill.converted {
  background: #123d37;
  color: #66e1bc;
}
.pill.not-interested {
  background: #4a2030;
  color: #ff9aac;
}
.filters,
.playground-settings {
  display: grid;
  gap: 12px;
  align-items: end;
}
.filters {
  grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
}
.playground-settings {
  grid-template-columns: repeat(2, minmax(180px, 1fr)) repeat(3, auto);
}
label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d182b;
  color: #fff;
  padding: 11px 12px;
  font: inherit;
}
textarea {
  resize: vertical;
}
label small {
  font-weight: 400;
}
.grid {
  display: grid;
  gap: 14px;
}
.grid.two {
  grid-template-columns: 1fr 1fr;
}
.grid.three {
  grid-template-columns: 1fr 1fr 1fr;
}
dialog {
  width: min(880px, calc(100% - 30px));
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: #fff;
  padding: 24px;
}
dialog::backdrop {
  background: #030817d9;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
}
.dialog-head h2 {
  font: 700 29px Outfit;
  margin: 2px 0;
}
.icon-button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 27px;
  cursor: pointer;
}
dialog form {
  display: grid;
  gap: 15px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.form-status,
.error {
  color: var(--red);
  min-height: 20px;
}
.chat-panel {
  min-height: 460px;
  display: flex;
  flex-direction: column;
}
.voice-session-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 11px 14px;
  border: 1px solid #1b806d;
  border-radius: 10px;
  background: #0d302d;
  color: #bdf4df;
  font-size: 13px;
  font-weight: 600;
}
.voice-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 #2bd3a866;
  animation: voice-pulse 1.5s infinite;
}
@keyframes voice-pulse {
  70% {
    box-shadow: 0 0 0 8px #2bd3a800;
  }
  100% {
    box-shadow: 0 0 0 0 #2bd3a800;
  }
}
.empty {
  margin: auto;
  color: var(--muted);
}
#chat-messages {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}
.message {
  max-width: 78%;
  padding: 12px 15px;
  border-radius: 12px;
  background: var(--panel2);
  white-space: pre-wrap;
}
.message.user {
  margin-left: auto;
  background: #342d75;
}
.message small {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}
#chat-form {
  display: flex;
  gap: 10px;
  margin-top: auto;
}
#chat-input {
  flex: 1;
}
.transcript-message {
  border-left: 3px solid var(--blue);
  padding: 10px 14px;
  margin: 10px 0;
  background: var(--panel2);
}
.transcript-message.user {
  border-color: var(--purple);
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  transform: translateY(100px);
  opacity: 0;
  background: #fff;
  color: #101a2b;
  padding: 12px 17px;
  border-radius: 9px;
  transition: 0.2s;
}
.toast.show {
  transform: none;
  opacity: 1;
}
.form-section {
  display: grid;
  gap: 15px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0d182b;
}
.toggle-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 82px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
  cursor: pointer;
}
.toggle-card input {
  width: 21px;
  height: 21px;
  accent-color: var(--green);
}
.toggle-card span {
  display: grid;
  gap: 3px;
}
.toggle-card strong {
  color: var(--text);
}
.knowledge-upload {
  padding: 20px;
  border: 1px dashed #4a668a;
  border-radius: 12px;
  background: var(--panel2);
}
.widget-branding {
  display: grid;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
}
.section-help {
  margin: -5px 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.logo-upload {
  padding: 16px;
  border: 1px dashed #4a668a;
  border-radius: 10px;
  background: #0d182b;
}
.colour-settings input[type="color"] {
  width: 100%;
  height: 46px;
  padding: 4px;
  cursor: pointer;
}
.toggle-card.compact {
  min-height: 68px;
  padding: 13px;
}
#agent-deployment-fields {
  display: grid;
  gap: 15px;
  margin-top: 15px;
}
@media (max-width: 1000px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .sidebar nav {
    grid-template-columns: repeat(5, 1fr);
  }
  .legacy-note {
    display: none;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .filters {
    grid-template-columns: repeat(3, 1fr);
  }
  .playground-settings {
    grid-template-columns: 1fr 1fr auto;
  }
}
@media (max-width: 650px) {
  .workspace {
    padding: 0 14px 30px;
  }
  .sidebar nav {
    grid-template-columns: 1fr 1fr;
  }
  .topbar {
    align-items: flex-start;
    padding: 20px 0;
  }
  .account {
    align-items: flex-end;
    flex-direction: column;
  }
  .metrics,
  .grid.two,
  .grid.three,
  .filters,
  .playground-settings {
    grid-template-columns: 1fr;
  }
  .view-head {
    align-items: flex-start;
    gap: 12px;
  }
  .staging-banner {
    height: auto;
  }
  .app-shell {
    min-height: 100vh;
  }
}
