/*
 * [FILE ROLE NOTE] 工作台/客户中台样式表
 * 功能: 负责首页工作台、客户资产中台、抽屉等核心样式。
 * 调用方: index.html 及 workspace 下多个组件
 * 依赖: 依赖页面 class 命名约定
 * 删除建议: 不建议删；主界面样式会乱
 */
/* ========== 基础布局 ========== */

.workspace-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.07), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
  color: #0f172a;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.workspace-topbar__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.workspace-topbar__logo {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.workspace-topbar__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.workspace-topbar__desc {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.workspace-topbar__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  min-width: 0;
}

.workspace-mailbox-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.workspace-mailbox-panel--compact {
  padding: 8px 10px;
}

.workspace-mailbox-panel__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.workspace-mailbox-panel__title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.workspace-mailbox-panel__desc {
  font-size: 12px;
  color: #64748b;
}

.workspace-mailbox-panel__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workspace-mailbox-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.workspace-mailbox-btn--primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  border: none;
}

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

.workspace-mailbox-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.workspace-mailbox-chip--muted {
  color: #64748b;
}

.workspace-topbar__tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace-tab {
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.workspace-tab.is-active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  border: none;
}

.workspace-mailbox-notice {
  margin: 14px 24px 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
}

.workspace-mailbox-notice.is-success {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.workspace-mailbox-notice.is-error {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.workspace-main {
  padding: 22px 24px 24px;
}

/* ========== 顶部任务入口 + 抽屉 ========== */

.workspace-task-hub {
  display: flex;
  align-items: center;
  margin-right: 4px;
}

.workspace-task-hub__trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.workspace-task-hub__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
}

.workspace-task-hub__dot.is-active {
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.workspace-task-hub__text {
  font-size: 13px;
  font-weight: 600;
}

.workspace-task-hub__count {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(3px);
  z-index: 80;
}

.task-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 92vw);
  height: 100vh;
  background: #f8fafc;
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 90;
  display: flex;
  flex-direction: column;
}

.task-drawer.is-open {
  transform: translateX(0);
}

.task-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.82);
}

.task-drawer__eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #64748b;
  margin-bottom: 6px;
}

.task-drawer__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  color: #0f172a;
}

.task-drawer__sub {
  margin-top: 8px;
  font-size: 13px;
  color: #64748b;
}

.task-drawer__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-drawer__btn,
.task-drawer__close {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #fff;
  color: #0f172a;
  border-radius: 12px;
  cursor: pointer;
}

