:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e0ea;
  --accent: #1769aa;
  --accent-strong: #0f4c81;
  --accent-soft: #e8f2fb;
  --success: #23875a;
  --warning: #b7791f;
  --shadow: 0 16px 40px rgba(18, 35, 61, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

.mock-page {
  background: #edf2f7;
}

button,
input,
table,
pre {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: #10243a;
  color: #eef6ff;
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #2f80c4;
  font-weight: 800;
}

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

.brand-block p,
.sidebar-note span {
  margin: 0;
  color: rgba(238, 246, 255, 0.68);
  font-size: 13px;
  line-height: 1.5;
}

.nav-list {
  display: grid;
  gap: 8px;
  margin: 24px 0;
}

.nav-list a {
  color: rgba(238, 246, 255, 0.82);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}

.nav-list a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-note strong {
  display: block;
  margin-bottom: 6px;
}

.dashboard {
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 20px;
}

.updated-at {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kpi-card {
  padding: 16px;
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.kpi-card strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--accent-strong);
  font-size: 32px;
  line-height: 1;
}

.kpi-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.production-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.production-bar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.production-bar input {
  height: 40px;
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
}

.production-bar button,
.draft-item button,
.dialog-head button,
.panel-action {
  height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-action.secondary {
  background: #243b53;
}

.production-bar button:disabled,
.panel-action:disabled {
  cursor: progress;
  opacity: 0.6;
}

#generation-status {
  color: var(--muted);
  font-size: 13px;
  padding-bottom: 10px;
}

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

.production-steps article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 12px;
}

.production-steps strong,
.production-steps span {
  display: block;
}

.production-steps span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.panel {
  padding: 18px;
  margin-bottom: 16px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

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

.entity-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.entity-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

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

.annual-month {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 12px;
}

.annual-month strong,
.annual-month span {
  display: block;
}

.annual-month strong {
  color: var(--ink);
}

.annual-month span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.annual-month p {
  margin: 8px 0 0;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.annual-month.ready {
  border-color: #b9e5cf;
  background: #edf8f3;
}

.annual-month.missing {
  border-color: #f2d39b;
  background: #fff8eb;
}

.action-list {
  display: grid;
  max-height: 430px;
  overflow: auto;
  gap: 10px;
}

.action-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 12px;
}

.action-item span,
.action-item strong,
.action-item em {
  display: block;
}

.action-item span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.action-item strong {
  margin-top: 5px;
}

.action-item p {
  margin: 7px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.action-item em {
  color: #243b53;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.action-item.blocker {
  border-color: #f6b6b6;
  background: #fff1f1;
}

.action-item.warning {
  border-color: #f2d39b;
  background: #fff8eb;
}

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

.asset-card,
.asset-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 12px;
}

.asset-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.asset-card img {
  width: 120px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.asset-card strong,
.asset-card span,
.asset-card a,
.asset-empty strong {
  display: block;
}

.asset-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-card span,
.asset-empty p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.asset-card a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

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

.entity-card strong {
  margin-bottom: 4px;
}

.entity-card span {
  color: var(--muted);
  font-size: 13px;
}

.entity-card dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0 0;
}

.entity-card dt {
  color: var(--muted);
  font-size: 12px;
}

.entity-card dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.bar-list {
  display: grid;
  gap: 13px;
}

.account-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
}

.account-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 12px;
}

.account-card strong,
.account-card span {
  display: block;
}

.account-card strong {
  margin-bottom: 4px;
}

.account-card span,
.account-card dt {
  color: var(--muted);
  font-size: 12px;
}

.account-card dl {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
}

.account-card dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.account-controls {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.account-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.account-controls select,
.account-controls input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 9px;
  font-size: 12px;
}

.account-controls button {
  height: 32px;
  border-radius: 8px;
  background: #243b53;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.credential-controls {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.credential-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.credential-controls input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 9px;
  font-size: 12px;
}

.credential-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.credential-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.credential-actions button {
  height: 30px;
  border-radius: 8px;
  background: #243b53;
  color: #ffffff;
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
  font-size: 12px;
}

.credential-actions button.muted {
  background: #e7eef5;
  color: var(--ink);
}

.credential-feedback {
  color: var(--muted);
  font-size: 12px;
}

.account-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.account-warning {
  margin: 10px 0 0;
  border-radius: 8px;
  background: #fff7e6;
  padding: 8px;
  color: var(--warning);
  font-size: 12px;
  line-height: 1.5;
}

.queue-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.queue-summary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  padding: 6px 10px;
  color: var(--muted);
  font-size: 12px;
}

