:root {
  --bg: #f6f4ee;
  --surface: #fffdf7;
  --surface-strong: #ffffff;
  --ink: #232320;
  --muted: #67645c;
  --line: #d8d3c7;
  --green: #176c54;
  --green-soft: #dff2ea;
  --blue: #285f9e;
  --blue-soft: #e4effa;
  --coral: #b4472b;
  --coral-soft: #f8e7df;
  --amber: #946116;
  --amber-soft: #faedd3;
  --purple: #5d56ba;
  --purple-soft: #eceafe;
  --shadow: 0 18px 45px rgba(54, 48, 34, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

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

.sidebar {
  min-width: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #25251f;
  color: #f7f3e8;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f2d87a;
  color: #1f1e18;
  font-weight: 800;
}

.brand h1,
.brand p,
.hero-copy h2,
.hero-copy p,
.section-heading h3,
.card-heading h3 {
  margin: 0;
}

.brand h1 {
  font-size: 17px;
  line-height: 1.25;
}

.brand p {
  margin-top: 4px;
  color: #bfb8a7;
  font-size: 12px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d7d1c3;
  text-decoration: none;
  padding: 12px;
  border-radius: 8px;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

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

.icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.system-status {
  margin-top: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.system-status strong,
.system-status span {
  display: block;
}

.system-status strong {
  font-size: 13px;
}

.system-status span {
  margin-top: 4px;
  color: #c7bfac;
  font-size: 12px;
  line-height: 1.4;
}

.status-dot {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 50%;
  background: #6cd49e;
  box-shadow: 0 0 0 5px rgba(108, 212, 158, 0.15);
}

.main {
  min-width: 0;
  padding: 28px;
  display: grid;
  gap: 24px;
}

.view-page {
  display: none;
  gap: 24px;
}

.view-page.active {
  display: grid;
}

.section {
  min-width: 0;
  scroll-margin-top: 20px;
}

.hero-section {
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 22px;
  align-items: stretch;
  border-radius: 8px;
  padding: 36px;
  background:
    linear-gradient(rgba(24, 24, 18, 0.54), rgba(24, 24, 18, 0.28)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='700' viewBox='0 0 1400 700'%3E%3Crect width='1400' height='700' fill='%23424438'/%3E%3Cg opacity='0.55'%3E%3Crect x='80' y='92' width='360' height='170' rx='14' fill='%23fff8df'/%3E%3Crect x='112' y='126' width='145' height='18' rx='9' fill='%23285f9e'/%3E%3Crect x='112' y='164' width='270' height='12' rx='6' fill='%23b7ae96'/%3E%3Crect x='112' y='192' width='225' height='12' rx='6' fill='%23b7ae96'/%3E%3Crect x='510' y='74' width='310' height='220' rx='14' fill='%23e4effa'/%3E%3Ccircle cx='572' cy='138' r='32' fill='%23176c54'/%3E%3Crect x='630' y='118' width='130' height='16' rx='8' fill='%2325251f'/%3E%3Crect x='630' y='154' width='155' height='12' rx='6' fill='%237b8792'/%3E%3Crect x='890' y='122' width='380' height='250' rx='18' fill='%23fffdf7'/%3E%3Crect x='936' y='172' width='288' height='18' rx='9' fill='%235d56ba'/%3E%3Crect x='936' y='218' width='240' height='12' rx='6' fill='%23b7ae96'/%3E%3Crect x='936' y='248' width='296' height='12' rx='6' fill='%23b7ae96'/%3E%3Crect x='170' y='355' width='520' height='210' rx='18' fill='%23faedd3'/%3E%3Cpath d='M222 508 C310 400 390 470 470 372 C535 452 612 430 650 508 Z' fill='%23b4472b' opacity='0.8'/%3E%3Crect x='764' y='426' width='420' height='120' rx='14' fill='%23dff2ea'/%3E%3Crect x='812' y='464' width='155' height='16' rx='8' fill='%23176c54'/%3E%3Crect x='812' y='500' width='280' height='12' rx='6' fill='%23799b8d'/%3E%3C/g%3E%3C/svg%3E")
      center / cover;
  color: #ffffff;
  overflow: hidden;
}

.hero-copy {
  min-width: 0;
  width: 100%;
  max-width: 740px;
  align-self: end;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-section .eyebrow {
  color: #f5d36e;
}

.hero-copy h2 {
  max-width: 780px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 610px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  line-height: 1.7;
}

.hero-panel {
  min-width: 0;
  align-self: end;
  display: grid;
  gap: 12px;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 62px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.panel-row span {
  color: rgba(255, 255, 255, 0.82);
}

.panel-row strong {
  font-size: 26px;
}

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

.overview-card,
.quick-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.overview-card {
  padding: 20px;
}

.overview-card span,
.overview-card strong,
.overview-card p {
  display: block;
  margin: 0;
}

.overview-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overview-card strong {
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.overview-card p {
  margin-top: 12px;
  color: #494741;
  line-height: 1.55;
}

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

.quick-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  text-align: left;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: 0 22px 40px rgba(54, 48, 34, 0.14);
}

.quick-card p,
.quick-card strong,
.quick-kicker {
  margin: 0;
}

.quick-kicker {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-card strong {
  font-size: 22px;
  line-height: 1.3;
}

.quick-card p {
  color: #555148;
  line-height: 1.6;
}

.dashboard-focus-grid,
.dashboard-insight-grid,
.operations-workspace,
.compact-workspace {
  align-items: stretch;
}

.compact-workspace {
  min-width: 0;
}

.compact-workspace > * {
  min-width: 0;
}

.dashboard-metric-summary {
  margin-bottom: 0;
}

.action-queue,
.status-distribution,
.channel-leaderboard,
.operations-detail-list,
.automation-grid,
.monitor-source-list,
.intel-list {
  display: grid;
  gap: 12px;
}

.queue-item,
.distribution-item,
.leaderboard-item,
.operation-record,
.automation-card,
.monitor-source-item,
.intel-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.queue-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.queue-item strong {
  font-size: 28px;
  line-height: 1;
}

.queue-item span,
.queue-item p {
  display: block;
  margin: 0;
}

.queue-item span {
  color: var(--ink);
  font-weight: 800;
}

.queue-item p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.distribution-item {
  padding: 14px;
}

.distribution-item > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.distribution-item span {
  color: var(--muted);
  font-weight: 700;
}

.distribution-item strong {
  font-size: 20px;
}

.distribution-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #efeadf;
  overflow: hidden;
}

.distribution-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--green);
}

.leaderboard-item {
  padding: 14px;
}

.leaderboard-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.leaderboard-item header span,
.leaderboard-item p {
  color: var(--muted);
}

.leaderboard-item p {
  margin: 8px 0 0;
  line-height: 1.55;
}

.automation-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.work-subsection {
  margin-top: 18px;
}

.card-heading.compact {
  margin-bottom: 12px;
}

.automation-card,
.monitor-source-item {
  padding: 14px;
}

.automation-card h4,
.monitor-source-item strong,
.monitor-source-item p,
.monitor-source-item a {
  display: block;
}

.automation-card h4 {
  margin: 12px 0 8px;
  font-size: 16px;
}

.automation-card p {
  margin: 0;
  color: #555148;
  line-height: 1.6;
}

.monitor-source-item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.monitor-source-item header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.monitor-source-item p {
  margin: 8px 0;
  color: #555148;
  line-height: 1.55;
}

.monitor-source-item a {
  color: var(--blue);
  text-decoration: none;
  line-height: 1.55;
  word-break: break-all;
}

.intel-item {
  padding: 14px;
}

.intel-item header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.intel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.intel-item h4 {
  margin: 12px 0 8px;
  font-size: 16px;
}

.intel-item p {
  margin: 0;
  color: #555148;
  line-height: 1.65;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 22px;
}

.work-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workspace-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  max-height: min(780px, calc(100vh - 144px));
  overflow: hidden;
  gap: 16px;
}

.compact-workspace.two-column {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.workspace-card > .card-heading {
  margin-bottom: 0;
}

.automation-primary-card {
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.automation-queue-card {
  grid-template-rows: auto minmax(0, 1fr);
}

.automation-grid-wrap {
  min-height: 0;
}

.automation-log-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.card-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.card-heading h3,
.section-heading h3 {
  font-size: 22px;
  line-height: 1.25;
}

.heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

.brief-option-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.brief-option-panel-header strong,
.brief-option-panel-header span {
  display: block;
}

.brief-option-panel-header strong {
  color: var(--ink);
  font-size: 14px;
}

.brief-option-panel-header span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.brief-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}

.brief-option-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  min-width: 0;
}

.brief-option-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brief-option-title strong {
  font-size: 13px;
  color: var(--ink);
}

.brief-option-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.brief-option-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.brief-option-list {
  display: grid;
  gap: 8px;
  max-height: min(58vh, 720px);
  overflow: auto;
  padding-right: 4px;
}

.brief-option-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e3dccf;
  background: #f9f6ee;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  min-width: 0;
}

.brief-option-chip-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brief-option-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(229, 120, 53, 0.12);
  color: var(--coral);
  font-size: 11px;
  font-weight: 800;
}

.brief-option-label {
  min-width: 0;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.brief-option-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  padding-left: 34px;
}

.brief-option-chip .text-button {
  color: var(--coral);
  min-height: 24px;
  padding: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}

.brief-option-chip .text-button:disabled {
  color: #b9ae9c;
  cursor: not-allowed;
}

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

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 108, 84, 0.12);
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
}

