

/* ---------- Cards & section headers ---------- */

html body .card,
html body .app-card {
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--ui-card-shadow);
}

html body .card > .card-header,
html body .card .card-header {
  padding: 0.68rem 0.9rem;
  background: #ffffff;
  border-bottom: 1px solid #eef1f6;
  color: var(--ui-ink);
  font-weight: 600;
}

html body .card > .card-body {
  padding: 0.85rem 0.95rem;
}

html body .compact-card > .card-header {
  padding: 0.6rem 0.85rem;
}

html body .compact-card > .card-body {
  padding: 0.7rem 0.85rem;
}

html[data-theme="dark"] body .card,
html[data-theme="dark"] body .app-card {
  border-color: var(--ui-border);
  background: var(--surface);
}

html[data-theme="dark"] body .card > .card-header,
html[data-theme="dark"] body .card .card-header {
  background: #0e1626;
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

html body .section-heading {
  color: var(--ui-ink);
  font-size: 0.93rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

html body .card-subtitle {
  margin-top: 0.12rem;
  color: var(--ui-muted);
  font-size: 0.78rem;
  font-weight: 400;
}

html body .surface-accent::before {
  height: 2px;
  background: linear-gradient(90deg, #2563eb, #22d3ee 52%, rgba(34, 211, 238, 0) 88%);
}

html body .surface-accent .card-header .section-heading::before {
  top: 0.04em;
  bottom: 0.04em;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, #2563eb, #06b6d4);
}

html body .surface-accent .card-header .section-heading {
  padding-left: 0.55rem;
}

html body .app-panel-card {
  border-color: var(--ui-border);
  background: var(--surface);
  box-shadow: var(--ui-card-shadow);
}

html body .app-panel-card .card-header {
  background: #ffffff;
  border-bottom-color: #eef1f6;
}

html[data-theme="dark"] body .app-panel-card {
  border-color: var(--ui-border);
  background: var(--surface);
}

html[data-theme="dark"] body .app-panel-card .card-header {
  background: #0e1626;
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

/* details/summary cards need a visible affordance */
html body details.card > summary.card-header {
  cursor: pointer;
  list-style: none;
}

html body details.card > summary.card-header::-webkit-details-marker {
  display: none;
}

html body details.card > summary.card-header::after {
  content: "展开";
  margin-left: auto;
  color: var(--ui-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

html body details.card[open] > summary.card-header::after {
  content: "收起";
}

/* ---------- Page hero ---------- */

html body .page-hero {
  border: 1px solid var(--ui-border);
  border-radius: 18px;
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(37, 99, 235, 0.08), transparent 55%),
    linear-gradient(180deg, #ffffff, #fafbff);
  box-shadow: var(--ui-card-shadow);
}

html body .page-hero::after {
  height: 3px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #2563eb, #22d3ee 45%, transparent 82%);
}

html body .page-eyebrow {
  color: var(--ui-accent);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.16em;
}

html body .page-title {
  font-size: clamp(1.2rem, 1.6vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

html body .page-subtitle {
  color: var(--ui-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

html body .hero-tag {
  border-color: var(--ui-border);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ui-text);
  font-size: 0.72rem;
  font-weight: 500;
}

html body .hero-tag--warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

html body .hero-tag .status-dot {
  width: 6px;
  height: 6px;
}

html[data-theme="dark"] body .hero-tag--warn {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

html[data-theme="dark"] body .page-hero {
  border-color: var(--ui-border);
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(59, 130, 246, 0.16), transparent 55%),
    linear-gradient(180deg, #101a2b, #0c1422);
}

html[data-theme="dark"] body .hero-tag {
  border-color: var(--ui-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ui-text);
}

/* ---------- Dashboard summary strip ---------- */

html body .dashboard-shell-card > .card-header {
  padding: 0.8rem 1rem;
}

html body .dashboard-shell-card > .card-body {
  padding: 0.8rem 0.85rem 0.9rem;
}

html body .dashboard-shell-card .summary-strip {
  gap: 0.7rem;
}

html body .dashboard-shell-card .summary-strip__item,
html body .dashboard-shell-card .summary-strip__item--asset {
  min-height: 108px;
  padding: 0.85rem 0.9rem;
  border: 1px solid #e8ecf3;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

html body .dashboard-shell-card .summary-strip__item--asset {
  border-color: #dce7fb;
  background: linear-gradient(135deg, #eef5ff 0%, #ffffff 62%);
}

html body .dashboard-shell-card .summary-strip__label {
  color: var(--ui-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
}

html body .dashboard-shell-card .summary-strip__item > .summary-strip__label::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 0.42rem;
  border-radius: 50%;
  background: #93c5fd;
  vertical-align: 0.12em;
}

html body .dashboard-shell-card .summary-strip__item--asset > .summary-strip__label::before {
  background: var(--ui-accent);
}

html body .dashboard-shell-card .summary-strip__item--perf-week > .summary-strip__label::before {
  background: #0d9488;
}

html body .dashboard-shell-card .summary-strip__item--perf-combined > .summary-strip__label::before {
  background: #d97706;
}

html body .dashboard-shell-card .summary-strip__item--nav-desktop > .summary-strip__label::before {
  background: #7c3aed;
}

html body .dashboard-shell-card .summary-strip__value {
  margin-top: 0.3rem;
  color: #0b1220;
  font-family: var(--ui-font-sans);
  font-size: clamp(1.25rem, 1.9vw, 1.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

html body .dashboard-shell-card .summary-strip__item--asset .summary-strip__value {
  font-size: clamp(1.4rem, 2.1vw, 1.95rem);
  letter-spacing: -0.025em;
}

html body .dashboard-shell-card .summary-strip__returns-line {
  font-size: clamp(1rem, 1.45vw, 1.32rem);
  letter-spacing: -0.01em;
}

html body .dashboard-shell-card .metric-tile__sub {
  margin-top: 0.42rem;
  color: var(--ui-subtle);
  font-size: 0.72rem;
  line-height: 1.35;
}

html body .dashboard-updated-at {
  color: var(--ui-subtle);
  font-family: var(--mono-font);
  font-size: 0.72rem;
  font-weight: 500;
}

html[data-theme="dark"] body .dashboard-shell-card .summary-strip__item {
  border-color: rgba(148, 163, 184, 0.16);
  background: #0f1929;
}

html[data-theme="dark"] body .dashboard-shell-card .summary-strip__item--asset {
  border-color: rgba(96, 165, 250, 0.25);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(15, 25, 41, 0.6) 62%);
}

html[data-theme="dark"] body .dashboard-shell-card .summary-strip__value {
  color: #f5f9ff;
}

html[data-theme="dark"] body .dashboard-shell-card .metric-tile__sub {
  color: #8b9bb4;
}

/* Summary strips on other pages (live signals etc.) */
html body .summary-strip__item {
  border-color: var(--ui-border);
  border-radius: 14px;
  background: var(--surface);
}

html[data-theme="dark"] body .summary-strip__item--asset {
  border-color: rgba(96, 165, 250, 0.22);
}

/* ---------- Positions account strip ---------- */

html body .metric-tile {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

html body .metric-tile__label {
  color: var(--ui-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

html body .metric-tile__value {
  margin-top: 0.28rem;
  color: var(--ui-ink);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

html body .metric-tile__sub {
  margin-top: 0.3rem;
  color: var(--ui-subtle);
  font-size: 0.72rem;
}

html[data-theme="dark"] body .metric-tile {
  border-color: var(--ui-border);
  background: #0f1929;
}

html[data-theme="dark"] body .metric-tile__value {
  color: #f5f9ff;
}

html[data-theme="dark"] body .metric-tile__label,
html[data-theme="dark"] body .metric-tile__sub {
  color: #8b9bb4;
}

html body .positions-account-strip {
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--ui-card-shadow);
}

html body .positions-account-item {
  padding: 0.7rem 0.8rem;
  border-right: 1px solid #f1f4f8;
}

html body .positions-account-label {
  color: var(--ui-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

html body .positions-account-value {
  margin-top: 0.24rem;
  color: var(--ui-ink);
  font-family: var(--ui-font-sans);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

html body .positions-account-sub {
  color: var(--ui-subtle);
  font-size: 0.68rem;
  font-weight: 500;
}

html[data-theme="dark"] body .positions-account-item {
  border-right-color: rgba(148, 163, 184, 0.10);
}