:root {
  --bg: linear-gradient(180deg, #eef2f7 0%, #f6f7f8 38%, #eef2ef 100%);
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --line: rgba(39, 56, 48, 0.1);
  --text: #1b241f;
  --muted: #647069;
  --accent: #1aad19;
  --accent-strong: #138813;
  --soft: #edf7ee;
  --warning: #8a5a10;
  --warning-bg: #fff4dc;
  --shadow-soft: 0 10px 30px rgba(18, 33, 27, 0.06);
  --shadow-card: 0 6px 18px rgba(18, 33, 27, 0.05);
  --sidebar-width: 300px;
  --conversation-width: 360px;
  --inspector-width: 360px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  border-color: #b9c3bb;
}

button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

button.primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 6px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 111, 99, 0.12);
}

textarea {
  min-height: 78px;
  padding: 9px;
  resize: vertical;
  line-height: 1.6;
}

.app-shell {
  display: grid;
  grid-template-columns:
    var(--sidebar-width) 6px
    var(--conversation-width) 6px
    minmax(380px, 1fr) 6px
    var(--inspector-width);
  height: 100vh;
  overflow: hidden;
}

body.conversation-collapsed .app-shell {
  grid-template-columns:
    var(--sidebar-width) 6px
    minmax(420px, 1fr) 6px
    var(--inspector-width);
}

body.conversation-collapsed .contact-panel,
body.conversation-collapsed #middleResize {
  display: none;
}

.sidebar,
.contact-panel,
.workbench,
.inspector {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  overflow: auto;
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.sidebar {
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  background: #e8e8ea;
}

.wechat-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 14px 8px;
  background: #dedfe4;
  border-right: 1px solid #d6d7db;
}

.rail-avatar {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: #2f7d58;
  color: #fff;
  font-weight: 700;
}

.rail-icon {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #62656b;
  font-size: 17px;
}

.rail-icon.active,
.rail-icon:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.55);
}

.rail-spacer {
  flex: 1;
}

.wechat-list-pane {
  min-width: 0;
  overflow: auto;
}

.contact-panel,
.workbench {
  display: flex;
  flex-direction: column;
}

.workbench {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  overflow: auto;
  background: transparent;
}

.workbench > section {
  flex: 0 0 auto;
}

.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;
}

.inspector {
  border-left: 1px solid var(--line);
  padding: 14px;
}

.col-resize-handle {
  cursor: col-resize;
  background: var(--bg);
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  transition: background 0.12s ease;
}

.col-resize-handle:hover,
body.is-resizing .col-resize-handle:hover {
  background: #cfd8d2;
}

body.is-resizing {
  user-select: none;
}

.brand {
  padding: 14px 12px 10px;
  border-bottom: 1px solid var(--line);
}

.brand-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.brand strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.brand span,
.topbar p,
.draft-head p,
.rule-card small {
  color: var(--muted);
  margin: 0;
}

.runtime-status {
  margin-top: 6px;
  font-size: 13px;
}

.brand-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #4f5f56;
  text-decoration: none;
  white-space: nowrap;
  font-size: 12px;
}

.brand-mini-btn:hover {
  border-color: #b9c3bb;
}

.runtime-status.fallback {
  color: #9a5b00;
}

.runtime-status.model {
  color: var(--accent-strong);
}

.new-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.new-contact input {
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: #f8f8f8;
}

.new-contact button {
  width: 42px;
  height: 34px;
  min-width: 42px;
  min-height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  padding-bottom: 2px;
  overflow: hidden;
  white-space: nowrap;
  flex: 0 0 42px;
}

.export-row {
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--line);
  display: block;
}

.export-entry-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #d7e2d9;
  border-radius: 10px;
  color: #2d5f45;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,250,248,0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 3px 12px rgba(18,33,27,0.04);
  font-weight: 600;
  letter-spacing: 0;
  text-align: center;
}

.export-entry-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.customer-table-modal {
  position: absolute;
  inset: 20px 28px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  background: rgba(250, 252, 251, 0.97);
  box-shadow: 0 28px 80px rgba(17, 31, 28, 0.22);
  overflow: hidden;
}

.customer-table-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  overflow: hidden;
}

.customer-table-filters,
.customer-table-main {
  min-width: 0;
  min-height: 0;
  padding: 18px 20px 22px;
}

.customer-table-filters {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(243, 248, 244, 0.92));
  overflow: auto;
}

.customer-table-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.customer-filter-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.customer-filter-grid label,
.customer-field-picker {
  display: grid;
  gap: 6px;
}

.customer-filter-grid span,
.customer-field-picker-head strong {
  font-size: 12px;
  color: var(--muted);
}

.customer-table-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.customer-field-picker {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(28, 48, 39, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.customer-field-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.customer-field-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 2px;
}

.customer-field-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  font-size: 13px;
  color: #33453d;
  padding: 8px 10px;
  border: 1px solid rgba(25, 58, 40, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
}

.customer-field-item:hover {
  border-color: rgba(26, 173, 25, 0.22);
  background: #f7fcf7;
}

.customer-field-item input {
  margin: 2px 0 0;
}

.customer-field-item span {
  line-height: 1.45;
  word-break: break-word;
}

@media (max-width: 1500px) {
  .customer-field-list {
    grid-template-columns: 1fr;
  }
}

.customer-table-shell {
  margin-top: 12px;
  flex: 1;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(32, 51, 43, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  overflow: auto;
}

.customer-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.customer-table th,
.customer-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(31, 52, 42, 0.08);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.55;
  color: #30423a;
  word-break: break-word;
}

.customer-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(244, 248, 246, 0.98);
  color: #486157;
  font-weight: 700;
  padding: 0;
}

.customer-table-th-inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 16px 10px 12px;
}

.customer-table-th-inner span {
  flex: 1;
}

.customer-col-resizer {
  position: absolute;
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  min-height: 100%;
  min-width: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: col-resize;
}

.customer-col-resizer::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(72, 97, 87, 0.16);
  transition: background 0.15s ease;
}

.customer-col-resizer:hover::before,
.customer-col-resizer:focus-visible::before,
body.is-resizing-columns .customer-col-resizer::before {
  background: rgba(26, 173, 25, 0.55);
}

.customer-table th:first-child,
.customer-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 1px 0 0 rgba(31, 52, 42, 0.08);
}

.customer-table th:first-child {
  z-index: 4;
  background: rgba(244, 248, 246, 0.99);
}

