:root {
  --ws-mint: #02f5c2;
  --ws-cyan: #09c3ff;
  --ws-blue: #0370ff;
  --ws-deep: #014fbc;
  --ws-ink: #231816;
  --ws-paper: #fff;
  --owner-blue: var(--ws-blue);
  --owner-blue-strong: var(--ws-deep);
  --owner-blue-soft: #edf7ff;
  --owner-cyan: var(--ws-cyan);
  --owner-ink: #14243a;
  --owner-muted: #6f7f94;
  --owner-line: #dfe9f4;
  --owner-panel: #f7fbff;
  --owner-shadow: 0 22px 60px rgba(1, 79, 188, .09);
}

/* 用户后台骨架：保留各业务页面与贾维斯主页，只统一页面之间的导航和阅读层级。 */
.owner-app:not(.intent-home) {
  color: var(--owner-ink) !important;
  background:
    radial-gradient(circle at 83% 0, rgba(57, 167, 255, .12), transparent 28rem),
    linear-gradient(180deg, #f8fbff 0, #fff 29rem) !important;
}

.owner-app:not(.intent-home) > .app-frame > .stage {
  background: transparent !important;
}

.owner-app:not(.intent-home) .page-canvas {
  width: min(1360px, calc(100% - 48px));
  padding-bottom: 80px;
}

.owner-command-shell.approved-pagebar {
  position: relative;
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.owner-command-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid rgba(205, 219, 234, .8);
}

.owner-command-shell .approved-pagebar-home {
  gap: 12px;
}

.owner-brand-mark {
  position: relative;
  display: block;
  width: 40px !important;
  height: 40px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: linear-gradient(145deg, #69c8ff, #1384ef) !important;
  box-shadow: 0 10px 24px rgba(29, 139, 241, .24) !important;
  overflow: hidden;
}

.owner-brand-mark::after {
  display: none !important;
}

.owner-brand-mark i {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 4px 10px 10px;
  border: 2px solid rgba(255, 255, 255, .92);
  transform: rotate(45deg);
}

.owner-brand-mark i:nth-child(1) { left: 6px; top: 7px; }
.owner-brand-mark i:nth-child(2) { right: 6px; top: 7px; transform: rotate(135deg); }
.owner-brand-mark i:nth-child(3) { left: 12px; bottom: 5px; transform: rotate(-45deg); }

.owner-brand-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.owner-command-shell .owner-brand-copy strong {
  color: #11213a;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
}

.owner-brand-copy small {
  color: #8b99ac !important;
  font-size: 9px !important;
  font-weight: 700;
  letter-spacing: .13em;
}

.owner-command-context {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--owner-muted);
  font-size: 13px;
}

.owner-command-shell .approved-pagebar-presence {
  font-size: 13px;
  color: #547089;
}

.owner-command-shell .approved-pagebar-presence i {
  width: 8px;
  height: 8px;
  background: #20c6b5;
  box-shadow: 0 0 0 5px rgba(32, 198, 181, .1);
}

.owner-current-client {
  padding-left: 18px;
  border-left: 1px solid var(--owner-line);
}

.owner-session-trigger {
  min-width: 64px;
  height: 36px;
  border: 1px solid #dce5ef;
  border-radius: 11px;
  color: #607087;
  background: rgba(255, 255, 255, .78);
  cursor: pointer;
}

.owner-session-trigger:hover,
.owner-session-trigger:focus-visible {
  color: var(--owner-blue-strong);
  border-color: #a9d5ff;
  background: #fff;
}

.owner-primary-nav {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid var(--owner-line);
}

.owner-primary-nav button {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 60px;
  padding: 11px 13px;
  border: 1px solid #edf2f7;
  border-radius: 13px;
  color: #68778c;
  background: rgba(255, 255, 255, .7);
  text-align: left;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.owner-primary-nav button strong {
  color: inherit !important;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.owner-primary-nav button small {
  color: #a1acba !important;
  font-size: 10px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-primary-nav button:hover {
  color: #276fae;
  border-color: #dcecff;
  background: rgba(240, 248, 255, .82);
  transform: translateY(-1px);
}

.owner-primary-nav button.active {
  color: #0b75dc;
  border-color: #bcdfff;
  background: linear-gradient(145deg, #f3f9ff, #e8f5ff);
  box-shadow: 0 8px 22px rgba(31, 135, 232, .1);
}

.owner-primary-nav button.active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: -17px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--owner-blue), transparent);
  box-shadow: 0 0 12px rgba(35, 140, 241, .45);
}

.owner-page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 36px;
  padding: 48px 0 36px;
}

.owner-page-intro > div > span {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--owner-blue-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.owner-page-intro h1 {
  max-width: 800px;
  margin: 0;
  color: var(--owner-ink) !important;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -.055em;
}

.owner-page-intro p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--owner-muted) !important;
  font-size: 16px;
  line-height: 1.75;
}

