:root {
  --bg: #f5f6f8;
  --card: #fff;
  --border: #e5e7eb;
  --text: #1f2329;
  --muted: #8a919e;
  --primary: #ff5a5f;
  --primary-d: #e04a50;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f59e0b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
}
button:hover { background: #f0f1f3; }
button:disabled { cursor: not-allowed; opacity: .55; }
button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
button.primary:hover { background: var(--primary-d); }
button.danger { color: var(--red); border-color: #f3c9c9; }
button.publish-start { background: var(--green); color: #fff; border-color: var(--green); }
button.publish-start:hover { background: #16a34a; }
button.publish-pause { background: var(--orange); color: #fff; border-color: var(--orange); }
button.publish-pause:hover { background: #d97706; }
input, select, textarea {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  outline: 2px solid transparent;
  outline-offset: 2px;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
a:focus-visible, summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 2px;
}
/* 勾选框/单选框不吃 width:100%（否则移动端会被拉成整行宽度）。 */
input[type="checkbox"], input[type="radio"] { width: auto; padding: 0; }
/* 批量粘贴 IP：等宽字体 + 不折行 + 够高够宽，一屏能看十几条，可拖高 */
#ipImportText {
  min-height: 200px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  white-space: pre;
  overflow-x: auto;
  resize: vertical;
  line-height: 1.6;
}
.err { color: var(--red); font-size: 12px; margin-top: 6px; min-height: 16px; }
.msg { font-size: 12px; margin-left: 10px; }
.muted { color: var(--muted); }

/* 登录 */
.login-view { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card {
  background: var(--card); padding: 36px 32px; border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.08); width: 340px; display: flex; flex-direction: column; gap: 12px;
}
.login-card h1 { font-size: 20px; margin: 0; text-align: center; }
.login-sub { text-align: center; color: var(--muted); margin: 0 0 8px; font-size: 12px; }

/* 布局 */
.app-view { display: flex; min-height: 100vh; }
.mobile-header, .mobile-nav-close, .mobile-nav-backdrop { display: none; }
.sidebar {
  width: 200px; background: #1f2329; color: #cdd2da; display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 17px; font-weight: 600; color: #fff; padding: 20px; }
.sidebar nav { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 10px; }
.sidebar nav a {
  padding: 12px 20px; color: #cdd2da; cursor: pointer; border-left: 3px solid transparent; font-size: 14px; text-decoration: none;
}
.sidebar nav a:hover { background: rgba(255,255,255,.05); }
.sidebar nav a.active { background: rgba(255,90,95,.15); border-left-color: var(--primary); color: #fff; }
.nav-home { margin-bottom: 4px; font-weight: 600; }
.nav-group { display: flex; flex-direction: column; }
.nav-group-label { padding: 12px 20px 4px; color: #777f8d; font-size: 10.5px; text-transform: uppercase; }
.sidebar-foot { padding: 16px 20px; font-size: 12px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #333; }
.sidebar-logout { color: var(--primary); cursor: pointer; border: 0; background: transparent; padding: 4px; }
.sidebar-logout:hover { color: #fff; background: transparent; }
.main { flex: 1; min-width: 0; padding: 24px 28px; overflow: auto; }
.tab-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.tab-head h2 { margin: 0; font-size: 18px; }
.tab-head > div > h2 { margin: 0; }
.page-context { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input, .filters select { width: auto; }

/* 今日工作台 */
.workspace-kpis { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; margin-bottom: 18px; }
.workspace-kpi { min-width: 0; padding: 13px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; }
.workspace-kpi b { display: block; margin-bottom: 3px; font-size: 22px; }
.workspace-kpi span { color: var(--muted); font-size: 12px; }
.workspace-kpi.good b { color: var(--green); }
.workspace-kpi.warn b { color: var(--orange); }
.workspace-kpi.bad b { color: var(--red); }
.workspace-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.workspace-panel { min-width: 0; margin-bottom: 22px; padding-top: 12px; border-top: 1px solid var(--border); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.panel-head h3 { margin: 0; font-size: 14px; }
.link-btn { padding: 4px 6px; border-color: transparent; background: transparent; color: var(--primary); }
.action-list { display: flex; flex-direction: column; }
.action-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.action-item:last-child { border-bottom: 0; }
.action-item > div { min-width: 0; }
.action-item b, .action-item span { display: block; }
.action-item span { margin-top: 3px; color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.action-item.critical b { color: var(--red); }
.empty-action { padding: 22px 0; color: var(--muted); text-align: center; }
.read-state { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.read-state.warn { border-color: #f5d9a8; background: #fff7ed; color: #9a5b08; }
.read-state.error { border-color: #f3c9c9; background: #fff1f1; color: #b42318; }
.compact-table { width: 100%; }
.compact-head, .compact-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(110px, .8fr) minmax(140px, 1fr); align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.compact-head { color: var(--muted); font-size: 11px; }
.compact-row.five { grid-template-columns: minmax(130px, 1.1fr) 90px minmax(110px, .9fr) minmax(110px, .9fr) 105px; }
.compact-row:last-child { border-bottom: 0; }
.compact-row > * { min-width: 0; }

/* 自动发布 */
.segmented { display: inline-flex; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.segmented button { border: 0; border-radius: 0; border-right: 1px solid var(--border); }
.segmented button:last-child { border-right: 0; }
.segmented button.active { background: var(--primary); color: #fff; }
.plan-list { display: flex; flex-direction: column; gap: 8px; }
.plan-row { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(150px, 1.1fr) minmax(110px, .8fr) minmax(100px, .75fr) minmax(110px, .8fr) auto; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; }
.plan-account { display: flex; align-items: center; gap: 9px; min-width: 0; }
.plan-account img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #eee; }
.plan-account b, .plan-account span, .plan-state span { display: block; min-width: 0; }
.plan-account span, .plan-state span { margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.plan-actions { display: flex; justify-content: flex-end; gap: 6px; }

.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 32px 4px; color: var(--muted); }
.empty-state b { color: var(--text); font-size: 15px; }
.selection-tray { position: sticky; top: 8px; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 10px 12px; background: #fff; border: 1px solid var(--primary); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.content-list.stale > .content-item { opacity: .7; }
.inline-read-error { margin-bottom: 10px; }
.pool-account-pick { align-items: flex-start; padding: 7px 8px; border-bottom: 1px solid var(--border); }
.pool-account-pick > span { flex: 1; }
.pool-account-pick small { flex: 1 0 100%; margin-left: 22px; color: var(--red); white-space: normal; }
.pool-account-pick.pick-blocked { opacity: .72; }
.publish-result { display: block; margin: 14px 0 0; }
.result-detail { margin-top: 8px; padding: 8px 10px; color: var(--text); background: #f8fafc; border-radius: 6px; line-height: 1.7; }
.result-actions { display: flex; gap: 8px; margin-top: 10px; }

/* 账号卡片 */
.acc-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.acc-top { display: flex; align-items: center; gap: 10px; }
.acc-top img { width: 42px; height: 42px; border-radius: 50%; background: #eee; object-fit: cover; }
.acc-name { font-weight: 600; }
.acc-uid { color: var(--muted); font-size: 12px; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.badge.active { background: #e7f8ee; color: var(--green); }
.badge.expired { background: #fdeaea; color: var(--red); }
.badge.on { background: #e7f8ee; color: var(--green); }
.badge.off { background: #eef0f3; color: var(--muted); }
.badge.armed { background: #fff4e5; color: var(--orange); }
.acc-meta { margin: 12px 0; font-size: 12.5px; color: #555; line-height: 1.9; }
.acc-meta .k { color: var(--muted); display: inline-block; width: 68px; }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 账号列表：稳定网格 + 单一主行动，避免动作挤压账号名。 */
.acc-rows { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: visible; }
.acc-row {
  position: relative;
  display: grid;
  grid-template-columns: 20px 32px minmax(170px, 1.5fr) minmax(110px, .85fr) minmax(115px, .9fr) minmax(105px, .8fr) minmax(100px, .75fr) minmax(150px, auto);
  align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.acc-row:last-child { border-bottom: none; }
.acc-row:hover { background: #fafbfc; }
.acc-row .acc-sel { flex: 0 0 auto; }
.acc-row-ava { width: 32px; height: 32px; border-radius: 50%; background: #eee; object-fit: cover; flex: 0 0 auto; }
.acc-row-main { min-width: 0; }
.acc-row-name { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.acc-row-sub { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.credential-health { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.credential-state { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; line-height: 18px; white-space: nowrap; color: var(--muted); }
.credential-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #9ca3af; }
.credential-state.ok { color: #176b4b; }
.credential-state.ok::before { background: #24845d; }
.credential-state.warn { color: #9a6700; }
.credential-state.warn::before { background: #d59b1a; }
.credential-state.bad { color: var(--red); }
.credential-state.bad::before { background: var(--red); }
.acc-row-col { min-width: 0; color: #555; white-space: normal; overflow: hidden; text-overflow: ellipsis; }
.acc-row-col small, .plan-metric small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 10.5px; }
.acc-row-topic { font-weight: 500; }
.acc-row-proxy { display: none; }
.acc-row-time { color: #555; }
.acc-row-actions { display: flex; justify-content: flex-end; gap: 6px; min-width: 0; }
.acc-row-actions button { padding: 3px 8px; font-size: 12px; }
.account-more { position: relative; }
.account-more summary { cursor: pointer; list-style: none; padding: 5px 9px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.account-more summary::-webkit-details-marker { display: none; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  width: 260px; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,.14);
}
.account-menu button { width: 100%; text-align: left; }
.dual-login-modal { width: min(92vw, 520px); }
.dual-login-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dual-login-head h3 { margin: 0 0 4px; }
.icon-close { width: 34px; height: 34px; padding: 0; font-size: 24px; line-height: 1; }
.dual-login-steps { display: grid; grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr); align-items: center; margin: 18px 0 14px; }
.dual-login-step { display: flex; align-items: center; gap: 9px; color: var(--muted); min-width: 0; }
.dual-login-step > span { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 50%; font-weight: 700; }
.dual-login-step b, .dual-login-step small { display: block; }
.dual-login-step small { margin-top: 2px; font-size: 11px; }
.dual-login-step.active { color: var(--text); }
.dual-login-step.active > span { border-color: var(--primary); color: var(--primary); background: #fff; }
.dual-login-step.done > span { border-color: #24845d; background: #24845d; color: #fff; }
.dual-login-step.failed > span { border-color: var(--red); color: var(--red); }
.dual-login-line { height: 1px; background: var(--border); }
.dual-login-line.done { background: #24845d; }
.dual-login-stage { display: grid; place-items: center; min-height: 300px; background: #f7f8fa; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.dual-login-stage img { display: block; width: min(100%, 420px); max-height: 62vh; object-fit: contain; }
.dual-login-waiting { padding: 32px; color: var(--muted); text-align: center; }
.dual-login-status { min-height: 42px; padding: 11px 0 4px; line-height: 1.45; }
.dual-login-status.ok { color: #176b4b; }
.dual-login-status.error { color: var(--red); }
.dual-login-code { display: flex; gap: 8px; margin-top: 8px; }
.dual-login-code input { flex: 1; min-width: 0; }
@media (max-width: 1280px) {
  .acc-row { grid-template-columns: 20px 32px minmax(160px, 1fr) minmax(100px, .8fr) minmax(110px, .8fr) minmax(100px, .75fr) minmax(145px, auto); }
  .acc-row-time { display: none; }
}
@media (max-width: 560px) {
  .dual-login-modal { width: calc(100vw - 24px); }
  .dual-login-stage { min-height: 260px; }
  .dual-login-step { gap: 6px; }
  .dual-login-step > span { flex-basis: 28px; width: 28px; height: 28px; }
}

/* 采集内容 */
.stat-bar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.stat-pill { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; font-size: 13px; }
.stat-pill b { font-size: 16px; margin-left: 6px; }
.content-list { display: flex; flex-direction: column; gap: 10px; }
.content-item { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; gap: 12px; }
.ci-check { padding-top: 2px; }
.ci-body { flex: 1; min-width: 0; }
.ci-text { white-space: pre-wrap; word-break: break-word; margin-bottom: 8px; line-height: 1.6; }
.ci-imgs { display: flex; gap: 6px; flex-wrap: wrap; }
.ci-imgs img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; background: #eee; }
.ci-foot { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ci-foot select.target-sel { padding: 2px 6px; border-radius: 6px; font-size: 12px; width: auto; color: var(--text); }
.ci-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.status-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.status-pending { background: #eef2ff; color: #4f6bed; }
.status-published { background: #e7f8ee; color: var(--green); }
.status-failed { background: #fdeaea; color: var(--red); }
.status-publishing { background: #fff4e5; color: var(--orange); }
.status-skipped { background: #eef0f3; color: var(--muted); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 18px; }

/* 日志表 */
.log-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
.log-table th, .log-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
.log-table th { background: #fafbfc; color: var(--muted); font-weight: 500; }
.table-scroll { width: 100%; overflow-x: auto; border-radius: 10px; }
.table-scroll .log-table { min-width: 640px; }
.ok-yes { color: var(--green); }
.ok-no { color: var(--red); }

/* 设置 */
.settings-block { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 16px; }

/* 表单类页面（设置/采集/养铁）：多列铺满，不再挤在左侧留白 */
#tab-settings:not(.hidden), #tab-collect:not(.hidden), #tab-interact:not(.hidden) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 16px;
  align-items: start;
}
#tab-settings > .tab-head, #tab-collect > .tab-head, #tab-interact > .tab-head,
#tab-interact > .interact-status, #tab-interact > .agent-health,
#tab-interact > .settings-block { grid-column: 1 / -1; }
#tab-settings > .settings-block, #tab-collect > .settings-block, #tab-interact > .settings-block { margin-bottom: 0; }

/* 养铁：运行状态与固定五步顺序 */
.interact-status { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 8px; font-size: 14px; line-height: 1.6; }
.interact-status span { font-size: 12px; opacity: .85; }
.interact-status.run { background: #e7f8ee; color: #15803d; border: 1px solid #bbf7d0; }
.interact-status.pause { background: #eef0f3; color: #6b7280; border: 1px solid var(--border); }
.iron-action-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 12px 0 18px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.iron-action-switch, .iron-fixed-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; min-height: 70px; padding: 11px 12px; border-right: 1px solid var(--border); background: #f8fafc; }
.iron-action-grid > :last-child { border-right: 0; }
.iron-action-switch { cursor: pointer; transition: background .18s; }
.iron-action-switch:hover { background: #f1f5f4; }
.iron-action-switch > span, .iron-fixed-action > span { min-width: 0; }
.iron-action-switch b, .iron-action-switch small, .iron-fixed-action b, .iron-fixed-action small { display: block; }
.iron-action-switch b, .iron-fixed-action b { color: #30343b; font-size: 12.5px; }
.iron-action-switch small, .iron-fixed-action small { margin-top: 3px; color: #667085; font-size: 10.5px; line-height: 1.35; }
.iron-fixed-action em { color: #69717d; font-size: 11px; font-style: normal; font-weight: 600; }
.iron-action-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.iron-action-switch i { flex: 0 0 32px; width: 32px; height: 18px; border: 1px solid #c8cdd5; border-radius: 9px; background: #dfe3e8; box-shadow: inset 0 0 0 3px #fff; transition: background .18s, border-color .18s, box-shadow .18s; }
.iron-action-switch input:checked + i { border-color: #2d8a64; background: #2d8a64; box-shadow: inset 14px 0 0 3px #fff; }
.iron-action-switch input:focus-visible + i { outline: 3px solid #a8323f; outline-offset: 2px; }
.iron-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.iron-section-head h3 { margin-bottom: 4px; }
.iron-section-head .muted { display: block; color: #667085; font-size: 12px; font-variant-numeric: tabular-nums; }
.iron-master-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: #374151; font-size: 13px; font-weight: 600; }
.iron-master-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.iron-master-switch span { display: inline-flex; align-items: center; gap: 8px; }
.iron-master-switch span::before { content: ''; display: inline-block; width: 36px; height: 20px; border: 1px solid #c8cdd5; border-radius: 10px; background: #dfe3e8; box-shadow: inset 0 0 0 3px #fff; transition: background .18s, border-color .18s; }
.iron-master-switch input:checked + span::before { border-color: #2d8a64; background: #2d8a64; box-shadow: inset 16px 0 0 3px #fff; }
.iron-master-switch input:focus-visible + span::before { outline: 3px solid #a8323f; outline-offset: 2px; }
.iron-advanced { max-width: 520px; margin-top: 4px; }
.iron-advanced summary { width: max-content; cursor: pointer; color: var(--muted); font-size: 12px; }
.iron-advanced[open] summary { margin-bottom: 10px; }
.iron-control-actions, .iron-assignment-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.iron-control-actions .msg, .iron-assignment-actions .msg { margin-left: 0; }
.iron-assignment-panel { padding-bottom: 16px; }
.iron-assignment-workspace { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.55fr); min-height: 420px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.iron-target-pane { min-width: 0; border-right: 1px solid var(--border); background: #fafbfc; }
.iron-actor-pane { min-width: 0; background: #fff; }
.iron-pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-height: 48px; padding: 14px 14px 10px; border-bottom: 1px solid var(--border); }
.iron-pane-head b, .iron-pane-label { color: #30343b; font-size: 12.5px; font-weight: 600; }
.iron-pane-head span, .iron-actor-summary { color: #667085; font-size: 11px; }
.iron-target-list, .iron-assignment-list { max-height: 520px; overflow-y: auto; overscroll-behavior: contain; }
.iron-target-item { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 62px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; color: inherit; text-align: left; transition: background .18s, box-shadow .18s; }
.iron-target-item:hover { background: #f1f4f3; }
.iron-target-item.is-active { background: #eaf4ef; box-shadow: inset 3px 0 #2d8a64; }
.iron-target-item:focus-visible { z-index: 1; outline: 3px solid #a8323f; outline-offset: -3px; }
.iron-target-copy, .iron-actor-copy { min-width: 0; }
.iron-target-copy b, .iron-target-copy small, .iron-actor-copy b, .iron-actor-copy small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iron-target-copy b, .iron-actor-copy b { color: #30343b; font-size: 13px; }
.iron-target-copy small, .iron-actor-copy small { margin-top: 3px; color: #667085; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.iron-target-count { min-width: 34px; color: #59616d; font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.iron-avatar { position: relative; display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; overflow: hidden; border-radius: 6px; background: #e9edf2; color: #626a76; font-size: 13px; font-weight: 600; }
.iron-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.iron-actor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.iron-selected-target { display: flex; align-items: center; gap: 9px; min-width: 0; margin-top: 5px; }
.iron-selected-target > span:last-child { min-width: 0; }
.iron-selected-target b, .iron-selected-target small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iron-selected-target b { color: #30343b; font-size: 13px; }
.iron-selected-target small { margin-top: 2px; color: #667085; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.iron-select-all { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; color: #374151; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.iron-select-all input, .iron-actor-row > input { width: 17px; height: 17px; accent-color: #2d8a64; }
.iron-select-all input:focus-visible, .iron-actor-row > input:focus-visible { outline: 3px solid #a8323f; outline-offset: 2px; }
.iron-actor-summary { min-height: 28px; padding: 7px 14px 5px; border-bottom: 1px solid var(--border); background: #fafbfc; font-variant-numeric: tabular-nums; }
.iron-actor-row { display: grid; grid-template-columns: 22px 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 66px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: #fff; cursor: pointer; transition: background .18s; }
.iron-actor-row:hover { background: #fafcfb; }
.iron-actor-row.is-selected { background: #f3f8f5; }
.iron-actor-row.is-disabled { background: #f6f7f8; cursor: not-allowed; opacity: .62; }
.iron-client-state { display: inline-flex; align-items: center; gap: 7px; width: max-content; max-width: 100%; color: #5f6875; font-size: 12px; white-space: nowrap; }
.iron-client-state i { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; }
.iron-client-state.ok { color: #176b4b; }
.iron-client-state.ok i { background: #24845d; }
.iron-client-state.bad { color: #b42318; }
.iron-client-state.bad i { background: #d84a3f; }
.iron-load-error { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; min-height: 120px; padding: 18px; color: #b42318; text-align: center; }
.settings-block h3 { margin: 0 0 8px; font-size: 15px; }
.token-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.token-row label { width: 70px; color: var(--muted); flex-shrink: 0; }
.token-row button { flex-shrink: 0; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; margin-bottom: 5px; color: #555; font-size: 12.5px; }
.form-row .hint { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }

/* 弹窗 */
.modal { position: fixed; inset: 0; padding: 16px; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; overflow-y: auto; z-index: 50; }
.modal-card { background: #fff; border-radius: 12px; padding: 24px; width: 380px; max-width: 92vw; max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal-card.wide { width: 560px; }
.modal-card h3 { margin: 0 0 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 16px; }
.form-row.full { grid-column: 1 / -1; }
.form-row.check label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-row.check input { width: auto; }
.invite-credential-option { display: flex; align-items: center; gap: 10px; min-height: 42px; cursor: pointer; }
.invite-credential-option input { flex: 0 0 auto; }
.invite-credential-option span { display: grid; gap: 2px; min-width: 0; }
.invite-credential-option strong { color: var(--text); font-size: 13px; font-weight: 650; }
.invite-credential-option small { color: var(--muted); font-size: 11.5px; }

/* 超话按名搜索 */
.topic-search { display: flex; gap: 8px; }
.topic-search input { flex: 1; }
.topic-search button { flex-shrink: 0; }
.topic-results { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; max-height: 220px; overflow: auto; }
.topic-cand { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.topic-cand:hover { background: #eef2ff; border-color: #c7d2fe; }
.topic-cand img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #eee; flex-shrink: 0; }
.topic-cand .tc-name { font-weight: 600; }
.topic-cand .tc-cnt { color: var(--muted); font-size: 11.5px; margin-left: auto; }

/* 内容池：一键清除按钮组 */
.clean-group { display: inline-flex; gap: 6px; padding: 0 8px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.clean-group button { font-size: 12px; }
.qr-box { text-align: center; margin-top: 16px; }
.qr-box img { width: 200px; height: 200px; border: 1px solid var(--border); border-radius: 8px; }
.qr-status { margin-top: 10px; color: #555; font-size: 13px; }

/* 新增：告警横幅 / 按钮 / 复选 */
button.warn { color: var(--orange); border-color: #f5d9a8; }
.alert-banner { background: #fef3e2; border: 1px solid #f5d9a8; color: #b45309; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px; line-height: 1.7; }
.alert-banner.danger { background: #fdecec; border-color: #f5b5b5; color: #b42318; }
.alert-banner.review { background: #f3eefe; border-color: #d6c7f5; color: #6b3fb4; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #555; white-space: nowrap; }
.chk input { width: auto; }
.badge.used { background: #fff4e5; color: var(--orange); }
.badge.fresh { background: #eef2ff; color: #4f6bed; }

/* 账号页：批量操作条 + 超话分组 + 卡片勾选 */
.batch-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 14px; padding: 8px 12px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; }
.batch-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.batch-hint { color: #b45309; font-size: 13px; }
.acct-group { margin-bottom: 18px; }
.acct-group-head { font-weight: 600; margin: 4px 0 10px; padding: 7px 12px; background: #eef2ff; border-radius: 8px; color: #3949ab; }
.acc-sel { width: 18px; height: 18px; flex: 0 0 auto; margin-right: 6px; cursor: pointer; }
#proxyText { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; padding: 8px; border: 1px solid #d1d5db; border-radius: 8px; box-sizing: border-box; }

/* 采集：常用博主 chips + 任务进度 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #f0f1f3; border-radius: 14px; padding: 4px 6px 4px 12px; font-size: 13px; }
.chip a { cursor: pointer; color: var(--text); }
.chip b { cursor: pointer; color: var(--muted); font-weight: 700; padding: 0 6px; }
.chip b:hover { color: var(--red); }
.job-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.job-item { border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.job-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.job-head button { padding: 3px 10px; font-size: 12px; }
.progress { height: 8px; background: #eef0f3; border-radius: 5px; margin-top: 8px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); transition: width .3s; }

/* 发布计划弹窗 */
.modal-card.xwide { width: 720px; }
.pub-toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.import-row, .mode-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.import-row input, .import-row select, .mode-row input { width: auto; }
.pub-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pub-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.pub-tabs button { padding: 8px 14px; cursor: pointer; font-size: 13px; color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; }
.pub-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.queue-list { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow: auto; }

.interact-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 12px; }
.agent-health { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0 0 12px; padding: 9px 12px; border: 1px solid var(--border); border-left: 3px solid #9ca3af; border-radius: 6px; background: #fff; color: var(--muted); font-size: 12px; }
.agent-health b { color: inherit; font-size: 12.5px; }
.agent-health span { text-align: right; }
.agent-health.ok { border-left-color: #24845d; color: #176b4b; }
.agent-health.bad { border-left-color: var(--red); color: var(--red); }
.interact-kpi { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: #fafbfc; }
.interact-kpi b { display: block; font-size: 20px; margin-bottom: 2px; }
.interact-kpi small { display: block; font-size: 10.5px; opacity: .85; margin-top: 1px; }
.interact-progress-body { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.interact-progress-body .log-table { border-radius: 0; }
.interact-progress-body .empty { padding: 22px; text-align: center; color: var(--muted); }

/* 加V认证徽章 */
.badge.vy { background: #fff4e5; color: var(--orange); }
.badge.vb { background: #eaf1ff; color: #2f6bff; }

/* 内容池：勾选栏 + 条目勾选框 */
.pool-actionbar { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; flex-wrap: wrap; }
.content-item .pool-chk { width: 18px; height: 18px; margin-top: 2px; flex: none; }

/* 发布弹窗：账号多选 + 单选竖排 */
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 34vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.chk.block { display: flex; white-space: normal; margin: 2px 0; }
.chk.block input { flex: none; }

/* 编辑弹窗：图片格 */
.edit-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.edit-img { position: relative; }
.edit-img img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; background: #eee; }
.edit-img b { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; line-height: 18px; text-align: center; background: var(--red); color: #fff; border-radius: 50%; font-size: 12px; cursor: pointer; }

/* ==================== 数据驾驶舱 ==================== */
/* V 等级徽章：金/橙/黄/蓝 */
.vbadge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.vbadge.vgold { background: #fff5d6; color: #b8860b; border: 1px solid #f2d675; }
.vbadge.vorange { background: #ffedd8; color: #d9691a; border: 1px solid #f7c088; }
.vbadge.vyellow { background: #fdf3c8; color: #a88300; border: 1px solid #ecd98a; }
.vbadge.vblue { background: #e3f0ff; color: #1668dc; border: 1px solid #a9cbf7; }
.vbadge.voff { background: #eef0f3; color: var(--muted); }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.kpi-v { font-size: 22px; font-weight: 700; }
.kpi-t { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.kpi-good .kpi-v { color: var(--green); }
.kpi.kpi-warn .kpi-v { color: var(--orange); }
.kpi.kpi-bad .kpi-v { color: var(--red); }
.kpi.kpi-orange .kpi-v { color: #d9691a; }
.kpi.kpi-yellow .kpi-v { color: #a88300; }
/* 可点筛选的 KPI 方块 */
.kpi.clickable { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.kpi.clickable:hover { border-color: var(--primary); }
.kpi.clickable.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }

.ck-goal { font-size: 12px; margin-bottom: 10px; }
.ck-bucketbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.bchip { padding: 5px 14px; border: 1px solid var(--border); border-radius: 16px; background: #fff; cursor: pointer; font-size: 13px; }
.bchip:hover { background: #f0f1f3; }
.bchip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.cockpit-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.cockpit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cockpit-table th, .cockpit-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cockpit-table th { background: #fafbfc; color: var(--muted); font-weight: 500; position: sticky; top: 0; }
.cockpit-table.small th, .cockpit-table.small td { padding: 7px 10px; }
.cockpit-table tr.ck-row { cursor: pointer; }
.cockpit-table tr.ck-row:hover { background: #fafbff; }
.cockpit-table tr.row-fail { opacity: .55; }
.ck-acc { display: flex; align-items: center; gap: 8px; }
.ck-acc img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #eee; }
.ck-miss { color: var(--red); font-size: 12px; white-space: normal; max-width: 180px; }

.pbar { position: relative; height: 16px; background: #eef0f3; border-radius: 8px; overflow: hidden; min-width: 90px; }
.pbar-fill { height: 100%; border-radius: 8px; }
.pbar-fill.pf-read { background: #4f6bed; }
.pbar-fill.pf-fans { background: #d9691a; }
.pbar-txt { position: absolute; inset: 0; font-size: 10px; text-align: center; line-height: 16px; color: #333; }
.cockpit-table small { color: var(--muted); font-size: 11px; }

.pill { font-size: 11px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.pill-good { background: #e7f8ee; color: var(--green); }
.pill-warn { background: #fff4e5; color: var(--orange); }
.pill-bad { background: #fdeaea; color: var(--red); }
.bk { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.bk.bk-reached { background: #e7f8ee; color: var(--green); }
.bk.bk-sprint { background: #fff4e5; color: #d9691a; }
.bk.bk-nurture { background: #eef2ff; color: #4f6bed; }
.bk.bk-stalled { background: #fdeaea; color: var(--red); }

.event-list { display: flex; flex-direction: column; gap: 6px; max-height: 380px; overflow-y: auto; }
.ev { display: flex; gap: 10px; align-items: center; font-size: 12px; padding: 6px 10px; border-radius: 8px; background: #fafbfc; border: 1px solid var(--border); }
.ev-date { color: var(--muted); width: 82px; flex-shrink: 0; }
.ev-tag { font-weight: 600; width: 68px; flex-shrink: 0; }
.ev-acc { width: 120px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-msg { color: var(--text); }
.ev.ev-good .ev-tag { color: var(--green); }
.ev.ev-bad .ev-tag { color: var(--red); }
.ev.ev-warn .ev-tag { color: var(--orange); }
.ev.ev-info .ev-tag { color: var(--muted); }

.ck-detail-summary { margin-bottom: 14px; }
.ck-sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; font-size: 13px; }
.ck-sum-grid > div { background: #fafbfc; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }

/* 内容池/发布计划：不预加载图片，只显示数量占位（点编辑再看图） */
.ci-imgs-lazy { display: inline-block; margin: 6px 0; padding: 3px 10px; border-radius: 8px; background: #eef2ff; color: #4f6bed; font-size: 12px; }

/* 内容池分类标签 */
.ty-badge { font-size: 11px; padding: 1px 8px; border-radius: 8px; font-weight: 600; }
.ty-badge.ty-text { background: #eef0f3; color: #666; }
.ty-badge.ty-image { background: #eef2ff; color: #4f6bed; }
.ty-badge.ty-video { background: #fdeaea; color: #ef4444; }
.ci-imgs-lazy.ci-video { background: #fdeaea; color: #ef4444; }

/* 侧边栏未读小红点 */
.nav-badge { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 4px; font-size: 11px; line-height: 16px; text-align: center; color: #fff; background: var(--red); border-radius: 9px; font-weight: 700; }
.nav-badge.hidden { display: none; }

/* 批量设置：勾选式三态 */
label.chk.gate { font-weight: 600; color: var(--text); }
label.chk.gate input { margin-right: 4px; }
#batchModal select:disabled { background: #f2f3f5; color: var(--muted); cursor: not-allowed; }

/* 通知历史列表 */
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.notif-item.unread { border-left: 3px solid var(--primary); background: #fff8f8; }
.notif-item.read { opacity: 0.7; }
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; }
.notif-body { font-size: 12px; color: #555; margin-top: 3px; line-height: 1.6; }
.notif-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.notif-actions { display: flex; gap: 6px; flex-shrink: 0; }
.notif-actions button { font-size: 12px; padding: 2px 10px; }

/* 立即签到按钮：进行中(灰) / 成功(绿) */
button.btn-busy { opacity: .65; cursor: wait; background: #eef0f3; color: var(--muted); }
button.btn-ok { background: var(--green) !important; color: #fff !important; border-color: var(--green) !important; }

/* 签到进度弹窗 */
.checkin-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; margin: 10px 0; }
.checkin-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); font-size: 13px; }
.checkin-row .cki-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 会员 / 运营分站 ---- */
/* 运营态：隐藏一切管理员专属控件（批量、加号、策略动作、代理列） */
.role-operator .batch-bar,
.role-operator #addAccountBtn,
.role-operator #checkinStatusBtn,
.role-operator #acctTabs,
.role-operator .acc-sel,
.role-operator .acc-row-actions,
.role-operator .acc-row-proxy { display: none !important; }
/* 运营端：数据看板标题行 */
.op-dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 0 10px; flex-wrap: wrap; }
/* 账号行内的「归属运营」下拉（仅超管可见） */
.acc-row-owner select { max-width: 130px; padding: 3px 6px; font-size: 12px; border-radius: 6px; }
/* 运营列表 */
.op-table { width: 100%; border-collapse: collapse; }
.op-table th, .op-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
.op-table th { color: var(--muted); font-weight: 600; }
.op-actions button { margin-right: 6px; }

/* ---- 发布框 ---- */
.compose-box { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
.compose-text { width: 100%; min-height: 200px; resize: vertical; font-size: 15px; line-height: 1.6; }
.compose-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.topic-inline { position: relative; display: flex; gap: 6px; }
.topic-inline input { width: 220px; }
.topic-inline .topic-results { position: absolute; top: 38px; left: 0; z-index: 5; width: 260px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12); overflow: hidden; }
.topic-inline .topic-results a { display: block; padding: 7px 10px; cursor: pointer; font-size: 13px; }
.topic-inline .topic-results a:hover { background: var(--bg); }
.compose-side { display: flex; flex-direction: column; gap: 8px; }
.compose-lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.compose-side .pick-list { max-height: 180px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.compose-submit { margin-top: 10px; }
.cp-cell-text { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) { .compose-box { grid-template-columns: 1fr; } }

/* 选号：底部 chips */
.compose-picked { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 12px; }
.compose-picked-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pick-open-btn { background: #fff; border: 1px dashed var(--orange); color: #b45309; font-weight: 600; }
.pick-open-btn:hover { background: #fff7ed; }
.picked-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 26px; }
.acc-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff7ed; border: 1px solid #fed7aa; color: #b45309; border-radius: 14px; padding: 4px 10px; font-size: 13px; }
.acc-chip.chip-bad { background: #fef2f2; border-color: #fecaca; color: var(--red); }
.acc-chip b { cursor: pointer; font-weight: 700; opacity: .6; }
.acc-chip b:hover { opacity: 1; }

/* 选号弹窗工具条 */
.cp-acc-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cp-acc-tools input { flex: 1; }

/* 发布按钮 + 下拉菜单 */
.pub-btn-wrap { position: relative; margin-top: 10px; }
.compose-submit { width: 100%; }
.pub-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 20; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); overflow: hidden; }
.pub-menu a { display: block; padding: 11px 14px; cursor: pointer; font-size: 14px; }
.pub-menu a:hover { background: #fff7ed; }
.pub-menu a + a { border-top: 1px solid var(--border); }

/* 橙色月历（定时发布） */
.cal-wrap { border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-weight: 600; }
.cal-nav { padding: 2px 12px; font-size: 18px; line-height: 1; border-radius: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wds { margin-bottom: 4px; }
.cal-wd { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal-cell { min-height: 34px; text-align: center; padding: 8px 0; border: 0; border-radius: 8px; background: transparent; box-shadow: none; font-size: 13px; cursor: pointer; user-select: none; }
.cal-cell[data-day]:hover { background: #fff7ed; }
.cal-empty { cursor: default; }
.cal-past { color: #cbd0d8; cursor: not-allowed; }
.cal-today { box-shadow: inset 0 0 0 1px var(--orange); }
.cal-sel { background: var(--orange) !important; color: #fff; font-weight: 700; }
.cal-time-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.cal-time-row > span { white-space: nowrap; }
.cal-time-row select { padding: 7px 10px; border-color: var(--orange); font-size: 15px; }
.cal-colon { font-weight: 700; }
.cal-preview { margin-top: 12px; font-size: 13px; color: #b45309; font-weight: 600; }

/* WEIQ 红人：按登录、名单执行、可选设置组织的紧凑工作区。 */
#tab-weiq { max-width: 1500px; margin: 0 auto; letter-spacing: 0; }
#tab-weiq *, #tab-weiq *::before, #tab-weiq *::after { letter-spacing: 0; }
.weiq-page-head { min-height: 32px; margin-bottom: 10px; }
.weiq-page-head #weiqPageState { margin-left: auto; font-variant-numeric: tabular-nums; }
.weiq-section { padding: 14px 0 16px; border-top: 1px solid var(--border); }
.weiq-section:last-child { border-bottom: 1px solid var(--border); }
.weiq-section-head { display: flex; align-items: center; gap: 10px; min-height: 30px; margin-bottom: 10px; }
.weiq-section-head h3, .weiq-section-head b { margin: 0; font-size: 14px; font-weight: 650; }
.weiq-section-head small { display: block; margin-top: 1px; color: var(--muted); font-size: 11px; font-weight: 400; }
.weiq-step { display: inline-grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 4px; background: #e9edf3; color: #303846; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.weiq-status-line, .weiq-detail-head, .weiq-subhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.weiq-status-line { min-height: 40px; padding: 7px 10px; background: #f7f8fa; border-left: 3px solid var(--primary); }
.weiq-status-line > div:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.weiq-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.weiq-capture { margin-top: 9px; padding: 11px 12px 10px; background: #f7f8fa; border: 1px solid var(--border); border-radius: 6px; }
.weiq-capture-head, .weiq-capture-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.weiq-capture-head b { display: block; color: #303846; font-size: 13px; }
.weiq-capture-head small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.weiq-capture-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 11px 0 9px; padding: 0; list-style: none; }
.weiq-capture-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 7px; align-items: start; min-width: 0; padding: 4px 12px 4px 0; }
.weiq-capture-steps li + li { padding-left: 12px; border-left: 1px solid var(--border); }
.weiq-capture-number { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid #cbd2dc; border-radius: 50%; background: #fff; color: #697386; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.weiq-capture-steps b, .weiq-capture-steps small { display: block; overflow-wrap: anywhere; }
.weiq-capture-steps b { color: #697386; font-size: 12px; line-height: 1.4; }
.weiq-capture-steps small { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.weiq-capture-steps li[data-state="active"] .weiq-capture-number { border-color: var(--primary); background: var(--primary); color: #fff; }
.weiq-capture-steps li[data-state="active"] b { color: var(--text); }
.weiq-capture-steps li[data-state="done"] .weiq-capture-number { border-color: #2f7d4d; background: #e5f4e9; color: #22623b; }
.weiq-capture-steps li[data-state="done"] b { color: #22623b; }
.weiq-capture-steps li[data-state="error"] .weiq-capture-number { border-color: #b95050; background: #fae8e8; color: #8b2f2f; }
.weiq-capture-footer { min-height: 30px; padding-top: 7px; border-top: 1px solid var(--border); }
.weiq-capture-footer #weiqCapStatus { min-width: 0; line-height: 1.45; }
.weiq-capture-note { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.weiq-inline-details { margin-top: 10px; border-top: 1px solid var(--border); }
.weiq-inline-details > summary { padding: 9px 0 4px; color: #4b5563; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.weiq-manual-cookie { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; padding-top: 5px; }
#weiqManualCookieSecurity { grid-column: 1 / -1; margin: 0; }
.weiq-workspace { display: grid; grid-template-columns: minmax(230px, 290px) minmax(0, 1fr); min-height: 420px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--card); }
.weiq-list-pane { min-width: 0; padding: 12px; border-right: 1px solid var(--border); background: #f8f9fb; }
.weiq-list-create { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.weiq-list-create label { grid-column: 1 / -1; color: #4b5563; font-size: 12px; font-weight: 600; }
.weiq-list-create #weiqNewNote { grid-column: 1 / -1; }
.weiq-list-pane .job-list { max-height: 560px; margin-top: 10px; overflow-y: auto; gap: 6px; }
.weiq-list-item { display: block; width: 100%; padding: 9px 10px; text-align: left; background: #fff; border-color: var(--border); border-radius: 6px; color: var(--text); }
.weiq-list-item:hover { background: #f2f5f8; }
.weiq-list-item.active { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.weiq-list-item .job-head { display: flex; gap: 6px; }
.weiq-list-meta, .weiq-list-note { display: block; margin-top: 5px; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.weiq-detail-pane { min-width: 0; padding: 13px 14px 18px; }
.weiq-empty { display: flex; min-height: 350px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--muted); text-align: center; }
.weiq-empty b { color: #4b5563; font-size: 14px; }
.weiq-detail-head { align-items: flex-start; margin-bottom: 6px; }
.weiq-detail-head h3 { margin: 0 0 5px; font-size: 15px; }
.weiq-detail-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.weiq-run-summary { min-height: 42px; margin: 8px 0 12px; padding: 8px 10px; background: #f8f9fb; border-left: 3px solid #aeb7c4; }
.weiq-run-summary .progress { margin: 0 0 6px; }
#tab-weiq .progress-bar { background: var(--primary) !important; }
#weiqProgressText, #weiqRunMeta { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.weiq-run-history { margin: -5px 0 10px; }
.weiq-run-history-list { border-top: 1px solid var(--border); }
.weiq-run-history-row { display: grid; grid-template-columns: 135px 80px 200px minmax(180px, 1fr); gap: 8px; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--border); font-size: 11.5px; }
.weiq-run-history-row time { color: var(--muted); font-variant-numeric: tabular-nums; }
.weiq-run-history-row > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.weiq-run-history-failures { grid-column: 1 / -1; min-width: 0; }
.weiq-run-history-failures summary { width: fit-content; color: #9a6700; cursor: pointer; font-weight: 600; }
.weiq-run-history-failures ul { margin: 6px 0 1px; padding-left: 20px; color: #7a2f2f; line-height: 1.55; }
.weiq-run-history-failures code { color: inherit; font-size: 10.5px; }
.weiq-import-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.weiq-subhead { align-items: flex-end; margin-top: 15px; padding: 10px 0 6px; border-top: 1px solid var(--border); }
.weiq-subhead h4 { display: inline; margin: 0 7px 0 0; font-size: 13px; }
.weiq-subhead .muted { font-size: 11.5px; }
.weiq-empty-row, .weiq-loading { margin: 0; padding: 18px 10px; text-align: center; }
.weiq-target-table { min-width: 760px; }
.weiq-target-table td:first-child { min-width: 130px; }
.weiq-target-table td:nth-child(2) { min-width: 170px; }
.weiq-target-table td:nth-child(3) { min-width: 210px; }
.weiq-target-table small, .weiq-result-table small { display: block; max-width: 270px; margin-top: 3px; color: var(--muted); line-height: 1.35; white-space: normal; }
.weiq-target-note { min-width: 190px; padding: 5px 7px; }
.weiq-row-actions { display: flex; gap: 5px; }
.weiq-row-actions button { padding: 4px 7px; font-size: 11.5px; }
.weiq-list-delivery { margin-top: 12px; }
.weiq-list-delivery .form-grid { padding-top: 7px; }
.weiq-result-table { min-width: 1180px; }
.weiq-result-table td { vertical-align: top; }
.weiq-result-table td:first-child { min-width: 145px; }
.weiq-result-stale td { border-top-color: #d7b96d; }
.weiq-stale-note { color: #9a6700 !important; font-weight: 650; }
.weiq-source-cell { min-width: 175px; }
.weiq-source { display: grid; grid-template-columns: 38px auto; align-items: center; gap: 4px 6px; margin-bottom: 4px; }
.weiq-source > b { color: #4b5563; font-size: 11px; }
.weiq-source > small { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weiq-advanced > summary { margin: 0; list-style-position: inside; cursor: pointer; }
.weiq-advanced[open] > summary { margin-bottom: 9px; }
.weiq-config-grid { display: grid; grid-template-columns: minmax(240px, .75fr) minmax(420px, 1.25fr); gap: 20px; }
.weiq-config-group { min-width: 0; }
.weiq-config-group + .weiq-config-group { padding-left: 20px; border-left: 1px solid var(--border); }
.weiq-config-group h3 { margin: 0 0 10px; font-size: 13px; }
.weiq-auth-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.weiq-segmented { display: inline-flex; overflow: hidden; border: 1px solid var(--border); border-radius: 4px; background: #fff; }
.weiq-segmented label { position: relative; margin: 0; cursor: pointer; }
.weiq-segmented label + label { border-left: 1px solid var(--border); }
.weiq-segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.weiq-segmented span { display: block; min-width: 76px; padding: 6px 10px; color: #4b5563; text-align: center; }
.weiq-segmented input:checked + span { background: #e9edf3; color: #20252d; font-weight: 650; }
.weiq-segmented input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }
#weiqFsAuthStatus { font-size: 11.5px; }
.weiq-schedule-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; }
.weiq-schedule-row label { display: inline-flex; align-items: center; gap: 7px; margin-right: auto; }
.weiq-schedule-row input[type="checkbox"] { width: auto; }
.weiq-schedule-row input[type="number"] { width: 64px; }
#weiqAutoStatus { flex: 1 0 100%; font-size: 11.5px; text-align: right; }
.weiq-warn { color: #9a6700; }
.weiq-requirements { margin-top: 9px; padding: 8px 10px; background: #f8f9fb; font-size: 12px; }
.weiq-requirements ul { margin: 5px 0 0; padding-left: 19px; line-height: 1.6; }

@media (max-width: 980px) {
  .weiq-workspace { grid-template-columns: 1fr; }
  .weiq-list-pane { border-right: 0; border-bottom: 1px solid var(--border); }
  .weiq-list-pane .job-list { max-height: 250px; }
  .weiq-config-grid { grid-template-columns: 1fr; gap: 15px; }
  .weiq-config-group + .weiq-config-group { padding: 15px 0 0; border-left: 0; border-top: 1px solid var(--border); }
}

/* 窄屏：顶部栏 + 可关闭抽屉，主内容始终使用完整视口宽度。 */
@media (max-width: 760px) {
  body.mobile-nav-open { overflow: hidden; }
  .app-view { display: block; min-height: 100dvh; }
  .mobile-header {
    position: sticky; top: 0; z-index: 35; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center; gap: 10px; min-height: 54px; padding: 6px 12px; background: #1f2329; color: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.16);
  }
  .mobile-menu-btn, .mobile-nav-close {
    display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-color: #4b5058;
    background: transparent; color: #fff; font-size: 22px; line-height: 1;
  }
  .mobile-menu-btn:hover, .mobile-nav-close:hover { background: rgba(255,255,255,.1); }
  .mobile-brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
  .mobile-page-title { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cdd2da; font-size: 13px; font-weight: 500; }

  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 45; width: min(82vw, 300px); max-width: 100%;
    min-height: 100dvh; transform: translateX(-100%); transition: transform .18s ease;
    box-shadow: 8px 0 24px rgba(0,0,0,.28); overflow: hidden;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-head { flex: 0 0 auto; border-bottom: 1px solid #333; }
  .sidebar-head .logo { min-width: 0; padding: 17px 18px; }
  .mobile-nav-close { margin-right: 10px; border: 0; font-size: 28px; }
  .sidebar nav { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0; }
  .sidebar nav a { padding: 11px 18px; }
  .sidebar-foot { flex: 0 0 auto; padding: 12px 18px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .mobile-nav-backdrop {
    position: fixed; inset: 0; z-index: 40; display: block; width: 100%; height: 100%; padding: 0; border: 0;
    border-radius: 0; background: rgba(0,0,0,.48); cursor: default;
  }
  .mobile-nav-backdrop:hover { background: rgba(0,0,0,.48); }

  .main { width: 100%; min-width: 0; padding: 16px 12px 28px; overflow: visible; }
  .tab, .tab > *, .settings-block { min-width: 0; max-width: 100%; }
  .tab-head { align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
  .tab-head h2 { flex: 1 1 160px; overflow-wrap: anywhere; }
  .tab-head > .muted { flex: 1 0 100%; }
  .filters { width: 100%; }
  .filters > * { flex: 1 1 auto; min-width: 0; }
  .filters input, .filters select { width: 100%; }
  button { min-height: 36px; white-space: normal; }

  #tab-settings:not(.hidden), #tab-collect:not(.hidden), #tab-interact:not(.hidden) { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .settings-block { padding: 14px 12px; }
  .interact-status, .agent-health { align-items: flex-start; flex-direction: column; gap: 2px; }
  .agent-health span { text-align: left; }
  .iron-section-head { align-items: stretch; flex-direction: column; gap: 10px; }
  .iron-section-head > button { align-self: flex-start; }
  .iron-master-switch { justify-content: space-between; width: 100%; min-height: 36px; padding: 0 2px; }
  .iron-master-switch span { width: 100%; justify-content: space-between; }
  .iron-action-grid { grid-template-columns: minmax(0, 1fr); }
  .iron-action-switch, .iron-fixed-action { min-height: 58px; border-right: 0; border-bottom: 1px solid var(--border); }
  .iron-action-grid > :last-child { border-bottom: 0; }
  .iron-assignment-workspace { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .iron-target-pane { border-right: 0; border-bottom: 1px solid var(--border); }
  .iron-target-list { max-height: 248px; }
  .iron-actor-toolbar { align-items: flex-end; flex-wrap: wrap; }
  .iron-actor-toolbar > div { flex: 1 1 190px; min-width: 0; }
  .iron-actor-row { grid-template-columns: 22px 36px minmax(0, 1fr); padding: 10px 12px; }
  .iron-actor-row .iron-client-state { grid-column: 3; }
  .iron-control-actions, .iron-assignment-actions { align-items: stretch; flex-direction: column; }
  .iron-control-actions button, .iron-assignment-actions button { width: 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .form-row.full { grid-column: auto; }
  .token-row, .topic-search, .compose-toolbar, .cp-acc-tools, .cal-time-row { flex-wrap: wrap; }
  .token-row input, .topic-search input, .cp-acc-tools input { flex: 1 1 180px; min-width: 0; }
  .token-row label { width: 100%; }
  .topic-inline { width: 100%; min-width: 0; flex-wrap: wrap; }
  .topic-inline input { flex: 1 1 180px; width: auto; min-width: 0; }
  .topic-inline .topic-results { top: 42px; width: min(100%, 260px); }
  .compose-toolbar > .muted { margin-left: auto; }
  .compose-picked-head { flex-wrap: wrap; }

  .batch-bar { align-items: stretch; gap: 8px; padding: 10px; }
  .batch-hint { flex: 1 0 100%; }
  .batch-actions { width: 100%; margin-left: 0; }
  .batch-actions button { flex: 1 1 130px; }
  .workspace-kpis { grid-template-columns: 1fr 1fr; }
  .workspace-columns { grid-template-columns: 1fr; gap: 0; }
  .compact-head { display: none; }
  .compact-row, .compact-row.five { grid-template-columns: 1fr 1fr; gap: 7px 12px; }
  .compact-row > b { grid-column: 1 / -1; }
  .plan-row { grid-template-columns: 1fr 1fr; padding: 12px; }
  .plan-account, .plan-state, .plan-actions { grid-column: 1 / -1; }
  .plan-actions { justify-content: stretch; }
  .plan-actions button { flex: 1; }
  .segmented { display: flex; width: 100%; }
  .segmented button { flex: 1; }
  .selection-tray { top: 62px; align-items: flex-start; flex-wrap: wrap; }
  .result-actions { flex-wrap: wrap; }
  .result-actions button { flex: 1 1 130px; }
  .acc-row { grid-template-columns: 20px 32px minmax(0, 1fr); align-items: start; gap: 8px; padding: 10px; }
  .acc-row-main { grid-column: 3; }
  .acc-row-topic, .acc-row-stat, .acc-row-owner, .acc-row-time { grid-column: 2 / -1; }
  .acc-row-time { display: block; }
  .acc-row-actions { grid-column: 2 / -1; justify-content: stretch; }
  .acc-row-actions > .account-primary { flex: 1; }
  .account-menu { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: 70dvh; overflow-y: auto; }
  .pub-tabs { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
  .pub-tabs button { flex: 0 0 auto; white-space: nowrap; }
  #interactInlineTabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow-x: visible; }
  #interactInlineTabs button { width: 100%; min-width: 0; white-space: normal; }
  .content-item { padding: 12px 10px; flex-wrap: wrap; }
  .ci-actions { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .ci-actions > * { flex: 1 1 auto; }
  .pool-actionbar > button { flex: 1 1 130px; }
  .clean-group { display: flex; width: 100%; padding: 8px 0; border: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
  .clean-group button { flex: 1 1 130px; }
  .notif-item { flex-wrap: wrap; }
  .notif-actions { width: 100%; flex-wrap: wrap; }
  .notif-actions button { flex: 1 1 auto; }

  .table-scroll, .cockpit-wrap, .interact-progress-body, #opList, #composeList, #ipPoolList, #invList { max-width: 100%; overflow-x: auto; }
  .op-table, .interact-progress-body .log-table, #ipPoolList .log-table, #invList .log-table { min-width: 620px; }
  .interact-progress-body .interact-pending-table { min-width: 680px; }
  .log-table th, .log-table td { white-space: nowrap; }
  .event-list { overflow-x: auto; }
  .ev { min-width: 540px; }

  .modal { align-items: flex-start; padding: 12px; overflow-y: auto; }
  .modal-card, .modal-card.wide, .modal-card.xwide {
    width: 100%; max-width: 100%; max-height: calc(100dvh - 24px); margin: auto 0; padding: 18px 14px; overflow-y: auto;
  }
  .modal-actions { position: sticky; bottom: -18px; z-index: 2; padding: 10px 0 0; background: #fff; flex-wrap: wrap; }
  .modal-actions button { flex: 1 1 120px; }
  .qr-box img { width: min(200px, 100%); height: auto; aspect-ratio: 1; }
  .login-view { padding: 16px; }
  .login-card { width: 100%; max-width: 340px; padding: 28px 22px; }
  .weiq-section { padding: 12px 0 14px; }
  .weiq-status-line, .weiq-detail-head, .weiq-subhead { align-items: stretch; flex-direction: column; }
  .weiq-status-line .weiq-actions, .weiq-detail-head .weiq-actions { width: 100%; }
  .weiq-status-line .weiq-actions button, .weiq-detail-head .weiq-actions button { flex: 1 1 120px; }
  .weiq-capture-head, .weiq-capture-footer { align-items: stretch; flex-direction: column; }
  .weiq-capture-head > button, .weiq-capture-footer > button { width: 100%; }
  .weiq-capture-steps { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .weiq-capture-steps li { min-height: 48px; padding: 3px 0; }
  .weiq-capture-steps li + li { padding: 8px 0 3px; border-top: 1px solid var(--border); border-left: 0; }
  .weiq-manual-cookie, .weiq-import-row { grid-template-columns: minmax(0, 1fr); }
  .weiq-workspace { min-height: 0; }
  .weiq-list-pane, .weiq-detail-pane { padding: 11px 10px 14px; }
  .weiq-empty { min-height: 180px; }
  .weiq-list-create { grid-template-columns: minmax(0, 1fr); }
  .weiq-list-create label, .weiq-list-create #weiqNewNote { grid-column: auto; }
  .weiq-row-actions { min-width: 150px; }
  .weiq-run-history-row { grid-template-columns: 1fr auto; }
  .weiq-run-history-row > span:nth-child(3), .weiq-run-history-row > span:last-child { grid-column: 1 / -1; }
  .weiq-advanced > summary { align-items: center; flex-direction: row; }
  .weiq-schedule-row label { flex: 1 0 100%; }
  #weiqAutoStatus { text-align: left; }
}

/* 切页渐入：display none→block 会重新触发 animation，正好用来消除切 tab 的硬切闪屏 */
.tab:not(.hidden) { animation: tab-fade-in .18s ease-out; }
@keyframes tab-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
  .tab:not(.hidden) { animation: none; }
}
