:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #182235;
  --muted: #66758d;
  --line: #dbe3ef;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #dff4f0;
  --blue: #2364e8;
  --blue-soft: #e9f0ff;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --warn: #b86b00;
  --warn-soft: #fff3d6;
  --green: #159b68;
  --green-soft: #e8f7f1;
  --amber: #c47810;
  --amber-soft: #fff4df;
  --red: #d64545;
  --red-soft: #fff0f0;
  --cyan: #0f8da8;
  --cyan-soft: #e7f8fb;
  --shadow: 0 14px 36px rgba(20, 38, 69, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: #eef2f7;
}

.login-screen.hidden {
  display: none;
}

.login-card {
  width: min(420px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  display: grid;
  gap: 12px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.login-brand {
  color: var(--ink);
  margin-bottom: 8px;
}

.login-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  min-height: 38px;
  font-weight: 600;
}

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

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

input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  color: var(--ink);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid var(--line);
}

.brand {
  height: 42px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.brand p {
  display: none;
}

nav {
  display: grid;
}

.sidebar nav {
  flex: 1;
  min-height: 0;
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
  overflow-y: auto;
}

.nav-section-title {
  margin: 20px 10px 8px;
  color: #8a98ad;
  font-size: 12px;
  font-weight: 700;
}

.nav-item {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: #47566e;
  background: transparent;
  border-color: transparent;
  border-radius: 8px;
  padding: 0 12px;
  margin-bottom: 4px;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.nav-item::before {
  content: attr(data-icon);
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  font-weight: 500;
}

.nav-item:hover:not(.active) {
  background: #f6f9ff;
  color: #1f3b63;
  font-weight: 700;
}

.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
  box-shadow: inset 3px 0 0 var(--blue);
}

.hidden,
.nav-item.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.sidebar-account {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.current-user {
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid #d7e2f2;
  border-radius: 8px;
  background: #f8fbff;
  color: #334155;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
}

.sidebar-logout {
  width: 100%;
  min-height: 38px;
  border-color: #d7e2f2;
  background: #fff;
  color: #47566e;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.sidebar-logout:hover:not(:disabled) {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b42318;
}

.health {
  display: none;
}

.main {
  padding: 0 30px 28px;
  min-width: 0;
  display: grid;
  gap: 16px;
}

body.dashboard-view .main {
  padding: 24px 28px 32px;
  display: block;
}

body.report-view .main {
  padding: 24px 28px 38px;
  display: block;
}

body.workspace-view .main {
  height: 100vh;
  padding: 10px 10px;
  display: block;
  overflow: hidden;
  background: #eef3f9;
}

body.workspace-view #workspace {
  height: 100%;
  min-height: 0;
}

body.tags-view .main {
  padding: 24px 28px 38px;
  display: block;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: none;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background: rgba(238, 242, 246, 0.92);
  border-bottom: 1px solid rgba(216, 224, 234, 0.86);
  padding: 10px 0 14px;
  backdrop-filter: blur(10px);
}

body.dashboard-view .topbar {
  display: none;
}

body.workspace-view .topbar {
  display: none;
}

body.report-view .topbar {
  display: none;
}

body.tags-view .topbar {
  display: none;
}

.topbar h1 {
  margin: 3px 0 3px;
  font-size: 24px;
  line-height: 1.2;
}

.topbar p {
  margin: 0;
  color: var(--muted);
}

.topbar-kicker,
.section-eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

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

.topbar-health {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #b7dfd8;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.toolbar h2 {
  margin: 0;
  font-size: 18px;
}

.toolbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.workspace-page {
  display: block;
  height: 100%;
  min-height: 0;
}

.workspace-page-head {
  display: none;
}

.workspace-page-head h2 {
  margin: 0;
  color: #06152e;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 850;
}

.workspace-page-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.workspace-search {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 8px;
}

.workspace-search input {
  height: 38px;
  border-radius: 8px;
  background: #fff;
}

.workspace-head-actions > button,
.workspace-search button {
  min-height: 38px;
  border-radius: 8px;
  font-weight: 900;
}

.workspace-head-actions > #refreshBtn {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.workspace-head-actions > #startAiTestChatBtn {
  border-color: #0e8f78;
  color: #06735f;
  background: #f0fffb;
}

.workspace-head-actions > #startAiTestChatBtn:hover {
  background: #dffbf3;
}

.workspace-search button {
  border-color: var(--line);
  color: #06152e;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 132px minmax(300px, 340px) minmax(680px, 1fr) minmax(292px, 332px);
  gap: 0;
  height: calc(100vh - 20px);
  min-height: 760px;
  border: 1px solid #d7e1ee;
  border-radius: 14px;
  background: #f7faff;
  box-shadow: 0 18px 38px rgba(17, 36, 68, 0.08);
  overflow: hidden;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(360px, 1fr);
  gap: 14px;
}

.stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.oauth-panel {
  margin-bottom: 14px;
}

.meta-wizard-panel {
  margin-bottom: 14px;
}

.meta-wizard-panel > summary,
.oauth-panel > summary,
.channel-manual-panel > summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meta-wizard-panel > summary::-webkit-details-marker,
.oauth-panel > summary::-webkit-details-marker,
.channel-manual-panel > summary::-webkit-details-marker {
  display: none;
}

.meta-wizard-panel > summary::after,
.oauth-panel > summary::after,
.channel-manual-panel > summary::after {
  content: "展开";
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.meta-wizard-panel[open] > summary::after,
.oauth-panel[open] > summary::after,
.channel-manual-panel[open] > summary::after {
  content: "收起";
}

.section-note {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.wizard-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.wizard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.wizard-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.wizard-step.done {
  border-color: #b7dfd8;
  background: var(--accent-soft);
}

.wizard-step.current {
  border-color: var(--accent);
  background: #f7fffd;
}

.wizard-step.todo {
  background: #f8fafc;
}

.wizard-step strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.wizard-step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.wizard-actions {
  display: grid;
  grid-template-columns: minmax(220px, 320px) repeat(3, auto);
  gap: 8px;
  align-items: start;
  margin-bottom: 12px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.asset-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 7px;
}

.asset-card.connected {
  border-color: #b7dfd8;
  background: var(--accent-soft);
}

.asset-card h4 {
  margin: 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.asset-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.channel-ops-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.channel-ops-head,
.channel-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.channel-ops-head p,
.channel-list-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.channel-ops-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}

.channel-ops-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.channel-ops-metric.ok {
  border-color: #b7dfd8;
  background: #f7fffd;
}

.channel-ops-metric.warn {
  border-color: #fed7aa;
  background: #fffaf2;
}

.channel-ops-metric span,
.channel-ops-metric small {
  color: var(--muted);
  font-size: 12px;
}

.channel-ops-metric strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}

.channel-smart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

#channels {
  min-height: 100vh;
}

body.channels-view .main {
  padding: 0;
  display: block;
  background: #fff;
}

.channel-integration-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.channel-integration-rail {
  display: block;
  border-right: 1px solid #e4ebf5;
  background: #eef4fc;
  padding: 18px 12px;
}

.channel-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 36px;
  padding: 0 4px;
  margin-bottom: 18px;
}

.channel-rail-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.channel-rail-head button {
  width: 26px;
  height: 26px;
  min-height: 26px;
  border: 0;
  background: transparent;
  color: #475569;
  padding: 0;
  font-weight: 900;
}

.channel-rail-nav {
  display: grid;
  gap: 4px;
  align-content: start;
}

.channel-rail-section {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1;
  padding: 12px 4px 6px;
}

.channel-rail-link {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  padding: 6px 8px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.channel-rail-link.muted {
  grid-template-columns: minmax(0, 1fr);
  color: #64748b;
  font-weight: 700;
}

.channel-rail-link.active {
  background: #dce8ff;
  color: #0b5cff;
}

.channel-rail-link em {
  min-width: 22px;
  justify-self: end;
  border-radius: 999px;
  background: #d9fbd8;
  color: #16a34a;
  padding: 2px 6px;
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.channel-rail-link small {
  justify-self: end;
  border-radius: 4px;
  background: #fff1d6;
  color: #f97316;
  padding: 1px 4px;
  font-size: 10px;
  font-weight: 900;
}

.channel-rail-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.channel-rail-icon.messenger {
  background: #2563eb;
  font-style: italic;
}

.channel-rail-icon.whatsapp {
  background: #22c55e;
}

.channel-integration-content {
  min-width: 0;
  padding: 22px 16px 20px;
  background: #fff;
}

.channel-smart-title {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
}

.channel-smart-title h2 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.channel-rail-context {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

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

.channel-bulk-wrap {
  position: relative;
}

.channel-bulk-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  min-width: 150px;
  display: grid;
  gap: 2px;
  border: 1px solid #e5eaf2;
  border-radius: 7px;
  background: #fff;
  padding: 7px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.channel-bulk-menu.hidden {
  display: none;
}

.channel-bulk-menu button {
  min-height: 34px;
  justify-content: flex-start;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #334155;
  padding: 7px 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.channel-bulk-menu button:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.channel-bulk-menu button:disabled {
  color: #b3bdca;
  cursor: not-allowed;
}

.channel-table-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.channel-table-toolbar input {
  width: 240px;
}

.channel-table-toolbar select {
  width: auto;
  min-width: 110px;
  border: 0;
  background: transparent;
  color: #475569;
  padding-left: 8px;
  padding-right: 18px;
  font-weight: 700;
}

.channel-table-toolbar input,
.channel-table-toolbar select {
  min-height: 34px;
  border-radius: 6px;
}

.wizard-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
  color: var(--muted);
}

.wizard-empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.wizard-empty p {
  margin: 4px 0 0;
  font-size: 13px;
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.endpoint-grid,
.command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.endpoint-card,
.command-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  min-width: 0;
}

.endpoint-card strong,
.command-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--muted);
}

.endpoint-card code,
.command-card code {
  display: block;
  border: 1px solid #d7dee8;
  border-radius: 6px;
  padding: 8px;
  background: #f8fafc;
  color: var(--ink);
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.readiness-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.readiness-card.warning {
  border-left-color: var(--warn);
}

.readiness-card.blocked {
  border-left-color: var(--danger);
}

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

.readiness-card h4 {
  margin: 0;
  font-size: 15px;
}

.readiness-items {
  display: grid;
  gap: 8px;
}

.readiness-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 13px;
}

.readiness-item span {
  color: var(--accent);
  font-weight: 700;
}

.readiness-item.warning span {
  color: var(--warn);
}

.readiness-item.blocker span {
  color: var(--danger);
}

.readiness-item p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.advanced-config {
  margin-bottom: 14px;
}

.advanced-config summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 12px;
}

.oauth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  align-items: start;
  margin-bottom: 10px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

body.dashboard-view .panel {
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.dashboard-view .panel-title {
  min-height: 56px;
  margin: 0;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 800;
}

body.dashboard-view .panel-title small {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-page {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: none;
}

.dashboard-page-head {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-bottom: 4px;
}

.dashboard-page-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 850;
  color: #06152e;
}

.dashboard-page-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.dashboard-period-tabs {
  display: flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 4px 14px rgba(20, 38, 69, 0.04);
}

.period-tab {
  min-width: 64px;
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  color: #5f6f87;
  border-radius: 6px;
  font-size: 13px;
}

.period-tab.active,
.period-tab:hover {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.period-custom {
  width: 148px;
  position: relative;
}

.period-custom-toggle {
  width: 100%;
  height: 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #42516a;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(20, 38, 69, 0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.period-custom-toggle.active,
.period-custom-toggle:hover {
  border-color: #bfd0f7;
  color: var(--blue);
}

.period-custom-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12;
  width: 300px;
  padding: 12px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(20, 38, 69, 0.16);
}

.period-custom-panel.hidden {
  display: none;
}

.period-custom-panel label {
  display: grid;
  gap: 6px;
  color: #43526a;
  font-size: 12px;
  font-weight: 700;
}

.period-custom-panel input {
  height: 36px;
  border-radius: 6px;
}

.period-custom-panel button {
  height: 36px;
  min-height: 36px;
  border-color: #cbdaf8;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.dashboard-kpi-card {
  min-height: 124px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 38, 69, 0.05);
}

.kpi-card-top,
.kpi-card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.kpi-card-top span {
  color: var(--muted);
  font-size: 13px;
}

.kpi-card-top em {
  font-style: normal;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.kpi-card-top em.up {
  color: var(--green);
  background: var(--green-soft);
}

.kpi-card-top em.down {
  color: var(--red);
  background: var(--red-soft);
}

.kpi-card-top em.flat {
  color: var(--cyan);
  background: var(--cyan-soft);
}

.kpi-card-top em.warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.dashboard-kpi-card strong {
  color: #071833;
  font-size: 30px;
  font-weight: 850;
  line-height: 1;
}

.kpi-card-bottom span,
.performance-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-main-grid,
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.95fr;
  gap: 18px;
}

.dashboard-insight-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}

.dashboard-right-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.trend-chart {
  height: 290px;
  padding: 20px 20px 16px;
  position: relative;
}

.trend-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  position: absolute;
  top: 18px;
  right: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.leads {
  background: var(--blue);
}

.legend-dot.effective {
  background: var(--green);
}

.legend-dot.purchased {
  background: var(--amber);
}

.trend-line-wrap {
  height: 100%;
  overflow: hidden;
}

.trend-line-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.trend-grid-lines line {
  stroke: #e7edf5;
  stroke-width: 1;
}

.trend-area.leads {
  fill: url(#dashboardAreaBlue);
}

.trend-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-line.leads,
.trend-point.leads {
  stroke: var(--blue);
  fill: var(--blue);
}

.trend-line.effective,
.trend-point.effective {
  stroke: var(--green);
  fill: var(--green);
}

.trend-line.purchased,
.trend-point.purchased {
  stroke: var(--amber);
  fill: var(--amber);
}

.trend-axis-label {
  fill: var(--muted);
  font-size: 12px;
}

.stage-funnel {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.stage {
  display: grid;
  grid-template-columns: 82px 1fr 56px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.stage-name {
  color: #43526a;
  font-weight: 700;
}

.stage-bar {
  height: 12px;
  border-radius: 999px;
  background: #edf2f8;
  overflow: hidden;
}

.stage-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), #15a37a);
}

.stage-num {
  text-align: right;
  font-weight: 800;
}

.focus-table {
  padding: 0 18px 18px;
  overflow-x: auto;
}

.focus-table table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  font-size: 13px;
}

.focus-table th {
  text-align: left;
  color: #7a899f;
  font-weight: 700;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
}

.focus-table td {
  padding: 13px 8px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

.focus-row {
  cursor: pointer;
}

.focus-row:hover td {
  background: #f9fbff;
}

.customer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dce8ff;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-weight: 900;
  flex: 0 0 auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: #50617a;
  font-size: 12px;
  white-space: nowrap;
  font-style: normal;
}

.tag.intent {
  background: var(--green-soft);
  color: var(--green);
  border-color: #bee9d7;
  font-weight: 700;
}

.tag.warning {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: #f4d69d;
  font-weight: 700;
}

.tag.risk {
  background: var(--red-soft);
  color: var(--red);
  border-color: #f6caca;
  font-weight: 700;
}

.ai-action {
  color: #25334a;
  font-weight: 700;
}

.customer-table-wrap {
  overflow-x: auto;
}

.customer-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 13px;
}

.customer-table th {
  text-align: left;
  color: #7a899f;
  font-weight: 700;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}

.customer-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

.customer-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.customer-list-row {
  cursor: pointer;
}

.customer-list-row:hover td {
  background: #f9fbff;
}

.customer-list-row.active td {
  background: #eef5ff;
}

.customer-owner-cell {
  display: grid;
  gap: 5px;
  align-content: center;
}

.customer-owner-cell .assignment-badge {
  width: max-content;
  max-width: 180px;
}

.customer-latest-cell {
  min-width: 140px;
  display: grid;
  gap: 4px;
}

.customer-latest-cell strong {
  color: #132b46;
  font-size: 13px;
  font-weight: 900;
}

.customer-latest-cell small {
  max-width: 190px;
  overflow: hidden;
  color: #667892;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customers-view .main {
  padding: 22px 28px;
}

.customers-page {
  display: grid;
  gap: 16px;
}

.customers-page-head {
  min-height: 52px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.customers-page-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.customers-page-head p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.customers-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 0 0 auto;
}

.customer-period-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 1fr));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  box-shadow: var(--shadow-soft);
}

.customer-period-tab {
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #42526d;
  font-weight: 800;
}

.customer-period-tab.active {
  background: var(--accent);
  color: #fff;
}

.customer-custom-date {
  position: relative;
}

.customer-custom-toggle {
  min-width: 136px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #33445f;
  padding: 0 14px;
  font-weight: 800;
}

.customer-custom-toggle.active {
  border-color: var(--accent);
  color: var(--accent);
}

.customer-custom-panel {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 20;
  width: 300px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgb(15 35 75 / 14%);
}

.customer-custom-panel label {
  display: grid;
  gap: 6px;
  color: #53627a;
  font-size: 13px;
  font-weight: 700;
}

.customer-custom-panel input {
  height: 38px;
  border: 1px solid #d5dfef;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
}

.customer-custom-panel button {
  width: 100%;
  height: 36px;
  margin-top: 10px;
}

.customer-reply-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
  color: #075985;
  box-shadow: var(--shadow-soft);
}

.customer-reply-summary strong {
  font-size: 15px;
}

.customer-reply-summary span {
  color: #27647f;
  font-size: 13px;
}

.customer-search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(5, minmax(120px, 1fr)) 86px;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.customer-search-panel input,
.customer-search-panel select {
  min-width: 0;
  height: 38px;
  border: 1px solid #d5dfef;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.customer-subnav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.customer-subnav button {
  min-width: 112px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #40536f;
  font-weight: 900;
}

.customer-subnav button.active {
  background: var(--accent);
  color: #fff;
}

.customer-subnav span {
  display: inline-flex;
  min-width: 22px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  border-radius: 999px;
  background: #e8f6ef;
  color: #087c61;
  font-size: 12px;
}

.customer-subnav button.active span {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.customer-assets-section {
  display: grid;
  gap: 16px;
}

.customer-assets-section.hidden,
.customer-data-section.hidden,
.customer-orders-section.hidden {
  display: none;
}

.customer-data-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.customer-data-filterbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.customer-data-filterbar input,
.customer-data-filterbar select {
  height: 40px;
  border: 1px solid #cdd8ea;
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
}

.customer-data-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
}

.customer-data-kpis article {
  border: 1px solid #d6e1ef;
  border-radius: 6px;
  padding: 12px 14px;
  background: #f8fbff;
}

.customer-data-kpis span {
  display: block;
  color: #5e6f89;
  font-size: 12px;
  font-weight: 800;
}

.customer-data-kpis strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.customer-data-table-wrap {
  overflow: auto;
  border-top: 1px solid var(--line);
}

.customer-data-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 13px;
}

.customer-data-table th,
.customer-data-table td {
  border-bottom: 1px solid #e1e8f2;
  padding: 14px 16px;
  color: var(--ink);
  text-align: left;
  vertical-align: middle;
}

.customer-data-table th {
  background: #f8fafc;
  color: #465772;
  font-weight: 900;
}

.customer-data-table small {
  display: block;
  margin-top: 4px;
  color: #6b7b92;
  font-size: 12px;
}

