:root {
  --ink: #24212d;
  --ink-soft: #5e5968;
  --paper: #f8f7f5;
  --canvas: #f1efe9;
  --white: #fff;
  --taupe: #b4a693;
  --line: #dedad1;
  --line-soft: #ebe8e1;
  --blue: #2e48ff;
  --blue-soft: #eef0ff;
  --green: #14865d;
  --green-soft: #e8f6ef;
  --amber: #b56a09;
  --red: #c43b47;
  --shadow: 0 18px 50px rgba(36, 33, 45, 0.1);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}
body {
  overflow: hidden;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, 'Avenir Next', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}
button {
  cursor: pointer;
}
.hidden {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-mark {
  width: 31px;
  height: 31px;
  stroke: none;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.subtle {
  color: var(--ink-soft);
}

.auth-screen {
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(440px, 0.92fr);
  min-height: 100%;
  background: var(--paper);
}
.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 48px clamp(48px, 7vw, 110px);
  overflow: hidden;
  color: #fff;
  background: #272431;
}
.auth-story::before {
  position: absolute;
  inset: -15%;
  content: '';
  background:
    radial-gradient(circle at 24% 72%, rgba(46, 72, 255, 0.55), transparent 31%),
    radial-gradient(circle at 92% 14%, rgba(180, 166, 147, 0.2), transparent 30%);
  animation: aurora 9s ease-in-out infinite alternate;
}
.auth-story > * {
  position: relative;
  z-index: 1;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.02em;
}
.brand-large {
  font-size: 23px;
}
.brand-large .brand-mark {
  width: 38px;
  height: 38px;
  color: #fff;
}
.auth-copy {
  max-width: 630px;
}
.auth-copy .eyebrow {
  color: #aeb7ff;
}
.auth-copy h1 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(52px, 6vw, 86px);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.055em;
}
.auth-copy > p:last-child {
  max-width: 540px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 17px;
  line-height: 1.65;
}
.signal-demo {
  width: min(520px, 100%);
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.signal-line {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 10px 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}
.signal-line em {
  color: rgba(255, 255, 255, 0.35);
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
}
.signal-node {
  width: 8px;
  height: 8px;
  margin-left: 4px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}
.signal-node.active {
  border-color: #8fa0ff;
  background: #8fa0ff;
  box-shadow: 0 0 0 5px rgba(143, 160, 255, 0.12);
  animation: pulse 1.8s infinite;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 48px;
}
.auth-card {
  width: min(430px, 100%);
}
.auth-card h2 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.auth-card > .subtle {
  margin: 0 0 28px;
}
.auth-form {
  display: grid;
  gap: 16px;
}
.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}
.auth-form input,
.auth-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #fff;
  padding: 13px 14px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.auth-form input:focus,
.auth-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(46, 72, 255, 0.1);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 750;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
.button:hover {
  transform: translateY(-1px);
}
.button:active {
  transform: translateY(0);
}
.button.primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 7px 18px rgba(46, 72, 255, 0.2);
}
.button.primary:hover {
  background: #2039eb;
}
.button.secondary {
  border: 1px solid var(--line);
  background: #fff;
}
.button.wide {
  width: 100%;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 15px;
  color: #8e8897;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  content: '';
  background: var(--line);
}
.token-access {
  border-radius: 12px;
  color: var(--ink-soft);
  background: rgba(180, 166, 147, 0.1);
}
.token-access summary {
  padding: 13px 15px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.compact-form {
  padding: 0 15px 15px;
}
.security-note,
.field-note {
  margin: 17px 0 0;
  color: #827c89;
  font-size: 11px;
  line-height: 1.5;
}
.form-error {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--red);
  font-size: 12px;
}

