:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #172033;
  background: #f4f6fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
a {
  font: inherit;
}

button {
  border: 1px solid #cfd7e6;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  padding: 9px 14px;
  cursor: pointer;
}

button:hover,
.back-link:hover {
  border-color: #7c8ba3;
}

button.primary {
  background: #1769e0;
  border-color: #1769e0;
  color: #fff;
}

button.secondary {
  background: #eef5ff;
  border-color: #c9ddff;
  color: #1459bd;
}

button.wide {
  width: 100%;
  margin-top: 14px;
}

.v2-shell {
  display: grid;
  grid-template-columns: 292px 1fr;
  min-height: 100vh;
}

.v2-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  background: #101828;
  color: #e5eaf3;
  padding: 22px 18px;
}

.back-link {
  display: inline-flex;
  border: 1px solid #344052;
  border-radius: 10px;
  color: #dbe5f4;
  text-decoration: none;
  padding: 8px 11px;
  margin-bottom: 20px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.brand > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, #1769e0, #5b8cff);
  font-weight: 800;
}

.brand h1 {
  font-size: 18px;
  margin: 0 0 5px;
}

.brand p,
.panel-head p,
.eyebrow,
.muted-text {
  margin: 0;
  color: #6b778c;
}

/* ★ 企业切换下拉 */
.eyebrow-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.enterprise-switch {
  max-width: 220px;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border, #dfe3ea);
  background: transparent;
  color: #6b778c;
  cursor: pointer;
}

.brand p {
  color: #aab6c8;
  font-size: 13px;
}

.section-nav {
  display: grid;
  gap: 8px;
}

.section-nav button {
  width: 100%;
  text-align: left;
  color: #dbe5f4;
  background: transparent;
  border-color: transparent;
  padding: 11px 12px;
}

/* ★ 拆分架构：桌面版「管理后台」入口 */
.section-nav button.nav-web-console {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  color: #93c5fd;
}
.section-nav button.nav-web-console:hover {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}
.section-nav button.nav-web-console strong {
  font-size: 13px;
}
.section-nav button.nav-web-console span {
  color: rgba(219, 229, 244, 0.55);
}

.section-nav button strong,
.section-nav button span {
  display: block;
}

.section-nav button span {
  margin-top: 4px;
  color: #9aa7bc;
  font-size: 12px;
}

.section-nav button.active {
  background: #263244;
  border-color: #3c4b63;
}

.v2-main {
  padding: 26px;
  min-width: 0;
}

.v2-topbar,
.panel-head,
.actions,
.status-strip,
.badge-row,
.chip-row {
  display: flex;
  align-items: center;
}

