:root {
  --bg: #f5f7fb;
  --card: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e5edf7;
  --soft: #f8fafc;
  --blue: #2563eb;
  --green: #059669;
  --orange: #d97706;
  --red: #e11d48;
  --shadow: 0 14px 36px rgba(15, 23, 42, .06);
  --radius: 22px;
}

* { box-sizing: border-box; }

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

button, input, select {
  font-family: inherit;
}

.intel-topbar {
  height: 76px;
  padding: 0 26px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 260px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 950;
}

.brand h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 950;
  line-height: 1.15;
}

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

.platform-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.platform-tab {
  height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #475569;
  font-weight: 900;
  cursor: pointer;
}

.platform-tab.active {
  background: #0f172a;
  color: #fff;
}

.platform-tab.disabled {
  opacity: .5;
  cursor: not-allowed;
}

.top-actions {
  display: flex;
  gap: 9px;
}

.intel-layout {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 22px;
  padding: 22px;
}

.intel-sidebar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  height: calc(100vh - 120px);
  position: sticky;
  top: 98px;
  overflow: auto;
}

.nav-block + .nav-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #eef2f7;
}

.nav-title {
  font-size: 12px;
  font-weight: 950;
  color: #94a3b8;
  margin: 0 0 9px;
}

.nav-item {
  width: 100%;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #334155;
  text-align: left;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  margin-bottom: 7px;
}

.nav-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.nav-item.active {
  background: #0f172a;
  color: #fff;
}

.intel-main {
  min-width: 0;
}

.page-hero {
  background:
    radial-gradient(circle at 10% 0%, rgba(37,99,235,.11), transparent 34%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .5px;
  margin-bottom: 6px;
}

.page-hero h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -.4px;
}

.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-metrics {
  display: flex;
  gap: 10px;
}

.metric-card {
  min-width: 96px;
  padding: 12px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.metric-card strong {
  display: block;
  font-size: 22px;
  font-weight: 950;
}

.metric-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.view { display: none; }
.view.active { display: block; }

.grid {
  display: grid;
  gap: 16px;
}
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.workbench-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
}

.card,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-head,
.panel-title {
  padding: 16px 17px;
  border-bottom: 1px solid #eef2f7;
}

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

.card h3,
.panel h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 950;
}

.panel p,
.text-block,
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.panel p {
  margin: 6px 0 0;
}

.mt { margin-top: 16px; }

.toolbar,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.toolbar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 16px;
}

.button-row {
  padding: 16px 17px;
}

