[hidden] {
  display: none !important;
}
:root {
  --pine: #0f241c;
  --green: #1fa855;
  --amber: #b9862a;
  --paper: #eff2f0;
  --ink: #18342a;
  --muted: #718078;
  --line: #e2e8e3;
  --white: #fff;
  --radius: 18px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f7f9f7;
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #83dca5;
  outline-offset: 4px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: Poppins, Inter, sans-serif;
  letter-spacing: -0.035em;
}
svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button svg,
a svg {
  vertical-align: middle;
}
.sidebar {
  width: 244px;
  position: fixed;
  inset: 0 auto 0 0;
  background: white;
  border-right: 1px solid var(--line);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: block;
  width: 158px;
  margin: 0 0 24px 14px;
}
.brand img {
  display: block;
  width: 100%;
  height: auto;
}
.workspace {
  border: 1px solid var(--line);
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 12px;
  margin-bottom: 30px;
}
.workspace-mark {
  display: grid;
  place-items: center;
  background: var(--paper);
  border-radius: 9px;
  width: 35px;
  height: 35px;
  font-size: 11px;
  font-weight: 700;
}
.workspace strong,
.profile strong {
  font-size: 12px;
  display: block;
}
.workspace small,
.profile small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 600;
  color: #8b978f;
  margin: 0 14px 10px;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.sidebar nav a {
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 9px;
  color: #68776e;
}
.sidebar nav a:hover {
  background: #f4f7f4;
}
.sidebar nav a.active {
  background: #eaf6ee;
  color: #168044;
}
.nav-count {
  margin-left: auto;
  border: 1px solid #cbe8d5;
  border-radius: 5px;
  padding: 0 5px;
  font-size: 10px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 32px;
}
.draft-note {
  font-size: 11px;
  padding: 14px;
  background: #fbfaf6;
  border: 1px solid #eee9dc;
  border-radius: 12px;
  font-weight: 600;
}
.draft-note p {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 400;
  margin: 9px 0 0;
}
.profile {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 20px;
}
.avatar {
  background: #edf1ed;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
}
.main-shell {
  margin-left: 244px;
}
.topbar {
  height: 75px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  background: #ffffffb8;
}
.breadcrumb {
  font-size: 11px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 14px;
  color: #c0cac3;
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
}
.top-actions {
  display: flex;
  gap: 25px;
  align-items: center;
  font-size: 11px;
}
.top-draft {
  color: #8b6824;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
}
.status-dot.amber {
  background: var(--amber);
}
.help-link {
  color: var(--muted);
}
.help-link span {
  margin-left: 8px;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 38px 42px 48px;
  min-height: calc(100vh - 125px);
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  font-weight: 600;
  color: #748679;
  margin-bottom: 8px;
}
h1 {
  font-size: 29px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}