.customer-data-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.customer-message-snippet {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-search-table .customer-message-snippet {
  max-width: 420px;
}

.customer-orders-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.order-panel-title {
  align-items: flex-start;
  padding-top: 14px;
  padding-bottom: 14px;
}

.order-panel-title p {
  margin: 6px 0 0;
  color: #5f6f87;
  font-size: 13px;
}

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

.order-filterbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.order-filterbar input,
.order-filterbar select {
  height: 38px;
  border: 1px solid #d5dfef;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.order-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px;
}

.order-kpi-card {
  min-height: 94px;
  border: 1px solid #d7e3f1;
  border-left: 4px solid #8aa3c4;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.order-kpi-card.pending {
  border-left-color: #d18818;
}

.order-kpi-card.confirmed {
  border-left-color: #09826c;
}

.order-kpi-card.rejected {
  border-left-color: #d23c4a;
}

.order-kpi-card span,
.order-kpi-card em {
  display: block;
  color: #5b6b83;
  font-size: 13px;
  font-style: normal;
}

.order-kpi-card strong {
  display: block;
  margin: 8px 0 7px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.order-table-wrap {
  overflow: auto;
  border-top: 1px solid var(--line);
}

.order-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.order-table th,
.order-table td {
  border-bottom: 1px solid #e1e8f2;
  padding: 14px 16px;
  color: var(--ink);
  text-align: left;
  vertical-align: middle;
}

.order-table th {
  background: #f8fafc;
  color: #465772;
  font-size: 13px;
  font-weight: 900;
}

.order-table td small {
  display: block;
  margin-top: 4px;
  color: #6b7b92;
  font-size: 12px;
}

.order-customer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-evidence {
  max-width: 360px;
  color: #1f3048;
  line-height: 1.45;
}

.order-confidence {
  display: grid;
  gap: 6px;
  width: 90px;
}

.order-confidence strong {
  font-size: 13px;
}

.order-confidence i {
  display: block;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #e7edf6;
}

.order-confidence span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2275ff, #10a37f);
}

.order-status {
  display: inline-flex;
  align-items: center;
  min-width: 64px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.order-status.pending {
  background: #fff4df;
  color: #a46200;
}

.order-status.confirmed {
  background: #e3f8ef;
  color: #087c61;
}

.order-status.rejected {
  background: #ffe7ea;
  color: #bd2434;
}

.danger-link {
  border: 0;
  background: transparent;
  color: #d6313f;
  font-weight: 900;
}

.order-list-hint {
  padding: 12px 18px;
  color: #60728b;
  font-size: 13px;
}

.customer-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.customer-kpi-card,
.customer-list-panel,
.customer-detail-panel,
.customer-segment-panel,
.customer-bottom-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.customer-kpi-card {
  min-height: 112px;
  padding: 16px;
}

.customer-kpi-top,
.customer-kpi-foot,
.customer-panel-title,
.customer-list-tools,
.customer-runtime-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-kpi-top span {
  color: #53627a;
  font-weight: 700;
}

.customer-kpi-top em {
  border-radius: 999px;
  padding: 4px 9px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.customer-kpi-top em.green,
.customer-kpi-top em.cyan {
  background: #e4f8ee;
  color: #009d61;
}

.customer-kpi-top em.amber {
  background: #fff3dc;
  color: #bd7100;
}

.customer-kpi-top em.red {
  background: #ffe7e8;
  color: #d33b3f;
}

.customer-kpi-top em.blue {
  background: #eaf2ff;
  color: var(--accent);
}

.customer-kpi-card strong {
  display: block;
  margin-top: 14px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.customer-kpi-foot {
  margin-top: 12px;
  color: #52627a;
  font-size: 13px;
}

.customer-asset-shell {
  display: grid;
  grid-template-columns: 170px minmax(560px, 1.45fr) minmax(300px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.customer-segment-panel,
.customer-list-panel,
.customer-detail-panel {
  min-height: 560px;
}

.customer-segment-panel {
  min-height: 0;
  padding: 12px;
}

.customer-segment-title {
  margin: 6px 0 8px;
  color: #7b8aa1;
  font-size: 13px;
  font-weight: 900;
}

.customer-segment-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.customer-segment {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #344762;
  padding: 0 10px;
  font-weight: 800;
  text-align: left;
}

.customer-segment:hover,
.customer-segment.active {
  border-color: #c7d7ff;
  background: #eef4ff;
  color: var(--accent);
}

.customer-segment-static {
  cursor: default;
  background: #f8fbff;
  border-color: #d8e4f5;
}

.customer-segment-static:hover {
  color: #344762;
  background: #f8fbff;
  border-color: #d8e4f5;
}

.customer-owner-mini {
  margin: -4px 0 8px;
  padding: 0 10px;
  color: #7b8aa1;
  font-size: 12px;
  line-height: 1.35;
}

.customer-segment em {
  color: inherit;
  font-style: normal;
  font-size: 12px;
}

.customer-panel-title {
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.customer-panel-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.customer-list-tools {
  min-height: 48px;
  padding: 0 18px;
  color: #5e6e85;
  font-size: 13px;
}

.customer-list-actions,
.customer-assignment-tools {
  display: flex;
  gap: 8px;
}

.customer-list-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.customer-assignment-tools select {
  min-width: 150px;
  height: 34px;
  border: 1px solid #d5dfef;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 8px;
}

.customer-table-wrap {
  max-height: 452px;
}

.customer-table {
  min-width: 880px;
}

.customer-confidence {
  display: grid;
  gap: 4px;
  width: 92px;
}

.customer-confidence strong {
  color: var(--ink);
  font-size: 12px;
}

.customer-confidence i,
.customer-profile-progress,
.customer-path-row i {
  display: block;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #eaf0f7;
}

.customer-confidence span,
.customer-profile-progress span,
.customer-path-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #18a46f);
}

.customer-detail-body {
  display: grid;
  gap: 14px;
  padding: 14px;
  max-height: 640px;
  overflow-y: auto;
}

.customer-detail-card {
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.customer-detail-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 16px;
}

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

.profile-grid > div {
  min-height: 56px;
  border: 1px solid #e2e9f3;
  border-radius: 7px;
  background: #fff;
  padding: 9px;
}

.profile-grid .wide {
  grid-column: 1 / -1;
}

.profile-grid span {
  display: block;
  color: #6d7b91;
  font-size: 12px;
}

.profile-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  line-height: 1.45;
}

.next-action {
  border: 1px solid #cbdcff;
  border-radius: 8px;
  background: #eef5ff;
  padding: 12px;
  color: #0e356f;
  line-height: 1.55;
  font-weight: 800;
}

.customer-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.customer-assignment-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.customer-assignment-actions select {
  min-width: 0;
  height: 36px;
  border: 1px solid #d5dfef;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.customer-detail-actions button,
.customer-assignment-actions button {
  flex: 1;
}

.customer-maintain-card {
  background: #fff;
}

.customer-maintain-form {
  display: grid;
  gap: 10px;
}

.customer-maintain-field {
  display: grid;
  gap: 6px;
  color: #52627a;
  font-size: 12px;
  font-weight: 800;
}

.customer-inline-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.customer-inline-action input,
.customer-inline-action select,
.customer-maintain-field textarea {
  border-color: #d8e2ef;
  background: #fbfdff;
}

.customer-maintain-field textarea {
  min-height: 86px;
  line-height: 1.5;
}

.customer-timeline {
  display: grid;
  gap: 10px;
}

.customer-timeline-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 9px;
  align-items: flex-start;
}

.customer-timeline-item > i {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.customer-timeline-item.stage > i {
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.customer-timeline-item.tag > i {
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}

.customer-timeline-item.event > i {
  background: var(--cyan);
  box-shadow: 0 0 0 4px var(--cyan-soft);
}

.customer-timeline-item div {
  border: 1px solid #e4ebf5;
  border-radius: 9px;
  background: #fff;
  padding: 9px;
}

.customer-timeline-item strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.customer-timeline-item p {
  margin: 4px 0;
  color: #53637a;
  line-height: 1.45;
}

.customer-timeline-item span {
  color: #8895a8;
  font-size: 12px;
}

.customer-path-list,
.rule-list,
.customer-runtime-list,
.customer-activity-list {
  display: grid;
  gap: 10px;
}

.customer-path-row {
  display: grid;
  grid-template-columns: 64px 1fr 52px;
  align-items: center;
  gap: 10px;
  color: #41526b;
  font-size: 13px;
  font-weight: 800;
}

.customer-path-row strong {
  color: var(--ink);
  font-size: 12px;
}

.rule {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 8px;
  align-items: start;
  color: #33445f;
  line-height: 1.45;
}

.rule i {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: #16a56f;
}

.rule.warn i {
  background: #d48706;
}

.rule.danger i {
  background: #d33b3f;
}

.customer-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.58fr);
  gap: 16px;
}

.customer-bottom-card {
  min-height: 210px;
}

.customer-activity-list,
.customer-runtime-list {
  padding: 14px 18px 18px;
}

.customer-activity-item {
  width: 100%;
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
}

.customer-activity-item:hover {
  border-color: var(--accent);
}

.customer-activity-item span,
.customer-activity-item em,
.customer-runtime-row small {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.customer-runtime-row {
  min-height: 58px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px 12px;
}

.customer-runtime-row strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.customer-status-action {
  min-width: 64px;
  height: 28px;
  border: 1px solid #d5dfef;
  border-radius: 999px;
  background: #f1f5fa;
  color: #64748b;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.customer-status-action.on {
  border-color: #c5ecd9;
  background: #e4f8ee;
  color: #0a8b5b;
}

.notice-flash {
  color: var(--accent) !important;
  font-weight: 900;
}

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

.risk-item strong,
.performance-card strong {
  display: block;
  color: var(--ink);
}

.risk-item small,
.performance-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}

.risk-list,
.performance-grid,
.judgement-list,
.ai-status-cards {
  display: grid;
  gap: 12px;
}

.risk-list,
.ai-status-cards {
  padding: 14px 18px 18px;
}

.ai-status-card {
  width: 100%;
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.ai-status-card:hover {
  border-color: #bfd0f7;
  background: #fff;
}

.ai-status-card.disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.ai-status-card strong {
  display: block;
  color: var(--ink);
  margin-bottom: 3px;
}

.ai-status-card small {
  color: var(--muted);
}

.ai-status-card em {
  min-width: 44px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e8f0ff;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.ai-status-card.disabled em {
  background: #e9edf3;
  color: var(--muted);
}

.risk-item {
  width: 100%;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
}

.risk-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-style: normal;
}

.risk-icon.red {
  background: var(--red-soft);
  color: var(--red);
}

.risk-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.risk-item:hover {
  border-color: var(--accent);
}

.performance-card,
.judgement-item {
  border: 1px solid #edf1f7;
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-soft);
}

.performance-grid {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  padding: 16px 18px 18px;
}

.performance-card strong {
  font-size: 22px;
  font-weight: 850;
  margin: 8px 0;
}

.performance-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin: 0;
}

.judgement-item {
  color: var(--ink);
  line-height: 1.55;
  border-left: 0;
}

.judgement-list {
  padding: 16px 18px 18px;
}

.flow-steps {
  display: grid;
  gap: 10px;
}

.flow-step {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}

.flow-step.warning {
  border-left-color: var(--warn);
}

.flow-step span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.flow-step.warning span {
  color: var(--warn);
}

.flow-step strong {
  display: block;
  margin-top: 3px;
}

.flow-step p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.todo-list,
.asset-status-list {
  display: grid;
  gap: 8px;
}

.todo-item,
.recent-conversation {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 11px;
}

.todo-item:hover,
.recent-conversation:hover {
  border-color: var(--accent);
  background: #fbfefd;
}

.todo-item strong,
.recent-conversation strong {
  display: block;
  color: var(--ink);
}

.todo-item span,
.recent-conversation small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 400;
}

.asset-status-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.asset-status-item span {
  color: var(--muted);
}

.asset-status-item strong.ai {
  color: var(--accent);
}

.asset-status-item strong.warn {
  color: var(--warn);
}

.asset-status-item strong.danger {
  color: var(--danger);
}

.workspace-view-rail {
  border-right: 1px solid #dde6f2;
  background: #f4f7fb;
  padding: 10px 8px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 4px 8px;
}

.rail-head strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: #12253d;
}

.rail-head small {
  display: block;
  margin-top: 3px;
  color: #74849b;
  font-size: 11px;
}

.workspace-rail-note {
  margin: 0 4px 8px;
  padding: 6px 8px;
  border: 1px solid #e2e8f2;
  border-radius: 10px;
  background: #fff;
  color: #6b7b90;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 800;
}

.icon-button {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4f5f77;
  font-size: 18px;
}

.workspace-rail-list {
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding-top: 6px;
  padding-right: 2px;
}

.rail-item {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 8px;
  background: transparent;
  color: #31435e;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
}

.rail-item.active,
.rail-item:hover {
  border-color: #d5e0ef;
  background: #ffffff;
  color: var(--blue);
  box-shadow: inset 2px 0 0 var(--blue);
}

.rail-item-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.rail-item-main strong {
  color: #15304d;
  font-size: 12px;
  font-weight: 900;
}

.rail-item-main small {
  color: #73839a;
  font-size: 9px;
  line-height: 1.3;
}

.count {
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef3fb;
  color: #52637b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  font-style: normal;
}

.count.hot {
  background: var(--red-soft);
  color: var(--red);
}

.workspace-conversation-panel {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid #dde6f2;
  background: #fff;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
}

.conversation-panel-head {
  padding: 12px 14px 8px;
  border-bottom: 1px solid #e7edf5;
  background: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.conversation-panel-head h3 {
  margin: 0;
  font-size: 16px;
}

.conversation-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.conversation-panel-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-icon-button {
  width: 30px;
  min-height: 30px;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  background: #fff;
  color: #566985;
  padding: 0;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.panel-icon-button:hover {
  border-color: #bfd0f7;
  background: #eef4ff;
  color: #0f4fb7;
}

.panel-text-button {
  min-height: 30px;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  background: #fff;
  color: #53667f;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.panel-text-button:hover {
  border-color: #f2c6c6;
  background: #fff1f1;
  color: #b91c1c;
}

.workspace-panel-searchbar {
  padding: 8px 14px 4px;
  background: #fff;
}

.workspace-list-modebar {
  display: flex;
  gap: 6px;
  padding: 10px 14px 7px;
  background: #fff;
}

.workspace-list-mode {
  min-height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: #f4f6fa;
  color: #5b6d85;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace-list-mode.active {
  background: #eaf2ff;
  color: #0f4fb7;
}

.conversation-list-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  padding: 8px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.conversation-list-search input {
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 13px;
}

.conversation-list-search .icon-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #58708f;
  font-size: 15px;
}

.channel-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.channel-tabs button {
  min-height: 30px;
  min-width: 82px;
  padding: 0 12px;
  border: 1px solid #d7e2ef;
  border-radius: 999px;
  background: #f8fbff;
  color: #51627a;
  font-size: 12px;
  font-weight: 800;
}

.channel-tabs button.active,
.channel-tabs button:hover {
  background: #eaf2ff;
  border-color: #c8d9f4;
  color: #0f4fb7;
}

.conversation-list {
  display: grid;
  gap: 4px;
  padding: 6px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  background: #f7f9fc;
}

.workspace-bulk-bar {
  min-height: 40px;
  border-top: 1px solid #dfe7f2;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  color: #31435e;
  font-size: 12px;
  font-weight: 800;
}

.workspace-bulk-bar button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f4fb7;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 900;
}

.workspace-bulk-bar button:hover {
  background: #eef4ff;
}

.workspace-bulk-bar .bulk-close {
  width: 18px;
  min-height: 18px;
  border-radius: 4px;
  background: #2468f2;
  color: #fff;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.bulk-actions-wrap {
  position: relative;
  margin-left: auto;
}

.workspace-bulk-menu {
  position: absolute;
  z-index: 35;
  right: 0;
  bottom: calc(100% + 8px);
  width: 132px;
  border: 1px solid #d9e3f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(20, 37, 62, 0.16);
  padding: 6px;
  display: grid;
  gap: 2px;
}

.workspace-bulk-menu button {
  width: 100%;
  color: #31435e;
  text-align: left;
  padding: 0 8px;
}

.workspace-bulk-menu button[data-bulk-action="close"] {
  color: #b91c1c;
}

.workspace-bulk-menu button[data-bulk-action="close"]:hover {
  background: #fff1f1;
  color: #991b1b;
}

.workspace-list-empty {
  display: grid;
  gap: 10px;
  min-height: 120px;
  align-content: center;
  padding: 18px 14px;
  border: 1px dashed #dce6f2;
  border-radius: 14px;
  background: #fff;
}

.workspace-list-empty-hero {
  display: grid;
  gap: 6px;
}

.workspace-list-empty-hero strong {
  color: #102844;
  font-size: 16px;
  font-weight: 900;
}

.workspace-list-empty-hero p {
  margin: 0;
  color: #677a93;
  font-size: 12px;
  line-height: 1.6;
}

.conversation-item {
  position: relative;
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 34px 9px 10px;
  cursor: pointer;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.conversation-item.active,
.conversation-item:hover {
  border-color: #c2d3ef;
  background: #eef4ff;
  box-shadow: none;
}

.conversation-item.ai-test {
  border-color: #b7dfd8;
  background: linear-gradient(180deg, #f6fffc 0%, #ffffff 100%);
}

.conversation-item.ai-test.active,
.conversation-item.ai-test:hover {
  border-color: #0e8f78;
  box-shadow: inset 3px 0 0 #0e8f78;
}

div.conversation-item.ai-test {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.conversation-item-main {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  display: block;
  text-align: left;
}

.conversation-row-more {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  min-height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6c7c92;
  padding: 0;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.conversation-row-more:hover {
  background: #e8f0ff;
  color: #0f4fb7;
}

.conversation-row-menu {
  position: absolute;
  z-index: 28;
  top: 34px;
  right: 8px;
  width: 138px;
  border: 1px solid #d9e3f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(20, 37, 62, 0.16);
  padding: 6px;
  display: grid;
  gap: 2px;
}

.conversation-row-menu button {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #31435e;
  padding: 0 8px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
}

.conversation-row-menu button:hover {
  background: #eef4ff;
  color: #0f4fb7;
}

.conversation-row-menu button.danger {
  color: #b91c1c;
}

.conversation-row-menu button.danger:hover {
  background: #fff1f1;
  color: #991b1b;
}

.conversation-select-dot {
  width: 30px;
  height: 30px;
  border: 1px solid #cad7e8;
  border-radius: 50%;
  background: #fff;
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}

.conversation-select-dot.checked {
  border-color: #2468f2;
  background: #2468f2;
}

.conversation-card-remove {
  align-self: start;
  min-height: 28px;
  border: 1px solid #d7e2ef;
  border-radius: 7px;
  background: #fff;
  color: #607089;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.conversation-card-remove:hover {
  border-color: #f2c6c6;
  background: #fff1f1;
  color: #b91c1c;
}

.conversation-card-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 14px;
  gap: 8px;
  align-items: center;
}

.conversation-card-right {
  display: flex;
  align-items: center;
  justify-self: end;
  width: 14px;
  max-width: 14px;
  min-width: 0;
}

.conversation-card-right:empty {
  display: none;
}

.conversation-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.conversation-card-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 900;
}

.conversation-card-name {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.conversation-card-name small {
  color: #7a899d;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-card-subline {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.conversation-card-subline span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-card-subline time {
  flex: 0 0 auto;
  color: #7a899d;
  font-size: 11px;
  font-weight: 800;
}

.conversation-item p,
.conversation-item small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.conversation-owner-line,
.chat-assignment-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #60708a;
  font-size: 12px;
  font-weight: 800;
}

.chat-assignment-line {
  margin-top: 8px;
}

.conversation-status-chip {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf4ff;
  color: #0f4fb7;
  font-size: 11px;
  font-weight: 900;
}

.assignment-badge {
  max-width: 100%;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef2f7;
  color: #40506b;
  white-space: nowrap;
}

.assignment-badge i {
  font-style: normal;
  color: #6b7b92;
  font-size: 11px;
}

.assignment-badge strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.assignment-badge.ai {
  background: var(--green-soft);
  color: #087451;
}

.assignment-badge.ai i {
  color: #15966d;
}

.assignment-badge.human {
  background: #eef5ff;
  color: var(--blue);
}

.assignment-badge.human i {
  color: #4774c9;
}

.assignment-badge.pending {
  background: var(--amber-soft);
  color: var(--amber);
}

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

.conversation-tags.compact .tag {
  min-height: 22px;
  padding: 2px 8px;
  font-size: 11px;
}

.workspace-chat-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff;
}

.chat-panel-head {
  min-height: 58px;
  padding: 9px 16px;
  border-bottom: 1px solid #dfe7f2;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.chat-title-block strong {
  display: block;
  font-size: 16px;
  font-weight: 900;
}

.chat-title-block small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.chat-title-block {
  min-width: 0;
}

.chat-top-toolbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.chat-top-toolbar.toolbar-disabled {
  opacity: 0.42;
  pointer-events: none;
  filter: grayscale(0.2);
}

.chat-toolbar-button {
  min-width: 32px;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #51647d;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-toolbar-button:hover,
.chat-toolbar-button[aria-expanded="true"],
.chat-toolbar-button.is-on {
  background: #eef4ff;
  color: #0f4fb7;
}

.chat-toolbar-switch {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #31435e;
  padding: 0 3px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
}

.chat-toolbar-switch:hover {
  background: #f4f7fc;
}

.chat-toolbar-switch:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.toolbar-switch-dot {
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #dfe6f1;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(80, 97, 121, 0.04);
}

.toolbar-switch-dot::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 35, 62, 0.18);
}

.toolbar-caret,
.toolbar-help {
  color: #7a8aa2;
  font-size: 12px;
  font-weight: 900;
}

.toolbar-help {
  width: 14px;
  height: 14px;
  border: 1px solid #aebbd0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
}

.chat-toolbar-end {
  min-width: 42px;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: #ff4d4f;
  color: #fff;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(255, 77, 79, 0.18);
}

.chat-toolbar-end:hover {
  background: #e33a3d;
}

.chat-top-toolbar.toolbar-disabled .chat-toolbar-end {
  display: none;
}

.chat-more-wrap {
  position: relative;
}

.chat-translate-panel {
  position: absolute;
  z-index: 24;
  top: calc(100% + 10px);
  right: 122px;
  width: 306px;
  border: 1px solid #dbe5f2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(20, 37, 62, 0.16);
  padding: 12px;
  display: grid;
  gap: 12px;
  color: #253b57;
}

.chat-translate-panel label {
  display: grid;
  gap: 6px;
  color: #445872;
  font-size: 13px;
  font-weight: 800;
}

.chat-translate-panel select {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: #f2f4f8;
  color: #223752;
  padding: 0 10px;
  font-weight: 800;
}

.translate-row-toggle {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #253b57;
  text-align: left;
}

.translate-row-toggle span {
  display: grid;
  gap: 2px;
}

.translate-row-toggle strong {
  font-size: 13px;
  font-weight: 900;
}

.translate-row-toggle em {
  color: #7c8ca3;
  font-size: 12px;
  font-style: normal;
}

.translate-row-toggle i {
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #dfe6f1;
  position: relative;
  flex: 0 0 auto;
}

.translate-row-toggle i::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 35, 62, 0.18);
  transition: transform 0.15s ease;
}

.translate-row-toggle[aria-pressed="true"] i,
.chat-toolbar-switch.is-on .toolbar-switch-dot {
  background: #2468f2;
}

.translate-row-toggle[aria-pressed="true"] i::after,
.chat-toolbar-switch.is-on .toolbar-switch-dot::after {
  transform: translateX(12px);
}

.translate-provider-note {
  border-radius: 8px;
  background: #eef4ff;
  color: #416186;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.5;
}

.chat-more-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: 188px;
  border: 1px solid #d8e2ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(20, 37, 62, 0.14);
  padding: 6px;
  display: grid;
  gap: 4px;
}

.chat-more-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #31435e;
  text-align: left;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.chat-more-menu button:hover {
  background: #eef4ff;
  color: #0f4fb7;
}

.chat-more-menu button.danger {
  color: #b91c1c;
}

.chat-more-menu button.danger:hover {
  background: #fff1f1;
  color: #991b1b;
}

.toolbar-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #d6e0ee;
  background: #fff;
  color: #566985;
  font-size: 12px;
  font-weight: 800;
}

.toolbar-chip.action {
  cursor: pointer;
  border-color: #cfdbeb;
  background: #f8fbff;
  color: #15304d;
}

.toolbar-chip.action:hover {
  border-color: #9fbbeb;
  background: #eef5ff;
  color: #0f4fb7;
}

.chat-head-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.chat-head-actions button {
  min-width: 82px;
  border-color: #b7c9e8;
  color: #06152e;
  font-weight: 900;
}

.chat-head-actions button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.chat-head-actions .danger {
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
}

.chat-head-actions .danger:hover {
  border-color: #dc2626;
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.04);
}

.messages {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px 20px;
  background: #fff;
}

.messages .workspace-empty {
  justify-self: center;
  align-self: center;
  width: min(420px, 100%);
  padding: 28px 24px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #687991;
  text-align: center;
  box-shadow: none;
}

.messages .workspace-empty strong {
  display: block;
  color: #102844;
  font-size: 16px;
  font-weight: 900;
}

.messages .workspace-empty p {
  margin: 8px 0 0;
  color: #6f8199;
  font-size: 13px;
  line-height: 1.6;
}

.workspace-empty-chat {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.workspace-empty-chat-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2d63d8 0%, #79a3ff 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 18px 34px rgba(45, 99, 216, 0.18);
}

.message {
  max-width: 76%;
  border-radius: 14px;
  padding: 12px 14px;
  line-height: 1.55;
  border: 1px solid #dce5f0;
  box-shadow: 0 10px 24px rgba(36, 57, 91, 0.08);
}

.message.inbound {
  justify-self: start;
  background: #fff;
  border-bottom-left-radius: 4px;
}

.message.outbound {
  justify-self: end;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%);
  border-color: #cfdefd;
  color: #17304d;
  border-bottom-right-radius: 4px;
}

.message .sender {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.message-body {
  white-space: pre-wrap;
  word-break: break-word;
}

.message-attachments {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.message-attachments + .message-translation,
.message-body + .message-attachments {
  margin-top: 8px;
}

.message-attachment {
  display: grid;
  gap: 6px;
  max-width: 360px;
  border: 1px solid #d7e4f3;
  border-radius: 10px;
  background: #f8fbff;
  color: #16304f;
  text-decoration: none;
  overflow: hidden;
}

.message-attachment.image {
  padding: 0;
}

.message-attachment.image img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #eef4fb;
}

.message-attachment.image span {
  padding: 7px 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.message-attachment.media {
  padding: 10px;
}

.message-attachment.media video,
.message-attachment.media audio {
  width: 100%;
  max-height: 260px;
}

.message-attachment.file {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 10px;
  padding: 10px 12px;
}

.message-attachment.file span {
  grid-row: span 2;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e8f1ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.message-attachment.file strong,
.message-attachment.media a {
  color: #132944;
  font-size: 13px;
  font-weight: 900;
  word-break: break-word;
}

.message-attachment.file small {
  color: #667894;
  font-size: 12px;
}

.message-translation {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  background: #f7fbff;
  color: #263b57;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.message-translation strong {
  display: block;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}

.message-translation p {
  margin: 0;
  white-space: pre-wrap;
}

.message.outbound .sender {
  color: #5b7696;
}

.message-state {
  margin-top: 6px;
  font-size: 11px;
  color: #6b7f99;
  text-align: right;
}

.composer {
  border-top: 1px solid #dbe4ef;
  background: #fff;
  padding: 0;
  display: grid;
  gap: 0;
  box-shadow: none;
}

.composer-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid #e5edf7;
}

.composer-topline-left {
  display: grid;
  gap: 3px;
}

.composer-topline small {
  color: #718197;
  font-size: 12px;
}

.composer-mode-button {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #31435e;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 900;
}

.auto-next-action {
  border: 0;
  border-bottom: 1px solid #d9e6f6;
  background: #f8fbff;
  border-radius: 0;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #204264;
  font-size: 13px;
  font-weight: 800;
}

.auto-next-action span {
  color: #0f4fb7;
}

.workspace-action-notice {
  border: 1px solid #b7c9e8;
  background: #eef5ff;
  border-radius: 0;
  border-width: 0 0 1px;
  padding: 8px 14px;
  color: #244263;
  font-size: 13px;
  font-weight: 800;
}

.composer-translate-hint {
  min-height: 26px;
  padding: 6px 14px;
  border-bottom: 1px solid #e5edf7;
  background: #f8fbff;
  color: #49627f;
  font-size: 12px;
  font-weight: 800;
}

.workspace-action-notice.success {
  border-color: #b7dfd8;
  background: var(--green-soft);
  color: #245e49;
}

.workspace-action-notice.danger {
  border-color: #f6caca;
  background: var(--red-soft);
  color: var(--red);
}

.workspace-tag-panel {
  border-bottom: 1px solid #dbe4ef;
  background: #fbfdff;
  padding: 10px 14px 12px;
  display: grid;
  gap: 10px;
}

.workspace-tag-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workspace-tag-panel-head strong {
  display: block;
  color: #13243a;
  font-size: 14px;
  font-weight: 900;
}

.workspace-tag-panel-head span,
.workspace-tag-label,
.workspace-tag-empty {
  color: #6b7d95;
  font-size: 12px;
  font-weight: 700;
}

.workspace-tag-panel-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #43546b;
  font-size: 22px;
  line-height: 1;
}

.workspace-tag-panel-close:hover {
  background: #eef4ff;
  color: #0f4fb7;
}

.workspace-tag-section {
  display: grid;
  gap: 6px;
}

.workspace-current-tags,
.workspace-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workspace-tag-chip {
  min-height: 26px;
  border: 1px solid #c9d8eb;
  border-radius: 999px;
  background: #fff;
  color: #244263;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.workspace-tag-chip:hover,
.workspace-tag-chip.active {
  border-color: #86b6ff;
  background: #edf5ff;
  color: #0f4fb7;
}

.workspace-tag-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.workspace-tag-add-row input {
  min-height: 34px;
  border: 1px solid #cbd8ea;
  border-radius: 8px;
  background: #fff;
  color: #13243a;
  padding: 0 10px;
  font-weight: 800;
}

.workspace-tag-add-row button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  padding: 0 14px;
  font-weight: 900;
}

.workspace-quick-panel {
  border: 0;
  border-top: 1px solid #d9e1ec;
  border-bottom: 1px solid #d9e1ec;
  background: #fff;
  border-radius: 0;
  display: grid;
}

.workspace-quick-head {
  min-height: 40px;
  border-bottom: 1px solid #e1e7f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
}

.workspace-quick-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
}

.workspace-quick-tabs button {
  min-height: 40px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #3c4d66;
  padding: 0 2px;
  font-weight: 900;
}

.workspace-quick-tabs button.active {
  border-bottom-color: #245bff;
  color: #245bff;
}

.workspace-quick-tabs button:disabled {
  color: #73839a;
  cursor: not-allowed;
}

.workspace-quick-close {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #222f43;
  font-size: 24px;
  line-height: 1;
}

.workspace-quick-filterbar {
  display: grid;
  grid-template-columns: 130px minmax(220px, 1fr) auto;
  gap: 10px;
  padding: 10px 14px;
  align-items: center;
}

.workspace-quick-filterbar select,
.workspace-quick-search input {
  width: 100%;
  min-height: 32px;
  border: 1px solid #d4ddeb;
  border-radius: 5px;
  background: #fff;
  color: #334155;
  padding: 0 9px;
}

.workspace-quick-search {
  position: relative;
}

.workspace-quick-search span {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #77869d;
}

.workspace-quick-body {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  min-height: 260px;
  max-height: 360px;
}

.workspace-quick-categories {
  border-right: 1px solid #e3e8f1;
  background: #f7f9fd;
  padding: 0 0 8px;
  overflow-y: auto;
}

