:root {
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #171927;
  background: #f7f8fc;
  font-synthesis: none;
  --purple: #5d4ff0;
  --purple-dark: #403591;
  --line: #e3e5ee;
  --muted: #7c8191;
  --green: #168b6a;
  --amber: #a96b16;
}
.ui-icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.18em;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
textarea {
  font: inherit;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fbfbfd;
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 4px 8px 12px;
}
.brand > b,
.agent {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #6d5df5, #4777ec);
  color: white;
  font-size: 21px;
}
.brand strong {
  font-size: 20px;
  display: block;
}
.brand small,
.identity small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.new-task {
  height: 44px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(100deg, #6753e9, #4c73ee);
  color: #fff;
  font-weight: 700;
  text-align: left;
  padding: 0 14px;
}
.new-task kbd {
  float: right;
  background: #ffffff22;
  border: 0;
  border-radius: 5px;
  padding: 2px 10px;
}
.search {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dcdfea;
  border-radius: 10px;
  padding: 0 10px;
  background: white;
}
.search input {
  border: 0;
  outline: 0;
  min-width: 0;
  flex: 1;
}
.search kbd {
  border: 0;
  color: #9da1ad;
  background: #f1f2f6;
  padding: 3px 8px;
  border-radius: 6px;
}
.sidebar nav {
  display: grid;
  gap: 2px;
}
.sidebar nav a {
  height: 36px;
  padding: 0 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #343644;
  text-decoration: none;
  border-radius: 9px;
}
.sidebar nav a.active {
  background: #eae8ff;
  color: #5447d7;
  font-weight: 700;
}
.sidebar nav em {
  margin-left: auto;
  background: #ffebe6;
  color: #e96c55;
  border-radius: 20px;
  padding: 2px 9px;
  font-style: normal;
}
.recent {
  display: grid;
  gap: 12px;
  margin: 10px;
}
.recent small {
  color: #a2a5b0;
}
.recent a {
  color: #5d6070;
  text-decoration: none;
  font-size: 12px;
}
.recent > span {
  color: #777b88;
  font-size: 11px;
  line-height: 1.5;
}
.identity {
  margin-top: auto;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  display: flex;
  gap: 9px;
  align-items: center;
  text-align: left;
  padding: 8px;
}
.identity > b {
  background: #e5efff;
  color: #3670dd;
  border-radius: 8px;
  padding: 10px;
}
.identity span {
  flex: 1;
}
main {
  min-width: 0;
}
.topbar {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}
.crumb {
  font-size: 13px;
  color: #8c90a0;
}
.crumb strong {
  color: #292b37;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-actions span {
  font-size: 12px;
  color: #898d9c;
}
.top-actions button,
.chat-heading button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  height: 34px;
  padding: 0 11px;
}
.top-actions button:first-of-type {
  color: var(--purple);
  background: #f1efff;
}
.mobile-title {
  display: none;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) 376px;
  min-height: calc(100vh - 64px);
}
.workspace.results-closed {
  grid-template-columns: minmax(0, 1fr);
}

