:root {
  color-scheme: light;
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #f7f4ed;
  --text: #1e242c;
  --muted: #66717f;
  --line: #ded7ca;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --accent: #eab308;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --ok-bg: #ecfdf3;
  --warn-bg: #fff7ed;
  --radius: 8px;
  --shadow: 0 14px 36px rgba(34, 28, 17, 0.07);
}

.matrix-hero {
  border: 1px solid rgba(15, 148, 136, 0.2);
  background:
    linear-gradient(135deg, rgba(15, 148, 136, 0.09), rgba(234, 179, 8, 0.08)),
    var(--surface);
}

.hq-todo-panel {
  border-color: rgba(180, 35, 24, 0.18);
  background: linear-gradient(180deg, #fff, #fffaf7);
}

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

.hq-todo-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.hq-todo-item span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 900;
}

.hq-todo-item strong,
.hq-todo-item p {
  display: block;
}

.hq-todo-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.hq-todo-item button {
  min-width: 94px;
}

.hq-todo-item.danger {
  border-color: rgba(180, 35, 24, 0.26);
  background: var(--danger-bg);
}

.hq-todo-item.warn {
  border-color: rgba(234, 179, 8, 0.45);
  background: var(--warn-bg);
}

.hq-todo-item.info {
  border-color: rgba(15, 148, 136, 0.22);
  background: rgba(15, 148, 136, 0.05);
}

.matrix-metrics .metric strong {
  color: var(--primary-dark);
}

.yixiaoer-panel {
  border-color: rgba(15, 148, 136, 0.28);
  background: linear-gradient(180deg, #ffffff, #f6fffb);
}

.yixiaoer-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.yixiaoer-steps article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(15, 148, 136, 0.18);
  border-radius: var(--radius);
  background: #fff;
}

.yixiaoer-upload-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(15, 148, 136, 0.28);
  border-radius: var(--radius);
  background: #f0fdfa;
}

.yixiaoer-upload-strip strong,
.yixiaoer-upload-strip span {
  display: block;
}

.yixiaoer-upload-strip strong {
  margin-bottom: 5px;
  font-size: 18px;
}

.yixiaoer-upload-strip span {
  color: var(--muted);
  line-height: 1.55;
}

.yixiaoer-steps strong {
  color: var(--text);
  font-size: 16px;
}

.yixiaoer-steps span,
.yixiaoer-preview p {
  color: var(--muted);
  line-height: 1.55;
}

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

.yixiaoer-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 900;
}

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

.yixiaoer-form input,
.yixiaoer-form select,
.yixiaoer-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.yixiaoer-form textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.55;
}

.yixiaoer-preview {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(15, 148, 136, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 148, 136, 0.06);
}

.yixiaoer-preview strong,
.yixiaoer-preview span {
  display: block;
}

.yixiaoer-preview strong {
  margin-bottom: 4px;
  font-size: 17px;
}

.matrix-layout {
  align-items: start;
}

.matrix-list,
.matrix-ledger {
  display: grid;
  gap: 14px;
}

.matrix-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.matrix-card.temporary {
  border-color: rgba(234, 179, 8, 0.48);
  background: #fffaf0;
}

.matrix-card.support {
  background: #fbfcfd;
}

.matrix-approval-panel {
  border-color: rgba(234, 179, 8, 0.55);
  background: linear-gradient(180deg, #fffaf0, #ffffff);
}

.matrix-card.approval {
  border-color: rgba(234, 179, 8, 0.72);
  box-shadow: 0 10px 24px rgba(114, 76, 0, 0.08);
}

.matrix-role-guide-panel {
  border-color: rgba(15, 148, 136, 0.18);
  background: #fffdf8;
}

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

.matrix-action-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.matrix-action-queue-panel {
  border-color: rgba(15, 148, 136, 0.22);
  background: linear-gradient(180deg, #ffffff, #f8fffc);
}

.matrix-action-queue-list {
  display: grid;
  gap: 10px;
}

.matrix-action-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: #fff;
}

.matrix-action-row.danger {
  border-left-color: #b42318;
}

.matrix-action-row.warn {
  border-left-color: #d97706;
}

.matrix-action-row.info {
  border-left-color: var(--primary);
}

.matrix-action-row.ok {
  border-left-color: #15803d;
}

.matrix-action-row > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #0f3f3a;
  background: #ecfdf3;
  font-weight: 900;
}

.matrix-action-row strong,
.matrix-action-row p {
  display: block;
  margin: 0;
}

.matrix-action-row p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.matrix-action-row em {
  min-width: 110px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #6b3b00;
  background: #fff4d8;
  text-align: center;
  font-style: normal;
  font-weight: 900;
}

.matrix-role-guide > div,
.matrix-action-board > article {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.matrix-action-board > article {
  border-color: rgba(15, 148, 136, 0.18);
  background: rgba(15, 148, 136, 0.05);
}

.matrix-acceptance-panel {
  border-color: rgba(15, 148, 136, 0.24);
  background: linear-gradient(180deg, #f8fffc, #ffffff);
}

.matrix-acceptance-grid,
.matrix-test-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.matrix-acceptance-grid > article,
.matrix-test-guide > article {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  min-height: 118px;
}

.matrix-acceptance-grid > article strong,
.matrix-test-guide > article strong {
  color: var(--text);
  font-size: 21px;
  line-height: 1.25;
}

.matrix-acceptance-grid > article span,
.matrix-test-guide > article span,
.matrix-acceptance-grid > article p,
.matrix-test-guide > article p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  word-break: break-all;
}

.matrix-acceptance-latest {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(15, 148, 136, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 148, 136, 0.06);
}

.matrix-acceptance-latest strong {
  color: var(--text);
}

.matrix-acceptance-latest > div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fff;
}

.matrix-audit-panel {
  border-color: rgba(15, 23, 42, 0.12);
}