.v2-topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.v2-topbar h2 {
  margin: 2px 0 6px;
  font-size: 26px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.actions,
.badge-row,
.chip-row {
  gap: 10px;
  flex-wrap: wrap;
}

.status-strip {
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.pill {
  border: 1px solid #d8dfeb;
  border-radius: 12px;
  background: #fff;
  padding: 10px 13px;
  min-width: 126px;
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.04);
}

.pill strong {
  display: block;
  font-size: 19px;
}

.pill span {
  color: #6b778c;
  font-size: 12px;
}

.notice-panel {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #cad7ea;
  border-radius: 12px;
  background: #fff;
  color: #35445c;
}

.notice-panel.success {
  border-color: #a7dfb8;
  background: #f0fff4;
  color: #176c35;
}

.notice-panel.error {
  border-color: #ffc3c3;
  background: #fff3f3;
  color: #a92222;
}

.layout {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.layout.single {
  grid-template-columns: minmax(0, 1fr);
}

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

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

.panel,
.hero-card {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 16px;
  padding: 18px;
  min-width: 0;
  box-shadow: 0 10px 26px rgba(23, 32, 51, 0.045);
}

.panel-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-head h3 {
  margin: 0;
  font-size: 17px;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.hero-card h3 {
  margin: 4px 0 6px;
  font-size: 25px;
}

.hero-card p {
  margin: 0 0 8px;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-end;
  min-width: 220px;
}

.hero-meta a {
  color: #1769e0;
  text-decoration: none;
  word-break: break-all;
}

.chip-row {
  margin-top: 10px;
}

.chip-row span {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1459bd;
  font-size: 12px;
}

.chip-row.subtle span {
  background: #f1f4f9;
  color: #526176;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  background: #eef2f7;
  color: #526176;
  white-space: nowrap;
}

.badge.ok {
  background: #eaf9ef;
  color: #167239;
}

.badge.warn {
  background: #fff4db;
  color: #9a6000;
}

.badge.bad {
  background: #ffecec;
  color: #b42318;
}

.badge.muted {
  background: #eef2f7;
  color: #6b778c;
}

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

.metric-grid div {
  border: 1px solid #e2e8f2;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.metric-grid strong {
  display: block;
  font-size: 22px;
}

.metric-grid span {
  color: #6b778c;
  font-size: 12px;
}

.check-list,
.ordered {
  margin: 0;
  padding-left: 20px;
}

.check-list li,
.ordered li {
  margin: 9px 0;
}

.check-list li.done::marker {
  content: "✓  ";
  color: #167239;
}

.check-list li.todo::marker {
  content: "→  ";
  color: #9a6000;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: #526176;
  font-size: 13px;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #d7deea;
  border-radius: 10px;
  padding: 10px 11px;
  color: #172033;
  background: #fff;
  font: inherit;
}

.field textarea {
  resize: vertical;
  min-height: 88px;
}

.inline-field {
  min-width: 180px;
}

.wide-field {
  grid-column: 1 / -1;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfd7e6;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  padding: 9px 14px;
  text-decoration: none;
}

.action-link.primary {
  background: #1769e0;
  border-color: #1769e0;
  color: #fff;
}

.button-row.align-end {
  align-items: flex-end;
}

.faq-editor,
.faq-rows {
  display: grid;
  gap: 12px;
}

.faq-row {
  border: 1px solid #e3e9f3;
  border-radius: 14px;
  padding: 13px;
  background: #fbfdff;
}

.faq-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.faq-row-head strong {
  color: #172033;
}

.ghost.danger {
  border-color: #ffd6d6;
  color: #b42318;
  background: #fff7f7;
}

.ghost.danger.confirming {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-list span {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid #dce5f2;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fbfdff;
  color: #42506a;
  font-size: 12px;
}

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

.list article,
.account-card {
  border: 1px solid #e3e9f3;
  border-radius: 12px;
  padding: 13px;
  background: #fbfdff;
}

.list.compact {
  max-height: 420px;
  overflow: auto;
}

.list strong,
.account-card strong {
  display: block;
  margin-bottom: 6px;
}

.list p,
.account-card p {
  margin: 0 0 6px;
  color: #42506a;
}

.list small {
  color: #7a879a;
}

.entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.entity-grid div {
  border: 1px solid #e3e9f3;
  border-radius: 12px;
  padding: 11px;
  background: #fbfdff;
}

.entity-grid strong,
.entity-grid span {
  display: block;
}

.entity-grid span {
  margin-top: 4px;
  color: #6b778c;
  font-size: 12px;
}

.question-primary h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.question-primary p {
  margin: 0;
  color: #526176;
}

.question-table-help {
  margin-bottom: 10px;
  color: #526176;
  font-size: 13px;
}

.question-table textarea,
.question-table input {
  width: 100%;
  min-width: 150px;
  border: 1px solid #cfd7e6;
  border-radius: 6px;
  background: #fff;
  padding: 8px 9px;
  color: #172033;
  font: inherit;
}

.question-table textarea {
  min-width: 280px;
  resize: vertical;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 150px;
}

.row-actions button {
  padding: 7px 10px;
  font-size: 12px;
}

.cell-note {
  margin-top: 6px;
}

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

th,
td {
  border-bottom: 1px solid #edf1f7;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #526176;
  font-weight: 600;
  background: #f8fafc;
}

.selected-row td {
  background: #f5f9ff;
}

code {
  font-family: Consolas, "SFMono-Regular", monospace;
  color: #0f5ac2;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.asset-card {
  border: 1px solid #e3e9f3;
  border-radius: 14px;
  overflow: hidden;
  background: #fbfdff;
}

.asset-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  background: #eef2f7;
  color: #7a879a;
}

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

.asset-body {
  padding: 12px;
}

.asset-body strong {
  display: block;
  margin-bottom: 6px;
}

.asset-body p {
  margin: 0 0 10px;
  color: #6b778c;
  font-size: 12px;
}

.asset-prompt {
  display: -webkit-box;
  max-height: 86px;
  overflow: hidden;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.asset-prompt span {
  display: inline-block;
  margin-right: 6px;
  color: #172033;
  font-weight: 700;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.card-actions button {
  padding: 7px 10px;
  font-size: 12px;
}

.article-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
}

.article-preview-grid h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.25;
}

.article-preview-grid aside {
  display: grid;
  align-content: start;
  gap: 12px;
}

.article-preview-grid aside h4 {
  margin: 0;
}

.article-body-preview {
  max-height: 680px;
  overflow: auto;
  border: 1px solid #e3e9f3;
  border-radius: 12px;
  padding: 14px;
  background: #fbfdff;
  color: #172033;
  font: 14px/1.7 inherit;
  white-space: pre-wrap;
}

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

.article-image-tile {
  display: grid;
  gap: 6px;
}

.article-image-tile img,
.article-image-tile span {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid #e3e9f3;
  border-radius: 12px;
  background: #eef2f7;
  color: #7a879a;
  object-fit: cover;
  overflow: hidden;
}

.article-image-tile small {
  color: #6b778c;
  font-size: 12px;
}

.article-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.article-toolbar h3,
.article-toolbar p,
.panel-head h3,
.panel-head p {
  margin: 0;
}

.article-toolbar p,
.panel-head p {
  margin-top: 5px;
  color: #6b778c;
  font-size: 13px;
}

.article-workspace-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  background: #e9eef6;
}

.article-workspace-tabs.two-tabs {
  grid-template-columns: repeat(2, minmax(170px, 1fr));
}

.article-workspace-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #526176;
  font-weight: 700;
}

.article-workspace-tabs button span {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d8e0ec;
  font-size: 12px;
}

.article-workspace-tabs button.active {
  background: #fff;
  color: #1459bd;
  box-shadow: 0 2px 7px rgba(23, 32, 51, 0.1);
}

.article-workspace-tabs button.active span {
  background: #e7f0ff;
}

.history-filter-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(118px, 1fr));
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #f4f7fb;
}

