:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --nav: #061322;
  --nav-2: #082033;
  --ink: #172033;
  --muted: #687385;
  --faint: #98a3b3;
  --line: #dfe6ee;
  --line-soft: #edf2f6;
  --teal: #0aa99d;
  --teal-dark: #087e76;
  --teal-soft: #ddf7f4;
  --amber: #f1a208;
  --amber-soft: #fff2cf;
  --blue: #2d7ff0;
  --blue-soft: #eaf2ff;
  --green: #2faa62;
  --green-soft: #e8f7ef;
  --red: #ef4444;
  --red-soft: #feecec;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  --radius: 8px;
  --sidebar-width: 224px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(10, 169, 157, 0.45);
  outline-offset: 2px;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

strong {
  font-weight: 500;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

.app-shell.sidebar-collapsed {
  --sidebar-width: 72px;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 12px;
  color: #d7e5ef;
  background:
    radial-gradient(circle at 30% 10%, rgba(0, 210, 196, 0.16), transparent 32%),
    linear-gradient(180deg, var(--nav-2), #030b14);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 3px 24px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: #0ee0d3;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: #ffffff;
  font-size: 21px;
  font-weight: 560;
  line-height: 1.08;
}

.brand span {
  margin-top: 4px;
  color: #8fa4b7;
  font-size: 11px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  color: #b7c7d6;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
}

.nav-item span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 440;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
  color: #35eadb;
  background: linear-gradient(90deg, rgba(0, 169, 157, 0.25), rgba(0, 169, 157, 0.1));
  border-color: rgba(53, 234, 219, 0.18);
}

.sidebar-note {
  position: absolute;
  right: 12px;
  bottom: 14px;
  left: 12px;
  padding: 14px;
  background: rgba(3, 14, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.sidebar-note span,
.sidebar-note strong {
  display: block;
}

.sidebar-note span {
  color: #8fa4b7;
  font-size: 12px;
}

.sidebar-note strong {
  margin-top: 7px;
  color: #f2f8fb;
  font-size: 13px;
}

.sidebar-note hr {
  height: 1px;
  margin: 13px 0;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
}

.app-shell.sidebar-collapsed .brand {
  justify-content: center;
  padding-right: 0;
  padding-left: 0;
}

.app-shell.sidebar-collapsed .brand > div:not(.brand-mark),
.app-shell.sidebar-collapsed .nav-item span,
.app-shell.sidebar-collapsed .sidebar-note {
  display: none;
}

.app-shell.sidebar-collapsed .nav-item {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

.workspace {
  min-width: 0;
  padding: 0 18px 26px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  background: rgba(245, 247, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-right,
.control-row,
.button-row,
.inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-left {
  min-width: 0;
  flex: 1;
}

.icon-btn,
.ghost-btn,
.primary-btn,
.select-control,
.date-control,
.search-control {
  min-height: 34px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  padding: 0;
}

.icon-btn b {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  color: #fff;
  background: var(--red);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 450;
}

.ghost-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 450;
  white-space: nowrap;
}

.ghost-btn {
  color: var(--teal-dark);
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(180deg, #0db9ad, #078e84);
  border-color: #078e84;
}

.search-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 40vw);
  padding: 0 12px;
  color: var(--muted);
}

.search-control input {
  width: 100%;
  min-width: 0;
  height: 32px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.date-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 142px;
  padding: 0 34px 0 11px;
}

.date-control input {
  width: 100%;
  color: #536070;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}

.date-control svg {
  position: absolute;
  right: 10px;
  color: var(--muted);
  pointer-events: none;
}

.select-control {
  min-width: 120px;
  padding: 0 10px;
  color: #536070;
  outline: 0;
  font-size: 13px;
}

.live-pill,
.tag,
.score-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 450;
  white-space: nowrap;
}

.live-pill {
  min-height: 34px;
  color: var(--teal-dark);
  background: #ffffff;
  border: 1px solid var(--line);
}

.live-pill i {
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(10, 169, 157, 0.12);
}

.operator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  cursor: pointer;
}

.operator span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: #0b1728;
  border-radius: 50%;
}

.operator strong {
  font-size: 13px;
}

.view {
  display: none;
  padding-top: 14px;
}

.view.active {
  display: block;
}

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

.page-title h1 {
  margin: 0;
  color: #172033;
  font-size: 24px;
  line-height: 1.2;
}

.page-title p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.metric-strip,
.idea-grid,
.card-grid,
.source-grid {
  display: grid;
  gap: 12px;
}

.metric-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.metric-card,
.panel,
.idea-card,
.mini-card,
.report-page {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  min-height: 96px;
  padding: 15px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: var(--teal);
  border-radius: 50%;
}

.metric-card h3 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 450;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 24px;
  font-weight: 560;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

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

.layout-3 {
  display: grid;
  grid-template-columns: 1.1fr 1fr 330px;
  gap: 12px;
  align-items: start;
}

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

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-head h2 {
  margin: 0;
  color: #202a3a;
  font-size: 16px;
  font-weight: 520;
}

.panel-head p,
.panel-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.panel-body {
  padding: 14px 16px 16px;
}

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

.idea-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.idea-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.idea-card.selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(10, 169, 157, 0.12), var(--shadow);
}

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

.idea-card h3,
.mini-card h3 {
  margin: 0;
  color: #182233;
  font-size: 15px;
  font-weight: 520;
  line-height: 1.35;
}

.idea-card p,
.mini-card p {
  margin: 0;
  color: #526071;
  font-size: 12px;
  line-height: 1.55;
}

.tag {
  color: #475569;
  background: #edf2f7;
}

.tag.teal { color: var(--teal-dark); background: var(--teal-soft); }
.tag.amber { color: #875a00; background: var(--amber-soft); }
.tag.blue { color: #1556a7; background: var(--blue-soft); }
.tag.green { color: #11663a; background: var(--green-soft); }
.tag.red { color: #b42318; background: var(--red-soft); }

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

.score-pill {
  color: #fff;
  background: #172033;
}

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

.info-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #344054;
  font-size: 13px;
}

.info-row span:first-child {
  color: var(--muted);
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  color: #5b6676;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 450;
  white-space: nowrap;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #fbfcfd;
}

.selected-row {
  background: #f0faf8;
}

.platform-badges,
.platform-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.platform-badge {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  overflow: hidden;
  background: #111827;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.platform-logo-svg {
  width: 20px;
  height: 20px;
}

.platform-logo-svg * {
  stroke: none;
}

.douyin-logo path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.8;
}

.douyin-logo .dy-cyan { stroke: #25f4ee; transform: translate(-1px, 1px); }
.douyin-logo .dy-red { stroke: #fe2c55; transform: translate(1px, -1px); }
.douyin-logo .dy-white { stroke: #ffffff; }
.weibo-badge { background: #fff; }
.weibo-logo .wb-red { fill: #e6162d; }
.weibo-logo .wb-white { fill: #fff; }
.weibo-logo .wb-black { fill: #171717; }
.weibo-logo .wb-orange { fill: none; stroke: #ffb000; stroke-width: 1.6; stroke-linecap: round; }
.xhs-badge { background: #ff2442; }
.xhs-logo rect { fill: #ff2442; }
.xhs-logo text {
  fill: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 6px;
  font-weight: 450;
  text-anchor: middle;
  dominant-baseline: middle;
}
.bili-badge { background: #00a1d6; }
.ks-badge { background: #ff5b00; }
.kawo-badge {
  width: 34px;
  background: #111827;
}
.kawo-badge .platform-logo-svg {
  width: 34px;
}
.bili-logo .screen,
.ks-logo .mark,
.kawo-logo .mark {
  fill: #fff;
}
.bili-logo .antenna {
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.bili-logo .face {
  fill: #00a1d6;
}
.ks-logo .hole {
  fill: #ff5b00;
}
.kawo-logo text {
  fill: #fff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 7px;
  font-weight: 520;
  letter-spacing: 0;
  text-anchor: middle;
  dominant-baseline: middle;
}
.plain-platform {
  color: #fff;
  font-size: 9px;
  font-weight: 520;
}

.bar {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
  min-height: 28px;
  color: #475569;
  font-size: 12px;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  background: #e8eef5;
  border-radius: 99px;
}

.bar-fill {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.line-chart,
.matrix,
.quadrant,
.timeline {
  min-height: 220px;
}

.line-chart svg,
.matrix svg,
.quadrant svg,
.timeline svg {
  width: 100%;
  height: 220px;
}

.mini-card {
  padding: 13px;
}

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

.source-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.framework-card {
  padding: 13px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.framework-card.active {
  background: var(--teal-soft);
  border-color: rgba(10, 169, 157, 0.35);
}

.framework-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 520;
}

.framework-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.asset-thumb {
  display: grid;
  place-items: center;
  width: 52px;
  height: 34px;
  color: #fff;
  background: linear-gradient(135deg, #0b1728, #0aa99d);
  border-radius: 6px;
  font-size: 11px;
}

.asset-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.status-pill.ready { color: var(--teal-dark); background: var(--teal-soft); }
.status-pill.pending { color: #8a5b00; background: var(--amber-soft); }
.status-pill.risk { color: #b42318; background: var(--red-soft); }

.check-list {
  display: grid;
  gap: 9px;
}

.check-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: #445064;
  font-size: 13px;
}

.check-item svg {
  color: var(--teal);
}

.report-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}

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

.report-item {
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  cursor: pointer;
}

.report-item.selected {
  border-color: var(--teal);
  box-shadow: inset 3px 0 0 var(--teal);
}

.report-item strong,
.report-item span {
  display: block;
}

.report-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.report-page {
  padding: 22px;
  line-height: 1.7;
}

.report-page h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 560;
}

.report-page h3 {
  margin: 22px 0 8px;
  font-size: 16px;
  font-weight: 520;
}

.report-page p,
.report-page li {
  color: #45566c;
  font-size: 13px;
}

.brief-idea {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}

.num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff;
  background: var(--teal);
  border-radius: 5px;
  font-size: 12px;
}

.inspector {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  width: min(460px, 94vw);
  height: 100vh;
  padding: 22px;
  overflow: auto;
  background: #ffffff;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 60px rgba(15, 23, 42, 0.14);
  transform: translateX(105%);
  transition: transform 180ms ease;
}

.inspector.open {
  transform: translateX(0);
}

.drawer-close {
  float: right;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.inspector h2 {
  margin: 20px 0 8px;
  font-size: 21px;
  font-weight: 560;
}

.inspector h3 {
  margin: 18px 0 8px;
  font-size: 15px;
  font-weight: 520;
}

.inspector p {
  color: #4b5c72;
  font-size: 13px;
  line-height: 1.65;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 14px;
  color: #fff;
  background: #172033;
  border-radius: 6px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

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

@media (max-width: 1500px) {
  .idea-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .layout-2,
  .layout-3,
  .report-shell {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .idea-grid.compact,
  .card-grid,
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: span 12;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
  }

  .brand {
    padding-bottom: 10px;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-note {
    display: none;
  }

  .workspace {
    padding: 0 12px 20px;
  }

  .topbar {
    position: static;
    flex-wrap: wrap;
    padding: 8px 0;
  }

  .topbar-left,
  .topbar-right {
    flex-wrap: wrap;
    width: 100%;
  }

  .search-control {
    width: 100%;
  }

  .metric-strip,
  .idea-grid,
  .idea-grid.compact,
  .card-grid,
  .source-grid,
  .framework-grid {
    grid-template-columns: 1fr;
  }

  .page-head {
    flex-direction: column;
  }
}

/* Pixel-oriented dashboard restyle */
:root {
  --bg: #f4f7fb;
  --panel: #fff;
  --nav: #041221;
  --nav-2: #062033;
  --ink: #1f2937;
  --muted: #697586;
  --line: #dfe7ef;
  --line-soft: #eef3f7;
  --teal: #0aa99d;
  --teal-dark: #078f86;
  --teal-soft: #dff8f5;
  --red: #ff3b30;
  --orange: #ff7a00;
  --yellow: #f6b100;
  --green: #5bbf47;
  --blue: #2f80ed;
  --spark-red: #ff3b30;
  --spark-orange: #ff7a00;
  --spark-yellow: #f6b100;
  --spark-green: #5bbf47;
  --shadow: 0 2px 8px rgba(15, 23, 42, .035);
  --sidebar-width: 214px;
}

html,
body {
  background: var(--bg);
}

svg {
  stroke-width: 1.75;
}

.app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  padding: 16px 8px;
  background:
    radial-gradient(circle at 38px 30px, rgba(0, 190, 176, .24), transparent 52px),
    linear-gradient(180deg, #071827 0%, #03101d 100%);
}

.brand {
  gap: 10px;
  padding: 0 8px 20px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-width: 2px;
}

.brand strong {
  font-size: 19px;
  font-weight: 560;
}

.brand span {
  margin-top: 2px;
  font-size: 11px;
}

.nav-list {
  gap: 10px;
}

.nav-item {
  min-height: 42px;
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 0 12px;
  color: #b9c8d6;
  border-radius: 5px;
}

.nav-item.active {
  color: #28e0d2;
  background: linear-gradient(90deg, rgba(0, 169, 157, .38), rgba(0, 169, 157, .18));
  border-color: rgba(44, 230, 218, .18);
}

.sidebar-note {
  right: 12px;
  bottom: 14px;
  left: 12px;
  padding: 16px;
  background: rgba(4, 18, 31, .82);
}

.workspace {
  padding: 0 16px 22px;
}

.topbar {
  min-height: 58px;
  gap: 10px;
  background: rgba(255, 255, 255, .92);
}

.search-control {
  width: 360px;
  min-height: 34px;
}

.date-control {
  width: 136px;
}

.select-control {
  min-width: 118px;
}

.icon-btn,
.ghost-btn,
.primary-btn,
.select-control,
.date-control,
.search-control,
.live-pill {
  border-color: #d9e2ec;
  border-radius: 5px;
}

.primary-btn {
  background: linear-gradient(180deg, #0db7ab, #079489);
}

.view {
  padding-top: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px 250px;
  grid-template-areas:
    "kpi kpi preview"
    "table health preview"
    "table warning preview"
    "chart donut preview";
  gap: 12px;
}

.kpi-row {
  grid-area: kpi;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  min-height: 100px;
  grid-template-columns: 50px minmax(0, 1fr);
  padding: 16px 14px;
  border-color: #dce5ee;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.metric-icon {
  width: 46px;
  height: 46px;
  color: #fff;
}

.kpi-teal .metric-icon { background: #18b2a8; }
.kpi-green .metric-icon { background: #5bbf47; }
.kpi-orange .metric-icon { background: #ff6d1a; }
.kpi-blue .metric-icon,
.kpi-blue-soft .metric-icon { background: #2f80ed; }
.kpi-yellow .metric-icon { background: #f4b01b; }

.metric-card h3 {
  font-size: 13px;
}

.metric-card strong {
  margin-top: 7px;
  font-size: 23px;
  font-weight: 560;
}

.metric-card small {
  margin-top: 8px;
  font-size: 12px;
}

.up { color: var(--red); }
.down { color: var(--teal); }

.panel {
  border: 1px solid #dce5ee;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.trend-panel {
  grid-area: table;
}

.health-panel {
  grid-area: health;
}

.warning-panel {
  grid-area: warning;
}

.chart-panel {
  grid-area: chart;
}

.donut-panel {
  grid-area: donut;
}

.report-preview {
  grid-area: preview;
  align-self: stretch;
  background: #fff;
  border-left: 1px solid #dce5ee;
  box-shadow: -8px 0 26px rgba(15, 23, 42, .06);
}

.panel-title,
.tabbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-title h2,
.tabbar h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 560;
}

.panel-title button,
.toolset button,
.small-select {
  height: 30px;
  padding: 0 10px;
  color: #526071;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 4px;
  font-size: 12px;
}

.tabs,
.toolset {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab {
  height: 32px;
  padding: 0 8px;
  color: #49576a;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 13px;
}

.tab.active {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
}

.square-btn,
.icon-only {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #64748b;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 4px;
}

th,
td {
  padding: 8px 9px;
  font-size: 12px;
  border-bottom-color: #edf2f7;
}

th {
  color: #667085;
  background: #f7f9fb;
}

tbody tr:hover,
.selected-row {
  background: #f2fbf9;
}

.rank {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #fff;
  background: #9aa6b2;
  border-radius: 4px;
  font-size: 11px;
}

.r1 { background: #f04b23; }
.r2 { background: #ff7a00; }
.r3 { background: #f6b100; }

.hot-mark {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-left: 5px;
  color: #ef4444;
  border: 1px solid #ef4444;
  border-radius: 3px;
  font-size: 10px;
}

.platform-badges {
  gap: 4px;
}

.platform-badge {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.brand-logo {
  display: block;
  width: 14px;
  height: 14px;
  background: #fff;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.logo-douyin {
  background: #111827;
}

.logo-weibo {
  background: #fff;
  border: 1px solid #f0c2c2;
}

.logo-weibo .brand-logo {
  width: 15px;
  height: 15px;
  background: #e6162d;
}

.logo-xiaohongshu,
.logo-xhs {
  background: #ff2442;
}

.logo-bilibili {
  background: #00a1d6;
}

.logo-kuaishou {
  background: #ff5b00;
}

.logo-zhihu {
  background: #111827;
}

.logo-sph,
.logo-wechat {
  background: #07c160;
}

.internal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-areas:
    "kpi kpi"
    "platforms ranking"
    "monthly type"
    "posts labels";
  gap: 12px;
}

.internal-kpis {
  grid-area: kpi;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.internal-platforms { grid-area: platforms; }
.internal-ranking { grid-area: ranking; }
.internal-type { grid-area: type; }
.internal-monthly { grid-area: monthly; }
.internal-labels { grid-area: labels; }
.internal-posts { grid-area: posts; }

.internal-error {
  padding-bottom: 18px;
}

.internal-error p {
  margin: 16px;
  color: #526071;
  font-size: 13px;
}

.internal-bars,
.internal-label-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.internal-bars div,
.internal-label-list p {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: center;
  margin: 0;
  font-size: 12px;
}

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

.internal-bars i,
.internal-label-list i {
  height: 7px;
  overflow: hidden;
  background: #e6edf4;
  border-radius: 99px;
}

.internal-bars i b,
.internal-label-list i b {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.internal-bars strong,
.internal-label-list strong {
  color: #263244;
  font-weight: 500;
  text-align: right;
}

.monthly-chart {
  padding: 14px;
}

.monthly-chart svg {
  width: 100%;
  height: 260px;
}

.coverage-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.coverage-cards span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 10px;
  background: #f7f9fb;
  border: 1px solid #e5ebf2;
  border-radius: 6px;
  color: #526071;
  font-size: 12px;
}

.coverage-cards b {
  color: #111827;
  font-size: 18px;
}

.truncate-cell {
  max-width: 440px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1500px) {
  .internal-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .internal-grid {
    display: block;
  }

  .internal-kpis {
    grid-template-columns: 1fr;
    margin-bottom: 12px;
  }
}

/* ===== 内部数据 · v2 ===== */
.internal-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.internal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  border: 1px solid #e5ebf2;
  border-radius: 10px;
}

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

.internal-tab {
  border: 1px solid transparent;
  background: #eef2f6;
  color: #475569;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s ease;
}

.internal-tab:hover {
  background: #e2e8f0;
}

.internal-tab.active {
  background: var(--teal, #00a99d);
  color: #fff;
  border-color: var(--teal, #00a99d);
  box-shadow: 0 4px 12px rgba(0, 169, 157, .25);
}

.internal-filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  max-width: 60%;
  justify-content: flex-end;
}

.filter-tag {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #d1fae5;
  padding: 2px 8px;
  border-radius: 99px;
}

.filter-tag.muted {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
}

.internal-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(120px, 1fr)) auto;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e5ebf2;
  border-radius: 10px;
  align-items: end;
}

.internal-filter-bar .chips-field {
  grid-column: 1 / -1;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  min-width: 0;
}

.filter-field.grow {
  min-width: 240px;
}

.filter-field > span {
  font-weight: 500;
}

.filter-field input,
.filter-field select {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  background: #fff;
  color: #0f172a;
  height: 32px;
  box-sizing: border-box;
}

.filter-field input:focus,
.filter-field select:focus {
  outline: none;
  border-color: var(--teal, #00a99d);
  box-shadow: 0 0 0 3px rgba(0, 169, 157, .15);
}

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

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s ease;
}

.filter-chip em {
  font-style: normal;
}

.filter-chip:hover {
  background: #f1f5f9;
}

.filter-chip.on {
  background: rgba(0, 169, 157, .12);
  border-color: var(--teal, #00a99d);
  color: var(--teal, #00a99d);
  font-weight: 500;
}

.filter-actions {
  display: flex;
  align-items: end;
  gap: 6px;
}

.muted-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

/* 概览 */
.internal-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "kpi kpi"
    "platforms ranking"
    "type monthly"
    "calendar radar";
  gap: 12px;
}

.internal-overview-grid .internal-kpis { grid-area: kpi; }
.internal-overview-grid .internal-platforms { grid-area: platforms; }
.internal-overview-grid .internal-ranking { grid-area: ranking; }
.internal-overview-grid .internal-type { grid-area: type; }
.internal-overview-grid .internal-monthly { grid-area: monthly; }
.internal-overview-grid .internal-calendar { grid-area: calendar; }
.internal-overview-grid .internal-radar { grid-area: radar; }

/* 内容浏览器 */
.browser-meta {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  color: #64748b;
  font-size: 13px;
}

.browser-meta b {
  color: #0f172a;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.post-card {
  border: 1px solid #e5ebf2;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}

.post-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
  overflow: hidden;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-cover img.img-error {
  opacity: 0;
}

.post-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 28px;
  background: linear-gradient(135deg, #f8fafc, #eef2f6);
}

.video-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: .5px;
}

.post-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.post-title {
  margin: 0;
  font-size: 13px;
  color: #0f172a;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-types {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ct-pill {
  background: #eef2f6;
  color: #475569;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
}

.post-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #64748b;
  margin-top: auto;
}

.internal-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 12px 0 8px;
  flex-wrap: wrap;
}

.internal-pagination button,
.internal-pagination .ellipsis {
  min-width: 30px;
  height: 30px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.internal-pagination button:hover:not(:disabled) {
  background: #f1f5f9;
}

.internal-pagination button:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.internal-pagination button.active {
  background: var(--teal, #00a99d);
  border-color: var(--teal, #00a99d);
  color: #fff;
}

.internal-pagination .ellipsis {
  border: none;
  background: transparent;
}

/* 素材瀑布流 */
.masonry {
  column-count: 4;
  column-gap: 12px;
}

@media (max-width: 1400px) { .masonry { column-count: 3; } }
@media (max-width: 960px)  { .masonry { column-count: 2; } }
@media (max-width: 640px)  { .masonry { column-count: 1; } }

.masonry-item {
  break-inside: avoid;
  margin: 0 0 12px;
  border: 1px solid #e5ebf2;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.masonry-item:hover {
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.masonry-media img,
.masonry-media video {
  width: 100%;
  height: auto;
  display: block;
}

.masonry-media img.img-error {
  display: none;
}

.media-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 38px 16px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #f8fafc;
}

.media-link a {
  color: #5eead4;
  text-decoration: underline;
  font-size: 13px;
}

.video-emoji {
  font-size: 22px;
}

.masonry-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 0;
  font-size: 11px;
}

.masonry-caption {
  margin: 4px 10px 10px;
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 标签视图 */
.label-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
}

.label-groups {
  background: #fff;
  border: 1px solid #e5ebf2;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.label-groups h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #475569;
}

.label-group-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #334155;
}

.label-group-btn:hover {
  background: #f1f5f9;
}

.label-group-btn.active {
  background: rgba(0, 169, 157, .1);
  color: var(--teal, #00a99d);
  border-color: rgba(0, 169, 157, .35);
}

.label-group-btn em {
  font-style: normal;
  color: #94a3b8;
  font-size: 12px;
}

.cloud-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
  align-items: center;
}

.cloud-item {
  border: 1px solid #e5ebf2;
  background: #fff;
  border-radius: 99px;
  padding: 4px 12px;
  cursor: pointer;
  color: #0f172a;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  transition: transform .15s ease;
}

.cloud-item:hover {
  transform: scale(1.05);
  border-color: var(--teal, #00a99d);
  color: var(--teal, #00a99d);
}

.cloud-item small {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 400;
}

/* 指标洞察 */
.insights-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 12px;
}

.top-post-card {
  border: 1px solid #e5ebf2;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.top-post-card:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
}

.top-post-cover {
  aspect-ratio: 16 / 10;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  overflow: hidden;
}

.top-post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-post-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.top-post-body p {
  margin: 0;
  font-size: 12px;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 日历热力 */
.heatmap-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.heatmap-svg {
  width: 100%;
  height: auto;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #64748b;
}

.heatmap-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* 雷达 */
.radar-wrap {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 12px;
  align-items: center;
}

.radar-wrap svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

.radar-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #475569;
}

.radar-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

/* 空状态 */
.empty-state {
  padding: 28px;
  text-align: center;
  color: #64748b;
}

/* Inspector 详情抽屉 */
.inspector-loading {
  padding: 40px;
  text-align: center;
  color: #64748b;
}

.inspector-head {
  border-bottom: 1px solid #e5ebf2;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.inspector-platform {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.inspector-head h2 {
  margin: 0;
  font-size: 17px;
  color: #0f172a;
  line-height: 1.4;
}

.inspector-content-types {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.inspector-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.inspector-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: #f1f5f9;
}

.inspector-gallery img.img-error {
  display: none;
}

.inspector-videos {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.inspector-videos video {
  width: 100%;
  max-height: 320px;
  background: #000;
  border-radius: 6px;
}

.video-link-btn {
  display: inline-block;
  padding: 8px 14px;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  text-align: center;
}

.video-link-btn:hover {
  background: #1e293b;
}

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

.inspector-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.inspector-body {
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.inspector-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inspector-links .ghost-btn {
  font-size: 12px;
}

.inspector-metrics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.inspector-metrics-table tr {
  border-bottom: 1px dashed #e2e8f0;
}

.inspector-metrics-table td {
  padding: 6px 0;
  color: #334155;
}

.inspector-metrics-table td:first-child {
  color: #94a3b8;
  width: 50%;
  word-break: break-all;
}

.inspector-label-group {
  margin-bottom: 12px;
}

.inspector-label-group h4 {
  margin: 0 0 4px;
  font-size: 12px;
  color: #64748b;
}

.inspector-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.inspector-label-pill {
  background: #eef2f6;
  color: #334155;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
}

/* Inspector 抽屉本身需要可滚动 */
.inspector.open {
  overflow-y: auto;
}

@media (max-width: 1180px) {
  .internal-overview-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "kpi" "platforms" "ranking" "type" "monthly" "calendar" "radar";
  }
  .internal-filter-bar {
    grid-template-columns: 1fr 1fr;
  }
  .label-shell {
    grid-template-columns: 1fr;
  }
}

.heat-value {
  display: inline-block;
  min-width: 34px;
}

.mini-bar {
  display: inline-block;
  width: 42px;
  height: 4px;
  margin-left: 7px;
  overflow: hidden;
  background: #e7edf4;
  border-radius: 99px;
  vertical-align: middle;
}

.mini-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.mini-bar.red i { background: var(--red); }
.mini-bar.orange i { background: var(--orange); }
.mini-bar.yellow i { background: var(--yellow); }
.mini-bar.green i { background: var(--green); }

.spark {
  width: 62px;
  height: 20px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  color: #697586;
  font-size: 12px;
}

.pagination button,
.pagination select,
.pagination input {
  height: 28px;
  min-width: 28px;
  color: #526071;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 4px;
}

.pagination input {
  width: 50px;
}

.pagination .active {
  color: var(--teal-dark);
  border-color: var(--teal);
  background: var(--teal-soft);
}

.health-list,
.health-table {
  padding: 8px 12px;
}

.health-row {
  display: grid;
  grid-template-columns: 62px 34px minmax(60px, 1fr) 42px 46px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  font-size: 12px;
}

.health-row strong {
  font-size: 14px;
}

.health-row i,
.bars i {
  height: 5px;
  overflow: hidden;
  background: #e6edf4;
  border-radius: 99px;
}

.health-row i b,
.bars i b {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.health-row em {
  font-style: normal;
  font-size: 11px;
}

.status-soft,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 11px;
}

.status-soft,
.status-pill.ready {
  color: #078f86;
  background: #daf6f2;
}

.status-pill.pending {
  color: #9a6400;
  background: #fff1c7;
}

.status-pill.normal {
  color: #a36200;
  background: #fff4dc;
}

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

.warning-card {
  min-height: 54px;
  padding: 10px;
  border: 1px solid #e6edf4;
  border-radius: 6px;
  background: #fff;
}

.warning-card span {
  display: block;
  color: #697586;
  font-size: 12px;
}

.warning-card strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.chart-wrap {
  padding: 12px 14px 10px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
  color: #4b5565;
  font-size: 12px;
}

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

.legend i,
.donut-legend i,
.emotion i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chart-wrap svg {
  width: 100%;
  height: 250px;
}

.donut-block {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.donut-block svg {
  width: 170px;
  height: 170px;
}

.donut-legend p,
.emotion p {
  margin: 8px 0;
  color: #526071;
  font-size: 12px;
}

.c0 { background: #1e9ed8; }
.c1 { background: #00a99d; }
.c2 { background: #f7b500; }
.c3 { background: #ef4444; }
.c4 { background: #84a7b8; }
.c5 { background: #c7cdd4; }
.pos { background: #00a99d; }
.neu { background: #c7cdd4; }
.neg { background: #ef4444; }

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-soft);
}

.preview-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 560;
}

.drawer-close-lite {
  width: 28px;
  height: 28px;
  color: #111827;
  background: transparent;
  border: 0;
  font-size: 24px;
}

.preview-body {
  padding: 14px 14px 20px;
}

.preview-body h3 {
  margin: 4px 0 6px;
  font-size: 14px;
  font-weight: 520;
}

.preview-body h4 {
  margin: 18px 0 9px;
  padding-left: 8px;
  color: var(--teal-dark);
  border-left: 3px solid var(--teal);
  font-size: 13px;
  font-weight: 520;
}

.preview-body p {
  color: #526071;
  font-size: 12px;
  line-height: 1.65;
}

.muted {
  color: #8a95a5 !important;
}

.topline {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 44px 58px;
  gap: 7px;
  align-items: center;
  min-height: 30px;
  font-size: 12px;
}

.topline b {
  color: var(--red);
  font-weight: 500;
}

.topline em,
.mini-table em {
  color: #697586;
  font-style: normal;
}

.emotion {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  padding: 4px 0;
}

.emotion svg {
  width: 130px;
  height: 130px;
}

.mini-table p {
  display: grid;
  grid-template-columns: 1fr 52px 42px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.preview-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

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

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.detail-block,
.idea-board,
.asset-preview,
.matrix-chart,
.pipeline,
.log-list,
.report-page {
  padding: 14px;
}

.detail-block h3,
.idea-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 560;
}

.detail-block p,
.idea-card p {
  color: #526071;
  font-size: 12px;
  line-height: 1.6;
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.tag-line span {
  padding: 4px 8px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 4px;
  font-size: 12px;
}

.bars {
  display: grid;
  gap: 10px;
  padding: 8px 14px 14px;
}

.bars p {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  margin: 0;
  font-size: 12px;
}

.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
}

.word-cloud span {
  color: var(--teal-dark);
}

.word-cloud .w0 { font-size: 22px; }
.word-cloud .w1 { font-size: 18px; color: #2f80ed; }
.word-cloud .w2 { font-size: 15px; color: #ff7a00; }
.word-cloud .w3 { font-size: 13px; color: #697586; }

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

.idea-card {
  padding: 14px;
  border-color: #dce5ee;
  border-radius: 6px;
  box-shadow: none;
}

.idea-card.selected {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(10, 169, 157, .22);
}

.idea-meta,
.info-grid {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
  margin: 12px 0;
  color: #526071;
  font-size: 12px;
}

.idea-meta strong,
.info-grid b {
  color: #263244;
  font-weight: 500;
}

.asset-preview {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin: 14px;
  color: #fff;
  background: linear-gradient(135deg, #081827, #0aa99d);
  border-radius: 6px;
}

.matrix-chart svg {
  width: 100%;
  height: 260px;
}

.pipeline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 180px;
}

.pipeline span {
  display: grid;
  place-items: center;
  width: 110px;
  height: 58px;
  background: #f7f9fb;
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  font-size: 13px;
}

.pipeline i {
  width: 48px;
  height: 2px;
  background: var(--teal);
}

.log-list p {
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  color: #526071;
  font-size: 13px;
}

.report-page {
  box-shadow: none;
}

@media (max-width: 1500px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 292px;
    grid-template-areas:
      "kpi kpi"
      "table health"
      "table warning"
      "chart donut"
      "preview preview";
  }

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

@media (max-width: 1080px) {
  .dashboard-grid,
  .page-grid {
    display: block;
  }

  .panel,
  .report-preview {
    margin-bottom: 12px;
  }

  .kpi-row,
  .idea-board {
    grid-template-columns: 1fr;
  }

  .report-preview {
    border: 1px solid #dce5ee;
    border-radius: 6px;
  }
}