.subheading {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  padding: 11px 16px;
  border-radius: 9px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.button:hover {
  background: #f0f5f1;
}
.button.primary {
  background: var(--pine);
  color: white;
  border-color: var(--pine);
}
.button.primary:hover {
  background: #1b3e2b;
}
.button.green {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.button svg {
  width: 15px;
  height: 15px;
}
.hero {
  background: var(--pine);
  border-radius: var(--radius);
  padding: 35px 34px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 35px;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 23px;
}
.hero:after {
  content: "";
  position: absolute;
  right: -80px;
  top: -150px;
  border: 1px solid #37634466;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  pointer-events: none;
}
.hero .eyebrow {
  color: #85be92;
  display: flex;
  align-items: center;
  gap: 9px;
}
.hero h2 {
  font-size: 32px;
  line-height: 1.3;
  font-weight: 500;
  margin: 18px 0 12px;
  max-width: 400px;
  letter-spacing: -1.1px;
}
.hero h2 em {
  font-style: normal;
  color: #72d493;
}
.hero p {
  font-size: 12px;
  color: #a8bcb0;
  line-height: 1.8;
  max-width: 370px;
  margin-bottom: 23px;
}
.hero .button {
  border: 0;
}
.preview-card {
  align-self: center;
  position: relative;
  z-index: 1;
  background: #183328;
  border: 1px solid #3c5545;
  border-radius: 15px;
  padding: 21px;
}
.preview-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 17px;
  border-bottom: 1px solid #36503f;
  margin-bottom: 17px;
}
.agent-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 11px;
  background: #274634;
  color: #8bdfa8;
}
.preview-top strong {
  display: block;
  font-size: 12px;
}
.preview-top small {
  font-size: 10px;
  color: #a1b7a8;
}
.mini-tag {
  margin-left: auto;
  color: #b7c8bc;
  border: 1px solid #45634e;
  border-radius: 30px;
  padding: 4px 8px;
  font-size: 9px;
}
.preview-message {
  padding: 14px;
  background: #244432;
  border: 1px solid #34563e;
  border-radius: 0 11px 11px;
  font-size: 11px;
  line-height: 1.8;
  color: #d9e9dc;
}
.preview-caption {
  font-size: 9px;
  color: #8eab99;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 20px;
}
.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.stat-label svg {
  color: #8a9b8c;
  width: 17px;
  height: 17px;
}
.stat strong {
  display: block;
  font-family: Poppins, sans-serif;
  font-size: 27px;
  font-weight: 500;
  margin: 8px 0 4px;
}
.stat small {
  font-size: 10px;
  color: #8b978f;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}
.section-title h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
}
.text-link {
  font-size: 11px;
  color: #23814c;
  display: flex;
  gap: 7px;
  align-items: center;
}
.text-link svg {
  width: 14px;
  height: 14px;
}
.lower-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
.panel h2 {
  font-size: 17px;
}
.panel h3 {
  font-size: 14px;
  margin-bottom: 8px;
}
.agent-row {
  display: flex;
  gap: 13px;
  align-items: center;
}
.agent-row .agent-icon {
  background: #edf6ef;
  color: #27844b;
}
.agent-row strong {
  font-size: 12px;
}
.agent-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 500;
  background: #faf3e4;
  color: #92702b;
  border: 1px solid #f0e3c8;
  border-radius: 5px;
  padding: 4px 7px;
  margin-left: auto;
}
.agent-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 22px 0;
  padding: 18px 0;
  border-block: 1px solid var(--line);
}
.agent-details dt {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}
.agent-details dd {
  font-size: 11px;
  margin: 0;
  font-weight: 500;
}
.agent-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
}
.steps {
  display: grid;
  gap: 17px;
  margin-top: 20px;
}
.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.step-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  background: #f0f4f0;
  color: #83948a;
  border-radius: 50%;
  font-size: 10px;
}
.step.done .step-number {
  background: #e6f5eb;
  color: #20894b;
}
.step strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  margin: 2px 0 5px;
}
.step small {
  font-size: 10px;
  color: var(--muted);
}
.progress-track {
  height: 4px;
  background: #eef2ee;
  border-radius: 10px;
  margin-top: 22px;
  overflow: hidden;
}
.progress-track span {
  display: block;
  height: 100%;
  background: var(--green);
}
footer {
  display: flex;
  gap: 20px;
  padding: 20px 42px;
  font-size: 9px;
  color: #8b988f;
  border-top: 1px solid var(--line);
}
footer > span:last-child {
  margin-left: auto;
}
.form-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
}
.form-panel {
  display: grid;
  gap: 20px;
}
.field {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
}
.field small,
.hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
input,
textarea,
select {
  color: var(--ink);
  background: #fafcf9;
  border: 1px solid #dce5de;
  border-radius: 8px;
  padding: 12px;
  width: 100%;
  font-size: 12px;
}
textarea {
  resize: vertical;
  line-height: 1.8;
  min-height: 120px;
}
.form-section-title {
  display: flex;
  gap: 9px;
  align-items: center;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 5px;
}
.form-section-title svg {
  color: var(--green);
}
.rule {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}
.rule:last-child {
  border: 0;
}
.rule small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 11px;
}
.info-box {
  background: #fbf8ef;
  color: #886c2a;
  border: 1px solid #ece2cc;
  border-radius: 10px;
  padding: 15px;
  font-size: 11px;
  line-height: 1.8;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.knowledge-item {
  padding: 17px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.knowledge-item h3 {
  margin: 0 0 7px;
}
.knowledge-item p {
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--muted);
  max-height: 180px;
  overflow: auto;
  margin: 0;
}
.knowledge-item .icon-button {
  height: 32px;
  flex: none;
}
.icon-button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  display: grid;
  place-items: center;
}
.empty {
  padding: 32px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.lab-result {
  margin-top: 20px;
  padding: 18px;
  border: 1px dashed #b4c8b9;
  border-radius: 10px;
  background: #f5f9f4;
  line-height: 1.8;
  font-size: 12px;
}
.connection {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.connection:last-child {
  border: 0;
}
.connection p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 0;
}
.connection strong {
  font-size: 13px;
}
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.privacy-note {
  font-size: 10px;
  line-height: 1.7;
  color: #839188;
  margin-top: 20px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--pine);
  color: #fff;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 50;
  box-shadow: 0 8px 35px #0f241c22;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.mobile-only {
  display: none;
}
@media (min-width: 1500px) {
  main {
    padding-top: 45px;
  }
  .hero {
    padding: 42px;
  }
  .hero h2 {
    font-size: 38px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 215px;
    padding-inline: 14px;
  }
  .main-shell {
    margin-left: 215px;
  }
  main {
    padding: 28px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .hero {
    padding: 26px;
    gap: 22px;
  }
  .hero h2 {
    font-size: 28px;
  }
  .lower-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .hero .preview-card {
    padding: 15px;
  }
  .top-actions {
    gap: 12px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    transition: 0.2s;
    width: 244px;
    box-shadow: 10px 0 50px #0f241c20;
  }
  .sidebar.visible {
    transform: translateX(0);
    top: 65px;
  }
  .main-shell {
    margin-left: 0;
  }
  .topbar {
    height: 65px;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
  }
  .mobile-only {
    display: grid;
  }
  .breadcrumb {
    margin-left: 12px;
    margin-right: auto;
  }
  .breadcrumb span {
    margin: 0 7px;
  }
  .help-link {
    display: none;
  }
  main {
    padding: 24px 18px;
  }
  .page-heading {
    flex-direction: column;
    gap: 14px;
  }
  h1 {
    font-size: 25px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 25px;
    gap: 24px;
  }
  .hero h2 {
    font-size: 29px;
  }
  .hero:after {
    right: -200px;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 14px 10px;
  }
  .stat-label {
    font-size: 9px;
    line-height: 1.5;
  }
  .stat-label svg {
    display: none;
  }
  .stat strong {
    font-size: 24px;
  }
  .stat small {
    font-size: 9px;
  }
  .lower-grid,
  .two-columns {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 20px;
  }
  .form-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .form-actions .button {
    width: 100%;
  }
  footer {
    padding: 18px;
    flex-wrap: wrap;
    gap: 8px;
  }
  footer > span:last-child {
    margin-left: 0;
    width: 100%;
  }
  .top-draft {
    font-size: 9px;
  }
  .section-title {
    gap: 15px;
  }
  .section-title h2 {
    font-size: 15px;
  }
}
.user-dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  width: min(570px, 94vw);
  max-height: 90vh;
  padding: 26px;
  color: var(--ink);
}
.user-dialog::backdrop {
  background: #0f241c80;
}
.user-dialog .field {
  margin-bottom: 14px;
}
.user-photo {
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.edit-error {
  color: #ad3025;
}
body[data-color="blue"] {
  --green: #2463b5;
  --paper: #edf3fa;
}
body[data-color="purple"] {
  --green: #7845ad;
  --paper: #f3eff8;
}
body[data-color="amber"] {
  --green: #91620c;
  --paper: #f8f3e8;
}
body[data-color] {
  background: var(--paper);
}

.agent-picker{display:flex;gap:20px;align-items:center;margin-bottom:24px;flex-wrap:wrap}.agent-picker .field{flex:1;margin:0;min-width:240px}.routing fieldset{border:1px solid var(--line,#dce5df);border-radius:12px;margin:14px 0;padding:16px}.routing legend{font-weight:600;padding:0 8px}.stage-choice{display:flex;align-items:center;gap:8px;margin:12px 0}.stage-choice input{width:18px;height:18px}.stage-choice small{color:var(--muted)}

.agent-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px;margin:24px 0}.agent-card{display:flex;flex-direction:column;gap:18px;transition:box-shadow .2s,transform .2s}.agent-card:hover{transform:translateY(-2px);box-shadow:0 12px 30px #0f241c12}.agent-card-open{background:none;border:0;text-align:left;color:inherit;font:inherit;cursor:pointer;padding:0;flex:1}.agent-card-open h2{margin:18px 0 12px}.agent-card-open p{font-size:13px;color:var(--muted)}.delete-agent{align-self:flex-start;color:#a83232}.card-actions{display:flex;gap:12px}.business-picker{display:flex;gap:10px;align-items:center;font-size:13px}.business-picker select{max-width:230px;padding:10px;border:1px solid #dce5df;border-radius:10px;background:white;color:#0f241c}.business-card{text-align:left;cursor:pointer;font:inherit}.integration-form{margin-top:28px}#trash-results .panel{margin:12px 0}.agent-card-open:focus-visible,.business-card:focus-visible{outline:3px solid #1fa855;outline-offset:6px}

.studio-body:not([data-ready="true"]) .sidebar,.studio-body:not([data-ready="true"]) .main-shell{visibility:hidden}