.primary-button {
  background: var(--green);
  color: #ffffff;
}

.primary-button:hover {
  background: #11543f;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.icon-button {
  width: 42px;
  padding: 0;
  background: #efeadf;
  color: var(--ink);
}

.compact {
  margin-top: 12px;
}

.generated-output {
  min-height: 336px;
  display: grid;
  gap: 12px;
}

.empty-state {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.5);
}

.copy-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.copy-option:hover {
  border-color: var(--green);
  box-shadow: 0 12px 28px rgba(23, 108, 84, 0.08);
}

.copy-option.selected {
  border-color: var(--green);
  box-shadow:
    inset 0 0 0 2px rgba(23, 108, 84, 0.12),
    0 14px 32px rgba(23, 108, 84, 0.12);
}

.copy-option header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.copy-option-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.copy-option h4 {
  margin: 0;
  font-size: 15px;
}

.copy-selected-label {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.copy-option.selected .copy-selected-label {
  color: var(--green);
}

.copy-option p {
  margin: 0;
  color: #494741;
  line-height: 1.7;
  white-space: pre-wrap;
}

.copy-select-button {
  border: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill-success {
  background: #edf8f2;
  color: #2f7a4d;
}

.pill-warning {
  background: #fff3e8;
  color: #b56231;
}

.output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.selected-copy-status,
.action-feedback {
  margin-top: 14px;
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--green-soft);
  color: var(--green);
  line-height: 1.45;
  font-size: 13px;
  font-weight: 700;
}

.selected-copy-status strong,
.selected-copy-status span {
  display: block;
}

.selected-copy-status span {
  margin-top: 4px;
  color: #3d6658;
  font-weight: 600;
}

.action-feedback {
  background: #efeadf;
  color: var(--muted);
}

.action-feedback[data-kind="success"] {
  background: var(--green-soft);
  color: var(--green);
}

.action-feedback[data-kind="warning"] {
  background: var(--amber-soft);
  color: var(--amber);
}

.schedule-controls {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.text-button {
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 0;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 130px;
}

.metric-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

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

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-card strong {
  margin-top: 6px;
  font-size: 22px;
}

.performance-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.performance-form label:first-child {
  grid-column: 1 / -1;
}

.performance-form .primary-button {
  justify-self: start;
  min-width: 132px;
}

.operations-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.operations-detail-list.empty-state {
  display: block;
}

.operation-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 16px;
  padding: 16px;
}

.operation-record header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.operation-record h4 {
  margin: 10px 0 0;
  font-size: 18px;
}

.operation-record-main > p {
  margin: 12px 0;
  color: #494741;
  line-height: 1.7;
}

.operation-record-meta,
.operation-record-stats,
.operation-record-health {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.operation-record-meta span,
.operation-record-stats span,
.operation-record-health span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #efeadf;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.operation-record-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.operation-record-scores {
  min-width: 70px;
  text-align: right;
}

.operation-record-scores strong,
.operation-record-scores span {
  display: block;
}

.operation-record-scores strong {
  font-size: 28px;
  line-height: 1;
}

.operation-record-scores span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

.pipeline-step {
  position: relative;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.pipeline-step:not(:last-child)::after {
  content: ">";
  position: absolute;
  right: -11px;
  top: 45%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25251f;
  color: #ffffff;
  font-size: 12px;
  z-index: 1;
}

.pipeline-step strong,
.pipeline-step span {
  display: block;
}

.pipeline-step strong {
  margin-bottom: 10px;
}

.pipeline-step span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.asset-card {
  min-height: 180px;
  border-radius: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.asset-card h4 {
  margin: 0 0 10px;
  font-size: 17px;
}

.asset-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.asset-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.asset-card li {
  color: #494741;
  font-size: 13px;
}

.asset-card li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
}

.asset-purple {
  background: var(--purple-soft);
}

.asset-blue {
  background: var(--blue-soft);
}

.asset-green {
  background: var(--green-soft);
}

.asset-coral {
  background: var(--coral-soft);
}

.asset-amber {
  background: var(--amber-soft);
}

.knowledge-list {
  max-height: 520px;
  overflow: auto;
  display: grid;
  gap: 12px;
}

.knowledge-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.knowledge-item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.knowledge-item h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.knowledge-item p {
  margin: 0;
  color: #494741;
  line-height: 1.65;
}

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

.kanban-column {
  min-height: 220px;
  max-height: clamp(420px, 68vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  overflow: hidden;
}

.kanban-column > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.kanban-column > header span {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #efeadf;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.kanban-items,
.schedule-board {
  display: grid;
  gap: 10px;
}

.kanban-items {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  align-content: start;
}

.schedule-board,
.operations-detail-list {
  max-height: clamp(420px, 68vh, 820px);
  overflow: auto;
  padding-right: 4px;
  align-content: start;
}

.record-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffdf7;
}

.record-card header,
.record-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.record-card h4 {
  margin: 10px 0 6px;
  font-size: 15px;
}

.record-card p {
  margin: 0 0 12px;
  color: #494741;
  font-size: 13px;
  line-height: 1.6;
}

.record-card footer > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.copy-cell {
  min-width: 260px;
  max-width: 360px;
}

.copy-cell strong,
.copy-cell span {
  display: block;
}

.copy-cell strong {
  margin-bottom: 4px;
}

.copy-cell span {
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #efeadf;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.risk-result {
  min-height: 244px;
  line-height: 1.7;
}

.risk-hit {
  display: inline-block;
  margin: 0 4px 6px 0;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
}

.rewritten-copy {
  margin-top: 12px;
  padding: 14px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  white-space: pre-wrap;
}

.integration-status {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  border-radius: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  line-height: 1.55;
}

.integration-status strong,
.integration-status span,
.integration-status small {
  display: block;
}

.integration-status span {
  color: #494741;
}

.integration-status small {
  color: var(--muted);
  font-weight: 700;
}

.integration-status.warning {
  border-color: rgba(166, 113, 31, 0.28);
  background: var(--amber-soft);
}

.integration-status.success {
  border-color: rgba(55, 128, 86, 0.24);
  background: var(--green-soft);
}

.sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.sync-actions button {
  min-width: 0;
  flex: 1 1 180px;
}

.automation-actions {
  margin-top: 0;
}

.automation-settings-form {
  display: grid;
  gap: 12px;
}

.toggle-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.toggle-field input {
  margin-top: 4px;
}

.toggle-field strong,
.toggle-field span {
  display: block;
}

.toggle-field span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

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

.automation-time-grid label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: var(--muted);
}

.automation-time-grid input {
  width: 100%;
}

.sync-log {
  max-height: none;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.panel-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  align-content: start;
}

.sync-log-item {
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.sync-log-item.success {
  border-color: rgba(55, 128, 86, 0.24);
  background: #f8fcf6;
}

.sync-log-item.failed {
  border-color: rgba(182, 80, 73, 0.24);
  background: #fff9f6;
}

.sync-log-item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.sync-log-item header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.sync-log-item p {
  margin: 0;
  color: #494741;
  line-height: 1.5;
}

.automation-run-log {
  margin-top: 16px;
}

.template-list,
.calendar-trigger-list,
.trigger-queue-list,
.prompt-asset-list {
  display: grid;
  gap: 12px;
}

.hot-conversion-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.overview-metric-card,
.overview-strategy-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.overview-metric-card span,
.overview-strategy-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.overview-metric-card strong,
.overview-strategy-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.2;
}

.overview-metric-card small,
.overview-strategy-card p {
  display: block;
  margin-top: 8px;
  color: #494741;
  line-height: 1.6;
}

.overview-strategy-card {
  background: #fffcf5;
}

.overview-strategy-card strong {
  font-size: 18px;
}

.calendar-library-sections {
  display: grid;
  gap: 16px;
}

.calendar-section {
  display: grid;
  gap: 12px;
}

.calendar-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.calendar-section-header strong,
.calendar-section-header span {
  display: block;
}

.calendar-section-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.template-item,
.calendar-trigger-item,
.trigger-queue-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #ffffff;
}

.template-item header,
.calendar-trigger-item header,
.trigger-queue-item header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.template-item h4,
.calendar-trigger-item h4,
.trigger-queue-item h4 {
  margin: 8px 0 0;
  font-size: 16px;
}

.calendar-trigger-item.is-expired {
  background: #fcfbf7;
  opacity: 0.86;
}

.pill-coral {
  background: var(--coral-soft);
  color: var(--coral);
}

.template-item p,
.calendar-trigger-item p,
.trigger-queue-item p {
  margin: 0;
  color: #494741;
  line-height: 1.65;
}

.conversion-item,
.framework-item,
.prompt-strategy-item {
  display: grid;
  gap: 12px;
}

.template-item.flash-focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 123, 246, 0.14);
}

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