.history-filter-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #526176;
  font-size: 13px;
  font-weight: 700;
}

.history-filter-tabs button span {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #e1e8f2;
  color: #526176;
  font-size: 11px;
}

.history-filter-tabs button.active {
  background: #fff;
  color: #1459bd;
  box-shadow: 0 1px 4px rgba(23, 32, 51, 0.12);
}

.history-filter-tabs button.active span {
  background: #e7f0ff;
  color: #1459bd;
}

.badge-row.compact {
  gap: 6px;
}

.badge-row.compact .badge {
  font-size: 11px;
  padding: 4px 7px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.workspace-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  gap: 24px;
  align-items: start;
}

.article-document {
  width: min(100%, 820px);
  margin: 0 auto;
  color: #202939;
}

.article-document header {
  margin-bottom: 18px;
}

.article-document h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 28px;
  line-height: 1.38;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-figure {
  margin: 22px 0;
}

.article-figure img,
.article-image-missing,
.article-cover-missing {
  display: grid;
  place-items: center;
  width: 100%;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  background: #eef2f7;
  color: #6b778c;
  overflow: hidden;
}

.article-figure img {
  object-fit: cover;
}

.article-figure.cover-figure img,
.article-cover-missing {
  aspect-ratio: 16 / 9;
}

.article-figure.body-figure {
  margin: 28px 0;
}

.article-figure.body-figure img,
.article-image-missing {
  aspect-ratio: 16 / 10;
}

.article-figure figcaption {
  margin-top: 7px;
  color: #7a879a;
  font-size: 12px;
  text-align: center;
}

.article-copy {
  font-size: 16px;
  line-height: 1.9;
}

.article-copy h2,
.article-copy h3,
.article-copy h4 {
  margin: 30px 0 12px;
  color: #172033;
  line-height: 1.45;
}

.article-copy h2 {
  font-size: 22px;
}

.article-copy h3,
.article-copy h4 {
  font-size: 19px;
}

.article-copy p,
.article-copy ol,
.article-copy ul {
  margin: 0 0 18px;
}

.article-copy li + li {
  margin-top: 8px;
}

.workflow-sidebar {
  position: static;
  display: grid;
  align-content: start;
  gap: 14px;
  padding-left: 22px;
  border-left: 1px solid #e6ebf3;
}

.workflow-sidebar p {
  margin: 5px 0 0;
  color: #526176;
  font-size: 13px;
  line-height: 1.6;
}

.field-help {
  color: #7a879a;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.field input.input-invalid {
  border-color: #e5484d;
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.1);
}

.publish-confirm-tip,
.publish-action-notice {
  padding: 10px 12px;
  border: 1px solid #dbe7ff;
  border-radius: 8px;
  background: #f5f8ff;
  color: #37517e !important;
}

.publish-action-notice.error {
  border-color: #ffc3c3;
  background: #fff3f3;
  color: #a92222 !important;
}

.publish-action-notice.success {
  border-color: #a7dfb8;
  background: #f0fff4;
  color: #176c35 !important;
}

.publish-action-notice.loading {
  border-color: #c9ddff;
  background: #eef5ff;
  color: #1459bd !important;
}

.sidebar-label,
.sidebar-section-title {
  color: #172033;
  font-size: 13px;
  font-weight: 800;
}

.sidebar-section-title {
  padding-top: 12px;
  border-top: 1px solid #edf1f7;
}

.issue-list {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid #f2d29b;
  border-radius: 8px;
  background: #fffaf0;
}

.issue-list span {
  color: #8a5a13;
  font-size: 13px;
}

.success-hint {
  padding: 10px 12px;
  border: 1px solid #b9e3c5;
  border-radius: 8px;
  background: #f2fbf4;
  color: #28713e !important;
}

.stale-warning {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid #f2d29b;
  border-radius: 8px;
  background: #fffaf0;
  color: #795112;
}

.stale-warning span {
  font-size: 13px;
  line-height: 1.55;
}

.publish-task-editor {
  display: grid;
  gap: 11px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #edf1f7;
}

.publish-hint {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dbe7ff;
  border-radius: 12px;
  background: #f5f8ff;
  color: #37517e;
  font-size: 13px;
  line-height: 1.55;
}

.publish-flow-guidance {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid #dbe7ff;
  border-radius: 8px;
  background: #f5f8ff;
  color: #37517e;
  font-size: 13px;
  line-height: 1.55;
}

.publish-flow-guidance strong {
  color: #1d355a;
}

.publish-flow-guidance small {
  color: #5b6e8c;
}