.task-drawer__btn {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.task-drawer__close {
  width: 36px;
  height: 36px;
  font-size: 16px;
}

.task-drawer__body {
  flex: 1;
  padding: 16px 22px;
  overflow: auto;
}

.task-drawer__empty {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
}

.task-drawer__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-drawer-item {
  width: 100%;
  text-align: left;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  cursor: pointer;
}

.task-drawer-item.is-active {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.task-drawer-item__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.task-drawer-item__id {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.task-drawer-item__status {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}

.task-drawer-item__progress {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.task-drawer-item__keyword {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.5;
  word-break: break-word;
  margin-bottom: 8px;
}

.task-drawer-item__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

.task-drawer-item__track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.task-drawer-item__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #22c55e);
  transition: width 0.3s ease;
}

.task-drawer__detail {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.86);
  padding: 16px 22px 22px;
}

.task-drawer-detail__title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}

.task-drawer-detail__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.task-drawer-detail__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-drawer-detail__row span {
  font-size: 12px;
  color: #64748b;
}

.task-drawer-detail__row strong {
  font-size: 13px;
  color: #0f172a;
  line-height: 1.5;
  word-break: break-word;
}

.task-drawer-detail__row--full {
  grid-column: 1 / -1;
}

/* ========== AI 面板 ========== */

.agent-layout {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 18px;
}

.agent-panel,
.terminal-panel,
.folder-panel,
.dashboard-main,
.customer-drawer {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

.agent-panel {
  min-height: calc(100vh - 170px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.agent-panel__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.agent-panel__avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  font-size: 20px;
  color: #fff;
}

.agent-panel__title {
  margin: 0;
  font-size: 16px;
}

.agent-panel__desc {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}

.agent-panel__messages {
  flex: 1;
  padding: 18px;
  overflow: auto;
}

.chat-bubble-wrap {
  display: flex;
  margin-bottom: 14px;
}

.chat-bubble-wrap.is-user {
  justify-content: flex-end;
}

.chat-bubble-wrap.is-ai {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: min(80%, 680px);
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.65;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble--ai {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}

.chat-bubble--user {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
}

.agent-panel__inputbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.agent-panel__input {
  flex: 1;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.9);
  padding: 0 16px;
  font-size: 14px;
  outline: none;
}

.agent-panel__input:focus {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.agent-panel__send {
  height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.agent-panel__send:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.terminal-panel {
  min-height: calc(100vh - 170px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.terminal-panel__topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.terminal-panel__lights {
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dot--red {
  background: #ef4444;
}

.dot--yellow {
  background: #f59e0b;
}

.dot--green {
  background: #22c55e;
}

.terminal-panel__label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.12em;
}

.terminal-task-summary {
  padding: 14px 18px 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.terminal-task-summary__card {
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.terminal-task-summary__label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
}

.terminal-task-summary__value {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.terminal-panel__body {
  flex: 1;
  padding: 16px 18px;
  overflow: auto;
}

.terminal-empty {
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #94a3b8;
  text-align: center;
}

.terminal-empty__icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.terminal-empty__text {
  font-size: 13px;
}

.terminal-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.terminal-log {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #0f172a;
  word-break: break-word;
}

.terminal-log--ok {
  color: #16a34a;
  font-weight: 700;
}

.terminal-log--cursor {
  color: #2563eb;
  animation: blink 1s steps(1) infinite;
}

.terminal-log__time {
  color: #64748b;
  margin-right: 6px;
}

.terminal-progress-meta,
.terminal-progress-sub {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.terminal-progress-meta {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.terminal-progress-sub {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

.terminal-progress-track {
  margin-top: 12px;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.terminal-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #22c55e);
  transition: width 0.3s ease;
}

.terminal-panel__footer {
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

/* ========== 客户资产中台 ========== */

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

.folder-panel {
  min-height: calc(100vh - 170px);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

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

.folder-panel__title {
  margin: 0;
  font-size: 18px;
}

.folder-panel__sub {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}

.folder-panel__refresh {
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.folder-panel__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.folder-summary-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.folder-summary-card__label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.folder-summary-card__value {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.folder-panel__list {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.folder-item {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.folder-item.is-active {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.folder-item__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.folder-item__icon {
  font-size: 18px;
}

.folder-item__title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.folder-item__desc {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.folder-item__count {
  min-width: 32px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.folder-empty {
  padding: 40px 10px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.dashboard-main {
  min-height: calc(100vh - 170px);
  padding: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dashboard-toolbar {
  margin-bottom: 16px;
}

.dashboard-toolbar__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-toolbar__summary-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.dashboard-toolbar__summary-value {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.dashboard-toolbar__summary-value--small {
  font-size: 18px;
}

.dashboard-toolbar__summary-sub {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.dashboard-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}

.toolbar-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.toolbar-btn--primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  border: none;
}

.dashboard-toolbar__filters {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.toolbar-search-wrap {
  flex: 1;
}

.toolbar-search {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.9);
  padding: 0 14px;
  outline: none;
}

.toolbar-placeholder {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

.dashboard-task-overview {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.15fr 1.85fr;
  gap: 16px;
}

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

.dashboard-task-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(12px);
}

.dashboard-task-card__label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.dashboard-task-card__value {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.dashboard-running-tasks {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(12px);
  min-height: 142px;
}

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

.dashboard-running-tasks__title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.dashboard-running-tasks__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-running-task-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.dashboard-running-task-item__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.dashboard-running-task-item__id {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.dashboard-running-task-item__status {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}

.dashboard-running-task-item__progress {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.dashboard-running-task-item__keyword {
  font-size: 13px;
  line-height: 1.5;
  color: #0f172a;
  font-weight: 600;
  margin-bottom: 6px;
  word-break: break-word;
}

.dashboard-running-task-item__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

.dashboard-running-task-item__track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.dashboard-running-task-item__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #22c55e);
  transition: width 0.3s ease;
}

.dashboard-running-tasks__empty {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
}

.customer-stream {
  display: grid;
  grid-template-columns: 42px 1.4fr 1.25fr 1.15fr 1.5fr 0.8fr 0.9fr;
  gap: 12px;
  align-items: stretch;
}

.customer-stream--header {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 12px;
}

.customer-stream-body {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customer-stream--row {
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.customer-col {
  min-width: 0;
}

.customer-company {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  color: #0f172a;
  word-break: break-word;
}

.customer-base-meta {
  margin-top: 8px;
}

.industry-tag {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  height: 24px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

.customer-website {
  margin-top: 10px;
  font-size: 12px;
  word-break: break-all;
}

.customer-website a {
  color: #2563eb;
  text-decoration: none;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 12px;
  color: #334155;
}

.product-main-text {
  font-size: 13px;
  line-height: 1.65;
  color: #334155;
  word-break: break-word;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
}

.contact-label {
  width: 44px;
  flex: 0 0 44px;
  font-size: 12px;
  color: #64748b;
}

.contact-value {
  font-size: 13px;
  color: #0f172a;
  word-break: break-word;
}

.contact-value--email {
  word-break: break-all;
}

.copy-btn {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #fff;
  cursor: pointer;
}

.summary-clamp {
  font-size: 13px;
  line-height: 1.7;
  color: #334155;
  word-break: break-word;
}

.metric-score {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.metric-score__label {
  font-size: 12px;
  color: #64748b;
}

.metric-score__value {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.metric-time__label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.metric-time__value {
  font-size: 12px;
  color: #334155;
  word-break: break-word;
}

.row-action-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row-action-btn {
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.row-action-btn--primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  border: none;
}

.row-action-btn--danger {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.12);
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: #94a3b8;
}

.empty-state__icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.empty-state__title {
  font-size: 16px;
  font-weight: 700;
  color: #64748b;
}

.empty-state__desc {
  margin-top: 6px;
  font-size: 13px;
}

/* ========== 客户抽屉 ========== */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(3px);
  z-index: 60;
}

.customer-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(620px, 96vw);
  height: 100vh;
  background: #f8fafc;
  box-shadow: -18px 0 40px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 70;
  display: flex;
  flex-direction: column;
  border-radius: 0;
}

.customer-drawer.is-open {
  transform: translateX(0);
}

.customer-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.86);
}

.customer-drawer__eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #64748b;
  margin-bottom: 6px;
}

.customer-drawer__title {
  margin: 0;
  font-size: 22px;
  color: #0f172a;
  line-height: 1.2;
}

.customer-drawer__sub {
  margin-top: 8px;
  font-size: 13px;
  color: #64748b;
}

.customer-drawer__close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  cursor: pointer;
}

.customer-drawer__body {
  flex: 1;
  overflow: auto;
  padding: 18px 22px;
}

.drawer-section {
  margin-bottom: 22px;
}

.drawer-section__title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

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

.drawer-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-field--full {
  grid-column: 1 / -1;
}

.drawer-label {
  font-size: 12px;
  color: #64748b;
}

.drawer-input,
.drawer-textarea {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
}

.drawer-input:focus,
.drawer-textarea:focus {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.drawer-textarea {
  min-height: 120px;
  resize: vertical;
}

.drawer-summary {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 13px;
  line-height: 1.75;
  color: #334155;
  word-break: break-word;
}

.customer-drawer__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.86);
}

.drawer-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.drawer-btn--ghost {
  background: transparent;
}

.drawer-btn--primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  border: none;
}

/* ========== 通用 ========== */

.chat-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.34);
  border-radius: 999px;
}

.chat-scroll::-webkit-scrollbar-track {
  background: transparent;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ========== 响应式 ========== */

@media (max-width: 1600px) {
  .customer-stream {
    grid-template-columns: 42px 1.3fr 1.15fr 1.05fr 1.35fr 0.8fr 0.9fr;
  }
}

@media (max-width: 1440px) {
  .agent-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-layout {
    grid-template-columns: 300px 1fr;
  }

  .dashboard-task-overview {
    grid-template-columns: 1fr;
  }

  .dashboard-task-overview__cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .customer-stream {
    grid-template-columns: 42px 1.35fr 1.1fr 1fr 1.2fr 0.8fr 0.85fr;
  }
}

@media (max-width: 1280px) {
  .workspace-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-topbar__right {
    align-items: stretch;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .folder-panel,
  .dashboard-main,
  .agent-panel,
  .terminal-panel {
    min-height: auto;
  }

  .customer-stream {
    min-width: 1180px;
  }
}

@media (max-width: 1080px) {
  .terminal-task-summary,
  .dashboard-task-overview__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-running-tasks__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .task-drawer {
    width: 100vw;
  }

  .task-drawer-detail__grid,
  .drawer-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .workspace-main,
  .workspace-topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .workspace-mailbox-panel,
  .workspace-topbar__tabs {
    flex-wrap: wrap;
  }

  .terminal-task-summary,
  .dashboard-task-overview__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-panel__inputbar {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-panel__send {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .workspace-topbar__title {
    font-size: 18px;
  }

  .terminal-task-summary,
  .dashboard-task-overview__cards {
    grid-template-columns: 1fr;
  }

  .workspace-task-hub__text {
    display: none;
  }

  .task-drawer__header,
  .customer-drawer__header,
  .customer-drawer__footer,
  .task-drawer__detail,
  .task-drawer__body,
  .customer-drawer__body {
    padding-left: 16px;
    padding-right: 16px;
  }
}
/* ===== 顶部栏紧凑化修复 ===== */

.workspace-topbar--compact {
  min-height: 72px;
  padding: 10px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.workspace-topbar__left,
.workspace-topbar__center,
.workspace-topbar__right {
  min-width: 0;
}

.workspace-topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-topbar__logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 16px;
  flex-shrink: 0;
}

.workspace-topbar__brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.workspace-topbar__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
}

.workspace-topbar__desc {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.2;
  color: #64748b;
  white-space: nowrap;
}

.workspace-topbar__center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.workspace-tab {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 14px;
}

.workspace-topbar__right--compact {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.workspace-mailbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.workspace-mailbox-inline__label {
  font-size: 12px;
  color: #64748b;
}

.workspace-mailbox-inline__value {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.workspace-mailbox-inline__btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.workspace-mailbox-inline__btn--primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  border: none;
}

.workspace-main {
  padding-top: 14px;
}

@media (max-width: 1280px) {
  .workspace-topbar--compact {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .workspace-topbar__center {
    justify-content: flex-start;
  }

  .workspace-topbar__tabs {
    flex-wrap: wrap;
  }

  .workspace-topbar__right--compact {
    justify-content: flex-start;
  }
}
.dashboard-running-task-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.row-action-btn--tag-active {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.22);
}
.draft-batch-status {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.draft-batch-status__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #0f172a;
}

.draft-batch-status__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 8px;
}

.draft-batch-status__current {
  font-size: 12px;
  color: #334155;
  margin-bottom: 8px;
}

.draft-batch-status__track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.draft-batch-status__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  transition: width 0.25s ease;
}

/* ========== v4 owner / progression patch ========== */
.dashboard-toolbar__filters--grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.toolbar-search-wrap--wide {
  min-width: 0;
}

.toolbar-select {
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  padding: 0 14px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
}

.dashboard-owner-bar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dashboard-owner-bar__label,
.dashboard-owner-bar__hint {
  font-size: 12px;
  color: #64748b;
}
.toolbar-select--owner { min-width: 300px; }

.metric-owner { margin: 10px 0; }
.metric-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.metric-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.metric-chip.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.drawer-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.drawer-kpi-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(148,163,184,0.14);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-kpi-card span { font-size: 12px; color: #64748b; }
.drawer-kpi-card strong { font-size: 22px; color: #0f172a; }

.drawer-owner-row,
.drawer-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.drawer-owner-row .drawer-input { flex: 1; min-width: 180px; }
.drawer-summary--compact { margin-top: 10px; }

.drawer-task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.drawer-task-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(148,163,184,0.14);
}
.drawer-task-item__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #64748b;
}
.drawer-task-item__subject {
  font-size: 13px;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.6;
}
.drawer-task-item__meta {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

.drawer-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.drawer-timeline__item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
}
.drawer-timeline__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  margin-top: 6px;
  box-shadow: 0 0 0 6px rgba(37,99,235,0.08);
}
.drawer-timeline__content {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(148,163,184,0.14);
}
.drawer-timeline__title { font-size: 13px; font-weight: 800; color: #0f172a; }
.drawer-timeline__desc { margin-top: 6px; font-size: 12px; color: #475569; line-height: 1.6; }
.drawer-timeline__time { margin-top: 8px; font-size: 12px; color: #64748b; }

@media (max-width: 1280px) {
  .dashboard-toolbar__filters--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toolbar-search-wrap--wide { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .dashboard-toolbar__filters--grid,
  .drawer-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* CUSTOMER_AD_INTELLIGENCE_DRAWER_STYLE_V1 */
.ad-intel-panel {
  border: 1px solid rgba(37, 99, 235, 0.16);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34%),
    #ffffff;
}

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

.ad-intel-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.ad-intel-head p {
  margin: 5px 0 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.ad-intel-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ad-intel-kpi {
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.ad-intel-kpi span {
  display: block;
  color: #6b7280;
  font-size: 11px;
  margin-bottom: 4px;
}

.ad-intel-kpi strong {
  display: block;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
}

.ad-intel-line {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed #e5e7eb;
  color: #111827;
  font-size: 13px;
  line-height: 1.55;
}

.ad-intel-line:last-child {
  border-bottom: 0;
}

.ad-intel-label {
  color: #6b7280;
}

.ad-intel-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #f3f4f6;
  color: #4b5563;
}

.ad-intel-badge--hot {
  background: #fff7ed;
  color: #c2410c;
}

.ad-intel-badge--good {
  background: #ecfdf5;
  color: #047857;
}

.ad-intel-badge--soft {
  background: #eff6ff;
  color: #1d4ed8;
}

.ad-intel-badge--empty {
  background: #f3f4f6;
  color: #6b7280;
}

.ad-intel-creatives {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ad-intel-creative {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}

.ad-intel-creative img {
  width: 96px;
  height: 68px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.ad-intel-creative-main {
  min-width: 0;
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: #6b7280;
}

.ad-intel-creative-main strong {
  color: #111827;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-intel-creative-main a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.ad-intel-empty {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px dashed #d1d5db;
  color: #6b7280;
  font-size: 13px;
}

.ad-intel-error {
  margin-top: 10px;
  color: #dc2626;
  font-size: 12px;
}

/* CUSTOMER_AD_INTELLIGENCE_COMPACT_V2 */
.ad-intel-panel {
  padding: 16px !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
}

.ad-intel-head {
  margin-bottom: 12px !important;
}

.ad-intel-head h4 {
  font-size: 16px !important;
  line-height: 1.2;
}

.ad-intel-head p {
  font-size: 12px !important;
  margin-top: 4px !important;
}

.ad-intel-head .drawer-btn {
  min-width: 96px;
  height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 13px;
}

.ad-intel-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

.ad-intel-kpi {
  padding: 10px 12px !important;
  border-radius: 14px !important;
}

.ad-intel-kpi span {
  font-size: 12px !important;
}

.ad-intel-kpi strong {
  font-size: 17px !important;
}

.ad-intel-line {
  grid-template-columns: 76px 1fr !important;
  padding: 7px 0 !important;
  font-size: 13px !important;
}

.ad-intel-creatives {
  margin-top: 10px !important;
  gap: 8px !important;
}

.ad-intel-creative {
  grid-template-columns: 82px 1fr !important;
  padding: 8px !important;
  border-radius: 12px !important;
}

.ad-intel-creative img {
  width: 82px !important;
  height: 58px !important;
}

.ad-intel-empty {
  padding: 12px !important;
  font-size: 13px !important;
}

@media (max-width: 900px) {
  .ad-intel-kpis {
    grid-template-columns: 1fr !important;
  }
}

/* CUSTOMER_AD_INTELLIGENCE_DETAIL_V2 */
.ad-intel-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 12px;
}

.ad-intel-detail-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  padding: 10px;
}

.ad-intel-detail-card--flat {
  margin-top: 8px;
}

.ad-intel-detail-title {
  font-size: 13px;
  font-weight: 850;
  color: #111827;
  margin-bottom: 6px;
}

.ad-intel-more {
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.ad-intel-more summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 850;
  color: #111827;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.ad-intel-more summary::-webkit-details-marker {
  display: none;
}

.ad-intel-more summary::after {
  content: "展开/收起";
  float: right;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.ad-intel-creatives--dense {
  padding: 10px;
  margin-top: 0 !important;
}

.ad-intel-score-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.ad-intel-score-item {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 12px;
  padding: 9px;
  text-align: center;
}

.ad-intel-score-item span {
  display: block;
  color: #6b7280;
  font-size: 11px;
  margin-bottom: 4px;
}

.ad-intel-score-item strong {
  display: block;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
}

@media (max-width: 900px) {
  .ad-intel-detail-grid {
    grid-template-columns: 1fr;
  }

  .ad-intel-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* AD_ONE_RECORD_VISIBLE_V1 */
.ad-intel-proof-note {
  margin: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  display: grid;
  gap: 5px;
  font-size: 13px;
  line-height: 1.55;
}

.ad-intel-proof-note strong {
  color: #1d4ed8;
  font-weight: 850;
}

.ad-intel-proof-note span {
  color: #475569;
}

/* CUSTOMER_TRADE_BOL_DRAWER_BLOCK_V1 */
.trade-bol-panel {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.10), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

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

.trade-bol-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
}

.trade-bol-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.trade-bol-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.trade-bol-kpi {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  padding: 10px;
}

.trade-bol-kpi span {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.trade-bol-kpi strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
  word-break: break-word;
}

.trade-bol-meta {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  padding: 10px;
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.trade-bol-line {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  font-size: 12px;
  color: #475569;
}

.trade-bol-line span {
  color: #64748b;
}

.trade-bol-line strong {
  color: #111827;
  font-weight: 750;
  word-break: break-word;
}

.trade-bol-shipments {
  display: grid;
  gap: 10px;
}

.trade-bol-shipment {
  border: 1px solid #dbeafe;
  background: #ffffff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.trade-bol-shipment__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.trade-bol-shipment__top strong {
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 900;
}

.trade-bol-shipment__top span {
  color: #64748b;
  font-size: 12px;
}

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

.trade-bol-shipment__grid div {
  background: #f8fafc;
  border-radius: 12px;
  padding: 8px;
}

.trade-bol-shipment__grid span {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 3px;
}

.trade-bol-shipment__grid strong {
  display: block;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  word-break: break-word;
}

.trade-bol-desc {
  margin-top: 8px;
  padding: 8px;
  border-radius: 12px;
  background: #f9fafb;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}

.trade-bol-link {
  display: inline-flex;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #2563eb;
  text-decoration: none;
}

.trade-bol-runs {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
}

.trade-bol-runs span {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 999px;
  padding: 4px 8px;
}

.trade-bol-empty {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  border-radius: 14px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.trade-bol-error {
  margin-top: 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 14px;
  padding: 10px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .trade-bol-head {
    flex-direction: column;
  }

  .trade-bol-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trade-bol-shipment__grid {
    grid-template-columns: 1fr;
  }

  .trade-bol-line {
    grid-template-columns: 1fr;
  }
}

/* TRADE_BOL_CARD_PREMIUM_V2 */
.trade-bol-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.14) !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.18), transparent 34%),
    radial-gradient(circle at 95% 8%, rgba(14, 165, 233, 0.14), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 52%, #f8fafc 100%) !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.trade-bol-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #2563eb, #38bdf8, #0f172a);
}

.trade-bol-head {
  position: relative;
  padding: 2px 2px 4px 10px;
}

.trade-bol-head h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px !important;
  letter-spacing: -0.02em;
}

.trade-bol-head h4::before {
  content: "BOL";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 38px;
  padding: 0 8px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.trade-bol-head p {
  max-width: 440px;
}

.trade-bol-head .drawer-btn,
.trade-bol-head button {
  border-radius: 999px !important;
  padding: 8px 14px !important;
  background: linear-gradient(135deg, #1d4ed8, #0284c7) !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.20);
}

.trade-bol-kpis {
  gap: 10px !important;
  margin: 12px 0 !important;
}

.trade-bol-kpi {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.92)) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.trade-bol-kpi::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.07);
}

.trade-bol-kpi span {
  font-weight: 700;
}

.trade-bol-kpi strong {
  position: relative;
  font-size: 18px !important;
  letter-spacing: -0.03em;
}

.trade-bol-meta {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.88)) !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.trade-bol-line {
  align-items: center;
  padding: 2px 0;
}

.trade-bol-line span {
  font-weight: 700;
}

.trade-bol-line strong {
  font-size: 12.5px;
}

.trade-bol-shipments {
  margin-top: 12px;
}

.trade-bol-shipment {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.16) !important;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.075) !important;
}

.trade-bol-shipment::before {
  content: "进口提单证据";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid #bfdbfe;
}

.trade-bol-shipment__top {
  padding-right: 92px;
}

.trade-bol-shipment__top strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f172a !important;
  font-size: 15px !important;
}

.trade-bol-shipment__top strong::before {
  content: "单号";
  padding: 3px 7px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
}

.trade-bol-shipment__top span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569 !important;
  font-weight: 700;
}

.trade-bol-shipment__grid {
  gap: 10px !important;
}

.trade-bol-shipment__grid div {
  border: 1px solid rgba(226, 232, 240, 0.9);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
}

.trade-bol-shipment__grid span {
  font-weight: 800;
  color: #64748b !important;
}

.trade-bol-shipment__grid strong {
  font-size: 13px !important;
  line-height: 1.35;
}

.trade-bol-desc {
  border: 1px dashed #cbd5e1;
  background: #f8fafc !important;
}

.trade-bol-link {
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe;
}

.trade-bol-link::after {
  content: "↗";
  font-weight: 900;
}

.trade-bol-runs {
  margin-top: 12px !important;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.trade-bol-runs span {
  background: #f8fafc !important;
  border-color: #dbeafe !important;
  color: #334155 !important;
  font-weight: 700;
}

.trade-bol-empty {
  background:
    linear-gradient(180deg, #f8fafc, #ffffff) !important;
  border-color: #cbd5e1 !important;
}

.trade-bol-error {
  font-weight: 700;
}

@media (max-width: 900px) {
  .trade-bol-shipment::before {
    position: static;
    display: inline-flex;
    margin-bottom: 8px;
  }

  .trade-bol-shipment__top {
    padding-right: 0;
    align-items: flex-start;
    flex-direction: column;
  }
}

/* TRADE_BOL_MATCH_AD_INTEL_V1 */
/* 让美国提单验证和广告投放背调保持同一抽屉风格 */

.trade-bol-panel {
  position: relative;
  overflow: visible !important;
  border: 1px solid #e5e7eb !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.trade-bol-panel::before,
.trade-bol-panel::after,
.trade-bol-shipment::before,
.trade-bol-kpi::after,
.trade-bol-head h4::before,
.trade-bol-shipment__top strong::before,
.trade-bol-link::after {
  display: none !important;
  content: none !important;
}

.trade-bol-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 !important;
  margin-bottom: 14px;
}

.trade-bol-head h4 {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  letter-spacing: 0 !important;
}

.trade-bol-head p {
  margin: 5px 0 0 !important;
  max-width: none !important;
  color: #64748b !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

.trade-bol-head .drawer-btn,
.trade-bol-head button {
  border-radius: 12px !important;
  padding: 8px 12px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #2563eb !important;
  box-shadow: none !important;
  font-weight: 800 !important;
}

.trade-bol-head .drawer-btn:hover,
.trade-bol-head button:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

.trade-bol-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px !important;
  margin: 0 0 12px !important;
}

.trade-bol-kpi {
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
  padding: 12px !important;
  box-shadow: none !important;
}

.trade-bol-kpi span {
  display: block;
  margin-bottom: 6px;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.trade-bol-kpi strong {
  display: block;
  color: #0f172a !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  word-break: break-word;
}

.trade-bol-meta {
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  padding: 10px 12px !important;
  box-shadow: none !important;
  display: grid;
  gap: 0 !important;
  margin-bottom: 12px !important;
}

.trade-bol-line {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: start;
  padding: 9px 0 !important;
  border-bottom: 1px dashed #e5e7eb;
  color: #475569;
  font-size: 13px;
}

.trade-bol-line:last-child {
  border-bottom: 0;
}

.trade-bol-line span {
  color: #64748b !important;
  font-weight: 700 !important;
}

.trade-bol-line strong {
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1.5;
  word-break: break-word;
}

.trade-bol-shipments {
  display: grid;
  gap: 10px !important;
  margin-top: 10px !important;
}

.trade-bol-shipment {
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  padding: 12px !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.trade-bol-shipment__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-right: 0 !important;
  margin-bottom: 10px !important;
}

.trade-bol-shipment__top strong {
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

.trade-bol-shipment__top span {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.trade-bol-shipment__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px !important;
}

.trade-bol-shipment__grid div {
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  padding: 9px !important;
}

.trade-bol-shipment__grid span {
  display: block;
  margin-bottom: 4px;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

.trade-bol-shipment__grid strong {
  display: block;
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.4;
  word-break: break-word;
}

.trade-bol-desc {
  margin-top: 9px !important;
  border: 1px dashed #e5e7eb !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  color: #64748b !important;
  padding: 9px !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

.trade-bol-link {
  display: inline-flex;
  align-items: center;
  margin-top: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #2563eb !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

.trade-bol-link:hover {
  text-decoration: underline !important;
}

.trade-bol-runs {
  margin-top: 10px !important;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb !important;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #64748b !important;
  font-size: 12px !important;
}

.trade-bol-runs span {
  border: 1px solid #e5e7eb !important;
  background: #f8fafc !important;
  color: #475569 !important;
  border-radius: 999px !important;
  padding: 4px 8px !important;
  font-weight: 700 !important;
}

.trade-bol-empty {
  border: 1px dashed #cbd5e1 !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
  color: #64748b !important;
  padding: 12px !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

.trade-bol-error {
  margin-top: 10px;
  border: 1px solid #fecaca !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
  border-radius: 14px !important;
  padding: 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

@media (max-width: 900px) {
  .trade-bol-head {
    flex-direction: column;
  }

  .trade-bol-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trade-bol-shipment__grid {
    grid-template-columns: 1fr;
  }

  .trade-bol-line {
    grid-template-columns: 1fr;
  }
}