.template-grid > div {
  border-radius: 8px;
  padding: 12px;
  background: #f9f6ee;
}

.template-grid strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.template-grid p {
  font-size: 13px;
}

.conversion-grid p {
  color: #494741;
}

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

.framework-meta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f9f6ee;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.trigger-queue-item.done {
  background: #f8fcf6;
  border-color: rgba(55, 128, 86, 0.24);
}

.trigger-queue-item.failed,
.trigger-queue-item.partial {
  background: #fff9f5;
  border-color: rgba(181, 98, 49, 0.24);
}

.trigger-queue-item.sending {
  background: #f7fbff;
  border-color: rgba(33, 120, 198, 0.24);
}

.trigger-queue-item.is-focused {
  border-color: rgba(182, 80, 73, 0.24);
  box-shadow: 0 0 0 1px rgba(182, 80, 73, 0.08);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.queue-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.queue-status.done {
  color: #2f7a4d;
}

.queue-status.failed,
.queue-status.partial {
  color: #b56231;
}

.calendar-expired-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffcf5;
  padding: 14px;
}

.calendar-expired-panel summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  color: #494741;
}

.calendar-expired-panel summary::-webkit-details-marker {
  display: none;
}

.calendar-expired-panel[open] summary {
  margin-bottom: 14px;
}

