/* Capital overview uses the same source elements and data as the account workspace. */
#appShell .nav-currency-row { display: block; padding: 0; border: 0; border-radius: 0; background: transparent; }
#appShell .sidebar .campaign-nav-item { justify-content: flex-start; }
#appShell .sidebar .campaign-nav-item > span { display: flex; flex: 1; align-items: center; gap: 8px; justify-content: space-between; }
#appShell .sidebar .brand-link { padding: 0; }
#appShell .main > .view-panel { width: 100%; max-width: 1480px; margin-inline: auto; }
#appShell .main > .settings-center { max-width: 1200px; }
#appShell .overview-view { display: block; }
#appShell .mobile-menu-btn span { box-shadow: none; }
#appShell .workspace-capital-grid { margin: 0; }
#appShell .performance-grid { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; overflow: hidden; border: 1px solid var(--workspace-line); border-radius: 12px; background: var(--workspace-surface); }
#appShell .performance-card {
  display: flex; flex-direction: column; grid-column: auto; align-items: flex-start;
  min-width: 0; min-height: 154px; height: auto; padding: 24px; gap: 13px;
  border: 0; border-right: 1px solid var(--workspace-line); border-radius: 0;
  background: var(--workspace-surface); box-shadow: none;
}
#appShell .performance-card:last-child { border-right: 0; }
#appShell .performance-card.performance-primary { background: #eaf3ed; }
#appShell .performance-card > span { min-height: 20px; font-size: 13px; font-weight: 500; line-height: 1.45; }
#appShell .performance-card > strong {
  align-self: auto; max-width: 100%; margin: auto 0 0; font-family: var(--workspace-font);
  font-size: clamp(22px, 2.15vw, 36px); font-weight: 500; line-height: 1.25;
  letter-spacing: -.025em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