.owner-orchestrator-entry {
  display: grid;
  grid-template-columns: 34px auto 20px;
  align-items: center;
  gap: 12px;
  min-width: 245px;
  min-height: 68px;
  padding: 12px 16px;
  border: 1px solid #cfe7fd;
  border-radius: 18px;
  color: #24557f;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 12px 34px rgba(37, 102, 159, .08);
  text-align: left;
  cursor: pointer;
}

.owner-orchestrator-entry > i {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, #f4ffff 0 7%, #9ee5ff 18%, #2b96ef 58%, #1262bd 100%);
  box-shadow: 0 0 0 6px rgba(54, 158, 244, .08), 0 0 22px rgba(43, 150, 239, .28);
}

.owner-orchestrator-entry span {
  display: grid;
  gap: 3px;
}

.owner-orchestrator-entry small {
  color: #90a0b0 !important;
  font-size: 10px !important;
}

.owner-orchestrator-entry strong {
  color: #204c73 !important;
  font-size: 14px;
}

.owner-orchestrator-entry b {
  color: var(--owner-blue);
  font-size: 20px;
}

.owner-orchestrator-entry:hover,
.owner-orchestrator-entry:focus-visible {
  border-color: #8ecbff;
  background: #fff;
  box-shadow: 0 16px 38px rgba(32, 119, 196, .14);
}

.owner-app:not(.intent-home) .approved-formal-page {
  padding-top: 0;
}

/* 放大现有正式页面的阅读与操作尺度，不改各模块的数据合同。 */
.owner-app:not(.intent-home) .approved-formal-page {
  font-size: 15px;
}

.owner-app:not(.intent-home) .section-label,
.owner-app:not(.intent-home) .eyebrow,
.owner-app:not(.intent-home) .mini-label {
  font-size: 11px;
  font-weight: 800;
}

.owner-app:not(.intent-home) .section-head h2,
.owner-app:not(.intent-home) .panel-head h3 {
  font-size: 24px;
}

.owner-app:not(.intent-home) button,
.owner-app:not(.intent-home) input,
.owner-app:not(.intent-home) textarea,
.owner-app:not(.intent-home) select {
  font-size: 14px;
}

.owner-app:not(.intent-home) input,
.owner-app:not(.intent-home) select {
  min-height: 44px;
}

.owner-app:not(.intent-home) .outline-button,
.owner-app:not(.intent-home) .action-button {
  min-height: 42px;
  padding-inline: 17px;
}

.owner-app:not(.intent-home) button:focus-visible,
.owner-app:not(.intent-home) a:focus-visible,
.owner-app:not(.intent-home) input:focus-visible,
.owner-app:not(.intent-home) textarea:focus-visible,
.owner-app:not(.intent-home) select:focus-visible {
  outline: 3px solid rgba(35, 140, 241, .22);
  outline-offset: 2px;
}

.owner-app:not(.intent-home) .library-summary {
  gap: 12px;
}

.owner-app:not(.intent-home) .library-summary > div {
  min-height: 92px;
  padding: 18px 20px;
  border: 1px solid #e5edf6;
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 30px rgba(33, 73, 116, .055);
}