.workspace-quick-categories button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #4d5d73;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
}

.workspace-quick-categories button.active {
  background: #eef2ff;
  color: #245bff;
}

.workspace-quick-categories em {
  font-style: normal;
  color: #8997aa;
  font-size: 12px;
}

.workspace-quick-table-wrap {
  min-width: 0;
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr);
}

.workspace-quick-table-head,
.workspace-quick-row {
  display: grid;
  grid-template-columns: 140px minmax(260px, 1fr) 120px 160px;
  align-items: center;
}

.workspace-quick-table-head {
  background: #f8fafc;
  border-bottom: 1px solid #e6ebf3;
  color: #41516a;
  font-weight: 900;
  padding: 0 14px;
}

.workspace-quick-list {
  max-height: 316px;
  overflow-y: auto;
}

.workspace-quick-row {
  min-height: 55px;
  border-bottom: 1px solid #edf1f6;
  color: #31435d;
  padding: 0 14px;
  gap: 0;
}

.workspace-quick-title-cell,
.workspace-quick-category-cell {
  font-weight: 800;
}

.workspace-quick-content-cell {
  padding-right: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  color: #465872;
}

.workspace-quick-action-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.workspace-quick-action-cell button {
  min-height: 28px;
  border-radius: 4px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.workspace-quick-empty {
  margin: 18px;
  border: 1px dashed #d2dceb;
  border-radius: 8px;
  padding: 16px 14px;
  background: #fff;
  display: grid;
  gap: 3px;
  color: #607089;
}

.workspace-quick-pager {
  min-height: 36px;
  border-top: 1px solid #e5ebf3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: #66758c;
  font-size: 12px;
}

.workspace-quick-pager button,
.workspace-quick-pager select {
  min-height: 26px;
  border: 1px solid #d6deea;
  border-radius: 4px;
  background: #fff;
  color: #65748a;
}

.composer textarea {
  min-height: 84px;
  max-height: 140px;
  resize: vertical;
  background: #fff;
  border: 0;
  border-radius: 0;
  padding: 13px 16px;
  outline: none;
}

.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 14px;
  border-top: 1px solid #e5edf7;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6f7f97;
  font-weight: 800;
}

.text-tool {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #5f718b;
  font-size: 12px;
  font-weight: 800;
}

.text-tool:hover {
  border-color: #d8e1ef;
  background: #f4f7fc;
}

.text-tool:disabled {
  color: #a7b2c2;
}

.ai-proof {
  width: min(76%, 520px);
  justify-self: stretch;
  border: 1px solid #dbe7f6;
  background: #f8fbff;
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  color: #244263;
  box-shadow: none;
}

.ai-proof strong {
  font-size: 13px;
}

.ai-proof span {
  color: #52637b;
  font-size: 12px;
  line-height: 1.5;
}

.workspace-suggestion-card {
  display: grid;
  gap: 8px;
  border: 1px solid #d7e4f5;
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px;
}

.workspace-suggestion-card strong {
  color: #12304f;
  font-size: 13px;
}

.workspace-suggestion-card p {
  margin: 0;
  color: #405672;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.workspace-suggestion-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-suggestion-actions button {
  min-height: 30px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.workspace-detail-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-left: 1px solid #dde6f2;
  background: #f8fbff;
}

.workspace-grid.has-selected-conversation .workspace-detail-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.detail-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid #e3ebf5;
  background: #fff;
}

.detail-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

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

.workspace-detail-scroll {
  padding: 0;
  display: grid;
  align-content: start;
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.workspace-profile-shell {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: #fff;
}

.workspace-profile-main {
  min-width: 0;
  overflow: hidden;
}

.workspace-profile-identity {
  padding: 14px 12px 12px;
  border-bottom: 1px solid #e2e8f2;
}

.workspace-profile-topline {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
}

.workspace-profile-topline strong {
  display: block;
  color: #37445a;
  font-size: 16px;
  font-weight: 900;
}

.workspace-profile-topline p {
  margin: 3px 0 0;
  color: #6a7890;
  font-size: 12px;
}

.workspace-profile-more {
  border: 0;
  background: transparent;
  color: #6b7890;
  padding: 0 2px;
  font-weight: 900;
}

.workspace-profile-mini-fields {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.workspace-profile-mini-fields div,
.workspace-profile-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #627087;
  font-size: 12px;
}

.workspace-profile-line span {
  color: #7a8798;
  font-weight: 800;
}

.workspace-profile-mini-fields strong,
.workspace-profile-line strong {
  color: #526178;
  font-size: 12px;
  font-weight: 800;
  word-break: break-word;
}

.workspace-social-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.workspace-social-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #3158d4;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

.workspace-social-row strong {
  display: block;
  color: #344158;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.workspace-social-row small {
  display: block;
  margin-top: 2px;
  color: #7a8798;
  font-size: 11px;
  font-weight: 700;
}

.workspace-info-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 7px 0;
  color: #64728a;
  font-size: 12px;
}

.workspace-info-row + .workspace-info-row {
  border-top: 1px solid #edf1f6;
}

.workspace-info-icon {
  color: #7a8798;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.workspace-info-row strong {
  display: block;
  color: #45546b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-info-row small {
  display: block;
  margin-top: 2px;
  color: #718096;
  font-size: 11px;
  line-height: 1.35;
  word-break: break-all;
}

.workspace-ad-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid #d7e1ee;
  border-radius: 5px;
  background: #f8fafc;
  color: #245bff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  margin-bottom: 10px;
}

.workspace-ad-open.disabled {
  color: #7b8798;
  background: #f3f6fb;
}

.workspace-ad-preview {
  min-height: 92px;
  border: 1px dashed #dfe7f1;
  border-radius: 6px;
  background: #f7f8fa;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 12px;
  text-align: center;
  color: #6b7890;
}

.workspace-ad-preview strong {
  color: #47576e;
  font-size: 13px;
  font-weight: 900;
}

.workspace-ad-preview small {
  color: #6b7890;
  font-size: 11px;
  line-height: 1.4;
  word-break: break-all;
}

.workspace-profile-empty {
  border: 1px dashed #d7e1ee;
  border-radius: 6px;
  background: #fbfdff;
  color: #718197;
  padding: 9px;
  font-size: 12px;
  line-height: 1.5;
}

.workspace-source-details {
  margin-top: 8px;
}

.workspace-source-details summary {
  cursor: pointer;
  color: #155eef;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.workspace-source-details summary::-webkit-details-marker {
  display: none;
}

.workspace-source-details summary::after {
  content: "›";
  display: inline-block;
  margin-left: 5px;
  transition: transform 0.15s ease;
}

.workspace-source-details[open] summary::after {
  transform: rotate(90deg);
}

.workspace-source-details .workspace-profile-line {
  margin-top: 8px;
}

.workspace-missing-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.workspace-missing-fields span {
  border-radius: 999px;
  background: #f1f5fb;
  color: #667991;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}

.workspace-profile-section {
  padding: 12px;
  border-bottom: 1px solid #e6ebf3;
}

.workspace-profile-section.muted-head {
  padding-top: 0;
}

.workspace-profile-section.muted-head h4 {
  margin: 0 -12px 12px;
  padding: 8px 12px;
  background: #f3f6fb;
  color: #7b8798;
  font-size: 12px;
  font-weight: 800;
}

.workspace-profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.workspace-profile-section-head strong {
  color: #4b5870;
  font-size: 13px;
  font-weight: 900;
}

.workspace-profile-section-head i {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #9aa7b8;
  color: #fff;
  font-style: normal;
  font-size: 10px;
}

.workspace-profile-section-head button {
  border: 0;
  background: transparent;
  color: #245bff;
  padding: 0;
  font-size: 12px;
  font-weight: 900;
}

.workspace-related-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 9px;
}

.workspace-related-tabs button {
  min-height: 28px;
  border: 1px solid #d6deea;
  border-radius: 5px;
  background: #fff;
  color: #51627a;
  font-weight: 800;
}

.workspace-related-tabs button.active {
  border-color: #edf1ff;
  background: #eef2ff;
  color: #245bff;
}

.workspace-related-card {
  border: 1px solid #dde5f0;
  border-radius: 6px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.workspace-related-card div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.workspace-contact-avatar.small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
}

.workspace-related-card strong {
  color: #536176;
  font-size: 13px;
  font-weight: 900;
}

.workspace-related-card p {
  margin: 0;
  color: #5268ff;
  font-size: 12px;
}

.workspace-related-card footer {
  border-top: 1px solid #edf1f6;
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #718197;
  font-size: 12px;
}

.workspace-profile-kpi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.workspace-profile-kpi div {
  border: 1px solid #e2e8f2;
  border-radius: 6px;
  background: #fbfdff;
  padding: 7px;
  display: grid;
  gap: 4px;
}

.workspace-profile-kpi span {
  color: #7b8798;
  font-size: 11px;
}

.workspace-profile-kpi strong {
  color: #26344a;
  font-size: 12px;
}

.workspace-receipt-chip {
  margin-top: 9px;
  border: 1px solid #e2e8f2;
  border-radius: 9px;
  background: #fbfdff;
  padding: 9px;
  display: grid;
  gap: 4px;
}

.workspace-receipt-chip span {
  color: #7b8798;
  font-size: 11px;
  font-weight: 800;
}

.workspace-receipt-chip strong {
  color: #26344a;
  font-size: 13px;
  font-weight: 900;
}

.workspace-receipt-chip small {
  color: #607089;
  line-height: 1.45;
}

.workspace-receipt-chip.read {
  border-color: #bdebd0;
  background: #f0fff6;
}

.workspace-receipt-chip.read strong {
  color: #13633d;
}

.workspace-receipt-chip.delivered,
.workspace-receipt-chip.sent {
  border-color: #c8def8;
  background: #f4f9ff;
}

.workspace-receipt-chip.failed {
  border-color: #f3c4bf;
  background: #fff6f5;
}

.workspace-receipt-chip.failed strong {
  color: #b42318;
}

.workspace-receipt-chip.pending {
  border-color: #f2dfaa;
  background: #fffaf0;
}

.workspace-receipt-chip.empty {
  background: #f8fafc;
}

.workspace-profile-note {
  margin: 9px 0 0;
  color: #607089;
  font-size: 12px;
  line-height: 1.5;
}

.workspace-detail-layout {
  display: grid;
  gap: 8px;
}

.workspace-contact-summary,
.workspace-contact-metrics,
.workspace-side-card {
  border: 1px solid #dfe7f2;
  border-radius: 10px;
  background: #fff;
}

.workspace-contact-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  background: linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
}

.workspace-contact-summary-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.workspace-contact-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2755a8 0%, #4f86dd 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
}

.workspace-contact-summary strong {
  display: block;
  color: #06152e;
  font-size: 15px;
  font-weight: 900;
}

.workspace-contact-summary p {
  margin: 5px 0 0;
  color: #556983;
  font-size: 12px;
  line-height: 1.5;
}

.workspace-contact-summary-side {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.workspace-contact-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.workspace-contact-metrics div {
  display: grid;
  gap: 4px;
  padding: 10px 9px;
  border-right: 1px solid #e8eef7;
}

.workspace-contact-metrics div:last-child {
  border-right: 0;
}

.workspace-contact-metrics span {
  color: #73839a;
  font-size: 11px;
  font-weight: 800;
}

.workspace-contact-metrics strong {
  color: #102844;
  font-size: 13px;
  font-weight: 900;
  word-break: break-word;
}

.workspace-side-card {
  overflow: hidden;
}

.workspace-side-card[open] {
  box-shadow: 0 4px 12px rgba(28, 48, 79, 0.03);
}

.workspace-side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid #edf2f8;
  background: #fbfdff;
}

.workspace-side-card-head::-webkit-details-marker {
  display: none;
}

.workspace-side-card-head strong {
  color: #06152e;
  font-size: 13px;
  font-weight: 900;
}

.workspace-side-card-head span {
  color: #73839a;
  font-size: 12px;
  max-width: 132px;
  text-align: right;
}

.workspace-side-card summary.workspace-side-card-head::after {
  content: "展开";
  margin-left: auto;
  border-radius: 999px;
  background: #eef6ff;
  color: #0f4fb7;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 8px;
}

.workspace-side-card[open] summary.workspace-side-card-head::after {
  content: "收起";
}

.workspace-side-card > :not(summary) {
  padding: 0 10px 10px;
}

.workspace-side-card-body {
  display: grid;
  gap: 10px;
}

.workspace-side-card .feedback-strategy-card,
.workspace-side-card .detail-card {
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.workspace-fact-list {
  display: grid;
  gap: 8px;
}

.workspace-fact-row {
  display: grid;
  gap: 4px;
  border: 1px solid #e4ebf5;
  border-radius: 8px;
  background: #fbfdff;
  padding: 8px 9px;
}

.workspace-fact-row strong {
  color: #102844;
  font-size: 12px;
  font-weight: 900;
}

.workspace-fact-row span,
.workspace-fact-empty {
  color: #60728c;
  font-size: 12px;
  line-height: 1.45;
}

.workspace-fact-empty {
  border: 1px dashed #d7e2ef;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.workspace-side-card-foot {
  display: flex;
  justify-content: flex-start;
  padding-top: 10px;
}

.detail-empty,
.workspace-empty {
  color: var(--muted);
  padding: 14px;
  line-height: 1.55;
}

.detail-card {
  display: grid;
  gap: 10px;
  font-size: 14px;
  border: 1px solid #e3eaf4;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  margin: 0;
  box-shadow: 0 6px 16px rgba(28, 48, 79, 0.04);
}

.profile-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.profile-progress {
  height: 7px;
  background: #e8eef7;
  border-radius: 999px;
  overflow: hidden;
}

.profile-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.timeline {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.timeline-item {
  border-left: 3px solid var(--blue);
  padding-left: 9px;
  display: grid;
  gap: 2px;
}

.timeline-item span {
  color: var(--ink);
  font-weight: 700;
}

.timeline-item small {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
}

.badge.high {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.ai {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.tag.ai {
  background: var(--green-soft);
  color: var(--green);
  border-color: #bee9d7;
  font-weight: 700;
}

.tag.info {
  background: var(--cyan-soft);
  color: var(--cyan);
  border-color: #bae6f0;
  font-weight: 700;
}

.tag.warn,
.tag.hot {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: #f4d69d;
  font-weight: 700;
}

.tag.danger {
  background: var(--red-soft);
  color: var(--red);
  border-color: #f6caca;
  font-weight: 700;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.simulate-box {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.contact-tools {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.quality-tools {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-bottom: 12px;
}

.detail-control-stack {
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.detail-control-stack.hidden {
  display: none !important;
}

.detail-control-summary {
  display: grid;
  gap: 4px;
  cursor: pointer;
  list-style: none;
  border: 1px solid #d9e5f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.detail-control-summary::-webkit-details-marker {
  display: none;
}

.detail-control-summary span {
  color: #06152e;
  font-size: 13px;
  font-weight: 900;
}

.detail-control-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.detail-control-summary::after {
  content: "展开";
  justify-self: start;
  border-radius: 999px;
  background: #eef6ff;
  color: #0f4fb7;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 8px;
}

.detail-control-stack[open] .detail-control-summary::after {
  content: "收起";
}

.detail-control-body {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.detail-control-card {
  display: grid;
  gap: 8px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.detail-control-card strong {
  font-size: 13px;
}

.detail-control-card button,
.detail-control-card input,
.detail-control-card select {
  min-height: 34px;
  height: auto;
}

.assignment-control-card {
  background: #f8fbff;
}

.assignment-current {
  display: grid;
  gap: 3px;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.assignment-current span {
  color: var(--ink);
  font-weight: 900;
}

.assignment-current small {
  color: var(--muted);
}

.assignment-detail-card h3 span {
  margin-left: auto;
}

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

.assignment-detail-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid #edf1f7;
  border-radius: 10px;
  padding: 9px;
  background: #f9fbfe;
}

.assignment-detail-grid span {
  color: var(--muted);
  font-size: 12px;
}

.assignment-detail-grid strong {
  color: var(--ink);
  font-size: 13px;
}

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

.next-action {
  border: 1px solid #bfd8ff;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7fbff 0%, #edf5ff 100%);
  padding: 12px;
  color: #244263;
  line-height: 1.5;
  font-size: 13px;
  font-weight: 700;
}

.rule-list {
  display: grid;
  gap: 8px;
}

.rule {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 8px;
  color: #40526c;
  font-size: 13px;
  line-height: 1.45;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f8;
}

.rule:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rule i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-top: 6px;
}

.rule.warn i {
  background: var(--amber);
}

.rule.danger i {
  background: var(--red);
}

.knowledge-hit-list {
  display: grid;
  gap: 8px;
}

.knowledge-hit-list div {
  border: 1px solid #edf1f7;
  border-radius: 10px;
  background: #fafcff;
  padding: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.knowledge-hit-list strong {
  display: block;
  font-size: 13px;
}

.knowledge-hit-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ai-asset-usage-card {
  gap: 10px;
}

.ai-asset-usage-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-asset-usage-summary span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: #0f4fb7;
  font-size: 12px;
  font-weight: 850;
}

.ai-asset-usage-list {
  display: grid;
  gap: 8px;
}

.ai-asset-usage-item {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #dbe7f6;
  border-radius: 8px;
  background: #fff;
}

.ai-asset-usage-head,
.ai-asset-usage-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-asset-usage-head span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
}

.ai-asset-usage-head em {
  font-style: normal;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.ai-asset-usage-item strong {
  color: #06152e;
  font-size: 13px;
  line-height: 1.45;
}

.ai-asset-usage-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-asset-usage-stats span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--panel-soft);
  color: #40526c;
  font-size: 12px;
  font-weight: 800;
}

.ai-asset-empty {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px dashed #cbdaf8;
  border-radius: 8px;
  background: #f8fbff;
}

.ai-asset-empty strong {
  color: #06152e;
  font-size: 13px;
}

.ai-asset-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ai-panel-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
}

.ai-section-head strong {
  color: #06152e;
  font-size: 14px;
  font-weight: 900;
}

.ai-decision-section {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.ai-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-section-head span,
.ai-detail-fold summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.ai-kpi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-kpi-row div,
.ai-profile-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px;
}

.ai-kpi-row span,
.ai-profile-grid span {
  color: #6b7a90;
  font-size: 12px;
}

.ai-kpi-row strong,
.ai-profile-grid strong {
  color: #06152e;
  font-size: 13px;
  line-height: 1.42;
  word-break: break-word;
}

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

.ai-profile-grid .wide {
  grid-column: 1 / -1;
}

.ai-action-box {
  display: grid;
  gap: 7px;
  border: 1px solid #bfd8ff;
  border-radius: 8px;
  background: linear-gradient(180deg, #f6faff 0%, #edf5ff 100%);
  padding: 12px;
  color: #244263;
  line-height: 1.5;
}

.ai-action-box strong {
  color: #09295a;
  font-size: 13px;
}

.ai-action-box p,
.ai-action-box small {
  margin: 0;
  color: #35506f;
  font-size: 12px;
}

.ai-action-box small {
  color: #0f766e;
  font-weight: 850;
}

.ai-material-strip {
  display: grid;
  gap: 8px;
}

.workspace-tag-board {
  align-items: flex-start;
}

.ai-material-chip {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(76px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #f8fbff;
  text-align: left;
}

.ai-material-chip:hover {
  border-color: var(--blue);
  background: #f5f9ff;
}

.ai-material-chip strong {
  color: #0f4fb7;
  font-size: 12px;
  font-weight: 900;
}

.ai-material-chip span {
  min-width: 0;
  overflow: hidden;
  color: #40526c;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-material-chip em {
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  padding: 3px 7px;
  white-space: nowrap;
}

.ai-material-empty {
  border: 1px dashed #cbdaf8;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  padding: 10px;
}

.ai-detail-fold {
  overflow: hidden;
}

.ai-detail-fold summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  cursor: pointer;
  list-style: none;
  padding: 12px;
}

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

.ai-detail-fold summary span {
  color: #06152e;
  font-size: 14px;
  font-weight: 900;
}

.ai-detail-fold summary::after {
  content: "展开";
  justify-self: start;
  margin-top: 3px;
  border-radius: 999px;
  background: #eef6ff;
  color: #0f4fb7;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 8px;
}

.ai-detail-fold[open] summary::after {
  content: "收起";
}

.ai-detail-fold-body {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.ai-detail-subsection {
  display: grid;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f8;
}

.ai-detail-subsection:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.simulate-box h3 {
  margin: 0;
  font-size: 15px;
}

.table-list {
  display: grid;
  gap: 8px;
}

.list-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.quality-review-form {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.row-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.row-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.row-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.row-card .content-preview {
  margin-top: 8px;
  color: var(--ink);
  white-space: pre-wrap;
}

.row-card .meta-line {
  margin-top: 6px;
  color: var(--muted);
}

.reception-page {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.reception-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.reception-page-head span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.reception-page-head h2 {
  margin: 5px 0 6px;
  font-size: 27px;
}

.reception-page-head p,
.reception-panel-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.reception-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.reception-metric-card {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
  display: grid;
  gap: 7px;
}

.reception-metric-card span {
  color: #475569;
  font-size: 13px;
}

.reception-metric-card strong {
  color: #061735;
  font-size: 30px;
  line-height: 1;
}

.reception-metric-card small {
  color: #64748b;
  font-size: 12px;
}

.reception-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.reception-left,
.reception-main {
  display: grid;
  gap: 14px;
}

.reception-left {
  position: sticky;
  top: 16px;
}

.reception-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.reception-panel-head {
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
}

.reception-panel-head.inline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reception-panel-head h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.reception-form {
  display: grid;
  gap: 9px;
  padding: 14px 16px 16px;
}

.reception-group-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.reception-group-card {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  padding: 10px 12px;
  text-align: left;
}

.reception-group-card:hover,
.reception-group-card.active {
  border-color: #bfdbfe;
  background: #eaf2ff;
}

.reception-group-card strong,
.reception-group-card small {
  display: block;
}

.reception-group-card strong {
  font-size: 14px;
}

.reception-group-card small {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.reception-group-card em {
  min-width: 58px;
  border-radius: 999px;
  background: #dcfce7;
  color: #047857;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  padding: 5px 8px;
  text-align: center;
}

.reception-create-panel {
  overflow: hidden;
}

.reception-create-panel summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 0 16px;
}

.reception-create-panel summary strong {
  font-size: 15px;
}

.reception-create-panel summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.reception-form input,
.reception-form select,
.reception-seat-controls input,
.reception-seat-controls select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
}

.reception-seat-list,
.reception-user-list {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.reception-seat-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(180px, 240px);
  gap: 12px;
  align-items: start;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.reception-seat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.reception-seat-avatar.ai {
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

.reception-seat-avatar.human {
  background: linear-gradient(135deg, #047857, #22c55e);
}

.reception-seat-main {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.reception-seat-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.reception-seat-title strong {
  color: #061735;
  font-size: 15px;
}

.reception-seat-main p {
  margin: 0;
  color: #475569;
  font-size: 13px;
}

.reception-bound-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.reception-channel-pill,
.reception-empty-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.reception-channel-pill {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.reception-channel-pill small {
  color: #475569;
  font-weight: 700;
}

.reception-empty-pill {
  border: 1px dashed #cbd5e1;
  background: #fff;
  color: #64748b;
}

.reception-seat-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

.reception-seat-controls label {
  display: grid;
  gap: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.reception-seat-controls button {
  min-height: 36px;
}

.reception-seat-side {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: #64748b;
  font-size: 12px;
}

.reception-seat-side > strong {
  color: #061735;
  font-size: 18px;
}

.reception-seat-edit {
  width: 100%;
  margin-top: 8px;
}

.reception-seat-edit summary {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #0f766e;
  cursor: pointer;
  font-weight: 900;
  list-style-position: inside;
}

.reception-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.reception-user-main {
  display: grid;
  gap: 4px;
}

.reception-user-main strong {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
}

.reception-user-main span,
.reception-user-main small {
  color: #64748b;
  font-size: 12px;
}

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

.reception-team-page {
  padding: 0;
}

.reception-team-page .reception-layout {
  min-height: calc(100vh - 118px);
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  background: #fff;
}

.reception-team-page .reception-left {
  position: static;
  background: #eef4ff;
  border-right: 1px solid #e2e8f0;
}

.reception-team-nav {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px 10px;
}

.reception-team-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 8px;
}

.reception-team-nav-head h2 {
  margin: 0;
  color: #07152f;
  font-size: 20px;
}

.reception-team-nav-head span {
  color: #64748b;
  font-size: 11px;
}

.reception-team-tab,
.reception-group-card {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  font-weight: 800;
}

.reception-team-tab {
  width: 100%;
  padding: 0 10px;
  text-align: left;
}

.reception-team-tab.active,
.reception-group-card.active {
  background: #dbe7ff;
  color: #0b5cff;
}

.reception-group-block {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.reception-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #475569;
  font-size: 12px;
  padding: 8px 10px 4px;
}

.reception-group-list {
  padding: 0;
}

.reception-group-card {
  min-height: 38px;
  padding: 7px 10px;
}

.reception-group-card:hover {
  background: #e5edff;
}

.reception-group-card small {
  display: none;
}

.reception-group-card em {
  min-width: auto;
  background: #dcfce7;
  color: #16a34a;
  font-size: 11px;
  padding: 2px 6px;
}

.reception-team-page .reception-main {
  gap: 0;
  align-content: start;
  grid-auto-rows: max-content;
  min-width: 0;
  padding: 16px 16px 0;
}

.reception-team-page .reception-page-head {
  align-items: center;
  border-bottom: 0;
  min-height: 34px;
  padding: 0 0 14px;
}

.reception-team-page .reception-page-head h2 {
  margin: 0;
  font-size: 18px;
}

.reception-table-panel {
  min-width: 0;
  background: #fff;
}

.reception-notice {
  min-height: 34px;
  display: flex;
  align-items: center;
  border-radius: 0;
  background: #fff7e6;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
  padding: 0 14px;
}

.reception-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 10px 0;
}

.reception-toolbar-fill {
  flex: 1 1 auto;
}

.reception-toolbar input,
.reception-toolbar select {
  width: 200px;
  min-width: 0;
  min-height: 34px;
  border: 1px solid #d5dde8;
  border-radius: 4px;
  background: #fff;
  color: #334155;
  padding: 6px 10px;
}

.reception-toolbar .badge {
  display: none;
}

.reception-toolbar button {
  min-height: 34px;
  border-radius: 4px;
  min-width: 82px;
  white-space: nowrap;
  padding: 0 14px;
}

.reception-form-inline {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  margin: 0 0 10px;
}

.reception-create-panel {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 10px;
}

.reception-create-panel:not([open]) {
  display: none;
}

.reception-create-panel summary {
  min-height: 42px;
}

.reception-team-page .reception-panel-head {
  border: 1px solid #e2e8f0;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  padding: 12px 14px;
}

.reception-seat-list,
.reception-user-list {
  padding: 0;
}

.reception-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-bottom: 0;
}

.reception-member-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  background: #fff;
}

.reception-member-table th,
.reception-member-table td {
  height: 80px;
  border-bottom: 1px solid #e5e7eb;
  color: #24324b;
  font-size: 12px;
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.reception-member-table th {
  height: 42px;
  background: #fafafa;
  color: #334155;
  font-weight: 900;
  white-space: nowrap;
}

.reception-member-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.reception-member-cell strong,
.reception-member-cell small {
  display: block;
}

.reception-member-cell small {
  margin-top: 4px;
  color: #64748b;
}

.reception-member-table .reception-seat-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.reception-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-right: 5px;
  vertical-align: middle;
}

.reception-dot.online {
  background: #22c55e;
}

.reception-dot.offline {
  background: #f59e0b;
}

.reception-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.reception-table-actions .danger,
.danger-text {
  color: #dc2626;
}

.muted-text {
  color: #94a3b8;
}

.reception-seat-edit-row td {
  height: auto;
  background: #f8fbff;
}

.reception-seat-edit-row .reception-seat-controls {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
}

.reception-table-foot {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #475569;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  border-top: 0;
  padding: 0 2px;
}

.reception-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
}

.reception-edit-overlay.hidden {
  display: none;
}

.reception-edit-modal {
  width: min(650px, calc(100vw - 48px));
  height: min(720px, calc(100vh - 80px));
  max-height: calc(100vh - 80px);
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr) 72px;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.reception-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2f54eb;
  color: #fff;
  padding: 0 16px;
}

.reception-edit-head h3 {
  margin: 0;
  font-size: 15px;
}

.reception-edit-head button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  padding: 0;
}

.reception-edit-body {
  overflow: auto;
  padding: 24px 36px 20px;
}

.reception-edit-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.reception-edit-row > label {
  color: #475569;
  font-size: 12px;
  text-align: right;
}

.reception-edit-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid #d8dee9;
  border-radius: 999px;
  background: #f8fafc;
  color: #2563eb;
  font-weight: 900;
}

.reception-edit-field {
  position: relative;
}

.reception-edit-field input,
.reception-edit-row select,
.reception-stepper input,
.reception-edit-body textarea {
  width: 100%;
  min-height: 32px;
  border: 1px solid #d5dde8;
  border-radius: 4px;
  background: #fff;
  color: #1f2937;
  padding: 6px 10px;
}

.reception-edit-field small {
  position: absolute;
  top: 7px;
  right: 9px;
  color: #64748b;
  font-size: 11px;
}

.reception-edit-reset {
  margin: -10px 0 18px 106px;
}

.reception-edit-static {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: #475569;
  font-size: 12px;
}

.reception-edit-pill {
  border: 1px solid #d5dde8;
  border-radius: 999px;
  color: #475569;
  padding: 4px 9px;
}

.reception-edit-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 8px 0 24px;
}

.reception-stepper {
  display: grid;
  grid-template-columns: 34px 78px 34px;
  width: max-content;
}

.reception-stepper button {
  min-height: 32px;
  border: 1px solid #d5dde8;
  background: #f8fafc;
  color: #2563eb;
}

.reception-stepper input {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  text-align: center;
}

.reception-edit-help {
  width: min(100%, 430px);
  margin: -8px 0 22px 106px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.reception-edit-switch-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.reception-switch-off {
  width: 28px;
  height: 16px;
  display: inline-block;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
}

.reception-switch-off::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
}

.reception-edit-body textarea {
  min-height: 46px;
  margin-left: 106px;
  width: calc(100% - 106px);
  resize: vertical;
}

.reception-edit-social-field {
  display: grid;
  gap: 10px;
  position: relative;
}

.reception-edit-permission-line {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

.reception-edit-permission-line.hidden {
  display: none;
}

.reception-edit-page-chooser {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 95;
  width: min(440px, calc(100vw - 64px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(520px, calc(100vh - 120px));
  border: 1px solid #d5dde8;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.24);
  transform: translate(-50%, -50%);
}

.reception-edit-page-chooser.hidden {
  display: none;
}

.reception-edit-page-chooser-head,
.reception-edit-page-chooser-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.reception-edit-page-chooser-head {
  border-bottom: 1px solid #e5e7eb;
}

.reception-edit-page-chooser-foot {
  border-top: 1px solid #e5e7eb;
  color: #64748b;
  font-size: 12px;
}

.reception-edit-pages {
  display: grid;
  gap: 8px;
  max-height: 126px;
  overflow: auto;
  border: 1px solid #d5dde8;
  border-radius: 4px;
  background: #fff;
  padding: 8px;
}

.reception-edit-pages.hidden {
  display: none;
}

.reception-edit-page-option {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 4px;
  padding: 6px 8px;
}

.reception-edit-page-option:hover {
  background: #f8fafc;
}

.reception-edit-page-option input {
  width: 14px;
  height: 14px;
}

.reception-edit-page-option strong,
.reception-edit-page-option small {
  display: block;
}

.reception-edit-page-option strong {
  color: #1f2937;
  font-size: 12px;
}

.reception-edit-page-option small,
.reception-edit-page-empty {
  color: #64748b;
  font-size: 12px;
}

.reception-edit-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #e5e7eb;
  padding: 0 16px;
}

.reception-edit-foot button {
  min-width: 60px;
  min-height: 40px;
  border-radius: 4px;
}

.reception-role-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.reception-role-toolbar input {
  width: min(260px, 100%);
  min-height: 32px;
  border: 1px solid #d5dde8;
  border-radius: 4px;
  padding: 6px 10px;
}

.reception-role-modal {
  width: min(1080px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr) 72px;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.reception-role-body {
  display: grid;
  gap: 18px;
  overflow: auto;
  padding: 22px 32px 20px;
}

.reception-role-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px 24px;
}

.reception-edit-row.top {
  align-items: start;
}

.reception-role-body input,
.reception-role-body select,
.reception-role-body textarea {
  width: 100%;
  min-height: 32px;
  border: 1px solid #d5dde8;
  border-radius: 4px;
  background: #fff;
  color: #1f2937;
  padding: 6px 10px;
}

.reception-role-body textarea {
  min-height: 82px;
  resize: vertical;
}

.reception-role-hint {
  min-height: 18px;
  margin: -6px 0 0;
  color: #64748b;
  font-size: 12px;
}

.role-permission-summary {
  color: #475569;
  font-size: 12px;
}

.reception-member-table td small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

.reception-role-permission-head {
  display: grid;
  gap: 4px;
  border-top: 1px solid #e5eaf2;
  padding-top: 16px;
}

.reception-role-permission-head strong {
  color: #0f172a;
  font-size: 15px;
}

.reception-role-permission-head span {
  color: #64748b;
  font-size: 12px;
}

.reception-role-permissions {
  display: grid;
  gap: 12px;
}

.role-permission-group {
  border: 1px solid #e5eaf2;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.role-permission-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e5eaf2;
  padding: 10px 12px;
}

.role-permission-group header label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
}

.role-permission-group header small {
  color: #64748b;
  font-size: 12px;
}

.role-permission-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
  padding: 12px;
}

.role-permission-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid #e5eaf2;
  border-radius: 4px;
  background: #fff;
  color: #1f2937;
  padding: 8px 10px;
  font-size: 13px;
}

.role-permission-item.action {
  background: #fbfdff;
}

.role-permission-item input,
.role-permission-group header input {
  width: 14px;
  height: 14px;
}

@media (max-width: 900px) {
  .reception-role-form,
  .role-permission-grid {
    grid-template-columns: 1fr;
  }
}

.channel-list-panel {
  display: grid;
  gap: 12px;
  background: #fff;
  border-radius: 8px;
  padding: 0;
}

.channel-card-list {
  display: grid;
  gap: 0;
}

#channelTestResult:empty {
  display: none;
}

.channel-add-page {
  display: grid;
  justify-items: start;
  gap: 28px;
  min-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 8px;
  padding: 18px 16px 80px;
}

.channel-add-page.hidden {
  display: none;
}

.channel-add-back {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: #0f172a;
  padding: 0;
  font-size: 18px;
  font-weight: 900;
}

.channel-add-intro {
  width: min(800px, 100%);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef5ff 0%, #fff 100%);
  padding: 18px;
}

.channel-add-brand {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-self: start;
  background: #2563eb;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  font-style: italic;
}

.channel-add-intro h3 {
  margin: 0 0 3px;
  color: #0f172a;
  font-size: 14px;
}

.channel-add-intro p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.channel-add-intro > p {
  grid-column: 1 / -1;
  color: #334155;
}

.channel-add-methods {
  width: min(800px, 100%);
  display: grid;
  gap: 14px;
}

.channel-add-methods h3 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
}

.channel-add-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}

.channel-add-card {
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  padding: 0;
  text-align: left;
}

.channel-add-card.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb inset;
}

.channel-add-card-art {
  min-height: 144px;
  display: grid;
  place-items: center;
  color: #2563eb;
  font-size: 30px;
  font-weight: 900;
}

.channel-add-card-art.facebook {
  background: radial-gradient(circle at 20% 20%, #dbeafe 0 0, transparent 24%), linear-gradient(135deg, #f1edff, #eef6ff);
}

.channel-add-card-art.business {
  background: radial-gradient(circle at 70% 70%, #ccfbf1 0 0, transparent 22%), linear-gradient(135deg, #eef6ff, #e7f0ff);
}

.channel-add-card strong,
.channel-add-card small {
  margin: 0 16px;
}

.channel-add-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  font-size: 14px;
}

.channel-add-card strong i {
  width: 14px;
  height: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
}

.channel-add-card.active strong i {
  border: 4px solid #2563eb;
}

.channel-add-card strong em {
  border-radius: 4px;
  background: #e8f0ff;
  color: #2563eb;
  padding: 1px 5px;
  font-size: 11px;
  font-style: normal;
}

.channel-add-card small {
  display: block;
  padding-top: 8px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.channel-add-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 780px) {
  .channel-integration-shell {
    grid-template-columns: 1fr;
  }

  .channel-integration-rail {
    display: none;
  }

  .channel-add-card-grid {
    grid-template-columns: 1fr;
  }
}

.channel-manual-panel {
  margin-top: 14px;
}

.channel-manual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  align-items: start;
}

.channel-manual-grid textarea {
  min-height: 78px;
  resize: vertical;
}

.channel-manual-grid textarea,
.channel-manual-grid input,
.channel-manual-grid select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
}