#appShell .performance-card > small { align-self: auto; color: var(--workspace-muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
#appShell .workspace-overview-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: stretch; gap: 18px; margin-top: 18px; }
#appShell .workspace-goal {
  display: flex; flex-direction: column; grid-template-columns: none; position: relative;
  min-width: 0; margin: 0; padding: 26px; gap: 26px; overflow: visible;
  border: 1px solid #203e30; border-radius: 12px;
  background: linear-gradient(125deg, #15372a, #0e271e); box-shadow: none;
  color: #f3f1e8; --muted: #b7c8bc;
}
#appShell .workspace-goal::before, #appShell .workspace-goal::after { display: none; }
#appShell .workspace-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; }
#appShell .workspace-section-heading h3 { margin: 4px 0 0; font-size: 20px; line-height: 1.45; font-weight: 600; letter-spacing: .015em; }
#appShell .workspace-section-heading .eyebrow { display: block; font: 500 10px/1.5 Arial, sans-serif; letter-spacing: .16em; }
#appShell .workspace-goal .eyebrow { color: #b4ccb9; }
#appShell .workspace-goal h3 { color: #f3f1e8; font-family: inherit; }
#appShell .workspace-goal .secondary-action {
  flex: 0 0 auto; min-height: 40px; padding: 8px 0 8px 12px; border: 0;
  background: transparent; color: #d5e4d7; font-size: 12px; font-weight: 500;
}
#appShell .workspace-goal .secondary-action:hover { color: #fffefa; background: transparent; text-decoration: underline; text-underline-offset: 5px; }
#appShell .workspace-goal-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
#appShell .workspace-goal-today, #appShell .workspace-goal-month { min-width: 0; }
#appShell .workspace-goal-month { padding-left: 24px; border-left: 1px solid rgb(190 215 197 / 19%); }
#appShell .workspace-goal-label { color: #c3d3c7; font-size: 14px; font-weight: 400; }
#appShell .workspace-goal-amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; margin: 12px 0 20px; }
#appShell .workspace-goal-amount strong {
  max-width: 100%; color: #fffdf4; font: 400 clamp(25px, 2.35vw, 38px)/1.2 var(--workspace-font);
  font-variant-numeric: tabular-nums; letter-spacing: -.025em; overflow-wrap: anywhere;
}
#appShell .workspace-goal-amount > span { color: #c3d3c7; font: 400 13px/1.3 Arial, sans-serif; }
#appShell .workspace-goal-data { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 10px; margin-top: 9px; color: #bed0c3; font-size: 12px; line-height: 1.5; }
#appShell .workspace-goal-data b { max-width: 100%; color: #edf1e8; font-weight: 500; overflow-wrap: anywhere; }
#appShell .workspace-goal .goal-progress-bar { height: 5px; margin-top: 14px; border-radius: 8px; background: rgb(201 222 204 / 18%); overflow: hidden; }
#appShell .workspace-goal .goal-progress-bar span { display: block; height: 100%; border-radius: inherit; background: #a1c6b5; box-shadow: none; transition: width 220ms ease; }
#appShell .workspace-goal-footer { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
#appShell .workspace-goal .goal-status-pill { display: inline-flex; min-height: 28px; padding: 0; gap: 8px; border: 0; background: transparent; color: #d9ba78; }
#appShell .workspace-goal .goal-status-pill b { font-size: 12px; font-weight: 500; line-height: 1.5; }
#appShell .workspace-goal .goal-status-pill i { width: 7px; height: 7px; flex: 0 0 7px; box-shadow: none; }
#appShell .workspace-goal .goal-status-pill[data-goal-status="done"], #appShell .workspace-goal .goal-status-pill[data-goal-status="active"] { color: #a8d2b7; }
#appShell .workspace-goal-details { color: #bdcfc2; font-size: 12px; }
#appShell .workspace-goal-details summary { min-height: 28px; padding: 3px 0; cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 4px; }
#appShell .workspace-goal-details summary::-webkit-details-marker { display: none; }
#appShell .workspace-goal-details[open] { flex: 1 0 100%; }
#appShell .workspace-goal-details > div { padding: 12px 0 0; border-top: 1px solid rgb(190 215 197 / 19%); }
#appShell .workspace-goal-details h4, #appShell .workspace-goal-details p { margin: 0 0 8px; max-width: none; color: #bdcfc2; font-size: 12px; line-height: 1.65; font-weight: 400; }
#appShell .workspace-goal-details .goal-title-line { display: inline; font-size: inherit; line-height: inherit; }
#appShell .workspace-strategy { display: flex; flex-direction: column; min-width: 0; gap: 20px; padding: 26px; }
#appShell .workspace-strategy-rows { display: grid; gap: 0; margin: 0; }
#appShell .workspace-strategy-rows > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--workspace-line); font-size: 13px; }
#appShell .workspace-strategy-rows dt { color: var(--workspace-muted); }
#appShell .workspace-strategy-rows dd { margin: 0; color: var(--workspace-ink); font-weight: 600; overflow-wrap: anywhere; }
#appShell .workspace-strategy-insight strong { display: block; font-size: 14px; font-weight: 500; }
#appShell .workspace-strategy-insight p { margin: 6px 0 0; color: var(--workspace-muted); font-size: 12px; line-height: 1.6; }
#appShell .workspace-text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; color: #3d6451; font-size: 12px; font-weight: 500; text-decoration: none; }
#appShell .workspace-text-link .external-arrow { flex: 0 0 auto; width: 16px; height: 16px; overflow: visible; }
#appShell .workspace-text-link:hover { color: #142b20; text-decoration: underline; text-underline-offset: 4px; }
#appShell .workspace-strategy > .workspace-text-link { margin-top: auto; align-self: flex-start; }
#appShell .workspace-earnings { padding: 20px 26px; margin-top: 18px; }
#appShell .workspace-earnings > .workspace-section-heading { padding-bottom: 12px; border-bottom: 1px solid var(--workspace-line); }
#appShell .workspace-earnings .goal-earning-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 4px; }
#appShell .workspace-earnings .workspace-earnings-caption { margin: 6px 0 0; color: var(--workspace-muted); font-size: 12px; line-height: 1.6; }
#appShell .workspace-earnings .goal-earning-item { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 15px 0; background: transparent; border: 0; border-radius: 0; color: var(--workspace-ink); }
#appShell .workspace-earnings .goal-earning-item + .goal-earning-item { border-top: 1px solid var(--workspace-line); }
#appShell .workspace-earnings .goal-earning-item time { color: var(--workspace-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
#appShell .workspace-earnings .goal-earning-item small { color: var(--workspace-muted); font-size: 12px; }
#appShell .workspace-earnings .goal-earning-item b { color: #285c48; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
#appShell .workspace-empty-record { grid-column: 1 / -1; display: grid; gap: 5px; padding: 12px 0; color: var(--workspace-muted); font-size: 13px; line-height: 1.6; }
#appShell .workspace-empty-record small { font-size: 11px; }
#appShell .workspace-market-details { margin-top: 18px; border: 1px solid var(--workspace-line); border-radius: 14px; background: var(--workspace-surface); }
#appShell .workspace-market-details > summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 76px; padding: 18px 24px; cursor: pointer; list-style: none; }
#appShell .workspace-market-details > summary::-webkit-details-marker { display: none; }
#appShell .workspace-market-details > summary strong { display: block; color: var(--workspace-ink); font-size: 14px; font-weight: 600; }
#appShell .workspace-market-details > summary small { display: block; margin-top: 5px; color: var(--workspace-muted); font-size: 11px; line-height: 1.5; }
#appShell .workspace-details-arrow { font-size: 22px; color: #587d67; }
#appShell .workspace-market-details[open] .workspace-details-arrow { transform: rotate(45deg); }
#appShell .workspace-market-content { padding: 0 20px 20px; }
#appShell .workspace-market-content .metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
#appShell .workspace-market-content .metric { grid-column: auto; min-width: 0; height: auto; min-height: 124px; }
#appShell .workspace-market-content :is(.metric,.reference-panel,.qye-panel,.chart-card) { border: 1px solid var(--workspace-line); border-radius: 12px; background: var(--workspace-surface); box-shadow: none; }
#appShell .workspace-market-content :is(.metric,.reference-panel,.qye-panel,.chart-card)::before { display: none; }
#appShell .workspace-market-content :is(.qye-summary-grid,.reference-summary-grid) { gap: 12px; }
#appShell .workspace-market-content .qye-card { background: var(--workspace-soft); border: 0; box-shadow: none; }
#appShell .workspace-market-content .chart-grid, #appShell .workspace-market-content .market-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
#appShell .workspace-market-content .chart-card { min-width: 0; }
#appShell .workspace-market-content .chart-canvas { width: 100%; }
#appShell .settings-tabs { box-shadow: none; }
#appShell .settings-tab-index { display: none; }
#appShell .settings-account-grid .account-connections-panel, #appShell .settings-account-grid .line-notification-panel { min-height: 0; }
#appShell .account-connection-note { border: 0; padding: 12px 0; background: transparent; font-size: 12px; line-height: 1.65; }
#appShell .language-preference-row { margin-top: 14px; padding-block: 16px 4px; }
#appShell ~ :is(#goalDialog, #goalSuccessDialog, #renewalDialog) :is(.goal-dialog-panel, .goal-success-panel) { border: 1px solid #ced8ce; border-radius: 16px; background: #fafbf7; color: #20372b; box-shadow: 0 24px 70px rgb(9 18 15 / 16%); }
#appShell ~ #goalDialog .goal-dialog-head h3 { font-family: "BrainOff UI", "BrainOff TC", "Segoe UI", "Microsoft JhengHei", sans-serif; font-size: 25px; font-weight: 600; }
#appShell ~ #goalDialog :is(.goal-field > span, .goal-style-picker span, .goal-dialog-note) { font-weight: 500; }
#appShell ~ #goalDialog :is(input, select) { background: #fffefa; border-color: #cdd7cd; border-radius: 10px; font-weight: 400; }
#appShell ~ #goalDialog :is(.primary-action, .secondary-action) { border-radius: 10px; box-shadow: none; font-weight: 600; }
#appShell ~ #goalDialog .primary-action { background: #18382a; color: #f3f1e8; }