.publish-flow-guidance.warning {
  border-color: #f2d29b;
  background: #fffaf0;
  color: #795112;
}

.publish-flow-guidance.warning strong,
.publish-flow-guidance.warning small {
  color: #795112;
}

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

.flow-panel div {
  border: 1px solid #e3e9f3;
  border-radius: 12px;
  padding: 13px;
  background: #fbfdff;
}

.flow-panel strong,
.flow-panel span {
  display: block;
}

.flow-panel span {
  margin-top: 6px;
  color: #6b778c;
  font-size: 12px;
}

.account-grid {
  display: grid;
  gap: 10px;
}

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

.account-card-side {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.account-editor {
  align-items: end;
}

.detection-console,
.detection-health {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #edf1f7;
}

.detection-console pre {
  max-height: 320px;
  overflow: auto;
}

.contract-list {
  display: grid;
  gap: 14px;
  max-height: 720px;
  overflow: auto;
}

.contract-list article {
  border: 1px solid #e3e9f3;
  border-radius: 12px;
  padding: 13px;
  background: #fbfdff;
}

.contract-list h4 {
  margin: 0 0 6px;
}

.contract-list p {
  margin: 0 0 10px;
  color: #526176;
}

.api-list {
  max-height: 420px;
  overflow: auto;
  border: 1px solid #edf1f7;
  border-radius: 12px;
}

.api-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  padding: 9px 11px;
  border-bottom: 1px solid #edf1f7;
}

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

.method {
  font-weight: 700;
  color: #1769e0;
}

.empty-state {
  border: 1px dashed #cfd7e6;
  border-radius: 14px;
  padding: 22px;
  background: #fbfdff;
  color: #526176;
}

.empty-state strong {
  display: block;
  color: #172033;
  margin-bottom: 6px;
}

.empty-state p {
  margin: 0;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 104px;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: #0f172a;
  color: #dbeafe;
}

@media (max-width: 1180px) {
  .layout.three,
  .layout.two,
  .flow-panel,
  .form-grid,
  .article-preview-grid,
  .workspace-detail-grid {
    grid-template-columns: 1fr;
  }

  .workflow-sidebar {
    position: static;
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid #e6ebf3;
    border-left: 0;
  }
}

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

  .v2-sidebar {
    position: static;
    height: auto;
  }

  .v2-topbar,
  .hero-card,
  .account-card,
  .account-card-side,
  .article-toolbar {
    align-items: stretch;
    flex-direction: column;
    justify-items: stretch;
  }

  .article-workspace-tabs {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .history-filter-tabs {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .article-document h2 {
    font-size: 23px;
  }

  .hero-meta {
    align-items: flex-start;
    min-width: 0;
  }
}

/* ===== 账户管理 V1 架构移植（2026-08-02） ===== */
.v2-account-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: start;
}

.v2-account-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-2, #f8fafc);
  position: sticky;
  top: 12px;
}