.customer-table-empty {
  text-align: center !important;
  color: var(--muted) !important;
  padding: 26px 12px !important;
}

.sidebar-entry {
  padding: 10px 10px 8px;
}

.knowledge-entry-btn {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  border-color: rgba(26, 173, 25, 0.18);
  background: linear-gradient(180deg, rgba(26, 173, 25, 0.12), rgba(26, 173, 25, 0.04));
  color: #1a6d32;
  font-weight: 600;
}

.contact-list {
  padding: 0;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 30px;
  gap: 0;
  margin-bottom: 0;
}

.contact-row.active .contact-item {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.contact-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 8px 8px 8px 10px;
  text-align: left;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #dddddd;
  background: transparent;
}

.contact-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.contact-item span {
  min-width: 0;
}

.contact-row.active .contact-item span,
.contact-row.active .contact-item em,
.contact-row.active .contact-item i {
  color: rgba(255, 255, 255, 0.86);
}

.contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: #d9eee0;
  color: #176f3a;
  font-weight: 700;
}

.contact-main {
  display: grid;
  gap: 3px;
}

.contact-title-line {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.contact-title-line em {
  flex: 0 0 auto;
  color: #969ba2;
  font-style: normal;
  font-size: 12px;
}

.contact-preview {
  display: block;
  color: #8b9098;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.contact-tags {
  display: flex;
  gap: 4px;
  overflow: hidden;
}

.contact-tags i {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.04);
  color: #798077;
  font-style: normal;
  font-size: 11px;
}

.contact-tags i.hot {
  background: #fff1d6;
  color: #9a5b00;
}

.contact-delete {
  align-self: stretch;
  padding: 0;
  color: #9a3e2f;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #dddddd;
  border-radius: 0;
  font-size: 12px;
}

.topbar {
  padding: 13px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0;
}

.topbar.compact .topbar-title p {
  display: none;
}

.topbar.compact .topbar-actions {
  margin-left: auto;
}

.topbar.compact #clearContactBtn,
.mini-btn {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
}

.conversation-topbar {
  padding: 10px 14px;
}

.conversation-topbar .topbar-title h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.topbar h1 {
  margin: 0 0 5px;
  font-size: 17px;
  letter-spacing: 0;
}

.messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 12px 20px;
  background: #f4f4f4;
}

.message {
  position: relative;
  max-width: 86%;
  width: fit-content;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

.message.customer {
  margin-right: auto;
}

.message.human_final {
  margin-left: auto;
  color: #10210f;
  grid-template-columns: minmax(0, 1fr) 30px;
}

.message.human_final .message-avatar {
  order: 2;
  background: #4f9a57;
  color: #fff;
}

.message.human_final .message-bubble {
  order: 1;
  background: #95ec69;
  border-color: #7dd957;
}

.message.system_note {
  max-width: 88%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: var(--muted);
  display: block;
}

.message.system_note .message-avatar {
  display: none;
}

.message.system_note .message-bubble {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.message.sending .message-bubble {
  outline: 1px dashed rgba(26, 173, 25, 0.4);
}

.message-avatar {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: #e2e8de;
  color: #5c6b5e;
  font-size: 12px;
  font-weight: 700;
}

.message-bubble {
  padding: 7px 9px;
  border: 1px solid #e8e8e8;
  border-radius: 5px;
  background: #ffffff;
  line-height: 1.55;
  white-space: pre-wrap;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}

.message small {
  display: block;
  margin-bottom: 3px;
  color: rgba(0, 0, 0, 0.42);
  font-size: 11px;
}

.composer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 12px;
  align-items: start;
}

.composer-grid.single {
  grid-template-columns: 1fr;
}

.composer-main,
.composer-side {
  min-width: 0;
}

.composer-side {
  display: grid;
  gap: 8px;
}

.section-head,
.mini-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h2,
.mini-panel-head h3,
.inspector h2,
.draft-head h2 {
  display: block;
  margin: 0 0 7px;
  font-size: 14px;
  letter-spacing: 0;
}

.section-head h2,
.draft-head h2,
.inspector h2 {
  position: relative;
  padding-left: 14px;
}

.section-head h2::before,
.draft-head h2::before,
.inspector h2::before,
.mini-panel-head h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #39c64d 0%, #149214 100%);
}

.mini-panel-head h3 {
  position: relative;
  margin: 0;
  padding-left: 12px;
  font-size: 13px;
}

.section-head p,
.mini-panel-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.section-head-inline p {
  line-height: 1.45;
}

.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 10px;
}

.composer-actions-main {
  flex-wrap: wrap;
}

.composer-actions-main button {
  flex: 0 1 auto;
}

.draft-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.draft-head > div:first-child {
  min-width: 0;
}