.queue-status.sending {
  color: #2178c6;
}

.queue-note {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.prompt-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.prompt-goal-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #e3dccf;
  background: #fffcf5;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 700;
}

.notification-scene-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.notification-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #e3dccf;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.notification-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.notification-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
  margin-top: 14px;
  align-items: start;
}

.notification-profile-form {
  align-self: start;
}

.notification-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .hot-conversion-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-config-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hot-conversion-overview,
  .template-grid {
    grid-template-columns: 1fr;
  }
}

.prompt-group > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.prompt-group > header strong {
  font-size: 16px;
}

.prompt-group > header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.prompt-entry-list {
  display: grid;
  gap: 10px;
}

.prompt-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border-radius: 8px;
  padding: 12px;
  background: #f9f6ee;
}

.prompt-entry h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.prompt-entry p {
  margin: 0;
  color: #494741;
  font-size: 13px;
  line-height: 1.6;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
  overflow: hidden;
  border-radius: 8px;
}

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

th {
  background: #efeadf;
  color: var(--muted);
  font-weight: 800;
}

td {
  background: #ffffff;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.status-review {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-draft {
  color: var(--muted);
  background: #efeadf;
}

.status-approved {
  color: var(--green);
  background: var(--green-soft);
}

.status-rejected {
  color: var(--coral);
  background: var(--coral-soft);
}