.v2-account-sidebar h4 {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ★ 分组侧栏（发布平台 / AI 平台） */
.v2-account-group {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line, #eef2f7);
}
.v2-account-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* ★ 主区双面板（发布账号 / AI 账号） */
.v2-account-panel + .v2-account-panel {
  margin-top: 16px;
}
.v2-account-panel .panel-sub {
  font-size: 12px;
  color: var(--muted, #64748b);
  margin-left: 8px;
}
.v2-account-table th, .v2-account-table td {
  padding: 10px 14px;
}

.v2-account-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text, #0f172a);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.v2-account-filter:hover {
  background: var(--hover, rgba(59, 130, 246, 0.08));
}

.v2-account-filter.active {
  background: var(--accent, #3b82f6);
  color: #fff;
  border-color: var(--accent, #3b82f6);
}

.v2-account-filter .count {
  font-size: 11px;
  opacity: 0.75;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 0 7px;
}

.v2-account-filter.active .count {
  background: rgba(255, 255, 255, 0.25);
}

.v2-account-filter .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.v2-account-filter .dot.ok {
  background: #2e9e5b;
}

.v2-account-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.v2-account-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-2, #f8fafc);
}

.v2-account-toolbar .account-search,
.v2-account-toolbar .account-status-select {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--muted, #64748b);
}

.v2-account-toolbar input,
.v2-account-toolbar select {
  padding: 6px 10px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  min-width: 180px;
}

/* 账户页顶部安全提示条（auth helper 风格） */
.v2-account-notice {
  margin: 10px 0;
  padding: 8px 12px;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  line-height: 1.6;
}

.v2-account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.v2-account-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--line, #e2e8f0);
  color: var(--muted, #64748b);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.v2-account-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  vertical-align: middle;
}

.v2-account-table tr:hover td {
  background: var(--hover, rgba(59, 130, 246, 0.04));
}

.v2-account-table small {
  display: block;
  color: var(--muted, #64748b);
  font-size: 11px;
}

.v2-account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent, #3b82f6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.v2-account-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ★ 默认号高亮（同平台可多选默认） */
.v2-account-actions button.default-active {
  background: #fef9c3;
  border-color: #eab308;
  color: #854d0e;
  font-weight: 600;
}

/* ★ 拆分架构：Web 端账户页引导卡 */
.v2-account-guide {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 14px;
}
.v2-account-guide .guide-icon { font-size: 26px; line-height: 1.2; }
.v2-account-guide strong { display: block; font-size: 14px; color: #1e3a8a; margin-bottom: 4px; }
.v2-account-guide p { font-size: 13px; color: #1e40af; margin-bottom: 10px; }
.v2-account-guide .primary { padding: 7px 14px; border-radius: 6px; background: #2563eb; border: 1px solid #2563eb; color: #fff; cursor: pointer; }

/* ★ 账户操作按钮（auth helper 风格：登入蓝/删除红） */
.v2-account-actions .action-login {
  background: #dbeafe; border: 1px solid #93c5fd; color: #1d4ed8;
  padding: 4px 12px; border-radius: 6px; cursor: pointer; font-size: 12px;
}
.v2-account-actions .action-login:hover { background: #bfdbfe; }
.v2-account-actions .action-delete {
  background: #fee2e2; border: 1px solid #fecaca; color: #b91c1c;
  padding: 4px 12px; border-radius: 6px; cursor: pointer; font-size: 12px;
}
.v2-account-actions .action-delete:hover { background: #fecaca; }

/* ★ 默认号切换按钮（默认号列内，可点击切换） */
.v2-default-toggle {
  background: #fff; border: 1px solid #d1d5db; color: #6b7280;
  padding: 3px 10px; border-radius: 20px; cursor: pointer; font-size: 11px;
}
.v2-default-toggle:hover { border-color: #eab308; color: #854d0e; }
.v2-default-toggle.default-active {
  background: #fef9c3; border-color: #eab308; color: #854d0e; font-weight: 600;
}

.v2-account-actions button {
  padding: 4px 10px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.v2-account-actions button:hover {
  background: var(--hover, rgba(59, 130, 246, 0.08));
}

.v2-account-actions .danger-ghost {
  color: #d64545;
}

.account-session-state {
  font-weight: 700;
}

.account-session-state.ok {
  color: #2e9e5b;
}

.account-session-state.warn {
  color: #d9931a;
}

.account-session-state.bad {
  color: #d64545;
}

.account-default-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted, #64748b);
  cursor: pointer;
}

.readiness-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-2, #f8fafc);
  font-size: 13px;
}

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

.readiness-strip .empty {
  padding: 20px;
  text-align: center;
  color: var(--muted, #64748b);
}

/* 总览待办面板 */
.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent, #3b82f6);
  font-size: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-button:hover {
  opacity: 0.8;
}

.muted-text {
  color: var(--muted, #64748b);
  margin: 0;
}

.check-list li.pending {
  color: var(--text, #0f172a);
  padding: 6px 0;
}

/* 生成文章：平台多选 */
.generate-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.generate-platform-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px;
  background: var(--surface-2, #f8fafc);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.generate-platform-check:has(input:checked) {
  border-color: var(--accent, #3b82f6);
  background: rgba(59, 130, 246, 0.1);
}

.generate-platform-check small {
  color: var(--muted, #64748b);
  font-size: 11px;
}

/* 审核表格：整行可点击 */
.clickable-row {
  cursor: pointer;
  transition: background 0.12s;
}

.clickable-row:hover td {
  background: rgba(59, 130, 246, 0.06);
}

/* 文章审核筛选栏 */
.article-filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-2, #f8fafc);
  margin: 0 0 12px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 12px;
  color: var(--muted, #64748b);
  white-space: nowrap;
}

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

.filter-chip {
  padding: 4px 12px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  color: var(--text, #0f172a);
}

.filter-chip:hover {
  border-color: var(--accent, #3b82f6);
}

.filter-chip.active {
  background: var(--accent, #3b82f6);
  border-color: var(--accent, #3b82f6);
  color: #fff;
}

.filter-select {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-select select {
  padding: 5px 10px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}

.filter-clear {
  margin-left: auto;
  padding: 5px 12px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  color: var(--muted, #64748b);
}

.filter-clear:hover {
  color: #d64545;
  border-color: #f1c4c4;
}

/* 发布任务详情：全宽操作面板（去掉左侧文章预览） */
.full-width-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-2, #f8fafc);
}

.full-width-sidebar .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.full-width-sidebar .field input,
.full-width-sidebar .field textarea {
  padding: 7px 10px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
}

/* 企业规划：动态平台优先级 + 动态问题 */
.dynamic-platforms,
.dynamic-questions {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--line, #e2e8f0);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.04);
}

.dynamic-platforms ol.ordered.compact li,
.dynamic-questions .mini-list span {
  font-size: 12px;
  padding: 2px 0;
}

.dynamic-questions .mini-list span small {
  color: var(--muted, #64748b);
  margin-left: 6px;
}

/* 规则冲突展示（审核弹窗） */
.rule-conflicts {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.08);
  font-size: 11px;
  color: #92400e;
}

.rule-conflicts strong {
  display: block;
  margin-bottom: 4px;
  color: #b45309;
}

.rule-conflicts p {
  margin: 2px 0;
  line-height: 1.4;
}

.rule-conflicts small {
  display: block;
  margin-top: 6px;
  color: #a16207;
}

/* 账户连接中心：会话、编辑器与填充状态分层展示 */
.account-health-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.account-health-strip > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 14px 16px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  background: #fff;
}

.account-health-strip span {
  color: var(--muted, #64748b);
  font-size: 12px;
  font-weight: 600;
}

.account-health-strip strong {
  color: var(--text, #0f172a);
  font-size: 22px;
  line-height: 1;
}

.account-health-strip small {
  grid-column: 1 / -1;
  color: var(--muted, #64748b);
  font-size: 11px;
}

.publish-account-readiness {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: center;
  margin: 8px 0 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line, #e2e8f0);
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.publish-account-readiness > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.publish-account-readiness span,
.publish-account-readiness small {
  color: var(--muted, #64748b);
  font-size: 12px;
}

.publish-account-readiness strong {
  overflow: hidden;
  color: var(--text, #0f172a);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-account-readiness.ready {
  border-color: #b7dfc6;
}

.publish-account-readiness.blocked {
  border-color: #f2c7a5;
}

.publish-task-table {
  min-width: 920px;
}

.publish-task-table th:nth-child(1) {
  min-width: 280px;
}

.publish-task-table th:nth-child(2) { min-width: 90px; }
.publish-task-table th:nth-child(3) { min-width: 140px; }
.publish-task-table th:nth-child(4) { min-width: 100px; }
.publish-task-table th:nth-child(5) { min-width: 90px; }
.publish-task-table th:nth-child(6) { min-width: 110px; }

.publish-task-table th:nth-child(n + 2),
.publish-task-table td:nth-child(n + 2) {
  white-space: nowrap;
}

.account-connection-table {
  min-width: 860px;
}

.account-connection-table th:last-child,
.account-connection-table td:last-child {
  position: sticky;
  right: 0;
  min-width: 250px;
  background: #fff;
  box-shadow: -8px 0 12px rgba(15, 23, 42, 0.06);
  z-index: 1;
}

.account-connection-table th:last-child {
  z-index: 2;
}

.account-connection-table tr:hover td:last-child {
  background: #f8fbff;
}

.account-chain-cell {
  min-width: 235px;
}

.account-chain-cell > div + div {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--line, #e2e8f0);
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.account-identity > div {
  min-width: 0;
}

.account-identity strong,
.account-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.account-state-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.account-state-pill.ok {
  background: #dcfce7;
  color: #166534;
}

.account-state-pill.warn {
  background: #fef3c7;
  color: #92400e;
}

.account-state-pill.bad {
  background: #fee2e2;
  color: #991b1b;
}

.account-state-pill.muted {
  background: #f1f5f9;
  color: #64748b;
}

.default-text {
  color: #a16207 !important;
  font-weight: 700;
}

.account-config-grid {
  margin-top: 2px;
}

.account-onboarding-panel .panel-head p,
.account-key-panel .panel-head p,
.v2-account-panel .panel-head p {
  margin: 4px 0 0;
  color: var(--muted, #64748b);
  font-size: 12px;
}

.account-key-panel {
  margin-top: 2px;
}

.key-settings-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1.2fr);
  gap: 14px 18px;
  align-items: end;
}

.key-status-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-2, #f8fafc);
}

.key-status-block span,
.key-status-block small {
  color: var(--muted, #64748b);
  font-size: 12px;
}

.key-option,
.key-settings-grid .button-row {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .account-health-strip,
  .key-settings-grid,
  .publish-account-readiness {
    grid-template-columns: 1fr;
  }

  .key-option,
  .key-settings-grid .button-row {
    grid-column: auto;
  }
}

.publish-pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.publish-pipeline > div {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 2px 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  background: #fff;
}

.publish-pipeline > div > span {
  grid-row: 1 / 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

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

.publish-pipeline strong {
  font-size: 12px;
}

.publish-pipeline small {
  color: var(--muted, #64748b);
  font-size: 10px;
}

.publish-pipeline > .completed {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.publish-pipeline > .completed > span {
  background: #16a34a;
  color: #fff;
}

.publish-pipeline > .active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.publish-pipeline > .active > span {
  background: #2563eb;
  color: #fff;
}

@media (max-width: 1100px) {
  .publish-pipeline {
    grid-template-columns: 1fr;
  }
}

/* ─────────── 授权平台门户（2026-08 参考图重设计）─────────── */
.auth-portal { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; }
.auth-sidebar { background: #fff; border: 1px solid var(--line, #e6e8ee); border-radius: 10px; padding: 12px 8px; }
.auth-sidebar h4 { font-size: 12px; color: #8a94a6; margin: 4px 8px 10px; font-weight: 600; letter-spacing: .04em; }
.plat-nav-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font-size: 13px; color: #3a4252; }
.plat-nav-item:hover { background: #f2f5fa; }
.plat-nav-item.active { background: #eef3ff; color: #2f6fed; font-weight: 600; }
.plat-nav-logo { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.plat-nav-logo.all { background: linear-gradient(135deg, #2f6fed, #5b8cff); }
.plat-nav-name { flex: 1; text-align: left; }
.plat-nav-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.plat-nav-dot.ok { background: #18b45c; }
.plat-nav-count { font-size: 11px; color: #9aa4b6; background: #f0f2f7; border-radius: 8px; padding: 1px 7px; }
.plat-nav-count.ready { color: #0e9f4e; background: #e8f8ef; font-weight: 600; }
.plat-nav-count.zero { color: #c2c9d6; background: transparent; }
.auth-main { background: #fff; border: 1px solid var(--line, #e6e8ee); border-radius: 10px; overflow: hidden; }
.auth-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line, #e6e8ee); flex-wrap: wrap; }
.auth-search input { width: 200px; }
.auth-status-select select { min-width: 110px; }
.auth-add-btn { background: #18b45c; border-color: #18b45c; }
.auth-add-btn:hover { background: #14a552; border-color: #14a552; }
.auth-publish-btn { background: #ff7d2e; border-color: #ff7d2e; margin-left: auto; }
.auth-publish-btn:hover { background: #f56f1c; border-color: #f56f1c; }
.auth-table-wrap { overflow-x: auto; }
.auth-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.auth-table th { text-align: left; font-size: 12px; color: #8a94a6; font-weight: 600; padding: 9px 14px; background: #fafbfd; border-bottom: 1px solid var(--line, #e6e8ee); white-space: nowrap; }
.auth-table td { padding: 9px 14px; border-bottom: 1px solid #f0f2f7; vertical-align: middle; }
.auth-table tr:hover td { background: #fafbfe; }
.auth-avatar { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; font-weight: 700; }
.auth-nickname { font-size: 13px; color: #232a37; white-space: nowrap; }
.auth-created { white-space: nowrap; }
.auth-default-tag { font-size: 11px; color: #2f6fed; background: #eef3ff; border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.auth-platform-label { font-size: 12px; color: #5b6577; }
.auth-state-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.auth-state-pill.ok { color: #0e9f4e; background: #e8f8ef; }
.auth-state-pill.warn { color: #d97a00; background: #fff4e2; }
.auth-state-pill.muted { color: #8a94a6; background: #f0f2f7; }
.auth-created { font-size: 12px; color: #8a94a6; white-space: nowrap; }
.auth-table-foot { display: flex; justify-content: space-between; padding: 10px 14px; font-size: 12px; color: #8a94a6; border-top: 1px solid #f0f2f7; }
.auth-onboarding { margin: 12px 14px; }
.auth-onboarding .form-grid { grid-template-columns: 1fr 1fr; }

/* 新增授权弹窗 */
.modal-overlay { position: fixed; inset: 0; background: rgba(20, 24, 34, .45); display: flex; align-items: center; justify-content: center; z-index: 1200; }
.modal-box { background: #fff; border-radius: 14px; min-width: 560px; max-width: 640px; box-shadow: 0 18px 48px rgba(15, 20, 35, .22); overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; border-bottom: 1px solid #f0f2f7; }
.modal-head h3 { font-size: 16px; margin: 0; color: #232a37; }
.modal-close { border: 0; background: transparent; font-size: 15px; color: #9aa4b6; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: #f2f5fa; color: #3a4252; }
.plat-pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 18px 20px 28px; max-height: 400px; overflow-y: auto; }
.plat-pick-item { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 8px; border: 1px solid #e6e8ee; border-radius: 10px; background: #fff; cursor: pointer; }
.plat-pick-item:hover { border-color: #2f6fed; background: #f6f9ff; }
.plat-pick-logo { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 700; }
.plat-pick-item strong { font-size: 13px; color: #232a37; }
.plat-pick-item small { font-size: 11px; color: #9aa4b6; }
.modal-foot { display: flex; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid #f0f2f7; }
@media (max-width: 980px) {
  .auth-portal { grid-template-columns: 1fr; }
  .plat-pick-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─────────── 排产日历视图（2026-08 补缺口）─────────── */
.cal-view { background: #fff; border: 1px solid var(--line, #e6e8ee); border-radius: 10px; overflow: hidden; }
.cal-toolbar { justify-content: space-between; }
.cal-stats { font-size: 12px; color: #5b6577; }
.cal-stats strong { font-size: 14px; margin-right: 2px; }
.cal-stats .c-planned { color: #2f6fed; }
.cal-stats .c-due { color: #e8850c; }
.cal-stats .c-manual { color: #b02e4d; }
.cal-stats .c-done { color: #0e9f4e; }
.cal-table { width: 100%; border-collapse: collapse; }
.cal-table th { text-align: left; font-size: 12px; color: #5b6577; font-weight: 600; padding: 10px 14px; border-bottom: 1px solid #e6e8ee; background: #fafbfe; }
.cal-table td { padding: 9px 14px; border-bottom: 1px solid #f0f2f7; font-size: 13px; color: #3a4252; vertical-align: middle; }
.cal-table tr:hover td { background: #fafbfe; }
.cal-table tr.cal-due td { background: #fffaf3; }
.cal-title { color: #232a37; }
.cal-due-tag { font-size: 11px; color: #e8850c; background: #fff3e0; border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.badge { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.badge-planned { color: #2f6fed; background: #eef3ff; }
.badge-warn { color: #e8850c; background: #fff3e0; }
.badge-ok { color: #0e9f4e; background: #e8f8ef; }
.badge-info { color: #2f6fed; background: #eef3ff; }
.badge-muted { color: #7c8698; background: #f0f2f7; }
.empty-hint { padding: 32px 16px; text-align: center; color: #9aa4b6; font-size: 13px; }

/* 排产日历打磨：斑马纹 + 图例 + tooltip */
.cal-table tbody tr:nth-child(even) td { background: #fcfcfe; }
.cal-table tbody tr:nth-child(even):hover td { background: #fafbfe; }
.cal-table tr.cal-due td { background: #fffaf3 !important; }
.cal-title { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; }
.cal-legend { font-size: 11px; color: #7c8698; display: inline-flex; gap: 8px; align-items: center; }
.cal-legend .lg { display: inline-flex; align-items: center; gap: 3px; }
.cal-legend .lg::before { content: ""; width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.lg-1::before { background: #2f6fed; }
.lg-2::before { background: #7a5af8; }
.lg-3::before { background: #e8850c; }

/* ─────────── 阶段2：指挥中心顶部【变化面板】─────────── */
.change-panel { display: flex; flex-direction: column; gap: 12px; }
.change-status-bar {
  display: flex; align-items: center; gap: 12px;
  border-radius: 10px; padding: 12px 16px;
  background: linear-gradient(90deg, #eef7f1, #f7fbf8);
  border: 1px solid #cfe8d8;
}
.change-status-bar.warn {
  background: linear-gradient(90deg, #fff6e8, #fffaf2);
  border-color: #f3d9a8;
}
.change-status-dot { color: #0e9f4e; font-size: 14px; line-height: 1; animation: change-pulse 2.2s ease-in-out infinite; }
.change-status-bar.warn .change-status-dot { color: #e8850c; animation: none; }
@keyframes change-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.change-status-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.change-status-text strong { font-size: 14px; color: #232a37; }
.change-status-text small { font-size: 12px; color: #5b6577; }
.change-metrics-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1100px) { .change-metrics-row { grid-template-columns: 1fr; } }
.change-metric-geo.ok { border-left-color: #0e9f4e; }
.change-metric-geo.muted { border-left-color: #9aa3b2; }
.change-metric {
  border: 1px solid var(--line, #e6e8ee); border-radius: 10px;
  background: #fff; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.04);
}
.change-metric-label { font-size: 11px; color: #7c8698; letter-spacing: 0.03em; }
.change-metric-value { font-size: 14px; color: #232a37; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.change-metric-value b { font-size: 18px; color: #2f6fed; }
.change-metric small { font-size: 12px; color: #5b6577; }
.change-metric-url { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: #7c8698; }
.change-metric-consistency.ok { border-color: #cfe8d8; background: #f8fcfa; }
.change-metric-consistency.bad { border-color: #f3d9a8; background: #fffaf2; }

/* ─────────── 阶段2：任务三态一致性行 ─────────── */
.task-tristate {
  border: 1px solid var(--line, #e6e8ee); border-radius: 8px;
  background: #fafbfe; padding: 8px 10px;
}
.task-tristate.ok { border-color: #cfe8d8; background: #f6fbf8; }
.task-tristate.warn { border-color: #f3d9a8; background: #fffaf2; }
.task-tristate.bad { border-color: #f4c8c8; background: #fef6f6; }
.task-tristate-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.task-tristate-row span { font-size: 12px; color: #3a4252; }
.task-tristate-row span.ok { color: #0e9f4e; }
.task-tristate-row span.muted { color: #9aa4b6; }
.ok-text { color: #0e9f4e; }
.bad-text { color: #b02e4d; }

/* ─────────── 阶段2：不一致文章提示条 ─────────── */
.inconsistency-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid #f3d9a8; border-radius: 8px;
  background: #fff8ec; color: #8a5a12;
  padding: 8px 14px; font-size: 13px; margin-bottom: 10px;
}

/* ─────────── 阶段2.5：发布操作区吸顶 + 行内快捷发布 ─────────── */
.publish-action-sticky {
  position: sticky; top: 8px; z-index: 5;
  background: #fff;
  border: 1px solid var(--line, #e6e8ee); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 4px;
  box-shadow: 0 6px 16px rgba(23, 32, 51, 0.08);
  display: flex; flex-direction: column; gap: 8px;
}
.publish-action-sticky .button-row { margin-top: 2px; }
.publish-action-sticky .publish-account-readiness { border-color: #d8dfeb; }
.row-quick-publish.primary-mini {
  background: #1769e0; border-color: #1769e0; color: #fff;
  font-weight: 600;
}
.row-quick-publish.primary-mini:hover { background: #1459bd; border-color: #1459bd; }