.console {
  display: grid;
  grid-template-columns: 286px minmax(420px, 1fr) 354px;
  height: 100vh;
  background: var(--paper);
}
.sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #eeece6;
}
.sidebar-head {
  padding: 21px 17px 14px;
}
.sidebar-head .brand {
  margin: 0 3px 22px;
}
.product-label {
  margin-left: 1px;
  color: #85808c;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.new-chat {
  width: 100%;
  margin-bottom: 13px;
}
.new-chat svg {
  width: 16px;
}
.scope-switch {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3px;
  margin-bottom: 10px;
  border: 1px solid #d9d5cc;
  border-radius: 10px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.42);
}
.scope-switch button {
  display: flex;
  height: 31px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 7px;
  color: #77717d;
  background: transparent;
  font-size: 9px;
  font-weight: 760;
  transition:
    color 0.16s,
    background 0.16s,
    box-shadow 0.16s;
}
.scope-switch button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(36, 33, 45, 0.08);
}
.scope-switch svg {
  width: 13px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0 10px;
  color: #797481;
  background: rgba(255, 255, 255, 0.55);
  transition:
    background 0.2s,
    border 0.2s;
}
.search-box:focus-within {
  border-color: #c8c3ba;
  background: #fff;
}
.search-box svg {
  width: 16px;
}
.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}
.sidebar-section-title {
  display: flex;
  justify-content: space-between;
  padding: 10px 21px 7px;
  color: #88828e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.conversation-list {
  flex: 1;
  overflow: auto;
  padding: 0 8px 15px;
}
.conversation-item {
  position: relative;
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 11px 10px;
  text-align: left;
  background: transparent;
  transition:
    background 0.15s,
    transform 0.15s;
}
.conversation-item:hover {
  background: rgba(255, 255, 255, 0.62);
}
.conversation-item.active {
  background: #fff;
  box-shadow: 0 4px 14px rgba(36, 33, 45, 0.06);
}
.conversation-item.operator-item {
  grid-template-columns: 31px minmax(0, 1fr);
}
.conversation-item.operator-item .conversation-icon {
  color: #fff;
  background: linear-gradient(145deg, #35303f, #6a6175);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: -0.02em;
}
.conversation-account-line {
  display: flex !important;
  align-items: center;
  gap: 5px;
  margin: 0 0 4px;
  color: var(--blue) !important;
  font-size: 8px !important;
  font-weight: 780;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}
.conversation-account-line i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #aaa3ad;
}
.conversation-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-soft);
}
.conversation-icon svg {
  width: 15px;
}
.conversation-copy {
  min-width: 0;
}
.conversation-copy strong,
.conversation-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-copy strong {
  margin: 1px 0 4px;
  font-size: 12px;
}
.conversation-copy span {
  color: #7a7581;
  font-size: 10px;
}
.conversation-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  color: #9b959f;
  font-size: 9px;
}
.conversation-meta > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}
.load-more {
  flex: none;
  margin: 0 12px 10px;
  border: 1px solid #d7d2c8;
  border-radius: 9px;
  padding: 8px 10px;
  color: #625c68;
  background: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  font-weight: 760;
}
.load-more:hover {
  border-color: #aaa3b1;
  background: #fff;
}
.load-more:disabled {
  cursor: wait;
  opacity: 0.55;
}
.status-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a6a1aa;
}
.status-pip.working,
.status-pip.queued {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(46, 72, 255, 0.1);
}
.status-pip.awaiting_approval {
  background: var(--amber);
}
.status-pip.failed {
  background: var(--red);
}
.sidebar-account {
  display: grid;
  grid-template-columns: 34px 1fr 32px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 16px;
}
.sidebar-account strong,
.sidebar-account span {
  display: block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-account strong {
  font-size: 11px;
}
.sidebar-account span {
  margin-top: 2px;
  color: #817b87;
  font-size: 9px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.workspace {
  position: relative;
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr) auto;
  min-width: 0;
  background: var(--paper);
}
.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
  padding: 0 22px;
  background: rgba(248, 247, 245, 0.92);
  backdrop-filter: blur(15px);
}
.conversation-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}
.conversation-heading p,
.conversation-heading h1 {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-heading p {
  color: #817b87;
  font-size: 10px;
}
.account-context {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  border: 1px solid #dcd8f7;
  border-radius: 999px;
  padding: 2px 7px;
  color: #5347b9;
  background: #f1efff;
  font-size: 8px;
  font-weight: 780;
}
.conversation-heading h1 {
  max-width: 42vw;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 760;
}
.agent-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d7d2c9;
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
}
.agent-orbit svg {
  width: 17px;
}
.agent-orbit span {
  position: absolute;
  right: -1px;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--green);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  color: #6e6875;
  background: transparent;
  transition:
    color 0.15s,
    background 0.15s;
}
.icon-button:hover {
  color: var(--ink);
  background: #ebe8e2;
}
.icon-button svg {
  width: 17px;
}
.connection-state {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 5px;
  border: 1px solid #dce8e1;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--green);
  background: #f2faf6;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.connection-state span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(20, 134, 93, 0.12);
}
.connection-state.offline {
  color: var(--red);
  border-color: #eed9dc;
  background: #fff5f5;
}