.form-grid {
  padding: 16px 17px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label span {
  display: block;
  margin-bottom: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.switch-line {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.input {
  height: 42px;
  border: 1px solid #d7e2f0;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 0 13px;
  outline: none;
  font-size: 14px;
  min-width: 140px;
}

.input.wide {
  min-width: 320px;
  flex: 1;
}

.primary-btn,
.soft-btn,
.danger-btn,
.tiny-btn,
.icon-btn {
  height: 42px;
  border-radius: 14px;
  border: 1px solid #d7e2f0;
  background: #fff;
  color: #334155;
  font-weight: 900;
  cursor: pointer;
  padding: 0 14px;
}

.primary-btn {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.danger-btn {
  color: var(--red);
  border-color: #fecdd3;
  background: #fff1f2;
}

.tiny-btn {
  height: 32px;
  font-size: 12px;
  padding: 0 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.icon-btn {
  width: 38px;
  padding: 0;
  font-size: 22px;
}

.action-stack {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.status-list {
  padding: 16px;
  display: grid;
  gap: 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 850;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 8px;
}
.dot.green { background: var(--green); }
.dot.orange { background: var(--orange); }

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

.entity-list,
.mini-list {
  padding: 14px;
  display: grid;
  gap: 10px;
}

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

.entity-card-title {
  font-size: 16px;
  font-weight: 950;
  line-height: 1.35;
}

.entity-card-desc {
  color: #475569;
  font-size: 13px;
  line-height: 1.65;
}

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

.pill {
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 900;
}

.entity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.json-preview {
  margin: 0;
  padding: 16px;
  min-height: 260px;
  max-height: 520px;
  overflow: auto;
  background: #0f172a;
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.6;
}

.data-table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  padding: 12px 13px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.data-table th {
  color: #64748b;
  font-weight: 950;
  background: #f8fafc;
}

.empty-state {
  background: var(--card);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 46px;
  text-align: center;
  color: var(--muted);
}

.empty-state h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.drawer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

.drawer.open {
  pointer-events: auto;
}

.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .28);
  opacity: 0;
  transition: .18s ease;
}

.drawer.open .drawer-mask {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(620px, 92vw);
  background: #fff;
  box-shadow: -18px 0 50px rgba(15,23,42,.18);
  transform: translateX(100%);
  transition: .22s ease;
  display: flex;
  flex-direction: column;
}

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

.drawer-head {
  padding: 18px;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 950;
}

.drawer-body {
  padding: 18px;
  overflow: auto;
  flex: 1;
}

.drawer-actions {
  padding: 14px 18px;
  border-top: 1px solid #eef2f7;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-row {
  padding: 12px 0;
  border-bottom: 1px solid #eef2f7;
}

.detail-row label {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  margin-bottom: 6px;
}

.detail-row div {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.65;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  background: #0f172a;
  color: #fff;
  border-radius: 14px;
  padding: 12px 15px;
  box-shadow: 0 14px 36px rgba(15,23,42,.18);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .18s ease;
}

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

@media (max-width: 1180px) {
  .intel-layout,
  .workbench-grid,
  .grid.two,
  .grid.three,
  .entity-grid {
    grid-template-columns: 1fr;
  }

  .intel-sidebar {
    height: auto;
    position: static;
  }

  .page-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== Competitor Keyword Task v2002 ===== */

.keyword-task-panel {
  margin-bottom: 16px;
}

.keyword-task-toolbar {
  box-shadow: none;
  border: 0;
  border-radius: 0;
  margin-bottom: 0;
  padding: 16px 17px 8px;
}

.keyword-help {
  margin: 0 17px 16px;
  padding: 12px 13px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  line-height: 1.65;
}

.keyword-help strong {
  color: #0f172a;
}

.competitor-candidate-card .entity-card-desc {
  max-height: 220px;
  overflow: auto;
}

/* ===== Score Tooltip v2003 ===== */

.score-help-trigger {
  height: 38px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 14px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 950;
  cursor: help;
  white-space: nowrap;
}

.score-pill {
  cursor: help;
  position: relative;
  padding-right: 22px !important;
}

.score-pill::after {
  content: "?";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 13px;
  height: 13px;
  transform: translateY(-50%);
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 950;
  color: #64748b;
  background: #e2e8f0;
}

.score-pill.score-high {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.score-pill.score-mid {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.score-pill.score-low {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.score-pill.score-bad {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.score-pill.score-high::after {
  background: #bbf7d0;
  color: #047857;
}

.score-pill.score-mid::after {
  background: #bfdbfe;
  color: #1d4ed8;
}

.score-pill.score-low::after {
  background: #fde68a;
  color: #b45309;
}

.score-pill.score-bad::after {
  background: #fecdd3;
  color: #be123c;
}

.score-help-popover {
  position: fixed;
  z-index: 300;
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 14px;
  border-radius: 18px;
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease;
}

.score-help-popover.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.score-pop-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
  margin-bottom: 7px;
}

.score-pop-source {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(37, 99, 235, .22);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
}

.score-pop-desc {
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.score-help-popover ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.score-help-popover li {
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.5;
}

.score-pop-note {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, .28);
  color: #93c5fd;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .score-help-popover {
    width: calc(100vw - 32px);
  }

  .score-help-trigger {
    width: 100%;
  }
}

/* ===== Lead Pool UI Fix v2006 ===== */

.lead-toolbar-v2006 {
  align-items: center;
}

.lead-grid-v2006,
#leadsList.lead-grid-v2006 {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.lead-card-v2006 {
  background: #ffffff;
  border: 1px solid #e5edf7;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
  display: grid;
  gap: 12px;
}

.lead-card-head-v2006 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.lead-name-v2006 {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 950;
  color: #0f172a;
}

.lead-sub-v2006 {
  margin-top: 5px;
  font-size: 13px;
  color: #64748b;
  font-weight: 850;
}

.lead-level-v2006 {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.lead-level-v2006.high {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.lead-level-v2006.medium {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.lead-level-v2006.noise,
.lead-level-v2006.reject {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.lead-score-row-v2006 {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.lead-info-v2006 {
  display: grid;
  gap: 8px;
}

.lead-row-v2006 {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 15px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.lead-row-v2006 span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.lead-row-v2006 strong {
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 850;
  word-break: break-all;
}

.lead-row-v2006.has-contact {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.lead-row-v2006.has-contact strong {
  color: #047857;
}

.lead-actions-v2006 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

@media (max-width: 1180px) {
  .lead-grid-v2006,
  #leadsList.lead-grid-v2006 {
    grid-template-columns: 1fr;
  }
}

/* ===== Source Video Intel Drawer v2009 ===== */

.source-video-intel {
  display: grid;
  gap: 16px;
}

.source-score-box {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: grid;
  gap: 10px;
}

.source-score-box span {
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
}

.source-score-box strong {
  display: block;
  margin-top: 4px;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
}

.source-score-box p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 850;
}

.source-score-high {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.source-score-high strong {
  color: #047857;
}

.source-score-mid {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.source-score-mid strong {
  color: #1d4ed8;
}

.source-score-low {
  background: #fffbeb;
  border-color: #fde68a;
}

.source-score-low strong {
  color: #b45309;
}

.source-score-bad {
  background: #fff1f2;
  border-color: #fecdd3;
}

.source-score-bad strong {
  color: #be123c;
}

.source-section {
  border: 1px solid #eef2f7;
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}

.source-section h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 950;
}

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

.source-info-grid div,
.source-title-block {
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.source-info-grid label,
.source-title-block label {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 950;
  margin-bottom: 5px;
}

.source-info-grid strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  word-break: break-all;
}

.source-title-block {
  margin-top: 10px;
}

.source-title-block p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.65;
}

.source-section ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}

.source-mini-list {
  display: grid;
  gap: 10px;
}

.source-mini-card {
  padding: 11px;
  border-radius: 15px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.source-mini-title {
  font-size: 14px;
  font-weight: 950;
  margin-bottom: 7px;
}

.source-mini-text {
  margin-top: 8px;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.source-comment-list {
  display: grid;
  gap: 8px;
}

.source-comment-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.source-comment-row strong {
  font-size: 13px;
  color: #0f172a;
}

.source-comment-row span {
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

/* ===== Account Intel Drawer v2010 ===== */

.account-intel {
  display: grid;
  gap: 16px;
}

.account-post-list {
  display: grid;
  gap: 10px;
}

.account-post-card {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #eef2f7;
  background: #f8fafc;
  display: grid;
  gap: 9px;
}

.account-post-title {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 950;
}

.account-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===== Intel Task Center v2011 ===== */

.task-card-v2011 {
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
  display: grid;
  gap: 12px;
}

.task-card-head-v2011 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.task-title-v2011 {
  color: #0f172a;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 950;
}

.task-sub-v2011 {
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}

.task-status-v2011 {
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.task-status-v2011.active {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.task-status-v2011.paused {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.task-status-v2011.archived {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

.task-info-v2011 {
  display: grid;
  gap: 8px;
}

.task-info-v2011 div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.task-info-v2011 label {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 950;
}

.task-info-v2011 span {
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 850;
}

.task-actions-v2011 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===== Task Usage + Run History v2012 ===== */

.usage-panel-v2012 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.usage-card-v2012 {
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
  padding: 16px;
}

.usage-card-v2012 span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
}

.usage-card-v2012 strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
}

.usage-card-v2012 label {
  display: block;
  margin-top: 8px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 950;
}

.task-detail-v2012 {
  display: grid;
  gap: 16px;
}

.run-list-v2012 {
  display: grid;
  gap: 10px;
}

.run-row-v2012 {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: grid;
  gap: 10px;
}

.run-row-v2012.success {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.run-row-v2012.failed {
  background: #fff1f2;
  border-color: #fecdd3;
}

.run-row-v2012.blocked {
  background: #fffbeb;
  border-color: #fde68a;
}

.run-row-head-v2012 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.run-row-head-v2012 strong {
  font-size: 14px;
  font-weight: 950;
  color: #0f172a;
}

.run-row-head-v2012 span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

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

.run-row-grid-v2012 div {
  padding: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(226,232,240,.8);
}

.run-row-grid-v2012 label {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 950;
  margin-bottom: 4px;
}

.run-row-grid-v2012 b {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  word-break: break-all;
}

.run-message-v2012 {
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 850;
}

.candidate-preview-v2012 {
  display: grid;
  gap: 10px;
}

.candidate-card-v2012 {
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.candidate-title-v2012 {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
  margin-bottom: 8px;
}

.candidate-card-v2012 p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .usage-panel-v2012 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .usage-panel-v2012 {
    grid-template-columns: 1fr;
  }

  .run-row-grid-v2012 {
    grid-template-columns: 1fr;
  }
}

/* ===== Intel Quota Config v2013 ===== */

.quota-form-v2013 {
  padding: 16px 17px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.quota-form-v2013 label {
  display: grid;
  gap: 7px;
}

.quota-form-v2013 span {
  color: #475569;
  font-size: 12px;
  font-weight: 950;
}

.quota-form-v2013 input {
  width: 100%;
}

@media (max-width: 1180px) {
  .quota-form-v2013 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .quota-form-v2013 {
    grid-template-columns: 1fr;
  }
}

/* ===== Intel Rules Center v2014 ===== */

.rules-grid-v2014 {
  padding: 16px 17px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rules-grid-v2014 label {
  display: grid;
  gap: 7px;
}

.rules-grid-v2014 span {
  color: #475569;
  font-size: 12px;
  font-weight: 950;
}

.rules-grid-v2014 textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid #d7e2f0;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  padding: 12px;
  outline: none;
  font-size: 13px;
  line-height: 1.65;
  font-family: inherit;
}

.rules-grid-v2014 .mono-area {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  min-height: 160px;
}

.rules-note-v2014 {
  margin: 14px 17px 0;
  padding: 12px 13px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 850;
}

@media (max-width: 900px) {
  .rules-grid-v2014 {
    grid-template-columns: 1fr;
  }
}

/* ===== Comment Rule Leads Frontend v2015 ===== */

.comment-rule-action-v2015 {
  width: 100%;
  margin-top: 10px;
}

.comment-rule-action-inner-v2015 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #bfdbfe;
  border-radius: 18px;
  background: #eff6ff;
}

.comment-rule-action-inner-v2015 span {
  color: #1e40af;
  font-size: 12px;
  font-weight: 900;
}

.comment-rule-limit-v2015 {
  width: 92px;
}

.comment-rule-result-v2015 {
  display: grid;
  gap: 16px;
}

.comment-rule-stat-grid-v2015 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.comment-rule-stat-grid-v2015 div {
  border: 1px solid #e5edf7;
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px;
}

.comment-rule-stat-grid-v2015 span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
}

.comment-rule-stat-grid-v2015 strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
}

.comment-rule-list-v2015 {
  display: grid;
  gap: 10px;
}

.comment-rule-item-v2015 {
  border-radius: 16px;
  border: 1px solid #e5edf7;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.comment-rule-item-v2015.accepted {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.comment-rule-item-v2015.rejected {
  background: #fff7ed;
  border-color: #fed7aa;
}

.comment-rule-head-v2015 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.comment-rule-head-v2015 strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
}

.comment-rule-head-v2015 span {
  color: #475569;
  font-size: 12px;
  font-weight: 950;
}

.comment-rule-item-v2015 p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 850;
}

.comment-rule-item-v2015 small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 800;
}

@media (max-width: 900px) {
  .comment-rule-stat-grid-v2015 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .comment-rule-stat-grid-v2015 {
    grid-template-columns: 1fr;
  }

  .comment-rule-action-inner-v2015 {
    align-items: stretch;
  }
}

/* ===== LLM Lead Review Frontend v2016 ===== */

.llm-review-action-v2016 {
  width: 100%;
  margin-top: 10px;
}

.llm-review-action-inner-v2016 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #c4b5fd;
  border-radius: 18px;
  background: #f5f3ff;
}

.llm-review-action-inner-v2016 label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.llm-review-action-inner-v2016 label span {
  color: #5b21b6;
  font-size: 12px;
  font-weight: 950;
}

.llm-review-action-inner-v2016 input {
  width: 76px;
}

.llm-review-action-inner-v2016 small {
  color: #5b21b6;
  font-size: 12px;
  font-weight: 850;
}

.llm-review-result-v2016 {
  display: grid;
  gap: 16px;
}

.llm-review-stat-grid-v2016 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.llm-review-stat-grid-v2016 div {
  border: 1px solid #e5edf7;
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px;
}

.llm-review-stat-grid-v2016 span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
}

.llm-review-stat-grid-v2016 strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 950;
}

.llm-review-stat-grid-v2016 strong.small {
  font-size: 12px;
  line-height: 1.4;
  word-break: break-all;
}

.llm-review-list-v2016 {
  display: grid;
  gap: 12px;
}

.llm-review-item-v2016 {
  border-radius: 18px;
  border: 1px solid #e5edf7;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.llm-review-item-v2016.high {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.llm-review-item-v2016.medium {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.llm-review-item-v2016.low {
  background: #f8fafc;
}

.llm-review-item-v2016.reject {
  background: #fff7ed;
  border-color: #fed7aa;
}

.llm-review-head-v2016 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.llm-review-head-v2016 strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
}

.llm-review-head-v2016 span {
  color: #475569;
  font-size: 12px;
  font-weight: 950;
  text-align: right;
}

.llm-review-item-v2016 .comment {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.55;
}

.llm-review-item-v2016 .video {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.5;
}

.llm-review-tags-v2016 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.llm-review-tags-v2016 span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid #dbeafe;
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 900;
}

.llm-review-block-v2016 {
  border-radius: 14px;
  border: 1px solid #e5edf7;
  background: rgba(255,255,255,.72);
  padding: 10px;
}

.llm-review-block-v2016.highlight {
  border-color: #c4b5fd;
  background: #faf5ff;
}

.llm-review-block-v2016.error {
  border-color: #fecaca;
  background: #fff1f2;
}

.llm-review-block-v2016 label {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  margin-bottom: 5px;
}

.llm-review-block-v2016 p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 850;
}

@media (max-width: 900px) {
  .llm-review-stat-grid-v2016 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .llm-review-head-v2016 {
    flex-direction: column;
  }

  .llm-review-head-v2016 span {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .llm-review-stat-grid-v2016 {
    grid-template-columns: 1fr;
  }

  .llm-review-action-inner-v2016 {
    align-items: stretch;
  }
}

/* ===== platform task access tab v2019 ===== */
.platform-tab.connected {
  opacity: 1 !important;
  cursor: pointer !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border-color: #dbe5f1 !important;
}

.platform-tab.connected:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

/* ===== social intel detail polish v3502 ===== */
body.social-intel-polished {
  overflow-x: hidden;
}

/* 顶部平台切换：禁止换行，避免“小红书任务”变成竖排 */
.platform-tabs {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  padding: 6px !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.9) !important;
  border: 1px solid #e5edf7 !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.05) !important;
  overflow: visible !important;
}

.platform-tab,
.platform-tab-link {
  height: 42px !important;
  min-width: auto !important;
  padding: 0 18px !important;
  border-radius: 16px !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  line-height: 42px !important;
  flex: 0 0 auto !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
}

.platform-tab.connected,
.platform-tab[data-platform="xhs"],
.platform-tab[data-platform="shipinhao"] {
  opacity: 1 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.platform-tab.is-current,
.platform-tab.connected.is-current {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(37,99,235,.22) !important;
}

/* 当前平台提示条：变成紧凑横向状态条 */
.social-platform-status {
  width: auto !important;
  max-width: 720px !important;
  min-width: 360px !important;
  min-height: 42px !important;
  margin: 0 12px !important;
  padding: 8px 12px !important;
  border-radius: 18px !important;
  flex: 1 1 420px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  background: rgba(255,255,255,.92) !important;
  border: 1px solid #e5edf7 !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.05) !important;
}

.social-platform-status > div {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.social-platform-status strong {
  white-space: nowrap !important;
  font-size: 14px !important;
}

.social-platform-status span {
  min-width: 0 !important;
  max-width: 380px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 13px !important;
}

#socialPlatformStatusBadge {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
}

/* 顶部右侧按钮：禁止变窄换行 */
header button,
header a,
.topbar button,
.topbar a,
.app-header button,
.app-header a,
.header-actions button,
.header-actions a,
.top-actions button,
.top-actions a,
.nav-actions button,
.nav-actions a {
  white-space: nowrap !important;
  word-break: keep-all !important;
  writing-mode: horizontal-tb !important;
}

.header-actions button,
.top-actions button,
.nav-actions button,
.toolbar button {
  min-width: 74px !important;
}

/* 卡片细节：更轻、更干净 */
body.social-intel-polished .card,
body.social-intel-polished .panel,
body.social-intel-polished .section-card,
body.social-intel-polished .dashboard-card {
  border-color: #e5edf7 !important;
  box-shadow: 0 12px 34px rgba(15,23,42,.055) !important;
}

/* 内容区间距微调 */
body.social-intel-polished main {
  scroll-behavior: smooth;
}

/* 移动端避免顶部挤爆 */
@media (max-width: 980px) {
  .social-platform-status {
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 0 !important;
  }

  .social-platform-status > div {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
  }

  .social-platform-status span {
    max-width: 100% !important;
  }

  .platform-tabs {
    max-width: 100% !important;
    overflow-x: auto !important;
  }
}

/* ===== social content pool v3503 ===== */
.social-content-pool {
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 22px;
  background: rgba(255,255,255,.96);
  border: 1px solid #e5edf7;
  border-radius: 22px;
  box-shadow: 0 14px 40px rgba(15,23,42,.07);
  overflow: hidden;
}

.social-content-head {
  padding: 16px 18px;
  border-bottom: 1px solid #e5edf7;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.social-content-head h2 {
  margin: 0;
  font-size: 20px;
  color: #0f172a;
}

.social-content-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 760;
}

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

.social-content-actions input,
.social-content-actions select {
  height: 36px;
  border: 1px solid #dbe5f1;
  border-radius: 11px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 850;
  outline: none;
  background: #fff;
}

.social-content-actions button {
  height: 36px;
  border: 0;
  border-radius: 11px;
  padding: 0 12px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.social-content-actions button.secondary {
  background: #fff;
  color: #0f172a;
  border: 1px solid #dbe5f1;
}

.social-content-stats {
  padding: 12px 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid #e5edf7;
  background: #f8fafc;
}

.social-content-stat {
  padding: 8px 11px;
  border: 1px solid #e5edf7;
  border-radius: 14px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.social-content-list {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.social-content-item {
  border: 1px solid #e5edf7;
  border-radius: 18px;
  background: #fff;
  padding: 13px 14px;
  display: grid;
  gap: 8px;
}

.social-content-item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.social-content-title {
  font-size: 15px;
  font-weight: 950;
  color: #0f172a;
  line-height: 1.45;
}

.social-content-meta {
  color: #64748b;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.55;
}

.social-content-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.social-content-metric {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.social-content-platform {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.social-content-empty {
  padding: 22px;
  text-align: center;
  color: #64748b;
  font-weight: 850;
}

@media (max-width: 900px) {
  .social-content-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-content-actions {
    width: 100%;
  }

  .social-content-actions input,
  .social-content-actions select,
  .social-content-actions button {
    flex: 1 1 auto;
  }
}

/* ===== social content pool layout fix v3504 ===== */
html,
body {
  max-width: 100%;
  overflow-x: hidden !important;
}

.social-content-pool {
  position: relative !important;
  width: auto !important;
  max-width: none !important;
  margin: 14px 0 18px !important;
  border-radius: 20px !important;
  z-index: 1 !important;
  grid-column: 1 / -1 !important;
  flex: 0 0 auto !important;
  align-self: stretch !important;
}

body > .social-content-pool {
  width: min(1180px, calc(100% - 32px)) !important;
  margin: 16px auto 22px !important;
}

.social-content-head {
  padding: 14px 16px !important;
  align-items: center !important;
}

.social-content-actions {
  flex-wrap: nowrap !important;
}

.social-content-actions input,
.social-content-actions select {
  width: auto !important;
  min-width: 92px !important;
}

#socialContentKeyword {
  width: 130px !important;
}

#socialContentMinComments {
  width: 88px !important;
}

.social-content-pool-collapsed .social-content-list {
  display: none !important;
}

.social-content-pool-collapsed .social-content-stats {
  border-bottom: 0 !important;
}

.social-content-list {
  max-height: 420px !important;
  overflow: auto !important;
}

.social-content-item {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 14px !important;
}

.social-content-main {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.social-content-title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.social-content-metrics {
  flex: 0 0 auto !important;
  justify-content: flex-end !important;
}

.social-content-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%,20px);
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
  z-index: 99999;
}

.social-content-toast.show {
  opacity: 1;
  transform: translate(-50%,0);
}

@media (max-width: 980px) {
  .social-content-head {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .social-content-actions {
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  .social-content-actions input,
  .social-content-actions select,
  .social-content-actions button {
    flex: 1 1 auto !important;
  }

  .social-content-item {
    flex-direction: column !important;
  }

  .social-content-title {
    white-space: normal !important;
  }
}