.channel-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
  background: #fff;
}

.channel-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
}

.channel-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.channel-table td {
  height: 74px;
  padding: 12px 14px;
  border-bottom: 1px solid #e5eaf2;
  vertical-align: middle;
  color: #0f172a;
}

.channel-table th:last-child,
.channel-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: inherit;
  box-shadow: -8px 0 16px rgba(15, 23, 42, 0.06);
}

.channel-table th:last-child {
  z-index: 2;
  background: #f8fafc;
}

.channel-table tbody tr:hover {
  background: #f8fbff;
}

.channel-table td small {
  display: block;
  color: #8190a6;
  font-size: 12px;
  margin-top: 3px;
}

.channel-page-cell {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 260px;
}

.channel-page-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 900;
}

.channel-page-cell strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
}

.channel-full-id {
  display: block;
  max-width: 220px;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.channel-toggle-pill {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  padding: 2px;
}

.channel-toggle-pill i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.16);
}

.channel-toggle-pill.on {
  justify-content: flex-end;
  background: #2364e8;
}

.channel-member-button {
  min-height: 28px;
  padding: 3px 8px;
  border: 0;
  background: transparent;
  color: #2364e8;
}

.channel-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.channel-row-actions .link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  color: #2364e8;
  background: transparent;
}

.channel-row-actions .danger-link {
  color: var(--danger);
}

.channel-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  padding: 10px 14px;
}

.channel-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475569;
}

.channel-pagination button {
  min-height: auto;
  padding: 0;
}

.channel-page-current {
  min-width: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #f1f5f9;
  color: #0f172a;
  padding: 7px 10px;
  font-weight: 800;
}

.channel-pagination select {
  min-height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
}

@media (max-width: 1100px) {
  .channel-table-toolbar {
    grid-template-columns: 1fr;
  }

  .channel-table-actions {
    justify-content: flex-start;
  }
}

.channel-ai-mode-panel {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.channel-ai-mode-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.channel-ai-mode-panel span,
.channel-ai-mode-panel small {
  color: #64748b;
  font-size: 12px;
}

.channel-ai-mode-panel strong {
  color: #0f172a;
  font-size: 14px;
}

.channel-ai-mode-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.channel-ai-mode-actions button.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.channel-history-sync-panel {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.channel-history-sync-panel > div {
  display: grid;
  gap: 3px;
}

.channel-history-sync-panel span,
.channel-history-sync-panel small {
  color: #64748b;
  font-size: 12px;
}

.channel-history-sync-panel strong {
  color: #0f172a;
  font-size: 14px;
}

.channel-routing-summary {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.channel-routing-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #0f172a;
  font-size: 12px;
}

.channel-routing-summary-head div {
  display: grid;
  gap: 3px;
}

.channel-routing-summary-head strong {
  font-size: 14px;
}

.channel-routing-summary-head span {
  color: #475569;
}

.routing-summary-tip {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8 !important;
  padding: 4px 9px;
  font-weight: 800;
}

.channel-seat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.channel-seat-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
  padding: 9px;
}

.channel-seat-row.muted {
  opacity: 0.62;
}

.channel-seat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.channel-seat-avatar.ai {
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

.channel-seat-avatar.human {
  background: linear-gradient(135deg, #0f766e, #16a34a);
}

.channel-seat-main,
.channel-seat-usage {
  display: grid;
  gap: 3px;
}

.channel-seat-main strong,
.channel-seat-usage strong {
  color: #0f172a;
  font-size: 13px;
}

.channel-seat-main span,
.channel-seat-usage span,
.channel-seat-empty,
.channel-seat-more {
  color: #64748b;
  font-size: 12px;
}

.channel-seat-usage {
  justify-items: end;
  text-align: right;
}

.channel-seat-empty,
.channel-seat-more {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px;
}

.removed-channel-box {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.removed-channel-box h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.removed-channel-box p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.channel-routing-panel {
  margin-top: 14px;
}

.channel-routing-panel.hidden {
  display: none;
}

.channel-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.58);
}

.channel-drawer-overlay.hidden {
  display: none;
}

.channel-routing-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  width: min(620px, 100vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  gap: 0;
  background: #fff;
  box-shadow: -16px 0 36px rgba(15, 23, 42, 0.2);
}

.channel-routing-drawer.hidden {
  display: none;
}

.channel-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid #eef2f7;
}

.channel-drawer-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
}

.channel-drawer-head .icon-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: 24px;
  line-height: 1;
}

.channel-drawer-tip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  margin: 16px 24px 12px;
  border-radius: 6px;
  background: #eaf7ff;
  color: #334155;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.channel-drawer-tip strong {
  color: #0f172a;
}

.channel-drawer-tabs {
  display: flex;
  gap: 22px;
  padding: 0 24px;
  border-bottom: 1px solid #e5eaf2;
}

.channel-drawer-tabs button {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #475569;
  padding: 0;
}

.channel-drawer-tabs button.active {
  border-bottom-color: #2563eb;
  color: #2563eb;
}

.channel-drawer-tabs button:disabled {
  color: #64748b;
  opacity: 0.7;
}

.channel-drawer-picker {
  display: grid;
  grid-template-columns: 47% 53%;
  min-height: 0;
  padding: 16px 24px 0;
}

.channel-picker-left,
.channel-picker-right {
  min-width: 0;
  min-height: 0;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.channel-picker-left {
  border-radius: 6px 0 0 6px;
  border-right: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.channel-picker-right {
  border-radius: 0 6px 6px 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.channel-picker-search {
  padding: 16px 16px 10px;
}

.channel-picker-search input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #f8fafc;
  padding: 8px 10px;
}

.channel-picker-meta,
.channel-picker-selected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
  color: #64748b;
  font-size: 13px;
}

.channel-picker-groups,
.channel-selected-tags {
  min-height: 0;
  overflow: auto;
  padding: 0 16px 16px;
}

.channel-picker-group {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.channel-picker-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.channel-picker-group-head small {
  color: #64748b;
  font-weight: 700;
}

.channel-picker-member {
  display: grid;
  grid-template-columns: 18px 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 42px;
  color: #0f172a;
  cursor: pointer;
}

.channel-picker-member input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: #2563eb;
}

.channel-picker-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 900;
  font-size: 12px;
}

.channel-picker-member strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-picker-member small {
  display: block;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-selected-tags {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.channel-selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  padding: 4px 8px;
  font-size: 13px;
}

.channel-selected-tag span {
  color: #64748b;
  font-weight: 900;
}

.channel-drawer-sync {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  color: #334155;
  font-size: 13px;
}

.channel-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e5eaf2;
  padding: 14px 24px;
  color: #475569;
  font-size: 13px;
}

.channel-drawer-foot > div {
  display: flex;
  gap: 10px;
}

@media (max-width: 720px) {
  .channel-routing-drawer {
    width: 100vw;
  }

  .channel-drawer-picker {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .channel-picker-left,
  .channel-picker-right {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
  }

  .channel-picker-right {
    min-height: 180px;
    margin-top: 12px;
  }

  .channel-drawer-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .channel-drawer-foot > div {
    justify-content: flex-end;
  }
}

.routing-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.routing-head h3 {
  margin: 0;
  font-size: 19px;
}

.routing-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.routing-overview {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  padding: 14px;
  margin-bottom: 12px;
  display: grid;
  gap: 12px;
}

.routing-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.routing-overview-head h4 {
  margin: 0 0 5px;
  font-size: 16px;
}

.routing-overview-head p {
  margin: 0;
  color: #475569;
  font-size: 13px;
}

.routing-overview-metrics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.routing-overview-metrics span {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.routing-overview-metrics strong {
  color: #061735;
}

.routing-selected-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.routing-selected-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.routing-selected-card.muted {
  opacity: 0.62;
}

.routing-selected-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.routing-selected-card strong {
  color: #061735;
  font-size: 13px;
}

.routing-selected-card small {
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.routing-actions,
.routing-mini-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.routing-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(300px, 0.75fr);
  gap: 12px;
}

.routing-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.routing-card h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

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

.routing-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.routing-grid select,
.routing-grid input,
.routing-member-row input,
.routing-member-row select,
.routing-service-row input,
.routing-service-row select,
.routing-add-row select {
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 6px 9px;
  background: #fff;
  color: var(--ink);
}

.routing-member-list,
.routing-service-list,
.routing-audit-list,
.routing-preview-list {
  display: grid;
  gap: 8px;
}

.routing-rule-card,
.routing-service-card,
.routing-audit-card {
  grid-column: 1 / -1;
}

.routing-service-card > .routing-head {
  align-items: center;
}

.routing-service-card > .routing-head h4 {
  margin-bottom: 4px;
}

.routing-service-card > .routing-head p {
  margin: 0;
  font-size: 12px;
}

.routing-section-label {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.routing-service-row {
  display: grid;
  grid-template-columns: 88px minmax(220px, 1fr) minmax(400px, auto);
  gap: 10px;
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

.routing-service-row-available {
  border-color: #e2e8f0;
  background: #fff;
}

.routing-service-row-assigned {
  box-shadow: inset 3px 0 0 #2563eb;
}

.routing-service-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.routing-service-check input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: #2563eb;
}

.routing-service-fields {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.routing-service-fields label {
  display: grid;
  gap: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.routing-service-fields input {
  width: 82px;
}

.routing-service-fields select {
  width: 94px;
}

.routing-service-note {
  color: #64748b;
  font-size: 12px;
}

.routing-member-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 88px 88px 90px 76px 88px 96px;
  gap: 8px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px;
  background: #f8fafc;
}

.routing-seat-title {
  display: grid;
  gap: 3px;
}

.routing-seat-title strong {
  font-size: 13px;
}

.routing-seat-title span,
.routing-small {
  color: var(--muted);
  font-size: 12px;
}

.routing-toggle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.routing-toggle.active {
  border-color: #10b981;
  background: #dcfce7;
  color: #047857;
}

.routing-remove {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.routing-add-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin-top: 10px;
}

.routing-user-row {
  grid-template-columns: minmax(240px, 1fr) 86px 86px auto;
}

.routing-user-row input {
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 6px 9px;
  background: #fff;
  color: var(--ink);
}

.routing-preview-item,
.routing-audit-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  background: #f8fafc;
}

.routing-preview-index {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}

.routing-preview-dist {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.routing-preview-dist span {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.routing-preview-dist span.human {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.routing-preview-dist span.overflow {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.routing-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .routing-layout {
    grid-template-columns: 1fr;
  }
  .routing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .routing-member-row {
    grid-template-columns: 1fr 82px 82px;
  }
  .routing-user-row {
    grid-template-columns: 1fr 82px 82px;
  }
}

.compact-result {
  min-height: 34px;
  max-height: 140px;
  overflow: auto;
}

.summary-line {
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.match-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.match-terms span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--ink);
  background: var(--accent-soft);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.profile-grid div,
.profile-situation {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}

.profile-grid span,
.profile-situation span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.profile-grid strong {
  font-size: 13px;
  word-break: break-word;
}

.profile-situation {
  margin-top: 8px;
}

.profile-situation p {
  margin: 0;
  font-size: 13px;
  word-break: break-word;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.metric strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  color: var(--ink);
}

.metric span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

pre {
  white-space: pre-wrap;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  max-height: 280px;
  overflow: auto;
}

.audit-panel {
  margin-top: 14px;
}

.settings-page {
  display: grid;
  gap: 14px;
}

.settings-page-head,
.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.settings-page-head h2,
.settings-card-head h3,
.settings-diagnostic-grid h3 {
  margin: 0;
  color: #06152e;
}

.settings-page-head h2 {
  font-size: 26px;
  line-height: 1.15;
}

.settings-page-head p,
.settings-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.settings-status-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 12px;
}

.settings-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.settings-summary-card,
.settings-next-card,
.settings-panel,
.settings-advanced-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.settings-summary-card {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border-left: 4px solid var(--accent);
}

.settings-summary-card.warning {
  border-left-color: var(--warn);
}

.settings-summary-card.blocked {
  border-left-color: var(--danger);
}

.settings-summary-card strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.settings-summary-card span,
.settings-next-card > .settings-card-head span {
  color: var(--muted);
  font-size: 12px;
}

.settings-next-card,
.settings-panel {
  padding: 14px 16px;
}

.settings-next-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.settings-next-item,
.settings-next-empty {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  background: #f8fafc;
}

.settings-next-item span {
  color: var(--warn);
  font-size: 12px;
  font-weight: 800;
}

.settings-next-item.blocker span {
  color: var(--danger);
}

.settings-next-item strong,
.settings-next-empty strong {
  color: var(--ink);
  font-size: 13px;
}

.settings-next-empty {
  grid-template-columns: 1fr;
}

.settings-next-empty span {
  color: var(--muted);
  font-size: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-inline-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-inline-status.success {
  color: var(--accent);
}

.settings-inline-status.danger {
  color: var(--danger);
}

.chat-tool-settings-panel {
  display: grid;
  gap: 14px;
}

.chat-tool-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.chat-tool-settings-grid label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.chat-tool-settings-grid select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d9e3f1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  border: 1px solid #d9e3f1;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.settings-toggle-row span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.settings-toggle-row strong {
  color: var(--ink);
  font-size: 14px;
}

.settings-toggle-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.settings-toggle-row i {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #dfe7f2;
  transition: background 0.15s ease;
}

.settings-toggle-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
  transition: transform 0.15s ease;
}

.settings-toggle-row[aria-pressed="true"] {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.settings-toggle-row[aria-pressed="true"] i {
  background: #2468f2;
}

.settings-toggle-row[aria-pressed="true"] i::after {
  transform: translateX(18px);
}

.settings-endpoint-list,
.settings-check-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.settings-endpoint-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8fafc;
}

.settings-endpoint-row strong {
  display: block;
  color: #334155;
  font-size: 12px;
  margin-bottom: 6px;
}

.settings-endpoint-row code {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.settings-check-card {
  border: 1px solid #e5e7eb;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.settings-check-card.warning {
  border-left-color: var(--warn);
}

.settings-check-card.blocked {
  border-left-color: var(--danger);
}

.settings-check-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}

.settings-check-head strong {
  color: var(--ink);
  font-size: 14px;
}

.settings-check-items {
  display: grid;
}

.settings-check-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid #eef2f7;
  font-size: 13px;
}

.settings-check-item:first-child {
  border-top: 0;
}

.settings-check-item span {
  color: var(--accent);
  font-weight: 800;
}

.settings-check-item.warning span {
  color: var(--warn);
}

.settings-check-item.blocker span {
  color: var(--danger);
}

.settings-check-item p {
  margin: 0;
  color: #475569;
  overflow-wrap: anywhere;
}

.settings-advanced-panel {
  padding: 0;
  overflow: hidden;
}

.settings-advanced-panel summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 900;
}

.settings-diagnostic-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 16px 16px;
}

.settings-diagnostic-grid h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

@media (max-width: 1100px) {
  .settings-status-panel,
  .settings-grid,
  .chat-tool-settings-grid,
  .settings-diagnostic-grid {
    grid-template-columns: 1fr;
  }

  .settings-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tags-page {
  display: grid;
  gap: 16px;
}

.tags-page-head,
.tag-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tags-page-head h2 {
  margin: 0;
  color: #06152e;
  font-size: 26px;
  line-height: 1.18;
  font-weight: 900;
}

.tags-page-head p,
.tag-panel-head p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.tags-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.tag-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tag-kpi-card,
.tag-system-panel,
.tag-main-panel,
.tag-segment-panel,
.tag-review-panel,
.tag-log-panel,
.tag-safety-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tag-kpi-card {
  min-height: 112px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.tag-kpi-top,
.tag-kpi-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #50617a;
  font-size: 12px;
}

.tag-kpi-top em {
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f7f1;
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.tag-kpi-card strong {
  font-size: 32px;
  line-height: 1;
  color: #07152e;
}

.tag-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(560px, 1.8fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.tag-layout-simple {
  grid-template-columns: minmax(230px, 0.62fr) minmax(720px, 1.8fr);
}

.tag-system-panel,
.tag-main-panel,
.tag-segment-panel,
.tag-review-panel,
.tag-log-panel,
.tag-safety-panel {
  overflow: hidden;
}

.tag-advanced-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tag-advanced-panel > summary {
  min-height: 50px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #07152e;
  font-size: 15px;
  font-weight: 900;
  list-style: none;
  border-bottom: 1px solid transparent;
}

.tag-advanced-panel > summary::-webkit-details-marker {
  display: none;
}

.tag-advanced-panel > summary::after {
  content: "展开";
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tag-advanced-panel[open] > summary {
  border-bottom-color: var(--line);
}

.tag-advanced-panel[open] > summary::after {
  content: "收起";
}

.tag-advanced-grid .tag-log-panel,
.tag-advanced-grid .tag-safety-panel {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.tag-panel-head {
  min-height: 62px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.tag-panel-head h3 {
  margin: 0;
  color: #07152e;
  font-size: 17px;
  font-weight: 900;
}

.tag-inline-hint {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.tag-group-list,
.tag-segment-list,
.tag-review-list,
.tag-log-list,
.tag-safety-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.tag-group-card,
.tag-segment-card,
.tag-review-card,
.tag-log-item,
.tag-safety-item {
  border: 1px solid #e4ebf5;
  border-radius: 8px;
  background: #fbfdff;
}

.tag-group-card {
  width: 100%;
  min-height: 72px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  text-align: left;
}

.tag-group-card strong,
.tag-segment-card strong,
.tag-safety-item strong {
  display: block;
  color: var(--ink);
  font-weight: 900;
}

.tag-group-card small,
.tag-segment-card small,
.tag-safety-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.tag-group-card span {
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
}

.tag-group-card em {
  grid-column: 1 / -1;
  color: #6c7b91;
  font-style: normal;
  font-size: 12px;
}

.tag-test-box {
  display: grid;
  gap: 8px;
  margin: 0 14px 14px;
  padding: 12px;
  border: 1px solid #dbe8fb;
  border-radius: 8px;
  background: #f7fbff;
}

.tag-test-title {
  font-weight: 900;
  color: var(--ink);
}

.tag-test-box textarea {
  min-height: 88px;
  resize: vertical;
}

.tag-test-result {
  display: grid;
  gap: 8px;
  color: #40516b;
  font-size: 12px;
}

.tag-test-result div {
  display: grid;
  gap: 5px;
  padding: 8px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #e4ebf5;
}

.tag-rule-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 0.34fr));
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.tag-rule-form {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #f7fbff;
}

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

.tag-form-grid label {
  display: grid;
  gap: 6px;
  color: #43526a;
  font-size: 12px;
  font-weight: 800;
}

.tag-form-grid .wide {
  grid-column: span 3;
}

.tag-form-grid textarea {
  min-height: 76px;
  resize: vertical;
}

.tag-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.tag-table-wrap {
  overflow-x: auto;
}

.tag-rule-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  table-layout: fixed;
}

.tag-rule-table th,
.tag-rule-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #e8eef6;
  vertical-align: middle;
  font-size: 13px;
}

.tag-rule-table th {
  color: #66758e;
  font-weight: 900;
  background: #f8fafc;
}

.tag-rule-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tag-rule-title strong {
  color: #07152e;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-rule-title small {
  color: var(--muted);
  line-height: 1.45;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--accent);
  background: #e8f7f1;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tag-pill.intent,
.tag-pill.followup {
  color: var(--blue);
  background: #e9f0ff;
}

.tag-pill.risk {
  color: #d64545;
  background: #fff0f0;
}

.tag-pill.concern {
  color: #c47810;
  background: #fff4df;
}

.tag-pill.knowledge {
  color: #7257d8;
  background: #f0edff;
}

.tag-pill.profile,
.tag-pill.stage {
  color: #0f8da8;
  background: #e7f8fb;
}

.tag-mini-actions,
.tag-review-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-mini-actions button,
.tag-review-actions button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid #d5dfef;
  background: #fff;
  color: #1d4ed8;
  font-weight: 800;
}

.tag-switch {
  min-width: 78px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #d6e0ed;
  background: #eef3f9;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
}

.tag-switch span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c3cfdf;
}

.tag-switch.on {
  color: var(--accent);
  background: #e5f8ef;
  border-color: #bdebd6;
}

.tag-switch.on span {
  background: var(--accent);
}

.tag-segment-card {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.tag-segment-card > span {
  justify-self: start;
  color: var(--accent);
  font-weight: 900;
}

.tag-progress {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8eef6;
}

.tag-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2364e8, var(--accent));
}

.tag-review-panel {
  min-height: 250px;
}

.tag-review-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.tag-review-main {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
}

.tag-review-card p {
  margin: 0;
  color: #40516b;
  line-height: 1.55;
}

.tag-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
}