.status-scheduled {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-published {
  color: var(--purple);
  background: var(--purple-soft);
}

.status-success {
  color: var(--green);
  background: var(--green-soft);
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 32px));
  border-radius: 8px;
  padding: 14px 16px;
  background: #25251f;
  color: #ffffff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  font-weight: 800;
  line-height: 1.45;
  transform: translateY(-18px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1080px) {
  .app-shell {
    display: block;
    width: 100%;
    max-width: 100vw;
  }

  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
    max-width: 100vw;
  }

  .nav-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(128px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    max-width: 100%;
  }

  .hero-section,
  .two-column {
    grid-template-columns: 1fr;
  }

  .overview-grid,
  .quick-grid,
  .pipeline,
  .asset-grid,
  .metric-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .operations-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .automation-grid {
    grid-template-columns: 1fr;
  }

  .workspace-card,
  .automation-log-card {
    max-height: none;
  }

  .operation-record {
    grid-template-columns: 1fr;
  }

  .operation-record-scores {
    text-align: left;
  }

  .template-grid {
    grid-template-columns: 1fr;
  }

  .prompt-entry {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .main {
    padding: 16px;
  }

  .hero-section {
    padding: 24px;
  }

  .hero-copy h2 {
    font-size: 36px;
  }

  .brief-form,
  .brief-option-grid,
  .overview-grid,
  .quick-grid,
  .asset-grid,
  .pipeline,
  .kanban-grid,
  .metric-summary,
  .performance-form,
  .operations-filter-bar {
    grid-template-columns: 1fr;
  }

  .brief-option-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .brief-option-actions {
    padding-left: 0;
  }

  .pipeline-step:not(:last-child)::after {
    display: none;
  }
}