.composer,
.draft-panel,
.compare-panel,
.inspector section {
  border: 1px solid rgba(39, 56, 48, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.composer,
.draft-panel,
.compare-panel {
  padding: 14px 16px;
}

.inspector section {
  padding: 12px 14px;
}

.compare-panel {
  min-height: 220px;
  overflow: hidden;
}

.turn-compare {
  overflow: auto;
  max-height: min(40vh, 360px);
  padding-right: 4px;
}

.draft-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.draft-panel textarea {
  min-height: 72px;
}

.legacy-draft {
  display: none;
}

.draft-messages {
  display: grid;
  gap: 8px;
}

.draft-message-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  align-items: stretch;
}

.draft-message-row textarea {
  min-height: 62px;
}

.delay-box {
  border: 1px solid rgba(39, 56, 48, 0.08);
  border-radius: 10px;
  padding: 7px;
  background: linear-gradient(180deg, #fcfdfc 0%, #f7faf7 100%);
}

.delay-box label {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 12px;
}

.delay-box input {
  height: 32px;
  padding: 0 8px;
}

.draft-delete {
  width: 100%;
  min-height: 28px;
  margin-top: 7px;
  padding: 0 6px;
  color: #9a3e2f;
  background: #fff8f6;
  font-size: 12px;
}

.auto-send-bar {
  display: grid;
  grid-template-columns: auto 58px auto auto;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid rgba(39, 56, 48, 0.08);
  border-radius: 10px;
  background: linear-gradient(180deg, #fcfefc 0%, #f4faf4 100%);
}

.auto-send-bar span {
  color: var(--muted);
}

.auto-send-bar input {
  height: 28px;
  padding: 0 6px;
}

.auto-send-bar input:disabled {
  background: #f2f4f3;
  color: #a0a8a2;
  border-color: rgba(39, 56, 48, 0.06);
}

.mode-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(17, 31, 24, 0.06);
  gap: 4px;
}

.mode-btn {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.mode-btn.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 3px 10px rgba(18, 33, 27, 0.08);
}

.auto-send-bar strong {
  justify-self: start;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.auto-send-bar strong.running {
  color: var(--accent-strong);
}

.auto-send-bar strong.manual {
  color: #8a5a10;
}

.auto-send-bar strong.blocked {
  color: #b33d2e;
}

.turn-card {
  border: 1px solid rgba(39, 56, 48, 0.08);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
  box-shadow: 0 4px 14px rgba(18, 33, 27, 0.04);
}

.turn-card h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.turn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.turn-summary {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.turn-block {
  border: 1px solid rgba(39, 56, 48, 0.08);
  border-radius: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.94);
  white-space: pre-wrap;
  line-height: 1.5;
  min-height: 56px;
  max-height: 140px;
  overflow: auto;
  font-size: 11px;
}

.turn-block strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.diff-before {
  color: #9a5b00;
  font-weight: 600;
}

.diff-after {
  color: #138813;
  font-weight: 600;
}

.turn-correction {
  margin: 8px 0 0;
  padding: 8px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(180deg, #f7fbf7 0%, #f1f8f3 100%);
  color: #314039;
  line-height: 1.55;
  font-size: 12px;
}

.turn-rule-box {
  margin-top: 8px;
  padding: 8px 9px;
  border: 1px solid #d9e7d7;
  border-radius: 6px;
  background: #f6fbf5;
}

.turn-rule-box strong {
  display: block;
  margin-bottom: 4px;
}

.turn-rule-box p,
.turn-rule-box small {
  margin: 0 0 6px;
  line-height: 1.5;
  font-size: 12px;
}

.learning-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  white-space: nowrap;
}

.checkline input {
  width: auto;
}

.empty-note {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #fbfcfa;
}

.report-view {
  display: grid;
  gap: 10px;
}

.report-card {
  padding: 14px;
  border: 1px solid #e5dccb;
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(214, 184, 122, 0.16), transparent 34%),
    linear-gradient(180deg, #fffdf8 0%, #f8f3ea 100%);
  box-shadow: 0 8px 24px rgba(104, 86, 46, 0.08);
}

.report-card-title {
  display: block;
  font-size: 15px;
  line-height: 1.5;
  color: #433723;
}

.report-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #85745c;
}

.report-summary {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: #5a4d3b;
}

.report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.report-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #80623a;
  color: #fffaf2;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.report-chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.report-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.94);
  border: 1px solid #eadfcf;
  color: #6d5b42;
  font-size: 12px;
}

.turn-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}

.mini-json {
  max-height: 120px;
  font-size: 12px;
}

.inspector section {
  margin-bottom: 14px;
}

dl {
  margin: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.field-row:has(.value-list),
.field-row:has(.compact-tags) {
  grid-template-columns: 1fr;
  gap: 4px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  word-break: break-word;
}

.value-list {
  margin: 0;
  padding-left: 18px;
}

.value-list li {
  margin-bottom: 4px;
  line-height: 1.55;
}

.compact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compact-tag {
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid #d8e1d9;
  border-radius: 6px;
  background: #f4f8f5;
  color: #314039;
  font-size: 12px;
  line-height: 1.35;
}

pre {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  white-space: pre-wrap;
  line-height: 1.5;
}

.debug-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.debug-details summary {
  cursor: pointer;
  color: var(--muted);
}

.debug-details p {
  margin: 8px 0 10px;
  color: var(--muted);
  line-height: 1.5;
}

.inspector-inline-head {
  align-items: flex-start;
}

.quote-meta {
  margin-top: 8px;
  line-height: 1.6;
}

.quote-table-shell {
  margin-top: 10px;
  border: 1px solid rgba(31, 52, 42, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  overflow: auto;
}

.quote-table-shell.hidden {
  display: none;
}

.quote-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.quote-table th,
.quote-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(31, 52, 42, 0.08);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.45;
  color: #30423a;
  white-space: nowrap;
}

.quote-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(244, 248, 246, 0.98);
  color: #486157;
  font-weight: 700;
}

.quote-table td:nth-child(6) {
  max-width: 240px;
  white-space: normal;
}

.layout-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.floor-plan-stage {
  position: relative;
  margin-top: 10px;
  border: 1px solid rgba(31, 52, 42, 0.1);
  border-radius: 8px;
  background: #f8faf9;
  overflow: hidden;
}

.floor-plan-stage.hidden {
  display: none;
}

.floor-plan-image {
  display: block;
  width: 100%;
  height: auto;
}

.floor-plan-marker-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floor-plan-marker {
  position: absolute;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: grid;
  gap: 3px;
  justify-items: center;
  color: #1b241f;
}

.floor-plan-marker span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--marker-color);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.18);
  font-size: 10px;
  font-weight: 700;
}

.floor-plan-marker strong {
  display: none;
}

.floor-plan-legend {
  margin-top: 8px;
}

.floor-plan-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.floor-plan-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(31, 52, 42, 0.08);
  border-radius: 999px;
  background: #fff;
  color: #35483f;
  font-size: 12px;
}

.floor-plan-legend-chip i {
  width: 17px;
  height: 17px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--marker-color);
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
}

.floor-plan-marker-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  max-height: 210px;
  overflow: auto;
  margin-top: 8px;
  padding: 6px;
  border: 1px solid rgba(31, 52, 42, 0.08);
  border-radius: 8px;
  background: #fbfcfa;
}

.floor-plan-marker-row {
  display: grid;
  grid-template-columns: 22px minmax(52px, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #35483f;
  font-size: 12px;
  line-height: 1.35;
}

.floor-plan-marker-row i {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--marker-color);
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
}

.floor-plan-marker-row span,
.floor-plan-marker-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-plan-marker-row span {
  color: #65746c;
  font-weight: 500;
}

.floor-plan-marker-row strong {
  color: #22322b;
  font-weight: 600;
}

.debug-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.debug-links a {
  color: var(--accent-strong);
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 84, 75, 0.35);
}

.cost-panel {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.cost-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cost-summary-grid article,
.cost-breakdown section {
  border: 1px solid rgba(36, 58, 49, 0.08);
  border-radius: 10px;
  background: rgba(247, 250, 248, 0.92);
  padding: 10px 12px;
}

.cost-summary-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.cost-summary-grid strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.cost-summary-grid span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.cost-breakdown {
  display: grid;
  gap: 8px;
}

.cost-breakdown h3 {
  margin: 0 0 8px;
  font-size: 12px;
  color: #42584f;
}

.cost-breakdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.cost-breakdown li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.cost-breakdown li span {
  min-width: 0;
  color: #30423a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-breakdown li strong {
  font-size: 12px;
}

.cost-breakdown li em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}