.tag-log-item {
  display: grid;
  grid-template-columns: 96px 150px 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
}

.tag-log-item span,
.tag-log-item small {
  color: var(--muted);
  font-size: 12px;
}

.tag-log-item strong {
  color: var(--ink);
}

.tag-safety-item {
  min-height: 64px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.report-page {
  display: grid;
  gap: 18px;
  width: 100%;
}

.report-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding-bottom: 4px;
}

.report-page-head h2 {
  margin: 0;
  color: #06152e;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 850;
}

.report-page-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.report-head-actions {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) auto;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: min(760px, 60vw);
}

.report-period-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(76px, 1fr));
  min-width: 0;
  border: 1px solid #cbd8ea;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(20, 38, 69, 0.05);
}

.report-period-tab {
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #32435c;
  font-weight: 800;
}

.report-period-tab.active {
  background: var(--blue);
  color: #fff;
}

.report-head-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 4px;
  border: 1px solid #d8e3f1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(20, 38, 69, 0.06);
}

.report-head-tools > button,
.report-head-tools .report-custom-date {
  flex: 0 0 auto;
}

.report-custom-date {
  position: relative;
  width: 142px;
}

.report-custom-toggle {
  width: 100%;
  min-height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-color: #cbd8ea;
  color: #23344d;
  background: #fff;
}

.report-custom-toggle.active,
.report-custom-toggle:hover {
  border-color: #bfd0f7;
  color: var(--blue);
}

.report-custom-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12;
  width: 300px;
  padding: 12px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(20, 38, 69, 0.16);
}

.report-custom-panel label {
  display: grid;
  gap: 6px;
  color: #43526a;
  font-size: 12px;
  font-weight: 700;
}

.report-filter-panel,
.report-panel,
.report-kpi-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

.report-filter-panel {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
}

.report-filter-panel strong {
  display: block;
  color: #06152e;
  font-size: 15px;
  margin-bottom: 4px;
}

.report-filter-panel span {
  color: var(--muted);
  font-size: 13px;
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) 112px;
  gap: 8px;
  align-items: center;
  min-width: min(690px, 54vw);
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.report-kpi-card {
  min-height: 120px;
  padding: 16px;
  color: var(--ink);
  text-align: left;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
  align-content: start;
  border-color: #d5dfec;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.report-kpi-card:hover {
  border-color: #b9cae3;
  box-shadow: 0 10px 24px rgba(20, 38, 69, 0.08);
}

.report-kpi-card span {
  color: #40516a;
  font-weight: 700;
}

.report-kpi-card em {
  justify-self: end;
  font-style: normal;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  background: var(--green-soft);
  color: var(--green);
}

.report-kpi-card em.down {
  background: var(--red-soft);
  color: var(--red);
}

.report-kpi-card em.flat {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.report-kpi-card strong {
  grid-column: 1 / -1;
  color: #06152e;
  font-size: 32px;
  line-height: 1;
}

.report-kpi-card small {
  grid-column: 1 / -1;
  color: #52627a;
  font-size: 13px;
}

.report-main-grid,
.report-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.report-panel {
  padding: 0;
  overflow: hidden;
}

.report-panel-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.report-panel-head h3 {
  margin: 0;
  color: #06152e;
  font-size: 17px;
  font-weight: 850;
}

.report-panel-head span {
  color: var(--muted);
  font-size: 12px;
}

.link-button {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 4px 0;
  font-weight: 800;
}

.link-button:hover {
  color: var(--accent);
  background: transparent;
}

#reportTrend,
.report-funnel,
.report-quality-grid,
.report-list,
.report-drill-list {
  padding: 18px;
}

#reportTrend {
  position: relative;
}

#reportTrend .trend-legend {
  top: 18px;
  right: 20px;
}

.report-trend-panel .trend-line-wrap {
  min-height: 300px;
  padding-top: 16px;
}

.report-funnel {
  min-height: 300px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.report-funnel .stage {
  grid-template-columns: 70px minmax(0, 1fr) 42px;
  gap: 10px;
  padding: 2px 0;
}

.report-funnel .stage-name {
  color: #22324a;
  font-weight: 850;
}

.report-funnel .stage-bar {
  height: 14px;
  background: #eaf0f7;
}

.report-funnel .stage-fill {
  background: linear-gradient(90deg, #2364e8 0%, #0f9f7a 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28) inset;
}

.report-funnel .stage-num {
  color: #06152e;
  font-size: 14px;
}

.report-funnel-summary {
  margin-bottom: 2px;
  padding: 12px 14px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.report-funnel-summary strong {
  display: block;
  color: #06152e;
  font-size: 15px;
  margin-bottom: 4px;
}

.report-funnel-summary span {
  color: #52627a;
  font-size: 12px;
}

.report-quality-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-quality-card {
  min-height: 94px;
  display: grid;
  gap: 6px;
  text-align: left;
  color: var(--ink);
  background: #f9fbfe;
  border-color: var(--line);
}

.report-quality-card strong {
  color: #06152e;
  font-size: 22px;
}

.report-quality-card small {
  color: var(--muted);
}

.report-quality-card.warning {
  background: var(--warn-soft);
  border-color: #ffd89a;
}

.report-row,
.report-drill-row,
.report-definition {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.report-row + .report-row,
.report-definition + .report-definition,
.report-drill-row + .report-drill-row {
  margin-top: 10px;
}

.report-row {
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto) auto;
}

.report-action-row {
  width: 100%;
  color: var(--ink);
  text-align: left;
  border-color: var(--line);
}

.report-action-row.high {
  border-color: #ffc5c0;
  background: var(--red-soft);
}

.report-row strong,
.report-drill-row strong,
.report-definition strong {
  display: block;
  color: #06152e;
  font-weight: 850;
}

.report-row small,
.report-drill-row small,
.report-definition p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.report-row em,
.report-drill-row em {
  font-style: normal;
  color: #06152e;
  font-weight: 850;
}

.report-progress {
  height: 10px;
  min-width: 150px;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}

.report-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--accent));
}

.report-row-metrics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.report-drill-row {
  grid-template-columns: minmax(0, 1fr) 86px 70px 70px;
}

.report-audit-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.report-audit-grid > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.report-audit-wide {
  grid-column: 1 / -1;
}

.mini-panel-title {
  margin-bottom: 10px;
  color: #06152e;
  font-weight: 850;
}

.notice-flash {
  color: var(--accent) !important;
}

body.scripts-view .main {
  padding: 24px 28px 44px;
  display: block;
}

body.scripts-view .topbar {
  display: none;
}

body.training-view .main {
  padding: 24px 28px 44px;
  display: block;
}

body.training-view .topbar {
  display: none;
}

.training-page {
  display: grid;
  gap: 16px;
  width: 100%;
}

.training-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.training-page-head h2 {
  margin: 0;
  color: #06152e;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 850;
}

.training-page-head p {
  margin: 8px 0 0;
  max-width: 860px;
  color: #50627f;
  font-size: 13px;
  line-height: 1.55;
}

.training-head-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.training-notice {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid #cfe2ff;
  border-radius: 8px;
  background: #eef5ff;
  color: #22517a;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 800;
  display: flex;
  align-items: center;
}

.training-notice.success {
  border-color: #bfe8d7;
  background: #effbf6;
  color: #0f6b4b;
}

.training-notice.warn {
  border-color: #f4dc99;
  background: #fff8e8;
  color: #8a5700;
}

.training-notice.danger {
  border-color: #fac5bd;
  background: #fff3f1;
  color: var(--danger);
}

.training-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.training-metrics-compact .training-metric {
  min-height: 82px;
  padding: 13px 14px;
}

.training-metrics-compact .training-metric strong {
  font-size: 24px;
}

.training-metric {
  min-height: 108px;
  padding: 16px;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(25, 44, 74, 0.045);
}