.transcript {
  min-height: 0;
  overflow: auto;
  scroll-behavior: smooth;
}
.messages {
  width: min(820px, calc(100% - 48px));
  margin: 0 auto;
  padding: 27px 0 22px;
}
.empty-state {
  display: flex;
  width: min(670px, calc(100% - 48px));
  min-height: 100%;
  margin: 0 auto;
  padding: 9vh 0 30px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.empty-state h2 {
  margin: 8px 0 10px;
  font-family: Georgia, serif;
  font-size: clamp(35px, 4vw, 50px);
  font-weight: 500;
  letter-spacing: -0.04em;
}
.empty-state > p:not(.eyebrow) {
  max-width: 570px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}
.empty-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 23px;
  border: 1px solid #d8d4ca;
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
  box-shadow: var(--shadow);
}
.empty-orbit::before {
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(46, 72, 255, 0.11);
  border-radius: 50%;
  content: '';
  animation: orbit-ring 4s linear infinite;
}
.empty-orbit svg {
  width: 29px;
}
.empty-orbit i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}
.empty-orbit i:nth-child(2) {
  top: -3px;
  left: 31px;
}
.empty-orbit i:nth-child(3) {
  right: 3px;
  bottom: 8px;
  background: var(--taupe);
}
.empty-orbit i:nth-child(4) {
  bottom: 2px;
  left: 9px;
  background: var(--green);
}
.prompt-suggestions {
  display: grid;
  width: min(580px, 100%);
  gap: 8px;
  margin-top: 31px;
}
.prompt-suggestions button {
  display: grid;
  grid-template-columns: 34px 1fr 20px;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 11px 13px;
  text-align: left;
  background: #fff;
  transition:
    border 0.16s,
    transform 0.16s,
    box-shadow 0.16s;
}
.prompt-suggestions button:hover {
  transform: translateY(-2px);
  border-color: #c8c2b7;
  box-shadow: 0 8px 25px rgba(36, 33, 45, 0.07);
}
.prompt-suggestions button > svg:first-child {
  box-sizing: content-box;
  width: 17px;
  padding: 8px;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-soft);
}
.prompt-suggestions button > svg:last-child {
  width: 14px;
  color: #aaa4ad;
}
.prompt-suggestions span {
  font-size: 12px;
  font-weight: 750;
}
.prompt-suggestions small {
  display: block;
  margin-top: 3px;
  color: #88828d;
  font-size: 10px;
  font-weight: 500;
}

.message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 26px;
  animation: message-in 0.28s ease-out both;
}
.message.user {
  grid-template-columns: minmax(0, 1fr) 34px;
}
.message-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--blue);
  background: var(--blue-soft);
}
.message-avatar svg {
  width: 16px;
}
.message.user .message-avatar {
  grid-column: 2;
  color: #fff;
  background: var(--ink);
}
.message.user .message-body {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  max-width: 78%;
  border-radius: 16px 4px 16px 16px;
  padding: 12px 15px;
  background: #ebe8e1;
}
.message-body {
  min-width: 0;
}
.message-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
}
.message-head strong {
  font-size: 11px;
}
.message-head time {
  color: #98929d;
  font-size: 9px;
}
.message.user .message-head {
  display: none;
}
.message-output {
  margin: 0;
  color: #312e38;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.68;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message.user .message-output {
  line-height: 1.5;
}
.live-output:empty::after {
  display: inline-block;
  width: 7px;
  height: 15px;
  content: '';
  background: var(--blue);
  animation: cursor-blink 0.85s step-end infinite;
}
.message-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 9px 0 0;
  color: var(--blue);
  font-size: 10px;
}
.message-status .spinner {
  width: 11px;
  height: 11px;
  border: 1.5px solid #c8ceff;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.structured-block {
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: #fff;
}
.structured-block summary {
  padding: 10px 12px;
  cursor: pointer;
  color: #615b67;
  font-size: 10px;
  font-weight: 750;
}
.structured-block pre {
  max-height: 280px;
  overflow: auto;
  margin: 0;
  border-top: 1px solid var(--line-soft);
  padding: 12px;
  color: #4f4960;
  background: #f7f6f3;
  font:
    10px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  white-space: pre-wrap;
}
.message-documents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}
.document-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid #dcd7cc;
  border-radius: 9px;
  padding: 8px 10px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  transition:
    border 0.15s,
    transform 0.15s;
}
.document-link:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
}
.document-link svg {
  width: 14px;
  color: var(--blue);
}