.matrix-audit-log {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.matrix-audit-log article {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.matrix-audit-log article > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.matrix-audit-log strong {
  color: var(--text);
}

.matrix-audit-log span,
.matrix-audit-log p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.portal-hero {
  background:
    linear-gradient(135deg, rgba(15, 148, 136, 0.12), rgba(242, 208, 133, 0.18)),
    #fff;
}

.portal-role-map,
.portal-grid,
.portal-flow-board {
  display: grid;
  gap: 12px;
}

.portal-role-map {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-grid {
  grid-template-columns: repeat(5, minmax(190px, 1fr));
}

.portal-flow-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-run-panel {
  border-color: rgba(15, 148, 136, 0.2);
  background: linear-gradient(180deg, #ffffff, #f8fffc);
}

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

.portal-run-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  background: #fff;
}

.portal-run-row > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #0f3f3a;
  background: #ecfdf3;
  font-weight: 900;
}

.portal-run-row strong,
.portal-run-row p {
  display: block;
  margin: 0;
}

.portal-run-row p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.portal-run-row em {
  min-width: 100px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #6b3b00;
  background: #fff4d8;
  text-align: center;
  font-style: normal;
  font-weight: 900;
}

.portal-role-map > article,
.portal-card,
.portal-flow-board > article {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.portal-card {
  align-content: start;
  min-height: 228px;
  border-color: rgba(15, 148, 136, 0.14);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.portal-card .row-actions {
  margin-top: 0;
}

.portal-count,
.portal-flow-board strong {
  color: var(--text);
  font-size: 26px;
  line-height: 1.1;
}

.portal-role-map strong,
.portal-card h4,
.portal-flow-board span {
  color: var(--text);
}

.portal-role-map span,
.portal-card p,
.portal-flow-board p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.portal-audit-timeline {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.portal-audit-timeline article {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.portal-audit-timeline article > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.portal-audit-timeline strong {
  color: var(--text);
}

.portal-audit-timeline span,
.portal-audit-timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.portal-next {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(15, 148, 136, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 148, 136, 0.06);
}

.portal-next span {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.portal-next strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
}

.mini-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.mini-details summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--text);
  font-weight: 900;
  list-style: none;
}

.mini-details summary::-webkit-details-marker,
.clean-details > summary::-webkit-details-marker {
  display: none;
}

.mini-details p,
.mini-details .row-actions {
  margin: 0;
  padding: 0 12px 12px;
}

.matrix-card-details {
  background: #fff;
}

.matrix-card-details .matrix-payment-box,
.matrix-card-details .assignment-list,
.matrix-card-details .support-timeline {
  margin: 0 12px 12px;
}

.clean-details {
  padding: 0;
  overflow: hidden;
}

.clean-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  cursor: pointer;
  list-style: none;
}

.clean-details > summary strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.clean-details > summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.clean-details[open] {
  padding-bottom: 18px;
}

.clean-details[open] > summary {
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.clean-details > .portal-flow-board,
.clean-details > .portal-audit-timeline,
.clean-details > .hq-todo-list,
.clean-details > .merchant-stats,
.clean-details > .table-wrap,
.clean-details > .creator-brief-form,
.clean-details > .creator-metrics,
.clean-details > .creator-grid,
.clean-details > .creator-report-preview,
.clean-details > .creator-layout,
.clean-details > .account-grid,
.clean-details > .agent-list,
.clean-details > .settings-grid,
.clean-details > .matrix-role-guide,
.clean-details > .matrix-action-board,
.clean-details > .matrix-test-guide,
.clean-details > .matrix-layout,
.clean-details > .matrix-ledger,
.clean-details > .matrix-audit-log {
  margin: 0 18px;
}

.matrix-role-guide strong,
.matrix-action-board strong {
  color: var(--text);
  font-size: 15px;
}

.matrix-action-board strong {
  font-size: 20px;
}

.matrix-role-guide span,
.matrix-action-board span,
.matrix-action-board p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.support-stage-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.support-stage-grid span {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.support-stage-grid span.done {
  border-color: rgba(15, 148, 136, 0.28);
  background: rgba(15, 148, 136, 0.08);
  color: var(--primary-dark);
}

.support-stage-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 12px;
}

.support-timeline {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.support-timeline > div {
  display: grid;
  gap: 3px;
  padding-left: 12px;
  border-left: 3px solid rgba(15, 148, 136, 0.28);
}

.support-timeline strong {
  color: var(--text);
  font-size: 14px;
}

.support-timeline span,
.support-timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.matrix-payment-box {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(15, 148, 136, 0.22);
  border-radius: var(--radius);
  background: rgba(15, 148, 136, 0.06);
}

.matrix-payment-box p {
  margin: 6px 0 0;
  color: var(--muted);
}

.matrix-qr {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  width: 104px;
  height: 104px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.matrix-qr i {
  display: block;
  border-radius: 1px;
  background: #edf1f5;
}

.matrix-qr i.on {
  background: #111827;
}

.support-price-preview {
  padding: 14px 16px;
  border: 1px solid rgba(15, 148, 136, 0.22);
  border-radius: var(--radius);
  background: rgba(15, 148, 136, 0.06);
  color: var(--primary-dark);
  font-weight: 900;
}

.matrix-settlement-box {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(232, 183, 92, 0.34);
  border-radius: var(--radius);
  background: #fff8e6;
}

.matrix-settlement-box span {
  display: grid;
  align-content: center;
  min-height: 42px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #8a4b12;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.matrix-settlement-box.closed {
  border-color: rgba(15, 148, 136, 0.24);
  background: rgba(15, 148, 136, 0.07);
}

.matrix-settlement-box.closed span {
  color: var(--primary-dark);
}

.ledger-row {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.ledger-row.refund {
  border-color: rgba(232, 183, 92, 0.38);
  background: #fff8e6;
}

.ledger-row > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.ledger-row p {
  margin: 0;
  color: var(--muted);
}

.ledger-row a {
  color: var(--primary-dark);
  font-weight: 900;
  text-decoration: none;
}

.assignment-row a {
  color: var(--primary-dark);
  font-weight: 900;
  text-decoration: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body.login-active {
  overflow: hidden;
}

body.login-active .app-shell {
  display: none;
}

body:not(.login-active) .login-screen {
  display: none;
}

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

button {
  cursor: pointer;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px;
  background:
    linear-gradient(90deg, rgba(236, 190, 101, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(236, 190, 101, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 22% 18%, rgba(231, 181, 91, 0.2), transparent 30%),
    linear-gradient(135deg, #080807 0%, #14130f 46%, #20201d 100%);
  background-size: 44px 44px, 44px 44px, auto, auto;
}

.login-shell {
  width: min(1160px, 100%);
  min-height: min(740px, calc(100vh - 68px));
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.72fr);
  overflow: hidden;
  border: 1px solid rgba(236, 190, 101, 0.4);
  border-radius: 8px;
  background: #12110f;
  box-shadow: 0 30px 95px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 236, 181, 0.08) inset;
}

.login-art {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 26px;
  padding: 46px;
  overflow: hidden;
  border-right: 1px solid rgba(236, 190, 101, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 32%),
    linear-gradient(150deg, #171612 0%, #0b0b0a 62%, #1b1710 100%);
  color: #f8f3e6;
}

.login-art::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(232, 183, 92, 0.36);
  border-radius: 8px;
  pointer-events: none;
}

.login-art::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(232, 183, 92, 0.2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 183, 92, 0.18), transparent 62%);
  pointer-events: none;
}

.login-brand,
.login-copy,
.login-preview,
.login-stats {
  position: relative;
  z-index: 1;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-mark {
  width: 92px;
  height: 92px;
  border-width: 2px;
}

.login-brand h1,
.login-copy h2,
.login-panel h2,
.login-panel p {
  margin: 0;
}

.login-brand h1 {
  margin-top: 5px;
  color: #f8f3e6;
  font-size: 36px;
  line-height: 1.1;
}

.login-copy {
  max-width: 650px;
}

.login-copy h2 {
  max-width: 620px;
  color: #e8b75c;
  font-size: 45px;
  line-height: 1.15;
}

.login-copy p {
  max-width: 610px;
  margin: 16px 0 0;
  color: #d8c8a2;
  font-size: 16px;
  line-height: 1.75;
}

.login-preview {
  display: grid;
  gap: 14px;
  max-width: 690px;
  padding: 20px;
  border: 1px solid rgba(232, 183, 92, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 236, 181, 0.1);
}

.login-preview-head,
.login-preview-list p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.login-preview-head span,
.login-preview-list span {
  color: #bfb59d;
}

.login-preview-head strong {
  display: block;
  margin-top: 5px;
  color: #fff6df;
  font-size: 18px;
}

.login-preview-head em {
  min-width: max-content;
  border: 1px solid rgba(232, 183, 92, 0.42);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(232, 183, 92, 0.12);
  color: #f2c979;
  font-style: normal;
  font-weight: 900;
}

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

.login-preview-grid div {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(232, 183, 92, 0.22);
  border-radius: var(--radius);
  background: rgba(10, 10, 9, 0.72);
}

.login-preview-grid span {
  color: #bfb59d;
  font-weight: 800;
}

.login-preview-grid strong {
  color: #f8f3e6;
  font-size: 27px;
}

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

.login-preview-list p {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(232, 183, 92, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.login-preview-list strong {
  min-width: max-content;
  color: #f5d58b;
}

.login-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 690px;
}

.login-stats div {
  display: grid;
  gap: 6px;
  padding: 15px;
  border: 1px solid rgba(232, 183, 92, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.login-stats strong {
  color: #f8f3e6;
  font-size: 16px;
}

.login-stats span {
  color: #bfb59d;
  font-size: 13px;
}

.login-panel {
  align-self: center;
  justify-self: center;
  width: min(430px, calc(100% - 52px));
  display: grid;
  gap: 18px;
  padding: 36px;
  border: 1px solid rgba(232, 183, 92, 0.34);
  border-radius: var(--radius);
  background: #fbfaf6;
  box-shadow: 0 22px 62px rgba(0, 0, 0, 0.3);
}

.login-panel h2 {
  color: #14130f;
  font-size: 31px;
}

.login-panel > div > span,
.login-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.icp-note {
  margin: 0;
  color: #87909b;
  font-size: 12px;
  line-height: 1.5;
}

.login-icp {
  text-align: center;
}

.login-panel label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.login-panel input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #d7c8a8;
  border-radius: var(--radius);
  padding: 0 14px;
  background: #ffffff;
  color: var(--text);
}

.login-panel input:focus {
  outline: 3px solid rgba(232, 183, 92, 0.22);
  border-color: #c7943f;
}

.login-submit {
  min-height: 54px;
  background: linear-gradient(135deg, #11100e, #2a2417);
  border: 1px solid #d8ad59;
  color: #ffe9b4;
  font-size: 17px;
  box-shadow: 0 14px 30px rgba(38, 30, 15, 0.28);
}

.login-error {
  display: none;
  padding: 10px 12px;
  border: 1px solid #fecdca;
  border-radius: var(--radius);
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 800;
}

.login-error.show {
  display: block;
}

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

.sidebar {
  background: linear-gradient(180deg, #13212b 0%, #192632 48%, #20303b 100%);
  color: #f8fafc;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.brand-mark {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    url("assets/ad-laoli-mark.png") center / cover no-repeat,
    #11100e;
  border-radius: var(--radius);
  border: 1px solid rgba(232, 183, 92, 0.72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(255, 231, 167, 0.14);
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.panel h3,
.info-block h3 {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
}

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

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

.nav-item {
  width: 100%;
  display: grid;
  gap: 3px;
  border: 0;
  color: #dbe4ee;
  background: transparent;
  text-align: left;
  padding: 13px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1.35;
}

.nav-item strong {
  display: block;
  color: inherit;
  font-size: 15px;
}

.nav-item span {
  display: block;
  color: #a9b6c5;
  font-size: 12px;
  font-weight: 700;
}

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

.nav-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 14px;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.nav-more summary::after {
  content: "收起";
  color: #90a0b4;
  font-size: 12px;
}

.nav-more:not([open]) summary::after {
  content: "展开";
}

.nav-more summary::-webkit-details-marker {
  display: none;
}

.nav-more-list {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.nav-more-list .nav-item {
  min-height: 36px;
  padding: 9px 10px;
  color: #cbd5e1;
  font-size: 13px;
}

.nav-item:hover,
.nav-item.active,
.nav-more.has-active > summary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-item.active span {
  color: #e7c56d;
}

.guard-note {
  margin-top: auto;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 14px;
  color: #dbe4ee;
  font-size: 13px;
  line-height: 1.55;
}

.workspace {
  min-width: 0;
  padding: 26px 28px;
  background:
    linear-gradient(180deg, rgba(232, 183, 92, 0.1), rgba(244, 247, 251, 0) 260px),
    var(--bg);
}

.site-footer {
  margin-top: 24px;
  padding: 18px 0 4px;
  color: #7a8490;
  font-size: 12px;
  text-align: center;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(112, 91, 49, 0.12);
}

.topbar-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.page-back-btn,
.dialog-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 2px solid #c58b2a;
  border-radius: var(--radius);
  color: #3f2d10;
  background: #fff8e8;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(94, 66, 17, 0.12);
}

.page-back-btn:hover,
.dialog-back-btn:hover {
  color: #fff;
  background: #6b4a13;
  border-color: #6b4a13;
}

.page-back-btn[hidden] {
  display: none;
}

.backend-status {
  display: block;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fffdf8;
  border: 1px solid #e6dbc5;
  border-radius: var(--radius);
  color: #514232;
}

.backend-status.warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #7a2e0e;
}

.backend-status summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.backend-status summary::-webkit-details-marker {
  display: none;
}

.backend-status summary::after {
  content: "展开";
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.backend-status[open] summary::after {
  content: "收起";
}

.backend-status-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(112, 91, 49, 0.12);
}

.backend-status span {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.eyebrow {
  color: #9c6b1e;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.topbar h2 {
  font-size: 32px;
}

.top-actions,
.toolbar,
.panel-head,
.dialog-form footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.message-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.message-bell strong {
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  color: #667085;
  background: #f2f4f7;
  border-radius: 999px;
  font-size: 12px;
}

.message-bell.has-unread {
  border-color: rgba(180, 35, 24, 0.35);
}

.message-bell.has-unread strong {
  color: #fff;
  background: var(--danger);
}

.top-more {
  position: relative;
}

.top-more summary {
  display: grid;
  place-items: center;
  list-style: none;
}

.top-more summary::-webkit-details-marker {
  display: none;
}

.top-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: 170px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  box-shadow: 0 20px 50px rgba(34, 28, 17, 0.16);
}

.top-more:not([open]) .top-more-menu {
  display: none;
}

.top-more-menu .ghost-btn {
  width: 100%;
  justify-content: flex-start;
}

.primary-btn,
.ghost-btn,
.icon-btn {
  border-radius: var(--radius);
  min-height: 38px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 700;
}

.primary-btn {
  background: linear-gradient(135deg, #11100e, #2a2417);
  border-color: rgba(232, 183, 92, 0.68);
  color: white;
  box-shadow: 0 12px 24px rgba(34, 28, 17, 0.18);
}

.primary-btn:hover {
  background: #11100e;
}

.ghost-btn {
  background: #fffdf8;
  border-color: var(--line);
  color: var(--text);
}

.ghost-btn:hover {
  background: #fbf2df;
}

.ghost-btn.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.icon-btn {
  width: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.metric,
.panel,
.info-block,
.account-card,
.material-card,
.creator-card,
.creator-order-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  overflow: hidden;
}

.panel-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(112, 91, 49, 0.1);
}

.panel-head h3 {
  font-size: 20px;
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 86px;
}

.metric::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: rgba(232, 183, 92, 0.12);
}

.metric {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.metric-btn {
  text-align: left;
  cursor: pointer;
}

.metric-btn:hover {
  border-color: #d8ad59;
  transform: translateY(-1px);
}

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

.metric strong {
  font-size: 34px;
  line-height: 1;
}

.metric.danger strong {
  color: var(--danger);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 14px;
}

.command-center {
  display: grid;
  gap: 16px;
  margin-bottom: 14px;
  padding: 20px;
  background: linear-gradient(135deg, #fffdf8, #ffffff);
  border: 1px solid #e6dbc5;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.command-home {
  grid-template-columns: minmax(420px, 0.92fr) minmax(360px, 0.78fr);
  align-items: stretch;
  padding: 22px;
  color: #fff8e6;
  background:
    linear-gradient(135deg, rgba(17, 16, 14, 0.94), rgba(54, 42, 23, 0.9)),
    #11100e;
  border-color: rgba(232, 183, 92, 0.42);
}

.command-home-main {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 240px;
}

.command-center h3 {
  margin: 0;
  font-size: 24px;
}

.command-home h3 {
  font-size: 28px;
  line-height: 1.18;
}

.command-home .eyebrow {
  color: #e8b75c;
}

.command-home-main p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: #d8c8a2;
  line-height: 1.7;
}

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

.dashboard-next-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(232, 183, 92, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-next-panel > span {
  color: #f0d08b;
  font-size: 13px;
  font-weight: 900;
}

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

.dashboard-next-list article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-next-list article > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(232, 183, 92, 0.18);
  color: #f8e4b6;
  font-weight: 900;
}

.dashboard-next-list strong,
.dashboard-gateway-card strong {
  color: #fff8e6;
}

.dashboard-next-list p {
  margin: 4px 0 0;
  color: #d8c8a2;
  font-size: 13px;
  line-height: 1.45;
}

.dashboard-next-list button,
.dashboard-gateway-card button {
  min-width: 96px;
  color: #11100e;
  background: #f0d08b;
  border-color: #f0d08b;
}

.dashboard-next-list article.danger {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(127, 29, 29, 0.18);
}

.dashboard-next-list article.warn {
  border-color: rgba(251, 191, 36, 0.42);
}

.dashboard-gateway-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 10px;
}

.dashboard-gateway-card {
  display: grid;
  gap: 12px;
  align-content: space-between;
  min-height: 126px;
  padding: 14px;
  border: 1px solid rgba(232, 183, 92, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.dashboard-gateway-card span {
  display: block;
  margin-bottom: 8px;
  color: #d8c8a2;
  font-size: 13px;
  font-weight: 900;
}

.dashboard-gateway-card strong {
  display: block;
  line-height: 1.3;
}

.dashboard-tools {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid rgba(232, 183, 92, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.dashboard-tools summary {
  cursor: pointer;
  color: #f8e4b6;
  font-weight: 900;
  list-style: none;
}

.dashboard-tools summary::-webkit-details-marker {
  display: none;
}

.dashboard-tools .command-grid {
  margin-top: 12px;
}

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

.dashboard-signal-strip div {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.dashboard-signal-strip strong {
  color: var(--text);
}

.dashboard-signal-strip span {
  color: var(--muted);
  line-height: 1.45;
}

.dashboard-signal-strip .ok {
  border-color: rgba(15, 148, 136, 0.18);
  background: rgba(15, 148, 136, 0.06);
}

.dashboard-signal-strip .warn {
  border-color: rgba(234, 179, 8, 0.42);
  background: #fffaf0;
}

.dashboard-signal-strip .danger {
  border-color: rgba(180, 35, 24, 0.28);
  background: var(--danger-bg);
}

.dashboard-action-queue {
  margin-bottom: 14px;
}

.dashboard-action-queue-list {
  display: grid;
  gap: 10px;
}

.dashboard-action-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(150px, auto);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: #fff;
}

.dashboard-action-row.danger {
  border-left-color: #b42318;
  background: linear-gradient(90deg, rgba(180, 35, 24, 0.07), #fff 32%);
}

.dashboard-action-row.warn {
  border-left-color: #d97706;
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.09), #fff 32%);
}

.dashboard-action-row.info {
  border-left-color: var(--teal);
}

.dashboard-action-row.ok {
  border-left-color: #15803d;
}

.dashboard-action-index {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #5f4320;
  background: #fff4d8;
  font-weight: 900;
}

.dashboard-action-main {
  min-width: 0;
}

.dashboard-action-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.dashboard-action-tags span,
.dashboard-action-tags small {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-action-tags span {
  color: #6b3b00;
  background: #fff4d8;
}

.dashboard-action-tags small {
  color: var(--muted);
  background: #f3f6f8;
}

.dashboard-action-main strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
}

.dashboard-action-main p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-action-side {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.dashboard-action-side span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-action-side button,
.dashboard-action-empty button,
.dashboard-action-row-details button {
  min-width: 108px;
}

.dashboard-action-row-details {
  margin-top: 10px;
}

.dashboard-action-row-details summary {
  display: inline-flex;
  cursor: pointer;
  color: #7a5b26;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

.dashboard-action-row-details summary::-webkit-details-marker {
  display: none;
}

.dashboard-action-row-details > div {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #ecd6a7;
  border-radius: calc(var(--radius) - 4px);
  background: #fffaf0;
}

.dashboard-action-row-details .row-actions {
  margin-top: 10px;
}

.dashboard-action-empty {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 18px;
  border: 1px dashed rgba(15, 148, 136, 0.38);
  border-radius: var(--radius);
  background: rgba(15, 148, 136, 0.06);
}

.dashboard-action-empty p {
  margin: 0;
  color: var(--muted);
}

.message-center-panel {
  margin-bottom: 14px;
}

.message-focus-board {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(380px, 0.9fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 148, 136, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 148, 136, 0.08), rgba(234, 179, 8, 0.08));
}

.message-focus-board span,
.message-category-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.message-focus-board strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 22px;
}

.message-focus-board p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.message-category-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.message-category-stats button {
  display: grid;
  gap: 4px;
  justify-items: start;
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
}

.message-category-stats button.active {
  border-color: rgba(180, 35, 24, 0.22);
  background: #fff7ed;
}

.message-category-stats strong {
  color: var(--text);
  font-size: 24px;
}

.message-triage-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.message-triage-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: #fff;
}

.message-triage-item.danger {
  border-left-color: #b42318;
}

.message-triage-item.warn {
  border-left-color: #d97706;
}

.message-triage-item.info {
  border-left-color: var(--primary);
}

.message-triage-item > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #0f3f3a;
  background: #ecfdf3;
  font-weight: 900;
}

.message-triage-item strong,
.message-triage-item p {
  display: block;
  margin: 0;
}

.message-triage-item p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

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

.message-list.compact {
  gap: 12px;
}

.message-group {
  display: grid;
  gap: 10px;
}

.message-group + .message-group {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.message-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.message-group-head strong {
  color: var(--text);
  font-size: 15px;
}

.message-group-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.message-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.message-item.unread {
  box-shadow: inset 4px 0 0 var(--primary);
}

.message-item.read {
  opacity: 0.68;
}

.message-item.danger {
  border-color: rgba(180, 35, 24, 0.28);
  background: var(--danger-bg);
}

.message-item.warn {
  border-color: rgba(234, 179, 8, 0.42);
  background: #fffaf0;
}

.message-item.info {
  border-color: rgba(15, 148, 136, 0.18);
  background: rgba(15, 148, 136, 0.05);
}

.message-main {
  display: grid;
  gap: 5px;
}

.message-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.message-main strong {
  color: var(--text);
  font-size: 16px;
}

.message-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.notification-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.26);
}

.notification-drawer {
  position: fixed;
  z-index: 90;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  background: #fffdf8;
  border-left: 1px solid rgba(232, 183, 92, 0.32);
  box-shadow: -22px 0 60px rgba(15, 23, 42, 0.22);
  transform: translateX(102%);
  transition: transform 0.18s ease;
}

.notification-drawer.open {
  transform: translateX(0);
}

.notification-drawer header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.notification-drawer h3,
.notification-drawer p {
  margin: 0;
}

.notification-drawer h3 {
  font-size: 24px;
}

.notification-drawer p {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 900;
}

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

.notification-drawer .message-list {
  overflow: auto;
  padding-right: 4px;
}

.notification-drawer .message-item {
  grid-template-columns: 1fr;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1.1fr)) repeat(3, minmax(116px, 0.72fr));
  gap: 10px;
}

.command-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.command-btn {
  display: grid;
  gap: 6px;
  align-content: center;
  min-height: 88px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  color: var(--text);
}

.command-btn:hover {
  border-color: #d8ad59;
  background: #fff6e3;
}

.command-btn strong {
  font-size: 16px;
}

.command-btn span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.command-mini {
  min-height: 74px;
  background: #f8f5ee;
}

.command-mini strong {
  font-size: 14px;
}

.primary-command {
  color: #fff;
  background: linear-gradient(135deg, #11100e, #372b18);
  border-color: #d8ad59;
}

.primary-command span {
  color: rgba(255, 255, 255, 0.82);
}

.assistant-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #cfe9e6;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.assistant-hero h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.assistant-hero p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.assistant-actions {
  display: grid;
  gap: 10px;
  min-width: 160px;
}

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

.assistant-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.assistant-card-head strong {
  display: block;
  margin-bottom: 4px;
}

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

.assistant-step {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: #0f766e;
  color: #ffffff;
  font-weight: 800;
}

.assistant-checks,
.assistant-components {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.assistant-checks span,
.assistant-components span {
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #334155;
  font-size: 13px;
}

.assistant-components strong {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.assistant-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 10px;
}

.assistant-copy input {
  background: #f9fafb;
}

.assistant-note {
  margin: 0;
  padding: 10px;
  background: #f0fdfa;
  border: 1px solid #bde7e1;
  border-radius: var(--radius);
  color: #0f4f49;
  line-height: 1.55;
}

.assistant-risk {
  padding: 10px;
  background: var(--danger-bg);
  border: 1px solid #fecdca;
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.55;
}

.creator-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #cfe9e6;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.creator-hero h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.creator-hero p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.creator-metrics,
.creator-layout {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.creator-brief-panel {
  margin-bottom: 16px;
}

.creator-action-panel,
.creator-overview-details,
.creator-detail-details {
  margin-bottom: 14px;
}

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

.creator-action-row {
  display: grid;
  grid-template-columns: 42px minmax(230px, 1fr) 118px minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: #fff;
}

.creator-action-row.danger {
  border-left-color: #b42318;
  background: linear-gradient(90deg, rgba(180, 35, 24, 0.06), #fff 32%);
}

.creator-action-row.warn {
  border-left-color: #d97706;
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.07), #fff 32%);
}

.creator-action-row.info {
  border-left-color: var(--primary);
}

.creator-action-row.ok {
  border-left-color: #15803d;
}

.creator-action-index {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #5f4320;
  background: #fff4d8;
  font-weight: 900;
}

.creator-action-main,
.creator-action-next {
  min-width: 0;
}

.creator-action-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.creator-action-head strong {
  font-size: 18px;
}

.creator-action-main p,
.creator-action-next p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.creator-action-progress {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: #067647;
  background: #ecfdf3;
  text-align: center;
}

.creator-action-progress strong {
  font-size: 24px;
}

.creator-action-progress span,
.creator-action-progress em {
  color: inherit;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.creator-action-progress em {
  color: #557063;
  font-weight: 700;
}

.creator-action-next span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #6b3b00;
  background: #fff4d8;
  font-size: 12px;
  font-weight: 900;
}

.creator-action-buttons {
  display: grid;
  justify-items: end;
}

.creator-action-buttons button {
  min-width: 116px;
}

.creator-action-details {
  grid-column: 1 / -1;
  border-top: 1px solid #edf1f4;
  padding-top: 10px;
}

.creator-action-details summary {
  display: inline-flex;
  cursor: pointer;
  color: #0f766e;
  font-weight: 900;
  list-style: none;
}

.creator-action-details summary::-webkit-details-marker {
  display: none;
}

.creator-action-details > div {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #cfe9e6;
  border-radius: calc(var(--radius) - 4px);
  background: #f8fffd;
}

.creator-action-details p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.creator-mini-assignment-list {
  display: grid;
  gap: 8px;
}

.creator-mini-assignment {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.creator-mini-assignment span,
.creator-mini-assignment em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.creator-brief-form label {
  margin: 0;
}

.creator-brief-form .full {
  grid-column: 1 / -1;
}

.creator-brief-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

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

.creator-metrics div {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.creator-metrics strong {
  font-size: 28px;
}

.creator-layout {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.2fr);
}

.creator-grid,
.agent-list,
.agent-action-list,
.resource-action-list,
.creator-order-list,
.assignment-list,
.creator-report-preview {
  display: grid;
  gap: 10px;
}

.agent-action-panel {
  margin-bottom: 14px;
}

.agent-action-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.agent-action-row.danger {
  border-left-color: #b42318;
}

.agent-action-row.warn {
  border-left-color: #d97706;
}

.agent-action-row.ok {
  border-left-color: #15803d;
}

.agent-action-row > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #0f3f3a;
  background: #ecfdf3;
  font-weight: 900;
}

.agent-action-row strong,
.agent-action-row p {
  display: block;
  margin: 0;
}

.agent-action-row p {
  margin-top: 4px;
  color: var(--muted);
}

.agent-action-row em {
  min-width: 120px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #6b3b00;
  background: #fff4d8;
  text-align: center;
  font-style: normal;
  font-weight: 900;
}

.resource-action-panel {
  margin-bottom: 14px;
}

.resource-action-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.resource-action-row > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #0f3f3a;
  background: #ecfdf3;
  font-weight: 900;
}

.resource-action-row strong,
.resource-action-row p {
  display: block;
  margin: 0;
}

.resource-action-row p {
  margin-top: 4px;
  color: var(--muted);
}

.resource-action-row em {
  min-width: 140px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #0f3f3a;
  background: #ecfdf3;
  text-align: center;
  font-style: normal;
  font-weight: 900;
}

.agent-card,
.creator-card,
.creator-order-card {
  padding: 14px;
}

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

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

.agent-stats span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  color: var(--muted);
  font-size: 12px;
}

.agent-stats strong {
  color: var(--text);
  font-size: 22px;
}

.agent-only {
  display: none;
}

.agent-mode .agent-only {
  display: grid;
}

.agent-mode #dashboard > .metric-grid,
.agent-mode #dashboard > .split-layout {
  display: none;
}

.agent-workbench-panel {
  gap: 14px;
  margin-bottom: 14px;
}

.agent-workbench-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px;
  color: #fff8e6;
  background:
    linear-gradient(135deg, rgba(17, 16, 14, 0.95), rgba(52, 39, 21, 0.9)),
    #11100e;
  border: 1px solid rgba(232, 183, 92, 0.42);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.agent-workbench-hero h3 {
  margin: 4px 0 8px;
  font-size: 28px;
  line-height: 1.18;
}

.agent-workbench-hero p:not(.eyebrow) {
  margin: 0;
  max-width: 680px;
  color: #d8c8a2;
  line-height: 1.65;
}

.agent-workbench-actions,
.agent-quick-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.agent-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.agent-kpi-grid article,
.agent-next-card,
.agent-workbench-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.agent-kpi-grid article {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 14px;
}

.agent-kpi-grid span,
.agent-delivery-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.agent-kpi-grid strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.agent-kpi-grid p,
.agent-delivery-card p,
.agent-support-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.agent-next-card,
.agent-workbench-card {
  padding: 18px;
}

.compact-head {
  margin-bottom: 12px;
}

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

.agent-step-list article {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.agent-step-list article > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}

.agent-step-list strong {
  color: var(--text);
}

.agent-step-list p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.agent-step-list article.danger {
  border-color: rgba(180, 35, 24, 0.25);
  background: #fff7f5;
}

.agent-step-list article.warn {
  border-color: rgba(234, 179, 8, 0.35);
  background: #fffaf0;
}

.agent-step-list article.ok {
  border-color: rgba(15, 148, 136, 0.22);
  background: rgba(15, 148, 136, 0.06);
}

.agent-quick-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.agent-quick-panel button {
  display: grid;
  gap: 8px;
  min-height: 98px;
  padding: 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.agent-quick-panel strong {
  color: var(--text);
}

.agent-quick-panel span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.agent-merchant-board {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.agent-merchant-board-list {
  display: grid;
  gap: 10px;
}

.agent-merchant-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #9aa6b2;
  border-radius: var(--radius);
  background: #fbfcfd;
}

.agent-merchant-row.warn {
  border-left-color: #d97706;
}

.agent-merchant-row.danger {
  border-left-color: #b42318;
}

.agent-merchant-row.ok {
  border-left-color: var(--primary);
}

.agent-merchant-main,
.agent-merchant-task-line {
  display: grid;
  align-items: center;
  gap: 12px;
}

.agent-merchant-main {
  grid-template-columns: minmax(0, 1fr) auto;
}

.agent-merchant-main > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.agent-merchant-main > div:first-child strong {
  color: var(--text);
  font-size: 18px;
}

.agent-merchant-main > div:first-child span,
.agent-merchant-task-line span {
  color: var(--muted);
  font-size: 13px;
}

.agent-merchant-stock {
  display: grid;
  min-width: 84px;
  padding: 8px 12px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.agent-merchant-stock strong {
  color: var(--text);
  font-size: 20px;
}

.agent-merchant-stock.warn strong {
  color: #b45309;
}

.agent-merchant-stock.ok strong {
  color: var(--primary);
}

.agent-merchant-stock span {
  color: var(--muted);
  font-size: 12px;
}

.agent-merchant-task-line {
  grid-template-columns: repeat(3, auto) minmax(180px, 1fr);
  padding: 9px 10px;
  border-radius: var(--radius);
  background: #f1f5f7;
}

.agent-merchant-task-line strong {
  justify-self: end;
  color: var(--text);
  font-size: 13px;
}

.agent-merchant-slots {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.agent-merchant-slots summary {
  width: fit-content;
  color: var(--primary);
  cursor: pointer;
  font-weight: 900;
}

.agent-merchant-slots .video-slot-grid {
  margin-top: 12px;
}

.agent-merchant-empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.agent-merchant-empty p {
  margin: 0;
  color: var(--muted);
}

.agent-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.agent-support-pipeline,
.agent-delivery-list {
  display: grid;
  gap: 10px;
}

.agent-support-stage-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.agent-support-stage-row span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #f8fafc;
  font-weight: 900;
}

.agent-support-stage-row span.active {
  color: #8a4b12;
  border-color: rgba(232, 183, 92, 0.42);
  background: #fff8e6;
}

.agent-support-card,
.agent-delivery-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.agent-support-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.agent-support-card .row-actions,
.agent-delivery-card .row-actions {
  grid-column: 1 / -1;
}

.agent-delivery-card.temporary {
  border-color: rgba(15, 148, 136, 0.24);
  background: rgba(15, 148, 136, 0.05);
}

.agent-mode .lobster-actions,
.agent-mode .assistant-actions {
  display: none;
}

.creator-progress {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  margin: 10px 0;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
}

.creator-business-brief {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.creator-business-brief span {
  padding: 6px 9px;
  background: #eef8f6;
  border: 1px solid #cfe9e6;
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
}

.assignment-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.assignment-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.creator-video-preview {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #cfe9e6;
  border-radius: var(--radius);
  background: #ffffff;
}

.creator-video-preview video,
.preview-placeholder {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  background: #111827;
  object-fit: cover;
  overflow: hidden;
}

.preview-placeholder {
  display: grid;
  place-items: center;
  color: #94a3b8;
  border: 1px dashed #b6c4d4;
  background: #f1f5f9;
  font-weight: 800;
}

.creator-video-preview strong,
.creator-video-preview span {
  display: block;
  writing-mode: horizontal-tb;
  word-break: normal;
  overflow-wrap: anywhere;
}

.creator-video-preview span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.creator-video-preview.empty {
  background: #fbfdff;
}

.creator-invite-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px dashed #f3c46b;
  border-radius: var(--radius);
  background: #fffaf0;
}

.creator-invite-list > strong {
  font-size: 13px;
  color: #8a5a00;
}

.assignment-row.invite {
  background: #fffdf7;
}

.assignment-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.creator-report-panel {
  margin-bottom: 16px;
}

.creator-report-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.creator-report-card.warn {
  border-color: #fcd34d;
  background: #fffbeb;
}

.creator-report-card.ok {
  border-color: #abefc6;
  background: #ecfdf3;
}

.creator-report-card div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.creator-report-card span,
.creator-report-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.package-section.result-warn {
  border-color: #fcd34d;
  background: #fffbeb;
}

.lobster-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.08), rgba(234, 179, 8, 0.12)),
    #ffffff;
  border: 1px solid #c7e3ee;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lobster-hero h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.lobster-hero p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.lobster-actions {
  display: grid;
  gap: 10px;
  min-width: 170px;
}

.assistant-send-panel {
  margin-bottom: 16px;
}

.assistant-send-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.lobster-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.lobster-left-column {
  display: grid;
  gap: 16px;
}

.assistant-receipts {
  display: grid;
  gap: 10px;
}

.assistant-change-box {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  background: #fffbeb;
}

.assistant-change-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.assistant-change-head > div:first-child {
  display: grid;
  gap: 4px;
}

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

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

.assistant-change {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  background: #ffffff;
}

.assistant-change div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

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

.assistant-change p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.assistant-receipt {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.assistant-receipt.ok {
  border-color: #abefc6;
  background: #ecfdf3;
}

.assistant-receipt.fail {
  border-color: #fecdca;
  background: #fff1f0;
}

.assistant-receipt div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.assistant-receipt span,
.assistant-receipt em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.assistant-receipt p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

.result-ledger-panel,
.assistant-ops-panel,
.inventory-target-panel {
  margin-bottom: 16px;
}

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

.ledger-grid h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

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

.ledger-item,
.ops-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.ledger-item.debt {
  border-color: #fcd34d;
  background: #fffbeb;
}

.ledger-item div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ledger-item span,
.reminder-status span,
.reminder-status em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.ledger-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.reminder-status {
  display: grid;
  gap: 5px;
}

.ops-card input,
.ops-card select,
.ops-card textarea,
.inventory-target-list input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  font: inherit;
  background: #ffffff;
}

.inventory-target-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.inventory-target-list label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: var(--text);
}

.lobster-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 16px;
  margin-bottom: 16px;
}

.lobster-chat,
.lobster-board,
.lobster-connector {
  background: #ffffff;
}

.lobster-chat-priority {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lobster-board-priority {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lobster-record-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.5fr);
}

.lobster-messages {
  display: grid;
  gap: 8px;
  min-height: 320px;
  max-height: 520px;
  overflow: auto;
  padding: 10px;
  margin-top: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.assistant-mode {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  color: #9a3412;
}

.assistant-mode.connected {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.assistant-mode span {
  font-size: 13px;
  line-height: 1.45;
}

.lobster-message {
  max-width: 94%;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  font-size: 14px;
}

.lobster-message.user {
  justify-self: end;
  background: #e0f2fe;
  border-color: #bae6fd;
}

.lobster-message.assistant {
  justify-self: start;
  background: #f0fdfa;
  border-color: #bde7e1;
}

.lobster-message strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  color: var(--muted);
}

.lobster-message p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.lobster-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
  margin-top: 10px;
  align-items: stretch;
}

.lobster-input textarea {
  min-height: 96px;
  max-height: 180px;
  resize: vertical;
  line-height: 1.45;
}

.lobster-input button {
  min-height: 96px;
}

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

.lobster-metrics div,
.lobster-merchant-list article,
.lobster-alert {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.lobster-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.lobster-metrics strong {
  font-size: 26px;
}

.lobster-merchant-list,
.lobster-alerts {
  display: grid;
  gap: 10px;
}

.lobster-merchant-list article {
  display: grid;
  gap: 6px;
}

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

.lobster-merchant-list em {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.lobster-merchant-list em.ok,
.lobster-alert.ok {
  color: #067647;
  background: var(--ok-bg);
}

.lobster-merchant-list em.warn {
  color: #b54708;
}

.lobster-alert {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.55;
}

.lobster-connector {
  display: grid;
  gap: 12px;
}

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

.panel {
  min-width: 0;
  padding: 16px;
}

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

.panel-head.inline {
  margin-bottom: 16px;
}

.panel h3,
.info-block h3 {
  font-size: 17px;
}

.toolbar {
  margin-bottom: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  min-height: 38px;
  padding: 8px 10px;
  color: var(--text);
}

textarea {
  resize: vertical;
}

.toolbar input {
  max-width: 420px;
}

.toolbar select,
.panel-head select {
  max-width: 180px;
}

.publish-flow-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 14px;
  border-color: rgba(15, 148, 136, 0.24);
  background: linear-gradient(180deg, #ffffff, #f8fffc);
}

.publish-flow-head,
.publish-flow-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 16px;
  align-items: stretch;
}

.publish-flow-head h3,
.publish-flow-empty h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.publish-flow-head p,
.publish-flow-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.publish-flow-next {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: #fff;
}

.publish-flow-next.ok {
  border-left-color: #15803d;
}

.publish-flow-next.warn {
  border-left-color: #d97706;
}

.publish-flow-next.danger {
  border-left-color: #b42318;
}

.publish-flow-next.info {
  border-left-color: var(--primary);
}

.publish-flow-next > span,
.publish-flow-step > span {
  width: fit-content;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #6b3b00;
  background: #fff4d8;
  font-size: 12px;
  font-weight: 900;
}

.publish-flow-next strong {
  font-size: 22px;
}

.publish-flow-next button {
  justify-content: center;
  margin-top: 2px;
}

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

.publish-flow-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 116px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.publish-flow-step > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
}

.publish-flow-step.ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.publish-flow-step.warn {
  border-color: #fed7aa;
  background: #fffaf2;
}

.publish-flow-step.danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.publish-flow-step strong,
.publish-flow-step p {
  display: block;
  margin: 0;
}

.publish-flow-step p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.task-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 10px;
  background: #fff;
}

.task-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.task-action-panel,
.task-table-details {
  margin-bottom: 14px;
}

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

.task-action-row {
  display: grid;
  grid-template-columns: 42px minmax(280px, 1.1fr) minmax(260px, 0.95fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: #fff;
}

.task-action-row.selected {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.task-action-row.danger {
  border-left-color: #b42318;
  background: linear-gradient(90deg, rgba(180, 35, 24, 0.06), #fff 32%);
}

.task-action-row.warn {
  border-left-color: #d97706;
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.07), #fff 32%);
}

.task-action-row.info {
  border-left-color: var(--primary);
}

.task-action-row.ok {
  border-left-color: #15803d;
}

.task-action-index {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #5f4320;
  background: #fff4d8;
  font-weight: 900;
}

.task-action-main,
.task-action-next {
  min-width: 0;
}

.task-action-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.task-action-head strong {
  font-size: 18px;
}

.task-action-main p,
.task-action-next p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.task-action-next span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #6b3b00;
  background: #fff4d8;
  font-size: 12px;
  font-weight: 900;
}

.task-action-buttons {
  display: grid;
  justify-items: end;
}

.task-action-buttons button {
  min-width: 118px;
}

.task-action-details {
  grid-column: 1 / -1;
  border-top: 1px solid #edf1f4;
  padding-top: 10px;
}

.task-action-details summary {
  display: inline-flex;
  cursor: pointer;
  color: #0f766e;
  font-weight: 900;
  list-style: none;
}

.task-action-details summary::-webkit-details-marker {
  display: none;
}

.task-action-details > div {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #cfe9e6;
  border-radius: calc(var(--radius) - 4px);
  background: #f8fffd;
}

.task-action-details p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.task-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.task-main strong {
  display: block;
  margin-bottom: 4px;
}

.task-meta,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.task-meta {
  color: var(--muted);
  font-size: 13px;
}

.progress-block {
  display: grid;
  gap: 5px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: #e7edf3;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #f59e0b);
  border-radius: inherit;
}

.progress-block small {
  color: var(--muted);
  font-size: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.chip.ok {
  background: var(--ok-bg);
  color: #067647;
}

.chip.warn {
  background: var(--warn-bg);
  color: #b54708;
}

.chip.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.package-preview {
  min-height: 380px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: var(--radius);
  text-align: center;
}

.package-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.package-section:last-child {
  border-bottom: 0;
}

.package-section span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.package-section p {
  margin: 0;
  line-height: 1.55;
}

.package-json {
  white-space: pre-wrap;
  word-break: break-word;
  background: #111827;
  color: #e5e7eb;
  padding: 12px;
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  max-height: 180px;
  overflow: auto;
}

.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

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

th {
  color: var(--muted);
  font-size: 12px;
  background: #f9fafb;
}

td {
  font-size: 14px;
}

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

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

.row-actions button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

.row-actions button:hover {
  background: var(--surface-2);
}

.account-grid,
.material-grid {
  display: grid;
  gap: 14px;
}

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

.account-command-panel {
  margin: 14px 0;
  border-color: rgba(234, 179, 8, 0.3);
  background: linear-gradient(180deg, #fffdf8, #ffffff);
}

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

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

.account-command-metrics article {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.account-command-metrics article.warn {
  border-color: #fed7aa;
  background: #fff7ed;
}

.account-command-metrics article.danger {
  border-color: #fecaca;
  background: #fff1f0;
}

.account-command-metrics article.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.account-command-metrics span,
.account-command-focus span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-command-metrics strong {
  font-size: 30px;
  line-height: 1.1;
}

.account-command-metrics p,
.account-command-focus p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.account-command-focus article {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: #fff;
}

.account-command-focus article.danger {
  border-left-color: #b42318;
}

.account-command-focus article.warn {
  border-left-color: #d97706;
}

.account-command-focus article.info {
  border-left-color: var(--primary);
}

.account-command-focus article.ok {
  border-left-color: #15803d;
}

.account-command-focus strong {
  display: block;
  margin-bottom: 3px;
}

.account-command-focus button {
  min-width: 120px;
}

.account-action-panel {
  margin-bottom: 14px;
}

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

.account-action-row {
  display: grid;
  grid-template-columns: 42px minmax(190px, 0.9fr) minmax(230px, 1fr) minmax(260px, 1.2fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.account-action-row.danger {
  border-left-color: #b42318;
}

.account-action-row.warn {
  border-left-color: #d97706;
}

.account-action-row.info {
  border-left-color: var(--primary);
}

.account-action-row.ok {
  border-left-color: #15803d;
}

.account-action-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #0f3f3a;
  background: #ecfdf3;
  font-weight: 900;
}

.account-action-main,
.account-action-status,
.account-action-next {
  min-width: 0;
}

.account-action-main strong,
.account-action-next span {
  display: block;
  color: var(--text);
  font-weight: 900;
}

.account-action-main p,
.account-action-status p,
.account-action-status span,
.account-action-next p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.account-action-status span {
  display: block;
  margin: 0;
  color: #475467;
  font-weight: 900;
}

.account-action-next span {
  width: fit-content;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #6b3b00;
  background: #fff4d8;
}

.account-action-buttons {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.account-action-buttons button {
  min-width: 88px;
}

.account-detail-details {
  margin-top: 14px;
}

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

.project-map-panel {
  margin-bottom: 14px;
  border-color: rgba(15, 148, 136, 0.22);
  background: linear-gradient(180deg, #ffffff, #f8fffc);
}

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

.project-map-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: #fff;
}

.project-map-card.danger {
  border-left-color: #b42318;
}

.project-map-card.warn {
  border-left-color: #d97706;
}

.project-map-card.info {
  border-left-color: var(--primary);
}

.project-map-card.ok {
  border-left-color: #15803d;
}

.project-map-title,
.project-map-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-map-title strong {
  display: block;
  font-size: 18px;
}

.project-map-title span,
.project-map-next p {
  color: var(--muted);
  line-height: 1.45;
}

.project-map-title em {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: #ecfdf3;
  font-style: normal;
  font-weight: 900;
}

.project-map-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.project-map-metrics span {
  padding: 8px;
  border-radius: var(--radius);
  color: #475467;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
}

.project-map-next {
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid #edf1f4;
}

.project-map-next span {
  display: inline-flex;
  margin-bottom: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #6b3b00;
  background: #fff4d8;
  font-size: 12px;
  font-weight: 900;
}

.material-path-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.material-path-guide article {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid #d9e2ea;
  border-radius: var(--radius);
  background: #fff;
}

.material-path-guide strong {
  color: var(--text);
}

.material-path-guide span {
  color: var(--muted);
  line-height: 1.45;
}

.account-card,
.material-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.merchant-board-card {
  padding: 16px;
  display: grid;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.material-overview-details {
  margin-bottom: 14px;
}

.merchant-work-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(280px, 1.25fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.merchant-work-row.danger {
  border-left-color: #b42318;
}

.merchant-work-row.warn {
  border-left-color: #d97706;
}

.merchant-work-row.info {
  border-left-color: var(--primary);
}

.merchant-work-row.ok {
  border-left-color: #15803d;
}

.merchant-work-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.merchant-work-main h4,
.merchant-work-main p,
.merchant-work-next p {
  margin: 0;
}

.merchant-work-main h4 {
  font-size: 19px;
}

.merchant-work-main p,
.merchant-work-next p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.merchant-work-stock {
  display: grid;
  place-items: center;
  min-width: 82px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: #ecfdf3;
  color: #067647;
  text-align: center;
}

.merchant-work-stock.warn {
  color: #b54708;
  background: #fff7ed;
}

.merchant-work-stock strong {
  font-size: 22px;
}

.merchant-work-stock span,
.merchant-work-next span {
  font-size: 12px;
  font-weight: 900;
}

.merchant-work-next {
  min-width: 0;
}

.merchant-work-next span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: #6b3b00;
  background: #fff4d8;
}

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

.merchant-work-actions button {
  min-width: 96px;
}

.merchant-work-details {
  grid-column: 1 / -1;
  border-top: 1px solid #edf1f4;
  padding-top: 12px;
}

.merchant-work-details summary {
  display: inline-flex;
  cursor: pointer;
  color: #0f766e;
  font-weight: 900;
  list-style: none;
}

.merchant-work-details summary::-webkit-details-marker {
  display: none;
}

.merchant-work-details .merchant-board-grid {
  margin-top: 12px;
}

.merchant-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.merchant-board-head h4,
.merchant-board-head p {
  margin: 0;
}

.merchant-board-head h4 {
  font-size: 18px;
}

.merchant-board-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.merchant-board-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.merchant-video-board,
.material-slot-board {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cfe9e6;
  background: #f0fdfa;
  border-radius: var(--radius);
}

.merchant-video-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #0f3f3a;
}

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

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

.video-slot {
  min-height: 78px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 10px;
  border-radius: var(--radius);
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.video-slot strong,
.video-slot span,
.video-slot em {
  min-width: 0;
}

.video-slot span,
.video-slot em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.video-slot.filled {
  border-color: #99d8d1;
  cursor: pointer;
}

.video-slot.filled:hover {
  background: #ecfdf3;
  border-color: var(--primary);
}

.video-slot.empty {
  color: #8a95a3;
  background: #f8fafc;
  border-style: dashed;
}

.video-slot.tall {
  min-height: 116px;
}

.video-slot.tall span {
  white-space: normal;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.video-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 22px;
  color: #102027;
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.14), rgba(234, 179, 8, 0.18)),
    #ffffff;
  border: 1px solid #cfe9e6;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.video-hero h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.video-hero p:last-child {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

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

.merchant-stat {
  display: grid;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.merchant-stat:hover {
  border-color: var(--primary);
}

.merchant-stat.inventory-alert {
  background: #fff7ed;
  border-color: #fed7aa;
}

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

.merchant-stat strong {
  font-size: 26px;
}

.merchant-stat em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.merchant-stat em.ok {
  color: #067647;
}

.merchant-stat em.warn {
  color: #b54708;
}

.upload-box {
  border: 1px dashed #97cfc8;
  border-radius: var(--radius);
  padding: 14px;
  background: #f0fdfa;
}

.upload-box input {
  background: #fff;
}

.upload-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.card-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.card-title h4 {
  margin: 0;
  font-size: 16px;
}

.card-title p,
.detail-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-line strong {
  color: var(--text);
}

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

.settings-action-panel {
  margin-bottom: 14px;
  border-color: rgba(15, 148, 136, 0.2);
  background: linear-gradient(180deg, #ffffff, #f8fffc);
}

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

.settings-step-list article {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 168px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.settings-step-list strong {
  font-size: 16px;
}

.settings-step-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.settings-step-list button {
  align-self: end;
  justify-content: center;
}

.publish-boundary-panel {
  margin-bottom: 14px;
  border-color: rgba(234, 179, 8, 0.32);
  background: linear-gradient(180deg, #fffdf8, #ffffff);
}

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

.publish-boundary-grid article {
  display: grid;
  gap: 8px;
  min-height: 158px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.publish-boundary-grid article.warn {
  border-color: #fed7aa;
  background: #fff7ed;
}

.publish-boundary-grid article.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.publish-boundary-grid article.info {
  border-color: #cfe9e6;
  background: #f8fffc;
}

.publish-boundary-grid span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #6b3b00;
  background: #fff4d8;
  font-size: 12px;
  font-weight: 900;
}

.publish-boundary-grid strong {
  color: var(--text);
  font-size: 16px;
}

.publish-boundary-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.info-block {
  padding: 18px;
}

.info-block ol,
.info-block ul {
  padding-left: 20px;
  line-height: 1.75;
  color: #3b4552;
}

.info-block.warning {
  background: #fffaf0;
  border-color: #fedf89;
}

.info-block.run-rules {
  background: #eefaf6;
  border-color: #b7e4d7;
}

.info-block.run-rules li {
  margin-bottom: 6px;
}

.auth-config {
  display: grid;
  gap: 12px;
}

.risk-config {
  display: grid;
  gap: 12px;
}

.action-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.action-stack .ghost-btn,
.action-stack .primary-btn {
  justify-content: center;
  width: 100%;
}

.auth-config label {
  font-size: 12px;
}

.auth-config input {
  min-height: 36px;
}

dialog {
  width: min(860px, calc(100vw - 28px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: 0 22px 80px rgba(16, 24, 40, 0.26);
}

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

.dialog-form {
  padding: 18px;
}

.dialog-form header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.dialog-form .dialog-back-btn {
  min-width: 104px;
}

.dialog-form h3 {
  margin: 0;
}

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

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

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

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

.is-hidden {
  display: none !important;
}

.account-pick-zone,
.task-next-video {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #bde7e1;
  border-radius: var(--radius);
  background: #f0fdfa;
}

.account-pick-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 12px;
}

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

.task-account-info,
.task-next-video {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.task-account-info strong,
.task-next-video strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.task-account-info span,
.task-next-video span {
  display: block;
}

.task-next-video {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: #f8fafc;
  border-color: #d9e2ea;
}

.ai-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f0fdfa;
  border: 1px solid #bde7e1;
  border-radius: var(--radius);
}

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

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

.wizard-steps span {
  display: grid;
  place-items: center;
  min-height: 36px;
  background: #f0fdfa;
  border: 1px solid #bde7e1;
  border-radius: var(--radius);
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
}

.dialog-form footer {
  justify-content: flex-end;
  margin-top: 18px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 360px;
  background: #17202a;
  color: #fff;
  padding: 12px 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
}

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

@media (max-width: 1080px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-art {
    min-height: auto;
    padding: 32px;
    border-right: 0;
    border-bottom: 1px solid rgba(236, 190, 101, 0.24);
  }

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

  .login-panel {
    align-self: start;
    margin: 28px 0;
  }

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

  .sidebar {
    position: static;
  }

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

  .guard-note {
    margin-top: 0;
  }

  .split-layout,
  .lobster-grid,
  .lobster-workbench,
  .settings-grid,
  .settings-step-list,
  .publish-boundary-grid,
  .publish-flow-head,
  .publish-flow-steps,
  .account-command-metrics,
  .account-command-focus article,
  .project-map-list,
  .project-map-metrics,
  .material-path-guide,
  .account-grid,
  .account-action-row,
  .material-grid,
  .merchant-stats,
  .command-home,
  .dashboard-gateway-grid,
  .dashboard-signal-strip,
  .message-focus-board,
  .message-category-stats,
  .message-triage-item,
  .portal-run-row,
  .agent-workbench-hero,
  .agent-kpi-grid,
  .agent-quick-panel,
  .agent-merchant-task-line,
  .agent-workbench-grid,
  .agent-support-stage-row,
  .matrix-settlement-box,
  .matrix-action-row,
  .agent-action-row,
  .resource-action-row,
  .merchant-work-row,
  .task-action-row,
  .creator-action-row,
  .creator-mini-assignment,
  .assistant-send-grid,
  .ledger-grid,
  .ops-grid,
  .inventory-target-list,
  .creator-metrics,
  .creator-brief-form,
  .creator-layout,
  .command-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .login-screen {
    padding: 14px;
  }

  .login-shell {
    width: 100%;
  }

  .login-art {
    padding: 22px;
  }

  .login-art::before {
    inset: 12px;
  }

  .login-preview-head,
  .login-preview-list p,
  .login-stats {
    align-items: stretch;
    flex-direction: column;
  }

  .login-brand {
    align-items: flex-start;
  }

  .login-copy h2 {
    font-size: 29px;
  }

  .login-preview,
  .login-stats {
    display: none;
  }

  .login-panel {
    width: calc(100% - 32px);
    padding: 24px;
  }

  .workspace,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .task-main,
  .panel-head.inline,
  .video-hero,
  .assistant-hero,
  .lobster-hero,
  .creator-hero,
  .backend-status {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-heading {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .page-back-btn,
  .dialog-back-btn {
    width: 100%;
  }

  .dialog-form header {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 12px;
  }

  .top-actions,
  .toolbar,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .command-home {
    padding: 18px;
  }

  .command-home-main {
    min-height: auto;
  }

  .dashboard-next-list article {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .dashboard-next-list button,
  .agent-step-list button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .dashboard-action-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .dashboard-action-side {
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  .dashboard-action-side button {
    width: 100%;
  }

  .agent-workbench-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-step-list article {
    grid-template-columns: 36px minmax(0, 1fr);
  }

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

  .message-item .row-actions {
    justify-content: stretch;
  }

  .message-item .row-actions button {
    flex: 1 1 140px;
  }

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

  .form-grid,
  .account-pick-head,
  .task-next-video,
  .connector-grid,
  .lobster-input,
  .assistant-copy,
  .assistant-checks,
  .assistant-components,
  .lobster-metrics,
  .ledger-grid,
  .ops-grid,
  .inventory-target-list,
  .creator-metrics,
  .creator-layout,
  .assignment-row,
	  .merchant-board-grid,
	  .matrix-role-guide,
	  .matrix-action-board,
	  .matrix-acceptance-grid,
	  .matrix-test-guide,
	  .matrix-action-row,
	  .portal-role-map,
	  .portal-grid,
	  .portal-flow-board,
	  .portal-run-row,
	  .dashboard-gateway-grid,
	  .dashboard-signal-strip,
	  .message-focus-board,
	  .message-category-stats,
	  .message-triage-item,
	  .merchant-work-row,
	  .account-action-row,
	  .account-command-focus article,
	  .publish-flow-head,
	  .publish-flow-steps,
	  .project-map-list,
	  .task-action-row,
	  .creator-action-row,
	  .agent-action-row,
	  .resource-action-row,
	  .settings-step-list,
	  .publish-boundary-grid,
	  .creator-mini-assignment,
	  .agent-kpi-grid,
	  .agent-quick-panel,
	  .agent-merchant-main,
	  .agent-merchant-task-line,
	  .agent-workbench-grid,
	  .agent-support-stage-row,
	  .matrix-settlement-box,
	  .support-stage-grid,
	  .support-stage-summary {
	    grid-template-columns: 1fr;
	  }

	  .merchant-work-main,
	  .merchant-work-actions {
	    align-items: stretch;
	    flex-direction: column;
	    justify-content: flex-start;
	  }

	  .merchant-work-actions button,
	  .task-action-buttons button {
	    width: 100%;
	  }

	  .task-action-buttons,
	  .creator-action-buttons {
	    justify-items: stretch;
	  }

	  .portal-audit-timeline article > div,
	  .matrix-audit-log article > div {
	    display: grid;
	  }

  .creator-video-preview {
    grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  }

  .creator-video-preview video,
  .preview-placeholder {
    max-width: 160px;
  }

  .assistant-card-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .assistant-card-head .chip {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .toolbar input,
  .toolbar select,
  .panel-head select {
    max-width: none;
  }
}
