.shell {
  height: 100vh;
  overflow: hidden;
}

.node-safety{display:flex;gap:14px;align-items:flex-start;margin-bottom:18px;border-left:4px solid var(--teal)}
.node-safety strong{white-space:nowrap;color:var(--teal)}
.node-safety span{color:var(--muted)}
.xhs-local-node-entry{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:18px;border-left:4px solid #cf4141;background:linear-gradient(90deg,#fff7f7 0,#fff 60%)}
.xhs-local-node-copy{display:flex;align-items:flex-start;gap:14px;min-width:0}
.xhs-local-node-copy strong{display:block;margin-bottom:4px;font-size:15px}
.xhs-local-node-copy p{max-width:780px;margin:0;color:var(--muted);line-height:1.65}
.node-status-line{display:flex;align-items:center;gap:8px;margin:12px 0;color:var(--muted)}
.node-status-dot{width:9px;height:9px;border-radius:50%;background:#aebbc0}
.node-status-dot.online{background:#2da56f;box-shadow:0 0 0 4px rgba(45,165,111,.12)}
.node-meta-list{display:grid;gap:5px;color:var(--muted);font-size:12px}
.node-secret-warning{padding:10px 12px;margin-bottom:12px;border-radius:7px;background:#fff4de;color:#946414;font-weight:700}
.install-command{white-space:pre-wrap;overflow-wrap:anywhere;background:#101820;color:#d8efeb;padding:12px;border-radius:7px;font-size:12px;line-height:1.55}
#browser-node-key{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;resize:none}

.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
}

.main-area {
  height: 100vh;
  overflow: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
}

.view {
  max-width: 1600px;
}

.workspace-surface {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

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

.surface-head h3 {
  margin: 0;
  font-size: 15px;
}

.surface-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.workspace-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.summary-cell {
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}

.summary-cell:last-child {
  border-right: 0;
}

.summary-cell span,
.summary-cell small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.summary-cell strong {
  display: block;
  margin-top: 3px;
  font-size: 22px;
  line-height: 1.25;
}

.summary-cell small {
  margin-top: 3px;
}

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

.operations-table th {
  background: #f8fafb;
}

.operations-table td {
  padding-top: 16px;
  padding-bottom: 16px;
}

.task-identity,
.media-identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 260px;
}

.platform-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  color: #fff;
  background: #18232c;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.platform-mark.bilibili {
  background: #dc6387;
}

.platform-mark.xiaohongshu {
  background: #cf4141;
}

.task-identity strong,
.media-copy strong {
  display: block;
}

.task-identity small,
.media-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.task-plan,
.analysis-stack,
.comment-progress {
  display: grid;
  gap: 4px;
}

.task-plan small,
.stage-copy,
.sync-state {
  color: var(--muted);
  font-size: 11px;
}

.progress-cell {
  min-width: 150px;
}

.progress-cell .progress {
  margin-bottom: 5px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.content-operations {
  min-width: 980px;
}

.media-copy {
  min-width: 0;
  max-width: 520px;
}

.media-copy strong,
.media-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 6px 14px;
  min-width: 190px;
}

.metric-pair span {
  color: var(--muted);
  font-size: 11px;
}

.metric-pair strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.overview-filters {
  justify-content: flex-end;
  flex-wrap: wrap;
}

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

.overview-metric-grid .metric {
  min-height: 118px;
  padding: 17px;
}

.overview-metric-grid .metric-value {
  font-size: 28px;
}

.segmented-control {
  display: inline-flex;
  min-height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f5f7f8;
}

.segmented-control button {
  min-width: 54px;
  border: 0;
  border-radius: 4px;
  padding: 5px 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.segmented-control button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(18, 36, 46, .1);
  font-weight: 700;
}

.sentiment-panel {
  overflow: visible;
}

.sentiment-canvas-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  flex: 0 0 180px;
}

.sentiment-chart {
  width: 180px !important;
  height: 180px;
}

.sentiment-tooltip {
  position: absolute;
  z-index: 3;
  max-width: 160px;
  padding: 6px 9px;
  border-radius: 4px;
  background: #17212b;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
}

.legend-item {
  display: grid;
  grid-template-columns: 9px minmax(40px, 1fr) auto auto;
  align-items: center;
  gap: 7px;
}

.legend-item small {
  min-width: 42px;
  color: var(--muted);
  text-align: right;
}

.legend-item.pending .legend-dot {
  border: 1px dashed #aab7bd;
  background: transparent;
}

.dashboard-detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, .85fr) minmax(300px, 1.15fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.analytics-list {
  display: grid;
}

.analytics-row {
  position: relative;
  width: 100%;
  min-height: 53px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #edf1f2;
  padding: 9px 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.analytics-row:last-child {
  border-bottom: 0;
}

.analytics-row:hover strong {
  color: var(--teal);
}

.analytics-row strong,
.analytics-row small {
  display: block;
}

.analytics-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-row small {
  color: var(--muted);
  font-size: 10px;
}

.analytics-value {
  text-align: right;
}

.analytics-value strong {
  font-size: 13px;
}

.analytics-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  overflow: hidden;
  background: #edf1f2;
}

.analytics-bar i {
  display: block;
  height: 100%;
  background: var(--teal);
}

.subsection-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.subsection-head span,
.native-topic-note,
.empty-inline {
  color: var(--muted);
  font-size: 10px;
}

.term-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.term-cloud button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #dce6e5;
  border-radius: 4px;
  padding: 5px 7px;
  background: #f5f9f8;
  color: #315b58;
  font-size: 11px;
}

.term-cloud button:hover {
  border-color: var(--teal);
}

.term-cloud small {
  color: var(--muted);
}

.native-topic-note {
  margin-top: 14px;
  padding: 9px 10px;
  border-left: 2px solid #96a9b0;
  background: #f4f6f7;
}

.hot-content-list {
  display: grid;
}

.hot-content-row {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 120px 54px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #edf1f2;
  padding: 11px 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.hot-content-row:last-child {
  border-bottom: 0;
}

.hot-content-row .rank {
  color: #93a0a6;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.hot-content-row>div>strong,
.hot-content-row>div>small {
  display: block;
}

.hot-content-row>div>strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-content-row>div>small,
.hot-stats small {
  color: var(--muted);
  font-size: 10px;
}

.hot-stats {
  text-align: right;
}

.quality-list {
  display: grid;
  gap: 12px;
}

.quality-row>div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.quality-row span,
.quality-foot {
  color: var(--muted);
  font-size: 11px;
}

.quality-bar {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: #edf1f2;
}

.quality-bar i {
  display: block;
  height: 100%;
  background: var(--green);
}

.quality-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}

.risk-dynamics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.risk-dynamic {
  padding: 9px;
  border-left: 3px solid #9badb3;
  background: #f5f7f8;
}

.risk-dynamic.danger { border-color: var(--red); }
.risk-dynamic.warn { border-color: var(--orange); }
.risk-dynamic.ok { border-color: var(--green); }
.risk-dynamic span { display: block; color: var(--muted); font-size: 10px; }
.risk-dynamic strong { font-size: 19px; }
.empty-state.compact { padding: 18px 8px; }

.toolbar-input {
  min-width: 240px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.toolbar-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 128, 118, .1);
}

.comment-limit-inline {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.comment-limit-inline input {
  width: 86px;
}

.comment-collection-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.comment-collection-toolbar label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.comment-collection-toolbar input[type="number"] {
  width: 120px;
  height: 41px;
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.comment-collection-toolbar input[type="number"]:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 128, 118, .1);
}

.settings-panel input:not([type="checkbox"]) {
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.settings-panel input:not([type="checkbox"]):focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 128, 118, .1);
}

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