.composer-wrap {
  position: relative;
  z-index: 2;
  width: min(860px, calc(100% - 36px));
  margin: 0 auto;
  padding: 7px 0 14px;
  background: linear-gradient(transparent, var(--paper) 18%);
}
.operator-readonly {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  border: 1px solid #d9d5f4;
  border-radius: 12px;
  padding: 9px 12px;
  color: #4f4774;
  background: #f3f1ff;
  box-shadow: 0 6px 22px rgba(72, 59, 134, 0.06);
}
.operator-readonly > svg {
  width: 18px;
  color: #6555ca;
}
.operator-readonly strong,
.operator-readonly span {
  display: block;
}
.operator-readonly strong {
  font-size: 9px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.operator-readonly span {
  margin-top: 2px;
  color: #77708f;
  font-size: 9px;
}
.composer-wrap.readonly .composer,
.composer-wrap.readonly .attachment-tray {
  display: none;
}
.file-actions button:disabled {
  cursor: default;
  opacity: 0.65;
}
.composer {
  border: 1px solid #d7d2c8;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(36, 33, 45, 0.08);
  transition:
    border 0.2s,
    box-shadow 0.2s;
}
.composer:focus-within,
.composer.dragover {
  border-color: #a9b3ff;
  box-shadow: 0 12px 35px rgba(46, 72, 255, 0.12);
}
.composer textarea {
  display: block;
  width: 100%;
  max-height: 180px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 15px 16px 5px;
  background: transparent;
  font-size: 13px;
  line-height: 1.5;
}
.composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
}
.composer-left,
.composer-right {
  display: flex;
  align-items: center;
  gap: 7px;
}
.tool-button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  color: #69636f;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}
.tool-button:hover {
  background: #f0eee9;
}
.tool-button svg {
  width: 15px;
}
.model-control {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  border-left: 1px solid var(--line-soft);
  padding-left: 9px;
  color: #8c8691;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.model-control select {
  border: 0;
  outline: none;
  color: #5b5562;
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  text-transform: none;
}
.composer-right > span {
  color: #aaa4ad;
  font-size: 9px;
}
.send-button {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  transition:
    transform 0.15s,
    opacity 0.15s;
}
.send-button:hover {
  transform: scale(1.04);
}
.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}
.send-button svg {
  width: 15px;
}
.composer-note {
  margin: 6px 0 0;
  color: #99939d;
  font-size: 9px;
  text-align: center;
}
.attachment-tray {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 6px 1px 8px;
}
.attachment-chip {
  display: flex;
  min-width: 170px;
  max-width: 230px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(36, 33, 45, 0.05);
}
.attachment-chip > svg {
  box-sizing: content-box;
  width: 14px;
  padding: 6px;
  border-radius: 7px;
  color: var(--blue);
  background: var(--blue-soft);
}
.attachment-chip div {
  min-width: 0;
  flex: 1;
}
.attachment-chip strong,
.attachment-chip span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-chip strong {
  font-size: 9px;
}
.attachment-chip span {
  margin-top: 2px;
  color: #918b95;
  font-size: 8px;
}
.attachment-chip button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  color: #918b95;
  background: transparent;
}
.attachment-chip button:hover {
  color: var(--red);
  background: #fff0f1;
}
.attachment-chip button svg {
  width: 12px;
}
.attachment-chip.pending {
  opacity: 0.65;
}