.sales-review-panel {
  display: grid;
  gap: 10px;
}

.sales-action-group {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.review-summary {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(36, 58, 49, 0.08);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(247, 250, 248, 0.96), rgba(238, 247, 241, 0.9));
}

.review-summary small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.review-summary small em {
  font-style: normal;
  color: var(--accent-strong);
  font-weight: 700;
}

.review-summary strong {
  display: block;
  color: #1d3028;
  font-size: 13px;
  line-height: 1.45;
}

.review-summary p {
  margin: 6px 0 0;
  color: #607168;
  font-size: 12px;
  line-height: 1.5;
}

.review-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.review-summary dl div {
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.review-summary dt {
  color: var(--muted);
  font-size: 11px;
}

.review-summary dd {
  margin: 2px 0 0;
  color: #1d3028;
  font-size: 16px;
  font-weight: 800;
}

.review-grid {
  display: grid;
  gap: 8px;
}

.review-grid section,
.review-rules {
  padding: 10px 12px;
  border: 1px solid rgba(36, 58, 49, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
}

.review-grid h3,
.review-rules h3 {
  margin: 0 0 8px;
  font-size: 12px;
  color: #42584f;
}

.review-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.review-grid li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: #30423a;
  font-size: 12px;
}

.review-grid li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-grid li strong {
  color: var(--accent-strong);
  font-size: 12px;
}

.review-rules p {
  margin: 0;
  padding: 7px 0;
  border-top: 1px solid rgba(36, 58, 49, 0.08);
  color: #30423a;
  font-size: 12px;
  line-height: 1.5;
}

.review-rules p:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.playbook-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(36, 58, 49, 0.08);
  border-radius: 10px;
  background:
    radial-gradient(circle at top right, rgba(36, 179, 83, 0.12), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 246, 0.94));
}

.playbook-active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 163, 63, 0.16);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(236, 250, 241, 0.94), rgba(255, 255, 255, 0.92));
}

.playbook-active strong {
  display: block;
  margin-bottom: 3px;
  color: #1d3028;
  font-size: 12px;
}

.playbook-active p {
  margin: 0;
  color: #607168;
  font-size: 11px;
  line-height: 1.4;
}

.playbook-active .mini-btn {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 9px;
  font-size: 11px;
}

.playbook-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.playbook-head small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}

.playbook-head strong {
  display: block;
  color: #1d3028;
  font-size: 13px;
}

.playbook-head em {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(31, 163, 63, 0.1);
  color: var(--accent-strong);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.playbook-head-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.playbook-head-actions .mini-btn {
  min-height: 26px;
  padding: 0 9px;
  font-size: 11px;
}

.playbook-principles {
  display: grid;
  gap: 6px;
}

.playbook-principles p {
  margin: 0;
  padding-left: 9px;
  border-left: 3px solid rgba(31, 163, 63, 0.38);
  color: #30423a;
  font-size: 12px;
  line-height: 1.5;
}

.playbook-sections {
  display: grid;
  gap: 8px;
}

.playbook-sections article {
  padding: 9px 10px;
  border: 1px solid rgba(36, 58, 49, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.82);
}

.playbook-sections h3 {
  margin: 0 0 5px;
  color: #1d3028;
  font-size: 12px;
}

.playbook-sections p {
  margin: 0 0 7px;
  color: #607168;
  font-size: 12px;
  line-height: 1.45;
}

.playbook-sections ul {
  margin: 0;
  padding-left: 16px;
  color: #30423a;
  font-size: 12px;
  line-height: 1.45;
}

.playbook-sections li + li {
  margin-top: 4px;
}

.risk-flags {
  margin-top: 8px;
}

.risk-item {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--warning-bg);
  color: var(--warning);
}

.active-rules-view {
  margin-top: 8px;
  border: 1px solid rgba(39, 56, 48, 0.08);
  border-radius: 8px;
  background: #f7faf8;
  color: #334039;
}

.active-rules-view.empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  color: var(--muted);
}

.active-rules-view.has-hit {
  border-color: #b9dfb6;
  background: #f3fbf2;
}

.active-rules-view details {
  padding: 8px 10px;
}

.active-rules-view summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.active-rules-view summary::-webkit-details-marker {
  display: none;
}

.active-rules-view span {
  font-weight: 700;
  color: #26332d;
}

.active-rules-view em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
}

.active-rules-view ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.active-rules-view li {
  margin: 5px 0;
  line-height: 1.45;
  color: #405047;
}

.active-rules-view b {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #e6f6e5;
  color: #177d19;
  font-size: 11px;
}

.rule-candidates {
  color: var(--muted);
  line-height: 1.5;
}

.rule-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  background: #fbfcfa;
  color: var(--text);
}

.rule-card strong {
  display: block;
  margin-bottom: 6px;
}

.rule-card p {
  margin: 0 0 6px;
  line-height: 1.55;
}

.rule-card small {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.intent-view {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid rgba(39, 56, 48, 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.intent-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.intent-score span {
  font-weight: 700;
}

.intent-score strong {
  color: var(--accent-strong);
  font-size: 18px;
}

.intent-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e8e5;
}

.intent-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8adf7b, var(--accent));
}

.intent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.intent-tags em {
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--accent-strong);
  font-style: normal;
  font-size: 12px;
}

.intent-view p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

.rule-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #1f2a24;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.18s ease;
  pointer-events: none;
}

.hidden {
  display: none !important;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 15, 20, 0.38);
  backdrop-filter: blur(4px);
}

.knowledge-modal {
  position: absolute;
  inset: 28px 36px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  background: rgba(250, 252, 251, 0.96);
  box-shadow: 0 28px 80px rgba(17, 31, 28, 0.22);
  overflow: hidden;
}

.knowledge-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 248, 0.92));
}

.knowledge-modal-head h2,
.knowledge-uploader h3,
.knowledge-library h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.knowledge-modal-head p,
.knowledge-uploader p,
.knowledge-library p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-close-btn {
  min-height: 34px;
  padding: 0 14px;
}

.knowledge-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
}

.knowledge-uploader,
.knowledge-library {
  min-width: 0;
  min-height: 0;
  padding: 18px 20px 22px;
}

