/* 独立微博内容抓取工作区。沿用后台变量，不影响原“内容采集”页面。 */
#tab-weibo-content {
  min-width: 0;
}

.wbc-page-head,
.wbc-section-head,
.wbc-pane-head,
.wbc-detail-head,
.wbc-subhead,
.wbc-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wbc-page-actions,
.wbc-connection-actions,
.wbc-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#tab-weibo-content button,
#tab-weibo-content input,
#tab-weibo-content select,
#tab-weibo-content textarea {
  border-radius: 6px;
}

#tab-weibo-content button {
  box-shadow: none;
}

.wbc-connection {
  margin-bottom: 14px;
  padding: 12px 0 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.wbc-section-head {
  align-items: flex-start;
  margin-bottom: 10px;
}

.wbc-section-head h3,
.wbc-pane-head h3,
.wbc-detail-head h3,
.wbc-subhead h4,
.wbc-run-controls h4 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.wbc-section-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

.wbc-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .4);
}

.wbc-status-grid > div {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 11px;
}

.wbc-status-grid > div + div {
  border-left: 1px solid var(--border);
}

.wbc-status-grid span {
  color: var(--muted);
  font-size: 11.5px;
}

.wbc-status-grid b {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wbc-status-grid b[data-state="ready"] { color: #147a4b; }
.wbc-status-grid b[data-state="warn"] { color: #a86608; }
.wbc-status-grid b[data-state="error"] { color: var(--red); }

.wbc-credentials {
  margin-top: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .28);
}

.wbc-credentials summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  color: #4b5563;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.wbc-credentials summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.wbc-credential-body {
  padding: 2px 10px 10px;
  border-top: 1px solid var(--border);
}

.wbc-credential-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding-top: 9px;
}

.wbc-credential-fields label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: #4b5563;
  font-size: 11.5px;
  font-weight: 600;
}

.wbc-credential-fields label small {
  color: var(--muted);
  font-weight: 400;
}

.wbc-credential-fields input { width: 100%; }

.wbc-credential-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding-top: 8px;
  flex-wrap: wrap;
}

.wbc-workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, .3);
}

.wbc-task-pane {
  min-width: 0;
  padding: 13px 12px 18px;
  border-right: 1px solid var(--border);
  background: rgba(247, 249, 252, .68);
}

.wbc-pane-head {
  min-height: 28px;
  margin-bottom: 9px;
}