.inspector {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #f1efe9;
}
.inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 18px 13px;
}
.inspector-head .eyebrow {
  margin-bottom: 3px;
}
.inspector-head h2 {
  margin: 0;
  font-size: 15px;
}
.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 12px;
  border-bottom: 1px solid #d9d5cc;
}
.inspector-tabs button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  padding: 9px 4px;
  color: #827c87;
  background: transparent;
  font-size: 10px;
  font-weight: 750;
}
.inspector-tabs button span {
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  border-radius: 8px;
  color: #928c96;
  background: #e4e1da;
  font-size: 8px;
}
.inspector-tabs button.active {
  color: var(--ink);
}
.inspector-tabs button.active::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  content: '';
  background: var(--blue);
}
.inspector-panel {
  display: none;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}
.inspector-panel.active {
  display: block;
}
.panel-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 30px;
  color: #948e98;
  text-align: center;
}
.panel-empty svg {
  width: 23px;
  margin-bottom: 9px;
  color: #aea8b0;
}
.panel-empty p {
  max-width: 230px;
  margin: 0;
  font-size: 10px;
  line-height: 1.55;
}
.activity-feed {
  position: relative;
}

.operator-run-card {
  margin: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--white) 94%, var(--blue) 6%);
  box-shadow: 0 12px 30px rgb(24 24 28 / 7%);
}

.operator-run-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.operator-run-card > header > div {
  display: grid;
  gap: 4px;
}

.operator-run-card > header span {
  color: var(--blue);
  font: 700 0.68rem/1.2 var(--mono);
  letter-spacing: 0.09em;
}

.operator-run-card > header strong {
  font-size: 0.95rem;
  line-height: 1.35;
}

.operator-run-card > header b {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font: 700 0.68rem/1 var(--mono);
  white-space: nowrap;
}