.training-metric.real {
  border-color: #bfe8d7;
  background: linear-gradient(135deg, #fff 0%, #f1fbf6 100%);
}

.training-metric.local {
  border-color: #f4dc99;
  background: linear-gradient(135deg, #fff 0%, #fff9eb 100%);
}

.training-metric span {
  color: #50627f;
  font-size: 13px;
  font-weight: 800;
}

.training-metric strong {
  color: #06152e;
  font-size: 27px;
  line-height: 1;
  font-weight: 950;
}

.training-metric small {
  color: #5a6f8d;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 750;
}

.training-layout {
  display: grid;
  grid-template-columns: 330px minmax(620px, 1fr);
  gap: 14px;
  align-items: start;
  position: relative;
}

.training-side {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 18px;
}

.training-coach {
  display: none;
  gap: 12px;
  position: fixed;
  top: 92px;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: min(430px, calc(100vw - 48px));
  overflow: auto;
  padding: 0;
  filter: drop-shadow(0 20px 48px rgba(16, 30, 52, 0.18));
}

.training-coach.open {
  display: grid;
  align-content: start;
}

.training-panel,
.training-chat-panel {
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(25, 44, 74, 0.04);
}

.training-panel {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.training-panel-head,
.training-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.training-panel-head h3,
.training-chat-head h3 {
  margin: 0;
  color: #06152e;
  font-size: 17px;
  font-weight: 900;
}

.training-panel-head p,
.training-chat-head p {
  margin: 5px 0 0;
  color: #5b6f8b;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.training-panel input,
.training-panel textarea,
.training-panel select,
.training-send-row textarea {
  border-color: #d5e1ef;
}

.training-panel textarea {
  min-height: 84px;
}

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

.training-presets button {
  min-height: 34px;
  padding: 6px 8px;
  color: #245076;
  border-color: #d7e6f7;
  background: #f8fbff;
  font-size: 12px;
}

.training-conversation-list,
.training-lesson-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
}

.training-conversation-card {
  width: 100%;
  min-height: 92px;
  padding: 0;
  display: grid;
  gap: 0;
  text-align: left;
  color: #17233a;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #f8fbff;
  overflow: hidden;
}

.training-conversation-card.active {
  border-color: var(--blue);
  background: #eef5ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.training-conversation-open {
  min-height: 78px;
  padding: 12px;
  display: grid;
  gap: 5px;
  text-align: left;
  color: #17233a;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.training-conversation-open:hover {
  background: rgba(37, 99, 235, 0.04);
}

.training-conversation-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #d8e4f2;
  background: #fff;
}

.training-conversation-actions button {
  min-height: 32px;
  border: 0;
  border-right: 1px solid #edf2f8;
  border-radius: 0;
  background: transparent;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.training-conversation-actions button:last-child {
  border-right: 0;
}

.training-conversation-actions button:hover {
  background: #f3f7ff;
}

.training-conversation-actions button.danger {
  color: var(--danger);
}

.training-conversation-card span,
.training-lesson span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.training-conversation-card strong,
.training-lesson strong {
  color: #06152e;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 900;
}

.training-conversation-card small,
.training-lesson small {
  color: #657893;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.training-chat-panel {
  min-height: calc(100vh - 230px);
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr) auto;
  overflow: hidden;
}

.training-chat-head {
  padding: 14px 16px;
  border-bottom: 1px solid #d8e4f2;
  background: #fff;
}

.training-chat-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.training-chat-actions button {
  white-space: nowrap;
  min-height: 34px;
  padding: 0 10px;
}

.training-messages {
  min-height: 420px;
  max-height: calc(100vh - 360px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  background: #f7fbff;
}

.training-message {
  width: min(78%, 760px);
  padding: 11px 13px;
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: #fff;
}

.training-message span {
  color: #58708e;
  font-size: 12px;
  font-weight: 850;
}

.training-message p {
  margin: 6px 0 0;
  color: #10213a;
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-wrap;
}

.training-message.ai {
  align-self: flex-end;
  border-color: #b9d2ff;
  background: #2364e8;
}

.training-message.ai span,
.training-message.ai p {
  color: #fff;
}

.training-message.human {
  align-self: flex-end;
  border-color: #bfe8d7;
  background: #effbf6;
}

.training-send-row {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  align-items: end;
  border-top: 1px solid #d8e4f2;
  background: #fff;
}

.training-send-row textarea {
  min-height: 74px;
  resize: vertical;
}

.training-coach .training-panel {
  border-color: #b7d7ff;
  background: #fff;
}

.training-lesson {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #d8e4f2;
  border-left: 4px solid #b8c7db;
  border-radius: 8px;
  background: #f8fbff;
}

.training-lesson.active {
  border-left-color: var(--accent);
  background: #f5fffc;
}

.training-lesson.inactive {
  opacity: 0.72;
}

.training-lesson p {
  margin: 5px 0;
  color: #50627f;
  font-size: 12px;
  line-height: 1.45;
}

.training-empty {
  padding: 16px;
  border: 1px dashed #cbd9ea;
  border-radius: 8px;
  color: #61728b;
  background: #fff;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 750;
}

.training-empty.compact {
  padding: 12px;
}

.script-page {
  display: grid;
  gap: 16px;
  width: 100%;
}

.script-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.script-page-head h2 {
  margin: 0;
  color: #06152e;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 850;
}

.script-page-head p {
  margin: 8px 0 0;
  max-width: 820px;
  color: #50627f;
  font-size: 13px;
  line-height: 1.55;
}

.script-head-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.script-notice {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid #cfe2ff;
  border-radius: 8px;
  background: #eef5ff;
  color: #22517a;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
}

.library-boundary-strip {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(560px, 1.8fr);
  gap: 12px;
  align-items: stretch;
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, #f3fffb 100%);
  box-shadow: 0 10px 28px rgba(25, 44, 74, 0.04);
}

.library-boundary-copy {
  padding: 14px;
  display: grid;
  gap: 7px;
  align-content: start;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.library-boundary-copy span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.library-boundary-copy strong {
  color: #06152e;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 950;
}

.library-boundary-copy small {
  color: #536984;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 750;
}

.library-boundary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.library-boundary-card {
  min-height: 126px;
  padding: 12px;
  display: grid;
  gap: 6px;
  align-content: start;
  text-align: left;
  color: #06152e;
  border: 1px solid #d7e3f3;
  border-top: 3px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}

.library-boundary-card.active {
  border-color: #8cc5ff;
  border-top-color: var(--blue);
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.library-boundary-card.experience {
  border-top-color: var(--accent);
}

.library-boundary-card.assets {
  border-top-color: #d17a00;
}

.library-boundary-card.scripts {
  border-top-color: #7c3aed;
}

.library-boundary-card span {
  color: #36506f;
  font-size: 12px;
  font-weight: 900;
}

.library-boundary-card strong {
  color: #06152e;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 950;
}

.library-boundary-card strong em {
  float: right;
  color: #0f766e;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.library-boundary-card small,
.library-boundary-card i {
  color: #5b6f8c;
  font-size: 11px;
  line-height: 1.45;
  font-style: normal;
  font-weight: 740;
}

.library-boundary-card i {
  color: #8a5d1f;
}

.library-boundary-usage {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.library-boundary-usage span {
  min-height: 32px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #fff;
  color: #405a7c;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
}

.script-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.script-metric-card {
  min-height: 108px;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  box-shadow: 0 8px 24px rgba(25, 44, 74, 0.04);
}

.script-metric-card span {
  color: #304769;
  font-size: 13px;
  font-weight: 850;
}

.script-metric-card strong {
  color: #06152e;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.script-metric-card small {
  color: #4d6281;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.script-strategy-board {
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) repeat(3, minmax(210px, 0.75fr));
  gap: 14px;
  align-items: stretch;
}

.script-strategy-hero,
.script-strategy-card {
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(25, 44, 74, 0.04);
}

.script-strategy-hero {
  min-height: 160px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f5fbff 58%, #f2fffb 100%);
}

.script-strategy-hero > span,
.script-strategy-card > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.script-strategy-hero h3 {
  margin: 0;
  color: #06152e;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}

.script-strategy-hero p {
  margin: 0;
  color: #50627f;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 750;
}

.script-strategy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.script-strategy-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f766e;
  background: #e9fbf6;
  font-size: 12px;
  font-weight: 850;
}

.script-strategy-card {
  min-height: 160px;
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.script-strategy-card strong {
  color: #06152e;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}

.script-strategy-card small {
  color: #536984;
  line-height: 1.55;
  font-size: 12px;
  font-weight: 750;
}

.script-layout {
  display: grid;
  grid-template-columns: 270px minmax(560px, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.script-layout-manage {
  grid-template-columns: minmax(720px, 1fr);
  max-width: 1180px;
}

.script-left,
.script-main,
.script-right {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.script-left,
.script-right {
  position: sticky;
  top: 18px;
}

.script-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(25, 44, 74, 0.04);
}

.script-panel-head {
  min-height: 56px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.script-panel-head h3 {
  margin: 0;
  color: #06152e;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 850;
}

.script-panel-head p {
  margin: 5px 0 0;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.script-coverage-list,
.script-playbook,
.script-guardrails,
.script-card-list,
.script-mini-list {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.script-library-tabs {
  padding: 12px 18px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.script-library-tabs button {
  width: auto;
  min-height: 40px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fff;
  color: #31435e;
  text-align: center;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
}

.script-library-tabs button:hover,
.script-library-tabs button.active {
  border-color: #9ebdf1;
  background: #eef5ff;
  color: #0f4fb7;
}

.script-coverage-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fbfdff;
}

.script-coverage-item.ready {
  border-color: #b8e3d4;
  background: #f3fbf8;
}

.script-coverage-item.missing {
  border-color: #ffd0d0;
  background: #fff6f6;
}

.script-coverage-item.optional {
  border-color: #d9e4f2;
}

.script-coverage-item strong {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #07152e;
  font-size: 13px;
  font-weight: 900;
}

.script-coverage-item strong span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.script-coverage-item small {
  display: block;
  margin-top: 5px;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.script-coverage-item em {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.script-play-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fff;
}

.script-play-step i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.script-play-step strong,
.script-guardrail strong,
.script-mini-card strong {
  display: block;
  color: #07152e;
  font-size: 13px;
  font-weight: 900;
}

.script-play-step small,
.script-guardrail small,
.script-mini-card small {
  display: block;
  margin-top: 5px;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.script-play-step em {
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.script-guardrail {
  padding: 12px;
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: #f7fbff;
}

.script-guardrail.warning {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.script-form-panel {
  overflow: visible;
}

.script-collapsible-panel > summary {
  min-height: 54px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: #06152e;
  font-size: 16px;
  font-weight: 900;
  list-style: none;
  background: #fbfdff;
}

.script-collapsible-panel > summary::-webkit-details-marker {
  display: none;
}

.script-collapsible-panel > summary::after {
  content: "展开";
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.script-collapsible-panel[open] > summary {
  border-bottom: 1px solid var(--line);
}

.script-collapsible-panel[open] > summary::after {
  content: "收起";
}

.script-collapsible-panel[open] .script-panel-head {
  border-top: 0;
}

.script-form-grid {
  padding: 16px 18px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.script-form-grid label {
  color: #304769;
  font-size: 12px;
  font-weight: 850;
  display: grid;
  gap: 6px;
}

.script-form-grid .wide {
  grid-column: 1 / -1;
}

.script-form-grid textarea {
  min-height: 150px;
}

.script-quick-editor .script-panel-head {
  background: #fff;
}

.script-quick-editor .script-form-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.script-quick-editor .script-form-grid label.wide:first-of-type input {
  min-height: 44px;
  font-size: 15px;
  font-weight: 850;
}

.script-quick-editor .script-form-actions {
  border-top: 1px solid #edf2f8;
  margin-top: 16px;
  background: #fbfdff;
}

.script-form-actions {
  padding: 14px 18px 18px;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.script-filters {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr)) minmax(200px, 1.4fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.script-card {
  padding: 14px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fff;
}

.script-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.script-card h4 {
  margin: 0;
  color: #06152e;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 900;
}

.script-card-head p,
.script-card-foot span {
  margin: 7px 0 0;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.script-risk,
.script-scope {
  flex: 0 0 auto;
  min-width: 62px;
  padding: 4px 9px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.script-risk.ok {
  background: var(--green-soft);
  color: var(--green);
}

.script-risk.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.script-risk.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.script-scope.public {
  background: #eef5ff;
  color: #0f4fb7;
}

.script-scope.private {
  background: #fff7e6;
  color: #a15c00;
}

.script-content {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid #e0e8f3;
  border-radius: 8px;
  background: #f8fbff;
  color: #20324d;
  line-height: 1.6;
  white-space: pre-wrap;
}

.script-card-foot {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.script-card-foot div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.script-readonly {
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.script-use-guide {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.script-use-guide div {
  padding: 12px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fbfdff;
  display: grid;
  gap: 5px;
}

.script-use-guide strong {
  color: #06152e;
  font-size: 13px;
  font-weight: 950;
}

.script-use-guide span {
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 750;
}

.script-test-result {
  margin: 14px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fbfdff;
  color: #40536f;
  line-height: 1.55;
  font-weight: 700;
}

.script-test-summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.script-test-summary strong {
  color: #06152e;
  font-weight: 900;
}

.script-test-summary span,
.script-binding strong {
  color: var(--accent);
  font-weight: 900;
}

.script-test-summary span.warn {
  color: var(--warn);
}

.script-test-grid,
.script-binding {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.script-test-grid div,
.script-binding div {
  padding: 10px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 4px;
}

.script-test-grid span,
.script-binding span {
  color: #6c7b92;
  font-size: 12px;
  font-weight: 800;
}

.script-test-grid strong {
  color: #06152e;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 900;
}

.script-reply-preview {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid #cfe2ff;
  border-radius: 8px;
  background: #f6faff;
}

.script-reply-preview span {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.script-reply-preview p {
  margin: 0;
  color: #07152e;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 800;
  white-space: pre-wrap;
}

.script-quality-suite {
  margin: 14px;
  display: grid;
  gap: 12px;
}

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

.script-quality-summary div {
  padding: 10px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fff;
}

.script-quality-summary.ready div {
  border-color: #b7ead7;
  background: #f4fffa;
}

.script-quality-summary.warn div {
  border-color: #ffd9aa;
  background: #fffaf1;
}

.script-quality-summary span,
.script-quality-card p,
.script-quality-turn p,
.script-quality-assets {
  color: #60718d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.script-quality-summary strong {
  display: block;
  margin-top: 3px;
  color: #06152e;
  font-size: 18px;
  font-weight: 950;
}

.script-quality-rules,
.script-quality-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.script-quality-rules span,
.script-quality-checks span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #24405f;
  font-size: 12px;
  font-weight: 900;
}

.script-quality-checks span.ok {
  background: var(--green-soft);
  color: var(--green);
}

.script-quality-checks span.warn {
  background: var(--danger-soft);
  color: var(--danger);
}

.script-quality-list {
  display: grid;
  gap: 10px;
}

.script-quality-card {
  padding: 12px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 10px;
}

.script-quality-card.ok {
  border-color: #c9eadc;
}

.script-quality-card.warn {
  border-color: #ffd2d2;
}

.script-quality-card-head,
.script-quality-turn {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.script-quality-card-head strong,
.script-quality-turn strong {
  color: #06152e;
  font-weight: 950;
}

.script-quality-card-head p,
.script-quality-turn p {
  margin: 4px 0 0;
}

.script-quality-card-head > span,
.script-quality-turn > span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
}

.script-quality-card.warn .script-quality-card-head > span,
.script-quality-turn.warn > span {
  background: var(--danger-soft);
  color: var(--danger);
}

.script-quality-turn {
  padding: 9px 10px;
  border: 1px solid #e1eaf5;
  border-radius: 8px;
  background: #f8fbff;
}

.script-quality-assets {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f8fc;
}

.script-sales-plan {
  margin: 10px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.script-sales-plan div {
  padding: 10px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fff;
}

.script-sales-plan .wide {
  grid-column: 1 / -1;
}

.script-sales-plan .muted {
  color: #50627f;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 750;
}

.script-sales-plan span {
  display: block;
  color: #6c7b92;
  font-size: 11px;
  font-weight: 850;
}

.script-sales-plan strong {
  display: block;
  margin-top: 4px;
  color: #07152e;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 900;
}

.script-profile-summary {
  margin: 10px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.script-profile-summary span {
  padding: 6px 9px;
  border: 1px solid #d8e3f1;
  border-radius: 999px;
  background: #fff;
  color: #07152e;
  font-size: 12px;
  font-weight: 850;
}

.script-profile-summary em {
  margin-right: 5px;
  color: #6c7b92;
  font-style: normal;
  font-weight: 800;
}

.script-profile-summary.empty {
  padding: 9px 10px;
  border: 1px dashed #c8d6e8;
  border-radius: 8px;
  color: #6a7d98;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.script-right textarea {
  margin: 14px 14px 0;
  width: calc(100% - 28px);
  min-height: 96px;
}

.script-chat-messages {
  height: 300px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  background: #f7faff;
  border-bottom: 1px solid var(--line);
}

.script-chat-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed #c8d6e8;
  border-radius: 8px;
  color: #6a7d98;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.script-chat-bubble {
  max-width: 86%;
  display: grid;
  gap: 5px;
}

.script-chat-bubble span {
  color: #6a7d98;
  font-size: 12px;
  font-weight: 850;
}

.script-chat-bubble p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d6e2f1;
  border-radius: 8px;
  background: #fff;
  color: #0b1b34;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
  white-space: pre-wrap;
}

.script-chat-bubble.user {
  align-self: flex-end;
}

.script-chat-bubble.user span {
  text-align: right;
}

.script-chat-bubble.user p {
  border-color: #b8ccff;
  background: #eaf1ff;
}

.script-chat-bubble.assistant {
  align-self: flex-start;
}

.script-chat-input-row {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.script-chat-presets {
  padding: 12px 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.script-chat-presets button {
  min-height: 30px;
  border-color: #cfe0f5;
  background: #f8fbff;
  color: #24476f;
  font-size: 12px;
  font-weight: 850;
}

.script-chat-presets button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.script-chat-input-row textarea {
  width: 100%;
  min-height: 82px;
  margin: 0;
}

.script-chat-input-row button {
  width: 100%;
}

.script-chat-meta {
  margin: 0 14px 14px;
  padding: 12px;
  border: 1px solid #d6e2f1;
  border-radius: 8px;
  background: #fbfdff;
  color: #415878;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 750;
}

.script-chat-meta p {
  margin: 8px 0 0;
}

.script-chat-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.script-chat-meta-row span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: #285180;
  padding: 2px 8px;
  font-weight: 900;
}

.script-chat-meta-row span.ok {
  background: var(--accent-soft);
  color: var(--accent);
}

.script-chat-meta-row span.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.script-chat-meta-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.script-chat-meta-grid div {
  padding: 8px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #fff;
}

.script-chat-meta-grid span,
.script-chat-meta-grid strong {
  display: block;
}

.script-chat-meta-grid span {
  color: #667995;
  font-size: 11px;
}

.script-chat-meta-grid strong {
  margin-top: 3px;
  color: #07152e;
  font-size: 12px;
  font-weight: 900;
}

.script-chat-decision {
  display: grid;
  gap: 9px;
}

.script-chat-decision > div,
.script-chat-next,
.script-chat-assets,
.script-chat-detail-stack details {
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #fff;
}

.script-chat-decision > div {
  padding: 11px;
}

.script-chat-decision > div.primary {
  border-color: #b9d1ff;
  background: linear-gradient(180deg, #f9fbff, #eef5ff);
}

.script-chat-decision span,
.script-chat-next span,
.script-chat-assets > span,
.script-chat-blueprint span {
  display: block;
  color: #667995;
  font-size: 11px;
  font-weight: 900;
}

.script-chat-decision strong,
.script-chat-next strong,
.script-chat-blueprint strong {
  display: block;
  margin-top: 4px;
  color: #07152e;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 950;
}

.script-chat-decision strong.ok {
  color: var(--accent);
}

.script-chat-decision strong.info {
  color: var(--blue);
}

.script-chat-decision strong.warn {
  color: var(--warn);
}

.script-chat-decision strong.danger {
  color: var(--danger);
}

.script-chat-decision small,
.script-chat-next small,
.script-chat-assets small {
  display: block;
  margin-top: 4px;
  color: #5d718e;
  line-height: 1.45;
  font-size: 12px;
  font-weight: 750;
}

.script-chat-next {
  margin-top: 10px;
  padding: 12px;
  background: #f9fcff;
}

.script-chat-next p {
  margin: 8px 0 0;
  color: #294362;
  line-height: 1.55;
  font-size: 13px;
  font-weight: 800;
}

.script-chat-assets {
  margin-top: 10px;
  padding: 10px;
}

.script-chat-assets div {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.script-chat-assets button {
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  border-color: #bce6d7;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.script-chat-assets.empty strong {
  display: block;
  margin-top: 5px;
  color: #405776;
  font-size: 13px;
  font-weight: 900;
}

.script-chat-detail-stack {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.script-chat-detail-stack summary {
  min-height: 42px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.script-chat-detail-stack summary::-webkit-details-marker {
  display: none;
}

.script-chat-detail-stack summary span {
  color: #06152e;
  font-size: 13px;
  font-weight: 950;
}

.script-chat-detail-stack summary em {
  color: #6a7b92;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-align: right;
}

.script-chat-detail-stack details[open] summary {
  border-bottom: 1px solid #e0e8f3;
}

.script-chat-match-grid {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.script-chat-match-group {
  padding: 9px;
  border: 1px solid #e0e8f3;
  border-radius: 8px;
  background: #f8fbff;
}

.script-chat-match-group > strong {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #06152e;
  font-size: 12px;
  font-weight: 950;
}

.script-chat-match-group em {
  color: var(--blue);
  font-style: normal;
}

.script-chat-match-group div {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid #e3ebf5;
}

.script-chat-match-group b,
.script-chat-match-group small {
  display: block;
}

.script-chat-match-group b {
  color: #17304f;
  font-size: 12px;
  font-weight: 900;
}

.script-chat-match-group small,
.script-chat-match-group p {
  margin: 3px 0 0;
  color: #627692;
  line-height: 1.4;
  font-size: 11px;
  font-weight: 750;
}

.script-chat-blueprint {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.script-chat-blueprint > div {
  padding: 9px;
  border: 1px solid #e0e8f3;
  border-radius: 8px;
  background: #f8fbff;
}

.script-chat-blueprint ol {
  margin: 8px 0 0 18px;
  padding: 0;
  color: #294362;
  line-height: 1.45;
}

.script-fixed-sop {
  padding: 12px;
  border: 1px solid #b9d1ff;
  border-radius: 8px;
  background: linear-gradient(180deg, #f7fbff, #eef5ff);
}

.script-fixed-sop-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.script-fixed-sop-head strong,
.script-fixed-sop-head small,
.script-fixed-sop-head span {
  display: block;
}

.script-fixed-sop-head strong {
  margin-top: 4px;
  color: #07152e;
  font-size: 15px;
  font-weight: 950;
}

.script-fixed-sop-head small {
  margin-top: 5px;
  color: #38516f;
  line-height: 1.45;
  font-size: 12px;
  font-weight: 800;
}

.script-fixed-sop-head em {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  white-space: nowrap;
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
}

.script-fixed-flow {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.script-fixed-flow article {
  min-width: 0;
  padding: 9px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  border: 1px solid #d6e3f5;
  border-radius: 8px;
  background: #fff;
}

.script-fixed-flow b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
}

.script-fixed-flow strong,
.script-fixed-flow p,
.script-fixed-flow small {
  display: block;
}

.script-fixed-flow strong {
  color: #06152e;
  font-size: 12px;
  font-weight: 950;
}

.script-fixed-flow p {
  margin: 5px 0 0;
  color: #294362;
  line-height: 1.4;
  font-size: 11px;
  font-weight: 850;
}

.script-fixed-flow small {
  margin-top: 5px;
  color: #6b7b90;
  line-height: 1.35;
  font-size: 10px;
  font-weight: 750;
}

.script-fixed-boundary {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.script-fixed-boundary div {
  padding: 9px;
  border: 1px solid #d6e3f5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.script-fixed-boundary p {
  margin: 5px 0 0;
  color: #294362;
  line-height: 1.4;
  font-size: 11px;
  font-weight: 800;
}

.script-sop-learning {
  display: grid;
  gap: 12px;
}

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

.script-sop-learning-summary div,
.script-sop-policy,
.script-sop-node,
.script-sop-priority-hint {
  border: 1px solid #d8e4f3;
  background: #f8fbff;
  border-radius: 8px;
  padding: 10px 12px;
}

.script-sop-learning-summary span,
.script-sop-priority-hint span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.script-sop-learning-summary strong,
.script-sop-priority-hint strong {
  display: block;
  margin-top: 4px;
  color: #071b3d;
  font-size: 15px;
}

.script-sop-learning-summary small,
.script-sop-priority-hint small {
  display: block;
  margin-top: 4px;
  color: #40516e;
  line-height: 1.45;
}

.script-sop-policy {
  background: #eefaf6;
  border-color: #b9ead8;
}

.script-sop-policy b,
.script-sop-policy p,
.script-sop-node p,
.script-sop-more p {
  margin: 0;
}

.script-sop-policy p {
  margin-top: 5px;
  color: #315f55;
  line-height: 1.55;
}

.script-sop-node-list {
  display: grid;
  gap: 8px;
}

.script-sop-node {
  display: grid;
  gap: 8px;
  background: #fff;
}

.script-sop-node > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.script-sop-node strong {
  color: #071b3d;
}

.script-sop-node small {
  color: #0b8f73;
}

.script-sop-node-rates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.script-sop-node-rates span {
  border-radius: 999px;
  background: #eef4fb;
  color: #30435f;
  font-size: 12px;
  padding: 5px 8px;
  text-align: center;
}

.script-sop-node p {
  color: #3e506b;
  line-height: 1.5;
}

.script-sop-more summary {
  cursor: pointer;
  color: #185adb;
  font-weight: 700;
}

.script-sop-more p {
  margin-top: 8px;
  color: #3d4f6b;
  line-height: 1.5;
}

.script-sop-more b {
  margin-right: 6px;
}

.script-sop-priority-hint {
  background: #fff8eb;
  border-color: #f5d79b;
}

.script-binding {
  padding: 14px;
}

.script-mini-card {
  padding: 12px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fff;
}

.script-mini-card p {
  margin: 7px 0;
  color: #304769;
  line-height: 1.5;
  font-weight: 700;
}

.script-empty-state {
  padding: 18px;
  border: 1px dashed #b9cae3;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff, #f5f9ff);
  display: grid;
  gap: 10px;
}

.script-empty-state strong {
  color: #06152e;
  font-size: 15px;
  font-weight: 900;
}

.script-empty-state p {
  margin: 0;
  color: #50627f;
  line-height: 1.55;
  font-size: 13px;
  font-weight: 750;
}

.script-empty-state div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.automation-view .main {
  padding: 24px 28px 44px;
  display: block;
}

body.automation-view .topbar {
  display: none;
}

body.knowledge-view .main {
  padding: 24px 28px 44px;
  display: block;
}

body.knowledge-view .topbar {
  display: none;
}

body.experience-view .main {
  padding: 24px 28px 44px;
  display: block;
}

body.experience-view .topbar {
  display: none;
}

body.assets-view .main {
  padding: 24px 28px 44px;
  display: block;
}

body.assets-view .topbar {
  display: none;
}

.case-assets-page {
  display: grid;
  gap: 16px;
  width: 100%;
}

.case-assets-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.case-assets-head h2 {
  margin: 0;
  color: #06152e;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 850;
}

.case-assets-head p {
  margin: 8px 0 0;
  max-width: 920px;
  color: #50627f;
  font-size: 13px;
  line-height: 1.55;
}

.case-assets-actions,
.case-asset-recommend-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.case-asset-notice {
  min-height: 42px;
  padding: 11px 14px;
  border: 1px solid #bfe6df;
  border-radius: 8px;
  background: linear-gradient(90deg, #f3fffb, #f7fbff);
  color: #244b61;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
}

.case-asset-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.case-asset-metric {
  min-height: 108px;
  padding: 16px;
  display: grid;
  gap: 8px;
  align-content: start;
  text-align: left;
  color: var(--ink);
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  box-shadow: 0 8px 24px rgba(25, 44, 74, 0.04);
}

.case-asset-metric span {
  color: #304769;
  font-size: 13px;
  font-weight: 850;
}

.case-asset-metric strong {
  color: #06152e;
  font-size: 31px;
  line-height: 1;
  font-weight: 900;
}

.case-asset-metric small {
  color: #4d6281;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.case-asset-metric.danger strong {
  color: var(--red);
}

.case-asset-control-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, 0.8fr);
  gap: 14px;
}

.case-asset-editor-panel {
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(25, 44, 74, 0.04);
}

.case-asset-editor-panel > summary {
  cursor: pointer;
  list-style: none;
  color: #06152e;
  font-weight: 900;
}

.case-asset-editor-panel > summary::-webkit-details-marker {
  display: none;
}

.case-asset-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.case-asset-editor-grid label {
  display: grid;
  gap: 6px;
  color: #5d6f8a;
  font-size: 12px;
  font-weight: 800;
}

.case-asset-editor-grid .wide {
  grid-column: 1 / -1;
}

.case-asset-editor-grid textarea {
  min-height: 72px;
}

.case-asset-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.case-asset-filters,
.case-asset-recommend {
  padding: 14px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(25, 44, 74, 0.04);
}

.case-asset-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(4, minmax(128px, 0.7fr)) auto;
  gap: 10px;
  align-items: center;
}

.case-asset-recommend {
  display: grid;
  gap: 10px;
}

.case-asset-recommend strong {
  color: #06152e;
  font-size: 15px;
  font-weight: 900;
}

.case-asset-recommend small {
  display: block;
  margin-top: 4px;
  color: #5d6f8a;
  font-size: 12px;
  line-height: 1.4;
}

.case-asset-recommend textarea {
  min-height: 82px;
  resize: vertical;
}

.case-assets-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.48fr);
  gap: 14px;
  align-items: start;
}

.case-assets-list-panel,
.case-asset-detail-panel {
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(25, 44, 74, 0.04);
}

.case-asset-detail-panel {
  position: sticky;
  top: 18px;
}

.case-assets-list-head {
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid #d8e2ef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.case-assets-list-head h3 {
  margin: 0;
  color: #06152e;
  font-size: 18px;
  font-weight: 900;
}

.case-assets-list-head p {
  margin: 4px 0 0;
  color: #5d6f8a;
  font-size: 12px;
}

.case-asset-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.case-asset-card {
  padding: 14px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #fbfdff;
  cursor: pointer;
  display: grid;
  gap: 8px;
  text-align: left;
}

.case-asset-card:hover,
.case-asset-card.active {
  border-color: var(--blue);
  background: #f5f9ff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.case-asset-card-head,
.case-asset-detail-code,
.profile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.case-asset-card-head strong,
.case-asset-detail-code strong {
  color: #06152e;
  font-size: 14px;
  font-weight: 900;
}

.case-asset-card-head span,
.case-asset-card p,
.case-asset-detail-meta span,
.case-asset-recommend-card span {
  color: #566a87;
  font-size: 12px;
  line-height: 1.45;
}

.case-asset-card h4 {
  margin: 0;
  color: #0b1d3a;
  font-size: 15px;
  font-weight: 900;
}

.case-asset-card p {
  margin: 0;
  font-size: 13px;
}

.case-asset-card em,
.case-asset-detail-meta span:last-child {
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.case-asset-card em.ok,
.case-asset-detail-meta .ok {
  color: var(--green);
  background: var(--green-soft);
}

.case-asset-card em.warn,
.case-asset-detail-meta .warn {
  color: #9a5a00;
  background: #fff4d8;
}

.case-asset-card em.danger,
.case-asset-detail-meta .danger {
  color: var(--red);
  background: var(--red-soft);
}

.case-asset-card em.muted,
.case-asset-detail-meta .muted {
  color: #5d6f8a;
  background: #edf2f8;
}

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

.case-asset-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #27519d;
  font-size: 12px;
  font-weight: 800;
}

.case-asset-tags.detail span {
  background: #eefbf8;
  color: #0f766e;
}

.case-asset-detail {
  padding: 14px;
  display: grid;
  gap: 14px;
}

.case-asset-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-asset-detail-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #d8e5f7;
  border-radius: 10px;
  background: #f7fbff;
  padding: 10px;
}

.case-asset-detail-actions strong {
  display: block;
  color: #0d2442;
  font-size: 13px;
  font-weight: 900;
}

.case-asset-detail-actions span {
  display: block;
  margin-top: 2px;
  color: #657790;
  font-size: 12px;
  line-height: 1.45;
}

.case-asset-detail-actions button {
  min-height: 34px;
  white-space: nowrap;
}

.case-asset-detail section {
  display: grid;
  gap: 8px;
}

.case-asset-detail h4 {
  margin: 0;
  color: #06152e;
  font-size: 14px;
  font-weight: 900;
}

.case-asset-detail p {
  margin: 0;
  color: #304769;
  font-size: 13px;
  line-height: 1.6;
}

.case-asset-kv-grid,
.case-asset-rhythm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.case-asset-kv-grid div,
.case-asset-rhythm div {
  padding: 10px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #f8fbff;
  color: #243852;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 750;
}

.case-asset-rhythm span {
  display: block;
  margin-bottom: 5px;
  color: #647795;
  font-size: 12px;
  font-weight: 800;
}

.case-asset-rhythm strong {
  color: #06152e;
  font-size: 13px;
  line-height: 1.45;
}

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

.case-asset-effect-grid div {
  padding: 9px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #f8fbff;
}

.case-asset-effect-grid span {
  display: block;
  margin-bottom: 5px;
  color: #647795;
  font-size: 12px;
  font-weight: 800;
}

.case-asset-effect-grid strong {
  color: #06152e;
  font-size: 18px;
  line-height: 1;
}

.case-asset-ocr {
  max-height: 220px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #f8fbff;
  color: #31435f;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.55;
}

.case-asset-preview-image {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #f8fbff;
}

.case-asset-recommend-result {
  display: grid;
  gap: 8px;
}

.case-asset-recommend-card,
.workspace-case-asset {
  width: 100%;
  padding: 10px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #f8fbff;
  text-align: left;
  display: grid;
  gap: 5px;
}

.workspace-case-asset::after {
  content: "点击发送";
  justify-self: start;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eaf7f4;
  color: #0e8f78;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
}

.case-asset-recommend-card:hover,
.workspace-case-asset:hover {
  border-color: var(--blue);
  background: #f5f9ff;
}

.case-asset-recommend-card strong,
.workspace-case-asset strong {
  color: #06152e;
  font-size: 13px;
  font-weight: 900;
}

.case-asset-recommend-card p,
.workspace-case-asset span {
  margin: 0;
  color: #536782;
  font-size: 12px;
  line-height: 1.45;
}

.case-asset-empty {
  padding: 18px;
  border: 1px dashed #cad7e8;
  border-radius: 8px;
  background: #f8fbff;
  color: #50627f;
}

.case-asset-empty.compact {
  padding: 12px;
}

.case-asset-empty strong {
  display: block;
  color: #06152e;
  font-weight: 900;
}

.case-asset-empty p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.workspace-case-assets {
  display: grid;
  gap: 8px;
}

.feedback-strategy-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.feedback-strategy-card.compact {
  padding: 10px;
}

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

.feedback-strategy-head strong {
  color: #06152e;
  font-size: 14px;
  font-weight: 900;
}

.feedback-strategy-head p {
  margin: 5px 0 0;
  color: #50627f;
  font-size: 12px;
  line-height: 1.5;
}

.feedback-strategy-head > span {
  flex: 0 0 auto;
  max-width: 150px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

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

.feedback-strategy-card.compact .feedback-strategy-grid {
  grid-template-columns: 1fr;
}

.feedback-strategy-grid div {
  min-height: 58px;
  padding: 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
}

.feedback-strategy-grid span,
.feedback-play span {
  display: block;
  margin-bottom: 4px;
  color: #647795;
  font-size: 12px;
  font-weight: 850;
}

.feedback-strategy-grid strong {
  color: #06152e;
  font-size: 12px;
  line-height: 1.45;
}

.feedback-play {
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.feedback-play p {
  margin: 0;
  color: #243852;
  font-size: 13px;
  line-height: 1.55;
}

.feedback-play small {
  display: block;
  margin-top: 6px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.feedback-dialogue-patterns {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #c7d8f0;
  border-radius: 8px;
  background: #ffffff;
}

.feedback-dialogue-title {
  display: grid;
  gap: 4px;
}

.feedback-dialogue-title span {
  color: #0b55d9;
  font-size: 12px;
  font-weight: 900;
}

.feedback-dialogue-title strong {
  color: #06152e;
  font-size: 13px;
  line-height: 1.5;
}

.feedback-dialogue-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.feedback-dialogue-steps span {
  min-height: 78px;
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 8px;
  border: 1px solid #e2eaf6;
  border-radius: 7px;
  background: #f8fbff;
  color: #42536f;
  font-size: 12px;
  line-height: 1.45;
}

.feedback-dialogue-steps b {
  color: #06152e;
  font-size: 12px;
}

.feedback-dialogue-cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.feedback-dialogue-cases div {
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.feedback-dialogue-cases strong {
  color: #06152e;
  font-size: 12px;
  font-weight: 900;
}

.feedback-dialogue-cases p,
.feedback-dialogue-cases em {
  margin: 0;
  color: #536782;
  font-size: 12px;
  line-height: 1.45;
}

.feedback-dialogue-cases em {
  color: #0f766e;
  font-style: normal;
  font-weight: 850;
}

.feedback-dialogue-compact {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
}

.feedback-dialogue-compact span,
.feedback-dialogue-compact small {
  color: #647795;
  font-size: 12px;
  font-weight: 850;
}

.feedback-dialogue-compact strong {
  color: #06152e;
  font-size: 12px;
  line-height: 1.45;
}

.feedback-dialogue-compact small {
  color: #0b55d9;
  font-weight: 900;
}

.feedback-material-plan {
  display: grid;
  gap: 7px;
}

.feedback-material {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  display: grid;
  gap: 4px;
}

.feedback-material:hover {
  border-color: var(--blue);
  background: #f8fbff;
}

.feedback-material strong {
  color: #0b55d9;
  font-size: 12px;
  font-weight: 900;
}

.feedback-material span {
  color: #536782;
  font-size: 12px;
  line-height: 1.45;
}

.feedback-material em {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e9fbf5;
  color: #057a55;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.knowledge-page {
  display: grid;
  gap: 16px;
  width: 100%;
}

.knowledge-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.knowledge-page-head h2 {
  margin: 0;
  color: #06152e;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 850;
}

.knowledge-page-head p {
  margin: 8px 0 0;
  max-width: 870px;
  color: #50627f;
  font-size: 13px;
  line-height: 1.55;
}

.knowledge-head-actions,
.knowledge-panel-actions,
.knowledge-form-actions,
.knowledge-document-actions,
.knowledge-candidate-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.knowledge-notice {
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid #bfe6df;
  border-radius: 8px;
  background: linear-gradient(90deg, #f3fffb, #f7fbff);
  color: #244b61;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
}

.knowledge-notice strong {
  color: var(--accent);
  white-space: nowrap;
}

.knowledge-overview {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(360px, 1.8fr) 160px;
  gap: 14px;
  align-items: stretch;
  border: 1px solid #cfe4ff;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 58%, #f3fffb 100%);
  box-shadow: 0 14px 34px rgba(31, 86, 170, 0.08);
}

.knowledge-overview-main {
  display: grid;
  gap: 8px;
  align-content: start;
}

.knowledge-overview-main h3 {
  margin: 0;
  color: #06152e;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}

.knowledge-overview-main p,
.knowledge-overview-main small {
  margin: 0;
  color: #4c6382;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 750;
}

.knowledge-overview-main .knowledge-overview-policy {
  padding: 8px 10px;
  border: 1px solid #d5f1ea;
  border-radius: 8px;
  background: #f5fffc;
  color: #0d6d61;
}

.knowledge-overview-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.knowledge-overview-card {
  min-height: 96px;
  padding: 12px;
  display: grid;
  gap: 6px;
  align-content: start;
  text-align: left;
  color: var(--ink);
  border: 1px solid #d7e3f3;
  border-radius: 8px;
  background: #fff;
}

.knowledge-overview-card span {
  color: #36506f;
  font-size: 12px;
  font-weight: 850;
}

.knowledge-overview-card strong {
  color: #06152e;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}

.knowledge-overview-card small {
  color: #687a95;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 700;
}

.knowledge-overview-actions {
  display: grid;
  gap: 8px;
  align-content: center;
}

.knowledge-overview-actions button {
  min-height: 36px;
  width: 100%;
}

.knowledge-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.knowledge-metric-card {
  min-height: 110px;
  padding: 16px;
  display: grid;
  gap: 8px;
  align-content: start;
  text-align: left;
  color: var(--ink);
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  box-shadow: 0 8px 24px rgba(25, 44, 74, 0.04);
}

.knowledge-metric-card span {
  color: #304769;
  font-size: 13px;
  font-weight: 850;
}

.knowledge-metric-card strong {
  color: #06152e;
  font-size: 31px;
  line-height: 1;
  font-weight: 900;
}

.knowledge-metric-card small {
  color: #4d6281;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.knowledge-workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.knowledge-flow-card {
  min-height: 118px;
  padding: 14px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(25, 44, 74, 0.04);
}

.knowledge-flow-card i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.knowledge-flow-card strong {
  display: block;
  margin-top: 10px;
  color: #06152e;
  font-size: 14px;
  font-weight: 900;
}

.knowledge-flow-card span {
  display: block;
  margin-top: 6px;
  color: #5c6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.knowledge-flow-card.warning {
  border-color: #ffd8a8;
  background: #fffaf1;
}

.knowledge-flow-card.waiting {
  border-color: #dce6f2;
  background: #f8fbff;
}

.knowledge-section-tabs {
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(25, 44, 74, 0.04);
}

.knowledge-section-tabs button {
  border-color: transparent;
  background: transparent;
  color: #314664;
  font-weight: 900;
}

.knowledge-section-tabs button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(520px, 1.45fr) minmax(340px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.knowledge-left,
.knowledge-main,
.knowledge-right {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.knowledge-left,
.knowledge-right {
  position: static;
}

.knowledge-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(25, 44, 74, 0.04);
}

.knowledge-panel-head {
  min-height: 56px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-panel-head h3 {
  margin: 0;
  color: #06152e;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 850;
}

.knowledge-panel-head p {
  margin: 5px 0 0;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.knowledge-panel-body,
.knowledge-asset-list,
.knowledge-source-list,
.knowledge-guardrail-list,
.knowledge-mini-list,
.knowledge-hit-results {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.knowledge-panel-body {
  padding: 16px 18px;
}

.knowledge-panel-body input,
.knowledge-panel-body select,
.knowledge-panel-body textarea {
  margin-bottom: 10px;
}

.knowledge-asset-card,
.knowledge-source-card,
.knowledge-mini-card,
.knowledge-candidate-card,
.knowledge-document-card,
.knowledge-hit-card {
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fff;
}

.knowledge-asset-card {
  min-height: 78px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  text-align: left;
  color: var(--ink);
}

.knowledge-asset-card span {
  color: #304769;
  font-size: 13px;
  font-weight: 900;
}

.knowledge-asset-card strong {
  justify-self: end;
  color: #06152e;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.knowledge-asset-card small {
  grid-column: 1 / -1;
  color: #5b6f8c;
  font-size: 12px;
  font-weight: 700;
}

.knowledge-asset-card.warning {
  border-color: #ffd6a1;
  background: #fffaf1;
}

.knowledge-source-card,
.knowledge-mini-card {
  padding: 12px;
}

.knowledge-effect-summary {
  padding: 14px 14px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.knowledge-effect-summary div {
  min-height: 56px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
  display: grid;
  gap: 5px;
}

.knowledge-effect-summary span {
  color: #5b6f8c;
  font-size: 12px;
  font-weight: 800;
}

.knowledge-effect-summary strong {
  color: #06152e;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
}

.knowledge-effect-card {
  border-color: #cfe8e1;
  background: linear-gradient(180deg, #fff, #f7fffc);
}

.knowledge-source-card strong,
.knowledge-mini-card strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #06152e;
  font-size: 13px;
  font-weight: 900;
}

.knowledge-source-card em,
.knowledge-mini-card em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.knowledge-source-card small,
.knowledge-mini-card small {
  display: block;
  margin-top: 6px;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.knowledge-mini-card p {
  margin: 8px 0 0;
  color: #263a58;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

.knowledge-mini-card.action {
  width: calc(100% - 28px);
  margin: 0 14px 10px;
  text-align: left;
  color: var(--ink);
}

.knowledge-mini-card.action.compact {
  width: 100%;
  margin: 0;
}

.knowledge-mini-card.muted {
  background: #f8fbff;
}

.knowledge-mini-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.knowledge-mini-actions button {
  min-height: 32px;
  padding: 7px 10px;
}

.knowledge-experience-card {
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.knowledge-risk-rule-card {
  padding: 12px;
  border: 1px solid #d8e3f1;
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  background: #fffaf1;
}

.knowledge-risk-rule-card.high,
.knowledge-risk-rule-card.critical {
  border-left-color: var(--red);
  background: #fff5f5;
}

.knowledge-risk-rule-card.low {
  border-left-color: var(--green);
  background: #f5fffb;
}

.knowledge-risk-rule-card strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #06152e;
  font-size: 13px;
  font-weight: 900;
}

.knowledge-risk-rule-card em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.knowledge-risk-rule-card small {
  display: block;
  margin-top: 6px;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.experience-page {
  display: grid;
  gap: 16px;
  width: 100%;
}

.experience-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.experience-page-head h2 {
  margin: 0;
  color: #06152e;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 850;
}

.experience-page-head p {
  margin: 8px 0 0;
  max-width: 920px;
  color: #50627f;
  font-size: 13px;
  line-height: 1.55;
}

.experience-head-actions,
.experience-panel-actions,
.experience-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.experience-boundary-banner {
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid #bfe6df;
  border-radius: 8px;
  background: linear-gradient(90deg, #f2fffb, #f8fbff);
  color: #244b61;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
}

.experience-boundary-banner strong {
  color: var(--accent);
  white-space: nowrap;
}

.experience-boundary-cards,
.experience-metrics {
  display: grid;
  gap: 12px;
}

.experience-boundary-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.experience-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.experience-boundary-card,
.experience-metric-card {
  min-height: 108px;
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
  text-align: left;
  color: var(--ink);
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(25, 44, 74, 0.04);
}

.experience-boundary-card {
  border-top: 3px solid var(--blue);
}

.experience-boundary-card.knowledge {
  border-top-color: var(--blue);
}

.experience-boundary-card.experience {
  border-top-color: var(--accent);
}

.experience-boundary-card.material {
  border-top-color: #d17a00;
}

.experience-boundary-card.script {
  border-top-color: #7c3aed;
}

.experience-boundary-card span,
.experience-metric-card span {
  color: #314a6c;
  font-size: 13px;
  font-weight: 900;
}

.experience-boundary-card strong,
.experience-metric-card strong {
  color: #06152e;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}

.experience-boundary-card small,
.experience-metric-card small {
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.experience-learning-center {
  display: grid;
  gap: 14px;
}

.experience-learning-hero {
  padding: 18px;
  border: 1px solid #cfe1f4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(25, 44, 74, 0.06);
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(620px, 1.1fr);
  gap: 16px;
  align-items: stretch;
}

.experience-learning-copy {
  min-height: 160px;
  padding: 18px;
  border: 1px solid #d8e7f7;
  border-radius: 8px;
  background: linear-gradient(135deg, #f5f9ff 0%, #f2fffb 100%);
  display: grid;
  gap: 8px;
  align-content: center;
}

.experience-learning-copy span,
.experience-learning-panel-head span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dffaf2;
  color: #078561;
  font-size: 12px;
  font-weight: 950;
}

.experience-learning-hero.warming .experience-learning-copy span {
  background: #fff4d8;
  color: #9b6500;
}

.experience-learning-copy h3 {
  margin: 0;
  color: #06152e;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 950;
}

.experience-learning-copy p,
.experience-learning-copy small,
.experience-learning-panel-head + div small,
.experience-learning-empty small,
.experience-learning-boundaries span,
.experience-learning-boundaries small,
.experience-learning-noise span {
  color: #526985;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 750;
}

.experience-learning-copy p,
.experience-learning-copy small {
  margin: 0;
}

.experience-learning-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.experience-learning-metrics div {
  min-height: 118px;
  padding: 13px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #fbfdff;
  display: grid;
  gap: 5px;
  align-content: center;
}

.experience-learning-metrics strong {
  color: #06152e;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}

.experience-learning-metrics span,
.experience-learning-panel-head strong,
.experience-sop-row strong,
.experience-learning-asset strong,
.experience-learning-recommendation strong,
.experience-learning-boundaries strong,
.experience-learning-empty strong {
  color: #06152e;
  font-weight: 950;
}

.experience-learning-metrics span {
  font-size: 13px;
}

.experience-learning-metrics small {
  color: #60728d;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 750;
}

.experience-learning-board {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.experience-learning-panel,
.experience-section-collapsible,
.experience-learning-noise {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(25, 44, 74, 0.04);
  overflow: hidden;
}

.experience-learning-panel {
  min-height: 260px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.experience-learning-panel-head,
.experience-section-summary {
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.experience-learning-panel-head strong,
.experience-section-summary h3 {
  margin: 0;
  font-size: 17px;
}

.experience-section-summary p {
  margin: 5px 0 0;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

summary.experience-section-summary {
  cursor: pointer;
  list-style: none;
}

summary.experience-section-summary::-webkit-details-marker {
  display: none;
}

summary.experience-section-summary::after {
  content: "展开";
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.experience-section-collapsible[open] > summary.experience-section-summary::after {
  content: "收起";
}

.experience-section-collapsible[open] {
  padding-bottom: 14px;
}

.experience-section-collapsible > .experience-auto-strategy,
.experience-section-collapsible > .experience-panel,
.experience-section-collapsible > .experience-focus-grid,
.experience-section-collapsible > .experience-boundary-cards,
.experience-section-collapsible > .experience-metrics {
  margin: 14px 14px 0;
}

.experience-sop-list,
.experience-learning-assets,
.experience-learning-recommendations {
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.experience-sop-row,
.experience-learning-asset,
.experience-learning-recommendation,
.experience-learning-empty {
  padding: 12px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #fbfdff;
  display: grid;
  gap: 7px;
}

.experience-sop-row em,
.experience-learning-asset span {
  color: var(--accent);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.experience-sop-bar {
  height: 9px;
  border-radius: 999px;
  background: #eaf1f8;
  overflow: hidden;
}

.experience-sop-bar span {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--accent));
}

.experience-learning-boundaries {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.experience-learning-boundaries div {
  min-height: 106px;
  padding: 12px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #fbfdff;
  display: grid;
  gap: 5px;
  align-content: start;
}

.experience-learning-noise {
  padding: 0;
}

.experience-learning-noise summary {
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  color: #10203a;
  font-size: 13px;
  font-weight: 900;
}

.experience-learning-noise summary::-webkit-details-marker {
  display: none;
}

.experience-learning-noise div {
  padding: 0 14px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.experience-learning-noise span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f3f7fc;
}

.experience-auto-strategy,
.experience-focus-grid {
  display: grid;
  gap: 14px;
}

.experience-auto-hero {
  padding: 18px;
  border: 1px solid #cfe1f4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(25, 44, 74, 0.05);
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(520px, 1.15fr);
  gap: 18px;
  align-items: stretch;
}

.experience-auto-copy {
  min-height: 150px;
  padding: 16px;
  border-radius: 8px;
  background: #f5f9ff;
  border: 1px solid #d8e7f7;
  display: grid;
  align-content: center;
  gap: 8px;
}

.experience-auto-copy span {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #dffaf2;
  color: #078561;
  font-size: 12px;
  font-weight: 900;
}

.experience-auto-copy h3 {
  margin: 0;
  color: #06152e;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 950;
}

.experience-auto-copy p,
.experience-auto-copy small {
  margin: 0;
  color: #4c6383;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 750;
}

.experience-auto-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.experience-auto-card {
  min-height: 96px;
  padding: 12px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #fbfdff;
  display: grid;
  gap: 6px;
  align-content: start;
}

.experience-auto-card span,
.experience-pipeline-step strong,
.experience-playbook-head strong,
.experience-strategy-card strong,
.experience-activation-card strong,
.experience-strategy-summary strong {
  color: #06152e;
  font-weight: 900;
}

.experience-auto-card span {
  font-size: 12px;
}

.experience-auto-card strong {
  color: #06152e;
  font-size: 25px;
  line-height: 1;
  font-weight: 950;
}

.experience-auto-card small {
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.experience-learning-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.experience-pipeline-step {
  min-height: 118px;
  padding: 14px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 7px;
  align-content: start;
  position: relative;
}

.experience-pipeline-step i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eaf2ff;
  color: var(--blue);
  display: inline-grid;
  place-items: center;
  font-style: normal;
  font-weight: 950;
  font-size: 12px;
}

.experience-pipeline-step span,
.experience-strategy-summary span,
.experience-strategy-card p,
.experience-strategy-card small,
.experience-strategy-card span,
.experience-activation-card p,
.experience-activation-card small,
.experience-activation-card span {
  color: #526985;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.experience-pipeline-step em {
  position: absolute;
  right: 12px;
  top: 12px;
  color: var(--accent);
  font-style: normal;
  font-weight: 950;
}

.experience-focus-grid {
  grid-template-columns: minmax(620px, 1.35fr) minmax(420px, 0.95fr);
  align-items: start;
}

.experience-apply-panel {
  overflow: hidden;
}

.experience-auto-apply {
  padding: 14px;
  display: grid;
  gap: 14px;
}

.experience-apply-hero {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(520px, 1.2fr);
  gap: 14px;
  align-items: stretch;
}

.experience-apply-copy,
.experience-apply-stats div,
.experience-loop-strip article,
.experience-apply-rules article,
.experience-apply-card,
.experience-apply-boundary {
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #fff;
}

.experience-apply-copy {
  min-height: 142px;
  padding: 16px;
  background: linear-gradient(135deg, #f5f9ff 0%, #f3fffb 100%);
  display: grid;
  align-content: center;
  gap: 8px;
}

.experience-apply-copy span,
.experience-apply-card-head span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dffaf2;
  color: #078561;
  font-size: 12px;
  font-weight: 950;
}

.experience-apply-copy h4,
.experience-apply-rules h4 {
  margin: 0;
  color: #06152e;
  font-weight: 950;
}

.experience-apply-copy h4 {
  font-size: 20px;
}

.experience-apply-copy p,
.experience-apply-rules p,
.experience-apply-card-head small,
.experience-apply-steps p,
.experience-apply-policy-text,
.experience-apply-boundary span {
  margin: 0;
  color: #526985;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 750;
}

.experience-apply-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.experience-apply-stats div {
  min-height: 118px;
  padding: 12px;
  display: grid;
  gap: 5px;
  align-content: center;
}

.experience-apply-stats strong {
  color: #06152e;
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
}

.experience-apply-stats span,
.experience-loop-strip strong,
.experience-apply-card-head strong,
.experience-apply-steps span {
  color: #06152e;
  font-weight: 950;
}

.experience-apply-stats small,
.experience-loop-strip p,
.experience-apply-meta span {
  color: #60728d;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 750;
}

.experience-loop-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.experience-loop-strip article {
  min-height: 122px;
  padding: 13px;
  display: grid;
  gap: 6px;
  align-content: start;
  position: relative;
}

.experience-loop-strip i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eaf2ff;
  color: var(--blue);
  display: inline-grid;
  place-items: center;
  font-style: normal;
  font-weight: 950;
  font-size: 12px;
}

.experience-loop-strip article > span {
  position: absolute;
  right: 12px;
  top: 12px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 950;
}

.experience-apply-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.experience-apply-rules article {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.experience-apply-rules article.warning {
  border-color: #ffd6d6;
  background: #fffafa;
}

.experience-apply-rules p {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.experience-apply-rules p i {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.experience-apply-rules article.warning p i {
  background: #df4b4b;
}

.experience-apply-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.experience-apply-card {
  padding: 14px;
  border-left: 3px solid var(--accent);
  display: grid;
  gap: 12px;
}

.experience-apply-card.recommend_only {
  border-left-color: var(--blue);
}

.experience-apply-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.experience-apply-card-head small {
  display: block;
  margin-top: 5px;
}

.experience-apply-card-head span {
  white-space: nowrap;
}

.experience-apply-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.experience-apply-steps div {
  min-height: 88px;
  padding: 9px;
  border: 1px solid #dfe9f5;
  border-radius: 8px;
  background: #f8fbff;
  display: grid;
  gap: 5px;
  align-content: start;
}

.experience-apply-steps span {
  color: #27519d;
  font-size: 12px;
}

.experience-apply-meta,
.experience-apply-assets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.experience-apply-meta span,
.experience-apply-assets span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eefbf8;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.experience-apply-assets span {
  background: #eef4ff;
  color: #315170;
}

.experience-apply-policy-text {
  padding: 10px;
  border: 1px solid #d8e7f7;
  border-radius: 8px;
  background: #fbfdff;
}

.experience-apply-boundary {
  padding: 0;
  overflow: hidden;
}

.experience-apply-boundary summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #10203a;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

.experience-apply-boundary summary::-webkit-details-marker {
  display: none;
}

.experience-apply-boundary div {
  padding: 0 14px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.experience-apply-boundary span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f3f7fc;
  color: #425a78;
}

.experience-focus-panel {
  overflow: hidden;
}

.experience-playbook-list,
.experience-strategy-list {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.experience-playbook-card,
.experience-strategy-card,
.experience-activation-card,
.experience-strategy-summary {
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #fff;
}

.experience-playbook-card {
  padding: 14px;
  display: grid;
  gap: 12px;
  border-left: 3px solid var(--accent);
}

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

.experience-playbook-head small {
  display: block;
  margin-top: 4px;
  color: #5b6f8c;
  font-size: 12px;
  font-weight: 750;
}

.experience-playbook-head span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8fbf5;
  color: #078561;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}

.experience-playbook-card > p {
  margin: 0;
  color: #3f5675;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 750;
}

.experience-playbook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.experience-playbook-grid div {
  min-height: 76px;
  padding: 10px;
  border: 1px solid #dfe9f5;
  border-radius: 8px;
  background: #f8fbff;
  display: grid;
  gap: 5px;
  align-content: start;
}

.experience-playbook-grid span {
  color: #60728d;
  font-size: 12px;
  font-weight: 850;
}

.experience-playbook-grid strong {
  color: #06152e;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 850;
}

.experience-asset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.experience-asset-chips span {
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: #315170;
  font-size: 12px;
  font-weight: 800;
}

.experience-strategy-summary {
  padding: 13px;
  display: grid;
  gap: 6px;
  background: #f8fbff;
}

.experience-strategy-summary em {
  color: var(--accent);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.experience-strategy-card,
.experience-activation-card {
  padding: 12px;
  display: grid;
  gap: 6px;
}

.experience-strategy-list.compact {
  padding-top: 0;
}

.experience-strategy-list.compact h4 {
  margin: 0;
  color: #06152e;
  font-size: 14px;
  font-weight: 900;
}

.experience-activation-card span {
  color: var(--accent);
  font-weight: 850;
}

.experience-case-learning {
  padding: 14px;
  display: grid;
  gap: 14px;
}

.experience-case-learning-hero {
  padding: 16px;
  border: 1px solid #cfe1f4;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fbff 0%, #f3fffb 100%);
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(420px, 0.9fr);
  gap: 16px;
  align-items: center;
}

.experience-case-learning-hero span {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #dffaf2;
  color: #078561;
  font-size: 12px;
  font-weight: 900;
}

.experience-case-learning-hero h4 {
  margin: 8px 0 6px;
  color: #06152e;
  font-size: 20px;
  font-weight: 950;
}

.experience-case-learning-hero p {
  margin: 0;
  color: #405875;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 750;
}

.experience-case-learning-stats,
.experience-case-steps {
  display: grid;
  gap: 10px;
}

.experience-case-learning-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.experience-case-learning-stats div,
.experience-case-steps article,
.experience-case-rules div {
  border: 1px solid #d8e7f7;
  border-radius: 8px;
  background: #fff;
}

.experience-case-learning-stats div {
  min-height: 78px;
  padding: 10px;
  display: grid;
  gap: 4px;
  align-content: center;
}

.experience-case-learning-stats strong {
  color: #06152e;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
}

.experience-case-learning-stats span {
  color: #5a6f8d;
  font-size: 12px;
  font-weight: 800;
}

.experience-case-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.experience-case-steps article {
  min-height: 112px;
  padding: 13px;
  display: grid;
  gap: 7px;
  align-content: start;
}

.experience-case-steps i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eaf2ff;
  color: var(--blue);
  font-style: normal;
  font-weight: 950;
  font-size: 12px;
}

.experience-case-steps strong,
.experience-case-pattern-head strong,
.experience-case-rules strong {
  color: #06152e;
  font-weight: 950;
}

.experience-case-steps p,
.experience-case-pattern-head small,
.experience-case-flow p,
.experience-case-rules span {
  margin: 0;
  color: #526985;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 750;
}

.experience-case-patterns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.experience-case-pattern-card {
  padding: 14px;
  border: 1px solid #d8e4f2;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.experience-case-pattern-card.baseline {
  border-left-color: var(--blue);
}

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

.experience-case-pattern-head small {
  display: block;
  margin-top: 4px;
}

.experience-case-pattern-head span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eefbf8;
  color: var(--accent);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}

.experience-case-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.experience-case-flow div {
  min-height: 104px;
  padding: 9px;
  border: 1px solid #dfe9f5;
  border-radius: 8px;
  background: #f8fbff;
  display: grid;
  gap: 5px;
  align-content: start;
}

.experience-case-flow span {
  color: #27519d;
  font-size: 12px;
  font-weight: 950;
}

.experience-case-meta,
.experience-case-tags,
.experience-case-assets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.experience-case-meta span,
.experience-case-tags span,
.experience-case-assets span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #315170;
  font-size: 12px;
  font-weight: 850;
}

.experience-case-meta span {
  background: #eefbf8;
  color: var(--accent);
}

.experience-case-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.experience-case-rules div {
  min-height: 86px;
  padding: 12px;
  background: #fbfdff;
  display: grid;
  gap: 6px;
  align-content: start;
}

.experience-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1.55fr) minmax(360px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.experience-main,
.experience-side {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.experience-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(25, 44, 74, 0.04);
}

.experience-maintenance-panel {
  background: #fbfdff;
}

.experience-panel-head {
  min-height: 58px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

summary.experience-panel-head {
  cursor: pointer;
  list-style: none;
}

summary.experience-panel-head::-webkit-details-marker {
  display: none;
}

summary.experience-panel-head::after {
  content: "展开";
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.experience-maintenance-panel[open] > summary.experience-panel-head::after {
  content: "收起";
}

.experience-panel-head h3 {
  margin: 0;
  color: #06152e;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 850;
}

.experience-panel-head p {
  margin: 5px 0 0;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.experience-panel-actions select,
.experience-panel-actions input {
  min-height: 34px;
  width: auto;
  min-width: 150px;
  margin: 0;
}

.experience-panel-actions input {
  min-width: 280px;
}

.experience-card-list,
.experience-candidate-list,
.experience-mini-list,
.experience-rule-list,
.experience-source-list {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.experience-card,
.experience-candidate-card,
.experience-mini-card,
.experience-rule-card,
.experience-source-card,
.experience-empty {
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fff;
}

.experience-card,
.experience-candidate-card,
.experience-empty {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.experience-card.active {
  border-left: 3px solid var(--accent);
}

.experience-card.inactive {
  opacity: 0.72;
  background: #f8fbff;
}

.experience-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.experience-card-head h4 {
  margin: 0;
  color: #06152e;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 900;
}

.experience-card-head p,
.experience-card > p,
.experience-candidate-card > p {
  margin: 4px 0 0;
  color: #405879;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 700;
}

.experience-card-head > strong {
  min-width: 54px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #eef8ff;
  color: #007a9d;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.experience-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.experience-insight-grid div,
.experience-effect-summary div {
  min-height: 62px;
  padding: 10px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #f8fbff;
  display: grid;
  gap: 5px;
  align-content: start;
}

.experience-insight-grid span,
.experience-effect-summary span {
  color: #60728d;
  font-size: 12px;
  font-weight: 800;
}

.experience-insight-grid strong,
.experience-effect-summary strong {
  color: #06152e;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 900;
}

.experience-card-actions {
  justify-content: flex-start;
}

.experience-card-actions button {
  min-height: 32px;
  padding: 7px 11px;
}

.experience-effect-summary {
  padding: 14px 14px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.experience-mini-card,
.experience-rule-card,
.experience-source-card {
  padding: 12px;
}

.experience-mini-card strong,
.experience-rule-card strong,
.experience-source-card strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #06152e;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 900;
}

.experience-mini-card em,
.experience-source-card em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.experience-mini-card small,
.experience-rule-card small,
.experience-source-card small {
  display: block;
  margin-top: 6px;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.experience-mini-card.muted,
.experience-empty {
  background: #f8fbff;
}

.experience-rule-card {
  border-left: 3px solid var(--accent);
}

.experience-rule-card.warning {
  border-left-color: var(--amber);
  background: #fffaf1;
}

.experience-rule-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.experience-note {
  color: #5b6f8c;
  font-size: 12px;
  font-weight: 800;
}

.knowledge-candidate-list,
.knowledge-document-list {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.knowledge-candidate-card,
.knowledge-document-card {
  padding: 14px;
}

.knowledge-candidate-head,
.knowledge-document-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.knowledge-candidate-head h4,
.knowledge-document-head h4 {
  margin: 0;
  color: #06152e;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 900;
}

.knowledge-candidate-head p,
.knowledge-document-head p,
.knowledge-document-card .meta-line {
  margin: 7px 0 0;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.knowledge-candidate-head > strong {
  min-width: 64px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.knowledge-document-head > span {
  color: #71819b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.knowledge-candidate-content,
.knowledge-document-content {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid #e0e8f3;
  border-radius: 8px;
  background: #f8fbff;
  color: #20324d;
  line-height: 1.6;
  white-space: pre-wrap;
}

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

.knowledge-evidence-grid div {
  min-height: 64px;
  padding: 10px;
  border: 1px solid #e2ebf6;
  border-radius: 8px;
  background: #fbfdff;
}

.knowledge-evidence-grid span {
  display: block;
  color: #708098;
  font-size: 12px;
  font-weight: 800;
}

.knowledge-evidence-grid strong,
.knowledge-evidence-grid button {
  margin-top: 5px;
  color: #06152e;
  font-size: 13px;
  font-weight: 900;
}

.knowledge-candidate-actions,
.knowledge-document-actions {
  margin-top: 12px;
  justify-content: flex-start;
}

.knowledge-action-note {
  color: #5b6f8c;
  font-size: 12px;
  font-weight: 800;
}

.knowledge-form-grid {
  padding: 16px 18px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.knowledge-form-grid label {
  display: grid;
  gap: 7px;
  color: #526682;
  font-size: 12px;
  font-weight: 850;
}

.knowledge-form-grid .wide {
  grid-column: 1 / -1;
}

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

.knowledge-form-actions {
  padding: 14px 18px 18px;
  justify-content: flex-start;
}

.knowledge-filters {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr)) minmax(220px, 1.7fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.knowledge-guardrail {
  padding: 12px;
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: #f7fbff;
}

.knowledge-guardrail.warning {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.knowledge-guardrail strong {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #06152e;
  font-size: 13px;
  font-weight: 900;
}

.knowledge-guardrail strong span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.knowledge-guardrail small {
  display: block;
  margin-top: 6px;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.knowledge-hit-card {
  padding: 12px;
  display: grid;
  gap: 7px;
}

.knowledge-hit-card strong {
  color: #06152e;
  font-size: 13px;
  font-weight: 900;
}

.knowledge-hit-card small,
.knowledge-hit-card p {
  margin: 0;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.knowledge-hit-card em {
  color: #20324d;
  font-size: 12px;
  font-style: normal;
  line-height: 1.55;
}

.knowledge-empty-state {
  padding: 18px;
  border: 1px dashed #bfd0e5;
  border-radius: 8px;
  background: #f8fbff;
}

.knowledge-empty-state strong {
  display: block;
  color: #06152e;
  font-size: 14px;
  font-weight: 900;
}

.knowledge-empty-state p {
  margin: 7px 0 0;
  color: #5b6f8c;
  line-height: 1.55;
  font-size: 13px;
  font-weight: 700;
}

.automation-page {
  display: grid;
  gap: 18px;
  width: 100%;
}

.automation-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 2px;
}

.automation-page-head h2 {
  margin: 0;
  color: #06152e;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 850;
}

.automation-page-head p {
  margin: 8px 0 0;
  max-width: 780px;
  color: #50627f;
  font-size: 13px;
  line-height: 1.55;
}

.automation-head-actions,
.automation-panel-actions,
.automation-test-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.automation-head-actions {
  min-width: min(520px, 44vw);
}

.danger-button {
  border-color: #ffd0d0;
  background: var(--red-soft);
  color: var(--red);
}

.danger-button:hover {
  border-color: #f8b5b5;
  background: #ffe9e9;
}

.automation-notice {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid #cfe2ff;
  border-radius: 8px;
  background: #eef5ff;
  color: #22517a;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
}

.automation-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.automation-metric-card {
  min-height: 116px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-content: start;
  text-align: left;
  color: var(--ink);
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  box-shadow: 0 8px 24px rgba(25, 44, 74, 0.04);
}

.automation-metric-card:hover {
  border-color: #b9cae3;
  box-shadow: 0 10px 24px rgba(20, 38, 69, 0.08);
}

.automation-metric-card span {
  color: #304769;
  font-size: 14px;
  font-weight: 800;
}

.automation-metric-card em {
  justify-self: end;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.automation-metric-card strong {
  grid-column: 1 / -1;
  color: #06152e;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
}

.automation-metric-card small {
  grid-column: 1 / -1;
  color: #4d6281;
  font-size: 13px;
  font-weight: 700;
}

.automation-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.automation-nav-card,
.automation-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(25, 44, 74, 0.04);
}

.automation-nav-card {
  position: sticky;
  top: 18px;
}

.automation-main,
.automation-right {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.automation-panel-head {
  min-height: 54px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.automation-panel-head h3 {
  margin: 0;
  color: #06152e;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 850;
}

.automation-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}

.automation-panel-body {
  padding: 16px 18px;
}

.automation-config-nav {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.automation-config-nav button {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #2d4465;
  background: transparent;
  border-color: transparent;
  border-radius: 8px;
  text-align: left;
  font-weight: 850;
}

.automation-config-nav button:hover,
.automation-config-nav button.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.automation-config-nav small {
  color: #7b8aa3;
  font-size: 12px;
  font-weight: 850;
}

.automation-config-nav button:hover small,
.automation-config-nav button.active small {
  color: var(--blue);
}

.automation-mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.automation-mode-switch button {
  min-height: 52px;
  padding: 8px;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  color: #2f4668;
  font-weight: 900;
}

.automation-mode-switch button small {
  display: block;
  margin-top: 4px;
  color: #74839b;
  font-size: 11px;
  font-weight: 750;
}

.automation-mode-switch button.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(35, 100, 232, 0.22);
}

.automation-mode-switch button.active small {
  color: #dce8ff;
}

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

.automation-form-grid label {
  display: grid;
  gap: 7px;
  color: #526682;
  font-size: 12px;
  font-weight: 850;
}

.automation-form-grid label small {
  color: #7a8aa3;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 650;
}

.automation-form-grid input,
.automation-table input,
.automation-table select,
.automation-provider-grid input,
.automation-provider-grid select,
.automation-test-result + input {
  min-height: 38px;
}

.automation-table-wrap {
  overflow-x: auto;
}

.automation-table {
  width: 100%;
  border-collapse: collapse;
}

.automation-table th,
.automation-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e6edf7;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.automation-table th {
  color: #65758f;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.automation-table td {
  color: #10203a;
  font-weight: 750;
}

.automation-table tr:last-child td {
  border-bottom: 0;
}

.automation-table strong {
  display: block;
  color: #07152e;
  font-weight: 900;
}

.automation-table small {
  display: block;
  margin-top: 4px;
  color: #65758f;
  font-size: 12px;
  font-weight: 650;
}

.automation-table input,
.automation-table select {
  min-width: 118px;
}

.switch-pill {
  width: 42px;
  min-height: 24px;
  height: 24px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: #cbd6e6;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  transition: 0.18s ease;
}

.switch-pill i {
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(31, 45, 61, 0.18);
}

.switch-pill.on {
  background: var(--green);
  justify-content: flex-end;
}

.automation-stage-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px;
}

.automation-stage-card {
  min-height: 170px;
  padding: 13px;
  position: relative;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.automation-stage-card strong {
  display: block;
  margin-bottom: 9px;
  color: #07152e;
  font-size: 14px;
  font-weight: 900;
}

.automation-stage-card p {
  margin: 7px 0;
  color: #465b7a;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.automation-stage-card span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.automation-range-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 72px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e6edf7;
}

.automation-range-row:last-child {
  border-bottom: 0;
}

.automation-range-row label {
  color: #203454;
  font-size: 13px;
  font-weight: 900;
}

.automation-range-row input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

.automation-range-row output {
  min-width: 58px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.automation-rule-list {
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}

.automation-rule-card {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #fff;
}

.automation-rule-card.enabled {
  background: linear-gradient(180deg, #fff, #fbfffd);
}

.automation-rule-card strong {
  display: block;
  color: #07152e;
  font-size: 14px;
  font-weight: 900;
}

.automation-rule-card p {
  margin: 6px 0 0;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

.automation-rule-card small {
  display: inline-flex;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.automation-check-grid {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.automation-check-card,
.automation-status-card {
  min-height: 76px;
  padding: 12px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #fff;
}

.automation-check-card.ok,
.automation-status-card.ok {
  border-color: #bee9d7;
  background: #f7fffb;
}

.automation-check-card.warn,
.automation-status-card.warn {
  border-color: #f4d69d;
  background: #fffaf0;
}

.automation-check-card.danger,
.automation-status-card.danger {
  border-color: #ffc5c0;
  background: #fff8f7;
}

.automation-check-card strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #07152e;
  font-size: 13px;
  font-weight: 900;
}

.automation-check-card strong span {
  white-space: nowrap;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
}

.automation-check-card.warn strong span {
  background: var(--amber-soft);
  color: var(--amber);
}

.automation-check-card.danger strong span {
  background: var(--red-soft);
  color: var(--red);
}

.automation-check-card p,
.automation-status-card p {
  margin: 7px 0 0;
  color: #5b6f8c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.automation-provider-grid {
  padding: 0 18px 18px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.automation-provider-grid section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: var(--panel-soft);
}

.automation-provider-grid pre,
.automation-test-result {
  margin: 0;
  max-height: 180px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #cfe2ff;
  border-radius: 8px;
  background: #eef7ff;
  color: #23405f;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
  white-space: pre-wrap;
}

.ai-model-health-panel {
  margin: 0 18px 16px;
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.ai-model-health-empty {
  padding: 16px;
  color: #5b6f8c;
  font-size: 13px;
  font-weight: 800;
}

.ai-model-health-empty.danger {
  color: var(--red);
  background: var(--red-soft);
}

.ai-model-health-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #dbe5f2;
  background: linear-gradient(90deg, #f8fbff 0%, #ffffff 100%);
}

.ai-model-health-head span,
.ai-model-health-metric span,
.ai-model-health-check small,
.ai-model-health-recommend small {
  color: #5b6f8c;
  font-size: 12px;
  font-weight: 800;
}

.ai-model-health-head h4 {
  margin: 4px 0;
  color: #07152e;
  font-size: 18px;
  font-weight: 900;
}

.ai-model-health-head p {
  margin: 0;
  color: #4e6280;
  font-size: 13px;
  font-weight: 700;
}

.ai-model-health-status {
  min-width: 108px;
  align-self: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  text-align: center;
  font-weight: 900;
}

.ai-model-health-head.warn .ai-model-health-status {
  background: var(--amber-soft);
  color: var(--amber);
}

.ai-model-health-head.danger .ai-model-health-status {
  background: var(--red-soft);
  color: var(--red);
}

.ai-model-health-status strong,
.ai-model-health-status small {
  display: block;
}

.ai-model-health-status small {
  margin-top: 3px;
  opacity: 0.86;
  font-size: 12px;
}

.ai-model-health-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 6px;
}

.ai-model-health-metric {
  min-height: 82px;
  padding: 12px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: var(--panel-soft);
}

.ai-model-health-metric strong {
  display: block;
  margin: 6px 0 4px;
  color: #07152e;
  font-size: 22px;
  font-weight: 950;
}

.ai-model-health-metric.ok {
  border-color: #b9eadc;
}

.ai-model-health-metric.warn {
  border-color: #ffe0a6;
  background: #fffaf0;
}

.ai-model-health-metric.danger {
  border-color: #ffc5c0;
  background: #fff8f7;
}

.ai-model-health-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 18px 16px;
}

.ai-model-health-grid section,
.ai-model-health-detail-grid section {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #ffffff;
}

.ai-model-health-list {
  display: grid;
  gap: 8px;
}

.ai-model-health-check,
.ai-model-health-recommend {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e3ebf5;
  border-radius: 8px;
  background: var(--panel-soft);
}

.ai-model-health-check strong,
.ai-model-health-recommend strong {
  display: block;
  color: #07152e;
  font-size: 13px;
  font-weight: 900;
}

.ai-model-health-check small,
.ai-model-health-recommend small {
  display: block;
  margin-top: 3px;
  line-height: 1.4;
}

.ai-model-health-check.warn {
  border-color: #ffe0a6;
}

.ai-model-health-check.danger {
  border-color: #ffc5c0;
}

.ai-model-health-details {
  border-top: 1px solid #dbe5f2;
  padding: 12px 18px 16px;
}

.ai-model-health-details summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.ai-model-health-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.ai-model-health-incident,
.ai-model-health-review {
  padding: 9px 0;
  border-top: 1px solid #edf2f8;
}

.ai-model-health-incident:first-of-type,
.ai-model-health-review:first-of-type {
  border-top: 0;
}

.ai-model-health-incident strong,
.ai-model-health-review strong {
  color: #07152e;
  font-size: 13px;
  font-weight: 900;
}

.ai-model-health-incident p,
.ai-model-health-review p {
  margin: 4px 0;
  color: #4e6280;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.ai-model-health-incident small,
.ai-model-health-review small {
  color: #6b7f9b;
  font-size: 12px;
  font-weight: 700;
}

.automation-status-stack,
.automation-version-list,
.automation-audit-list {
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}

.automation-status-card {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.automation-status-card strong {
  display: block;
  color: #07152e;
  font-size: 14px;
  font-weight: 900;
}

.automation-status-card span {
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.automation-status-card.warn span {
  background: var(--amber-soft);
  color: var(--amber);
}

.automation-status-card.danger span {
  background: var(--red-soft);
  color: var(--red);
}

.automation-version-card {
  padding: 11px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: var(--panel-soft);
}

.automation-version-card strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #07152e;
  font-size: 13px;
  font-weight: 900;
}

.automation-version-card strong span {
  color: var(--blue);
}

.automation-version-card p {
  margin: 7px 0 0;
  color: #5b6f8c;
  line-height: 1.45;
  font-size: 12px;
  font-weight: 700;
}

.automation-version-card .link-button {
  margin-top: 8px;
}

.automation-test-actions {
  justify-content: flex-start;
  margin: 10px 0 12px;
}

.automation-test-result strong {
  display: block;
  margin-bottom: 6px;
  color: #07152e;
}

.automation-test-result p {
  margin: 6px 0;
}

.automation-test-result ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.automation-audit-item {
  padding: 10px 0 10px 14px;
  border-left: 3px solid var(--blue);
}

.automation-audit-item strong {
  display: block;
  color: #07152e;
  font-size: 13px;
  font-weight: 900;
}

.automation-audit-item p {
  margin: 5px 0 0;
  color: #5b6f8c;
  line-height: 1.45;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .workspace-grid,
  .dashboard-main-grid,
  .dashboard-bottom-grid,
  .dashboard-insight-grid,
  .library-boundary-strip,
  .library-boundary-grid,
  .library-boundary-usage,
  .tag-layout,
  .tag-two-col,
  .script-layout,
  .training-layout,
  .report-main-grid,
  .report-two-col,
  .report-audit-grid,
  .automation-layout,
  .automation-provider-grid,
  .automation-check-grid,
  .knowledge-overview,
  .knowledge-overview-cards,
  .knowledge-section-tabs,
  .knowledge-layout,
  .knowledge-metrics,
  .knowledge-workflow,
  .script-metrics,
  .script-sop-learning-summary,
  .script-sop-node-rates,
  .reception-layout,
  .reception-metrics,
  .split,
  .oauth-grid,
  .wizard-actions {
    grid-template-columns: 1fr;
    height: auto;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-page-head,
  .reception-page-head,
  .script-page-head,
  .training-page-head,
  .training-panel-head,
  .training-chat-head,
  .script-panel-head,
  .automation-page-head,
  .knowledge-page-head,
  .knowledge-panel-head,
  .experience-page-head,
  .experience-panel-head,
  .report-filter-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-head-actions,
  .reception-head-actions,
  .script-head-actions,
  .training-head-actions,
  .automation-head-actions,
  .knowledge-head-actions,
  .knowledge-panel-actions,
  .experience-head-actions,
  .experience-panel-actions,
  .report-filter-grid {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .report-period-tabs,
  .report-filter-grid {
    grid-template-columns: 1fr;
  }

  .report-kpi-grid,
  .script-metrics,
  .training-metrics,
  .automation-metrics,
  .experience-boundary-cards,
  .experience-learning-hero,
  .experience-learning-metrics,
  .experience-learning-board,
  .experience-learning-boundaries,
  .experience-metrics,
  .experience-auto-hero,
  .experience-auto-cards,
  .experience-apply-hero,
  .experience-apply-stats,
  .experience-loop-strip,
  .experience-apply-rules,
  .experience-apply-matrix,
  .experience-apply-steps,
  .experience-learning-pipeline,
  .experience-focus-grid,
  .experience-case-learning-hero,
  .experience-case-learning-stats,
  .experience-case-steps,
  .experience-case-patterns,
  .experience-case-flow,
  .experience-case-rules,
  .report-quality-grid {
    grid-template-columns: 1fr;
  }

  .experience-layout,
  .experience-playbook-grid,
  .experience-insight-grid,
  .experience-effect-summary {
    grid-template-columns: 1fr;
  }

  .training-side,
  .training-coach,
  .script-left,
  .script-right {
    position: static;
  }

  .training-chat-panel {
    min-height: 620px;
  }

  .experience-panel-actions input,
  .experience-panel-actions select {
    width: 100%;
    min-width: 0;
  }

  .report-custom-date {
    width: 100%;
  }

  .customers-page-head,
  .tags-page-head,
  .tag-panel-head,
  .script-page-head,
  .customers-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-period-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .customer-custom-date,
  .customer-custom-toggle {
    width: 100%;
  }

  .customer-custom-panel {
    left: 0;
    right: auto;
    width: min(100%, 320px);
  }

  .customer-search-panel,
  .order-filterbar,
  .customer-kpi-grid,
  .order-kpi-grid,
  .tag-kpi-grid,
  .tag-rule-filters,
  .tag-form-grid,
  .script-form-grid,
  .script-filters,
  .script-test-grid,
  .script-binding,
  .script-quality-summary,
  .script-fixed-flow,
  .script-fixed-boundary,
  .knowledge-form-grid,
  .knowledge-filters,
  .knowledge-evidence-grid,
  .automation-form-grid,
  .automation-mode-switch,
  .automation-stage-flow,
  .customer-asset-shell,
  .customer-bottom-grid {
    grid-template-columns: 1fr;
  }

  .customer-subnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .customer-data-filterbar,
  .customer-data-kpis {
    grid-template-columns: 1fr;
  }

  .customer-subnav button {
    width: 100%;
    min-width: 0;
  }

  .workspace-quick-filterbar,
  .workspace-quick-body,
  .workspace-quick-table-head,
  .workspace-quick-row {
    grid-template-columns: 1fr;
  }

  .workspace-quick-body {
    max-height: none;
  }

  .workspace-quick-categories {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #e3e8f1;
  }

  .workspace-quick-categories button {
    width: auto;
    min-width: 112px;
    justify-content: center;
    gap: 6px;
  }

  .workspace-quick-table-head {
    display: none;
  }

  .workspace-quick-row {
    align-items: flex-start;
    gap: 6px;
    padding: 10px 14px;
  }

  .automation-nav-card,
  .reception-left,
  .automation-right,
  .knowledge-left,
  .knowledge-right,
  .script-left,
  .script-right {
    position: static;
  }

  .automation-range-row {
    grid-template-columns: 1fr;
  }

  .tag-form-grid .wide,
  .script-form-grid .wide,
  .knowledge-form-grid .wide {
    grid-column: span 1;
  }

  .knowledge-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .script-card-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .script-card-foot div {
    justify-content: flex-start;
  }

  .tag-review-main,
  .tag-log-item,
  .script-card-foot,
  .tag-review-main,
  .tag-log-item {
    grid-template-columns: 1fr;
  }

  .customer-segment-panel,
  .customer-list-panel,
  .customer-detail-panel {
    min-height: auto;
  }

  .workspace-page-head,
  .workspace-head-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-search {
    grid-template-columns: 1fr;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
    overflow: visible;
    min-height: 0;
    height: auto;
  }

  .workspace-conversation-panel,
  .workspace-detail-panel {
    border-left: 0;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-panel-head {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .workspace-contact-summary,
  .workspace-contact-metrics {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .workspace-contact-metrics div {
    border-right: 0;
    border-bottom: 1px solid #e8eef7;
  }

  .workspace-contact-metrics div:last-child {
    border-bottom: 0;
  }

  .rail-item {
    min-height: 48px;
  }

  .workspace-quick-list {
    max-height: 200px;
  }

  .dashboard-filters {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-period-tabs {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
  }

  .period-custom {
    width: 100%;
  }

  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .focus-table {
    min-width: 0;
  }

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

  .messages {
    min-height: 420px;
  }

  .reception-seat-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .reception-seat-controls {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .reception-user-row {
    grid-template-columns: 1fr;
  }

  .reception-user-actions {
    justify-content: flex-start;
  }

  .channel-card-head,
  .routing-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .routing-overview-metrics {
    justify-content: flex-start;
  }

  .routing-service-row,
  .routing-selected-card {
    grid-template-columns: 1fr;
  }

  .routing-service-fields {
    justify-content: flex-start;
  }
}

@media (max-width: 1380px) {
  .case-asset-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .case-asset-control-panel,
  .case-assets-layout {
    grid-template-columns: 1fr;
  }

  .case-asset-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-asset-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-asset-detail-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  body.assets-view .main {
    padding: 18px 14px 32px;
  }

  .case-assets-head,
  .case-assets-list-head,
  .case-asset-card-head,
  .case-asset-detail-code,
  .case-asset-recommend-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .case-asset-metrics,
  .case-asset-filters,
  .case-asset-editor-grid,
  .case-asset-kv-grid,
  .case-asset-rhythm {
    grid-template-columns: 1fr;
  }

  .case-assets-actions,
  .case-asset-recommend-actions button,
  .case-asset-detail-code button {
    width: 100%;
  }
}
