:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --text: #111827;
  --muted: #667085;
  --line: #d7dee8;
  --line-soft: #e8edf2;
  --primary: #245fd6;
  --primary-dark: #1c4fb8;
  --teal: #078178;
  --green: #15834b;
  --rose: #bd3654;
  --amber: #a15c07;
  --sidebar: #fbfcfd;
  --shadow: 0 10px 26px rgba(26, 36, 52, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 15px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 6px;
}

h2 {
  font-size: 17px;
  line-height: 1.25;
  margin-bottom: 0;
}

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

.app-sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  z-index: 6;
}

.brand {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: 16px;
  font-weight: 900;
  gap: 12px;
  margin-bottom: 22px;
  white-space: nowrap;
}

.brand-mark {
  align-items: center;
  background: #161b22;
  border-radius: 9px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.side-nav {
  align-content: start;
  display: grid;
  gap: 6px;
  overflow-y: auto;
  padding-right: 2px;
}

.side-nav a {
  align-items: center;
  border-radius: 8px;
  color: #344054;
  display: grid;
  column-gap: 10px;
  row-gap: 2px;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  min-height: 52px;
  padding: 9px 10px;
}

.side-nav a:hover,
.side-nav a.active {
  background: #eef5ff;
  color: var(--primary);
}

.side-nav a span {
  align-items: center;
  background: #eef1f5;
  border-radius: 8px;
  color: #64748b;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  grid-column: 1;
  height: 30px;
  justify-content: center;
  grid-row: 1 / 3;
  width: 30px;
}

.side-nav a.active span {
  background: var(--primary);
  color: #ffffff;
}

.side-nav strong,
.side-nav small {
  display: block;
}

.side-nav strong {
  font-size: 14px;
  font-weight: 900;
  grid-column: 2;
  grid-row: 1;
}

.side-nav small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  grid-column: 2;
  grid-row: 2;
  margin-top: 2px;
  white-space: nowrap;
}

.sidebar-card,
.workspace-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  padding: 12px;
}

.sidebar-card span,
.workspace-chip span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.sidebar-card strong,
.workspace-chip strong {
  color: var(--text);
  font-size: 15px;
  margin-top: 2px;
}

.sidebar-card small,
.workspace-chip small,
.workspace-chip strong {
  color: var(--muted);
  font-size: 12px;
}

.app-main {
  min-width: 0;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 4;
}

.topbar-label {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar strong {
  color: var(--text);
  display: block;
  font-size: 18px;
  margin-top: 2px;
}

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

.status-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.status-chip.ok {
  background: #ecfdf3;
  border-color: #b7e4c7;
  color: var(--green);
}

.status-chip.warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: var(--amber);
}

.page {
  max-width: 1360px;
  padding: 26px 30px 64px;
  width: 100%;
}

.notice {
  border-radius: 10px;
  font-weight: 800;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.notice.success {
  background: #ecfdf3;
  border: 1px solid #b7e4c7;
  color: #166534;
}

.notice.error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.auth-page {
  align-items: center;
  display: flex;
  min-height: 100vh;
  padding: 24px;
}

.auth-panel,
.panel,
.table-panel,
.content-card,
.metric,
.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.auth-panel {
  margin: 0 auto;
  max-width: 420px;
  padding: 30px;
  width: 100%;
}

.hero {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 26px 28px;
  position: relative;
}

.hero::before {
  background: #0f8b7c;
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 5px;
}

.hero p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  gap: 10px;
}

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

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.kicker,
.eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.platform-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.platform {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.platform.youtube {
  background: #fff1f1;
  border-color: #ffd4d4;
  color: #c01818;
}

.platform.tiktok {
  background: #f2fbfb;
  border-color: #c8eeee;
  color: #0c6f6f;
}

.platform.facebook {
  background: #eff5ff;
  border-color: #cfe0ff;
  color: #245fd6;
}

.platform.instagram {
  background: #fff1f7;
  border-color: #ffd1e3;
  color: #b8326a;
}

.platform.x {
  background: #f1f3f5;
  border-color: #d8dde3;
  color: #1f2937;
}

.workspace-hero {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 14px;
  padding: 24px 26px;
}

.workspace-hero p:last-child {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 760px;
}

.readiness-board {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 13px 16px;
}

.readiness-main {
  align-items: center;
  display: flex;
  gap: 12px;
}

.readiness-main strong,
.readiness-main span {
  display: block;
}

.readiness-main strong {
  color: var(--text);
  font-weight: 900;
}

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

.metric-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric-row div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}

