:root {
  --studio-bg: #ffffff;
  --studio-panel: #ffffff;
  --studio-panel-soft: #f7f7f8;
  --studio-ink: #171717;
  --studio-muted: #737373;
  --studio-line: #e5e5e5;
  --studio-line-soft: #eeeeee;
  --studio-sidebar: #f7f7f7;
  --studio-accent: #171717;
  --studio-teal: #0f766e;
  --studio-amber: #b45309;
  --studio-danger: #be123c;
  --market-up-red: #dc2626;
  --market-up-red-soft: #fff1f2;
  --market-up-red-line: #fecdd3;
  --market-down-green: #16a34a;
  --market-down-green-soft: #f0fdf4;
  --market-down-green-line: #bbf7d0;
  --studio-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --studio-sidebar-motion: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --el-color-primary: #171717;
  --el-color-primary-light-3: #4a4a4a;
  --el-color-primary-light-5: #737373;
  --el-color-primary-light-7: #d4d4d4;
  --el-color-primary-light-8: #e5e5e5;
  --el-color-primary-light-9: #f5f5f5;
  --el-color-primary-dark-2: #000000;
  --el-border-color: #e5e5e5;
  --el-border-color-light: #eeeeee;
  --el-fill-color-light: #f7f7f8;
  --el-text-color-primary: #171717;
  --el-text-color-regular: #404040;
  --el-text-color-secondary: #737373;
  --el-border-radius-base: 8px;
  font-family:
    "Public Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* Public AI Trading home page */
.landing-page {
  --landing-dark: #111411;
  --landing-dark-soft: #1a1e1a;
  --landing-paper: #f4f5f2;
  --landing-white: #ffffff;
  --landing-ink: #171a17;
  --landing-muted: #666d66;
  --landing-line: #d9ddd7;
  --landing-red: #d84a4a;
  --landing-green: #3f8f62;
  min-height: 100vh;
  background: var(--landing-paper);
  color: var(--landing-ink);
  font-family:
    "Public Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

.landing-page button,
.landing-page a,
.landing-page h1,
.landing-page h2,
.landing-page h3,
.landing-page p,
.landing-page span {
  letter-spacing: 0;
}

.landing-container,
.landing-header-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 68px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--landing-dark);
  color: #ffffff;
}

.landing-header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 28px;
}

.landing-brand,
.landing-footer-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-brand {
  width: fit-content;
  color: #ffffff;
  text-decoration: none;
}

.landing-brand img,
.landing-footer-brand img {
  width: 30px;
  height: 30px;
  display: block;
}

.landing-brand strong {
  font-size: 16px;
}

.landing-nav,
.landing-header-actions,
.landing-hero-actions,
.landing-footer nav {
  display: flex;
  align-items: center;
}

.landing-nav {
  justify-content: center;
  gap: 28px;
}

.landing-nav button,
.landing-nav a {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #b9c0b9;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.landing-nav button:hover,
.landing-nav button:focus-visible,
.landing-nav a:hover,
.landing-nav a:focus-visible {
  color: #ffffff;
}

.landing-header-actions {
  justify-content: flex-end;
  gap: 8px;
}

.landing-header-actions .el-button.is-text {
  color: #d8ddd8;
}

.landing-login-button.el-button {
  min-width: 88px;
  border-color: #ffffff;
  background: #ffffff;
  color: #141714;
}

.landing-login-button.el-button:hover,
.landing-login-button.el-button:focus-visible {
  border-color: #e4e7e2;
  background: #e4e7e2;
  color: #141714;
}

.landing-hero {
  position: relative;
  min-height: clamp(540px, 72svh, 660px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--landing-dark);
  color: #ffffff;
}

.landing-kline-background,
.landing-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.landing-kline-background {
  display: block;
  opacity: 0.9;
}

.landing-kline-base {
  fill: #111612;
}

.landing-kline-grid {
  stroke: rgba(221, 230, 222, 0.12);
  stroke-width: 1;
}

.landing-kline-axis,
.landing-kline-title {
  fill: rgba(232, 237, 232, 0.46);
  font-size: 11px;
}

.landing-kline-title {
  font-size: 12px;
  font-weight: 650;
}

.landing-kline-wick {
  stroke-width: 1.5;
}

.landing-kline-wick.is-up {
  stroke: #f05c5c;
}

.landing-kline-wick.is-down {
  stroke: #48b86f;
}

.landing-kline-body.is-up {
  fill: #e94f4f;
}

.landing-kline-body.is-down {
  fill: #3aaa63;
}

.landing-kline-ma {
  fill: none;
  stroke: #e4b864;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0.82;
}

.landing-hero-shade {
  background: rgba(10, 13, 10, 0.54);
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  padding: 72px 0 62px;
}

.landing-eyebrow,
.landing-hero-risk {
  display: flex;
  align-items: center;
}

.landing-eyebrow {
  width: fit-content;
  gap: 8px;
  margin: 0 0 24px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  color: #d2d8d2;
  font-size: 13px;
  font-weight: 600;
}

.landing-eyebrow .el-icon {
  color: #72c38d;
}

.landing-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: 64px;
  font-weight: 760;
  line-height: 1.04;
}

.landing-hero-lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: #d4d9d4;
  font-size: 19px;
  line-height: 1.8;
}

.landing-hero-actions {
  gap: 12px;
  margin-top: 32px;
}

.landing-hero-actions .el-button {
  min-width: 150px;
  min-height: 46px;
  margin: 0;
  border-radius: 6px;
  font-weight: 650;
}

.landing-primary-action.el-button {
  border-color: #ffffff;
  background: #ffffff;
  color: #111411;
}

.landing-primary-action.el-button:hover,
.landing-primary-action.el-button:focus-visible {
  border-color: #e2e6e1;
  background: #e2e6e1;
  color: #111411;
}

.landing-secondary-action.el-button {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(17, 20, 17, 0.56);
  color: #ffffff;
}

.landing-secondary-action.el-button:hover,
.landing-secondary-action.el-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(17, 20, 17, 0.76);
  color: #ffffff;
}

.landing-market-strip {
  width: min(720px, 100%);
  margin-top: 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.landing-market-heading {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #c9d0c9;
  font-size: 11px;
}

.landing-market-heading strong {
  color: #eef1ee;
  font-size: 12px;
}

.landing-market-heading span {
  color: #9fa79f;
}

.landing-market-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.landing-market-item {
  min-width: 0;
  padding: 12px 14px 13px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-market-item:first-child {
  padding-left: 0;
}

.landing-market-item:last-child {
  border-right: 0;
}

.landing-market-name {
  display: block;
  margin-bottom: 5px;
  color: #aeb5ae;
  font-size: 11px;
  white-space: nowrap;
}

.landing-market-value {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px;
}

.landing-market-value strong {
  min-width: 0;
  overflow: hidden;
  color: #f5f7f5;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-market-value em {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-size: 11px;
  font-style: normal;
}

.landing-market-value .el-icon {
  margin-right: 1px;
  font-size: 11px;
}

.landing-market-item.is-up .landing-market-value em {
  color: #f06a6a;
}

.landing-market-item.is-down .landing-market-value em {
  color: #60bd7c;
}

.landing-market-item.is-flat .landing-market-value em {
  color: #aeb5ae;
}

.landing-market-empty {
  padding: 16px 0;
  color: #9fa79f;
  font-size: 12px;
}

.landing-hero-risk {
  gap: 7px;
  margin: 18px 0 0;
  color: #aeb5ae;
  font-size: 12px;
}

.landing-hero-risk .el-icon {
  color: #e4b864;
}

.landing-section {
  padding: 92px 0;
  scroll-margin-top: 68px;
}

.landing-workflow-section,
.landing-capabilities-section {
  background: var(--landing-paper);
}

.landing-section-heading {
  max-width: 680px;
  margin-bottom: 44px;
}

.landing-section-heading p,
.landing-section-kicker {
  margin: 0 0 10px;
  color: var(--landing-green);
  font-size: 12px;
  font-weight: 750;
}

.landing-section-heading h2,
.landing-product-copy h2,
.landing-boundary h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.28;
}

.landing-section-heading span {
  display: block;
  margin-top: 14px;
  color: var(--landing-muted);
  font-size: 16px;
  line-height: 1.7;
}

.landing-workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--landing-line);
  border-bottom: 1px solid var(--landing-line);
}

.landing-workflow-step {
  position: relative;
  min-width: 0;
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 26px 24px;
  border-right: 1px solid var(--landing-line);
}

.landing-workflow-step:last-child {
  border-right: 0;
}

.landing-workflow-index,
.landing-capability-number {
  color: #989f98;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.landing-workflow-step > .el-icon {
  width: 34px;
  height: 34px;
  margin: 8px 0 2px;
  color: var(--landing-green);
  font-size: 24px;
}

.landing-workflow-step strong {
  font-size: 15px;
}

.landing-workflow-step > span {
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.55;
}

.landing-workflow-step .landing-workflow-arrow {
  position: absolute;
  top: 88px;
  right: -10px;
  z-index: 1;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1px solid var(--landing-line);
  border-radius: 50%;
  background: var(--landing-paper);
  color: #7c837c;
  font-size: 12px;
}

.landing-product-section {
  overflow: hidden;
  background: #ffffff;
}

.landing-product-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.55fr);
  gap: 64px;
  align-items: center;
}

.landing-product-copy > p:not(.landing-section-kicker) {
  margin: 22px 0 0;
  color: var(--landing-muted);
  font-size: 15px;
  line-height: 1.8;
}

.landing-product-copy ul {
  display: grid;
  gap: 13px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.landing-product-copy li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: #383d38;
  font-size: 14px;
  line-height: 1.55;
}

.landing-product-copy li .el-icon {
  margin-top: 2px;
  color: var(--landing-green);
}

.landing-product-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid #d9ddd7;
  border-radius: 8px;
  background: #eef0ed;
  box-shadow: 0 26px 70px rgba(30, 37, 31, 0.14);
}

.landing-product-shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.landing-product-shot figcaption {
  padding: 10px 14px;
  border-top: 1px solid #d9ddd7;
  color: #777e77;
  font-size: 11px;
}

.landing-capabilities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--landing-line);
}

.landing-capability {
  min-width: 0;
  padding: 26px 28px 8px 0;
  border-right: 1px solid var(--landing-line);
}

.landing-capability + .landing-capability {
  padding-left: 28px;
}

.landing-capability:last-child {
  border-right: 0;
  padding-right: 0;
}

.landing-capability > .el-icon {
  width: 38px;
  height: 38px;
  margin: 22px 0 18px;
  color: var(--landing-green);
  font-size: 28px;
}

.landing-capability h3 {
  margin: 0;
  font-size: 17px;
}

.landing-capability p {
  margin: 12px 0 0;
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.75;
}

.landing-boundary-section {
  padding: 72px 0;
  background: #222622;
  color: #ffffff;
}

.landing-boundary {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.9fr) auto;
  gap: 44px;
  align-items: end;
}

.landing-boundary .landing-section-kicker {
  color: #e3b45e;
}

.landing-boundary h2 {
  max-width: 560px;
  font-size: 30px;
}

.landing-boundary > p {
  margin: 0;
  color: #bcc2bc;
  font-size: 13px;
  line-height: 1.8;
}

.landing-boundary > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 0;
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.landing-boundary > a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.landing-footer {
  padding: 28px 0;
  border-top: 1px solid #2f342f;
  background: #171a17;
  color: #abb1ab;
}

.landing-footer-inner {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto auto;
  gap: 34px;
  align-items: center;
  font-size: 12px;
}

.landing-footer-brand strong {
  color: #ffffff;
}

.landing-footer-brand span {
  padding-left: 10px;
  border-left: 1px solid #3d433d;
}

.landing-footer nav {
  gap: 20px;
}

.landing-footer a {
  color: #abb1ab;
  text-decoration: none;
}

.landing-footer a:hover {
  color: #ffffff;
}

.landing-auth-dialog.el-dialog {
  max-height: min(90dvh, 760px);
  overflow: hidden;
  border-radius: 8px;
}

.landing-auth-dialog .el-dialog__header {
  min-height: 42px;
  margin: 0;
  padding: 0;
}

.landing-auth-dialog .el-dialog__headerbtn {
  top: 8px;
  right: 8px;
}

.landing-auth-dialog .el-dialog__body {
  max-height: calc(90dvh - 42px);
  padding: 0 28px 28px;
  overflow-y: auto;
}

.landing-auth-dialog .auth-card {
  width: 100%;
  gap: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 980px) {
  .landing-header-inner {
    grid-template-columns: 1fr auto;
  }

  .landing-nav {
    display: none;
  }

  .landing-product-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .landing-product-copy {
    max-width: 650px;
  }

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

  .landing-workflow-step:nth-child(3) {
    border-right: 0;
  }

  .landing-workflow-step:nth-child(n + 4) {
    border-top: 1px solid var(--landing-line);
  }

  .landing-workflow-step:nth-child(3) .landing-workflow-arrow {
    display: none;
  }

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

  .landing-capability:nth-child(2) {
    border-right: 0;
  }

  .landing-capability:nth-child(n + 3) {
    margin-top: 30px;
    border-top: 1px solid var(--landing-line);
  }

  .landing-capability:nth-child(3) {
    padding-left: 0;
  }

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

  .landing-boundary > a {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .landing-container,
  .landing-header-inner {
    width: min(100% - 32px, 1180px);
  }

  .landing-header {
    height: 64px;
  }

  .landing-brand img {
    width: 28px;
    height: 28px;
  }

  .landing-header-actions .el-button.is-text {
    display: none;
  }

  .landing-login-button.el-button {
    min-width: 82px;
    min-height: 40px;
  }

  .landing-hero {
    min-height: 660px;
  }

  .landing-kline-background {
    opacity: 0.82;
  }

  .landing-hero-shade {
    background: rgba(10, 13, 10, 0.64);
  }

  .landing-hero-content {
    padding: 56px 0 46px;
  }

  .landing-eyebrow {
    margin-bottom: 20px;
  }

  .landing-hero h1 {
    font-size: 44px;
    line-height: 1.08;
  }

  .landing-hero-lead {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.75;
  }

  .landing-hero-actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 26px;
  }

  .landing-hero-actions .el-button {
    width: 100%;
  }

  .landing-market-strip {
    margin-top: 28px;
  }

  .landing-market-heading {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
  }

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

  .landing-market-item,
  .landing-market-item:first-child {
    padding: 11px 12px;
  }

  .landing-market-item:nth-child(odd) {
    padding-left: 0;
  }

  .landing-market-item:nth-child(even) {
    border-right: 0;
  }

  .landing-market-item:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .landing-section {
    padding: 68px 0;
    scroll-margin-top: 64px;
  }

  .landing-section-heading {
    margin-bottom: 30px;
  }

  .landing-section-heading h2,
  .landing-product-copy h2,
  .landing-boundary h2 {
    font-size: 28px;
  }

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

  .landing-workflow-step,
  .landing-workflow-step:nth-child(3) {
    min-height: 138px;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 3px 12px;
    padding: 20px 0;
    border-top: 1px solid var(--landing-line);
    border-right: 0;
  }

  .landing-workflow-step:first-child {
    border-top: 0;
  }

  .landing-workflow-index {
    grid-column: 1;
    grid-row: 1;
  }

  .landing-workflow-step > .el-icon {
    grid-column: 1;
    grid-row: 2 / span 2;
    margin: 4px 0 0;
  }

  .landing-workflow-step strong,
  .landing-workflow-step > span {
    grid-column: 2;
  }

  .landing-workflow-step .landing-workflow-arrow {
    display: none;
  }

  .landing-product-layout {
    gap: 34px;
  }

  .landing-product-shot {
    width: calc(100% + 16px);
    margin-right: -8px;
    margin-left: -8px;
  }

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

  .landing-capability,
  .landing-capability + .landing-capability,
  .landing-capability:nth-child(3) {
    margin: 0;
    padding: 24px 0;
    border-top: 1px solid var(--landing-line);
    border-right: 0;
  }

  .landing-capability:first-child {
    border-top: 0;
  }

  .landing-capability > .el-icon {
    margin: 16px 0 12px;
  }

  .landing-boundary-section {
    padding: 58px 0;
  }

  .landing-boundary {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }

  .landing-boundary > a {
    grid-column: auto;
  }

  .landing-footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .landing-footer-brand {
    flex-wrap: wrap;
  }

  .landing-footer-brand span {
    flex-basis: 100%;
    padding: 0;
    border: 0;
  }

  .landing-footer nav {
    flex-wrap: wrap;
  }

  .landing-auth-dialog.el-dialog {
    max-height: 92dvh;
  }

  .landing-auth-dialog .el-dialog__body {
    max-height: calc(92dvh - 42px);
    padding: 0 20px calc(22px + env(safe-area-inset-bottom));
  }
}

.user-model-config-card {
  max-width: 980px;
  margin: 0 auto;
}

.user-model-config-card .el-alert {
  margin-bottom: 22px;
}

.user-model-config-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}

.user-model-config-form {
  min-width: 0;
}

.user-model-config-form .el-select {
  width: 100%;
}

.user-model-side-stack {
  display: grid;
  gap: 14px;
}