.wbc-create {
  display: grid;
  gap: 7px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.wbc-create > label,
.wbc-table-picker label,
.wbc-task-settings label,
.wbc-run-controls label,
.wbc-inline-fields label {
  color: #4b5563;
  font-size: 11.5px;
  font-weight: 600;
}

.wbc-inline-fields {
  display: grid;
  grid-template-columns: 1fr 88px;
  align-items: center;
  gap: 8px;
}

.wbc-target-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.wbc-table-picker {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.wbc-target-state {
  display: block;
  min-height: 18px;
  font-size: 11.5px;
  line-height: 1.45;
}

.wbc-task-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.wbc-task-item {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 9px 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .56);
  color: var(--text);
  text-align: left;
}

.wbc-task-item:hover { border-color: #b9c8dd; }
.wbc-task-item.active { border-color: var(--primary); background: rgba(239, 246, 255, .78); }

.wbc-task-item-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wbc-task-item-head b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wbc-task-item-meta,
.wbc-task-item-note {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wbc-detail-pane {
  min-width: 0;
  padding: 14px 15px 18px;
}

.wbc-empty {
  display: flex;
  min-height: 480px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--muted);
  text-align: center;
}

.wbc-empty b { color: #4b5563; }

.wbc-detail-head {
  align-items: flex-start;
  margin-bottom: 7px;
}

.wbc-detail-head h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.wbc-detail-meta,
.wbc-bound-table {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.wbc-bound-table {
  margin-top: 7px;
  font-size: 11.5px;
}

.wbc-bound-table a {
  max-width: 480px;
  overflow: hidden;
  color: var(--primary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wbc-bound-table a:not([href]) {
  color: var(--muted);
  pointer-events: none;
}

.wbc-task-settings {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(160px, 1.4fr) minmax(150px, 1fr) 82px auto;
  gap: 8px;
  align-items: end;
  margin: 10px 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .34);
}

.wbc-task-settings > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.wbc-task-settings input,
.wbc-task-settings select { width: 100%; }

.wbc-rebind {
  margin: 8px 0 10px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.wbc-rebind summary {
  padding: 9px 2px;
  color: #4b5563;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.wbc-rebind-body {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, .8fr) auto;
  gap: 8px;
  align-items: center;
  padding: 0 0 10px;
}

.wbc-rebind-body .wbc-target-state { grid-column: 1 / -1; }

.wbc-run-panel {
  margin: 10px 0;
  padding: 10px 11px;
  border-left: 3px solid var(--primary);
  background: rgba(248, 250, 252, .7);
}

.wbc-run-controls {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto 142px auto 142px auto;
  gap: 8px;
  align-items: center;
}

.wbc-run-controls > div span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.wbc-run-panel .progress { margin-top: 10px; }
.wbc-progress-meta { margin-top: 7px; font-size: 11.5px; }

.wbc-targets {
  margin-top: 12px;
}

.wbc-subhead {
  margin-bottom: 7px;
}

.wbc-subhead > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.wbc-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 9px;
}

.wbc-import-row textarea {
  min-height: 68px;
  resize: vertical;
}

.wbc-target-table small,
.wbc-run-target-table small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.wbc-target-note {
  width: min(260px, 100%);
}

.wbc-row-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.wbc-view-tabs {
  display: flex;
  gap: 2px;
  margin-top: 14px;
  border-bottom: 1px solid var(--border);
}

.wbc-view-tabs button {
  min-height: 34px;
  padding: 7px 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.wbc-view-tabs button.active {
  border-bottom-color: var(--primary);
  color: var(--text);
  font-weight: 650;
}

.wbc-data-view {
  min-height: 104px;
  padding-top: 9px;
}

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

.wbc-history-row {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) minmax(180px, 1.3fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px 9px;
  border-bottom: 1px solid var(--border);
}

.wbc-history-row span,
.wbc-history-row small { min-width: 0; }
.wbc-history-row small { color: var(--muted); }

.wbc-history-main b,
.wbc-history-main small {
  display: block;
}

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

.wbc-result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 70px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, .44);
}

.wbc-result-item b,
.wbc-result-item small {
  display: block;
}

.wbc-result-item b {
  overflow-wrap: anywhere;
  font-size: 12.5px;
}

.wbc-result-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.wbc-result-item a {
  white-space: nowrap;
}

.wbc-result-period {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  color: #4b5563;
  font-size: 12px;
  font-weight: 650;
}

.wbc-empty-row {
  min-height: 72px;
  margin: 0;
  padding: 24px 10px;
  text-align: center;
}

@media (max-width: 1120px) {
  .wbc-workspace { grid-template-columns: 290px minmax(0, 1fr); }
  .wbc-task-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wbc-task-settings > button { align-self: end; }
  .wbc-rebind-body { grid-template-columns: minmax(0, 1fr) auto; }
  .wbc-rebind-body .wbc-table-picker { grid-column: 1 / -1; }
  .wbc-run-controls { grid-template-columns: minmax(120px, 1fr) auto 136px auto 136px; }
  .wbc-run-controls > button { grid-column: 5; }
}

@media (max-width: 760px) {
  .wbc-page-head,
  .wbc-section-head,
  .wbc-detail-head,
  .wbc-progress-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .wbc-page-actions,
  .wbc-connection-actions,
  .wbc-detail-actions { width: 100%; }

  .wbc-page-actions button,
  .wbc-connection-actions button,
  .wbc-detail-actions button { flex: 1 1 120px; }

  .wbc-page-head h2 { flex: 0 0 auto; }
  .wbc-status-grid { grid-template-columns: minmax(0, 1fr); }
  .wbc-status-grid > div + div { border-top: 1px solid var(--border); border-left: 0; }
  .wbc-credentials summary { align-items: flex-start; flex-direction: column; gap: 2px; }
  .wbc-credential-fields { grid-template-columns: minmax(0, 1fr); }
  .wbc-credential-actions button { width: 100%; }

  .wbc-workspace {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .wbc-task-pane {
    padding: 12px 9px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
  }

  .wbc-detail-pane {
    padding: 16px 0 10px;
  }

  .wbc-empty { min-height: 180px; }
  .wbc-bound-table a { max-width: 100%; }

  .wbc-task-settings,
  .wbc-rebind-body,
  .wbc-run-controls,
  .wbc-result-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .wbc-task-settings > button,
  .wbc-rebind-body > button,
  .wbc-run-controls > button,
  .wbc-rebind-body .wbc-table-picker {
    grid-column: 1;
    width: 100%;
  }

  .wbc-run-controls label { margin-top: 3px; }
  .wbc-import-row { grid-template-columns: minmax(0, 1fr); }
  .wbc-import-row button { width: 100%; }

  .wbc-target-table { min-width: 560px; }
  .wbc-run-target-table { min-width: 650px; }
  .wbc-row-actions button { min-width: 56px; white-space: nowrap; }

  .wbc-view-tabs {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .wbc-view-tabs button { flex: 1 0 auto; }

  .wbc-history-row {
    grid-template-columns: 1fr auto;
  }

  .wbc-history-row > :nth-child(3) { grid-column: 1 / -1; }
  .wbc-result-item { grid-template-columns: minmax(0, 1fr); }
  .wbc-result-item a { justify-self: start; }
}