.publish-workbench {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.publish-workbench label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.publish-workbench select {
  height: 34px;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 9px;
  font-size: 13px;
}

.publish-workbench .check-control {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.publish-workbench button {
  height: 34px;
  border-radius: 8px;
  background: #243b53;
  color: #ffffff;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

#publish-filter-count {
  color: var(--muted);
  font-size: 13px;
  padding-bottom: 8px;
}

.publish-assistant {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(360px, 1.4fr) auto;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #bfd6ea;
  border-radius: 8px;
  background: #f3f9ff;
}

.assistant-picker {
  display: grid;
  gap: 8px;
}

.assistant-picker label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.assistant-picker select {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
}

.assistant-status {
  color: #37546f;
  font-size: 13px;
  line-height: 1.5;
}

.assistant-preview article,
.assistant-empty {
  height: 100%;
  border: 1px solid #d5e6f5;
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.assistant-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.assistant-title-row strong,
.assistant-title-row span,
.assistant-preview a {
  display: block;
}

.assistant-title-row span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.assistant-preview dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

.assistant-preview dt {
  color: var(--muted);
  font-size: 12px;
}

.assistant-preview dd {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.assistant-preview a {
  margin-top: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.assistant-actions {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 150px;
}

.assistant-actions button {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.assistant-actions button:nth-child(2) {
  background: #243b53;
}

.assistant-actions button:nth-child(3) {
  background: #eef4f8;
  color: #243b53;
}

.assistant-actions button:disabled {
  cursor: progress;
  opacity: 0.62;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  background: #edf4fb;
  color: #243b53;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.platform-pill,
.status-pill,
.legend {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
}

.platform-pill {
  background: #eef4f8;
  color: #344054;
}

.status-pill {
  background: #fff7e6;
  color: var(--warning);
}

.status-pill.ok {
  background: #e8f7ef;
  color: var(--success);
}

.legend {
  gap: 6px;
  color: var(--muted);
}

.legend span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--warning);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.row-actions button {
  min-height: 30px;
  border-radius: 8px;
  padding: 0 10px;
  background: #243b53;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  border: 1px solid #cfe0ee;
  border-radius: 999px;
  background: #f4f9fd;
  padding: 8px 11px;
  font-size: 13px;
}

.question-list,
.draft-list {
  display: grid;
  gap: 10px;
}

.question-list article,
.draft-list article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.question-list strong {
  margin-right: 8px;
  color: var(--accent-strong);
}

.question-list span {
  color: var(--muted);
  font-size: 12px;
}

.question-list p {
  margin: 7px 0 0;
  line-height: 1.5;
}

.draft-list article {
  display: grid;
  gap: 8px;
}

.draft-list strong,
.draft-list span,
.draft-list code {
  display: block;
}

.draft-list span,
.draft-list p,
.draft-list code {
  color: var(--muted);
  font-size: 13px;
}

.draft-list p {
  margin: 0;
  line-height: 1.55;
}

.draft-list code {
  overflow-wrap: anywhere;
  border-radius: 6px;
  background: #eef4f8;
  padding: 6px 8px;
}

.draft-item button {
  justify-self: start;
  height: 34px;
  background: #243b53;
  font-size: 13px;
}

.draft-dialog {
  width: min(900px, calc(100vw - 32px));
  max-height: 82vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.compact-dialog {
  width: min(720px, calc(100vw - 32px));
}

.draft-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

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

.dialog-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

#draft-dialog-status {
  max-width: 320px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

#draft-dialog-status.error {
  color: var(--danger);
}

#draft-dialog-status.success {
  color: var(--success);
}

.dialog-head button {
  height: 34px;
  background: #e7eef5;
  color: var(--ink);
}

.dialog-head a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

#draft-enhance-button {
  background: var(--accent);
  color: #ffffff;
}

#draft-enhance-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.draft-dialog pre {
  max-height: calc(82vh - 68px);
  overflow: auto;
  margin: 0;
  padding: 18px;
  white-space: pre-wrap;
  line-height: 1.65;
}

.publish-package-body {
  display: grid;
  gap: 18px;
  max-height: calc(82vh - 68px);
  overflow: auto;
  padding: 18px;
}

.publish-package-body section {
  min-width: 0;
}

.publish-package-body h4 {
  margin: 4px 0 0;
  font-size: 18px;
}

.publish-cover-preview {
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(120px, 1fr);
  gap: 12px;
  align-items: center;
}

.publish-cover-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.publish-cover-preview a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.publish-package-body pre {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  white-space: pre-wrap;
  line-height: 1.65;
}

.publish-package-body ol {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.compliance-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  background: #edf8f3;
  color: #15513a;
}

.compliance-score strong {
  display: inline-block;
  margin-right: 6px;
  font-size: 34px;
  line-height: 1;
}

.compliance-score.compact strong {
  font-size: 26px;
}

.compliance-box p {
  margin: 0;
  color: #24634b;
  line-height: 1.6;
}

.report-text {
  overflow: auto;
  max-height: 360px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #e5edf7;
  line-height: 1.65;
  white-space: pre-wrap;
}

.bulk-record-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.bulk-record-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.bulk-record-body textarea {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  color: var(--ink);
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#bulk-record-status {
  max-width: 260px;
  color: var(--muted);
  font-size: 13px;
}

.error-state {
  max-width: 760px;
  margin: 80px auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.mock-publisher {
  max-width: 980px;
  margin: 32px auto;
  padding: 24px;
}

.mock-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.mock-head h1 {
  margin: 0;
  font-size: 28px;
}

.mock-head span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px 12px;
  color: var(--success);
  font-size: 13px;
}

.mock-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.mock-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.mock-form input,
.mock-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  font: inherit;
}

.mock-form textarea {
  resize: vertical;
  line-height: 1.65;
}

.mock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.helper-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.helper-field-head button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.helper-field-head button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.helper-copy-feedback {
  color: var(--muted);
  font-size: 13px;
}

.playwright-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.playwright-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  background: var(--surface-muted);
  border-radius: 10px;
  padding: 14px 16px;
}

.playwright-meta div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
}

