

/* Dashboard pixel alignment */
.dashboard-title-strip {
  margin-bottom: 0.12rem;
  padding: 0.08rem 0.06rem 0.02rem;
}

.dashboard-title-strip .page-title {
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
  font-size: clamp(2rem, 2.45vw, 2.45rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.dashboard-shell-card {
  border-radius: 14px;
  border-color: #cad8eb;
  background: linear-gradient(180deg, #f8fbff, #f2f7ff);
  box-shadow: 0 8px 24px rgba(25, 56, 105, 0.07);
}

.dashboard-shell-card .card-header {
  padding: 0.42rem 0.62rem;
  background: linear-gradient(180deg, #f6f9ff, #edf4ff);
  border-bottom-color: #cddbef;
}

.dashboard-shell-card .tool-header {
  align-items: center;
}

.dashboard-overview-title {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
}

.dashboard-shell-card .section-heading {
  font-size: 1rem;
  line-height: 1.1;
}

.dashboard-updated-at {
  color: #5f7898;
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1;
}

.dashboard-shell-card .card-body {
  padding: 0.58rem 0.62rem;
}

.dashboard-shell-card .summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.52rem;
  overflow: visible;
}

.dashboard-shell-card .summary-strip__item,
.dashboard-shell-card .summary-strip__item--asset {
  min-width: 0;
  flex: none;
  border-radius: 13px;
  border-color: #ccdbef;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.dashboard-shell-card .summary-strip__item {
  padding: 0.58rem 0.68rem;
  min-height: 94px;
}

.dashboard-shell-card .summary-strip__item--asset {
  padding: 0.64rem 0.72rem;
  min-height: 94px;
}

.dashboard-shell-card .summary-strip__item--asset-with-nav {
  display: none;
}

.dashboard-shell-card .summary-strip__label {
  color: #607b9d;
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-shell-card .summary-strip__value {
  margin-top: 0.22rem;
  font-size: clamp(.62rem, 1.92vw, 1.38rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.dashboard-shell-card .summary-strip__item--asset .summary-strip__value {
  font-family: "SF Pro Display", "DIN Alternate", "PingFang SC", "Segoe UI", sans-serif;
  font-size: clamp(2.3rem, 2.95vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 400;
}

.dashboard-shell-card .summary-strip__item--asset .summary-strip__value--asset-compact {
  font-size: clamp(1.78rem, 2.2vw, 2.2rem);
  letter-spacing: -0.02em;
  font-weight: 500;
}

.dashboard-shell-card .metric-tile__sub {
  margin-top: 0.22rem;
  font-size: 0.8rem;
  color: #6c86a7;
  font-weight: 700;
  line-height: 1.2;
}

.summary-strip__cash-line {
  margin-top: 0.16rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #3f628e;
}

.summary-strip__returns-line {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  font-size: 0.95rem;
  line-height: 1.15;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.summary-strip__returns-sep {
  color: #8aa1be;
}

.summary-strip__returns-title {
  margin-top: 0.24rem;
}

.summary-strip__asset-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.86rem;
  align-items: start;
}

.summary-strip__asset-right {
  text-align: right;
}

.summary-strip__asset-right .summary-strip__label {
  text-align: right;
}

.summary-strip__asset-right .summary-strip__value {
  margin-top: 0.16rem;
  font-size: clamp(1.26rem, 1.58vw, 1.62rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.summary-strip__nav-returns {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  margin-top: 0.18rem;
  white-space: nowrap;
}

.summary-strip__nav-item {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.summary-strip__nav-sep {
  color: #7f97b6;
  font-size: 0.74rem;
  line-height: 1;
}

.dashboard-shell-card .table-wrap {
  border-radius: 12px;
  border: 1px solid #d6e2f3;
  background: #ffffff;
  padding: 0.2rem 0.5rem !important;
}

.dashboard-shell-card .table > :not(caption) > * > * {
  padding: 0.42rem 0.5rem;
}

.dashboard-shell-card .table thead th {
  background: #ebf2fb;
  border-bottom-color: #d4e1f2;
  color: #4f6d92;
  font-size: 0.8rem;
}

.dashboard-shell-card .table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.dashboard-shell-card .panel-scroll {
  max-height: 306px;
}

.dashboard-shell-card .panel-scroll-sm {
  max-height: 306px;
}

.dashboard-panel-card {
  border: 1px solid #d7e2f1;
  border-radius: 12px;
  background: #fbfdff;
  box-shadow: none;
}

.dashboard-panel-card::before {
  display: none;
}

.dashboard-panel-card .card-header {
  padding: 0.42rem 0.58rem;
  background: #edf3fb;
  border-bottom: 1px solid #d6e2f1;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-panel-card .section-heading {
  color: #1f3e64;
  font-size: 0.94rem;
  font-weight: 800;
}

.dashboard-panel-card .card-subtitle {
  color: #5f7b9e;
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-panel-card .card-body {
  padding: 0.44rem 0.52rem;
}

.dashboard-panel-card .tool-header {
  align-items: center;
}

.dashboard-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  min-height: 0;
  color: #49698f;
  font-size: 0.88rem;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
}

.dashboard-action-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-action-link:hover,
.dashboard-action-link:focus-visible {
  color: #2a5d98;
  background: transparent;
  transform: none;
}

.dashboard-action-link:disabled {
  opacity: 0.62;
}

.dashboard-panel-card .table-wrap {
  border: 1px solid #dde7f4;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.16rem 0.38rem !important;
}

.holdings-table-desktop {
  display: block;
}

.holdings-table-mobile {
  display: none;
}

.dashboard-panel-card .table thead th {
  background: #ebf2fb;
  border-bottom-color: #d7e3f2;
  color: #4f6d92;
}

.dashboard-panel-card .table > :not(caption) > * > * {
  padding: 0.4rem 0.46rem;
}

table[data-table-id="backtestJobs"] th[data-col-key="type"],
table[data-table-id="backtestJobs"] td[data-mobile-col="type"] {
  width: 7.5rem;
  max-width: 7.5rem;
}

.job-type-label {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.dashboard-bottom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

@media (max-width: 767.98px) {
  .dashboard-title-strip {
    padding: 0.02rem 0.02rem 0;
  }

  .dashboard-shell-header {
    display: none !important;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: inline !important;
  }

  .dashboard-refresh-action {
    display: none !important;
  }

  .dashboard-shell-card > .card-header,
  .dashboard-panel-card > .card-header,
  .app-panel-card > .card-header {
    background: transparent !important;
    border-bottom: 0 !important;
    padding: 0.52rem 0.56rem 0.28rem;
  }

  .dashboard-shell-card .card-body,
  .dashboard-panel-card .card-body {
    padding-top: 0.36rem;
  }

  .dashboard-overview-title {
    gap: 0.48rem;
  }

  .dashboard-shell-card .section-heading {
    font-size: 1rem;
    line-height: 1.2;
  }

  .dashboard-updated-at {
    font-size: 0.84rem;
    line-height: 1.15;
  }

  .dashboard-shell-card .summary-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .summary-strip__item--asset-desktop,
  .summary-strip__item--perf-week,
  .summary-strip__item--perf-combined,
  .summary-strip__item--nav-desktop {
    display: none;
  }

  .dashboard-shell-card .summary-strip__item--asset-with-nav {
    display: block;
    grid-column: 1 / -1;
  }

  .dashboard-shell-card .summary-strip__item {
    min-height: 84px;
    padding: 0.56rem 0.58rem;
    border-radius: 10px;
  }

  .dashboard-shell-card .summary-strip__item--asset {
    min-height: 92px;
    padding: 0.62rem 0.62rem;
  }

  .summary-strip__asset-layout {
    gap: 0.56rem;
  }

  .dashboard-shell-card .summary-strip__label {
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .dashboard-shell-card .summary-strip__value {
    margin-top: 0.16rem;
    font-size: 1.38rem;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
  }

  .dashboard-shell-card .summary-strip__item--asset .summary-strip__value {
    font-size: 1.94rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
  }

  .dashboard-shell-card .summary-strip__item--asset .summary-strip__value--asset-compact {
    font-size: 1.66rem;
  }

  .summary-strip__cash-line {
    margin-top: 0.14rem;
    font-size: 0.68rem;
  }

  .summary-strip__asset-right .summary-strip__label {
    font-size: 0.68rem;
  }

  .summary-strip__asset-right .summary-strip__value {
    font-size: 1.2rem;
    line-height: 1.08;
  }

  .summary-strip__nav-returns {
    margin-top: 0.14rem;
    gap: 0.12rem;
  }

  .summary-strip__returns-title {
    margin-top: 0.2rem;
  }

  .summary-strip__nav-item,
  .summary-strip__nav-sep {
    font-size: 0.66rem;
  }

  .dashboard-shell-card .metric-tile__sub {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .dashboard-holdings-header {
    flex-wrap: nowrap;
  }

  .dashboard-holdings-header .section-actions {
    width: auto;
    flex-wrap: nowrap;
    gap: 0.32rem;
    margin-left: auto;
  }

  .dashboard-holdings-pnl {
    display: none !important;
  }

  .dashboard-holdings-header .dashboard-action-link {
    font-size: 0.82rem;
  }

  .holdings-table-desktop {
    display: none;
  }

  .holdings-table-mobile {
    display: block;
  }

  .holdings-table-mobile .table > :not(caption) > * > * {
    padding: 0.36rem 0.38rem;
    font-size: 0.78rem;
  }

  .holdings-table-mobile .table thead th {
    font-size: 0.74rem;
  }

  .dashboard-panel-card .table-wrap {
    padding: 0.14rem 0.26rem !important;
  }

  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
    gap: 0.56rem;
  }

  .dashboard-shell-card .card-header,
  .dashboard-shell-card .card-body {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

html[data-theme="dark"] .dashboard-shell-card {
  border-color: rgba(120, 149, 183, 0.5);
  background: linear-gradient(180deg, rgba(15, 27, 42, 0.98), rgba(10, 20, 31, 0.98));
  box-shadow: 0 12px 26px rgba(2, 10, 24, 0.4);
}

html[data-theme="dark"] .dashboard-shell-card .card-header {
  background: linear-gradient(180deg, rgba(24, 39, 58, 0.99), rgba(16, 28, 44, 0.99));
  border-bottom-color: rgba(120, 149, 183, 0.36);
}

html[data-theme="dark"] .dashboard-shell-card .summary-strip__item,
html[data-theme="dark"] .dashboard-shell-card .summary-strip__item--asset {
  border-color: rgba(128, 158, 193, 0.36);
  background: linear-gradient(180deg, rgba(23, 37, 55, 0.98), rgba(16, 28, 43, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .dashboard-shell-card .summary-strip__label,
html[data-theme="dark"] .dashboard-shell-card .metric-tile__sub {
  color: #9fb5d1;
}

html[data-theme="dark"] .dashboard-shell-card .table-wrap {
  border-color: rgba(115, 145, 180, 0.32);
  background: rgba(11, 20, 32, 0.72);
}

html[data-theme="dark"] .dashboard-shell-card .table thead th {
  background: rgba(24, 40, 61, 0.98);
  border-bottom-color: rgba(127, 157, 193, 0.4);
  color: #c6d9f0;
}

html[data-theme="dark"] .dashboard-panel-card {
  border-color: rgba(123, 151, 186, 0.4);
  background: rgba(14, 24, 38, 0.92);
}

html[data-theme="dark"] .dashboard-panel-card .card-header {
  background: rgba(23, 38, 58, 0.96);
  border-bottom-color: rgba(123, 151, 186, 0.32);
}

html[data-theme="dark"] .dashboard-panel-card .section-heading {
  color: #e1edfb;
}

html[data-theme="dark"] .dashboard-panel-card .card-subtitle {
  color: #9fb7d3;
}

html[data-theme="dark"] .dashboard-panel-card .table-wrap {
  border-color: rgba(115, 145, 180, 0.32);
  background: rgba(11, 20, 32, 0.76);
}

html[data-theme="dark"] .dashboard-panel-card .table thead th {
  background: rgba(24, 40, 61, 0.98);
  border-bottom-color: rgba(127, 157, 193, 0.4);
  color: #c6d9f0;
}