:root {
  --ink: hsl(220 25% 15%);
  --muted: hsl(220 9% 46%);
  --line: hsl(220 13% 91%);
  --canvas: hsl(220 20% 97%);
  --purple: #1878d1;
  --purple-soft: #eaf3fc;
  --green: #2c8c70;
  --white: #fff;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  font-size: 14px;
}

/* Central SaaS operations: scoped styles preserve existing client/configuration UX. */
.admin-operations .operations-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.admin-operations .operations-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}
.admin-operations .operations-card > .muted {
  line-height: 1.7;
  font-size: 12px;
}
.admin-operations .operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.admin-operations .operations-wide {
  grid-column: 1 / -1;
}
.admin-operations .operations-scope {
  margin-top: 30px;
}
.admin-operations #operations-fields,
.admin-operations #organization-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.admin-operations .operations-form {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}
.admin-operations .operations-form > button {
  justify-self: start;
}
.admin-operations .operations-form .field-grid {
  gap: 16px;
}

.admin-operations .ai-budget-metrics {
  margin: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-operations .ai-budget-metrics strong {
  font-size: 0.9rem;
}

.admin-operations .ai-readiness {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.admin-operations #organization-fields .field-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}
.admin-operations .operations-checks {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.admin-operations .operations-checks legend {
  color: var(--muted);
  font-size: 11px;
  padding: 0 5px;
}
.admin-operations .operations-list {
  display: grid;
  gap: 10px;
}
.admin-operations .operation-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  min-width: 0;
}
.admin-operations .operation-row > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.admin-operations .operation-row p {
  margin: 5px 0 0;
}
.admin-operations .operation-row button {
  flex-shrink: 0;
}
.admin-operations .operations-secret {
  padding: 18px;
  border: 1px solid #d9b865;
  border-radius: 8px;
  background: #fffaf0;
  margin: 18px 0;
}
.admin-operations .operations-secret h4 {
  margin: 0 0 8px;
}
.admin-operations .operations-secret p {
  font-size: 12px;
  line-height: 1.7;
}
.admin-operations .operations-secret label {
  display: block;
  font-size: 11px;
  margin-bottom: 6px;
}
.admin-operations .operations-secret input {
  width: 100%;
  min-width: 0;
  font-family: ui-monospace, monospace;
  border: 1px solid #c8ae70;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 12px;
  font-size: 12px;
}
.admin-operations .operations-secret .config-actions,
.admin-operations .operation-row .config-actions {
  flex-wrap: wrap;
}
.admin-operations .tag {
  white-space: normal;
}
.account-chip {
  appearance: none;
  cursor: pointer;
  border: 1px solid #ffffff20;
}
.qualification-panel {
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}
.qualification-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.pipeline-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(420px, 1.3fr);
  gap: 18px;
  align-items: start;
}
.lead-list,
.appointment-list {
  display: grid;
  gap: 10px;
}
.lead-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 12px;
  text-align: left;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
}
.lead-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}
.lead-row.selected {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px var(--purple-soft);
}
.lead-editor,
.appointment-form {
  padding: 22px;
}
.lead-editor textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
}
.appointment-form {
  margin-bottom: 16px;
}
.appointment-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.appointment-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.appointment-heading > div {
  display: grid;
  gap: 6px;
}
.business-hours {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
.business-hour {
  display: grid;
  grid-template-columns: 24px 42px 120px 120px;
  gap: 9px;
  align-items: center;
}
.business-hour input[type="time"] {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
}
.qualification-heading h3 {
  margin: 0;
  font-size: 14px;
}
.qualification-heading .eyebrow {
  margin-bottom: 7px;
}
.qualification-answer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.qualification-answer button {
  margin-left: auto;
}
#qualification-form {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}
#qualification-form label {
  font-size: 11px;
  font-weight: 600;
}
#qualification-form input,
#qualification-form select {
  width: 100%;
  min-width: 0;
  border: 1px solid #dce0ea;
  background: #fff;
  border-radius: 7px;
  padding: 10px;
  font-size: 12px;
}
#qualification-form button {
  justify-self: start;
  margin-top: 4px;
}
@media (max-width: 900px) {
  .pipeline-layout {
    grid-template-columns: 1fr;
  }
  .admin-operations .operations-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .admin-operations #organization-fields .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .admin-operations .operations-card {
    padding: 17px;
  }
  .admin-operations .operation-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-operations .operations-form .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .qualification-panel {
    padding: 16px;
  }
  .qualification-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #80baf0;
  outline-offset: 3px;
}
button {
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover:not(:disabled) {
  filter: brightness(0.97);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-weight: 750;
  font-size: 24px;
  letter-spacing: -1px;
  margin-bottom: 42px;
}
.brand-icon {
  display: grid;
  place-items: center;
  background: var(--purple);
  color: white;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  font-size: 34px;
  font-style: italic;
  box-shadow: 0 5px 16px #1878d125;
}
.brand-sub {
  display: block;
  font-size: 8px;
  letter-spacing: 1.5px;
  margin-top: 5px;
  color: var(--muted);
}
.tenant-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 9px;
}
.sidebar select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fafbfc;
  padding: 11px 8px;
  border-radius: 8px;
  color: #515b70;
  font-size: 11px;
  margin-bottom: 28px;
}
nav {
  display: grid;
  gap: 8px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  background: none;
  color: #748093;
  padding: 13px 12px;
  border-radius: 9px;
  font-size: 12px;
}
.nav > span:first-child {
  font-size: 19px;
  width: 20px;
}
.nav.active {
  color: var(--purple);
  background: var(--purple-soft);
  font-weight: 650;
}
.count {
  background: #edf0f5;
  color: #7b8194;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 10px;
}
.nav .count {
  margin-left: auto;
  background: #e0effd;
  color: var(--purple);
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 10px;
  color: #596574;
}
.sidebar-bottom > div {
  margin: 10px 0 0 13px;
  color: #969dab;
  line-height: 1.8;
}
.dot,
.tiny-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4bac8a;
  margin-right: 5px;
}
.tiny-dot {
  margin-left: 6px;
}
main {
  margin-left: 232px;
  padding: 0 34px;
  max-width: 1800px;
}
.topbar {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.breadcrumb {
  color: #8a91a0;
}
.breadcrumb > span:first-child {
  margin: 0 10px;
  color: #bbc0ca;
}
#view-label {
  color: #495367;
}
.sandbox {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1px;
  color: #6e778a;
  background: #ebeff3;
  padding: 8px 11px;
  border-radius: 6px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 25px;
  gap: 20px;
}
.eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--purple);
  margin: 0 0 10px;
}
h1 {
  font-size: 29px;
  letter-spacing: -1px;
  margin: 0 0 10px;
  font-weight: 650;
}
h2 {
  font-size: 15px;
  letter-spacing: -0.2px;
  margin: 0;
}
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
}
.primary,
.secondary {
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.primary {
  background: var(--purple);
  color: white;
  box-shadow: 0 3px 7px #1878d116;
}
.primary span {
  margin-left: 12px;
}
.secondary {
  background: #fff;
  border: 1px solid #dcdfea;
  color: #5e6178;
}
.wide {
  width: 100%;
  margin-top: 10px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.metrics > div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 16px 20px;
}
.metrics span {
  color: var(--muted);
  font-size: 10px;
}
.metrics strong {
  display: block;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -1px;
  margin-top: 9px;
}
.metrics > div:last-child strong {
  font-size: 13px;
  letter-spacing: 0;
  margin-top: 17px;
}
.inbox {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 520px;
  overflow: hidden;
  box-shadow: 0 2px 3px #151e3003;
}
.conversation-list {
  border-right: 1px solid var(--line);
}
.list-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 20px 15px;
}
.list-heading h2 {
  font-size: 13px;
}
.search {
  width: calc(100% - 36px);
  margin: 0 18px 20px;
  background: #f6f7f9;
  border: 1px solid #eff0f4;
  border-radius: 7px;
  padding: 10px 11px;
  font-size: 11px;
}
.conversation-item {
  display: flex;
  gap: 10px;
  text-align: left;
  width: 100%;
  padding: 17px 18px;
  border: 0;
  border-top: 1px solid #f0f1f5;
  background: white;
}
.conversation-item.selected {
  background: #edf5fc;
  border-left: 3px solid var(--purple);
  padding-left: 15px;
}
.avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #eaf3fc;
  display: grid;
  place-items: center;
  color: var(--purple);
  font-weight: 600;
  font-size: 11px;
}
.item-content {
  flex: 1;
  min-width: 0;
}
.item-content strong {
  display: block;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.item-content small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}