.knowledge-uploader {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(243, 248, 244, 0.92));
}

.knowledge-library {
  overflow: auto;
}

.knowledge-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.knowledge-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.knowledge-form-grid label > span {
  font-size: 12px;
}

.knowledge-form-grid select,
.knowledge-form-grid input,
.knowledge-form-grid textarea {
  width: 100%;
}

.knowledge-form-grid textarea {
  min-height: 180px;
}

.knowledge-form-grid .span-2 {
  grid-column: span 2;
}

.knowledge-upload-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.knowledge-upload-actions small,
.knowledge-card small {
  color: var(--muted);
  line-height: 1.6;
}

.knowledge-subtitle {
  margin: 12px 0 10px;
  color: #3f5249;
  font-weight: 700;
}

.knowledge-notice {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.6;
  border: 1px solid rgba(39, 174, 96, 0.2);
  background: rgba(229, 248, 236, 0.92);
  color: #1c6b42;
}

.knowledge-notice.info {
  border-color: rgba(76, 124, 112, 0.16);
  background: rgba(243, 248, 246, 0.96);
  color: #496158;
}

.knowledge-builtin-list,
.knowledge-document-list {
  display: grid;
  gap: 10px;
}

.knowledge-fold {
  border: 1px solid rgba(32, 51, 43, 0.08);
  border-radius: 14px;
  background: rgba(248, 250, 249, 0.92);
  overflow: hidden;
}

.knowledge-fold-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  color: #30443c;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.knowledge-fold-summary::-webkit-details-marker {
  display: none;
}