.playwright-meta dt {
  color: var(--muted);
  font-size: 12px;
  min-width: 36px;
}

.playwright-meta dd {
  margin: 0;
  font-weight: 700;
  word-break: break-all;
}

.playwright-log {
  background: #0e1620;
  color: #d8e3f0;
  border-radius: 10px;
  padding: 14px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.playwright-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

#playwright-screenshot {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.playwright-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-muted);
  color: var(--ink);
}

.playwright-badge.status-error,
.playwright-badge.status-login_timeout {
  background: #fde2e2;
  color: #a02828;
}

.playwright-badge.status-filled_waiting_human {
  background: #d6f5dd;
  color: #1e6a3a;
}

.playwright-badge.status-login_required,
.playwright-badge.status-filling {
  background: #fdf3d4;
  color: #80591a;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.today-ready {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: transform 0.15s, background 0.15s;
}

.today-ready.hot {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: #ffffff;
  border-color: transparent;
}

.today-ready:hover {
  transform: translateY(-1px);
}

.primary-action {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee0979 100%);
  color: #ffffff;
  border: none;
  font-weight: 800;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(238, 9, 121, 0.25);
}

.primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(238, 9, 121, 0.35);
}

.primary-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.primary-action-small {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee0979 100%);
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.muted {
  background: var(--surface-muted);
  color: var(--muted);
  font-weight: 600;
}

.stage-published { background: #d6f5dd; color: #1e6a3a; }
.stage-ready { background: #fde2cb; color: #a04500; }
.stage-in_progress { background: #fdf3d4; color: #80591a; }
.stage-needs_review { background: #e4e9ef; color: #4a5a6b; }
.stage-account_pending { background: #fde2e2; color: #a02828; }
.stage-waiting_polished { background: var(--surface-muted); color: var(--muted); }

.login-banner {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fdf3d4 0%, #fde2cb 100%);
  border: 1px solid #e8b86d;
  margin-bottom: 6px;
}

.login-banner strong {
  font-size: 16px;
  color: #6b4500;
}

.login-banner p {
  margin: 0;
  font-size: 13px;
  color: #80591a;
  line-height: 1.6;
}

.login-banner button {
  justify-self: start;
  background: #6b4500;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.login-banner button:hover {
  background: #8b5a00;
}

.batch-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.batch-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  background: var(--surface-muted);
  border-radius: 10px;
  padding: 14px 16px;
}

.batch-summary div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.batch-summary dt {
  color: var(--muted);
  font-size: 12px;
}

.batch-summary dd {
  margin: 0;
  font-weight: 800;
  font-size: 16px;
  word-break: break-all;
}

.batch-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.batch-items li {
  display: grid;
  grid-template-columns: 30px 1fr 1.4fr;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
}

.batch-items .batch-idx {
  color: var(--muted);
  font-weight: 700;
}

.batch-items em {
  font-style: normal;
  color: var(--muted);
}

#playwright-publish-url {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 14px;
}

.mock-actions button {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.mock-actions button:disabled {
  background: #e7eef5;
  color: var(--muted);
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.helper-adapter {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 14px;
}

.helper-adapter dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.helper-adapter dt {
  color: var(--muted);
  font-size: 12px;
}

.helper-adapter dd {
  margin: 3px 0 0;
  font-weight: 800;
}

.helper-adapter h4 {
  margin: 12px 0 6px;
  font-size: 14px;
}

.helper-adapter ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

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

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

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

  .kpi-grid,
  .section-grid,
  .account-list,
  .production-steps,
  .publish-assistant {
    grid-template-columns: 1fr 1fr;
  }

  .assistant-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .dashboard {
    padding: 18px;
  }

  .topbar,
  .panel-head {
    display: block;
  }

  .updated-at {
    display: inline-block;
    margin-top: 12px;
  }

  .nav-list,
  .kpi-grid,
  .section-grid,
  .account-list,
  .production-steps,
  .publish-assistant,
  .assistant-preview dl,
  .publish-cover-preview {
    grid-template-columns: 1fr;
  }

  .assistant-actions {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .entity-card dl {
    grid-template-columns: repeat(2, 1fr);
  }
}