.item-time {
  color: #9aa0af;
  font-size: 9px;
}
.empty-list {
  text-align: center;
  font-size: 11px;
  line-height: 1.8;
  color: #969cab;
  padding: 35px 10px;
}
.empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 510px;
  text-align: center;
  padding: 30px;
}
.empty-symbol {
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  border-radius: 20px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 30px;
  margin-bottom: 20px;
}
.empty h2 {
  font-size: 17px;
}
.empty p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 12px;
}
.small-note {
  font-size: 10px;
  line-height: 1.6;
  color: #9198a6;
}
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 21px 24px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.chat-header h2 {
  font-size: 14px;
}
.chat-header p {
  font-size: 10px;
  color: var(--muted);
  margin: 6px 0 0;
}
.context-strip {
  padding: 11px 24px;
  background: #fbfcfd;
  border-bottom: 1px solid #f1f2f5;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 9px;
  color: var(--muted);
}
.state,
.tag {
  font-size: 9px;
  display: inline-block;
  border-radius: 5px;
  padding: 5px 8px;
  background: var(--purple-soft);
  color: var(--purple);
  font-weight: 600;
}
.positive {
  background: #e8f5ee;
  color: var(--green);
}
.messages {
  height: 290px;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.bubble {
  max-width: 85%;
  font-size: 12px;
  line-height: 1.7;
  border-radius: 12px;
  padding: 12px 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  align-self: flex-start;
  background: #f0f2f7;
}
.bubble.customer {
  align-self: flex-end;
  background: #e4effb;
  color: #224b72;
}
.bubble.human {
  background: #e8f4ee;
}
.bubble small {
  display: block;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.4px;
  opacity: 0.65;
  margin-bottom: 4px;
}
.composer {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.composer input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
}
.composer input:disabled {
  background: #fafbfc;
}
.timeline {
  border-top: 1px solid var(--line);
  padding: 14px 24px;
  color: var(--muted);
  font-size: 10px;
}
.timeline summary {
  cursor: pointer;
}
.timeline ol {
  line-height: 2.2;
  padding-left: 17px;
  max-height: 150px;
  overflow: auto;
}
.timeline li {
  font-size: 10px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cards.two {
  grid-template-columns: repeat(2, 1fr);
}
.card,
.architecture-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
}
.card h2 {
  font-size: 17px;
  margin-bottom: 13px;
}
.card p,
.architecture-card p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.card.selected {
  border-color: #9bbddd;
  background: #f8fbfe;
}
.card dl {
  font-size: 11px;
  margin: 20px 0 0;
}
.card dt {
  color: var(--muted);
  margin-top: 14px;
}
.card dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, monospace;
  font-size: 10px;
}
.architecture-card {
  margin-top: 22px;
}
.architecture-card h2 {
  font-size: 15px;
}
.recovery-editor {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
  gap: 20px;
  align-items: start;
}
.recovery-options,
.recovery-settings {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius, 10px);
  padding: 20px;
}
.recovery-options {
  display: grid;
  gap: 10px;
  margin: 0;
}
.recovery-options legend {
  padding: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  color: #465065;
}
.recovery-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
}
.recovery-option:hover,
.recovery-option.selected {
  border-color: #93bde3;
  background: #f5faff;
}
.recovery-option strong,
.recovery-option small {
  display: block;
}
.recovery-option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.recovery-option em {
  color: #7b8494;
  font-size: 9px;
  font-style: normal;
}
.recovery-settings-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 22px;
}
.recovery-feedback {
  min-height: 38px;
  margin: 18px 0;
  padding: 11px 13px;
  border-radius: 7px;
  background: #f3f6f9;
  color: #586579;
  font-size: 10px;
  line-height: 1.6;
}
.recovery-cadence {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 18px;
  color: #586579;
  font-size: 10px;
}
.recovery-cadence strong {
  flex: 0 0 auto;
  color: #354054;
  font-size: 10px;
}
.recovery-actions {
  display: flex;
  gap: 10px;
}
.trigger-settings {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.trigger-settings summary {
  cursor: pointer;
  color: #354054;
  font-size: 11px;
  font-weight: 700;
}
.trigger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 18px;
  margin-top: 14px;
}
.trigger-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #586579;
  font-size: 10px;
}
.queue-tabs,
.work-actions,
.work-facts {
  display: flex;
  align-items: center;
  gap: 9px;
}
.queue-tabs .active {
  border-color: #7eafe0;
  background: #eef7ff;
}
.work-items {
  display: grid;
  gap: 12px;
}
.work-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid #90a5b8;
  border-radius: var(--radius, 10px);
  padding: 18px 20px;
}
.work-card.priority-high {
  border-left-color: #dd9a34;
}
.work-card.priority-urgent {
  border-left-color: #c65c5c;
}
.work-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.work-card-heading h2 {
  margin: 9px 0 4px;
  font-size: 16px;
}
.work-card-heading p {
  margin: 0;
}
.deadline {
  flex: 0 0 auto;
  color: #4b6073;
  font-size: 11px;
}
.deadline.overdue {
  color: #b34343;
}
.work-facts {
  margin: 15px 0;
  color: var(--muted);
  font-size: 10px;
}
.work-facts span + span::before {
  content: "·";
  margin-right: 9px;
}
.work-actions {
  flex-wrap: wrap;
}
.work-note {
  margin: -4px 0 14px;
  padding: 9px 11px;
  border-radius: 7px;
  background: #f5f7f9;
  color: #46566a;
  font-size: 10px;
}
.work-note-input {
  min-width: 220px;
  flex: 1 1 260px;
}
.queue-empty {
  min-height: 280px;
}
.notice {
  background: #eef4fa;
  border: 1px solid #d8e5f0;
  border-radius: 9px;
  padding: 16px 20px;
  margin-bottom: 22px;
  color: #456179;
  font-size: 11px;
  line-height: 1.7;
}
.channel-icon,
.step {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 24px;
  margin-bottom: 22px;
}
.green {
  background: #e8f5ee;
  color: var(--green);
}
.step {
  font-size: 14px;
  font-family: ui-monospace, monospace;
}
footer {
  padding: 23px 0;
  color: #9aa1ae;
  font-size: 9px;
  letter-spacing: 0.2px;
}
footer span {
  margin: 0 10px;
}
.widget {
  position: fixed;
  right: 28px;
  bottom: 25px;
  width: 355px;
  background: white;
  border: 1px solid #d4dfea;
  border-radius: 17px;
  overflow: hidden;
  box-shadow: 0 15px 70px hsl(220 25% 15% / 0.18);
  z-index: 20;
}
.widget-header {
  background: linear-gradient(120deg, #1b3b59, #274d70);
  color: white;
  display: flex;
  align-items: center;
  padding: 20px 17px;
  gap: 12px;
}
.assistant-avatar {
  background: #ffffff22;
  border: 1px solid #ffffff40;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 23px;
}
.widget-header strong {
  font-size: 12px;
  display: block;
}
.widget-header small {
  font-size: 9px;
  opacity: 0.75;
  display: block;
  margin-top: 5px;
}
.widget-header button {
  margin-left: auto;
  background: none;
  border: 0;
  color: white;
  font-size: 25px;
  line-height: 1;
}
.capture-view {
  padding: 25px;
}
.capture-view h2 {
  font-size: 19px;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.capture-view > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.capture-view form > label:not(.consent) {
  display: block;
  font-size: 10px;
  font-weight: 600;
  margin: 18px 0 7px;
}
.capture-view input:not([type="checkbox"]) {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px;
  font-size: 12px;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 10px;
  line-height: 1.65;
  margin-top: 18px;
  color: #667185;
}
.consent input {
  margin: 3px 0 0;
  accent-color: var(--purple);
}
.text-button {
  background: none;
  border: 0;
  color: var(--purple);
  padding: 10px 0;
  font-size: 10px;
}
.capture-view .text-button {
  display: block;
  margin: auto;
}
.widget-messages {
  height: 300px;
  padding: 20px 15px;
}
.widget .bubble {
  font-size: 11px;
}
.widget .composer {
  padding: 12px;
}
.widget .composer .primary {
  padding: 9px 14px;
}
.widget-state {
  font-size: 9px;
  color: #959aa7;
  margin: 0;
  padding: 0 15px 10px;
}
.widget-actions {
  padding: 0 15px 6px;
  display: flex;
  justify-content: space-between;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #25283c;
  color: white;
  border-radius: 9px;
  padding: 13px 22px;
  font-size: 12px;
  z-index: 30;
  max-width: 90vw;
  box-shadow: 0 5px 25px #0002;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.section-caption {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 26px 0 14px;
}
#model-cards .card {
  padding: 20px;
  min-width: 0;
}
#model-cards .card h2 {
  font-size: 15px;
}
#model-cards .card dl {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 9px 14px;
  margin-top: 16px;
}
#model-cards .card dt,
#model-cards .card dd {
  margin: 0;
  font-size: 10px;
}
.candidate-heading {
  justify-content: space-between;
}
.candidate-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.candidate-card {
  padding: 20px;
  min-width: 0;
}
.candidate-card h2 {
  margin-bottom: 8px;
}
.candidate-model {
  display: block;
  color: var(--purple);
  font-size: 10px;
  overflow-wrap: anywhere;
}
.candidate-card dl {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1.2fr);
  gap: 8px 12px;
  margin: 16px 0;
}
.candidate-card dt,
.candidate-card dd {
  margin: 0;
  font-size: 10px;
}
.candidate-apply {
  width: 100%;
}
.evaluation-plan {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.evaluation-plan:empty {
  display: none;
}
.evaluation-plan-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.evaluation-plan-heading h2 {
  margin: 0;
  font-size: 14px;
}
.evaluation-plan-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.evaluation-plan-metric {
  padding-left: 12px;
  border-left: 2px solid #e6e8f0;
}
.evaluation-plan-metric strong,
.evaluation-plan-metric span {
  display: block;
}
.evaluation-plan-metric strong {
  color: var(--ink);
  font-size: 16px;
}
.evaluation-plan-metric span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.configuration {
  margin-top: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  min-width: 0;
}
.configuration-heading {
  padding: 25px 27px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.configuration-heading h2 {
  font-size: 19px;
  margin-bottom: 7px;
}
.config-toolbar {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  background: #f9f9fd;
  padding: 17px 25px;
  border-block: 1px solid var(--line);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 5;
}
.config-version,
.config-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.config-save-state {
  font-size: 10px;
  color: var(--green);
}
.config-save-state.unsaved {
  color: #986013;
}
.config-fields {
  padding: 0;
  border: 0;
  margin: 0;
  min-width: 0;
}
.config-loading {
  padding: 40px 28px;
  color: var(--muted);
}
.config-tabs {
  display: flex;
  gap: 5px;
  padding: 0 23px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.config-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #777c8f;
  padding: 20px 12px 17px;
  font-size: 12px;
  white-space: nowrap;
}
.config-tab.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
  font-weight: 600;
}
.config-panel {
  padding: 28px;
  min-width: 0;
}
.config-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.config-section-head h3 {
  font-size: 16px;
  margin: 0 0 7px;
}
.task-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f6f7fb;
  width: fit-content;
  margin-bottom: 24px;
  max-width: 100%;
}
.task-tab {
  padding: 9px 16px;
  font-size: 11px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #767b8d;
}
.task-tab.active {
  background: #fff;
  color: var(--purple);
  box-shadow: 0 2px 5px hsl(220 25% 15% / 0.04);
  font-weight: 600;
}
.profile-editor {
  min-width: 0;
}
.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}
.full-width {
  grid-column: 1 / -1;
}
.config-field {
  min-width: 0;
}
.config-field label,
.publish-confirm > label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #465065;
  margin-bottom: 8px;
}
.config-field input,
.config-field textarea,
.config-field select,
.publish-confirm > input {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid #dce0ea;
  border-radius: 7px;
  padding: 11px 12px;
  font-size: 12px;
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
}
.config-field textarea {
  resize: vertical;
  min-height: 80px;
}
.config-field input:disabled,
.config-field textarea:disabled,
.config-field select:disabled {
  background: #f6f7fa;
}
.field-help {
  font-size: 10px;
  color: #808899;
  line-height: 1.6;
  margin: 7px 0 0;
}
.advanced {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 18px;
}
.advanced > summary {
  cursor: pointer;
  color: #626c82;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 0;
}
.advanced[open] > summary {
  margin-bottom: 20px;
}
.prices-title {
  font-size: 13px;
  margin: 28px 0 5px;
}
.price-list {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}
.price-row {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
}
.price-row h4 {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}
.price-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.entry-list {
  display: grid;
  gap: 18px;
}
.config-entry {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  background: #fdfdff;
  min-width: 0;
}
.config-entry > .config-field {
  margin-bottom: 18px;
}
.entry-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.entry-heading h4 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #858d9f;
  margin: 0;
}
.remove-button {
  border: 0;
  background: transparent;
  color: #a26068;
  font-size: 10px;
  padding: 5px 0;
}
.config-checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #636d80;
  font-size: 11px;
  line-height: 1.6;
}
.config-checkbox input {
  accent-color: var(--purple);
  margin: 0;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.editor-empty {
  padding: 30px;
  text-align: center;
  border: 1px dashed #dce0ea;
  border-radius: 9px;
  font-size: 12px;
  color: var(--muted);
}
.config-error,
.config-conflict,
.validation-result,
.publish-confirm,
.restore-confirm {
  margin: 20px 25px;
  border: 1px solid #ebd9ba;
  padding: 17px 20px;
  background: #fffaf1;
  border-radius: 9px;
  font-size: 12px;
  color: #7b5e32;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.config-error {
  background: #fff3f2;
  color: #975756;
  border-color: #ecd6d3;
}
.config-conflict p,
.validation-result p {
  margin: 6px 0 0;
}
.validation-result ul {
  padding-left: 20px;
  margin-bottom: 0;
}
.validation-result.valid {
  background: #eff8f3;
  border-color: #d4e9de;
  color: #3f735d;
}
.publish-confirm {
  background: #f0f5fb;
  border-color: #d5e2ef;
  color: #456078;
}
.publish-confirm h3,
.restore-confirm h3,
.release-detail h3 {
  margin: 0 0 9px;
  font-size: 15px;
}
.publish-confirm > input {
  margin-bottom: 15px;
}
.publish-confirm .small-note {
  color: #607589;
}
.restore-confirm {
  margin: 20px 0;
}
.release-list {
  display: grid;
  gap: 12px;
}
.release-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 18px;
}
.release-meta {
  min-width: 0;
}
.release-heading {
  display: flex;
  gap: 12px;
  align-items: center;
}
.release-heading strong {
  font-size: 12px;
}
.release-meta p {
  font-size: 12px;
  margin: 9px 0;
  overflow-wrap: anywhere;
}
.release-meta small {
  color: var(--muted);
  font-size: 10px;
}
.release-detail {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 22px;
  margin-top: 20px;
  background: #fafbfd;
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.release-detail h4 {
  color: #656f82;
  margin-bottom: 8px;
}
.audit-list {
  font-size: 10px;
  line-height: 2;
  color: var(--muted);
  padding-left: 20px;
}
.qualification-preview .field-grid {
  margin: 18px 0;
}
.preview-result {
  background: #f5f6fb;
  border-radius: 8px;
  padding: 16px 18px;
  font-size: 12px;
  line-height: 1.7;
  margin-top: 16px;
}
.preview-result p {
  margin: 7px 0 0;
}
@media (max-width: 1100px) {
  .config-toolbar {
    position: static;
  }
  .release-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  #model-cards .card dl {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  #model-cards .card dt:not(:first-child) {
    margin-top: 9px;
  }
}
@media (max-width: 700px) {
  .configuration-heading,
  .config-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .configuration-heading {
    padding: 20px;
  }
  .config-toolbar {
    padding: 17px 20px;
  }
  .config-panel {
    padding: 20px;
  }
  .config-tabs {
    padding-inline: 10px;
  }
  .field-grid,
  .price-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .task-tab {
    padding: 9px;
    font-size: 10px;
  }
  .task-tabs {
    width: 100%;
  }
  .config-actions {
    gap: 7px;
  }
  .config-actions .primary,
  .config-actions .secondary {
    padding: 10px 12px;
    white-space: normal;
  }
  .section-caption {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .config-error,
  .config-conflict,
  .validation-result,
  .publish-confirm {
    margin-inline: 16px;
  }
  .entry-heading {
    align-items: flex-start;
  }
}

/* UX v0.5 — a central passa de demonstração para estação de trabalho SDR. */
body:not(.admin-page) .header-context {
  padding-top: 8px;
}
body:not(.admin-page) .header-banner {
  padding-top: 13px;
  padding-bottom: 16px;
}
body:not(.admin-page) .header-banner h1 {
  font-size: 21px;
  margin-bottom: 5px;
}
body:not(.admin-page) .header-banner .eyebrow {
  margin-bottom: 7px;
}
body:not(.admin-page) .header-banner .primary {
  min-height: 36px;
}
body:not(.admin-page) .stage-tab {
  padding-top: 8px;
  padding-bottom: 8px;
}
body:not(.admin-page) main {
  padding: 0 18px 18px;
}
body:not(.admin-page) .workspace-breadcrumb {
  padding: 12px 0;
}
body:not(.admin-page) .metrics {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
body:not(.admin-page) .metrics > div {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}
body:not(.admin-page) .metrics > div:last-child {
  border-right: 0;
}
body:not(.admin-page) .metrics span {
  white-space: nowrap;
}
body:not(.admin-page) .metrics strong,
body:not(.admin-page) .metrics > div:last-child strong {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}
body:not(.admin-page) .metrics > div:last-child strong {
  color: var(--green);
  font-size: 10px;
  letter-spacing: 0;
}
body:not(.admin-page) .inbox {
  grid-template-columns: 300px minmax(0, 1fr);
  height: calc(100dvh - 315px);
  min-height: 440px;
}
body:not(.admin-page) .inbox.has-contact {
  grid-template-columns: 280px minmax(420px, 1fr) 320px;
}
.conversation-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  background: #fff;
}
.conversation-list .list-heading {
  padding: 15px 16px 10px;
}
.conversation-list .list-heading .eyebrow {
  margin-bottom: 5px;
  font-size: 7px;
  letter-spacing: 1.2px;
}
.conversation-list .search {
  margin-bottom: 10px;
}
#conversations {
  min-height: 0;
  overflow-y: auto;
}
.conversation-panel {
  min-width: 0;
  min-height: 0;
  background: #fff;
}
#conversation-active {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}
#conversation-active .chat-header {
  flex: 0 0 auto;
}
#conversation-active .context-strip {
  flex: 0 0 auto;
}
#conversation-active .messages {
  height: auto;
  min-height: 240px;
  flex: 1 1 auto;
}
#conversation-active .composer {
  flex: 0 0 auto;
  padding: 12px 16px;
  background: #fff;
}
.contact-rail {
  min-width: 0;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #fafbfc;
}
.contact-summary {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.contact-summary .eyebrow {
  margin-bottom: 6px;
  font-size: 7px;
  letter-spacing: 1.2px;
}
.contact-summary h2 {
  margin-bottom: 16px;
}
.contact-summary dl {
  display: grid;
  gap: 12px;
  margin: 0;
}
.contact-summary dl > div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
}
.contact-summary dt {
  color: var(--muted);
  font-size: 9px;
}
.contact-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
}
.contact-rail .qualification-panel {
  padding: 18px 20px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}
