:root {
  --nav: #171c33;
  --navmuted: #8b91a8;
  --primary: #6663ee;
  --blue: #3b82f6;
  --ink: #252b43;
  --muted: #838a9d;
  --line: #e9ebf2;
  --bg: #f5f6fa;
  --good: #15aa86;
  --bad: #ef6262;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  font-size: 14px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 14px;
  background: #fff;
  color: inherit;
  transition: background 0.15s;
}
button:hover {
  background: #f0f0ff;
  border-color: #c3c1fc;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 24px;
  margin-bottom: 10px;
}
h2 {
  font-size: 17px;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.7;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.primary:hover {
  background: #5552d9;
  color: #fff;
}
.danger {
  color: var(--bad);
}
.link {
  color: var(--primary);
  border: 0;
  background: none;
  padding: 4px;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.spacer {
  flex: 1;
}
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--nav);
  color: white;
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  overflow: auto;
  z-index: 20;
  padding: 0 16px 20px;
}
.brand {
  height: 87px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid #ffffff13;
  margin-bottom: 12px;
}
.brandmark {
  width: 38px;
  height: 38px;
  background: linear-gradient(145deg, #706afa, #4344c9);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: white;
}
.brand strong {
  font-size: 15px;
  display: block;
  letter-spacing: 1px;
}
.brand small {
  font-size: 10px;
  color: var(--navmuted);
  letter-spacing: 2px;
}
.navgroup {
  color: #777f9b;
  font-size: 11px;
  padding: 18px 11px 7px;
  letter-spacing: 0.6px;
}
.navitem {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border-radius: 7px;
  margin: 3px 0;
  color: #b8bdd0;
  font-size: 13px;
}
.navitem:hover {
  background: #ffffff0b;
  text-decoration: none;
  color: white;
}
.navitem.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 13px #0002;
}
.navicon {
  width: 20px;
  opacity: 0.9;
  font-size: 17px;
  text-align: center;
}
.sidebar-foot {
  margin: 20px 10px 0;
  color: #777f9b;
  font-size: 11px;
  line-height: 1.8;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 66px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .crumb {
  color: #9499aa;
  font-size: 12px;
}
.avatar {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eeecff;
  color: var(--primary);
  font-weight: 600;
}
.usertext {
  line-height: 1.5;
  font-size: 12px;
}
.topbar button {
  padding: 6px 9px;
  font-size: 12px;
}
.mobile-menu {
  display: none;
}
.main {
  padding: 26px 28px 48px;
  max-width: 1800px;
  margin: auto;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}
.pagehead p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0;
}
.notice {
  border: 1px solid #e7e1c7;
  background: #fffdf0;
  color: #857239;
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 12px;
  margin-bottom: 18px;
  line-height: 1.6;
}
.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 21px;
  min-width: 0;
  box-shadow: 0 2px 4px #1d224303;
}
.cardhead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.cardhead h2 {
  margin: 0;
}
.grid {
  display: grid;
  gap: 18px;
}
.grid.two {
  grid-template-columns: 1fr 1fr;
}
.grid.three {
  grid-template-columns: repeat(3, 1fr);
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.kpi {
  padding: 19px 20px;
}
.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8a90a2;
  font-size: 12px;
}
.kpiicon {
  background: #f0efff;
  color: var(--primary);
  padding: 8px;
  border-radius: 8px;
  font-size: 17px;
}
.kpi b {
  display: block;
  font-size: 27px;
  margin: 9px 0;
  color: #292c43;
  letter-spacing: -0.5px;
}
.kpi small {
  color: #9399aa;
  font-size: 10px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar input {
  min-width: 220px;
  flex: 1;
}
.toolbar input,
.toolbar select {
  max-width: 420px;
  padding: 10px 12px;
}
.toolbar .count {
  font-size: 12px;
  color: var(--muted);
}
input,
select,
textarea {
  border: 1px solid #dfe3ed;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
}
textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}
.tablewrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 12px;
}
thead {
  background: #f8f9fc;
  color: #858b9d;
  text-align: left;
}
th {
  font-weight: 500;
  padding: 13px 16px;
}
td {
  padding: 15px 16px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
td.wrap {
  white-space: normal;
  min-width: 180px;
  max-width: 350px;
  line-height: 1.6;
}
tr:hover td {
  background: #fafaff;
}
.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 5px;
  background: #edf0f9;
  color: #69748e;
  white-space: nowrap;
}
.badge.good {
  background: #e5f7f1;
  color: #159d7c;
}
.badge.warn {
  background: #fff3dd;
  color: #d89326;
}
.badge.bad {
  background: #feeeee;
  color: #e85e5e;
}
.badge.blue {
  background: #eef0ff;
  color: #6363dc;
}
.empty {
  padding: 50px 20px;
  text-align: center;
  color: #9a9fb0;
  line-height: 1.8;
}
.empty strong {
  display: block;
  color: #5d647c;
  margin-bottom: 8px;
  font-size: 15px;
}
.funnel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.funnelrow {
  display: grid;
  grid-template-columns: 75px 1fr 34px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.funnelbar {
  height: 24px;
  background: #f0efff;
  border-radius: 4px;
  overflow: hidden;
}
.funnelbar svg {
  display: block;
  width: 100%;
  height: 24px;
}
.chart {
  width: 100%;
  height: 210px;
}
.chart text {
  fill: #9ba1b2;
  font-size: 10px;
}
.chart line {
  stroke: #edf0f5;
}
.list {
  display: grid;
  gap: 10px;
}
.listitem {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.listitem strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.listitem small {
  font-size: 11px;
  color: var(--muted);
}
.schedule {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  overflow: auto;
}
.day {
  background: #f8f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-height: 230px;
}
.day h3 {
  font-size: 12px;
  color: #727b93;
}
.appointment {
  margin-top: 10px;
  border: 1px solid #dedcfa;
  background: white;
  padding: 10px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.8;
  text-align: left;
  width: 100%;
}
.detailgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}
.detailgrid dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detailgrid dd {
  margin: 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin: 20px 0;
  overflow: auto;
  padding-bottom: 12px;
}
.tabs a,
.tabs button {
  white-space: nowrap;
}
.tabs .selected {
  color: var(--primary);
  background: #eeecff;
  border-color: #dedbff;
}
.steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.step {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
}
.node {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  margin: 12px 0;
}
.nodehead {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.node p {
  white-space: pre-wrap;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.pre {
  white-space: pre-wrap;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.timeline {
  border-left: 2px solid #ebeaf9;
  padding-left: 20px;
  margin-left: 8px;
}
.message {
  position: relative;
  margin: 0 0 22px;
}
.message:before {
  content: "";
  position: absolute;
  left: -26px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b2acf9;
  border: 2px solid white;
}
.message header {
  font-size: 12px;
  margin-bottom: 8px;
}
.message p {
  background: #f8f9fc;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  margin: 0;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  min-width: 0;
}
.field.wide {
  grid-column: 1/-1;
}
.field small {
  color: var(--muted);
}
.checkfield {
  flex-direction: row;
  align-items: center;
}
.formactions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}
.error {
  color: var(--bad);
  font-size: 12px;
  white-space: pre-wrap;
  line-height: 1.6;
  margin: 12px 0;
}
.success {
  color: var(--good);
}
dialog {
  border: 0;
  border-radius: 13px;
  box-shadow: 0 20px 80px #0004;
  padding: 26px;
  max-height: 90vh;
  width: min(820px, 94vw);
  color: var(--ink);
}
dialog::backdrop {
  background: #10172d70;
  backdrop-filter: blur(3px);
}
.dialoghead {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dialoghead h2 {
  margin: 0;
}
.dialoghead button {
  padding: 5px 10px;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2744;
  color: white;
  padding: 12px 22px;
  border-radius: 8px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  max-width: 90vw;
  font-size: 13px;
}
#toast.visible {
  opacity: 1;
}
.boot {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
.login {
  min-height: 100vh;
  background: radial-gradient(ellipse at 20% 20%, #373974, #171c33 65%);
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 60px;
  align-items: center;
  padding: 8vw;
}
.login-intro {
  color: #fff;
  max-width: 630px;
}
.login-intro .brandmark {
  width: 60px;
  height: 60px;
  margin-bottom: 32px;
}
.login-intro h1 {
  font-size: 38px;
  line-height: 1.5;
}
.login-intro p {
  color: #a6acc9;
}
.login .card {
  padding: 32px;
}
.login form {
  display: grid;
  gap: 17px;
}
.login .rolechoices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
}
.login .rolechoices button {
  font-size: 11px;
  padding: 7px;
}
.login .muted {
  line-height: 1.8;
}
.brain {
  background: #192140;
  color: #d5dcf4;
  min-height: calc(100vh - 66px);
  background-image:
    linear-gradient(#3a477224 1px, transparent 1px),
    linear-gradient(90deg, #3a477224 1px, transparent 1px);
  background-size: 32px 32px;
}
.brain .pagehead p,
.brain .muted {
  color: #91a1c2;
}
.brain .pagehead h1 {
  color: #f0f5ff;
}
.brainnav {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  background: #222c4e;
  padding: 10px;
  border: 1px solid #374363;
  border-radius: 8px;
  margin-bottom: 24px;
}
.brainnav a {
  padding: 10px 18px;
  color: #a9b7d5;
  font-size: 12px;
  border-radius: 5px;
}
.brainnav a.active {
  background: #385d9a;
  color: #e8f5ff;
}
.brain .card,
.brain .tablewrap {
  color: var(--ink);
  background: #fff;
}
.brain .notice {
  background: #253656;
  border-color: #395074;
  color: #a5c3eb;
}
.brain input,
.brain select,
.brain textarea {
  color: var(--ink);
}
.brain .card .muted {
  color: var(--muted);
}
.qa-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}
.qa-prompt {
  padding: 28px;
  text-align: center;
}
.qa-prompt h2 {
  font-size: 22px;
  margin-top: 10px;
}
.qaform {
  display: flex;
  gap: 10px;
  margin: 22px 0;
}
.qaform textarea {
  flex: 1;
  min-height: 70px;
}
.qaform button {
  align-self: flex-end;
}
.answer {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.9;
  margin-top: 15px;
}
.question {
  padding: 12px;
  border-radius: 7px;
  background: #eef3ff;
  margin-top: 15px;
  font-weight: 600;
  font-size: 13px;
}
.sources {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.sources button {
  font-size: 11px;
}
.graph-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
}
.graphcanvas {
  width: 100%;
  height: 530px;
  min-height: 300px;
  background: #131c36;
  border-radius: 10px;
}
.graphcanvas text {
  fill: #d7e8ff;
  font-size: 12px;
}
.graphcanvas line {
  stroke: #6378a3;
  stroke-width: 1.5;
}
.graphcanvas circle {
  stroke: #b3cffe;
  stroke-width: 1.4;
  cursor: pointer;
}
.graphcanvas g:focus circle {
  stroke: #fff;
  stroke-width: 3;
}
.graphdetail {
  color: var(--ink);
}
.toolcards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.toolcard {
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 10px;
  background: white;
  color: var(--ink);
}
.toolcard .tool-symbol {
  font-size: 32px;
  color: var(--primary);
  background: #f5f3ff;
  border-radius: 7px;
  padding: 12px;
  width: 60px;
  text-align: center;
  margin-bottom: 14px;
}
.toolcard h3 {
  line-height: 1.7;
  min-height: 44px;
}
.toolcard dl {
  display: grid;
  grid-template-columns: 65px 1fr;
  gap: 8px;
  font-size: 12px;
}
.toolcard dt {
  color: var(--muted);
}
.toolcard dd {
  margin: 0;
}
.price {
  color: var(--primary);
  font-size: 19px;
  font-weight: 650;
}
.processing-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 20px;
}
.flowstep {
  border: 1px solid #ebeaf5;
  border-radius: 7px;
  padding: 14px;
  margin: 12px 0;
  font-size: 12px;
  background: #f9faff;
}
.flowstep span {
  color: var(--primary);
  font-weight: 600;
  margin-right: 7px;
}
.fileupload {
  border: 2px dashed #d8dbeb;
  padding: 28px;
  text-align: center;
  border-radius: 8px;
  background: #fbfcff;
}
.fileupload input {
  max-width: 100%;
  margin-top: 14px;
}
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.profile-card {
  max-width: 900px;
}
.bottomnav {
  display: none;
}
.mobile-mask {
  display: none;
}
@media (min-width: 1700px) {
  .main {
    padding: 32px 40px;
  }
  .kpi b {
    font-size: 32px;
  }
}
.appointment {
  display: block;
}
@media (max-width: 760px) {
  .topbar .usertext {
    display: none;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 210px 1fr;
  }
  .sidebar {
    width: 210px;
  }
  .main {
    padding: 22px 20px;
  }
  .topbar {
    padding: 0 20px;
  }
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .toolcards {
    grid-template-columns: repeat(2, 1fr);
  }
  .qa-layout {
    grid-template-columns: 210px 1fr;
  }
  .grid.three {
    grid-template-columns: 1fr 1fr;
  }
  .graph-layout {
    grid-template-columns: 1fr;
  }
  .graphcanvas {
    height: 400px;
  }
  .login {
    gap: 30px;
    padding: 6vw;
    grid-template-columns: 1fr 400px;
  }
  .login-intro h1 {
    font-size: 29px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 240px;
  }
  .shell.menu-open .sidebar {
    transform: none;
  }
  .shell.menu-open .mobile-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: #0005;
    z-index: 19;
  }
  .mobile-menu {
    display: block;
  }
  .topbar {
    height: 60px;
    padding: 0 12px;
    gap: 8px;
  }
  .crumb {
    display: none;
  }
  .topbar .usertext {
    font-size: 10px;
  }
  .topbar .avatar {
    display: none;
  }
  .main {
    padding: 20px 13px 86px;
  }
  .pagehead {
    margin-bottom: 18px;
    flex-direction: column;
  }
  .pagehead h1 {
    font-size: 22px;
  }
  .pagehead .actions {
    width: 100%;
  }
  .card {
    padding: 16px;
  }
  .kpis {
    gap: 10px;
  }
  .kpi {
    padding: 14px;
  }
  .kpi b {
    font-size: 24px;
  }
  .kpiicon {
    font-size: 13px;
    padding: 5px;
  }
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar input {
    min-width: 160px;
    width: 100%;
  }
  .toolbar select {
    flex: 1;
    max-width: 100%;
  }
  .detailgrid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .field.wide {
    grid-column: auto;
  }
  dialog {
    padding: 20px;
    width: 96vw;
  }
  .login {
    display: block;
    padding: 25px 17px;
  }
  .login-intro {
    margin: 12px 0 25px;
  }
  .login-intro h1 {
    font-size: 26px;
  }
  .login-intro .brandmark {
    margin-bottom: 16px;
    width: 42px;
    height: 42px;
  }
  .login .card {
    padding: 22px;
  }
  .login-intro p {
    font-size: 12px;
  }
  .qa-layout,
  .processing-layout {
    grid-template-columns: 1fr;
  }
  .qa-history {
    display: none;
  }
  .brainnav {
    overflow: auto;
    flex-wrap: nowrap;
    gap: 0;
  }
  .brainnav a {
    padding: 9px 12px;
    white-space: nowrap;
  }
  .toolcards {
    grid-template-columns: 1fr;
  }
  .graphcanvas {
    height: 330px;
  }
  .compare {
    grid-template-columns: 1fr;
  }
  .bottomnav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    height: 64px;
    z-index: 15;
    justify-content: space-around;
  }
  .bottomnav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    gap: 4px;
    color: #8b91a8;
    min-width: 50px;
  }
  .bottomnav a.active {
    color: var(--primary);
  }
  .bottomnav span {
    font-size: 19px;
  }
  .notice {
    font-size: 11px;
  }
  .qaform {
    flex-direction: column;
  }
  .qaform button {
    align-self: stretch;
  }
  .schedule {
    grid-template-columns: repeat(7, 150px);
  }
  .chart {
    height: 185px;
  }
}
