/* Customer overview styles loaded on demand */

.customer-overview-screen {
  display: grid;
  gap: 14px;
  padding-bottom: 12px;
}

.customer-overview-top-grid,
.customer-overview-bottom-grid {
  display: grid;
  gap: 14px;
}

.customer-overview-top-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  align-items: stretch;
}

.customer-overview-bottom-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
}

.customer-overview-screen .customer-card {
  border-color: rgba(121, 195, 184, 0.28);
  box-shadow:
    0 14px 28px rgba(1, 8, 10, 0.32),
    inset 0 1px 0 rgba(170, 236, 226, 0.06);
}

.customer-overview-loading-card {
  min-height: 220px;
}

.customer-overview-portfolio-card,
.customer-overview-market-card,
.customer-overview-holdings-card,
.customer-overview-activity-card {
  display: grid;
  gap: 14px;
}



.customer-overview-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.customer-overview-head-copy {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.customer-overview-head-copy h3,
.customer-overview-head-copy h4 {
  margin: 0;
  font-family: "Fraunces", "Palatino Linotype", serif;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: #eff7f4;
}

.customer-overview-head-copy h3 {
  font-size: clamp(26px, 6vw, 40px);
  max-width: 14ch;
}

.customer-overview-head-copy h4 {
  font-size: clamp(22px, 4.2vw, 32px);
}

.customer-overview-intro,
.customer-overview-market-note {
  margin: 0;
  color: #c9ded8;
  font-size: 14px;
  line-height: 1.5;
}

.customer-overview-meta-pills {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-overview-meta-pill,
.customer-overview-section-badge,
.customer-overview-order-status-pill,
.customer-overview-order-side-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}


.customer-overview-portfolio-total {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.customer-overview-portfolio-total strong {
  font-family: "Fraunces", "Palatino Linotype", serif;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: #f4faf6;
}

.customer-overview-portfolio-total span {
  padding-bottom: 8px;
  color: #cfe2dc;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-overview-valuation-note {
  margin: 0;
  max-width: 70ch;
  color: #c5ddd7;
  font-size: 14px;
  line-height: 1.5;
}

.customer-overview-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.customer-overview-summary-card,
.customer-overview-holding-metric,
.customer-overview-market-stat,
.customer-overview-market-foot-item,
.customer-overview-activity-strip-item {
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.customer-overview-summary-card span,
.customer-overview-holding-metric span,
.customer-overview-market-stat span,
.customer-overview-market-foot-item span,
.customer-overview-activity-strip-item span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-overview-summary-card strong,
.customer-overview-holding-metric strong,
.customer-overview-market-stat strong,
.customer-overview-market-foot-item strong,
.customer-overview-activity-strip-item strong {
  font-size: 18px;
  line-height: 1.2;
}

.customer-overview-summary-card small,
.customer-overview-holding-metric small,
.customer-overview-market-stat small,
.customer-overview-activity-strip-item small {
  color: #b8d3cd;
  font-size: 12px;
  line-height: 1.45;
}

.customer-overview-primary-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
}

.customer-overview-primary-action {
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid var(--belora-theme-border-soft);
  background: var(--belora-theme-chip-gradient);
  color: var(--belora-theme-text);
  font-weight: 600;
  box-shadow: none;
}

.customer-overview-primary-action:hover,
.customer-overview-primary-action:focus-visible {
  border-color: var(--belora-theme-border-strong);
  background: var(--app-chip-hover-bg);
  color: var(--app-chip-hover-text);
}

.customer-overview-primary-action.is-primary {
  border-color: var(--belora-theme-border-strong);
  background: var(--belora-theme-chip-active-gradient);
  color: var(--belora-theme-text-strong);
  box-shadow: 0 0 0 1px rgba(111, 248, 255, 0.1), 0 0 20px rgba(103, 245, 255, 0.08);
}

.customer-overview-market-spot {
  border: 1px solid rgba(122, 197, 186, 0.24);
  border-radius: 18px;
  background: rgba(7, 29, 31, 0.68);
  padding: 16px 16px 14px;
  display: grid;
  gap: 4px;
}

.customer-overview-market-spot span,
.customer-overview-market-spot small {
  color: #c5dde5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-overview-market-spot strong {
  color: #f3fbff;
  font-family: "Fraunces", "Palatino Linotype", serif;
  font-size: clamp(36px, 4.2vw, 52px);
  line-height: 0.92;
}

.customer-overview-market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.customer-overview-market-stat.is-ask {
  border-color: rgba(226, 192, 109, 0.34);
  background: rgba(47, 38, 18, 0.48);
}

.customer-overview-market-stat.is-bid {
  border-color: rgba(119, 218, 203, 0.34);
  background: rgba(11, 46, 43, 0.54);
}

.customer-overview-market-stat.is-spread {
  border-color: rgba(123, 168, 196, 0.34);
  background: rgba(15, 44, 51, 0.56);
}

.customer-overview-market-foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-overview-holdings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.customer-overview-activity-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-overview-order-list {
  display: grid;
  gap: 8px;
}

.customer-overview-order-item {
  border: 1px solid var(--belora-theme-border-soft);
  border-radius: 16px;
  background: var(--belora-theme-card-gradient);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.customer-overview-order-item-buy {
  border-color: rgba(126, 208, 165, 0.34);
  box-shadow: inset 3px 0 0 rgba(102, 188, 147, 0.38);
}

.customer-overview-order-item-sell {
  border-color: rgba(225, 151, 131, 0.34);
  box-shadow: inset 3px 0 0 rgba(194, 98, 77, 0.4);
}

.customer-overview-order-item-other {
  border-color: rgba(123, 168, 196, 0.34);
  box-shadow: inset 3px 0 0 rgba(107, 153, 181, 0.38);
}

.customer-overview-order-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.customer-overview-order-id-row,
.customer-overview-order-product,
.customer-overview-order-meta-row,
.customer-overview-order-rate,
.customer-overview-order-total,
.customer-overview-order-note,
.customer-overview-empty-state p,
.customer-overview-empty-state small {
  margin: 0;
}

.customer-overview-order-id-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-overview-order-id-row strong {
  color: #eff7f4;
  font-size: 14px;
}

.customer-overview-order-product {
  color: #d7ebe6;
  font-size: 13px;
  line-height: 1.4;
}

.customer-overview-order-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #b8d3cd;
  font-size: 12px;
  line-height: 1.45;
}

.customer-overview-order-values {
  min-width: 120px;
  display: grid;
  gap: 4px;
  text-align: right;
  align-content: start;
}

.customer-overview-order-rate {
  color: #cbe2dc;
  font-size: 13px;
}

.customer-overview-order-total {
  color: #f4e2aa;
  font-size: 17px;
  font-weight: 700;
}

.customer-overview-order-note,
.customer-overview-empty-state small {
  color: var(--belora-theme-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.customer-overview-empty-state {
  border: 1px dashed var(--belora-theme-border-soft);
  border-radius: 16px;
  background: var(--belora-theme-card-gradient);
  padding: 16px;
  display: grid;
  gap: 5px;
}

.customer-overview-empty-state p {
  color: var(--belora-theme-text);
  font-size: 14px;
  font-weight: 700;
}


@media (max-width: 1180px) {
  .customer-overview-top-grid,
  .customer-overview-bottom-grid {
    grid-template-columns: 1fr;
  }

  .customer-overview-summary-grid,
  .customer-overview-holdings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .customer-overview-card-head,
  .customer-overview-section-head {
    display: grid;
    gap: 8px;
  }

  .customer-overview-meta-pills {
    justify-content: flex-start;
  }

  .customer-overview-primary-actions,
  .customer-overview-market-grid,
  .customer-overview-market-foot,
  .customer-overview-activity-strip {
    grid-template-columns: 1fr;
  }

  .customer-overview-summary-grid,
  .customer-overview-holdings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-overview-portfolio-total strong {
    font-size: clamp(40px, 12vw, 58px);
  }

  .customer-overview-market-spot strong {
    font-size: clamp(34px, 10vw, 48px);
  }

  .customer-overview-order-item {
    grid-template-columns: 1fr;
  }

  .customer-overview-order-values {
    min-width: 0;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .customer-overview-screen,
  .customer-overview-top-grid,
  .customer-overview-bottom-grid {
    gap: 12px;
  }

  .customer-overview-screen .customer-card {
    padding: 12px;
  }

  .customer-overview-portfolio-card,
  .customer-overview-market-card,
  .customer-overview-holdings-card,
  .customer-overview-activity-card {
    gap: 12px;
  }

  .customer-overview-card-head {
    gap: 6px;
  }

  .customer-overview-head-copy {
    gap: 4px;
  }

  .customer-overview-intro,
  .customer-overview-market-note,
  .customer-overview-valuation-note {
    font-size: 13px;
    line-height: 1.42;
  }

  .customer-overview-meta-pills {
    gap: 6px;
  }

  .customer-overview-portfolio-total {
    gap: 8px;
  }

  .customer-overview-portfolio-total strong {
    font-size: clamp(30px, 10vw, 40px);
  }

  .customer-overview-head-copy h3 {
    font-size: 28px;
  }

  .customer-overview-head-copy h4 {
    font-size: 22px;
  }

  .customer-overview-summary-grid,
  .customer-overview-holdings-grid {
    grid-template-columns: 1fr;
  }

  .customer-overview-primary-actions {
    grid-template-columns: 1fr;
  }

  .customer-overview-portfolio-total span {
    padding-bottom: 0;
    font-size: 0.8rem;
  }

  .customer-overview-meta-pill,
  .customer-overview-section-badge,
  .customer-overview-order-status-pill,
  .customer-overview-order-side-pill {
    min-height: 26px;
    padding: 0 9px;
    font-size: 10px;
  }

  .customer-overview-order-item {
    padding: 10px;
  }

  .customer-overview-order-total {
    font-size: 16px;
  }

  .customer-overview-screen > :last-child {
    margin-bottom: 28px;
  }
}

/* Unified customer overview hard override */
.customer-overview-screen .customer-card {
  border-color: var(--belora-theme-border);
  box-shadow:
    var(--belora-theme-shadow),
    inset 0 1px 0 rgba(190, 255, 243, 0.06);
}

.customer-overview-portfolio-card,
.customer-overview-market-card,
.customer-overview-holdings-card,
.customer-overview-activity-card {
  background: var(--belora-theme-hero-gradient);
}

.customer-overview-summary-card,
.customer-overview-holding-metric,
.customer-overview-market-stat,
.customer-overview-market-foot-item,
.customer-overview-activity-strip-item {
  border-color: var(--belora-theme-border-soft);
  background: var(--belora-theme-card-gradient);
}

.customer-overview-head-copy h3,
.customer-overview-head-copy h4,
.customer-overview-portfolio-total strong,
.customer-overview-market-spot strong,
.customer-overview-order-total,
.customer-overview-order-item p strong,
.customer-overview-summary-card strong,
.customer-overview-holding-metric strong,
.customer-overview-market-stat strong,
.customer-overview-market-foot-item strong,
.customer-overview-activity-strip-item strong {
  color: var(--belora-theme-text);
}

.customer-overview-intro,
.customer-overview-market-note,
.customer-overview-valuation-note,
.customer-overview-portfolio-total span,
.customer-overview-order-note,
.customer-overview-order-rate,
.customer-overview-order-meta-row,
.customer-overview-market-foot-item small,
.customer-overview-activity-strip-item small,
.customer-overview-summary-card span,
.customer-overview-holding-metric span,
.customer-overview-market-stat span {
  color: var(--belora-theme-text-muted);
}

.customer-overview-meta-pill,
.customer-overview-section-badge,
.customer-overview-order-status-pill,
.customer-overview-order-side-pill {
  border-color: var(--belora-theme-border-soft);
  background: var(--belora-theme-chip-gradient);
  color: var(--belora-theme-text);
}

.customer-overview-meta-pill.is-live,
.customer-overview-order-status-pill.is-good,
.customer-overview-order-side-pill-buy {
  border-color: rgba(143, 227, 176, 0.34);
  background: rgba(18, 62, 44, 0.84);
  color: var(--belora-theme-green);
}

.customer-overview-meta-pill.is-paused,
.customer-overview-order-status-pill.is-bad,
.customer-overview-order-side-pill-sell {
  border-color: rgba(255, 180, 168, 0.36);
  background: var(--app-danger-surface-bg);
  color: var(--belora-theme-danger);
}

.customer-overview-meta-pill.is-estimate,
.customer-overview-order-status-pill.is-pending {
  border-color: rgba(255, 214, 107, 0.32);
  background: rgba(72, 55, 18, 0.82);
  color: var(--belora-theme-gold);
}

.customer-overview-meta-pill.is-neutral,
.customer-overview-meta-pill.is-muted,
.customer-overview-order-status-pill.is-neutral,
.customer-overview-order-side-pill-other,
.customer-overview-section-badge {
  border-color: rgba(111, 248, 255, 0.28);
  background: rgba(10, 45, 64, 0.82);
  color: var(--belora-theme-cyan);
}


/* Overview market surface normalization */
.customer-overview-market-spot {
  border-color: var(--belora-theme-border-soft);
  background: var(--belora-theme-hero-gradient);
  box-shadow: inset 0 1px 0 rgba(190, 255, 243, 0.04);
}

.customer-overview-market-spot span,
.customer-overview-market-spot small {
  color: var(--belora-theme-text-muted);
}

.customer-overview-meta-pill.is-live,
.customer-overview-order-status-pill.is-good,
.customer-overview-order-side-pill-buy {
  border-color: var(--app-status-live-border);
  background: var(--app-status-live-bg);
  color: var(--app-status-live-text);
}

.customer-overview-meta-pill.is-paused,
.customer-overview-meta-pill.is-estimate,
.customer-overview-order-status-pill.is-pending {
  border-color: var(--app-status-paused-border);
  background: var(--app-status-paused-bg);
  color: var(--app-status-paused-text);
}

.customer-overview-meta-pill.is-neutral,
.customer-overview-meta-pill.is-muted,
.customer-overview-order-status-pill.is-neutral,
.customer-overview-order-side-pill-other,
.customer-overview-section-badge {
  border-color: var(--belora-theme-border-soft);
  background: var(--app-pill-bg);
  color: var(--belora-theme-cyan);
}


/* Light mode market stat tone cleanup */
body.theme-light .customer-overview-market-stat.is-ask {
  border-color: rgba(170, 122, 27, 0.24);
  background: rgba(248, 237, 211, 0.96);
}

body.theme-light .customer-overview-market-stat.is-bid {
  border-color: rgba(59, 139, 102, 0.24);
  background: rgba(223, 242, 232, 0.96);
}

body.theme-light .customer-overview-market-stat.is-spread {
  border-color: rgba(91, 125, 136, 0.2);
  background: rgba(229, 236, 232, 0.92);
}

body.theme-light .customer-overview-market-stat:is(.is-ask, .is-bid, .is-spread) span,
body.theme-light .customer-overview-market-stat:is(.is-ask, .is-bid, .is-spread) small {
  color: var(--belora-theme-text-muted);
}
