/* ── X/Twitter 创作台 — X 内容生产工作流专属页 ── */
/* 标准两列布局，xwb- 前缀，X 蓝 #1DA1F2 主题 */

/* ── 顶栏 ── */

.xwb-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.xwb-back-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.xwb-back-btn:hover { background: var(--bg-hover); }
.xwb-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
}
.xwb-run-btn {
  background: #1DA1F2;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.xwb-run-btn:hover { background: #1a91da; }
.xwb-run-btn:disabled { background: #ccc; cursor: not-allowed; }

/* ── 两列布局 ── */

.xwb-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  padding: 16px;
  height: calc(100vh - 60px);
  overflow: hidden;
}
.xwb-left, .xwb-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

/* ── 区块 ── */

.xwb-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.xwb-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

/* ── 按钮 ── */

.xwb-sm-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-left: 4px;
}
.xwb-sm-btn:hover { background: var(--bg-hover); }

/* ── 推文列表 ── */

.xwb-tweet-list {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.xwb-tweet-card {
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid #1DA1F2;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.xwb-tweet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.xwb-tweet-num {
  font-size: 11px;
  font-weight: 600;
  color: #1DA1F2;
}
.xwb-tweet-type {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #E0E0E0;
  color: #666;
}
.xwb-tweet-text {
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  color: #333;
}

/* ── 步骤状态 ── */

.xwb-steps {
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.xwb-step {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}
.xwb-step-completed { background: #dcfce7; color: #166534; }
.xwb-step-running { background: #dbeafe; color: #1e40af; }
.xwb-step-failed { background: #fee2e2; color: #991b1b; }
.xwb-step-approval { background: #fff3e0; color: #e65100; border-color: #ffb300; }
.xwb-step-pending { background: var(--bg-subtle); color: var(--text-dim); }

/* ── 审核区 ── */

.xwb-gate-section { padding: 12px 14px; }
.xwb-gate-banner {
  background: #fff3e0;
  border: 2px solid #ffb300;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.xwb-gate-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.xwb-approve-btn {
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.xwb-approve-btn:hover { background: #16a34a; }
.xwb-reject-btn {
  background: #ffcdd2;
  color: #c62828;
  border: 1px solid #ef9a9a;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.xwb-reject-btn:hover { background: #ef9a9a; }
.xwb-gate-comment {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
}

/* ── 状态横幅 ── */

.xwb-status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.xwb-status-label { font-weight: 600; font-size: 14px; }
.xwb-status-meta { font-size: 12px; color: var(--text-secondary); }
.xwb-status-time { font-size: 11px; color: var(--text-secondary); }

/* ── 运行历史 ── */

.xwb-history-list { max-height: 300px; overflow-y: auto; }
.xwb-history-item {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.xwb-history-item:hover { background: var(--bg-hover); }
.xwb-history-item:last-child { border-bottom: none; }
.xwb-history-row { display: flex; justify-content: space-between; align-items: center; }
.xwb-history-time { font-size: 11px; color: var(--text-dim); }
.xwb-history-status { font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.xwb-history-detail { display: none; padding: 8px 0 0 0; font-size: 12px; }
.xwb-history-detail.open { display: block; }
.xwb-history-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-size: 12px;
}

/* ── 通用 ── */

.xwb-loading { padding: 20px; text-align: center; color: var(--text-dim); font-size: 13px; }
.xwb-empty { padding: 20px; text-align: center; color: var(--text-dim); font-size: 13px; }