.knowledge-fold-summary::after {
  content: "收起";
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

.knowledge-fold:not([open]) .knowledge-fold-summary::after {
  content: "展开";
}

.knowledge-fold-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.knowledge-card {
  border: 1px solid rgba(32, 51, 43, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
}

.knowledge-card.builtin {
  background: rgba(246, 249, 247, 0.94);
}

.knowledge-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.knowledge-card-head strong {
  font-size: 14px;
}

.knowledge-card-head span,
.knowledge-card-meta {
  color: var(--muted);
  font-size: 12px;
}

.knowledge-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.knowledge-card.is-new {
  border-color: rgba(39, 174, 96, 0.32);
  box-shadow: 0 0 0 1px rgba(39, 174, 96, 0.14), 0 18px 36px rgba(34, 139, 88, 0.12);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.wecom-sidebar-head {
  display: none;
}

body.wecom-sidebar {
  background:
    radial-gradient(circle at 92% 0%, rgba(26, 173, 25, 0.14), transparent 30%),
    linear-gradient(180deg, #f5f8f6 0%, #eef3f0 100%);
  min-width: 360px;
  overflow-x: hidden;
}

body.wecom-sidebar .app-shell {
  display: block;
  height: 100vh;
  overflow: auto;
  overflow-x: hidden;
  background: transparent;
}

body.wecom-sidebar .wecom-sidebar-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  gap: 12px;
  padding: 14px 18px 14px 12px;
  border-bottom: 1px solid rgba(39, 56, 48, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 248, 241, 0.92)),
    rgba(247, 249, 248, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 30px rgba(18, 33, 27, 0.08);
}

.wecom-head-main,
.wecom-head-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

body.wecom-sidebar .wecom-head-main,
body.wecom-sidebar .wecom-head-controls {
  display: grid;
  grid-template-columns: 1fr;
}

.wecom-head-main > div,
.wecom-head-controls label {
  min-width: 0;
}

.wecom-head-main span,
.wecom-head-controls span {
  display: block;
  color: #607168;
  font-size: 11px;
  margin-bottom: 3px;
  font-weight: 700;
}

.wecom-head-main strong {
  display: block;
  color: #14251d;
  font-size: 18px;
  line-height: 1.25;
}

.wecom-head-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.wecom-full-link {
  flex: 0 0 auto;
  max-width: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(39, 56, 48, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #30423a;
  text-decoration: none;
  font-size: 12px;
}

body.wecom-sidebar .wecom-full-link {
  display: none;
}

.wecom-head-controls label {
  flex: 1;
  min-width: 0;
}

.wecom-head-controls select {
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.wecom-intent-badge {
  flex: 0 0 auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef3f0;
  color: #607168;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(39, 56, 48, 0.05);
}

body.wecom-sidebar .wecom-intent-badge {
  justify-self: start;
}

.wecom-intent-badge.warm {
  background: #fff5df;
  color: #9a5b00;
}

.wecom-intent-badge.hot {
  background: #e8f8e8;
  color: var(--accent-strong);
}

.wecom-advantage-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.wecom-advantage-strip span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(31, 163, 63, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.68);
  color: #30423a;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.wecom-decision-panel {
  display: none;
}

.wecom-demo-panel {
  display: none;
}

body.wecom-sidebar .wecom-decision-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 10px 18px 0 10px;
  padding: 13px 14px;
  border: 1px solid rgba(39, 56, 48, 0.08);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(36, 179, 83, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 252, 249, 0.94));
  box-shadow: 0 10px 24px rgba(18, 33, 27, 0.08);
}

.decision-main small {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.decision-main strong {
  display: block;
  color: #14251d;
  font-size: 15px;
  line-height: 1.45;
}

.decision-main p {
  margin: 7px 0 0;
  color: #607168;
  line-height: 1.55;
}

.decision-side {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.decision-side span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef6f0;
  color: #30423a;
  font-size: 11px;
  font-weight: 700;
}

.decision-side span.risk {
  background: #fff4dc;
  color: #8a5a10;
}

body.wecom-sidebar .sidebar,
body.wecom-sidebar .contact-panel,
body.wecom-sidebar .col-resize-handle,
body.wecom-sidebar .compare-panel,
body.wecom-sidebar .side-secondary {
  display: none !important;
}

body.wecom-sidebar .workbench,
body.wecom-sidebar .inspector {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
  padding: 10px 18px 10px 10px;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

body.wecom-sidebar .workbench {
  gap: 10px;
}

body.wecom-sidebar .composer,
body.wecom-sidebar .draft-panel,
body.wecom-sidebar .inspector section {
  max-width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(18, 33, 27, 0.06);
}

body.wecom-sidebar .composer,
body.wecom-sidebar .draft-panel {
  padding: 12px;
}

body.wecom-sidebar .section-head,
body.wecom-sidebar .draft-head {
  display: block;
  gap: 8px;
  margin-bottom: 8px;
}

body.wecom-sidebar .section-head h2,
body.wecom-sidebar .draft-head h2,
body.wecom-sidebar .inspector h2 {
  font-size: 14px;
  margin-bottom: 4px;
}

body.wecom-sidebar .section-head p,
body.wecom-sidebar .draft-head p {
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

body.wecom-sidebar #customerInput {
  min-height: 96px;
  border-radius: 10px;
  background: #fbfdfb;
}

body.wecom-sidebar #generateQuoteBtn,
body.wecom-sidebar #uploadFloorPlanBtn,
body.wecom-sidebar #reportBtn,
body.wecom-sidebar #proactiveBtn {
  display: none;
}

body.wecom-sidebar .composer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

body.wecom-sidebar .composer-actions-main {
  grid-template-columns: 1fr;
}

body.wecom-sidebar .composer-actions-main .primary {
  min-height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #18b21d, #0d9415);
  box-shadow: 0 8px 18px rgba(26, 173, 25, 0.18);
}

body.wecom-sidebar .composer-actions button {
  width: 100%;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wecom-sidebar .draft-head {
  display: grid;
}

body.wecom-sidebar .auto-send-bar {
  width: 100%;
  justify-content: space-between;
  border-radius: 12px;
}

body.wecom-sidebar .auto-send-bar input {
  max-width: 58px;
}

body.wecom-sidebar .draft-messages textarea {
  min-height: 72px;
}

body.wecom-sidebar .inspector {
  display: grid;
  gap: 10px;
  padding-top: 0;
}

body.wecom-sidebar .inspector-core:first-of-type {
  order: -3;
}

body.wecom-sidebar .inspector-core:nth-of-type(2) {
  order: -2;
}

body.wecom-sidebar .inspector-core:nth-of-type(3) {
  order: -1;
}

body.wecom-sidebar .inspector section {
  margin-bottom: 0;
  padding: 11px 12px;
}

body.wecom-sidebar .field-row {
  grid-template-columns: 70px minmax(0, 1fr);
  padding: 5px 0;
  font-size: 12px;
}

body.wecom-sidebar .intent-view {
  min-width: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf7 100%);
}

body.wecom-sidebar .intent-score strong {
  font-size: 16px;
}

body.wecom-sidebar dd,
body.wecom-sidebar small,
body.wecom-sidebar p,
body.wecom-sidebar li {
  overflow-wrap: anywhere;
}

body.wecom-sidebar .field-row small {
  display: none;
}

body.wecom-sidebar .wecom-sidebar-head {
  gap: 8px;
  padding: 10px 14px 9px;
  border-bottom-color: rgba(23, 41, 32, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 245, 0.95)),
    rgba(250, 252, 251, 0.96);
  box-shadow: 0 8px 22px rgba(20, 37, 29, 0.08);
}

body.wecom-sidebar .wecom-head-main {
  display: block;
  align-items: center;
  gap: 8px;
}

body.wecom-sidebar .wecom-head-main span {
  margin: 0 0 1px;
  color: #718077;
  font-size: 10px;
  letter-spacing: 0;
}

body.wecom-sidebar .wecom-head-main strong {
  font-size: 16px;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wecom-connect-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2ef;
  color: #52635a;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

body.wecom-sidebar .wecom-connect-status {
  display: none;
}

.wecom-connect-status.mapped {
  background: #e8f7ec;
  color: #078420;
}

.wecom-connect-status.demo {
  background: #eef3ff;
  color: #315a9c;
}

body.wecom-sidebar .wecom-head-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 7px;
}

body.wecom-sidebar .wecom-head-controls span {
  margin-bottom: 2px;
  font-size: 10px;
}

body.wecom-sidebar .wecom-head-controls select {
  width: 100%;
  height: 30px;
  border-radius: 8px;
  font-size: 13px;
}

.wecom-bind-btn {
  height: 30px;
  min-width: 44px;
  padding: 0 9px;
  border: 1px solid rgba(24, 60, 38, 0.1);
  border-radius: 8px;
  background: #ffffff;
  color: #233b2e;
  font-size: 12px;
  font-weight: 800;
}

body.wecom-sidebar .wecom-bind-btn {
  display: none;
}

body.wecom-sidebar .wecom-intent-badge {
  display: none;
}

.wecom-customer-meta {
  margin: 0;
  color: #708078;
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wecom-sidebar .wecom-advantage-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

body.wecom-sidebar .wecom-advantage-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 4px;
  border: 1px solid rgba(31, 163, 63, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #2d4638;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

body.wecom-sidebar .wecom-decision-panel {
  margin: 8px 14px 0;
  padding: 10px 11px;
  gap: 7px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(18, 33, 27, 0.06);
}

body.wecom-demo-sidebar {
  background:
    radial-gradient(circle at 92% 0%, rgba(47, 104, 176, 0.12), transparent 30%),
    linear-gradient(180deg, #f5f8f6 0%, #edf2f5 100%);
}

body.wecom-demo-sidebar .wecom-sidebar-head {
  border-bottom-color: rgba(32, 72, 117, 0.1);
}

body.wecom-demo-sidebar .wecom-demo-panel {
  display: grid;
  gap: 8px;
  margin: 8px 14px 0;
  padding: 10px 11px;
  border: 1px solid rgba(39, 56, 48, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(18, 33, 27, 0.06);
}

.wecom-demo-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.wecom-demo-intro small {
  display: block;
  margin-bottom: 2px;
  color: #315a9c;
  font-size: 10px;
  font-weight: 800;
}

.wecom-demo-intro strong {
  display: block;
  color: #17251f;
  font-size: 13px;
  line-height: 1.35;
}

.wecom-demo-intro span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef3ff;
  color: #315a9c;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.wecom-demo-template-row,
.wecom-demo-scenario-row,
.wecom-demo-action-row {
  display: grid;
  gap: 6px;
}

.wecom-demo-template-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wecom-demo-scenario-row,
.wecom-demo-action-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wecom-demo-template-row a,
.wecom-demo-scenario-row button,
.wecom-demo-action-row button {
  min-width: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 1px solid rgba(39, 56, 48, 0.09);
  border-radius: 8px;
  background: #f8faf9;
  color: #243a2e;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wecom-demo-template-row a.active {
  border-color: rgba(49, 90, 156, 0.28);
  background: #eef3ff;
  color: #315a9c;
}

.wecom-demo-scenario-row button {
  background: #f6fbf7;
}

.wecom-demo-action-row button {
  background: #ffffff;
}

.wecom-demo-insight {
  padding: 9px 10px;
  border: 1px solid rgba(39, 56, 48, 0.08);
  border-radius: 10px;
  background: #fbfcfb;
}

.wecom-demo-insight strong {
  display: block;
  margin-bottom: 6px;
  color: #17251f;
  font-size: 12px;
}

.wecom-demo-insight p {
  margin: 0;
  color: #607168;
  font-size: 11px;
  line-height: 1.5;
}

.wecom-demo-insight dl {
  margin: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 5px 8px;
}

.wecom-demo-insight dt {
  color: #647069;
  font-size: 11px;
  font-weight: 800;
}

.wecom-demo-insight dd {
  margin: 0;
  color: #243a2e;
  font-size: 11px;
  line-height: 1.45;
}

body.wecom-sidebar .decision-main small {
  margin-bottom: 2px;
  font-size: 10px;
}

body.wecom-sidebar .decision-main strong {
  font-size: 14px;
  line-height: 1.35;
}

body.wecom-sidebar .decision-main p {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.wecom-sidebar .decision-side span {
  padding: 4px 7px;
  font-size: 10px;
}

body.wecom-sidebar .workbench,
body.wecom-sidebar .inspector {
  padding-left: 14px;
  padding-right: 14px;
}

body.wecom-sidebar .workbench {
  padding-top: 8px;
}

body.wecom-sidebar .composer,
body.wecom-sidebar .draft-panel,
body.wecom-sidebar .inspector section {
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(18, 33, 27, 0.05);
}

body.wecom-sidebar .composer,
body.wecom-sidebar .draft-panel {
  padding: 11px;
}

body.wecom-sidebar .section-head h2,
body.wecom-sidebar .draft-head h2,
body.wecom-sidebar .inspector h2 {
  font-size: 13px;
}

body.wecom-sidebar .section-head h2::before,
body.wecom-sidebar .draft-head h2::before,
body.wecom-sidebar .inspector h2::before {
  width: 4px;
  height: 15px;
  border-radius: 999px;
}

body.wecom-sidebar .section-head p,
body.wecom-sidebar .draft-head p {
  font-size: 11px;
}

body.wecom-sidebar #customerInput {
  min-height: 82px;
  font-size: 13px;
  line-height: 1.55;
}

body.wecom-sidebar .composer-actions-main .primary {
  min-height: 38px;
  font-size: 14px;
}

body.wecom-sidebar .draft-tools {
  margin-top: 7px;
}

body.wecom-sidebar .auto-send-bar {
  min-height: 34px;
  padding: 5px;
}

body.wecom-sidebar .mode-btn {
  min-height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

body.wecom-sidebar .auto-send-bar input {
  height: 24px;
  max-width: 50px;
  padding: 0 6px;
  font-size: 12px;
}

body.wecom-sidebar #autoSendStatus {
  font-size: 11px;
}

body.wecom-sidebar .draft-message-row {
  grid-template-columns: minmax(0, 1fr);
}

body.wecom-sidebar .draft-message-row textarea,
body.wecom-sidebar .draft-messages textarea {
  min-height: 66px;
  font-size: 13px;
  line-height: 1.55;
}

body.wecom-sidebar .draft-message-row > div {
  display: grid;
  grid-template-columns: 1fr 52px;
  align-items: center;
  gap: 6px;
}

body.wecom-sidebar .draft-delete {
  min-height: 26px;
  margin-top: 0;
  font-size: 11px;
}

body.wecom-sidebar .draft-panel > .composer-actions {
  grid-template-columns: 1fr;
}

body.wecom-sidebar #confirmBtn {
  order: -1;
  min-height: 38px;
  font-size: 13px;
}

body.wecom-sidebar .risk-flags {
  margin-top: 7px;
}

body.wecom-sidebar .inspector {
  gap: 8px;
}

body.wecom-sidebar .inspector section {
  padding: 10px 11px;
}

body.wecom-sidebar .inspector-core:nth-of-type(2),
body.wecom-sidebar .inspector-core:nth-of-type(3) {
  max-height: 188px;
  overflow: auto;
}

body.wecom-sidebar .field-row {
  grid-template-columns: 68px minmax(0, 1fr);
  padding: 4px 0;
  font-size: 12px;
}

@media (max-width: 1220px) {
  .app-shell {
    grid-template-columns:
      280px 6px
      minmax(360px, 1fr) 6px
      340px;
  }

  .contact-panel,
  #middleResize {
    display: none;
  }

  .turn-grid {
    grid-template-columns: 1fr;
  }

  .composer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar,
  .contact-panel,
  .workbench {
    height: auto;
  }

  .messages {
    max-height: 46vh;
  }
}

body.wecom-demo-sidebar {
  min-width: 0;
  overflow: hidden;
  background: #e8e8ea;
}

body.wecom-demo-sidebar .app-shell {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 480px) minmax(280px, 360px);
  grid-template-rows: auto auto auto minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  background: #e8e8ea;
}

body.wecom-demo-sidebar .contact-panel {
  grid-column: 1;
  grid-row: 1 / 5;
  display: flex !important;
  height: 100vh;
  min-height: 0;
  border-right: 1px solid #d1d2d5;
  background: #f3f3f4;
}

body.wecom-demo-sidebar .conversation-topbar {
  min-height: 56px;
  padding: 11px 16px;
  border-bottom: 1px solid #d8d8d8;
  background: #f7f7f7;
}

body.wecom-demo-sidebar .conversation-topbar .topbar-title h1 {
  font-size: 16px;
}

body.wecom-demo-sidebar .conversation-topbar #clearContactBtn {
  min-height: 28px;
  border-radius: 6px;
  background: #fff;
}

body.wecom-demo-sidebar .wecom-demo-chat-tools {
  display: grid;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #d8d8d8;
  background: #ededee;
}

body.wecom-demo-sidebar .wecom-demo-chat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

body.wecom-demo-sidebar .wecom-demo-chat-head small {
  display: block;
  margin-bottom: 1px;
  color: #69706d;
  font-size: 10px;
  font-weight: 800;
}

body.wecom-demo-sidebar .wecom-demo-chat-head strong {
  display: block;
  color: #1f2924;
  font-size: 13px;
}

body.wecom-demo-sidebar .wecom-demo-chat-head span {
  color: #69706d;
  font-size: 11px;
  white-space: nowrap;
}

body.wecom-demo-sidebar .contact-panel .wecom-demo-template-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.wecom-demo-sidebar .contact-panel .wecom-demo-scenario-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.wecom-demo-sidebar .messages {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 80px),
    #ededee;
  padding: 18px 18px 22px;
}

body.wecom-demo-sidebar .message {
  max-width: min(74%, 560px);
}

body.wecom-demo-sidebar .message-bubble {
  border-color: #dfdfdf;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(15, 20, 18, 0.05);
}

body.wecom-demo-sidebar .message.human_final .message-bubble {
  background: #95ec69;
  border-color: #87dc5e;
}

body.wecom-demo-sidebar .message-avatar {
  border-radius: 4px;
  background: #d7ded9;
}

body.wecom-demo-sidebar .wecom-sidebar-head {
  grid-column: 2 / 4;
  grid-row: 1;
  position: static;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #d8d8d8;
  border-left: 0;
  background: #f7f7f7;
  box-shadow: none;
}

body.wecom-demo-sidebar .wecom-head-main {
  display: flex;
  align-items: center;
}

body.wecom-demo-sidebar .wecom-head-main strong {
  font-size: 15px;
}

body.wecom-demo-sidebar .wecom-head-controls {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
}

body.wecom-demo-sidebar .wecom-bind-btn,
body.wecom-demo-sidebar .wecom-intent-badge,
body.wecom-demo-sidebar .wecom-connect-status {
  display: inline-flex;
}

body.wecom-demo-sidebar .wecom-customer-meta {
  white-space: normal;
}

body.wecom-demo-sidebar .wecom-advantage-strip {
  display: none;
}

body.wecom-demo-sidebar .wecom-demo-panel {
  grid-column: 2 / 4;
  grid-row: 2;
  margin: 8px 10px 0;
  padding: 9px 10px;
  border-radius: 8px;
}

body.wecom-demo-sidebar .wecom-decision-panel {
  grid-column: 2 / 4;
  grid-row: 3;
  margin: 8px 10px 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

body.wecom-demo-sidebar .decision-main strong {
  font-size: 13px;
}

body.wecom-demo-sidebar .decision-main p {
  -webkit-line-clamp: 1;
}

body.wecom-demo-sidebar .workbench {
  grid-column: 2;
  grid-row: 4;
  height: auto;
  min-height: 0;
  overflow: auto;
  padding: 10px 8px 12px 10px;
  gap: 8px;
}

body.wecom-demo-sidebar .inspector {
  grid-column: 3;
  grid-row: 4;
  display: grid;
  align-content: start;
  height: auto;
  min-height: 0;
  overflow: auto;
  padding: 10px 10px 12px 0;
  gap: 8px;
}

body.wecom-demo-sidebar .composer,
body.wecom-demo-sidebar .draft-panel,
body.wecom-demo-sidebar .inspector section {
  border-radius: 8px;
  border-color: #dedede;
  background: #ffffff;
  box-shadow: none;
}

body.wecom-demo-sidebar .composer,
body.wecom-demo-sidebar .draft-panel {
  padding: 10px;
}

body.wecom-demo-sidebar .section-head,
body.wecom-demo-sidebar .draft-head {
  margin-bottom: 7px;
}

body.wecom-demo-sidebar .section-head h2,
body.wecom-demo-sidebar .draft-head h2,
body.wecom-demo-sidebar .inspector h2 {
  padding-left: 0;
  margin-bottom: 2px;
  font-size: 13px;
}

body.wecom-demo-sidebar .section-head h2::before,
body.wecom-demo-sidebar .draft-head h2::before,
body.wecom-demo-sidebar .inspector h2::before {
  display: none;
}

body.wecom-demo-sidebar .section-head p,
body.wecom-demo-sidebar .draft-head p {
  font-size: 11px;
}

body.wecom-demo-sidebar #customerInput {
  min-height: 78px;
  border-radius: 6px;
}

body.wecom-demo-sidebar .composer-actions,
body.wecom-demo-sidebar .draft-panel > .composer-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

body.wecom-demo-sidebar #confirmBtn {
  order: -1;
  grid-column: 1 / -1;
}