@media (min-width: 861px) and (max-width: 1150px) {
  #appShell .performance-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #appShell .performance-card:nth-child(2n) { border-right: 0; }
  #appShell .performance-card:nth-child(-n+2) { border-bottom: 1px solid var(--workspace-line); }
  #appShell .workspace-overview-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  #appShell .workspace-goal-columns { grid-template-columns: 1fr; gap: 22px; }
  #appShell .workspace-goal-month { border-left: 0; border-top: 1px solid rgb(190 215 197 / 19%); padding: 20px 0 0; }
  #appShell .topbar { flex-wrap: wrap; gap: 12px; }
}
@media (max-width: 860px) {
  #appShell .workspace-overview-row { grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
  #appShell .performance-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; }
  #appShell .performance-card:nth-child(2n) { border-right: 0; }
  #appShell .performance-card:nth-child(-n+2) { border-bottom: 1px solid var(--workspace-line); }
  #appShell .performance-card { min-height: 130px; padding: 16px; gap: 10px; }
  #appShell .performance-card > strong { font-size: 26px; }
  #appShell .workspace-goal, #appShell .workspace-strategy { padding: 24px; }
  #appShell .workspace-goal-amount strong { font-size: 36px; }
  #appShell .workspace-earnings { padding: 18px 22px; }
  #appShell .workspace-market-content { padding-inline: 12px; }
  #appShell .workspace-market-content :is(.metric-grid,.chart-grid,.market-grid) { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  #appShell .performance-card { min-height: 124px; padding: 15px 12px; gap: 9px; }
  #appShell .performance-card > span { font-size: 12px; }
  #appShell .performance-card > strong { font-size: clamp(20px,5.5vw,26px); }
  #appShell .performance-card > small { font-size: 11px; }
  #appShell .workspace-goal { gap: 26px; }
  #appShell .workspace-goal-columns { grid-template-columns: 1fr; gap: 24px; }
  #appShell .workspace-goal-month { padding: 24px 0 0; border-left: 0; border-top: 1px solid rgb(190 215 197 / 19%); }
  #appShell .workspace-goal-amount { margin-block: 10px 18px; }
  #appShell .workspace-goal-amount strong { font-size: clamp(34px,10vw,42px); }
  #appShell .workspace-goal-data { font-size: 13px; }
  #appShell .workspace-section-heading h3 { font-size: 19px; }
  #appShell .workspace-earnings .goal-earning-list { grid-template-columns: 1fr; gap: 6px; }
  #appShell .workspace-earnings .goal-earning-item + .goal-earning-item { border-top: 1px solid var(--workspace-line); }
  #appShell .workspace-section-heading { gap: 10px; }
  #appShell .workspace-earnings .workspace-section-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  #appShell .workspace-goal .goal-progress-bar span { transition: none; }
}
@media (max-width: 360px) {
  #appShell .workspace-earnings .goal-earning-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