.owner-app:not(.intent-home) .library-summary strong {
  color: #17304f !important;
  font-size: 28px;
  line-height: 1;
}

.owner-app:not(.intent-home) .library-summary span,
.owner-app:not(.intent-home) .library-summary small {
  color: #7f8da0 !important;
  font-size: 12px !important;
}

.owner-app:not(.intent-home) .empty,
.owner-app:not(.intent-home) .delivery-empty {
  margin: 18px 0;
  padding: 38px 24px;
  border: 1px dashed #cfddeb;
  border-radius: 18px;
  color: #718198 !important;
  background: rgba(247, 251, 255, .9);
  font-size: 14px;
  line-height: 1.7;
}

.owner-app .modal-backdrop {
  padding: 24px;
  background: rgba(26, 48, 76, .28) !important;
  backdrop-filter: blur(10px);
}

.owner-app .modal {
  width: min(820px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(218, 230, 241, .95) !important;
  border-radius: 24px;
  color: var(--owner-ink) !important;
  background: #fff !important;
  box-shadow: 0 28px 80px rgba(24, 58, 96, .2) !important;
  scrollbar-gutter: stable;
}

.owner-app .modal-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #e3ebf3;
  border-radius: 50%;
  color: #607087;
  background: #f8fbfe;
  font-size: 21px;
}

/* 用户登录也是同一产品入口，不再显示成深色开发工作台。 */
body.owner-app .auth-shell {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 520px);
  gap: clamp(60px, 9vw, 150px);
  min-height: 100vh;
  padding: clamp(34px, 6vw, 86px) max(28px, calc((100vw - 1320px) / 2));
  color: var(--owner-ink);
  background:
    radial-gradient(circle at 22% 43%, rgba(42, 153, 246, .18), transparent 25rem),
    linear-gradient(135deg, #f4faff, #fff 58%);
}

body.owner-app .auth-shell::before {
  content: "把生意增长，交给你的 AI 团队";
  align-self: center;
  max-width: 650px;
  color: #132844;
  font-size: clamp(45px, 5.3vw, 76px);
  font-weight: 880;
  line-height: 1.06;
  letter-spacing: -.065em;
  white-space: pre-line;
}

body.owner-app .auth-shell::after {
  content: "从账号定位到内容生产，多个 Agent 自动协作。你只需要说目标，随时看进度，最终拿结果。";
  position: absolute;
  left: max(28px, calc((100vw - 1320px) / 2));
  top: calc(50% + 112px);
  width: min(620px, 42vw);
  color: #6d7e94;
  font-size: 17px;
  line-height: 1.8;
}

body.owner-app .auth-shell .auth-card {
  position: relative;
  width: 100%;
  padding: 42px;
  border: 1px solid rgba(197, 217, 237, .9);
  border-radius: 28px;
  color: var(--owner-ink);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 30px 90px rgba(40, 91, 143, .14);
}

body.owner-app .auth-shell .auth-brand {
  color: var(--owner-blue-strong);
  font-size: 16px;
}

body.owner-app .auth-shell .auth-brand span {
  color: #90a0b3;
}

body.owner-app .auth-shell .auth-card h1 {
  margin: 44px 0 12px;
  color: #16263c;
  font-size: 34px;
}

body.owner-app .auth-shell .auth-card p {
  margin-bottom: 30px;
  color: #748399;
  font-size: 15px;
}

body.owner-app .auth-shell .auth-card label {
  gap: 9px;
  color: #52647c;
  font-size: 13px;
}

body.owner-app .auth-shell .auth-card input {
  height: 52px;
  border-color: #dce6f0;
  border-radius: 13px;
  color: #1c2d45;
  background: #f9fbfe;
}

body.owner-app .auth-shell .auth-card input:focus {
  border-color: #68b9ff;
  box-shadow: 0 0 0 4px rgba(35, 140, 241, .1);
}