body.wecom-demo-sidebar .draft-tools {
  margin-top: 0;
}

body.wecom-demo-sidebar .auto-send-bar {
  min-height: 30px;
  padding: 4px;
  border-radius: 7px;
}

body.wecom-demo-sidebar .draft-message-row textarea,
body.wecom-demo-sidebar .draft-messages textarea {
  min-height: 62px;
  border-radius: 6px;
}

body.wecom-demo-sidebar .inspector-core:nth-of-type(2),
body.wecom-demo-sidebar .inspector-core:nth-of-type(3) {
  max-height: none;
}

body.wecom-demo-sidebar .field-row {
  grid-template-columns: 64px minmax(0, 1fr);
}

@media (max-width: 1180px) {
  body.wecom-demo-sidebar .app-shell {
    grid-template-columns: minmax(360px, 45vw) minmax(360px, 1fr);
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
  }

  body.wecom-demo-sidebar .contact-panel {
    grid-column: 1;
    grid-row: 1 / 6;
    display: flex !important;
  }

  body.wecom-demo-sidebar .wecom-sidebar-head,
  body.wecom-demo-sidebar .wecom-demo-panel,
  body.wecom-demo-sidebar .wecom-decision-panel,
  body.wecom-demo-sidebar .workbench,
  body.wecom-demo-sidebar .inspector {
    grid-column: 2;
  }

  body.wecom-demo-sidebar .wecom-sidebar-head {
    grid-row: 1;
  }

  body.wecom-demo-sidebar .wecom-demo-panel {
    grid-row: 2;
  }

  body.wecom-demo-sidebar .wecom-decision-panel {
    grid-row: 3;
  }

  body.wecom-demo-sidebar .workbench {
    grid-row: 4;
    min-height: 0;
    max-height: none;
  }

  body.wecom-demo-sidebar .inspector {
    grid-row: 5;
    padding-left: 10px;
  }

  body.wecom-demo-sidebar .contact-panel .wecom-demo-scenario-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body.wecom-demo-sidebar {
    overflow: auto;
  }

  body.wecom-demo-sidebar .app-shell {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  body.wecom-demo-sidebar .contact-panel {
    height: 48vh;
    min-height: 360px;
    display: flex !important;
  }

  body.wecom-demo-sidebar .messages {
    max-height: none;
  }

  body.wecom-demo-sidebar .workbench,
  body.wecom-demo-sidebar .inspector {
    height: auto;
    overflow: visible;
    padding: 10px;
  }
}
