:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: #203229;
  background: #f5f6f0;
  --green: #174a36;
  --green-dark: #173a2e;
  --line: #dce4d9;
  --muted: #53685a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; border-radius: 8px; min-height: 42px; padding: 8px 14px; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #bb862a; outline-offset: 3px; }
label { display: grid; gap: 7px; font-size: .9rem; font-weight: 650; }
input, select, textarea {
  width: 100%;
  border: 1px solid #a9b9ad;
  background: #fff;
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 12px;
}
textarea { resize: vertical; }
.top {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  min-height: 70px; padding: 12px clamp(14px, 4vw, 54px); background: var(--green-dark); color: #fff;
}
.identity, .account-bar { display: flex; align-items: center; gap: 10px; }
.identity { font-weight: 720; white-space: nowrap; }
.account-bar { font-size: .86rem; }
.logo { border-radius: 8px; padding: 5px 9px; background: #dce9cb; color: #173d2c; font-weight: 800; }
.primary { background: var(--green); color: #fff; font-weight: 700; }
.quiet { background: #e9eee4; color: #274737; }
.surface { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.login-screen { margin: 12vh auto 24px; width: min(400px, calc(100% - 36px)); }
.login-form, .chat-form { display: grid; gap: 15px; padding: 23px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.3; margin-bottom: 16px; }
.login-form h1 { margin-bottom: 5px; }
.workspace { max-width: 1300px; margin: auto; padding: 22px; display: grid; grid-template-columns: 177px minmax(0, 1fr); gap: 26px; }
.navigation { display: grid; align-content: start; gap: 7px; }
.navigation button { text-align: left; color: var(--green-dark); background: transparent; white-space: nowrap; }
.navigation button[aria-current] { background: #dfead7; font-weight: 750; }
.content { min-width: 0; padding-top: 5px; }
.conversation { max-width: 840px; }
.history { display: grid; gap: 12px; overflow-wrap: anywhere; padding: 14px 22px 0; }
.history:empty { display: none; }
.message { background: #eef4e9; border-radius: 9px; padding: 10px 12px; }
.message p { white-space: pre-wrap; }
.feedback { color: #9d2a22; overflow-wrap: anywhere; font-size: .88rem; }
.feedback:empty { display: none; }
.search { display: flex; align-items: end; gap: 8px; max-width: 600px; margin: 18px 0; }
.search label { flex: 1; }
.domain-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; padding: 0; list-style: none; }
.domain-card { padding: 14px; }
.domain-card p { margin-top: 5px; color: var(--muted); font-size: .85rem; }
.knowledge-passage { white-space: pre-wrap; overflow-wrap: anywhere; }
.workflow-form, .workflow-card { padding: clamp(12px, 3vw, 20px); }
.workflow-form, .workflow-fields, .workflow-list { display: grid; gap: 12px; }
.workflow-form { max-width: 830px; }
.workflow-form h2, .workflow-heading { font-size: 1.14rem; }
.workflow-form button { justify-self: start; }
.workflow-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.workflow-heading { margin: 22px 0 12px; }
.workflow-card h3 { margin: 0 0 8px; }
.workflow-card > * + * { margin-top: 8px; }
.workflow-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.workflow-check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.workflow-check input { width: 18px; min-height: 18px; }
.workflow-filters { flex-wrap: wrap; }
.workflow-filters label { min-width: 128px; }
.workflow-meta { color: var(--muted); font-size: .88rem; }
[data-status="ok"].feedback { color: var(--green); }
@media (max-width: 660px) {
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px; }
  .navigation { display: flex; flex-wrap: wrap; }
  .navigation button { padding: 8px 11px; }
  .login-form, .chat-form { padding: 16px; }
  .history { padding-inline: 16px; }
}