.comment-work-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(220px, .8fr) minmax(150px, .55fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.comment-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.comment-progress-head span {
  color: var(--muted);
}

.progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  background: #e8edef;
  border-radius: 3px;
}

.progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
  transition: width .25s ease;
}

.comment-job-progress {
  min-width: 220px;
  padding: 11px 12px;
  background: #f4f7f7;
  border: 1px solid #dfe8e8;
  border-radius: 6px;
}

.comment-job-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  font-size: 12px;
}

.comment-job-progress span,
.comment-job-progress small {
  color: var(--muted);
}

.comment-job-progress.compact {
  min-width: 260px;
  padding: 7px 9px;
}

.comment-job-progress.compact > div:first-child {
  margin-bottom: 5px;
  font-size: 11px;
}

.comment-job-error {
  display: block;
  margin-top: 7px;
  color: var(--red) !important;
  white-space: normal;
}

.content-action-stack {
  display: grid;
  gap: 8px;
}

.detail-drawer {
  width: min(680px, calc(100vw - 18px));
  max-width: none;
  height: 100vh;
  max-height: 100vh;
  margin: 0 0 0 auto;
  border-radius: 0;
}

.detail-drawer[open] {
  display: block;
}

.detail-drawer .dialog-form {
  height: 100vh;
  padding: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.detail-drawer .dialog-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.detail-drawer .detail-body {
  overflow: auto;
  padding: 22px;
}

.detail-drawer::backdrop {
  background: rgba(16, 24, 32, .36);
}

.detail-drawer .comment-list {
  max-height: none;
}

.comment-list-head > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.comment-list-head > div span {
  color: var(--muted);
  font-size: 12px;
}

.comment-sort {
  padding: 7px 30px 7px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.comment-record {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  background: #f7f9f9;
  border: 1px solid #e5ebed;
  border-radius: 6px;
}

.comment-record.is-reply {
  margin-left: 28px;
  background: #fbfcfc;
  border-left: 3px solid #b9d5d2;
}

.comment-record-head,
.comment-record-head > div,
.comment-record-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-record-head {
  justify-content: space-between;
}

.comment-level {
  padding: 2px 6px;
  color: var(--teal-dark);
  background: #e4f1ef;
  border-radius: 4px;
  font-size: 10px;
}

.comment-record.is-reply .comment-level {
  color: #52656c;
  background: #e9edef;
}

.comment-like {
  color: #9a5d2c;
  font-weight: 700;
  font-size: 12px;
}

.comment-record p {
  margin: 0;
  color: #25343c;
  line-height: 1.7;
  white-space: pre-wrap;
}

.comment-record-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.verification-performance {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.verification-performance i {
  width: 7px;
  height: 7px;
  background: #3b9b73;
  border-radius: 50%;
}

.account-session-viewport img {
  transform: translateZ(0);
  will-change: contents;
}

@media (max-width: 1050px) {
  .workspace-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-cell:nth-child(2n) {
    border-right: 0;
  }

  .comment-work-row {
    grid-template-columns: minmax(260px, 1fr) minmax(200px, .8fr) auto;
  }

  .comment-work-row .sync-state {
    display: none;
  }
}

@media (max-width: 720px) {
  .shell,
  .sidebar,
  .main-area {
    height: auto;
  }

  .main-area {
    min-height: 100vh;
    overflow: visible;
  }

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

  .comment-work-row {
    grid-template-columns: 1fr;
  }

  .toolbar-input {
    width: 100%;
    min-width: 0;
  }

  .comment-limit-inline {
    flex: 1 1 110px;
  }

  .comment-limit-inline input {
    width: 100%;
  }

  .comment-collection-toolbar {
    width: 100%;
    justify-content: stretch;
  }

  .comment-collection-toolbar label,
  .comment-collection-toolbar .toolbar-input {
    flex: 1 1 100%;
  }

  .comment-collection-toolbar input[type="number"] {
    width: 100%;
  }

  .detail-drawer {
    width: 100vw;
  }

  .comment-record.is-reply {
    margin-left: 14px;
  }

  .xhs-local-node-entry {
    align-items:stretch;
    flex-direction:column;
  }

  .xhs-local-node-entry .filter-row button {
    flex:1;
  }
}

@media (max-width: 1250px) {
  .overview-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .dashboard-detail-grid .panel:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .overview-filters select,
  .overview-filters button {
    flex: 1 1 130px;
  }

  .overview-metric-grid,
  .dashboard-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-detail-grid .panel {
    grid-column: 1 / -1;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1;
    min-width: 0;
  }

  .sentiment-canvas-wrap {
    width: 160px;
    height: 160px;
    flex-basis: 160px;
  }

  .sentiment-chart {
    width: 160px !important;
    height: 160px;
  }

  .hot-content-row {
    grid-template-columns: 24px minmax(0, 1fr) 50px;
  }

  .hot-stats {
    display: none;
  }
}
.brand-logo-full {
  display: block;
  width: 148px;
  height: auto;
  object-fit: contain;
}

.login-panel .brand-logo-full + .eyebrow {
  margin-top: 22px;
}

.brand-logo-mark {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
  padding: 3px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

.installer-steps {
  display: grid;
  gap: 14px;
}

.installer-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.installer-step > b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
}

.installer-step strong,
.installer-step span {
  display: block;
}

.installer-step span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.installer-path-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.installer-path-row input {
  min-width: 0;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.danger-link {
  color: var(--red);
}