.metric-row span,
.metric-row small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.metric-row strong {
  color: var(--text);
  display: block;
  font-size: 30px;
  line-height: 1;
  margin: 5px 0 6px;
}

.dashboard-board {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.board-main,
.board-side {
  display: grid;
  gap: 18px;
}

.text-action {
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric {
  padding: 18px;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 8px;
}

.metric strong {
  color: var(--text);
  display: block;
  font-size: 30px;
  line-height: 1;
}

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

.dashboard-grid {
  align-items: start;
}

.ops-header {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ops-header h1 {
  margin-bottom: 6px;
}

.ops-header p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.ops-actions {
  display: flex;
  gap: 10px;
}

.ops-status {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 14px 18px;
}

.ops-status-main {
  align-items: center;
  display: flex;
  gap: 12px;
}

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

.ops-status-main strong {
  color: var(--text);
  font-weight: 900;
}

.ops-status-main span {
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.status-dot.ok {
  background: var(--green);
}

.status-dot.warn {
  background: var(--amber);
}

.platform-strip.compact {
  margin-top: 0;
}

.ops-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.ops-metrics div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}

.ops-metrics span {
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.ops-metrics strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.ops-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.ops-main,
.ops-side {
  display: grid;
  gap: 18px;
}

.ops-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

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

.workflow-step {
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 14px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 12px;
}

.workflow-step:hover {
  background: var(--surface-soft);
}

.workflow-step > span {
  align-items: center;
  background: #edf3ff;
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.workflow-step strong,
.workflow-step small {
  display: block;
}

.workflow-step strong {
  color: var(--text);
  font-weight: 900;
}

.workflow-step small {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.workflow-step em {
  color: var(--text);
  font-style: normal;
  font-weight: 900;
}

.dense-list {
  display: grid;
}

.dense-row {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 0;
}

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

.dense-row strong,
.dense-row span {
  display: block;
}

.dense-row strong {
  color: var(--text);
  font-weight: 900;
}

.dense-row span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.asset-summary {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr 1.4fr;
  margin-bottom: 18px;
}

.pipeline-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.pipeline-strip div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 66px;
  padding: 12px;
}

.pipeline-strip span {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.pipeline-strip strong,
.pipeline-strip small {
  display: block;
}

.pipeline-strip small {
  color: var(--muted);
  font-size: 12px;
  grid-column: 2;
}

.asset-workbench {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 340px;
  margin-bottom: 18px;
}

.studio-rail {
  display: grid;
  gap: 18px;
}

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

.compact-form label:nth-child(5),
.compact-form button {
  grid-column: 1 / -1;
}

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

.account-row {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 0;
}

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

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

.account-row strong {
  color: var(--text);
  font-weight: 900;
}

.account-row span {
  font-size: 13px;
}

.compact-empty {
  margin-top: 0;
  min-height: 62px;
}

.rule-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rule-list li {
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  gap: 4px;
  padding: 12px 0;
}

.rule-list li:last-child {
  border-bottom: 0;
}

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

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

.stack {
  display: grid;
  gap: 18px;
}

.panel,
.table-panel {
  padding: 22px;
}

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

.action-panel p {
  margin-bottom: 0;
}

.publish-note {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px 16px;
}

.publish-note strong,
.publish-note span {
  display: block;
}

.publish-note strong {
  color: var(--text);
  font-weight: 900;
}

.publish-note span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.panel-head {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  margin: -2px 0 6px;
  padding-bottom: 14px;
}

.panel-head a {
  font-size: 13px;
  font-weight: 900;
}

.table-head {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  margin: -2px 0 12px;
  padding-bottom: 14px;
}

.connected-account {
  align-items: center;
  background: #f0fdf9;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 14px 0;
  padding: 14px 16px;
}

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

.connected-account strong {
  color: var(--text);
  font-weight: 900;
}

.connected-account span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.connected-account-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.connected-account-actions form {
  margin: 0;
}

.connected-account-actions .button {
  min-height: 36px;
  padding: 8px 12px;
}

.account-center {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 340px;
  margin-bottom: 18px;
}

.connect-panel > p {
  margin-bottom: 12px;
}

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

.account-actions .button {
  min-height: 38px;
  padding: 10px 14px;
}

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

.platform-roadmap-list div {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px 0;
}

.platform-roadmap-list div:last-child {
  border-bottom: 0;
}

.platform-roadmap-list strong {
  color: var(--muted);
  font-size: 13px;
}

.manual-account-panel summary {
  color: #344054;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
}

.manual-account-panel summary::marker {
  color: var(--primary);
}

.manual-account-panel form {
  margin-top: 16px;
}

.list-row {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 0;
}

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

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

.list-row span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.empty,
.muted,
span {
  color: var(--muted);
}

.empty {
  background: var(--surface-soft);
  border: 1px dashed #c8d2df;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  min-height: 76px;
  place-content: center start;
  padding: 18px;
}

.empty strong {
  color: #344054;
}

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

.pill {
  background: #edf3ff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  color: #245fd6;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 7px 10px;
}

.pill.neutral {
  background: #f3f5f7;
  border-color: #d8dde3;
  color: #596579;
}

.form {
  display: grid;
  gap: 16px;
}

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

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

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

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 95, 214, 0.14);
  outline: 0;
}

button,
.button {
  align-items: center;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
}

button:hover,
.button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

button:disabled {
  background: #a8b3c2;
  border-color: #a8b3c2;
  cursor: not-allowed;
}

.button.secondary {
  background: #ffffff;
  border-color: var(--line);
  color: var(--text);
}

.button.secondary:hover {
  background: var(--surface-soft);
  border-color: var(--line);
}

.button.danger-light {
  border-color: #fecdd3;
  color: var(--rose);
}

.button.danger-light:hover {
  background: #fff1f2;
  border-color: #fda4af;
  color: #be123c;
}

.slim {
  min-height: 38px;
  padding: 9px 14px;
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.ghost:hover {
  background: var(--surface-soft);
}

.ghost.danger {
  border-color: #fecdd3;
  color: var(--rose);
}

.ghost.danger:hover {
  background: #fff1f2;
  border-color: #fda4af;
}

.danger-text {
  color: #be123c;
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  max-width: 420px;
}

.status-help {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  margin-top: 6px;
  max-width: 220px;
}

.full {
  width: 100%;
}

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

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

tbody tr:hover {
  background: var(--surface-soft);
}

.content-card {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 300px;
  padding: 24px;
}

.content-main h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.tags {
  color: var(--primary);
  font-weight: 900;
}

.job-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}

.job-meta a {
  font-size: 13px;
  font-weight: 900;
}

.media-preview {
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: block;
  margin: 14px 0 18px;
  max-height: 520px;
  max-width: 320px;
  object-fit: cover;
  width: 100%;
}

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

.review-card {
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: 172px minmax(0, 1fr) 260px;
  padding: 16px;
}

.review-preview {
  aspect-ratio: 3 / 4;
  background: #111827;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  overflow: hidden;
  place-items: center;
}

.review-preview img,
.review-preview video {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.preview-gallery {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 100%;
  padding: 4px;
  width: 100%;
}

.preview-gallery img {
  border-radius: 6px;
  min-height: 0;
}

.preview-gallery img:first-child {
  grid-column: 1 / -1;
}

.review-preview span {
  color: #cbd5e1;
  font-weight: 900;
}

.generation-preview {
  padding: 14px;
  width: 100%;
}

.generation-preview small {
  color: #94a3b8;
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin: 5px 0;
}

.review-copy {
  min-width: 0;
}

.review-title {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.review-title h2 {
  font-size: 20px;
  margin-bottom: 0;
}

.review-title > div:last-child {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.caption-text {
  line-height: 1.65;
  margin: 12px 0 8px;
}

.generation-status {
  background: #f8fbff;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  margin: 12px 0;
  padding: 12px;
}

.generation-status.failed {
  background: #fff1f2;
  border-color: #fecdd3;
}

.generation-status-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.generation-status-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.generation-status-head span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.progress-track {
  background: #e5eaf2;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
  width: 100%;
}

.progress-track span {
  background: linear-gradient(90deg, var(--primary), var(--teal));
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 5%;
  transition: width 0.3s ease;
}

.generation-status.failed .progress-track span {
  background: var(--rose);
}

.generation-status p {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  margin: 9px 0 0;
}

.generation-status small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 5px;
}

.publish-copy-box {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 12px;
  padding: 12px;
}

.copy-box-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.publish-copy-box pre {
  background: #ffffff;
  margin: 0;
  max-height: 180px;
}

.publish-copy-box .muted {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
}

.script-details {
  margin-top: 12px;
}

.script-details summary {
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.review-actions {
  display: grid;
  gap: 10px;
}

.compact-queue {
  border-radius: 8px;
  padding: 12px;
}

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

.asset-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.asset-media {
  aspect-ratio: 4 / 3;
  background: var(--surface-soft);
  display: block;
  object-fit: cover;
  width: 100%;
}

.asset-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.logo-preview {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
}

.logo-preview img {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 32px;
  object-fit: contain;
  padding: 4px;
  width: 56px;
}

.logo-preview span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.empty-logo {
  border-style: dashed;
}

.asset-body strong,
.asset-body span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.source-link {
  font-size: 13px;
  font-weight: 900;
}

.asset-actions {
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 14px;
}

.product-library {
  margin-top: 18px;
}

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

.asset-row-card {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  gap: 14px;
  grid-template-columns: 88px minmax(190px, 0.85fr) minmax(520px, 1.55fr) auto;
  min-height: 112px;
  padding: 14px 0;
}

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

.asset-thumb {
  aspect-ratio: 1;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

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

.asset-info {
  min-width: 0;
}

.asset-title-line,
.asset-meta-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asset-title-line h3 {
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
  margin: 0;
}

.asset-info p {
  color: var(--muted);
  margin: 6px 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-meta-line a,
.asset-meta-line span {
  font-size: 13px;
  font-weight: 800;
}

.asset-inline-actions {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(86px, 1fr));
}

.asset-inline-actions select[name="audio_style"] {
  grid-column: 1 / 2;
}

.asset-inline-actions input[name="prompt"] {
  grid-column: 2 / 5;
}

.asset-inline-actions button {
  grid-column: 5;
}

.asset-delete-form {
  display: flex;
  justify-content: flex-end;
}

pre {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #273244;
  line-height: 1.65;
  overflow-x: auto;
  padding: 14px;
  white-space: pre-wrap;
}

.queue-form {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.task-action-form + .task-action-form {
  margin-top: 8px;
}

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

  .app-sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    min-height: auto;
    padding: 14px 16px;
    position: sticky;
  }

  .brand {
    margin-bottom: 12px;
  }

  .side-nav {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
  }

  .side-nav a {
    flex: 0 0 154px;
  }

  .sidebar-card {
    display: none;
  }

  .topbar {
    position: static;
  }

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

  .ops-header,
  .ops-status {
    align-items: stretch;
    flex-direction: column;
  }

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

  .workspace-hero,
  .dashboard-board,
  .account-center,
  .review-card {
    grid-template-columns: 1fr;
  }

  .readiness-board {
    align-items: stretch;
    flex-direction: column;
  }

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

  .metric-row,
  .pipeline-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .asset-summary,
  .asset-workbench,
  .asset-row-card {
    grid-template-columns: 1fr;
  }

  .studio-workbench,
  .asset-workbench {
    grid-template-columns: 1fr;
  }

  .asset-row-card {
    align-items: stretch;
  }

  .asset-thumb {
    max-width: 180px;
  }

  .asset-inline-actions {
    grid-template-columns: 1fr 1fr;
  }

  .asset-inline-actions select[name="platform_account_id"],
  .asset-inline-actions select[name="audio_style"],
  .asset-inline-actions input[type="datetime-local"] {
    grid-column: 1 / -1;
  }

  .asset-inline-actions input[name="prompt"],
  .asset-inline-actions button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 18px 14px 44px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }

  .hero,
  .section-head,
  .workspace-hero,
  .content-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .ops-actions {
    flex-direction: column;
  }

  .workflow-step {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .workflow-step em {
    grid-column: 2;
  }

  .grid,
  .grid-form,
  .compact-form,
  .content-card,
  .metrics,
  .metric-row,
  .pipeline-strip,
  .ops-metrics,
  .asset-grid {
    grid-template-columns: 1fr;
  }

  .table-panel {
    overflow-x: auto;
  }

  .asset-summary,
  .asset-inline-actions {
    grid-template-columns: 1fr;
  }

  .asset-inline-actions select[name="platform_account_id"],
  .asset-inline-actions select[name="audio_style"],
  .asset-inline-actions input[type="datetime-local"],
  .asset-inline-actions input[name="prompt"],
  .asset-inline-actions button {
    grid-column: 1 / -1;
  }
}