.operator-run-card > p {
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.operator-run-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.operator-run-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.operator-run-metric span {
  color: var(--muted);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.operator-run-metric strong {
  overflow: hidden;
  font: 700 0.78rem/1.2 var(--mono);
  text-overflow: ellipsis;
}

.operator-run-warnings {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.operator-run-warnings span {
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 0.73rem;
  line-height: 1.35;
}

.operator-run-warnings .failed {
  background: color-mix(in srgb, var(--white) 88%, var(--red) 12%);
  color: var(--red);
}

.operator-run-warnings .corrected {
  background: color-mix(in srgb, var(--white) 88%, var(--amber) 12%);
  color: var(--amber);
}

.operator-run-timeline {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.operator-run-timeline summary {
  padding: 12px 0 2px;
  color: var(--muted);
  font-size: 0.72rem;
  cursor: pointer;
}

.operator-run-timeline ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.operator-run-timeline li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.operator-run-timeline li > span {
  padding: 3px 5px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font: 700 0.58rem/1 var(--mono);
}

.operator-run-timeline li strong,
.operator-run-timeline li p,
.operator-run-timeline li time {
  font-size: 0.68rem;
  line-height: 1.35;
}

.operator-run-timeline li p {
  margin: 2px 0 0;
  color: var(--muted);
}

.operator-run-timeline li time {
  color: var(--muted);
}
.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  padding: 7px 4px 12px;
  animation: feed-in 0.24s ease-out both;
}
.activity-item::after {
  position: absolute;
  top: 36px;
  bottom: -2px;
  left: 17px;
  width: 1px;
  content: '';
  background: #d9d5cc;
}
.activity-item:last-child::after {
  display: none;
}
.activity-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #ded9d0;
  border-radius: 9px;
  color: #6d6672;
  background: #fff;
}
.activity-icon svg {
  width: 13px;
}
.activity-item.running .activity-icon {
  color: var(--blue);
  border-color: #cbd1ff;
  background: var(--blue-soft);
}
.activity-item.running .activity-icon::after {
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(46, 72, 255, 0.24);
  border-top-color: transparent;
  border-radius: 11px;
  content: '';
  animation: spin 1.4s linear infinite;
}
.activity-item.failed .activity-icon {
  color: var(--red);
  background: #fff0f1;
}
.activity-copy {
  min-width: 0;
  padding-top: 1px;
}
.activity-copy header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.activity-copy strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-copy time {
  flex: none;
  color: #a19ba4;
  font-size: 8px;
}
.activity-copy p {
  margin: 4px 0 0;
  color: #6f6974;
  font-size: 9px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.activity-copy details {
  margin-top: 5px;
  font-size: 8px;
}
.activity-copy pre {
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
}
.raw-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -2px 0 8px;
  color: #8d8791;
  font:
    8px ui-monospace,
    monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.raw-toolbar > div {
  display: flex;
}
.raw-toolbar .icon-button {
  width: 28px;
  height: 28px;
}
.raw-event {
  margin-bottom: 7px;
  border: 1px solid #ddd9d0;
  border-radius: 9px;
  overflow: hidden;
  background: #f9f8f5;
  animation: feed-in 0.2s ease-out both;
}
.raw-event header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  background: #eeece6;
}
.raw-event strong {
  color: var(--blue);
  font:
    9px ui-monospace,
    monospace;
}
.raw-event time {
  color: #928c96;
  font:
    8px ui-monospace,
    monospace;
}
.raw-event pre {
  max-height: 230px;
  overflow: auto;
  margin: 0;
  padding: 9px;
  color: #514b57;
  font:
    8px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.file-item {
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 9px;
  margin-bottom: 8px;
  border: 1px solid #ddd8ce;
  border-radius: 11px;
  padding: 10px;
  background: #fff;
  animation: feed-in 0.22s ease-out both;
}
.file-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-soft);
}
.file-icon svg {
  width: 16px;
}
.file-copy {
  min-width: 0;
}
.file-copy strong {
  display: block;
  overflow: hidden;
  margin: 1px 0 4px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-copy span {
  color: #8b8590;
  font-size: 8px;
}
.file-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.file-actions a,
.file-actions button {
  border: 0;
  border-radius: 7px;
  padding: 6px 8px;
  color: var(--blue);
  text-decoration: none;
  background: var(--blue-soft);
  font-size: 8px;
  font-weight: 750;
}
.file-actions button {
  color: #615b67;
  background: #efede8;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(360px, calc(100vw - 36px));
  border: 1px solid #d9d4ca;
  border-radius: 11px;
  padding: 11px 13px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 11px;
  animation: toast-in 0.24s ease-out both;
}
.toast.error {
  color: var(--red);
  border-color: #eed3d7;
}
.toast svg {
  width: 15px;
  flex: none;
}
.mobile-only {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 8px rgba(143, 160, 255, 0);
  }
}
@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}
@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes feed-in {
  from {
    opacity: 0;
    transform: translateX(7px);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes orbit-ring {
  to {
    transform: rotate(360deg);
  }
}
@keyframes aurora {
  to {
    transform: translate3d(3%, -2%, 0) scale(1.06);
  }
}

@media (max-width: 1080px) {
  .console {
    grid-template-columns: 260px minmax(410px, 1fr);
  }
  .inspector {
    position: fixed;
    z-index: 20;
    top: 0;
    right: 0;
    bottom: 0;
    width: 360px;
    transform: translateX(102%);
    box-shadow: -20px 0 50px rgba(36, 33, 45, 0.14);
    transition: transform 0.22s ease;
  }
  .inspector.open {
    transform: translateX(0);
  }
  .mobile-only {
    display: inline-grid;
  }
}

@media (max-width: 760px) {
  .auth-screen {
    display: block;
    overflow: auto;
  }
  .auth-story {
    min-height: 380px;
    padding: 30px;
  }
  .auth-copy h1 {
    font-size: 51px;
  }
  .auth-copy > p:last-child {
    font-size: 14px;
  }
  .signal-demo {
    display: none;
  }
  .auth-panel {
    padding: 38px 24px 60px;
  }
  .console {
    display: block;
  }
  .workspace {
    height: 100vh;
  }
  .sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: 286px;
    transform: translateX(-102%);
    box-shadow: 20px 0 50px rgba(36, 33, 45, 0.14);
    transition: transform 0.22s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .conversation-heading h1 {
    max-width: 48vw;
  }
  .connection-state {
    display: none;
  }
  .messages,
  .empty-state {
    width: calc(100% - 28px);
  }
  .composer-wrap {
    width: calc(100% - 20px);
  }
  .composer-note {
    display: none;
  }
  .message.user .message-body {
    max-width: 88%;
  }
  .inspector {
    width: min(360px, 94vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