.generic-page {
  margin: 24px;
  padding: 28px;
  border: 1px solid #e7e6ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 40px rgb(37 32 77 / 7%);
}
.generic-page > header,
.generic-page > footer,
.generic-scope {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.generic-page > header {
  justify-content: space-between;
}
.generic-page > header > a {
  color: #5040ba;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.generic-page h1 {
  margin: 5px 0;
}
.generic-page p,
.generic-page small,
.generic-page span,
.generic-page em {
  color: #777386;
}
.generic-scope {
  margin: 22px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f6fc;
}
.generic-scope b {
  color: #5040ba;
}
.generic-scope em {
  margin-left: auto;
  font-style: normal;
}
.generic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  min-height: 260px;
}
.generic-grid article,
.generic-empty {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
  border: 1px solid #eceaf4;
  border-radius: 14px;
}
.generic-grid article small {
  color: #6355d8;
}
.generic-empty {
  align-items: center;
  justify-content: center;
  min-height: 260px;
}
.live-data {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.live-data article {
  padding: 16px;
  border: 1px solid #eceaf4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(37 32 77 / 6%);
}
.live-data article > header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  color: #777386;
}
.live-data article > header b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #eeecff;
  color: #5040ba;
}
.live-data article > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid #f0eef5;
}
.live-data article strong {
  text-align: right;
  overflow-wrap: anywhere;
}
.generic-page > footer {
  margin-top: 22px;
}
.generic-page > footer small {
  margin-left: auto;
}
.command-form {
  display: flex;
  align-items: end;
  gap: 9px;
  padding: 10px;
  border: 1px solid #eceaf4;
  border-radius: 12px;
  flex-wrap: wrap;
}
.command-form label {
  display: grid;
  gap: 4px;
  min-width: 145px;
}
.command-form label span {
  font-size: 10px;
}
.command-form input,
.command-form select {
  min-height: 34px;
  border: 1px solid #d9d6e8;
  border-radius: 8px;
  padding: 0 9px;
  background: #fff;
  color: #292b37;
}
.command-form button {
  min-height: 34px;
}
.chat {
  padding: 26px 28px 22px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-heading {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eceef4;
  padding-bottom: 16px;
}
.chat-heading h1 {
  font-size: 18px;
  margin: 0 0 5px;
}
.chat-heading p {
  margin: 0;
  font-size: 11px;
  color: #999dab;
}
.chat-heading i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38b878;
}
.conversation {
  max-width: 880px;
  margin: 28px auto 10px;
  width: 100%;
  display: grid;
  gap: 14px;
}
.intro {
  display: flex;
  gap: 12px;
  align-items: center;
}
.intro strong {
  font-size: 14px;
}
.intro p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0;
}
.user-bubble {
  justify-self: end;
  background: linear-gradient(105deg, #6a55e8, #5c4fe3);
  color: #fff;
  padding: 13px 18px;
  border-radius: 18px 18px 4px 18px;
  font-size: 13px;
  max-width: 70%;
}
.attachments {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: 8px;
  margin-left: 38%;
}
.asset {
  min-height: 112px;
  border-radius: 13px;
  padding: 14px;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.asset:after {
  content: '';
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ffffff15;
  right: -8px;
  bottom: -16px;
}
.asset small {
  font-size: 10px;
  opacity: 0.7;
}
.asset strong {
  font-size: 12px;
  margin-top: auto;
}
.asset span {
  font-size: 10px;
  opacity: 0.8;
}
.asset i {
  position: absolute;
  right: 9px;
  top: 9px;
  background: #ffffff22;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 9px;
}
.photo {
  background: #315c7c;
}
.storefront {
  background: #8e5736;
}
.asset.location {
  background: white;
  border: 1px solid #dfe1e9;
  color: #1e2029;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.location > b {
  font-size: 24px;
}
.location span {
  display: flex;
  flex-direction: column;
}
.location em {
  font-size: 9px;
  color: #999;
  font-style: normal;
}
.location > i {
  color: #111;
  background: none;
}
.agent-result {
  background: white;
  border: 1px solid #e1e3eb;
  border-radius: 15px;
  padding: 12px;
}
.agent-result header {
  display: flex;
  gap: 12px;
}
.agent-result h2 {
  font-size: 14px;
  margin: 3px 0;
}
.agent-result h2 span {
  font-size: 9px;
  color: var(--green);
  background: #e6f6ef;
  padding: 4px 8px;
  border-radius: 8px;
}
.agent-result p {
  margin: 4px 0 12px;
  color: #777c8c;
  font-size: 11px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.field-grid button {
  text-align: left;
  background: white;
  border: 1px solid #e1e3eb;
  border-radius: 9px;
  padding: 9px;
}
.field-grid small,
.field-grid strong {
  display: block;
}
.field-grid small {
  color: #969aa9;
  font-size: 9px;
}
.field-grid strong {
  font-size: 11px;
  margin: 4px 0;
}
.field-grid span {
  color: var(--green);
  font-size: 8px;
}
.voice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f2efff;
  border: 1px solid #d9d2ff;
  border-radius: 11px;
  padding: 9px;
  margin-top: 9px;
}
.voice > b {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--purple);
  color: white;
  display: grid;
  place-items: center;
}
.voice span {
  flex: 1;
}
.voice strong,
.voice small {
  display: block;
  font-size: 10px;
}
.voice small {
  color: #6f7180;
  margin-top: 5px;
}
.voice button,
.primary {
  background: linear-gradient(100deg, #6550ed, #4379ed);
  color: white;
  border: 0;
  border-radius: 8px;
  min-height: 34px;
  padding: 0 25px;
}
.composer {
  max-width: 880px;
  width: 100%;
  margin: auto auto 0;
  border: 1px solid #d9dce6;
  background: white;
  border-radius: 15px;
  padding: 10px;
}
.composer textarea {
  border: 0;
  resize: none;
  outline: 0;
  width: 100%;
  height: 38px;
}
.tools {
  display: flex;
  gap: 6px;
}
.tools button {
  height: 30px;
  border: 1px solid #dfe2eb;
  background: white;
  border-radius: 7px;
}
.tools .send {
  margin-left: auto;
  background: var(--purple);
  color: white;
  width: 34px;
  border: 0;
}
.composer > small {
  color: #a0a4b0;
  font-size: 9px;
}
.results {
  background: white;
  border-left: 1px solid var(--line);
  padding: 0 16px 24px;
}
.results > nav {
  height: 58px;
  display: flex;
  gap: 25px;
  border-bottom: 1px solid #eee;
}
.results > nav button {
  border: 0;
  background: none;
  color: #8d90a0;
}
.results > nav button.active {
  color: var(--purple);
  font-weight: 700;
  border-bottom: 2px solid var(--purple);
}
.results > nav button:last-child {
  margin-left: auto;
  font-size: 20px;
}
.progress {
  margin: 18px 0;
  background: linear-gradient(135deg, #342b5c, #5040ba);
  color: white;
  border-radius: 14px;
  padding: 18px;
}
.progress div {
  display: flex;
  justify-content: space-between;
}
.progress strong {
  font-size: 26px;
}
.progress progress {
  width: 100%;
  accent-color: #b8b0ff;
}
.progress small {
  font-size: 9px;
}
.results h3 {
  font-size: 12px;
}
.result-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding: 10px 0;
  gap: 10px;
}
.result-row span {
  flex: 1;
}
.result-row small,
.result-row strong {
  display: block;
  font-size: 9px;
}
.result-row strong {
  font-size: 10px;
  margin-top: 4px;
}
.result-row em {
  font-size: 8px;
  color: var(--green);
  background: #e8f7f1;
  padding: 3px 7px;
  border-radius: 8px;
  font-style: normal;
}
.result-row button,
.warning button {
  border: 0;
  background: none;
  color: var(--purple);
  font-size: 9px;
}
.warning {
  display: flex;
  gap: 10px;
  background: #fff9ef;
  border: 1px solid #f2d5aa;
  border-radius: 11px;
  padding: 11px;
  margin: 8px 0;
}
.warning span {
  flex: 1;
}
.warning strong,
.warning small {
  display: block;
  font-size: 9px;
}
.warning small {
  color: #8b8173;
  margin-top: 5px;
}
.safe-note {
  font-size: 9px;
  color: #487566;
  background: #e9f6f1;
  padding: 12px;
  border-radius: 9px;
}
.mobile-sheet,
.bottom-nav {
  display: none;
}
.state-panel {
  max-width: 720px;
  margin: 18px auto 0;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 14px;
  background: #fff5e8;
  border: 1px solid #f2d3a4;
}
.state-panel h2,
.state-panel p {
  margin: 2px;
}
.state-panel h2 {
  font-size: 15px;
}
.state-panel p {
  font-size: 12px;
  color: #706b63;
}
.state-symbol {
  width: 34px;
  height: 34px;
  background: #edb55f;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.state-panel button {
  margin-left: auto;
}
.state-success {
  background: #e9f8f2;
  border-color: #bde9d8;
}
.state-denied,
.state-stopped {
  background: #f5f5f7;
  border-color: #ddd;
}
.bottom-nav {
  display: none;
}
@media (min-width: 761px) {
  .workspace {
    height: calc(100vh - 64px);
    min-height: 0;
  }
  .chat,
  .results {
    overflow-y: auto;
  }
  .composer {
    position: sticky;
    z-index: 2;
    bottom: 0;
    flex-shrink: 0;
  }
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr 330px;
  }
  .attachments {
    margin-left: 15%;
  }
  .chat {
    padding: 20px;
  }
  .sidebar {
    padding-inline: 10px;
  }
}
@media (max-width: 760px) {
  body {
    background: #f7f8fc;
  }
  .shell {
    display: block;
  }
  .sidebar,
  .crumb,
  .top-actions,
  .chat-heading,
  .results {
    display: none;
  }
  .topbar {
    height: 64px;
    padding: 0 14px;
  }
  .mobile-title {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    width: 100%;
    text-align: center;
    align-items: center;
  }
  .mobile-title button {
    grid-row: 1/3;
    border: 0;
    background: none;
    font-size: 28px;
    text-align: left;
  }
  .mobile-title strong {
    font-size: 15px;
  }
  .mobile-title small {
    font-size: 9px;
    color: #a1a4af;
  }
  .workspace {
    display: block;
    min-height: calc(100vh - 120px);
  }
  .chat {
    padding: 16px 13px 132px;
    min-height: calc(100vh - 64px);
  }
  .conversation {
    margin: 0 auto;
    gap: 12px;
  }
  .intro {
    background: white;
    border-radius: 13px;
    padding: 13px;
    margin-right: 18%;
  }
  .agent {
    width: 34px;
    min-width: 34px;
  }
  .user-bubble {
    max-width: 83%;
    font-size: 12px;
  }
  .attachments {
    margin-left: 8%;
    grid-template-columns: 1fr 1fr;
  }
  .asset {
    min-height: 98px;
  }
  .asset.location {
    grid-column: 1/3;
    min-height: 70px;
  }
  .agent-result {
    margin-left: 8%;
  }
  .agent-result header .agent {
    display: none;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .voice {
    align-items: flex-start;
  }
  .voice button {
    display: none;
  }
  .composer {
    position: fixed;
    z-index: 5;
    bottom: 66px;
    left: 10px;
    right: 10px;
    width: auto;
    box-shadow: 0 8px 30px #25213c25;
  }
  .composer textarea {
    height: 32px;
  }
  .tools button:not(:first-child):not(:nth-child(2)):not(:last-child):not(:nth-last-child(2)) {
    display: none;
  }
  .composer > small {
    display: none;
  }
  .bottom-nav {
    position: fixed;
    z-index: 4;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-around;
  }
  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 52px;
    font-size: 17px;
  }
  .bottom-nav small {
    font-size: 9px;
  }
  .bottom-nav .active {
    color: var(--purple);
  }
  .mobile-sheet {
    display: block;
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin: 0 auto 12px;
    box-shadow: 0 10px 35px #29223d0c;
  }
  .mobile-sheet h2 {
    font-size: 18px;
    margin: 0 0 6px;
  }
  .mobile-sheet > p {
    color: var(--muted);
    font-size: 12px;
  }
  .capture-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
  }
  .capture-grid button {
    border: 1px dashed #aca5ed;
    border-radius: 14px;
    background: #f7f5ff;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    color: var(--purple);
  }
  .capture-grid small {
    color: #8a8d9a;
  }
  .upload-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    background: #f6f7fa;
    padding: 12px;
    border-radius: 10px;
  }
  .upload-item progress {
    grid-column: 1/2;
    width: 100%;
    accent-color: var(--purple);
  }
  .mobile-sheet .primary {
    width: 100%;
    height: 48px;
    margin-top: 16px;
  }
  .record {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 10px solid #e8e5ff;
    background: var(--purple);
    color: white;
    margin: 28px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .record.recording {
    background: #ec5c67;
    animation: pulse 1s infinite;
  }
  .record small {
    opacity: 0.8;
  }
  .transcript {
    background: #f5f4fb;
    border-radius: 12px;
    padding: 14px;
  }
  .transcript button {
    border: 0;
    background: none;
    color: var(--purple);
  }
  .completion {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #3d3479, #5544c9);
    color: white;
    border-radius: 13px;
    padding: 16px;
    margin: 14px 0;
  }
  .completion > b {
    font-size: 26px;
  }
  .completion strong,
  .completion small {
    display: block;
  }
  .completion small {
    opacity: 0.7;
    font-size: 9px;
    margin-top: 4px;
  }
  .confirm-sheet > label:not(.check) {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
  }
  .confirm-sheet label span {
    flex: 1;
  }
  .confirm-sheet label small {
    display: block;
    color: #9195a3;
  }
  .confirm-sheet input {
    border: 0;
    width: 100%;
    padding: 5px 0;
  }
  .confirm-sheet em {
    color: var(--green);
    font-style: normal;
    font-size: 11px;
  }
  .impact {
    display: flex;
    gap: 10px;
    background: #fff3e5;
    padding: 12px;
    border-radius: 10px;
    margin: 14px 0;
  }
  .impact strong,
  .impact small {
    display: block;
    font-size: 11px;
  }
  .impact small {
    color: #8a7560;
    margin-top: 4px;
  }
  .check {
    font-size: 11px;
    display: flex;
    gap: 7px;
  }
  .primary:disabled {
    background: #c8c9d2;
  }
  .state-panel {
    margin: 12px;
    align-items: flex-start;
  }
  .state-panel button {
    margin-left: 0;
  }
  .state-panel + .workspace .conversation {
    opacity: 0.65;
  }
  .state-empty + .workspace .composer {
    display: block;
  }
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 14px #ec5c6722;
  }
}