body.owner-app .auth-shell .auth-card form button {
  height: 52px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #2ba5f8, #0878e7);
  box-shadow: 0 14px 26px rgba(8, 120, 231, .22);
}

body.owner-app .auth-shell .auth-switch {
  color: var(--owner-blue-strong);
}

@media (max-width: 1120px) {
  .owner-primary-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .owner-primary-nav button.active::after {
    display: none;
  }

  body.owner-app .auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 470px);
    gap: 42px;
  }
}

@media (max-width: 820px) {
  .owner-app:not(.intent-home) .page-canvas {
    width: min(100% - 28px, 1360px);
  }

  .owner-command-top {
    min-height: 68px;
  }

  .owner-current-client,
  .owner-command-shell .approved-pagebar-presence {
    display: none;
  }

  .owner-primary-nav {
    display: flex;
    margin-inline: -14px;
    padding-inline: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .owner-primary-nav::-webkit-scrollbar {
    display: none;
  }

  .owner-primary-nav button {
    flex: 0 0 132px;
  }

  .owner-page-intro {
    grid-template-columns: 1fr;
    padding: 34px 0 28px;
  }

  .owner-page-intro h1 {
    font-size: 36px;
  }

  .owner-orchestrator-entry {
    width: 100%;
  }

  body.owner-app .auth-shell {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 28px 18px;
  }

  body.owner-app .auth-shell::before,
  body.owner-app .auth-shell::after {
    display: none;
  }
}

@media (max-width: 520px) {
  .owner-brand-copy small,
  .owner-session-trigger {
    display: none;
  }

  .owner-page-intro h1 {
    font-size: 30px;
  }

  .owner-page-intro p {
    font-size: 14px;
  }

  body.owner-app .auth-shell .auth-card {
    padding: 28px 22px;
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .owner-primary-nav button {
    transition: none;
  }
}

body.owner-app .auth-shell::before {
  content: "把生意增长，交给你的 AI 团队";
}

body.owner-app .auth-shell::after {
  content: "从账号定位到内容生产，多个 Agent 自动协作。你只需要说目标、看进度，最后拿结果。";
}

/*
 * 用户后台统一色层。
 * 此层只收口颜色、边框、焦点和状态语义，不改变已定稿页面的业务结构与交互。
 */
.owner-app:not(.intent-home) :is(
  .delivery-primary,
  .video-direct-start button,
  .dh-submit button,
  .comic-task form button,
  .knowledge-assistant button,
  .material-proposal-review footer button,
  .intake-v2-actions .intake-primary
) {
  border-color: var(--ws-blue) !important;
  color: #fff !important;
  background: var(--ws-blue) !important;
  box-shadow: 0 10px 24px rgba(3, 112, 255, .16) !important;
}

.owner-app:not(.intent-home) :is(
  .delivery-primary,
  .video-direct-start button,
  .dh-submit button,
  .comic-task form button,
  .knowledge-assistant button,
  .material-proposal-review footer button,
  .intake-v2-actions .intake-primary
):hover {
  border-color: var(--ws-deep) !important;
  background: var(--ws-deep) !important;
}

.owner-app:not(.intent-home) :is(
  .state.running,
  .state.queued,
  .state.submitted,
  .status.running,
  .status.active,
  .is-current
) {
  color: var(--ws-deep) !important;
  background: #eaf5ff !important;
}

.owner-app:not(.intent-home) :is(
  .state.ready,
  .state.succeeded,
  .state.completed,
  .status.done,
  .status.completed
) {
  color: #08785e !important;
  background: #e8fff8 !important;
}

/* 三个独立业务页面此前各自携带旧绿色、灰色和旧蓝主题，统一为同一用户后台。 */
:is(.douyin-research-app, .engagement-app, .publishing-app) {
  --research-ink: #14243a;
  --research-muted: #6f7f94;
  --research-line: #dfe9f4;
  --research-blue: var(--ws-blue);
  --research-soft: #edf7ff;
  --ink: #14243a;
  --muted: #6f7f94;
  --line: #dfe9f4;
  --paper: #fff;
  --green: var(--ws-blue);
  --soft: #edf7ff;
  min-height: 100vh;
  color: #14243a !important;
  background:
    radial-gradient(circle at 84% 0, rgba(9, 195, 255, .1), transparent 30rem),
    linear-gradient(180deg, #f7fbff 0, #fff 31rem) !important;
}

:is(.research-shell, .engagement-shell, .publishing-shell) {
  width: min(1360px, calc(100% - 48px));
  max-width: 1360px;
}

:is(.research-masthead, .engagement-head, .publishing-head) {
  border: 0 !important;
  border-bottom: 1px solid var(--owner-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

:is(.research-masthead, .publishing-head) {
  padding-inline: 0 !important;
}

.engagement-head {
  padding: 30px 0 !important;
}

:is(.research-masthead, .engagement-head, .publishing-head) h1 {
  color: #14243a !important;
}

:is(
  .research-kicker,
  .section-label,
  .engagement-head > div > span,
  .panel > header span
) {
  color: var(--ws-blue) !important;
}

:is(.session-card, .research-card, .task-card, .result-card, .panel, .publish-card, .metrics article) {
  border-color: var(--owner-line) !important;
  background: #fff !important;
  box-shadow: 0 14px 42px rgba(1, 79, 188, .06) !important;
}

:is(.douyin-research-app, .engagement-app, .publishing-app) :is(input, select, textarea) {
  border-color: #d5e2ef !important;
  color: #14243a !important;
  background: #fbfdff !important;
}

:is(.douyin-research-app, .engagement-app, .publishing-app) :is(input, select, textarea):focus {
  border-color: var(--ws-blue) !important;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(3, 112, 255, .1) !important;
}

:is(.douyin-research-app, .engagement-app, .publishing-app) :is(
  .primary-action,
  button:not(.secondary-action):not(.ghost-action):not(.danger-action):not(.small-action)
) {
  border-color: var(--ws-blue);
  color: #fff;
  background: var(--ws-blue);
  box-shadow: 0 10px 24px rgba(3, 112, 255, .14);
}

:is(.douyin-research-app, .engagement-app, .publishing-app) :is(
  .primary-action,
  button:not(.secondary-action):not(.ghost-action):not(.danger-action):not(.small-action)
):hover {
  background: var(--ws-deep);
}

:is(.douyin-research-app, .engagement-app, .publishing-app) :is(
  .secondary-action,
  .small-action
) {
  border: 1px solid #b9dcff;
  color: var(--ws-deep);
  background: #edf7ff;
}

:is(.douyin-research-app, .engagement-app, .publishing-app) .ghost-action {
  border: 1px solid var(--owner-line);
  color: #53667d;
  background: #fff;
}

:is(.douyin-research-app, .engagement-app, .publishing-app) :is(
  button,
  a,
  input,
  textarea,
  select
):focus-visible {
  outline: 3px solid rgba(3, 112, 255, .2);
  outline-offset: 2px;
}

.engagement-app :is(.lead:hover, .lead.active, .message.outbound) {
  background: #edf7ff !important;
}

.engagement-app :is(.lead b, .message footer .sent) {
  color: var(--ws-blue) !important;
}

.engagement-app #ai-draft {
  background: var(--ws-blue) !important;
}

:is(.state-badge.is-ready, .state.ready, .state.succeeded, .state.completed) {
  color: #08785e !important;
  background: #e8fff8 !important;
}

:is(.state-badge.is-active, .state.running, .state.queued, .state.submitted) {
  color: var(--ws-deep) !important;
  background: #eaf5ff !important;
}

:is(.research-toast, #toast, .publish-toast) {
  color: #fff !important;
  background: var(--ws-deep) !important;
  box-shadow: 0 18px 50px rgba(1, 79, 188, .2) !important;
}

@media (max-width: 760px) {
  :is(.research-shell, .engagement-shell, .publishing-shell) {
    width: min(100% - 24px, 1360px);
  }
}