.user-model-security-note {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--el-border-color-lighter);
  border-radius: 14px;
  background: var(--el-fill-color-extra-light);
  color: var(--el-text-color-regular);
}

.user-model-security-note > .el-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--el-color-primary);
  background: var(--el-color-primary-light-9);
}

.user-model-security-note p,
.user-model-onboarding-copy,
.user-model-key-note {
  margin: 0;
  color: var(--el-text-color-secondary);
  line-height: 1.65;
}

.user-model-config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

.user-model-onboarding-copy {
  margin-bottom: 20px;
}

.user-model-key-note {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--el-fill-color-light);
}

.api-key-help-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}

.api-key-help-card.is-compact {
  margin: 18px 0 14px;
  padding: 14px 16px;
}

.api-key-help-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.api-key-help-heading > .el-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #1d4ed8;
  background: #dbeafe;
}

.api-key-help-heading > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.api-key-help-heading span,
.api-key-help-copy,
.api-key-help-disclosure {
  color: var(--studio-muted);
}

.api-key-help-heading span {
  font-size: 12px;
}

.api-key-help-copy,
.api-key-help-disclosure {
  margin: 0;
  line-height: 1.6;
}

.api-key-help-copy {
  font-size: 13px;
}

.api-key-help-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.api-key-help-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.api-key-help-disclosure {
  padding-top: 10px;
  border-top: 1px solid #dbeafe;
  font-size: 12px;
}

@media (max-width: 760px) {
  .user-model-config-body {
    grid-template-columns: 1fr;
  }

  .user-model-config-actions {
    flex-direction: column-reverse;
  }

  .user-model-config-actions .el-button {
    width: 100%;
    margin-left: 0;
  }

}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--studio-bg);
  color: var(--studio-ink);
}

[v-cloak] {
  display: none;
}

.studio-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr) 304px;
  transition: grid-template-columns var(--studio-sidebar-motion);
  will-change: grid-template-columns;
}

.studio-shell.sidebar-collapsed {
  grid-template-columns: 56px minmax(0, 1fr) 304px;
}

.studio-shell.assistant-collapsed {
  grid-template-columns: 208px minmax(0, 1fr) 48px;
}

.studio-shell.sidebar-collapsed.assistant-collapsed {
  grid-template-columns: 56px minmax(0, 1fr) 48px;
}

.studio-shell.assistant-hidden {
  grid-template-columns: 208px minmax(0, 1fr);
}

.studio-shell.sidebar-collapsed.assistant-hidden {
  grid-template-columns: 56px minmax(0, 1fr);
}

.studio-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 8px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--studio-line);
  background: var(--studio-sidebar);
  color: var(--studio-ink);
  overflow: hidden;
  transition:
    padding var(--studio-sidebar-motion),
    width var(--studio-sidebar-motion);
}

.studio-sidebar.collapsed {
  padding: 8px 6px;
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 6px 12px;
  padding-right: 42px;
  transition: gap var(--studio-sidebar-motion), padding var(--studio-sidebar-motion);
}

.studio-sidebar.collapsed .brand-block {
  justify-content: flex-start;
  gap: 0;
  padding: 6px 0 10px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  overflow: hidden;
  opacity: 1;
  transform: scale(1);
  transform-origin: left center;
  transition:
    width var(--studio-sidebar-motion),
    opacity var(--studio-sidebar-motion),
    transform var(--studio-sidebar-motion);
}

.studio-sidebar.collapsed .brand-mark {
  width: 0;
  opacity: 0;
  transform: scale(0.82);
  pointer-events: none;
}

.brand-mark img {
  width: 30px;
  height: 30px;
  display: block;
}

.brand-copy {
  min-width: 0;
  flex: 1;
  max-width: 130px;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  white-space: nowrap;
  transition:
    max-width var(--studio-sidebar-motion),
    opacity var(--studio-sidebar-motion),
    transform var(--studio-sidebar-motion);
}

.studio-sidebar.collapsed .brand-copy {
  max-width: 0;
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
}