.contact-rail .qualification-heading {
  align-items: flex-start;
}
.contact-rail .qualification-heading .eyebrow {
  margin-bottom: 6px;
  font-size: 7px;
  letter-spacing: 1.2px;
}
.contact-rail #qualification-form {
  margin-top: 13px;
}
.contact-rail .qualification-answer {
  align-items: flex-start;
}
.contact-rail .qualification-answer button {
  margin-left: 0;
}
.contact-rail .timeline {
  padding: 15px 20px;
  border-top: 0;
  background: #fff;
}

@media (max-width: 1180px) {
  body:not(.admin-page) .inbox.has-contact {
    grid-template-columns: 250px minmax(360px, 1fr) 280px;
  }
  body:not(.admin-page) .metrics > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 920px) {
  body:not(.admin-page) .inbox.has-contact {
    grid-template-columns: 240px minmax(0, 1fr);
    height: auto;
  }
  body:not(.admin-page) .contact-rail {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(320px, 1.3fr);
    max-height: 430px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  body:not(.admin-page) .contact-rail .timeline {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  body:not(.admin-page) .header-banner {
    padding-top: 16px;
    padding-bottom: 17px;
  }
  body:not(.admin-page) .metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body:not(.admin-page) .metrics > div,
  body:not(.admin-page) .metrics > div:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  body:not(.admin-page) .metrics > div:nth-child(odd) {
    border-right: 1px solid var(--line);
  }
  body:not(.admin-page) .metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
  body:not(.admin-page) .inbox,
  body:not(.admin-page) .inbox.has-contact {
    display: block;
    height: auto;
    min-height: 0;
  }
  body:not(.admin-page) .conversation-list {
    max-height: 290px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  body:not(.admin-page) #conversation-active .messages {
    min-height: 360px;
    max-height: 52dvh;
  }
  body:not(.admin-page) .contact-rail {
    display: block;
    max-height: none;
  }
}
@media (min-width: 1600px) {
  main {
    padding: 0 50px;
  }
  .inbox {
    min-height: 600px;
  }
  .messages {
    height: 370px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 195px;
    padding: 25px 13px;
  }
  main {
    margin-left: 195px;
    padding: 0 22px;
  }
  .inbox {
    grid-template-columns: 215px 1fr;
  }
  .metrics {
    gap: 10px;
  }
  .metrics > div {
    padding: 15px;
  }
  .cards {
    gap: 12px;
  }
  .card {
    padding: 20px;
  }
  h1 {
    font-size: 25px;
  }
  .page-heading > .primary {
    font-size: 10px;
  }
  .recovery-editor {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .evaluation-plan-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar {
    position: static;
    width: auto;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    margin: 0 0 15px;
    font-size: 22px;
  }
  .brand-sub {
    display: none;
  }
  .tenant-label,
  .sidebar-bottom {
    display: none;
  }
  .sidebar select {
    max-width: 300px;
    margin-bottom: 14px;
  }
  nav {
    display: flex;
    overflow: auto;
    gap: 3px;
  }
  .nav {
    white-space: nowrap;
    padding: 10px;
    font-size: 10px;
  }
  .nav > span:first-child {
    display: none;
  }
  .nav .count {
    margin-left: 5px;
  }
  main {
    margin: 0;
    padding: 0 15px;
  }
  .topbar {
    height: 52px;
  }
  .sandbox {
    font-size: 7px;
  }
  .page-heading {
    align-items: flex-start;
    margin-top: 24px;
    flex-direction: column;
    gap: 14px;
  }
  h1 {
    font-size: 24px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }
  .metrics strong {
    font-size: 23px;
  }
  .inbox {
    display: block;
  }
  .conversation-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  #conversations {
    max-height: 180px;
    overflow: auto;
  }
  .empty {
    min-height: 300px;
  }
  .conversation-item {
    padding: 13px 18px;
  }
  .cards,
  .cards.two {
    grid-template-columns: 1fr;
  }
  .widget {
    width: calc(100% - 24px);
    right: 12px;
    bottom: 12px;
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }
  .widget-messages {
    height: 250px;
  }
  .chat-header {
    padding: 18px 15px;
  }
  .context-strip {
    padding: 11px 15px;
  }
  .composer {
    padding: 12px;
  }
  .messages {
    padding: 18px;
    height: 280px;
  }
  .breadcrumb {
    font-size: 9px;
  }
  footer {
    line-height: 2;
  }
  .capture-view {
    padding: 22px;
  }
  .metrics > div:last-child strong {
    margin-top: 15px;
  }
}

/* FastPipe reference: horizontal dark shell + light, compact operational surface. */
:root {
  --header-dark: hsl(220 18% 8%);
  --header-deep: hsl(220 22% 5%);
  --header-foreground: hsl(40 30% 92%);
  --header-muted: hsl(40 12% 70%);
  --gold: hsl(40 85% 55%);
  --primary-color: hsl(210 80% 48%);
  --purple: var(--primary-color);
  --purple-soft: hsl(210 80% 48% / 0.08);
  --radius: 8px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-feature-settings: "cv11", "ss01";
}
body {
  background: var(--canvas);
}
main {
  margin-left: 0;
  padding: 0 24px;
  max-width: none;
  width: 100%;
  min-width: 0;
}
.platform-header {
  color: var(--header-foreground);
  background:
    radial-gradient(
      ellipse at 84% -10%,
      hsl(40 45% 27% / 0.38),
      transparent 60%
    ),
    linear-gradient(115deg, var(--header-deep), var(--header-dark));
}
.app-header {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 12px 24px;
  border-bottom: 1px solid #ffffff14;
  background: #ffffff04;
}
.app-header .brand {
  margin: 0;
  font-size: 22px;
  color: #fff;
  gap: 10px;
  letter-spacing: -0.8px;
}
.brand-icon {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  background: var(--gold);
  color: #15120c;
  box-shadow: none;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -2px;
  font-style: italic;
}
.app-header .brand-sub {
  color: var(--header-muted);
  font-size: 7px;
  letter-spacing: 1.4px;
}
.app-header nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}
.app-header .nav {
  padding: 9px 13px;
  font-size: 12px;
  color: var(--header-muted);
  border-radius: 6px;
  font-weight: 500;
  white-space: nowrap;
}
.app-header .nav.active,
.app-header .nav:hover {
  color: #fff;
  background: #ffffff12;
}
.account-chip,
.header-button {
  font-size: 11px;
  color: var(--header-foreground);
  border: 1px solid #ffffff20;
  border-radius: 7px;
  padding: 9px 12px;
  background: #ffffff06;
}
.header-button {
  margin-left: auto;
}
.header-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 24px 0;
  color: var(--header-muted);
  font-size: 10px;
}
.tenant-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.tenant-picker label {
  font-size: 10px;
}
.tenant-picker select {
  border: 1px solid #ffffff25;
  color: var(--header-foreground);
  background: #ffffff09;
  border-radius: 6px;
  font-size: 11px;
  padding: 6px 10px;
  max-width: 280px;
}
.tenant-picker option {
  color: var(--ink);
  background: #fff;
}
.header-banner {
  padding: 23px 24px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.header-banner h1 {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin: 0 0 9px;
}
.header-banner .eyebrow {
  color: var(--gold);
  font-size: 8px;
  margin-bottom: 10px;
}
.header-banner p:not(.eyebrow) {
  color: var(--header-muted);
  font-size: 11px;
  margin: 0;
  line-height: 1.7;
}
.header-banner .primary {
  background: var(--primary-color);
  border: 1px solid #ffffff16;
}
.stage-tabs {
  display: flex;
  gap: 5px;
  padding: 0 24px;
  overflow-x: auto;
}
.stage-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  padding: 10px 14px;
  border: 1px solid #ffffff1a;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #ffffff12;
  color: var(--header-foreground);
  font-size: 11px;
}
.stage-tab.active {
  background: var(--canvas);
  color: var(--ink);
  border-color: var(--line);
}
.stage-tab .count {
  background: hsl(210 80% 48% / 0.12);
  color: var(--primary-color);
  border-radius: 12px;
}
.stage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(210 80% 48%);
}
.stage-dot.amber {
  background: hsl(38 92% 50%);
}
.stage-dot.green {
  background: hsl(142 71% 45%);
}
.workspace-breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 19px 0;
  font-size: 10px;
  color: var(--muted);
}
.workspace-breadcrumb #view-label {
  color: var(--ink);
}
.metrics {
  gap: 12px;
  margin-bottom: 18px;
}
.metrics > div {
  border-radius: var(--radius);
  padding: 14px 17px;
}
.metrics strong {
  font-size: 25px;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.metrics > div:last-child strong {
  margin-top: 12px;
}
.primary,
.secondary {
  border-radius: 6px;
  padding: 9px 13px;
  min-height: 34px;
  box-shadow: none;
  font-size: 11px;
}
.primary {
  background: var(--primary-color);
}
.secondary {
  color: hsl(220 25% 25%);
  border-color: var(--line);
}
.card,
.architecture-card,
.inbox,
.configuration {
  border-radius: var(--radius);
  box-shadow: none;
}
.inbox {
  grid-template-columns: 300px 1fr;
  min-height: 530px;
}
.list-heading {
  padding: 17px 17px 12px;
}
.search {
  margin: 0 16px 14px;
  width: calc(100% - 32px);
}
.conversation-item {
  padding: 13px 16px;
  gap: 10px;
}
.conversation-item.selected {
  border-left-color: var(--primary-color);
  background: hsl(210 80% 48% / 0.05);
  padding-left: 13px;
}
.avatar {
  border-radius: 6px;
  background: hsl(210 80% 48% / 0.08);
  color: var(--primary-color);
}
.chat-header {
  padding: 17px 21px;
}
.context-strip {
  padding: 10px 21px;
}
.messages {
  height: 335px;
}
.bubble {
  border-radius: 8px;
}
.bubble.customer {
  color: #1e4c76;
  background: #e4effb;
}
.empty {
  min-height: 520px;
}
.empty-symbol {
  background: hsl(210 80% 48% / 0.08);
  color: var(--primary-color);
  border-radius: 12px;
}
.widget {
  border-radius: 10px;
}
.widget-header {
  background: linear-gradient(110deg, #14212e, #284661);
}
.tag {
  border-radius: 5px;
}
.notice {
  background: #edf3f9;
  border-color: #dbe7f2;
  color: #486176;
  border-radius: var(--radius);
}
.page-heading {
  margin: 10px 0 20px;
}
.page-heading h1 {
  font-size: 24px;
}
.config-toolbar {
  position: static;
}
.config-panel {
  padding: 22px;
}
.configuration-heading {
  padding: 22px;
}
.config-entry {
  padding: 18px;
  border-radius: var(--radius);
}
.config-tab {
  padding: 17px 11px 14px;
}
.config-field input,
.config-field textarea,
.config-field select {
  border-radius: 6px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 5px 0 18px;
}
.section-heading h2 {
  font-size: 18px;
  margin-bottom: 7px;
}
.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 17px;
  margin-bottom: 22px;
}
.filter-field {
  min-width: 140px;
  max-width: 300px;
}
.filter-field label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 7px;
}
.filter-field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  color: var(--ink);
  background: #fff;
}
#metrics-scope {
  margin-left: auto;
  align-self: center;
  max-width: 350px;
}
.overview-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.overview-metrics strong,
.overview-metrics > div:last-child strong {
  font-size: 24px;
  margin: 9px 0;
  letter-spacing: -0.6px;
}
.overview-metrics small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}
.metric-card {
  min-width: 0;
}
.quality-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 18px 0;
}
.quality-summary > div:first-child {
  max-width: 550px;
}
.quality-summary h3 {
  margin: 0 0 7px;
  font-size: 16px;
}
.quality-summary .eyebrow {
  font-size: 8px;
}
.quality-scores {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 20px;
}
.quality-scores span {
  display: block;
  font-size: 9px;
  color: var(--muted);
}
.quality-scores strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.table-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}
.table-heading {
  padding: 17px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.table-heading h3 {
  margin: 0;
  font-size: 13px;
}
.table-scroll {
  overflow-x: auto;
  width: 100%;
}
.table-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.table-card th {
  text-align: left;
  background: #f7f8fa;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 9px;
  font-weight: 600;
  padding: 11px 12px;
  border-block: 1px solid var(--line);
  white-space: nowrap;
}
.table-card td {
  border-bottom: 1px solid #eef0f4;
  padding: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}
.table-card tr:last-child td {
  border-bottom: 0;
}
.table-card td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 9px;
}
.table-card td strong {
  font-weight: 500;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 10px;
}
.table-empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 24px !important;
  font-size: 12px;
}
.status-badge {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 9px;
  white-space: nowrap;
  background: #edf0f4;
  color: #677284;
}
.status-badge.responded {
  background: #eaf6ee;
  color: #397450;
}
.status-badge.failed {
  background: #fbeeed;
  color: #a2514d;
}
.status-badge.running {
  background: #eaf2fb;
  color: #3973a4;
}
.issue-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 0 18px 20px;
}
.issue-chip {
  padding: 7px 10px;
  border-radius: 6px;
  background: #faf3e8;
  color: #8f713d;
  font-size: 10px;
}
.internal-chip {
  border: 1px solid hsl(40 85% 55% / 0.2);
  color: var(--gold);
  background: hsl(40 85% 55% / 0.06);
  border-radius: 6px;
  font-size: 8px;
  letter-spacing: 1px;
  padding: 9px 12px;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
  padding: 0;
  background:
    radial-gradient(ellipse at 65% 0, hsl(40 30% 15%), transparent 70%),
    var(--header-dark);
}
.login-intro {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(38px, 6vw, 84px);
  color: var(--header-foreground);
}
.login-intro .brand {
  align-self: flex-start;
  color: #fff;
  font-size: 24px;
}
.login-intro .brand-sub {
  color: var(--header-muted);
}
.login-intro > div {
  max-width: 560px;
}
.login-intro h1 {
  max-width: 520px;
  margin-bottom: 18px;
  color: #fff;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.04;
  letter-spacing: -2.3px;
}
.login-intro > div > p:last-child {
  max-width: 500px;
  color: var(--header-muted);
  font-size: 14px;
  line-height: 1.8;
}
.login-intro ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  color: var(--header-muted);
  font-size: 11px;
  list-style: none;
}
.login-intro li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-intro li i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}
.login-environment {
  color: hsl(40 12% 56%);
  font-size: 9px;
  letter-spacing: 0.5px;
}
.login-card {
  align-self: center;
  justify-self: center;
  background: #fff;
  width: min(calc(100% - 64px), 460px);
  padding: 42px;
  border: 1px solid #ffffff16;
  border-radius: 12px;
  box-shadow: 0 24px 80px #0005;
}
.login-card h1 {
  font-size: 28px;
  line-height: 1.3;
  margin-bottom: 9px;
  letter-spacing: -0.8px;
}
.login-card .login-tabs {
  margin-top: 28px;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.login-card .login-tabs .stage-tab {
  border-color: var(--line);
  background: #f5f7fa;
  color: var(--muted);
}
.login-card .login-tabs .stage-tab.active {
  background: #fff;
  color: var(--ink);
}
.login-card form {
  margin-top: 26px;
}
.login-card form label {
  font-size: 11px;
  font-weight: 600;
  display: block;
  margin-bottom: 9px;
}
.login-card form input {
  width: 100%;
  padding: 11px;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-bottom: 13px;
}
.login-card form button {
  width: 100%;
}
.login-card > .small-note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.form-error {
  color: #a4544e;
  line-height: 1.7;
  font-size: 12px;
}
.run-dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  width: min(1120px, calc(100vw - 40px));
  max-height: calc(100dvh - 48px);
  color: var(--ink);
  overflow: auto;
}
.run-dialog::backdrop {
  background: #101723aa;
}
.run-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
}
.run-dialog-header h2 {
  font-size: 17px;
}
.run-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 15px 24px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.run-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.run-sample,
.run-review {
  padding: 23px;
  min-width: 0;
}
.run-sample {
  border-right: 1px solid var(--line);
  background: #fcfcfe;
}
.run-sample h3,
.run-review h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
#run-sample-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
#run-sample-messages .bubble {
  font-size: 11px;
  max-width: 94%;
}
#review-fields {
  border: 0;
  padding: 0;
  margin: 20px 0 0;
  min-width: 0;
}
#review-fields > .config-field {
  margin: 18px 0;
}
#review-fields .field-grid {
  gap: 16px;
}
.review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 20px 0;
}
.review-tags > p {
  width: 100%;
}
.review-history {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.review-history h4 {
  font-size: 12px;
}
.review-record {
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px;
  margin-bottom: 12px;
  line-height: 1.7;
}
.review-record p {
  margin: 8px 0;
}
.review-record small {
  color: var(--muted);
  font-size: 9px;
}
#run-reference {
  font-size: 11px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
#run-reference h4 {
  margin: 18px 0 6px;
}
#run-reference p {
  margin: 0 0 12px;
}
@media (max-width: 1100px) {
  .quality-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }
  .overview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .app-header {
    gap: 14px;
  }
}
@media (max-width: 700px) {
  main {
    padding: 0 14px;
  }
  .app-header {
    padding: 14px;
    gap: 14px;
  }
  .app-header nav {
    order: 3;
    flex-basis: 100%;
    width: 100%;
  }
  .app-header .nav {
    padding: 8px 11px;
    font-size: 11px;
  }
  .app-header .brand {
    font-size: 20px;
  }
  .account-chip {
    margin-left: auto;
    font-size: 10px;
    padding: 8px;
  }
  .header-context {
    padding: 10px 14px 0;
    gap: 12px;
    font-size: 9px;
  }
  .tenant-picker {
    width: 100%;
    justify-content: space-between;
  }
  .tenant-picker select {
    max-width: calc(100% - 70px);
  }
  .header-banner {
    padding: 22px 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .header-banner h1 {
    font-size: 23px;
  }
  .header-banner .eyebrow {
    font-size: 7px;
    letter-spacing: 1.2px;
  }
  .stage-tabs {
    padding: 0 14px;
  }
  .stage-tab {
    padding: 10px 11px;
    font-size: 10px;
  }
  .workspace-breadcrumb {
    padding: 17px 0;
  }
  .metrics,
  .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metrics > div {
    padding: 13px;
  }
  .metrics strong {
    font-size: 23px;
  }
  .inbox {
    display: block;
  }
  .empty {
    min-height: 330px;
  }
  .filterbar {
    gap: 12px;
    padding: 14px;
  }
  .filter-field {
    min-width: 0;
    width: calc(50% - 6px);
    max-width: none;
  }
  .filter-field:nth-child(3) {
    width: 100%;
  }
  #metrics-scope {
    margin-left: 0;
    width: 100%;
  }
  .overview-metrics strong,
  .overview-metrics > div:last-child strong {
    font-size: 21px;
  }
  .quality-summary {
    padding: 18px;
  }
  .quality-scores {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
    gap: 18px;
    width: 100%;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .section-heading h2 {
    font-size: 17px;
  }
  .table-card {
    max-width: 100%;
  }
  .table-card th,
  .table-card td {
    padding: 10px;
  }
  .table-card table {
    min-width: 750px;
  }
  .configuration-heading,
  .config-panel {
    padding: 18px;
  }
  .config-toolbar {
    padding: 15px 18px;
  }
  .login-screen {
    padding: 20px;
  }
  .login-card {
    padding: 27px;
  }
  .run-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
  .run-review-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .run-sample {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .run-dialog-header {
    padding: 17px;
  }
  .run-dialog-header h2 {
    font-size: 14px;
  }
  .run-sample,
  .run-review {
    padding: 18px;
  }
  .run-detail-meta {
    padding: 12px 17px;
  }
}

@media (max-width: 840px) {
  .login-screen {
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    padding: 24px;
  }
  .login-intro {
    display: none;
  }
  .login-card {
    width: min(100%, 460px);
    padding: 32px;
  }
}

@media (max-width: 480px) {
  .login-screen {
    padding: 0;
    background: #fff;
  }
  .login-card {
    align-self: stretch;
    width: 100%;
    min-height: 100dvh;
    padding: 34px 22px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

/* O painel interno compartilha o shell do CRM, mas privilegia leitura analítica. */
#admin-shell .header-banner {
  padding-top: 16px;
  padding-bottom: 18px;
}
#admin-shell .header-banner h1 {
  font-size: 22px;
  margin-bottom: 5px;
}
#admin-shell .workspace-breadcrumb {
  padding: 14px 0;
}
#admin-shell .filterbar {
  margin-bottom: 22px;
}
#admin-shell .section-heading {
  margin-top: 0;
}

@media (min-width: 1000px) {
  body:has(#widget:not([hidden])) main {
    width: calc(100% - 408px);
    padding-right: 0;
  }
  body:has(#widget:not([hidden])) .inbox.has-contact {
    grid-template-columns: 220px minmax(320px, 1fr) 270px;
  }
}
