: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);
}

* {
  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: 8px;
}

.nav-item {
  border: 0;
  color: #dbe4ee;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius);
}

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

.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);
}

.backend-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  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 div {
  display: grid;
  gap: 3px;
}

.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;
}

.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-center h3 {
  margin: 0;
  font-size: 24px;
}

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

.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-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,
.creator-order-list,
.assignment-list,
.creator-report-preview {
  display: grid;
  gap: 10px;
}

.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-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;
}

.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-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));
}

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

.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);
}

.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;
}

.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 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,
  .account-grid,
  .material-grid,
  .merchant-stats,
  .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;
  }

  .top-actions,
  .toolbar,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .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 {
    grid-template-columns: 1fr;
  }

  .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;
  }
}