.sidebar-toggle {
  position: absolute;
  top: 14px;
  right: 12px;
  z-index: 2;
  flex: 0 0 auto;
  transition:
    transform 0.18s ease,
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.sidebar-toggle .el-icon {
  transform: rotate(0deg);
  transition: transform var(--studio-sidebar-motion);
}

.studio-sidebar.collapsed .sidebar-toggle .el-icon {
  transform: rotate(180deg);
}

.studio-sidebar.collapsed .sidebar-toggle {
  top: 14px;
  right: 12px;
  left: auto;
}

.brand-block h1,
.brand-block p,
.page-title h2,
.page-title p,
.card-header h3 {
  margin: 0;
}

.brand-block h1 {
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0;
}

.brand-block p {
  margin-top: 2px;
  color: var(--studio-muted);
  font-size: 11px;
}

.studio-menu {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  border-right: 0;
  background: transparent;
  width: 100% !important;
  transition: margin-top var(--studio-sidebar-motion);
}

.studio-sidebar.collapsed .studio-menu {
  margin-top: 0;
}

.studio-menu .el-menu-item {
  height: 34px;
  margin: 2px 0;
  border-radius: 8px;
  color: #525252;
  font-size: 13px;
  font-weight: 550;
  justify-content: flex-start;
  padding: 0 12px !important;
  overflow: hidden;
  transition:
    padding var(--studio-sidebar-motion),
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.studio-menu .el-menu-item-group__title {
  height: auto;
  padding: 14px 8px 5px;
  color: #a3a3a3;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  max-height: 36px;
  overflow: hidden;
  opacity: 1;
  transition:
    max-height var(--studio-sidebar-motion),
    padding var(--studio-sidebar-motion),
    opacity var(--studio-sidebar-motion);
}

.studio-sidebar.collapsed .studio-menu .el-menu-item-group__title {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.studio-sidebar.collapsed .studio-menu .el-menu-item {
  justify-content: flex-start;
  padding: 0 11px !important;
}

.studio-menu .el-menu-item .el-icon {
  flex: 0 0 auto;
  margin-right: 7px;
  transition: margin-right var(--studio-sidebar-motion);
}

.studio-menu .el-menu-item > span {
  min-width: 0;
  max-width: 140px;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    max-width var(--studio-sidebar-motion),
    margin var(--studio-sidebar-motion),
    opacity var(--studio-sidebar-motion),
    transform var(--studio-sidebar-motion),
    visibility 0s linear 0s;
}

.studio-sidebar.collapsed .studio-menu .el-menu-item .el-icon {
  margin-right: 0;
}

.studio-sidebar.collapsed .studio-menu .el-menu-item > span {
  max-width: 0;
  margin: 0;
  opacity: 0;
  transform: translateX(-6px);
  visibility: hidden;
  transition-delay: 0s, 0s, 0s, 0s, 0.24s;
}

.studio-menu .el-menu-item:hover {
  background: #ededed;
  color: #171717;
}

.studio-menu .el-menu-item.is-active {
  background: #e7e7e7;
  color: #171717;
  font-weight: 650;
}

.studio-menu .el-menu-item > .sidebar-menu-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.sidebar-news-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.sidebar-mode-toggle {
  margin-top: auto;
  padding: 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--studio-line-soft);
  color: var(--studio-muted);
  opacity: 1;
  transition: opacity var(--studio-sidebar-motion), visibility 0s linear 0s;
}

.sidebar-mode-toggle strong,
.sidebar-mode-toggle span {
  display: block;
  line-height: 1.25;
}

.sidebar-mode-toggle strong {
  color: var(--studio-ink);
  font-size: 13px;
}

.sidebar-mode-toggle span {
  margin-top: 3px;
  font-size: 12px;
}

.studio-sidebar.collapsed .sidebar-mode-toggle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition-delay: 0s, 0.24s;
}

.sidebar-status {
  padding: 12px 8px 0;
  display: grid;
  gap: 8px;
  color: var(--studio-muted);
  font-size: 13px;
  opacity: 1;
  transition: opacity var(--studio-sidebar-motion), visibility 0s linear 0s;
}

.sidebar-status .el-tag {
  width: fit-content;
}

.studio-sidebar.collapsed .sidebar-status {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition-delay: 0s, 0.24s;
}

@media (prefers-reduced-motion: reduce) {
  .studio-shell,
  .studio-sidebar,
  .brand-block,
  .brand-mark,
  .brand-copy,
  .studio-menu,
  .studio-menu .el-menu-item,
  .studio-menu .el-menu-item > span,
  .studio-menu .el-menu-item-group__title {
    transition: none !important;
  }

  .analysis-queue-icon .el-icon,
  .analysis-queue-icon > svg,
  .analysis-queue-track > span {
    animation: none !important;
  }

  .analysis-queue-track > span {
    width: 100%;
    opacity: 0.55;
  }
}

.studio-main {
  min-width: 0;
  min-height: 100vh;
  padding: 0 16px 16px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.mobile-app-brand,
.mobile-bottom-nav,
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

.assistant-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  min-width: 0;
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  border-left: 1px solid var(--studio-line);
  background: #ffffff;
}

.assistant-panel.collapsed {
  padding: 10px 4px;
  grid-template-rows: auto auto;
  align-content: start;
  justify-items: center;
}

.assistant-header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.assistant-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assistant-toggle {
  flex: 0 0 auto;
}

.assistant-rail {
  width: 38px;
  min-height: 96px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 12px 0;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
  color: var(--studio-muted);
  cursor: pointer;
}

.assistant-rail:hover {
  border-color: #d4d4d4;
  background: var(--studio-panel-soft);
  color: var(--studio-ink);
}

.assistant-rail span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.assistant-header h3 {
  margin: 3px 0 0;
  color: var(--studio-ink);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.assistant-messages {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 3px;
}

.assistant-message {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.assistant-message > span {
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 800;
}

.assistant-message > div {
  padding: 10px 11px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
  color: #404040;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.assistant-message.user > div {
  border-color: #d4d4d4;
  background: #f1f1f1;
  color: #171717;
}

.assistant-message p {
  margin: 0 0 8px;
}

.assistant-message p:last-child,
.assistant-message ul:last-child {
  margin-bottom: 0;
}

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

.assistant-input .el-button {
  width: 100%;
}

.page-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px 0 10px;
  border: 0;
  border-bottom: 1px solid var(--studio-line-soft);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.investment-risk-banner {
  min-width: 0;
  min-height: 36px;
  margin-top: 8px;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #f2d38a;
  border-radius: 6px;
  background: #fffbeb;
  color: #713f12;
  font-size: 12px;
  line-height: 1.5;
}

.investment-risk-banner > .el-icon {
  color: #b45309;
  font-size: 16px;
}

.investment-risk-banner a,
.investment-risk-link {
  color: #92400e;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.investment-risk-content {
  display: grid;
  gap: 14px;
  color: var(--studio-ink);
  font-size: 14px;
  line-height: 1.7;
}

.investment-risk-content p {
  margin: 0;
}

.investment-risk-lead {
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 3px solid #d97706;
  background: #fff7ed;
  color: #7c2d12;
}

.investment-risk-lead > .el-icon {
  flex: 0 0 auto;
  margin-top: 3px;
  color: #d97706;
  font-size: 18px;
}

.investment-risk-link {
  width: fit-content;
}

.investment-risk-footer {
  justify-content: space-between;
}

.page-title {
  min-width: 0;
}

.page-eyebrow,
.section-kicker {
  color: var(--studio-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title h2 {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.page-title p {
  margin-top: 3px;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.run-pill {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
  color: var(--studio-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.run-pill:hover {
  border-color: #d4d4d4;
  background: #ffffff;
}

.run-pill > span:last-child {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-body {
  min-width: 0;
}

.workspace-grid {
  display: grid;
  gap: 12px;
}

.launch-grid {
  grid-template-columns: minmax(500px, 0.8fr) minmax(620px, 1.2fr);
}

.logs-grid {
  grid-template-columns: minmax(460px, 1fr) minmax(440px, 1fr);
}

.backtest-grid {
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
}

.market-backtest-grid {
  grid-template-columns: minmax(340px, 0.68fr) minmax(0, 1.32fr);
}

.backtest-center-page {
  display: grid;
  gap: 12px;
}

.backtest-center-switch {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--studio-line);
  border-radius: 10px;
  background: #fff;
}

.backtest-center-switch h2 {
  margin: 2px 0 5px;
  color: var(--studio-ink);
  font-size: 22px;
}

.backtest-center-switch p {
  margin: 0;
  color: var(--studio-muted);
  line-height: 1.5;
}

.daxin-grid {
  grid-template-columns: minmax(360px, 0.78fr) minmax(0, 1.22fr);
  align-items: start;
}

.viewpoint-grid {
  grid-template-columns: minmax(360px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
}

.backtest-history-card,
.market-backtest-history-card,
.daxin-history-card {
  grid-column: 1 / -1;
}

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

.data-source-workspace {
  align-content: start;
}

.data-source-usage-panel {
  min-width: 0;
  display: grid;
  gap: 18px;
  padding: 8px 0 24px;
}

.data-source-usage-toolbar,
.data-source-usage-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.data-source-usage-toolbar h2,
.data-source-usage-section-head h3 {
  margin: 3px 0 0;
  color: var(--studio-ink);
  letter-spacing: 0;
}

.data-source-usage-toolbar h2 {
  font-size: 20px;
}

.data-source-usage-toolbar p,
.data-source-usage-section-head p {
  margin: 5px 0 0;
  color: var(--studio-muted);
}

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

.data-source-usage-filter {
  min-width: 120px;
}

.data-source-usage-method-filter {
  min-width: 168px;
}

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

.data-source-usage-metric {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 7px;
  background: var(--studio-panel-soft);
}

.data-source-usage-metric span,
.data-source-usage-metric strong {
  display: block;
}

.data-source-usage-metric span {
  color: var(--studio-muted);
  font-size: 12px;
}

.data-source-usage-metric strong {
  margin-top: 5px;
  color: var(--studio-ink);
  font-size: 20px;
  line-height: 1.15;
}

.data-source-usage-metric.positive strong {
  color: #15803d;
}

.data-source-usage-metric.negative strong {
  color: #dc2626;
}

.data-source-usage-chart {
  min-width: 0;
}

.data-source-usage-section {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--studio-line-soft);
}

.data-source-usage-section-head > span {
  color: var(--studio-muted);
  font-size: 12px;
}

.data-source-method-cell {
  display: grid;
  gap: 2px;
}

.data-source-method-cell strong {
  color: var(--studio-ink);
}

.data-source-method-cell span {
  color: var(--studio-muted);
  font-size: 11px;
}

.data-source-agent-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.data-source-agent-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--studio-line-soft);
}

.data-source-agent-row strong {
  overflow-wrap: anywhere;
  color: var(--studio-ink);
}

.data-source-agent-row span {
  color: var(--studio-ink);
  font-weight: 700;
}

.data-source-agent-row small {
  grid-column: 1 / -1;
  color: var(--studio-muted);
}

.framework-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  align-items: start;
}

.dashboard-main-column,
.dashboard-side-column {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.dashboard-ai-live-card {
  width: 100%;
  min-width: 0;
  min-height: 210px;
  padding: 15px 16px 10px;
  display: grid;
  grid-template-rows: auto auto minmax(92px, 1fr);
  gap: 8px;
  overflow: hidden;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--studio-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--studio-shadow);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-ai-live-card:hover,
.dashboard-ai-live-card:focus-visible {
  border-color: #b8b8b8;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.dashboard-ai-live-head,
.dashboard-ai-live-head > span,
.dashboard-ai-live-equity {
  display: flex;
  align-items: center;
}

.dashboard-ai-live-head {
  justify-content: space-between;
  color: #525252;
}

.dashboard-ai-live-head > span {
  gap: 7px;
}

.dashboard-ai-live-head > span > .el-icon {
  color: #dc2626;
  font-size: 18px;
}

.dashboard-ai-live-head > svg {
  width: 16px;
  height: 16px;
}

.dashboard-ai-live-equity {
  justify-content: space-between;
  gap: 12px;
}

.dashboard-ai-live-equity small {
  color: var(--studio-muted);
  font-size: 12px;
}

.dashboard-ai-live-equity strong {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.ai-live-page {
  display: grid;
  gap: 14px;
}

.ai-live-loading {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--studio-muted);
}

.ai-live-account-band {
  min-width: 0;
  padding: 20px;
  display: grid;
  gap: 18px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--studio-shadow);
}

.ai-live-strategy-workspace {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--studio-line);
}

.ai-live-strategy-switch,
.ai-live-strategy-switch > div:first-child,
.ai-live-strategy-summary,
.ai-live-strategy-copy,
.ai-live-strategy-copy > div:first-child,
.ai-live-strategy-metrics {
  min-width: 0;
}

.ai-live-strategy-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ai-live-strategy-switch > div:first-child {
  display: grid;
  gap: 4px;
}

.ai-live-strategy-switch > div:first-child strong {
  font-size: 17px;
}

.ai-live-strategy-switch .el-segmented {
  max-width: 100%;
}

.ai-live-strategy-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.ai-live-strategy-copy {
  display: grid;
  gap: 12px;
}

.ai-live-strategy-copy > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--studio-text);
  font-size: 13px;
  line-height: 1.55;
}

.ai-live-strategy-copy dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ai-live-strategy-copy dl > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ai-live-strategy-copy dt,
.ai-live-strategy-copy p,
.ai-live-strategy-metrics span {
  color: var(--studio-muted);
  font-size: 12px;
}

.ai-live-strategy-copy dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--studio-text);
  font-size: 13px;
  line-height: 1.5;
}

.ai-live-strategy-copy p {
  margin: 0;
  line-height: 1.5;
}

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

.ai-live-strategy-metrics > div {
  min-width: 0;
  min-height: 68px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 5px;
  border-left: 2px solid #d4d4d4;
  background: #fafafa;
}

.ai-live-strategy-metrics strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.ai-live-strategy-metrics .positive {
  border-left-color: var(--market-up-red);
}

.ai-live-strategy-metrics .positive strong {
  color: var(--market-up-red);
}

.ai-live-strategy-metrics .negative {
  border-left-color: var(--market-down-green);
}

.ai-live-strategy-metrics .negative strong {
  color: var(--market-down-green);
}

.ai-live-account-head,
.ai-live-account-title,
.ai-live-panel-head,
.ai-live-order,
.ai-live-decision,
.ai-live-rules {
  display: flex;
  align-items: center;
}

.ai-live-account-head,
.ai-live-panel-head,
.ai-live-order,
.ai-live-decision {
  justify-content: space-between;
  gap: 16px;
}

.ai-live-account-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.ai-live-account-head small,
.ai-live-panel-head > span,
.ai-live-decision small,
.ai-live-order small,
.ai-live-metric span,
.ai-live-metric small {
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ai-live-account-title {
  flex-wrap: wrap;
  gap: 10px;
}

.ai-live-account-title > strong {
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  line-height: 1.12;
}

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

.ai-live-history-notice {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 12px;
  border-left: 3px solid #737373;
  background: #f5f5f5;
  color: var(--studio-text);
  font-size: 13px;
}

.ai-live-history-notice small {
  flex-basis: 100%;
  color: var(--studio-muted);
  line-height: 1.5;
}

.ai-live-metric {
  min-width: 0;
  min-height: 88px;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 5px;
  border-left: 2px solid #d4d4d4;
  background: #fafafa;
}

.ai-live-metric strong {
  overflow-wrap: anywhere;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.ai-live-metric.positive {
  border-left-color: var(--market-up-red);
}

.ai-live-metric.negative {
  border-left-color: var(--market-down-green);
}

.ai-live-metric.positive strong,
.ai-live-metric.positive small {
  color: var(--market-up-red);
}

.ai-live-metric.negative strong,
.ai-live-metric.negative small {
  color: var(--market-down-green);
}

.ai-live-main-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.ai-live-main-grid.has-trade-detail {
  grid-template-columns: minmax(0, 1.65fr) minmax(360px, 0.85fr);
  align-items: start;
}

.ai-live-panel {
  min-width: 0;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--studio-shadow);
}

.ai-live-panel-head > div:first-child {
  min-width: 0;
}

.ai-live-panel-head h3 {
  margin: 3px 0 0;
  font-size: 16px;
}

.ai-live-chart-panel {
  min-height: 390px;
}

.ai-live-trade-detail-panel {
  position: sticky;
  top: 14px;
  min-height: 390px;
}

.ai-live-trade-detail-head,
.ai-live-trade-detail-head > div,
.ai-live-trade-detail-head > div > span:last-child,
.ai-live-trade-data-status {
  min-width: 0;
  display: flex;
  align-items: center;
}

.ai-live-trade-detail-head,
.ai-live-trade-data-status {
  justify-content: space-between;
  gap: 12px;
}

.ai-live-trade-detail-head > div {
  gap: 10px;
}

.ai-live-trade-detail-head > div > span:last-child {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
}

.ai-live-trade-detail-head strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.ai-live-trade-detail-head small,
.ai-live-trade-summary span,
.ai-live-trade-data-status,
.ai-live-trade-reason-panel p {
  color: var(--studio-muted);
  font-size: 11px;
  line-height: 1.5;
}

.ai-live-trade-side {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.ai-live-trade-side.is-buy {
  background: #facc15;
  color: #171717;
}

.ai-live-trade-side.is-sell {
  background: #2563eb;
  color: #ffffff;
}

.ai-live-trade-switcher {
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.ai-live-trade-switcher button {
  min-width: 0;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--studio-line);
  border-radius: 6px;
  background: #ffffff;
  color: #525252;
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.ai-live-trade-switcher button.active {
  border-color: #171717;
  background: #171717;
  color: #ffffff;
}

.ai-live-trade-detail-loading,
.ai-live-trade-detail-error {
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--studio-muted);
  font-size: 12px;
}

.ai-live-trade-detail-error .el-alert {
  width: 100%;
}

.ai-live-trade-detail-body {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.ai-live-trade-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.ai-live-trade-summary > div {
  min-width: 0;
  padding: 8px;
  display: grid;
  gap: 3px;
  background: #f5f5f5;
}

.ai-live-trade-summary strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ai-live-trade-reason-panel {
  padding: 10px 11px;
  border-left: 3px solid #737373;
  background: #fafafa;
}

.ai-live-trade-reason-panel strong {
  font-size: 12px;
}

.ai-live-trade-reason-panel p {
  margin: 4px 0 0;
}

.ai-live-trade-kline,
.ai-live-trade-kline-empty {
  min-width: 0;
}

.ai-live-trade-kline-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--studio-muted);
  font-size: 12px;
}

.ai-live-trade-kline-svg {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 560 / 320;
}

.ai-live-trade-kline-grid {
  stroke: #ededed;
  stroke-width: 1;
}

.ai-live-trade-kline-axis {
  fill: #8a8a8a;
  font-size: 10px;
}

.ai-live-trade-candle-wick.is-up,
.ai-live-trade-candle-body.is-up {
  fill: var(--market-up-red);
  stroke: var(--market-up-red);
}

.ai-live-trade-candle-wick.is-down,
.ai-live-trade-candle-body.is-down {
  fill: var(--market-down-green);
  stroke: var(--market-down-green);
}

.ai-live-trade-candle-wick {
  stroke-width: 1.4;
}

.ai-live-trade-candle-body.is-operation {
  stroke: #171717;
  stroke-width: 2;
}

.ai-live-trade-candle-body.is-selected {
  stroke-width: 2.4;
}

.ai-live-trade-selected-line {
  stroke: #a3a3a3;
  stroke-width: 1;
  stroke-dasharray: 2 3;
  pointer-events: none;
}

.ai-live-trade-candle-hitbox {
  fill: transparent;
  cursor: pointer;
  outline: none;
}

.ai-live-trade-candle-hitbox:focus {
  fill: rgb(23 23 23 / 0.04);
}

.ai-live-trade-date-line {
  stroke: #737373;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.ai-live-trade-price-line {
  stroke-width: 1.2;
  stroke-dasharray: 5 4;
}

.ai-live-trade-price-line.is-buy {
  stroke: #ca8a04;
}

.ai-live-trade-price-line.is-sell {
  stroke: #2563eb;
}

.ai-live-trade-operation-badge {
  stroke: #ffffff;
  stroke-width: 1.5;
}

.ai-live-trade-operation-badge.is-buy {
  fill: #facc15;
}

.ai-live-trade-operation-badge.is-sell {
  fill: #2563eb;
}

.ai-live-trade-operation-label {
  fill: #171717;
  font-size: 10px;
  font-weight: 800;
  pointer-events: none;
}

.ai-live-trade-operation-badge.is-sell + .ai-live-trade-operation-label {
  fill: #ffffff;
}

.ai-live-trade-kline-caption {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  color: var(--studio-muted);
  font-size: 10px;
}

.ai-live-trade-kline-caption strong {
  color: var(--studio-ink);
  font-size: 11px;
  text-align: center;
}

.ai-live-trade-kline-caption span:last-child {
  text-align: right;
}

.ai-live-candle-detail {
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid #e5e5e5;
  background: #fafafa;
}

.ai-live-candle-detail-head {
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.ai-live-candle-operation {
  padding: 2px 7px;
  color: #171717;
  background: #facc15;
  font-size: 10px;
  font-weight: 700;
}

.ai-live-candle-operation.is-sell {
  color: #ffffff;
  background: #2563eb;
}

.ai-live-candle-metrics {
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.ai-live-candle-metrics > div {
  min-width: 0;
}

.ai-live-candle-metrics dt {
  color: var(--studio-muted);
  font-size: 10px;
}

.ai-live-candle-metrics dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.ai-live-candle-order-detail {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--studio-muted);
  font-size: 10px;
}

.ai-live-candle-order-detail p {
  flex-basis: 100%;
  margin: 0;
  color: var(--studio-ink);
  line-height: 1.5;
}

.ai-live-empty-state {
  min-height: 280px;
  padding: 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.ai-live-empty-state p {
  max-width: 340px;
  margin: 0;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.6;
}

.ai-live-empty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  background: #f5f5f5;
  color: #404040;
  font-size: 20px;
}

.ai-live-decision-list,
.ai-live-order-list {
  display: grid;
  gap: 8px;
}

.ai-live-decision,
.ai-live-order {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--studio-line-soft);
  background: #fafafa;
}

.ai-live-decision > span:first-child,
.ai-live-order > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ai-live-decision small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-live-order > span:last-child {
  flex: 0 0 auto;
  text-align: right;
}

.ai-live-table {
  width: 100%;
}

.ai-live-rules {
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 12px 16px;
  border-top: 1px solid var(--studio-line);
  border-bottom: 1px solid var(--studio-line);
  color: #525252;
  font-size: 12px;
}

.ai-live-rules strong {
  color: var(--studio-ink);
}

.equity-kline {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.equity-kline.is-empty {
  min-height: 110px;
  place-items: center;
  color: var(--studio-muted);
  font-size: 12px;
}

.equity-kline-svg {
  width: 100%;
  height: auto;
  aspect-ratio: 1080 / 400;
  overflow: visible;
}

.equity-kline-scroll {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.equity-kline-scroll .equity-kline-svg {
  min-width: 840px;
  display: block;
}

.equity-kline.is-compact {
  align-self: end;
}

.equity-kline.is-compact .equity-kline-svg {
  height: 100px;
  aspect-ratio: auto;
}

.equity-kline-grid {
  stroke: #ededed;
  stroke-width: 1;
}

.equity-kline-axis {
  fill: #8a8a8a;
  font-size: 10px;
}

.equity-kline-wick.is-up,
.equity-kline-body.is-up {
  fill: var(--market-up-red);
  stroke: var(--market-up-red);
}

.equity-kline-wick.is-down,
.equity-kline-body.is-down {
  fill: var(--market-down-green);
  stroke: var(--market-down-green);
}

.equity-kline-wick.is-flat,
.equity-kline-body.is-flat {
  fill: #a3a3a3;
  stroke: #a3a3a3;
}

.equity-kline-wick.is-flat-empty,
.equity-kline-body.is-flat-empty {
  fill: #b8b8b8;
  stroke: #b8b8b8;
}

.equity-kline-wick.is-flat-buy,
.equity-kline-body.is-flat-buy {
  fill: #d9a900;
  stroke: #d9a900;
}

.equity-kline-wick.is-flat-sell,
.equity-kline-body.is-flat-sell {
  fill: #2563eb;
  stroke: #2563eb;
}

.equity-kline-wick.is-flat-trade,
.equity-kline-body.is-flat-trade {
  fill: #525252;
  stroke: #525252;
}

.equity-kline-flat-label {
  fill: #737373;
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
}

.equity-kline-wick {
  stroke-width: 1.5;
}

.equity-kline-body {
  shape-rendering: crispEdges;
}

.equity-kline-legend {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  min-height: 20px;
  color: var(--studio-muted);
  font-size: 11px;
}

.equity-kline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.equity-kline-legend i {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
}

.equity-kline-legend i.is-buy {
  background: #facc15;
  color: #171717;
}

.equity-kline-legend i.is-sell {
  background: #2563eb;
  color: #ffffff;
}

.equity-kline-legend i.is-flat {
  width: 18px;
  height: 3px;
  border-radius: 0;
  background: #a3a3a3;
}

.equity-kline-trade-marker {
  cursor: pointer;
}

.equity-kline-trade-marker:focus {
  outline: none;
}

.equity-kline-trade-marker > circle {
  stroke: #ffffff;
  stroke-width: 1.5;
}

.equity-kline-trade-marker > text {
  font-size: 10px;
  font-weight: 800;
  pointer-events: none;
}

.equity-kline-trade-marker.is-buy > circle {
  fill: #facc15;
}

.equity-kline-trade-marker.is-buy > text {
  fill: #171717;
}

.equity-kline-trade-marker.is-sell > circle {
  fill: #2563eb;
}

.equity-kline-trade-marker.is-sell > text {
  fill: #ffffff;
}

.equity-kline-trade-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.equity-kline-trade-tooltip rect {
  fill: rgba(23, 23, 23, 0.96);
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
}

.equity-kline-trade-tooltip text {
  fill: #f5f5f5;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.equity-kline-trade-tooltip text.equity-kline-trade-title {
  fill: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.equity-kline-trade-tooltip text.equity-kline-trade-primary {
  font-weight: 700;
}

.equity-kline-trade-tooltip text.equity-kline-trade-reason {
  fill: #d4d4d4;
}

.equity-kline-trade-tooltip.is-visible {
  opacity: 1;
}

.equity-kline-hitbox {
  fill: transparent;
  cursor: crosshair;
}

.equity-kline-crosshair {
  opacity: 0;
  stroke: #737373;
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}

.equity-kline-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.equity-kline-tooltip.is-visible {
  opacity: 1;
}

.equity-kline-tooltip rect {
  fill: rgba(23, 23, 23, 0.94);
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
}

.equity-kline-tooltip text {
  fill: #e5e5e5;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.equity-kline-tooltip text.equity-kline-tooltip-date {
  fill: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.equity-kline-tooltip text.is-up {
  fill: #f87171;
}

.equity-kline-tooltip text.is-down {
  fill: #4ade80;
}

.equity-kline-interaction:hover .equity-kline-crosshair,
.equity-kline-interaction:hover .equity-kline-tooltip,
.equity-kline-interaction:focus-visible .equity-kline-crosshair,
.equity-kline-interaction:focus-visible .equity-kline-tooltip {
  opacity: 1;
}

.equity-kline-interaction:focus {
  outline: none;
}

.equity-kline-range {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--studio-muted);
  font-size: 11px;
}

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

.research-hub-grid,
.admin-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

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

.workspace-hub-page,
.admin-dashboard-page {
  display: grid;
  gap: 12px;
}

.workspace-tabs {
  width: fit-content;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: var(--studio-panel-soft);
}

.workspace-tab {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--studio-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.workspace-tab.active {
  background: #ffffff;
  color: var(--studio-ink);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

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

.embedded-page {
  min-width: 0;
}

.dashboard-action,
.dashboard-recent-item,
.dashboard-system-item {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--studio-line-soft);
  border-radius: 12px;
  background: #ffffff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.dashboard-action:hover,
.dashboard-recent-item:hover,
.dashboard-system-item:hover {
  border-color: #d4d4d4;
  background: #fafafa;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.dashboard-action {
  min-height: 118px;
  padding: 13px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
}

.dashboard-action-icon,
.dashboard-system-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #f7f7f8;
  color: #404040;
}

.dashboard-action-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.dashboard-action-copy strong,
.dashboard-recent-item strong,
.dashboard-holding-item strong,
.dashboard-system-item strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.25;
}

.dashboard-action-copy span,
.dashboard-action-meta,
.dashboard-recent-item small,
.dashboard-holding-item small,
.dashboard-system-item small,
.dashboard-metric span {
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-action-meta {
  display: block;
  overflow-wrap: anywhere;
}

.dashboard-status,
.dashboard-recent,
.dashboard-portfolio,
.dashboard-system-list {
  display: grid;
  gap: 12px;
}

.dashboard-task-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px;
  border: 1px dashed var(--studio-line);
  border-radius: 12px;
  background: var(--studio-panel-soft);
  text-align: center;
}

.dashboard-task-empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eeeeee;
  color: var(--studio-accent);
  font-size: 22px;
}

.dashboard-task-empty strong {
  font-size: 16px;
}

.dashboard-task-empty p {
  max-width: 320px;
  margin: 6px 0 0;
  color: var(--studio-muted);
  font-size: 13px;
  line-height: 1.55;
}

.dashboard-status-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-status-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.dashboard-metrics,
.dashboard-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.dashboard-metric {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: var(--studio-panel-soft);
}

.dashboard-metric strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.2;
}

.daily-brief-page {
  max-width: none;
}

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

.daily-brief-notice {
  margin-bottom: 16px;
}

.daily-brief-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

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

.daily-brief-title span,
.daily-brief-waiting {
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.45;
}

.daily-brief-view-count {
  color: var(--studio-ink);
  font-variant-numeric: tabular-nums;
}

.dashboard-brief,
.dashboard-brief-copy,
.brief-featured,
.brief-history-list,
.brief-history-summary {
  display: grid;
}

.dashboard-brief {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.dashboard-brief-copy {
  gap: 7px;
}

.dashboard-brief-date,
.brief-featured-head,
.brief-history-heading,
.brief-history-item,
.brief-action-row {
  display: flex;
  align-items: center;
}

.dashboard-brief-date {
  gap: 9px;
}

.dashboard-brief-date strong {
  color: var(--studio-ink);
  font-size: 16px;
}

.dashboard-brief-copy p,
.brief-featured-head p {
  margin: 0;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.55;
}

.brief-action-row {
  flex-wrap: wrap;
  gap: 8px;
}

.brief-action-row .el-button {
  margin: 0;
}

.brief-action-row.compact .el-button {
  min-height: 32px;
}

.public-brief-page {
  max-width: none;
}

.brief-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--studio-muted);
  font-size: 13px;
}

.brief-featured {
  gap: 18px;
  padding: 20px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 68%);
}

.brief-featured-head {
  justify-content: space-between;
  gap: 20px;
}

.brief-featured-head > div:first-child {
  min-width: 0;
}

.brief-featured-head h3 {
  margin: 4px 0 5px;
  color: var(--studio-ink);
  font-size: 20px;
}

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

.brief-featured-summaries > div {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
}

.brief-featured-summaries strong {
  color: var(--studio-ink);
  font-size: 13px;
}

.brief-featured-summaries span,
.brief-history-summary span,
.brief-history-date span {
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.5;
}

.brief-history-heading {
  justify-content: space-between;
  margin: 24px 0 10px;
}

.brief-history-heading strong {
  color: var(--studio-ink);
  font-size: 15px;
}

.brief-history-heading span {
  color: var(--studio-muted);
  font-size: 12px;
}

.brief-history-list {
  gap: 8px;
}

.brief-history-item {
  min-width: 0;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: #ffffff;
}

.brief-history-date {
  flex: 0 0 116px;
  display: grid;
  gap: 3px;
}

.brief-history-date strong {
  color: var(--studio-ink);
  font-size: 13px;
}

.brief-history-summary {
  min-width: 0;
  flex: 1;
  gap: 3px;
}

@media (max-width: 900px) {
  .daily-brief-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-brief-table {
    overflow-x: auto;
  }

  .dashboard-brief,
  .brief-history-item {
    grid-template-columns: 1fr;
    display: grid;
    align-items: stretch;
  }

  .brief-featured-summaries {
    grid-template-columns: 1fr;
  }

  .brief-history-date {
    display: flex;
    justify-content: space-between;
  }
}

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

.dashboard-task-overview,
.dashboard-task-groups,
.dashboard-task-group,
.dashboard-task-list {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.dashboard-task-groups.is-scrollable {
  max-height: 340px;
  padding-right: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.dashboard-task-groups.is-scrollable::-webkit-scrollbar {
  width: 6px;
}

.dashboard-task-groups.is-scrollable::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d4d4d4;
}

.dashboard-task-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-task-summary .dashboard-metric {
  padding: 8px 10px;
}

.dashboard-task-summary .dashboard-metric strong {
  font-size: 15px;
}

.dashboard-task-group {
  padding-top: 2px;
}

.dashboard-task-group + .dashboard-task-group {
  padding-top: 12px;
  border-top: 1px solid var(--studio-line-soft);
}

.dashboard-task-group-head,
.dashboard-task-group-head > div,
.dashboard-task-item,
.dashboard-task-item-title,
.dashboard-task-item-side,
.task-detail-status,
.task-detail-section-head,
.task-detail-footer {
  display: flex;
  align-items: center;
}

.dashboard-task-group-head {
  justify-content: space-between;
  gap: 12px;
}

.dashboard-task-group-head > div {
  min-width: 0;
  gap: 8px;
}

.dashboard-task-group-head > span {
  color: var(--studio-muted);
  font-size: 11px;
}

.dashboard-task-type-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eef2ff;
  color: #4f46e5;
}

.dashboard-task-type-icon.is-viewpoint {
  background: #f0fdf4;
  color: #15803d;
}

.dashboard-task-type-icon.is-backtest {
  background: #fff7ed;
  color: #c2410c;
}

.dashboard-task-type-icon.is-routine {
  background: #f5f3ff;
  color: #7c3aed;
}

.dashboard-task-item {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: #ffffff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-task-item:hover,
.dashboard-task-item:focus-visible {
  border-color: #cbd5e1;
  background: #fafafa;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  outline: none;
}

.dashboard-task-item.is-active {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.dashboard-task-item-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.dashboard-task-item-title {
  min-width: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-task-item-title strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-task-item-title small,
.dashboard-task-item-detail,
.dashboard-task-item-side small {
  color: var(--studio-muted);
  font-size: 11px;
  line-height: 1.4;
}

.dashboard-task-item-detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-task-item-side {
  flex: 0 0 auto;
  align-items: flex-end;
  flex-direction: column;
  gap: 5px;
}

.dashboard-task-loading,
.task-detail-loading {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--studio-muted);
}

.task-detail-header h2 {
  margin: 4px 0;
  color: var(--studio-ink);
  font-size: 20px;
}

.task-detail-header p,
.task-detail-section p {
  margin: 0;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.55;
}

.task-detail-body {
  display: grid;
  gap: 16px;
}

.task-detail-status,
.task-detail-section-head,
.task-detail-footer {
  justify-content: space-between;
  gap: 12px;
}

.task-detail-status > span,
.task-detail-section-head span {
  color: var(--studio-muted);
  font-size: 12px;
}

.task-detail-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: var(--studio-panel-soft);
}

.task-detail-descriptions .el-descriptions__label {
  width: 104px;
}

.task-detail-descriptions .el-descriptions__content {
  overflow-wrap: anywhere;
}

.dashboard-button-row .el-button {
  margin-left: 0;
}

.dashboard-recent-list,
.dashboard-holding-list {
  display: grid;
  gap: 8px;
}

.dashboard-recent-item,
.dashboard-holding-item,
.dashboard-system-item {
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-recent-item > span,
.dashboard-holding-item > span,
.dashboard-system-item > span:not(.dashboard-system-icon) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-holding-item {
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: #ffffff;
}

.dashboard-holding-item > span:last-child {
  text-align: right;
}

.dashboard-holding-item .positive strong,
.dashboard-holding-item .positive small {
  color: var(--market-up-red);
}

.dashboard-holding-item .negative strong,
.dashboard-holding-item .negative small {
  color: var(--market-down-green);
}

.dashboard-system-item {
  justify-content: flex-start;
}

.studio-card {
  min-width: 0;
  border: 1px solid var(--studio-line);
  border-radius: 12px;
  background: var(--studio-panel);
  box-shadow: var(--studio-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (hover: hover) {
  .studio-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }
}

.studio-card > .el-card__header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--studio-line-soft);
}

.studio-card > .el-card__body {
  padding: 16px;
}

/*
 * The agent drawer intentionally stays inside the latest-run card. Element
 * Plus positions its overlay with `position: fixed`; keeping a permanent
 * transform here gives that fixed layer one stable containing block. Without
 * it, the generic hover lift creates/removes the containing block while the
 * drawer opens and Chromium briefly composites the overlay against the whole
 * viewport, which is visible as a flash.
 */
.studio-card.analysis-run-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transform: translateY(0);
}

@media (hover: hover) {
  .studio-card.analysis-run-card:hover {
    transform: translateY(0);
  }
}

.card-header {
  min-height: 34px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.card-header h3 {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

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

.dense-form .el-form-item {
  margin-bottom: 15px;
}

.dense-form .el-form-item__label {
  color: #344054;
  font-weight: 700;
}

.dense-form .el-form-item__content {
  min-width: 0;
}

.advanced-settings {
  margin-top: 4px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #fbfcff;
  overflow: hidden;
}

.advanced-settings.compact {
  margin-top: 0;
}

.advanced-settings-toggle {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.advanced-settings-toggle:hover {
  background: #f2f6ff;
}

.advanced-settings-toggle > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.advanced-settings-toggle strong {
  color: var(--studio-ink);
  font-size: 14px;
}

.advanced-settings-toggle small,
.advanced-settings-chevron {
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.4;
}

.advanced-settings-chevron {
  flex: 0 0 auto;
  color: var(--studio-accent);
  font-weight: 700;
}

.advanced-settings-body {
  padding: 14px;
  border-top: 1px solid var(--studio-line-soft);
  background: #ffffff;
}

.analysis-submit-bar {
  margin-top: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #cbd8f6;
  border-radius: 8px;
  background: #f4f7ff;
}

.analysis-preflight {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.analysis-preflight strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.analysis-preflight span {
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.4;
}

.analysis-submit-bar .el-button {
  flex: 0 0 auto;
  min-width: 128px;
}

.full-width,
.dense-form .el-select,
.dense-form .el-input,
.dense-form .el-autocomplete,
.dense-form .el-date-editor,
.dense-form .el-input-number,
.dense-form .el-segmented {
  width: 100%;
}

.holding-ticker-option {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 2px;
  align-items: baseline;
  line-height: 1.25;
}

.holding-ticker-option strong {
  color: var(--studio-ink);
  font-size: 13px;
}

.holding-ticker-option span {
  min-width: 0;
  color: var(--studio-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.holding-ticker-option small {
  grid-column: 1 / -1;
  color: var(--studio-teal);
  font-size: 11px;
}

.model-form .el-row {
  row-gap: 2px;
}

.model-picker {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 10px;
}

.model-picker .el-input {
  width: 100%;
}

.model-picker .el-input__wrapper {
  min-height: 40px;
}

.model-option-list {
  width: 100%;
  display: grid;
  gap: 6px;
}

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

.model-option-choice {
  min-width: 0;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--studio-ink);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.model-option-choice:hover {
  border-color: #cfcfcf;
}

.model-option-choice:has(input:checked) {
  border-color: #171717;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.08);
}

.model-option-choice input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: #171717;
}

.model-option-choice span {
  min-width: 0;
  color: #404040;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.model-settings-page {
  display: grid;
  gap: 14px;
}

.model-settings-tabs {
  width: fit-content;
  max-width: 100%;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--studio-line);
  border-radius: 10px;
  background: #f7f7f8;
}

.model-settings-tab {
  min-width: 170px;
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--studio-muted);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.model-settings-tab strong {
  color: inherit;
  font-size: 13px;
}

.model-settings-tab span {
  font-size: 10px;
}

.model-settings-tab.active {
  background: #ffffff;
  color: var(--studio-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

.model-provider-metric {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 9px;
  background: #fafafa;
}

.model-provider-metric span,
.model-provider-metric small {
  color: var(--studio-muted);
  font-size: 11px;
}

.model-provider-metric strong {
  overflow: hidden;
  color: var(--studio-ink);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-provider-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.model-provider-toolbar > .el-input {
  width: min(360px, 100%);
}

.model-provider-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.model-provider-filter {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--studio-line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--studio-muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.model-provider-filter:hover,
.model-provider-filter.active {
  border-color: #a3a3a3;
  background: #f5f5f5;
  color: var(--studio-ink);
}

.model-provider-group {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: #ffffff;
}

.model-provider-group-head,
.model-provider-collapse-trigger {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--studio-line-soft);
  background: #fafafa;
  text-align: left;
}

.model-provider-group-head > div,
.model-provider-collapse-trigger > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
}

.model-provider-group-head strong,
.model-provider-collapse-trigger strong {
  color: var(--studio-ink);
  font-size: 13px;
}

.model-provider-group-head span,
.model-provider-collapse-trigger span {
  color: var(--studio-muted);
  font-size: 11px;
}

.model-provider-collapse-trigger {
  border-bottom: 0;
  cursor: pointer;
  font: inherit;
}

.model-provider-collapse-trigger:hover {
  background: #f5f5f5;
}

.model-provider-group.expanded .model-provider-collapse-trigger {
  border-bottom: 1px solid var(--studio-line-soft);
}

.model-provider-collapse-icon {
  flex: 0 0 auto;
  color: var(--studio-muted);
  transition: transform 0.2s ease;
}

.model-provider-group.collapsed .model-provider-collapse-icon {
  transform: rotate(-90deg);
}

.model-provider-table {
  width: 100%;
}

.model-provider-group .model-provider-table .el-table__inner-wrapper::before {
  display: none;
}

.model-provider-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.model-provider-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  background: #f7f7f8;
  color: var(--studio-ink);
  font-size: 12px;
  font-weight: 700;
}

.model-provider-cell > div,
.model-table-value {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.model-provider-cell strong,
.model-table-value strong {
  overflow: hidden;
  color: var(--studio-ink);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-provider-cell span {
  color: var(--studio-muted);
  font-size: 10px;
}

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

.model-provider-summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.model-provider-summary span {
  color: var(--studio-muted);
  font-size: 12px;
}

.model-provider-summary strong {
  min-width: 0;
  color: var(--studio-ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.model-config-drawer {
  max-width: 100vw;
}

.model-provider-selector-form .el-form-item {
  margin-bottom: 0;
}

.model-config-drawer .el-drawer__header {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--studio-line-soft);
}

.model-config-drawer .el-drawer__body {
  padding: 0;
  overflow: hidden;
}

.model-config-drawer .el-drawer__footer {
  margin: 0;
  padding: 12px 20px;
  border-top: 1px solid var(--studio-line-soft);
}

.model-drawer-header {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-right: 8px;
}

.model-drawer-header h2,
.model-drawer-header p {
  margin: 0;
}

.model-drawer-header h2 {
  margin-top: 2px;
  color: var(--studio-ink);
  font-size: 18px;
}

.model-drawer-header p {
  margin-top: 3px;
  color: var(--studio-muted);
  font-size: 12px;
}

.model-drawer-scroll {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  padding: 16px 20px 22px;
}

.model-drawer-section {
  display: grid;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--studio-line-soft);
}

.model-drawer-section-head {
  display: grid;
  gap: 2px;
}

.model-drawer-section-head span {
  color: var(--studio-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.model-drawer-section-head h3 {
  margin: 0;
  color: var(--studio-ink);
  font-size: 14px;
}

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

.model-drawer-model-grid .el-form-item {
  margin-bottom: 0;
}

.model-entry-editor {
  display: grid;
  gap: 12px;
}

.model-entry-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.model-entry-toolbar > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.model-entry-toolbar p {
  margin: 0;
  color: var(--studio-ink);
  font-size: 12px;
  line-height: 1.45;
}

.model-entry-toolbar small,
.model-entry-main small {
  color: var(--studio-muted);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

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

.model-entry-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 32px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 9px;
  background: #ffffff;
}

.model-entry-row:focus-within {
  border-color: #9db7f3;
  box-shadow: 0 0 0 2px rgba(47, 111, 237, 0.08);
}

.model-entry-index {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--studio-panel-soft);
  color: var(--studio-muted);
  font-size: 11px;
  font-weight: 800;
}

.model-entry-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.model-draft-input {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 0 0 1px #dcdfe6 inset;
  transition: box-shadow 0.15s ease;
}

.model-draft-input:hover {
  box-shadow: 0 0 0 1px #c0c4cc inset;
}

.model-draft-input:focus-within {
  box-shadow: 0 0 0 1px var(--studio-accent) inset;
}

.model-draft-input input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 1px 11px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--studio-ink);
  font: inherit;
  font-size: 14px;
}

.model-draft-input input::placeholder {
  color: #a8abb2;
}

.model-entry-roles {
  display: flex;
  gap: 5px;
  white-space: nowrap;
}

.model-entry-roles .el-button + .el-button {
  margin-left: 0;
}

.model-entry-delete {
  margin: 0;
}

.model-entry-empty {
  min-height: 132px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  border: 1px dashed var(--studio-line);
  border-radius: 9px;
  background: #fafafa;
  color: var(--studio-muted);
  text-align: center;
}

.model-entry-empty .el-icon {
  font-size: 22px;
}

.model-entry-empty strong {
  color: var(--studio-ink);
  font-size: 13px;
}

.model-entry-empty span {
  font-size: 11px;
}

.model-connection-form {
  display: grid;
  gap: 2px;
}

.model-key-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.model-key-editor small {
  grid-column: 1 / -1;
  color: var(--studio-muted);
  font-size: 11px;
}

.model-key-note {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #fafafa;
}

.model-key-note strong {
  color: var(--studio-ink);
  font-size: 12px;
}

.model-key-note span {
  color: var(--studio-muted);
  font-size: 11px;
}

.model-drawer-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.config-dialog {
  max-width: calc(100vw - 32px);
}

.config-dialog .el-dialog__body {
  padding-top: 8px;
}

.config-dialog-body {
  display: grid;
  gap: 14px;
  max-height: min(68vh, 720px);
  overflow: auto;
  padding-right: 4px;
}

.dialog-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.news-source-alert {
  margin-bottom: 14px;
}

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

.data-source-preset-card {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.data-source-preset-card.active {
  border-color: #9db7f3;
  background: #f7fbff;
  box-shadow: inset 3px 0 0 var(--studio-accent);
}

.data-source-preset-card:hover {
  border-color: #b8c7e8;
  background: #fbfdff;
}

.data-source-preset-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.data-source-preset-head strong {
  display: block;
  color: var(--studio-ink);
  font-size: 15px;
  line-height: 1.25;
}

.data-source-preset-card p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
}

.data-source-preset-card small {
  min-width: 0;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

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

.data-source-current > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #fbfcff;
}

.data-source-current span {
  color: var(--studio-muted);
  font-size: 12px;
}

.data-source-current strong {
  min-width: 0;
  color: var(--studio-ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.data-source-order-panel {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.data-source-order-panel > summary {
  cursor: pointer;
  list-style: none;
}

.data-source-order-panel > summary::-webkit-details-marker {
  display: none;
}

.data-source-order-panel > summary::after {
  content: "展开";
  color: var(--studio-primary);
  font-size: 12px;
}

.data-source-order-panel[open] > summary::after {
  content: "收起";
}

.data-source-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.data-source-order-head strong {
  display: block;
  color: var(--studio-ink);
  font-size: 15px;
  line-height: 1.25;
}

.data-source-order-head p {
  margin: 4px 0 0;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.45;
}

.data-source-order-list {
  display: grid;
  gap: 8px;
}

.data-source-order-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #fbfcff;
}

.data-source-order-row.disabled {
  opacity: 0.68;
  background: #f8fafc;
}

.data-source-rank {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #e8eefc;
  color: var(--studio-accent);
  font-size: 12px;
  font-weight: 700;
}

.data-source-order-row.disabled .data-source-rank {
  background: #eef2f7;
  color: var(--studio-muted);
}

.data-source-row-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.data-source-row-main strong {
  color: var(--studio-ink);
  font-size: 13px;
  line-height: 1.25;
}

.data-source-row-main span {
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.35;
}

.data-source-row-tags,
.data-source-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

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

.news-source-card {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.news-source-card.active {
  border-color: #9db7f3;
  background: #f7fbff;
  box-shadow: inset 3px 0 0 var(--studio-accent);
}

.news-source-card.selected {
  border-color: var(--studio-accent);
  box-shadow:
    inset 3px 0 0 var(--studio-accent),
    0 0 0 2px rgba(37, 99, 235, 0.08);
}

.news-source-card:hover {
  border-color: #b8c7e8;
  background: #fbfdff;
}

.news-source-card-head,
.news-source-test-head,
.news-source-detail-head,
.news-source-key-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.news-source-card-head strong,
.news-source-test-head strong {
  display: block;
  color: var(--studio-ink);
  font-size: 15px;
  line-height: 1.25;
}

.news-source-card-head span,
.news-source-test-head span {
  color: var(--studio-muted);
  font-size: 12px;
}

.news-source-card p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
}

.news-source-tags,
.news-source-detail-tags {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.news-source-meta,
.news-source-policy {
  display: grid;
  gap: 7px;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.45;
}

.news-source-meta span,
.news-source-policy span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.news-source-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.news-source-key-summary {
  align-items: center;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
  color: #475467;
  font-size: 13px;
}

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

.news-source-settings {
  margin-top: 4px;
}

.news-source-edit-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.rss-settings-block {
  gap: 12px;
}

.rss-feed-editor {
  display: grid;
  gap: 10px;
}

.rss-feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rss-feed-toolbar strong {
  color: var(--studio-ink);
  font-size: 14px;
}

.rss-feed-list {
  display: grid;
  gap: 9px;
}

.rss-feed-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(150px, 0.36fr) minmax(240px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.rss-feed-switch {
  justify-self: start;
}

.news-source-policy {
  margin-top: 2px;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.news-source-detail {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #fbfcff;
}

.news-source-detail-head {
  align-items: flex-start;
}

.news-source-detail-head h3 {
  margin: 3px 0 4px;
  color: var(--studio-ink);
  font-size: 18px;
  line-height: 1.25;
}

.section-label {
  color: var(--studio-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.news-source-detail-head p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.55;
}

.detail-actions {
  margin-top: -2px;
}

.news-source-test {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--studio-line-soft);
}

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

.viewpoint-hints {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
}

.viewpoint-section {
  display: grid;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--studio-line-soft);
}

.viewpoint-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.viewpoint-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.viewpoint-section-head h3 {
  margin-top: 3px;
  color: var(--studio-ink);
  font-size: 18px;
  line-height: 1.25;
}

.viewpoint-conclusion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.viewpoint-loading {
  display: grid;
  gap: 12px;
  color: #475467;
}

.viewpoint-progress {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #fbfcff;
}

.viewpoint-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.viewpoint-progress-head strong {
  display: block;
  color: var(--studio-ink);
  font-size: 15px;
  line-height: 1.35;
}

.viewpoint-progress-head span,
.viewpoint-progress-time span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.viewpoint-progress-time {
  min-width: 150px;
  text-align: right;
}

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

.viewpoint-agent-step {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.viewpoint-agent-step strong {
  display: block;
  color: var(--studio-ink);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.viewpoint-agent-step span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
}

.viewpoint-agent-step.running {
  border-color: #9db7f3;
  background: #f7fbff;
  box-shadow: inset 3px 0 0 var(--studio-accent);
}

.viewpoint-agent-step.completed {
  border-color: #a7d7c0;
  background: #f3fbf7;
}

.viewpoint-agent-step.failed {
  border-color: #f2b8b5;
  background: #fff7f7;
}

.viewpoint-agent-step.degraded {
  border-color: #f3cf8c;
  background: #fffaf0;
}

.viewpoint-agent-step.skipped {
  border-color: #d8dee8;
  background: #f8fafc;
  opacity: 0.72;
}

.viewpoint-markdown {
  max-height: none;
  padding: 0;
  overflow: visible;
}

.viewpoint-level-intro,
.viewpoint-level-note {
  margin: 0 0 12px;
  color: #667085;
  font-size: 13px;
}

.viewpoint-level-group + .viewpoint-level-group {
  margin-top: 18px;
}

.viewpoint-level-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.viewpoint-level-group-head span {
  color: #667085;
  font-size: 12px;
}

.viewpoint-level-list {
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
}

.viewpoint-level-item + .viewpoint-level-item {
  border-top: 1px solid #eaecf0;
}

.viewpoint-level-item summary {
  display: grid;
  grid-template-columns: 74px 96px 110px minmax(170px, 1fr) minmax(210px, 1.25fr) 72px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.viewpoint-level-item summary::-webkit-details-marker {
  display: none;
}

.viewpoint-level-item[open] summary {
  background: #f8fafc;
}

.viewpoint-level-basis {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3448a4;
  font-size: 11px;
  text-align: center;
}

.viewpoint-level-basis.observed {
  background: #ecfdf3;
  color: #067647;
}

.viewpoint-level-basis.confluence {
  background: #fff7ed;
  color: #b54708;
}

.viewpoint-level-value {
  font-variant-numeric: tabular-nums;
}

.viewpoint-level-label,
.viewpoint-level-meaning,
.viewpoint-level-action {
  font-size: 13px;
}

.viewpoint-level-action {
  color: #344054;
}

.viewpoint-level-expand {
  color: var(--studio-accent);
  font-size: 12px;
  text-align: right;
}

.viewpoint-level-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 14px;
  border-top: 1px dashed #d0d5dd;
  background: #fbfcfe;
}

.viewpoint-level-detail > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.viewpoint-level-detail small {
  color: #667085;
}

.viewpoint-level-detail code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.viewpoint-level-note {
  margin: 8px 2px 0;
}

@media (max-width: 900px) {
  .viewpoint-level-item summary {
    grid-template-columns: 70px minmax(80px, auto) 1fr 68px;
  }

  .viewpoint-level-meaning,
  .viewpoint-level-action {
    grid-column: 1 / -1;
  }

  .viewpoint-level-detail {
    grid-template-columns: 1fr;
  }
}

.viewpoint-table {
  width: 100%;
}

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

.viewpoint-agent {
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.viewpoint-agent summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}

.viewpoint-agent summary::-webkit-details-marker {
  display: none;
}

.viewpoint-agent summary strong {
  display: block;
  color: var(--studio-ink);
  font-size: 15px;
}

.viewpoint-agent summary span {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.viewpoint-agent-tags {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.viewpoint-agent .agent-output {
  padding: 2px 14px 14px;
}

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

.viewpoint-tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.viewpoint-tool-list strong {
  width: 100%;
  color: var(--studio-ink);
  font-size: 13px;
}

.viewpoint-tool-list span {
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.viewpoint-tool-list.compact {
  padding: 0 14px 14px;
}

.viewpoint-usage-note {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
}

.form-section-heading {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-section-heading > div {
  display: grid;
  gap: 3px;
}

.form-section-heading strong {
  font-size: 18px;
}

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

.analyst-option {
  width: 100%;
  min-height: 92px;
  margin: 0 !important;
  padding: 13px 14px !important;
  align-items: flex-start;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  background: #ffffff;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease;
}

.analyst-option:hover {
  border-color: #9db7f3;
  background: #fbfdff;
}

.analyst-option.is-checked {
  border-color: var(--studio-accent);
  background: #f2f7ff;
  box-shadow: inset 3px 0 0 var(--studio-accent);
}

.analyst-option .el-checkbox__input {
  margin-top: 3px;
}

.analyst-option .el-checkbox__label {
  min-width: 0;
  padding-left: 10px;
  white-space: normal;
}

.analyst-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.analyst-title {
  color: var(--studio-ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
}

.analyst-option small {
  color: var(--studio-muted);
  line-height: 1.45;
}

.holding-match-alert {
  margin-top: 12px;
}

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

.holding-portfolio-summary .positive strong {
  color: var(--market-up-red);
}

.holding-portfolio-summary .negative strong {
  color: var(--market-down-green);
}

.holdings-grid {
  display: grid;
  gap: 8px;
}

.holdings-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.holdings-list-panel,
.holdings-market-panel,
.holdings-heatmap-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.holdings-section-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.holdings-section-head h3 {
  margin: 3px 0 0;
  color: var(--studio-ink);
  font-size: 16px;
}

.holdings-section-head small {
  max-width: 210px;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.holdings-side-panel {
  min-width: 0;
  display: grid;
  gap: 14px;
}

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

.holdings-market-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.holdings-market-tab {
  min-width: 46px;
  height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--studio-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.holdings-market-tab.active {
  background: #ffffff;
  color: var(--studio-accent);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.holdings-market-item {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.holdings-market-item .market-label {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 800;
}

.holdings-market-item strong {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: var(--studio-ink);
  font-size: 20px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.holdings-market-item small,
.holdings-market-item em {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--studio-muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.holdings-market-item small {
  white-space: nowrap;
}

.holdings-market-item.positive strong {
  color: var(--market-up-red);
}

.holdings-market-item.negative strong {
  color: var(--market-down-green);
}

.holdings-heatmap-panel {
  margin-bottom: 0;
}

.holdings-heatmap-head {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.holdings-heatmap-head > div:first-child {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.holdings-heatmap-head h3 {
  margin: 3px 0 0;
  color: var(--studio-ink);
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

.holdings-period-trigger {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
  color: var(--studio-ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.holdings-period-trigger em {
  color: var(--studio-muted);
  font-style: normal;
  font-size: 11px;
  line-height: 1;
}

.holdings-heatmap-stats {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.holdings-heatmap-metric {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.holdings-heatmap-metric span {
  display: block;
  color: var(--studio-muted);
  font-size: 12px;
}

.holdings-heatmap-metric strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--studio-ink);
  font-size: 15px;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.holdings-heatmap-metric.positive strong {
  color: var(--market-up-red);
}

.holdings-heatmap-metric.negative strong {
  color: var(--market-down-green);
}

.holdings-heatmap {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #f8fafc;
}

.holding-heat-tile {
  --heat-alpha: 0.16;
  position: absolute;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 0;
  background: rgba(100, 116, 139, 0.34);
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.holding-heat-tile:hover {
  z-index: 2;
  filter: brightness(1.04);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.holding-heat-tile.is-up {
  background: rgba(220, 38, 38, var(--heat-alpha));
}

.holding-heat-tile.is-down {
  background: rgba(22, 163, 74, var(--heat-alpha));
}

.holding-heat-tile strong,
.holding-heat-tile small {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: #ffffff;
  line-height: 1.24;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(17, 24, 39, 0.22);
  white-space: nowrap;
}

.holding-heat-tile strong {
  font-size: 14px;
  font-weight: 850;
}

.holding-heat-tile small {
  font-size: 13px;
  font-weight: 750;
}

.holding-heat-tile.is-compact {
  padding: 5px;
}

.holding-heat-tile.is-compact strong {
  font-size: 12px;
}

.holding-heat-tile.is-compact small {
  display: none;
}

.holding-heat-tile.is-tiny strong,
.holding-heat-tile.is-tiny small {
  display: none;
}

.holding-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.holding-card {
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.holding-card:hover {
  border-color: #9db7f3;
  background: #fbfdff;
  box-shadow: inset 3px 0 0 var(--studio-accent);
}

.holding-row-main {
  min-width: 0;
}

.holding-row-head {
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.holding-row-head strong {
  color: var(--studio-ink);
  font-size: 15px;
}

.holding-row-head span {
  color: var(--studio-muted);
  font-size: 12px;
}

.holding-row-snapshot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.35;
}

.holding-row-pnl {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.holding-row-pnl > span {
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.holding-row-pnl strong,
.holding-row-pnl small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.holding-row-pnl strong {
  color: var(--studio-ink);
  font-size: 17px;
}

.holding-row-pnl small {
  margin-top: 3px;
  color: var(--studio-muted);
  font-size: 11px;
}

.holding-row-pnl .positive strong,
.holding-row-pnl .positive small {
  color: var(--market-up-red);
}

.holding-row-pnl .negative strong,
.holding-row-pnl .negative small {
  color: var(--market-down-green);
}

.holding-row .el-input-number {
  width: 100%;
}

.holding-card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--studio-muted);
  font-size: 12px;
}

.holding-dialog-form {
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.holding-dialog .holding-summary {
  margin-bottom: 0;
}

.holding-import-body {
  display: grid;
  gap: 14px;
}

.holding-import-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px dashed #b8c4d9;
  border-radius: 10px;
  background: #f8fafc;
}

.holding-import-upload-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.holding-import-upload-copy strong {
  color: var(--studio-ink);
  font-size: 15px;
}

.holding-import-upload-copy span {
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.5;
}

.holding-import-file-button {
  min-width: 132px;
  height: 36px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 7px;
  background: var(--studio-ink);
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.holding-import-file-button:hover {
  opacity: 0.88;
}

.holding-import-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.holding-import-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}

.holding-import-image {
  min-width: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.holding-import-image img {
  width: 100%;
  height: 116px;
  display: block;
  border-radius: 6px;
  background: var(--studio-panel-soft);
  object-fit: contain;
}

.holding-import-image figcaption {
  min-width: 0;
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.holding-import-image figcaption > span {
  min-width: 0;
  overflow: hidden;
  color: var(--studio-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.holding-import-warnings {
  display: grid;
  gap: 8px;
}

.holding-import-preview {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: #ffffff;
}

.holding-import-preview .el-input-number {
  width: 100%;
}

.holding-import-row-needs-review td.el-table__cell {
  background: #fff7ed !important;
}

.holding-import-footer {
  width: 100%;
}

.holding-import-footer > span:first-child {
  margin-right: auto;
  text-align: left;
}

@media (max-width: 720px) {
  .holding-import-upload {
    align-items: stretch;
    flex-direction: column;
  }

  .holding-import-file-button {
    width: 100%;
  }

  .holding-import-footer > span:first-child {
    width: 100%;
    margin-bottom: 4px;
  }
}

.holding-summary {
  margin: 2px 0 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.holding-summary > div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.holding-summary span {
  display: block;
  color: var(--studio-muted);
  font-size: 12px;
}

.holding-summary strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--studio-ink);
  font-size: 17px;
  line-height: 1.2;
}

.holding-summary small {
  display: block;
  margin-top: 4px;
  color: var(--studio-muted);
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.holding-summary .positive strong {
  color: var(--market-up-red);
}

.holding-summary .negative strong {
  color: var(--market-down-green);
}

.holding-ops {
  display: grid;
  gap: 10px;
}

.holding-ops-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.holding-ops-head strong {
  color: var(--studio-ink);
  font-size: 14px;
}

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

.holding-op-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(140px, 0.7fr) minmax(140px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #fbfcff;
}

.holding-op-row .el-form-item {
  margin-bottom: 0;
}

.holding-op-row .el-input-number {
  width: 100%;
}

.holding-op-delete {
  margin-bottom: 1px;
}

.holding-op-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--studio-line);
  border-radius: 8px;
  background: var(--studio-panel-soft);
  color: var(--studio-muted);
  font-size: 13px;
}

.holding-row-actions {
  width: 72px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.holding-row-actions .el-button {
  width: 100%;
  height: 32px;
  margin-left: 0;
}

.history-toolbar {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(220px, 0.45fr);
  gap: 10px;
}

.history-table {
  width: 100%;
}

.history-table .el-table__row {
  cursor: pointer;
}

.history-ticker-cell {
  display: grid;
  gap: 4px;
}

.history-ticker-cell span {
  color: var(--studio-muted);
  font-size: 12px;
}

.history-report-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 2px 0;
}

.history-report-link.el-button {
  min-height: 24px;
  margin-left: 0;
  padding: 0;
  line-height: 1.2;
  white-space: normal;
  text-align: left;
}

.history-report-empty {
  color: var(--studio-muted);
}

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

.routine-notes {
  margin-bottom: 14px;
}

.routine-table {
  width: 100%;
}

.routine-ticker-cell,
.routine-status-cell {
  display: grid;
  gap: 4px;
}

.routine-ticker-cell span,
.routine-status-cell small {
  color: var(--studio-muted);
  font-size: 12px;
}

.routine-time-input {
  max-width: 96px;
}

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

.table-action-note,
.dialog-timezone-note {
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.5;
}

.dialog-timezone-note {
  margin: -4px 0 12px;
}

.routine-actions .el-button {
  margin-left: 0;
}

.backtest-history-toolbar {
  grid-template-columns: minmax(240px, 420px);
}

.backtest-form .el-input-number {
  width: 100%;
}

.market-backtest-running {
  display: grid;
  gap: 10px;
  color: var(--studio-muted);
}

.market-backtest-progress {
  display: grid;
  gap: 16px;
}

.market-backtest-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.market-backtest-progress-head > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.market-backtest-progress-head strong {
  color: var(--studio-ink);
  font-size: 16px;
  line-height: 1.5;
}

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

.market-backtest-stage-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.market-backtest-stage {
  padding: 9px 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
  color: var(--studio-muted);
  font-size: 12px;
  text-align: center;
}

.market-backtest-stage.is-active {
  border-color: var(--el-color-primary-light-5);
  background: var(--el-color-primary-light-9);
  color: var(--el-color-primary);
  font-weight: 700;
}

.market-backtest-progress-log {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.market-backtest-progress-log > strong {
  color: var(--studio-ink);
  font-size: 12px;
}

.market-backtest-progress-log-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.5;
}

.market-backtest-progress-log-item time {
  color: var(--studio-muted-2);
  font-variant-numeric: tabular-nums;
}

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

.market-backtest-recommendations {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: var(--studio-panel);
}

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

.market-backtest-recommendations-summary::-webkit-details-marker {
  display: none;
}

.market-backtest-recommendations-summary > div {
  display: grid;
  gap: 3px;
}

.market-backtest-recommendations-body {
  display: grid;
  gap: 9px;
  padding-top: 10px;
  border-top: 1px solid var(--studio-line-soft);
}

.market-backtest-recommendation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.market-backtest-recommendation strong {
  color: var(--studio-ink);
}

.market-backtest-recommendation p {
  margin: 4px 0 0;
  color: var(--studio-muted);
  line-height: 1.5;
}

.daxin-form .el-input-number {
  width: 100%;
}

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

.daxin-info-item {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.daxin-info-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--studio-muted);
  font-size: 12px;
}

.daxin-info-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--studio-ink);
  font-size: 14px;
}

.daxin-reasons {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.daxin-reasons p {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--studio-accent);
  border-radius: 6px;
  background: #f8fafc;
  color: #344054;
  line-height: 1.55;
}

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

.daxin-enrichment-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.daxin-enrichment-card h4 {
  margin: 6px 0;
  color: var(--studio-ink);
  font-size: 14px;
}

.daxin-enrichment-card p {
  margin: 0 0 8px;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.55;
}

.daxin-enrichment-card a {
  color: var(--studio-accent);
  font-size: 12px;
  text-decoration: none;
}

.daxin-analysis-summary {
  display: grid;
  gap: 8px;
}

.daxin-analysis-summary p {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #16a34a;
  border-radius: 6px;
  background: #f0fdf4;
  color: #1f2937;
  line-height: 1.55;
}

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

.daxin-analysis-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.daxin-analysis-card.is-missing {
  background: #f8fafc;
}

.daxin-analysis-card h4 {
  margin: 6px 0 10px;
  color: var(--studio-ink);
  font-size: 15px;
}

.daxin-analysis-evidence-list {
  display: grid;
  gap: 10px;
}

.daxin-analysis-evidence {
  display: grid;
  gap: 6px;
}

.daxin-analysis-evidence p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.daxin-evidence-source {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--studio-muted);
  font-size: 12px;
}

.daxin-evidence-source a {
  color: var(--studio-accent);
  text-decoration: none;
}

.daxin-analysis-warnings {
  display: grid;
  gap: 8px;
}

.backtest-notes {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
  color: var(--studio-muted);
  font-size: 13px;
  line-height: 1.5;
}

.backtest-chart-panel {
  margin-top: 0;
}

.backtest-method {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.backtest-method strong {
  display: block;
  margin-bottom: 6px;
  color: var(--studio-ink);
  font-size: 15px;
}

.backtest-method p {
  margin: 5px 0;
  color: #344054;
  line-height: 1.55;
}

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

.backtest-note-grid span {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.45;
}

.backtest-section {
  margin-top: 16px;
}

.daxin-section {
  display: grid;
  gap: 10px;
}

.daxin-correlation-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.daxin-source-notes .today-news-card a + a {
  margin-left: 10px;
}

.backtest-progress {
  display: grid;
  gap: 14px;
}

.today-context-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.today-summary-row {
  margin-bottom: 0;
}

.today-context-commentary {
  margin: 0;
  padding: 12px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #eef2ff;
  color: #312e81;
  line-height: 1.55;
}

.today-chart-grid {
  margin-top: 0;
}

.today-news-block {
  display: grid;
  gap: 10px;
}

.today-news-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--studio-ink);
}

.today-news-heading span {
  color: var(--studio-muted);
  font-size: 12px;
}

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

.today-news-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.today-news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--studio-muted);
  font-size: 12px;
}

.today-news-card h4 {
  margin: 8px 0 6px;
  color: var(--studio-ink);
  font-size: 14px;
  line-height: 1.35;
}

.today-news-card p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.today-news-fallback {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.today-news-fallback.is-error {
  border-color: #fed7aa;
  background: #fff7ed;
}

.today-news-fallback pre {
  max-height: 180px;
  margin: 0;
  overflow: auto;
  color: #334155;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.today-news-card a,
.today-news-missing-link {
  display: inline-flex;
  margin-top: 10px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.today-news-missing-link {
  color: var(--studio-muted);
}

.today-news-raw {
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.latest-news-page {
  display: grid;
  gap: 12px;
}

.news-editorial-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: end;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.news-editorial-control-copy,
.news-editorial-control-field,
.news-editorial-control-switch {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.news-editorial-control-title,
.news-editorial-control-fields,
.news-editorial-control-actions,
.latest-news-editorial-status,
.latest-news-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-editorial-control-copy > span,
.news-editorial-control-field > span,
.news-editorial-control-switch > span {
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.45;
}

.news-editorial-control-fields {
  align-items: end;
  gap: 12px;
}

.news-editorial-control-field .el-input-number {
  width: 128px;
}

.news-editorial-control-switch {
  min-width: 140px;
}

.news-editorial-control-actions {
  justify-content: flex-end;
}

.latest-news-header-actions,
.latest-news-toolbar,
.latest-news-item-meta,
.latest-news-item-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.latest-news-stats > div {
  min-width: 0;
  padding: 12px 14px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: var(--studio-panel-soft);
}

.latest-news-stats strong {
  color: var(--studio-ink);
  font-size: 18px;
  line-height: 1.25;
}

.latest-news-stats span,
.latest-news-toolbar > span {
  color: var(--studio-muted);
  font-size: 12px;
}

.latest-news-toolbar {
  margin-bottom: 14px;
}

.latest-news-toolbar .el-input {
  flex: 1 1 360px;
}

.latest-news-toolbar .el-select {
  width: 220px;
}

.latest-news-toolbar > span {
  margin-left: auto;
  white-space: nowrap;
}

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

.latest-news-item {
  min-width: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.latest-news-item:hover {
  border-color: #bfdbfe;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.latest-news-item-meta {
  color: var(--studio-muted);
  font-size: 12px;
}

.latest-news-item-meta time {
  margin-left: auto;
}

.latest-news-item h3 {
  margin: 10px 0 7px;
  color: var(--studio-ink);
  font-size: 15px;
  line-height: 1.45;
}

.latest-news-item h3 a {
  color: inherit;
  text-decoration: none;
}

.latest-news-item h3 a:hover {
  color: #2563eb;
}

.latest-news-item > p {
  margin: 0 0 12px;
  display: -webkit-box;
  overflow: hidden;
  color: #475467;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.latest-news-item-footer {
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  color: var(--studio-muted);
  font-size: 12px;
}

.latest-news-item-footer a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #2563eb;
  font-weight: 650;
  text-decoration: none;
}

.latest-news-editorial-state {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 9px 10px;
  border-left: 3px solid #bfdbfe;
  background: #f8fafc;
}

.latest-news-editorial-state.has-error {
  border-left-color: #fca5a5;
  background: #fef2f2;
}

.latest-news-editorial-status {
  flex-wrap: wrap;
  color: var(--studio-muted);
  font-size: 12px;
}

.latest-news-editorial-status strong {
  color: var(--studio-ink);
}

.latest-news-editorial-state > p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.latest-news-editorial-state > .latest-news-editorial-error {
  color: #b91c1c;
}

.latest-news-item-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.latest-news-originals {
  margin-top: 10px;
  color: var(--studio-muted);
  font-size: 12px;
}

.latest-news-originals summary {
  width: fit-content;
  cursor: pointer;
  color: #2563eb;
  font-weight: 650;
}

.latest-news-original-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.latest-news-original-list a {
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--studio-panel-soft);
  color: #475467;
  text-decoration: none;
}

.latest-news-original-list a:hover {
  color: #2563eb;
}

.latest-news-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--studio-muted);
}

@media (max-width: 900px) {
  .news-editorial-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .news-editorial-control-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-editorial-control-switch {
    grid-column: 1 / -1;
  }

  .news-editorial-control-field .el-input-number {
    width: 100%;
  }

  .news-editorial-control-actions > .el-button {
    flex: 1 1 0;
  }

  .latest-news-stats,
  .latest-news-list {
    grid-template-columns: 1fr;
  }

  .latest-news-toolbar,
  .latest-news-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .latest-news-toolbar .el-input,
  .latest-news-toolbar .el-select {
    width: 100%;
    flex-basis: auto;
  }

  .latest-news-toolbar > span {
    margin-left: 0;
  }

  .latest-news-item-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .latest-news-item-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .news-editorial-control-fields {
    grid-template-columns: 1fr;
  }

  .news-editorial-control-switch {
    grid-column: auto;
  }
}

.today-news-raw summary {
  padding: 10px 12px;
  cursor: pointer;
  color: var(--studio-muted);
  font-size: 13px;
}

.today-news-raw pre {
  max-height: 260px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border-top: 1px solid var(--studio-line-soft);
  color: #334155;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.today-news-errors {
  display: grid;
  gap: 8px;
}

.backtest-latest-strategy {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.5;
}

.backtest-latest-strategy strong {
  color: #172554;
  font-size: 14px;
}

.backtest-latest-strategy em {
  font-style: normal;
  color: #9f1239;
}

.backtest-latest-strategy p {
  margin: 0;
  color: #334155;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.backtest-strategy-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 6px;
}

.backtest-strategy-item {
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.backtest-strategy-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--studio-ink);
  font-size: 13px;
}

.strategy-date {
  min-width: 190px;
  font-weight: 700;
}

.strategy-badge,
.strategy-blocked {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.strategy-badge {
  background: #f1f5f9;
  color: #334155;
}

.signal-buy,
.action-buy {
  background: var(--market-up-red-soft);
  color: #991b1b;
}

.signal-sell,
.action-sell {
  background: var(--market-down-green-soft);
  color: #166534;
}

.signal-hold,
.action-hold {
  background: #f8fafc;
  color: #475569;
}

.strategy-blocked {
  background: #fff7ed;
  color: #9a3412;
}

.strategy-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
  color: var(--studio-muted);
  font-size: 12px;
}

.strategy-metrics span {
  min-width: 0;
  padding: 8px;
  border-radius: 6px;
  background: var(--studio-panel-soft);
  overflow-wrap: anywhere;
}

.backtest-report-open-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 10px;
}

.backtest-strategy-report {
  max-height: 260px;
  margin: 0 12px 12px;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.backtest-report-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.backtest-report-meta span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
  color: var(--studio-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.negative-text {
  color: #9f1239 !important;
}

.backtest-report-json {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.backtest-stats .el-col {
  flex: 0 0 50%;
  max-width: 50%;
}

.stat-row {
  margin-bottom: 14px;
}

.stat-row .el-col {
  margin-bottom: 10px;
}

.stat-row .el-statistic {
  min-height: 86px;
  padding: 13px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.stat-row .el-statistic__head {
  color: var(--studio-muted);
  font-size: 13px;
}

.stat-row .el-statistic__content {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--studio-ink);
  font-size: 22px;
  font-weight: 850;
}

.analysis-queue-state {
  display: grid;
  gap: 14px;
  padding: 2px 0;
}

.analysis-queue-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe5f5;
  border-radius: 10px;
  background: linear-gradient(135deg, #f7faff 0%, #f9fafb 100%);
}

.analysis-queue-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #dbe5f5;
  border-radius: 50%;
  background: #ffffff;
  color: var(--studio-accent);
  box-shadow: 0 6px 18px rgba(42, 79, 154, 0.1);
}

.analysis-queue-icon .el-icon,
.analysis-queue-icon > svg {
  width: 19px;
  height: 19px;
  animation: analysis-queue-spin 1.8s linear infinite;
}

.analysis-queue-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.analysis-queue-copy > strong {
  color: var(--studio-ink);
  font-size: 18px;
  line-height: 1.35;
}

.analysis-queue-copy > p,
.analysis-queue-note {
  margin: 0;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.6;
}

.analysis-queue-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.analysis-queue-metric {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.analysis-queue-metric > span {
  color: var(--studio-muted);
  font-size: 11px;
}

.analysis-queue-metric > strong {
  overflow-wrap: anywhere;
  color: var(--studio-ink);
  font-size: 14px;
}

.analysis-queue-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf2;
}

.analysis-queue-track > span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9db7f3, var(--studio-accent));
  animation: analysis-queue-track 1.5s ease-in-out infinite;
}

@keyframes analysis-queue-spin {
  to { transform: rotate(360deg); }
}

@keyframes analysis-queue-track {
  from { transform: translateX(-110%); }
  to { transform: translateX(275%); }
}

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

.analysis-phase {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
  color: var(--studio-muted);
  font-size: 12px;
}

.analysis-phase.active {
  border-color: #9db7f3;
  background: #f4f7ff;
  color: var(--studio-accent);
}

.analysis-phase.completed {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.analysis-phase-dot {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  font-weight: 800;
}

.run-details-toggle-row {
  display: flex;
  justify-content: flex-end;
}

.run-technical-details {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--studio-line-soft);
}

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

.agent-board:empty::before {
  content: "分析启动后会显示各智能体状态";
  grid-column: 1 / -1;
  padding: 26px 14px;
  border: 1px dashed var(--studio-line);
  border-radius: 8px;
  background: var(--studio-panel-soft);
  color: var(--studio-muted);
  text-align: center;
}

.agent-chip {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    transform 0.16s ease;
}

.agent-chip:hover,
.agent-chip:focus-visible {
  border-color: #9db7f3;
  background: #f8fbff;
  outline: 0;
}

.agent-chip:active {
  transform: translateY(1px);
}

.agent-chip > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
}

.agent-chip-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.agent-chip strong {
  overflow: hidden;
  color: #344054;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.agent-decision {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.35;
}

.agent-decision.positive {
  background: var(--market-up-red-soft);
  color: #991b1b;
}

.agent-decision.caution {
  background: #fff7ed;
  color: #b45309;
}

.agent-decision.negative {
  background: var(--market-down-green-soft);
  color: #166534;
}

.agent-decision.neutral,
.agent-decision.muted {
  background: #f2f4f7;
  color: #667085;
}

.agent-chip em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--studio-muted);
  font-size: 12px;
  font-style: normal;
}

.agent-detail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--studio-accent);
}

.agent-chip.running span {
  background: var(--studio-accent);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
}

.agent-chip.completed span {
  background: var(--studio-teal);
}

.agent-chip.failed span {
  background: var(--studio-danger);
}

.agent-drawer .el-drawer__header {
  margin-bottom: 0;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--studio-line-soft);
}

.agent-drawer .el-drawer__body {
  padding: 18px 22px 22px;
}

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

.agent-drawer-header h3 {
  margin-top: 4px;
  color: var(--studio-ink);
  font-size: 22px;
  line-height: 1.2;
}

.agent-drawer-header p {
  margin-top: 6px;
  color: var(--studio-muted);
  font-size: 13px;
}

.agent-drawer-body {
  display: grid;
  gap: 16px;
}

.agent-detail-stats {
  margin-bottom: 0;
}

.agent-detail-tabs .el-tabs__header {
  margin-bottom: 8px;
}

.agent-report {
  max-height: 54vh;
  padding-right: 8px;
}

.agent-message-list {
  max-height: 54vh;
}

.stacked-input {
  margin-top: 0;
}

.api-alert {
  margin-top: 10px;
}

.api-key-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
}

.report-path {
  max-width: 44%;
}

.report-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.report-quick-nav .el-button {
  margin-left: 0;
}

.report-section-toolbar,
.maintenance-action,
.runtime-task-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 10px;
  background: var(--studio-panel-soft);
}

.report-context,
.maintenance-action > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.report-context span,
.maintenance-action p,
.runtime-task-context span,
.history-report-summary {
  margin: 0;
  color: var(--studio-muted);
  font-size: 12px;
}

.report-section-select {
  width: min(320px, 44vw);
}

.maintenance-action {
  margin: 14px 0 0;
}

.market-chart-panel {
  margin: 4px 0 18px;
  padding: 16px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #fbfcff;
}

.market-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.market-chart-header h3 {
  margin: 3px 0 0;
  color: var(--studio-ink);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.market-chart-header > span {
  color: var(--studio-muted);
  font-size: 13px;
}

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

.chart-metric {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.chart-metric span,
.line-chart-head span {
  display: block;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.35;
}

.chart-metric strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--studio-ink);
  font-size: 17px;
  line-height: 1.2;
}

.chart-metric.positive strong {
  color: var(--market-up-red);
}

.chart-metric.negative strong {
  color: var(--market-down-green);
}

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

.line-chart {
  min-width: 0;
  position: relative;
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

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

.line-chart.empty {
  min-height: 140px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  color: var(--studio-muted);
}

.line-chart-head {
  min-height: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.line-chart-head strong {
  display: block;
  color: var(--studio-ink);
  font-size: 14px;
  line-height: 1.25;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chart-svg {
  width: 100%;
  height: 230px;
  display: block;
  margin-top: 8px;
  overflow: visible;
}

.chart-grid-line {
  stroke: #edf1f6;
  stroke-width: 1;
}

.chart-reference-line {
  stroke-width: 1;
  stroke-dasharray: 5 5;
  opacity: 0.85;
}

.chart-hover-line {
  stroke: #334155;
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0;
  pointer-events: none;
}

.chart-hover-line.visible {
  opacity: 0.42;
}

.chart-point {
  stroke: #ffffff;
  stroke-width: 1.2;
}

.chart-marker circle {
  stroke: #ffffff;
  stroke-width: 1.6;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.18));
}

.chart-marker text {
  fill: #ffffff;
  font-size: 10px;
  font-weight: 850;
  pointer-events: none;
}

.chart-hover-zone {
  fill: transparent;
  cursor: crosshair;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  min-width: 168px;
  max-width: 224px;
  padding: 9px 10px;
  border: 1px solid #d6deea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  color: #1f2937;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0);
  transition: opacity 0.12s ease;
}

.chart-tooltip.visible {
  opacity: 1;
}

.chart-tooltip b {
  display: block;
  margin-bottom: 6px;
  color: #111827;
  font-size: 12px;
}

.chart-tooltip div {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.chart-tooltip div + div {
  margin-top: 4px;
}

.chart-tooltip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chart-tooltip span {
  color: var(--studio-muted);
}

.chart-tooltip strong {
  color: var(--studio-ink);
  font-weight: 800;
}

.chart-y-label,
.chart-x-label,
.chart-reference-label {
  fill: #667085;
  font-size: 11px;
}

.markdown-report {
  max-height: calc(100vh - 258px);
  overflow: auto;
  padding: 16px 4px 4px;
  line-height: 1.68;
  color: #253044;
}

.reports-page .report-document {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 24px;
}

.markdown-report h1,
.markdown-report h2,
.markdown-report h3 {
  letter-spacing: 0;
  line-height: 1.22;
}

.markdown-report pre {
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
}

.markdown-report table {
  width: 100%;
  margin: 14px 0;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  font-size: 14px;
}

.markdown-report th,
.markdown-report td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--studio-line-soft);
  text-align: left;
  vertical-align: top;
}

.markdown-report th {
  background: #f3f6fb;
  color: #344054;
  font-weight: 800;
}

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

.markdown-report blockquote {
  margin: 14px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--studio-accent);
  background: #f7faff;
  color: #344054;
}

.markdown-report code,
code {
  overflow-wrap: anywhere;
}

code {
  color: #344054;
}

.stream-list {
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding-right: 8px;
}

.stream-list p {
  margin: 8px 0 0;
  color: #334155;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tool-call {
  padding: 12px;
  border: 1px solid var(--studio-line-soft);
  border-radius: 8px;
  background: var(--studio-panel-soft);
}

.tool-call + .tool-call {
  margin-top: 10px;
}

.tool-call > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--studio-muted);
  font-size: 12px;
}

.tool-call pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 12px;
}

.el-button {
  border-radius: 6px;
  font-weight: 650;
}

.el-input__wrapper,
.el-select__wrapper,
.el-date-editor.el-input__wrapper,
.el-input-number {
  border-radius: 6px;
}

.el-card {
  --el-card-border-radius: 8px;
}

.el-divider--horizontal {
  margin: 18px 0;
}

@media (max-width: 1500px) {
  .dashboard-grid,
  .launch-grid,
  .logs-grid,
  .framework-grid,
  .backtest-grid,
  .market-backtest-grid,
  .daxin-grid,
  .viewpoint-grid,
  .holdings-workspace {
    grid-template-columns: 1fr;
  }

  .backtest-history-card,
  .market-backtest-history-card,
  .daxin-history-card {
    grid-column: auto;
  }
}

@media (max-width: 1180px) {
  .studio-shell,
  .studio-shell.sidebar-collapsed,
  .studio-shell.assistant-collapsed,
  .studio-shell.sidebar-collapsed.assistant-collapsed,
  .studio-shell.assistant-hidden,
  .studio-shell.sidebar-collapsed.assistant-hidden {
    grid-template-columns: 1fr;
  }

  .studio-sidebar,
  .studio-sidebar.collapsed {
    position: static;
    height: auto;
    padding: 20px 14px;
    padding-bottom: 12px;
  }

  .studio-sidebar.collapsed .brand-block {
    justify-content: flex-start;
    padding: 4px 8px 22px;
  }

  .studio-sidebar.collapsed .brand-copy {
    display: block;
  }

  .studio-sidebar.collapsed .sidebar-toggle {
    position: static;
  }

  .studio-menu {
    display: flex;
    overflow-x: auto;
  }

  .studio-menu .el-menu-item-group {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
  }

  .studio-menu .el-menu-item-group__title {
    flex: 0 0 auto;
    padding: 0 8px;
    white-space: nowrap;
  }

  .studio-menu .el-menu-item-group > ul {
    display: flex;
    align-items: center;
  }

  .studio-sidebar.collapsed .studio-menu {
    margin-top: 0;
  }

  .studio-menu .el-menu-item {
    flex: 0 0 auto;
  }

  .studio-sidebar.collapsed .studio-menu .el-menu-item {
    justify-content: flex-start;
    padding: 0 20px !important;
  }

  .studio-sidebar.collapsed .studio-menu .el-menu-item .el-icon {
    margin-right: 5px;
  }

  .sidebar-status {
    display: none;
  }

  .sidebar-mode-toggle {
    display: none;
  }

  .assistant-panel {
    position: static;
    height: auto;
    min-height: 420px;
    border-left: 0;
    border-top: 1px solid var(--studio-line);
  }

  .assistant-panel.collapsed {
    min-height: auto;
  }

  .dashboard-grid,
  .launch-grid,
  .models-grid,
  .logs-grid,
  .framework-grid,
  .backtest-grid,
  .market-backtest-grid,
  .daxin-grid,
  .daxin-enrichment-grid,
  .daxin-analysis-grid,
  .holdings-workspace,
  .viewpoint-grid {
    grid-template-columns: 1fr;
  }

  .ai-live-main-grid,
  .ai-live-main-grid.has-trade-detail {
    grid-template-columns: 1fr;
  }

  .ai-live-trade-detail-panel {
    position: static;
  }

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

  .ai-live-strategy-summary {
    grid-template-columns: 1fr;
  }

  .backtest-center-switch {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

  .data-source-preset-grid,
  .data-source-current,
  .data-source-order-grid,
  .model-provider-grid,
  .news-source-grid {
    grid-template-columns: 1fr;
  }

  .model-provider-summary {
    grid-template-columns: 1fr;
  }

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

  .research-hub-grid,
  .admin-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-source-usage-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .data-source-agent-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .studio-main {
    padding: 14px;
  }

  .page-header,
  .card-header,
  .api-key-row,
  .news-source-detail-head,
  .news-source-key-summary,
  .data-source-usage-toolbar,
  .data-source-usage-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .data-source-usage-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .data-source-usage-filter,
  .data-source-usage-method-filter,
  .data-source-usage-actions .el-select,
  .data-source-usage-actions .el-segmented {
    width: 100% !important;
  }

  .data-source-usage-metrics,
  .data-source-agent-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-actions {
    justify-content: flex-start;
  }

  .run-pill {
    width: 100%;
  }

  .dashboard-actions-grid,
  .dashboard-mini-stats,
  .research-hub-grid,
  .admin-action-grid,
  .admin-overview-metrics,
  .analysis-queue-metrics,
  .analysis-phase-list {
    grid-template-columns: 1fr;
  }

  .ai-live-account-band,
  .ai-live-panel {
    padding: 14px;
  }

  .ai-live-account-head,
  .ai-live-panel-head,
  .ai-live-order,
  .ai-live-strategy-switch {
    align-items: flex-start;
  }

  .ai-live-strategy-switch {
    flex-direction: column;
  }

  .ai-live-strategy-switch .el-segmented {
    width: 100%;
  }

  .ai-live-strategy-copy dl {
    grid-template-columns: 1fr;
  }

  .ai-live-strategy-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .ai-live-account-title > strong {
    font-size: 28px;
  }

  .ai-live-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .ai-live-order {
    flex-direction: column;
  }

  .ai-live-order > span:last-child {
    text-align: left;
  }

  .equity-kline-svg {
    min-height: 230px;
  }

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

  .market-backtest-progress-head {
    align-items: stretch;
    flex-direction: column;
  }

  .market-backtest-progress-metrics,
  .market-backtest-stage-track {
    grid-template-columns: 1fr;
  }

  .dashboard-task-item {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-task-item-side {
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
  }

  .task-detail-drawer {
    width: 100% !important;
  }

  .workspace-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .dashboard-recent-item,
  .dashboard-holding-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-holding-item > span:last-child {
    text-align: left;
  }

  .analyst-grid,
  .agent-board {
    grid-template-columns: 1fr;
  }

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

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

  .analysis-submit-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .analysis-submit-bar .el-button {
    width: 100%;
  }

  .holdings-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .holdings-section-head small {
    max-width: none;
    text-align: left;
  }

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

  .holdings-heatmap-head {
    align-items: stretch;
    flex-direction: column;
  }

  .holdings-heatmap-stats {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .holdings-heatmap {
    min-height: 260px;
  }

  .holding-row-pnl {
    grid-template-columns: 1fr;
  }

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

  .holding-op-row {
    grid-template-columns: 1fr;
  }

  .holding-row-actions {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .report-path {
    max-width: 100%;
  }

  .market-chart-header,
  .line-chart-head {
    flex-direction: column;
  }

  .history-toolbar,
  .backtest-note-grid,
  .daxin-correlation-row,
  .strategy-metrics,
  .backtest-report-meta,
  .today-news-list,
  .viewpoint-news-list,
  .data-source-order-row,
  .model-key-row,
  .news-source-key-row,
  .rss-feed-row {
    grid-template-columns: 1fr;
  }

  .data-source-order-row {
    align-items: stretch;
  }

  .data-source-rank {
    width: 100%;
    height: 24px;
  }

  .data-source-row-tags,
  .data-source-row-actions {
    justify-content: flex-start;
  }

  .viewpoint-section-head,
  .viewpoint-agent summary,
  .viewpoint-progress-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .viewpoint-agent-tags {
    justify-content: flex-start;
  }

  .viewpoint-progress-time {
    min-width: 0;
    text-align: left;
  }

  .viewpoint-agent-progress {
    grid-template-columns: 1fr;
  }

  .today-news-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .backtest-strategy-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .strategy-date {
    min-width: 0;
  }

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

  .chart-svg {
    height: 210px;
  }

  .markdown-report,
  .stream-list {
    max-height: none;
  }
}

/* Phone-first application shell and touch interaction. */
@media (max-width: 760px) {
  html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  body {
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
  }

  .studio-shell,
  .studio-shell.sidebar-collapsed,
  .studio-shell.assistant-collapsed,
  .studio-shell.sidebar-collapsed.assistant-collapsed,
  .studio-shell.assistant-hidden,
  .studio-shell.sidebar-collapsed.assistant-hidden {
    display: block;
    min-height: 100dvh;
  }

  .studio-sidebar,
  .studio-sidebar.collapsed {
    display: none !important;
  }

  .studio-main {
    min-height: 100dvh;
    padding: 0 12px calc(82px + env(safe-area-inset-bottom));
    gap: 10px;
  }

  .page-header {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 0;
    margin: 0 -12px;
    padding: max(9px, env(safe-area-inset-top)) 12px 9px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 36px auto;
    align-items: center;
    gap: 5px 8px;
    border-bottom: 1px solid rgba(229, 229, 229, 0.9);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(14px);
  }

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

  .mobile-app-brand img {
    width: 28px;
    height: 28px;
  }

  .mobile-app-brand strong {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-title {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 2px;
  }

  .page-eyebrow,
  .page-title p {
    display: none;
  }

  .page-title h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
  }

  .page-actions {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .run-pill {
    width: auto;
    min-width: 38px;
    height: 36px;
    justify-content: center;
    padding: 2px 4px;
    border-radius: 10px;
  }

  .run-pill .el-tag {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .docs-trigger {
    display: none;
  }

  .profile-trigger,
  .announcement-trigger.el-button.is-circle {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

  .profile-trigger {
    padding: 3px;
    justify-content: center;
  }

  .profile-trigger > .el-icon:last-child {
    display: none;
  }

  .profile-avatar {
    width: 28px;
    height: 28px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 8px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    border-top: 1px solid rgba(229, 229, 229, 0.95);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(16px);
  }

  .mobile-nav-item {
    min-width: 0;
    min-height: 54px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    padding: 4px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #737373;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
  }

  .mobile-nav-item.active {
    background: #f2f2f2;
    color: #171717;
  }

  .mobile-nav-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    font-size: 20px;
  }

  .mobile-nav-badge {
    position: absolute;
    top: -4px;
    right: -7px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 9px;
    line-height: 1;
  }

  .mobile-only {
    display: grid;
  }

  .desktop-only {
    display: none !important;
  }

  .page-body,
  .embedded-page,
  .workspace-grid,
  .dashboard-main-column,
  .dashboard-side-column {
    gap: 10px;
  }

  .el-card {
    --el-card-border-radius: 14px;
  }

  .el-card__header {
    padding: 14px;
  }

  .el-card__body {
    padding: 14px;
  }

  .el-button:not(.is-circle):not(.is-link):not(.is-text) {
    min-height: 44px;
  }

  .el-button.is-circle {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .el-input__wrapper,
  .el-select__wrapper,
  .el-date-editor.el-input__wrapper,
  .el-input-number {
    min-height: 44px;
  }

  .el-input__inner,
  .el-textarea__inner {
    font-size: 16px;
  }

  .el-radio-group,
  .el-checkbox-group {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .analysis-submit-bar {
    position: sticky;
    bottom: calc(70px + env(safe-area-inset-bottom));
    z-index: 18;
    margin: 0 -4px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(12px);
  }

  .task-center-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .task-center-toolbar .el-select:last-child:nth-child(3) {
    grid-column: 1 / -1;
  }

  .mobile-task-list {
    gap: 10px;
  }

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

  .mobile-task-card-head,
  .mobile-task-card-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-task-card-head > div {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .mobile-task-card-head strong,
  .mobile-task-card-head span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-task-card-head span,
  .mobile-task-card-meta,
  .mobile-task-card-footer > span {
    color: var(--studio-muted);
    font-size: 12px;
  }

  .mobile-task-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
  }

  .mobile-task-card-footer {
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--studio-line-soft);
  }

  .mobile-task-actions {
    display: flex;
    gap: 8px;
  }

  .mobile-history-list {
    gap: 10px;
  }

  .mobile-history-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--studio-line);
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
  }

  .mobile-history-card:active {
    background: var(--studio-surface-soft);
  }

  .mobile-history-card-head,
  .mobile-history-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-history-card-head .history-ticker-cell {
    min-width: 0;
  }

  .mobile-history-card-head .history-ticker-cell strong,
  .mobile-history-card-head .history-ticker-cell span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-history-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    color: var(--studio-muted);
    font-size: 12px;
  }

  .mobile-history-card-footer {
    padding-top: 10px;
    border-top: 1px solid var(--studio-line-soft);
  }

  .mobile-history-card-footer .history-report-summary {
    min-width: 0;
    overflow: hidden;
    color: var(--studio-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-empty-state {
    padding: 36px 16px;
    border: 1px dashed var(--studio-line);
    border-radius: 14px;
    color: var(--studio-muted);
    text-align: center;
  }

  .assistant-panel,
  .assistant-panel.collapsed {
    margin-bottom: calc(70px + env(safe-area-inset-bottom));
    min-height: 60dvh;
  }

  .el-overlay-dialog {
    display: flex;
    align-items: flex-end;
  }

  .el-dialog {
    width: 100% !important;
    max-width: none !important;
    max-height: 92dvh;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    border-radius: 20px 20px 0 0;
  }

  .el-dialog__header {
    flex: 0 0 auto;
    padding: 16px;
  }

  .el-dialog__body {
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
  }

  .el-dialog__footer {
    flex: 0 0 auto;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--studio-line-soft);
    background: #ffffff;
  }

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

  .dialog-footer .el-button {
    width: 100%;
    margin-left: 0;
  }

  .el-message-box {
    width: calc(100vw - 24px);
    max-width: 420px;
  }

  .announcement-popover {
    max-width: calc(100vw - 16px) !important;
  }
}
/* Authentication, user administration, and system announcements */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.16), transparent 34%),
    radial-gradient(circle at 85% 85%, rgba(14, 116, 144, 0.14), transparent 32%),
    #f6f8fc;
}

.auth-card {
  width: min(440px, 100%);
  display: grid;
  gap: 20px;
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.13);
}

.auth-loading-card {
  justify-items: center;
  color: #334155;
}

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

.auth-brand img {
  width: 52px;
  height: 52px;
}

.auth-brand h1,
.auth-brand p {
  margin: 0;
}

.auth-brand p,
.auth-footnote {
  color: #64748b;
}

.auth-submit {
  width: 100%;
  min-height: 44px;
}

.auth-footnote {
  margin: 0;
  font-size: 13px;
  text-align: center;
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #64748b;
  font-size: 14px;
}

.auth-legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  padding-top: 14px;
  border-top: 1px solid var(--studio-line-soft);
  font-size: 12px;
}

.auth-legal-links a {
  color: var(--studio-muted);
  text-decoration: none;
}

.auth-legal-links a:hover {
  color: var(--studio-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-legal-consent {
  margin-top: -4px;
  margin-bottom: 8px;
}

.auth-legal-consent .el-checkbox {
  height: auto;
  align-items: flex-start;
  white-space: normal;
}

.auth-legal-consent .el-checkbox__input {
  margin-top: 3px;
}

.auth-legal-consent .el-checkbox__label {
  white-space: normal;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.65;
}

.auth-legal-consent a {
  color: var(--studio-ink);
  text-decoration: none;
}

.auth-legal-consent a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.topbar-user {
  max-width: 140px;
  overflow: hidden;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-trigger {
  width: 34px;
  height: 34px;
}

.docs-trigger,
.briefs-trigger {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.docs-trigger:hover,
.docs-trigger:focus-visible,
.briefs-trigger:hover,
.briefs-trigger:focus-visible {
  border-color: var(--studio-line);
  background: var(--studio-panel-soft);
  color: var(--studio-ink);
  outline: none;
}

.docs-trigger .el-icon,
.briefs-trigger .el-icon {
  font-size: 15px;
}

.briefs-trigger {
  border-color: var(--studio-line-soft);
  background: #ffffff;
  cursor: pointer;
}

.el-popper.announcement-popover {
  max-width: calc(100vw - 24px);
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--studio-line);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
}

.announcement-popover-panel {
  background: #ffffff;
}

.announcement-popover-header,
.announcement-popover-footer,
.announcement-popover-item-head,
.announcement-popover-actions {
  display: flex;
  align-items: center;
}

.announcement-popover-header {
  min-height: 54px;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid var(--studio-line-soft);
}

.announcement-popover-header > div:first-child {
  display: grid;
  gap: 2px;
}

.announcement-popover-header strong {
  color: var(--studio-ink);
  font-size: 14px;
}

.announcement-popover-header span,
.announcement-popover-item time,
.announcement-popover-empty span,
.announcement-popover-loading {
  color: var(--studio-muted);
  font-size: 11px;
}

.announcement-popover-actions {
  gap: 2px;
}

.announcement-popover-actions .el-button {
  width: 28px;
  height: 28px;
  margin: 0;
}

.announcement-popover-list {
  max-height: min(420px, 58vh);
  padding: 6px;
  overflow-y: auto;
}

.announcement-popover-item {
  position: relative;
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--studio-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.announcement-popover-item + .announcement-popover-item {
  border-top: 1px solid var(--studio-line-soft);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.announcement-popover-item:hover,
.announcement-popover-item:focus-visible,
.announcement-popover-item.unread {
  background: #f7f7f8;
}

.announcement-popover-item:focus-visible {
  outline: 2px solid #a3a3a3;
  outline-offset: -2px;
}

.announcement-popover-item-head {
  min-width: 0;
  gap: 7px;
}

.announcement-popover-item-head strong {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-popover-item time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.announcement-popover-item p {
  display: -webkit-box;
  margin: 0 0 0 13px;
  overflow: hidden;
  color: #525252;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.announcement-level-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #737373;
}

.announcement-popover-item.level-success .announcement-level-dot { background: #16a34a; }
.announcement-popover-item.level-warning .announcement-level-dot { background: #d97706; }
.announcement-popover-item.level-critical .announcement-level-dot { background: #dc2626; }

.announcement-popover-item .unread-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
}

.announcement-popover-empty,
.announcement-popover-loading {
  min-height: 108px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 18px;
  text-align: center;
}

.announcement-popover-empty .el-icon,
.announcement-popover-loading .el-icon {
  color: #a3a3a3;
  font-size: 22px;
}

.announcement-popover-empty strong {
  color: #404040;
  font-size: 13px;
}

.announcement-popover-footer {
  min-height: 42px;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-top: 1px solid var(--studio-line-soft);
}

.announcement-popover-footer .el-button {
  margin: 0;
  font-size: 12px;
}

.announcement-manager-dialog .el-dialog__body {
  padding: 16px 18px 20px;
}

.announcement-manager-list {
  max-height: min(610px, 65vh);
  padding-right: 4px;
  overflow-y: auto;
}

.announcement-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 24px 12px;
}

.announcement-banner .el-alert {
  flex: 1;
}

.admin-card,
.announcement-card {
  border-color: #e2e8f0;
}

.card-header-row,
.card-header-actions,
.announcement-toolbar,
.announcement-head,
.announcement-title-row,
.announcement-tags,
.announcement-footer,
.table-actions,
.user-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header-row,
.announcement-toolbar,
.announcement-head,
.announcement-footer {
  justify-content: space-between;
}

.card-header-row h3,
.card-header-row p,
.announcement-title-row h3,
.announcement-toolbar strong,
.announcement-toolbar span {
  margin: 0;
}

.card-header-row p,
.announcement-toolbar span,
.announcement-footer {
  color: #64748b;
  font-size: 13px;
}

.card-header-actions .el-input {
  width: 240px;
}

.table-actions {
  flex-wrap: wrap;
}

.user-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.user-table-actions .el-button + .el-button {
  margin-left: 0;
}

.user-table-actions .el-dropdown .el-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.user-action-column .cell {
  overflow: visible;
}

.user-name-cell {
  justify-content: flex-start;
}

.form-two-columns,
.form-three-columns {
  display: grid;
  gap: 16px;
}

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

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

.announcement-toolbar {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.announcement-toolbar > div:first-child {
  display: grid;
  gap: 3px;
}

.announcement-list {
  display: grid;
  gap: 14px;
}

.announcement-card {
  position: relative;
  overflow: hidden;
}

.announcement-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #64748b;
  content: "";
}

.announcement-card.level-success::before { background: #16a34a; }
.announcement-card.level-warning::before { background: #d97706; }
.announcement-card.level-critical::before { background: #dc2626; }
.announcement-card.unread { box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); }
.announcement-card.read { opacity: 0.88; }

.announcement-title-row h3 {
  color: #0f172a;
  font-size: 17px;
}

.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
}

.announcement-content {
  color: #334155;
  line-height: 1.75;
}

.announcement-footer {
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
}

@media (max-width: 900px) {
  .card-header-row,
  .announcement-toolbar,
  .announcement-head,
  .announcement-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .card-header-actions {
    flex-wrap: wrap;
  }

  .card-header-actions .el-input,
  .form-two-columns,
  .form-three-columns {
    width: 100%;
    grid-template-columns: 1fr;
  }
}

/* New API inspired visual system: compact, neutral, and content-first. */
.profile-trigger {
  min-width: 0;
  height: 34px;
  padding: 3px 7px 3px 4px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--studio-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.profile-trigger:hover,
.profile-trigger[aria-expanded="true"] {
  border-color: var(--studio-line);
  background: var(--studio-panel-soft);
}

.profile-avatar {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #171717;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.profile-trigger-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.profile-trigger-copy strong,
.profile-trigger-copy small {
  max-width: 110px;
  overflow: hidden;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-trigger-copy strong {
  font-size: 12px;
  font-weight: 650;
}

.profile-trigger-copy small {
  color: var(--studio-muted);
  font-size: 10px;
}

.profile-menu-head {
  min-width: 190px;
  padding: 8px 12px 10px;
  display: grid;
  gap: 3px;
}

.profile-menu-head strong {
  font-size: 13px;
}

.profile-menu-head span {
  color: var(--studio-muted);
  font-size: 11px;
}

.el-dropdown-menu.profile-menu,
.profile-menu.el-dropdown-menu {
  padding: 5px;
  border-radius: 12px;
}

.profile-menu .el-dropdown-menu__item {
  min-height: 32px;
  border-radius: 7px;
  font-size: 12px;
}

.el-button {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.el-button:active:not(:disabled) {
  transform: translateY(1px);
}

.el-button--large {
  min-height: 36px;
  padding: 8px 12px;
}

.el-button.is-circle {
  width: 32px;
  min-height: 32px;
  padding: 0;
}

.el-button--primary:not(.is-link):not(.is-text) {
  border-color: #171717;
  background: #171717;
  color: #ffffff;
}

.el-button--primary:not(.is-link):not(.is-text):hover {
  border-color: #404040;
  background: #404040;
}

.el-input__wrapper,
.el-select__wrapper,
.el-date-editor.el-input__wrapper,
.el-input-number,
.el-textarea__inner {
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--studio-line) inset;
}

.el-input__wrapper,
.el-select__wrapper,
.el-date-editor.el-input__wrapper,
.el-input-number {
  min-height: 32px;
}

.el-input__wrapper:hover,
.el-select__wrapper:hover,
.el-date-editor.el-input__wrapper:hover,
.el-input-number:hover,
.el-textarea__inner:hover {
  box-shadow: 0 0 0 1px #cfcfcf inset;
}

.dense-form .el-form-item__label {
  color: #404040;
  font-size: 12px;
  font-weight: 550;
}

.el-card {
  --el-card-border-radius: 12px;
}

.el-tag {
  border-radius: 6px;
  font-weight: 550;
}

.el-table {
  --el-table-border-color: var(--studio-line-soft);
  --el-table-header-bg-color: #fafafa;
  --el-table-row-hover-bg-color: #f7f7f8;
  overflow: hidden;
  border-radius: 10px;
  font-size: 12px;
}

.el-table th.el-table__cell {
  height: 38px;
  color: #404040;
  font-weight: 600;
}

.el-table td.el-table__cell {
  padding: 8px 0;
}

.el-dialog,
.el-message-box {
  overflow: hidden;
  border: 1px solid var(--studio-line);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
}

.el-dialog__header,
.el-message-box__header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--studio-line-soft);
}

.advanced-settings,
.analysis-submit-bar,
.holdings-list-panel,
.holdings-market-panel,
.holdings-heatmap-panel,
.holding-row,
.holding-dialog-form,
.announcement-toolbar {
  border-radius: 12px;
}

.analysis-submit-bar {
  border-color: var(--studio-line);
  background: #fafafa;
}

.model-provider-card.active,
.data-source-preset-card.active,
.news-source-card.active,
.viewpoint-agent-step.running,
.analyst-option.is-checked,
.holding-card:hover {
  border-color: #a3a3a3;
  background: #f7f7f8;
  box-shadow: inset 3px 0 0 #171717;
}

.model-provider-card:hover,
.data-source-preset-card:hover,
.news-source-card:hover,
.analyst-option:hover,
.agent-chip:hover,
.agent-chip:focus-visible {
  border-color: #d4d4d4;
  background: #fafafa;
}

.model-provider-card.selected,
.news-source-card.selected {
  border-color: #737373;
  box-shadow: inset 3px 0 0 #171717, 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.today-news-card a {
  color: #404040;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.backtest-latest-strategy {
  border-color: #d4d4d4;
  background: #f7f7f8;
  color: #404040;
}

.backtest-latest-strategy strong {
  color: #171717;
}

.auth-shell {
  background: #f7f7f8;
}

.auth-card {
  gap: 18px;
  padding: 28px;
  border-color: var(--studio-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.announcement-toolbar,
.announcement-card,
.admin-card {
  border-color: var(--studio-line);
}

.announcement-banner {
  margin: 0 0 12px;
}

.announcement-card.unread {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.unread-dot {
  background: #171717;
}

.task-center-card {
  border: 1px solid var(--studio-line-soft);
  border-radius: 14px;
}

.task-center-header > div:first-child,
.task-center-subject,
.task-center-owner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.task-center-header > div:first-child span,
.task-center-subject span,
.task-center-owner span {
  color: var(--studio-muted);
  font-size: 12px;
}

.task-center-subject strong,
.task-center-owner strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-center-subject .text-danger,
.mobile-task-card .text-danger {
  color: #c62828;
  line-height: 1.45;
}

.task-center-scope-alert {
  margin-bottom: 14px;
}

.task-center-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.task-center-toolbar .el-select {
  width: 180px;
}

.task-center-table {
  width: 100%;
}

.task-center-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 760px) {
  .docs-trigger {
    display: none;
  }

  .profile-trigger-copy,
  .run-pill > span:last-child {
    display: none;
  }

  .docs-trigger {
    width: 34px;
    justify-content: center;
    padding: 0;
  }

  .docs-trigger span {
    display: none;
  }

  .studio-main {
    padding: 0 12px 12px;
  }

  .task-center-toolbar .el-select {
    width: 100%;
  }

  .model-settings-tabs,
  .model-provider-toolbar {
    width: 100%;
  }

  .model-settings-tabs,
  .model-provider-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .model-settings-tab,
  .model-provider-toolbar > .el-input {
    width: 100%;
    min-width: 0;
  }

  .model-provider-overview,
  .model-provider-summary,
  .model-drawer-model-grid {
    grid-template-columns: 1fr;
  }

  .model-option-list.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .model-drawer-header {
    flex-direction: column;
  }

  .model-entry-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .model-entry-toolbar .el-button {
    width: 100%;
  }

  .model-entry-row {
    grid-template-columns: 28px minmax(0, 1fr) 32px;
  }

  .model-entry-roles {
    grid-column: 2 / -1;
  }

  .model-drawer-scroll,
  .model-config-drawer .el-drawer__header,
  .model-config-drawer .el-drawer__footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .model-key-editor {
    grid-template-columns: 1fr;
  }

  .model-key-editor small {
    grid-column: auto;
  }
}

/* Final phone overrides live last so desktop-system defaults cannot win by source order. */
@media (max-width: 760px) {
  .studio-main {
    padding: 0 12px calc(82px + env(safe-area-inset-bottom));
  }

  .page-actions > .el-tag {
    display: none;
  }

  .el-card {
    --el-card-border-radius: 14px;
  }

  .el-button:not(.is-circle):not(.is-link):not(.is-text) {
    min-height: 44px;
  }

  .el-input__wrapper,
  .el-select__wrapper,
  .el-date-editor.el-input__wrapper,
  .el-input-number {
    min-height: 44px;
  }

  .el-dialog {
    width: 100% !important;
    max-width: none !important;
    max-height: 92dvh;
    margin: 0 !important;
    border-radius: 20px 20px 0 0;
  }

  .auth-shell {
    min-height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  }

  .auth-card {
    gap: 16px;
    padding: 22px;
    border-radius: 18px;
  }

  .auth-brand img {
    width: 44px;
    height: 44px;
  }

  .auth-legal-links {
    flex-wrap: wrap;
  }

  .investment-risk-banner {
    margin: 8px -12px 0;
    padding: 9px 12px;
    grid-template-columns: auto minmax(0, 1fr);
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .investment-risk-banner a {
    grid-column: 2;
    width: fit-content;
  }

  .investment-risk-dialog .el-dialog__body {
    max-height: calc(92dvh - 150px);
    overflow-y: auto;
  }

  .investment-risk-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .profile-trigger,
  .announcement-trigger.el-button.is-circle,
  .run-pill {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .auth-switch .el-button,
  .auth-legal-links a,
  .auth-consent a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .studio-main .el-table,
  .el-dialog .el-table,
  .el-drawer .el-table {
    width: 100%;
    max-width: 100%;
  }

  .el-table .el-scrollbar__wrap {
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }

  .el-table th.el-table__cell,
  .el-table td.el-table__cell {
    padding: 9px 0;
  }

  .el-table .el-button:not(.is-circle):not(.is-link):not(.is-text) {
    min-height: 40px;
  }

  .mobile-user-list {
    gap: 10px;
  }

  .mobile-user-card {
    min-width: 0;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--studio-line);
    border-radius: 14px;
    background: #ffffff;
  }

  .mobile-user-card-head {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .mobile-user-identity {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .mobile-user-identity strong,
  .mobile-user-identity span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-user-identity span,
  .mobile-user-card-meta {
    color: var(--studio-muted);
    font-size: 12px;
  }

  .mobile-user-tags,
  .mobile-user-card-actions .user-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mobile-user-card-actions {
    padding-top: 10px;
    border-top: 1px solid var(--studio-line-soft);
  }

  .mobile-user-card-actions .el-button + .el-button {
    margin-left: 0;
  }

  .mobile-user-card .el-button {
    min-height: 44px;
  }
}
