/* Net-worth command-center workspace. */
/* ╔══════════════════════════════════════════════════════════════╗
   ║ Net worth command center                                    ║
   ╚══════════════════════════════════════════════════════════════╝ */
.nw-command-page {
  width: min(100%, 1440px);
  margin: 0 auto;
  color: var(--text-primary);
}
.nw-command-page .is-positive { color: var(--accent-green); }
.nw-command-page .is-negative { color: var(--accent-red); }
.nw-command-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 24px;
  overflow: hidden;
  padding: clamp(24px,3vw,36px);
  border-radius: 22px 22px 0 0;
  background:
    radial-gradient(circle at 88% 6%, rgba(16,185,129,.3), transparent 34%),
    linear-gradient(135deg,#0f172a 0%,#102a2b 58%,#134e4a 100%);
  color: #fff;
  box-shadow: 0 18px 45px -30px rgba(15,23,42,.9);
}
.nw-command-hero::after {
  position: absolute;
  top: -100px;
  right: -65px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.nw-command-main,
.nw-command-actions,
.nw-equation { position: relative; z-index: 1; }
.nw-command-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #99f6e4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.nw-command-kicker span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52,211,153,.12);
}
.nw-command-label { margin-top: 12px; color: #a7b7c8; font-size: 11px; }
.nw-command-value {
  margin-top: 2px;
  font-size: clamp(36px,4.6vw,60px);
  font-weight: 830;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.055em;
  line-height: 1.08;
}
.nw-command-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  color: #94a3b8;
  font-size: 10px;
}
.nw-command-meta .is-positive { color: #6ee7b7; }
.nw-command-meta .is-negative { color: #fda4af; }
.nw-command-actions { display: flex; align-items: flex-start; gap: 8px; }
.nw-command-actions button {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 11px;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  transition: background .16s ease, transform .16s ease;
}
.nw-command-actions button:first-child { border-color: transparent; background: #10b981; }
.nw-command-actions button:hover { transform: translateY(-1px); background: rgba(255,255,255,.14); }
.nw-command-actions button:first-child:hover { background: #059669; }
.nw-equation {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 15px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
}
.nw-equation > div { display: flex; min-width: 0; flex-direction: column; padding: 4px 8px; }
.nw-equation > i { color: #64748b; font-size: 18px; font-style: normal; font-weight: 400; }
.nw-equation span { color: #94a3b8; font-size: 9px; }
.nw-equation strong { overflow: hidden; margin: 3px 0 1px; font-size: 18px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.nw-equation small { color: #64748b; font-size: 8px; }
.nw-equation .is-liability strong { color: #fda4af; }
.nw-equation .is-net strong { color: #6ee7b7; }
.nw-section-nav {
  position: sticky;
  z-index: 90;
  top: 0;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 30px -28px rgba(15,23,42,.5);
  backdrop-filter: blur(16px);
  scrollbar-width: none;
}
.nw-section-nav::-webkit-scrollbar { display: none; }
.nw-section-nav button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.nw-section-nav button:hover { background: var(--bg-input); color: var(--text-primary); }
.nw-section-nav button.on { background: #ecfdf5; color: #047857; }
.nw-section-content { margin-top: 14px; }
.nw-overview-grid { display: grid; gap: 14px; }
.nw-health-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.nw-health-card {
  display: flex;
  min-width: 0;
  min-height: 132px;
  align-items: stretch;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.nw-health-card:hover { border-color: #a7f3d0; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15,23,42,.06); }
.nw-health-label { color: var(--text-secondary); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.nw-health-card > strong { overflow: hidden; margin-top: 8px; font-size: 19px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.nw-health-card > small { min-height: 28px; margin-top: 3px; color: var(--text-secondary); font-size: 9px; line-height: 1.45; }
.nw-health-card > i { overflow: hidden; height: 5px; margin-top: auto; border-radius: 6px; background: var(--bg-input); }
.nw-health-card > i b { display: block; height: 100%; border-radius: inherit; background: #10b981; }
.nw-health-card.risk > strong { color: #be123c; }
.nw-health-card.risk > i b { background: #e11d48; }
.nw-health-card.watch > strong { color: #b45309; }
.nw-health-card.watch > i b { background: #f59e0b; }
.nw-health-card.neutral > i b { background: #64748b; }
.nw-overview-main,
.nw-overview-secondary { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.nw-overview-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-card);
  box-shadow: 0 1px 2px rgba(15,23,42,.025);
}
.nw-overview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 19px; }
.nw-overview-head span { color: #10b981; font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.nw-overview-head h3 { margin-top: 3px; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.nw-overview-head > button {
  min-height: 32px;
  padding: 5px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #047857;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}
.nw-overview-head > button:hover { background: #ecfdf5; }
.nw-asset-stack { display: flex; overflow: hidden; height: 13px; margin-bottom: 17px; border-radius: 10px; background: var(--bg-input); }
.nw-asset-stack i { display: block; height: 100%; }
.nw-asset-mix-list { display: grid; gap: 9px; }
.nw-asset-mix-list > div { display: grid; grid-template-columns: minmax(0,1fr) auto 42px; align-items: center; gap: 8px; }
.nw-asset-mix-list span { display: flex; min-width: 0; align-items: center; gap: 8px; overflow: hidden; color: var(--text-secondary); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.nw-asset-mix-list span i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 3px; }
.nw-asset-mix-list b { font-size: 11px; font-variant-numeric: tabular-nums; }
.nw-asset-mix-list small { color: var(--text-secondary); font-size: 9px; text-align: right; }
.nw-equity-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 12px 13px; border-radius: 11px; background: #ecfdf5; }
.nw-equity-summary span { color: #047857; font-size: 9px; }
.nw-equity-summary strong { color: #065f46; font-size: 12px; }
.nw-cashflow-equation { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 8px; }
.nw-cashflow-equation > div { display: flex; min-width: 0; flex-direction: column; padding: 12px; border-radius: 11px; background: var(--bg-input); }
.nw-cashflow-equation > i { color: var(--text-secondary); font-style: normal; }
.nw-cashflow-equation span { color: var(--text-secondary); font-size: 8px; }
.nw-cashflow-equation strong { overflow: hidden; margin-top: 3px; font-size: 13px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.nw-capacity-usage { margin-top: 18px; }
.nw-capacity-usage > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-secondary); font-size: 9px; }
.nw-capacity-usage strong { color: var(--text-primary); font-size: 10px; }
.nw-capacity-track { overflow: hidden; height: 8px; margin: 7px 0; border-radius: 8px; background: var(--bg-input); }
.nw-capacity-track i { display: block; height: 100%; border-radius: inherit; background: #10b981; }
.nw-capacity-track i.is-risk { background: #e11d48; }
.nw-outflow-breakdown { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--border); }
.nw-outflow-breakdown span { padding: 5px 7px; border-radius: 7px; background: var(--bg-input); color: var(--text-secondary); font-size: 8px; }
.nw-outflow-breakdown b { color: var(--text-primary); font-weight: 750; }
.nw-trend-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-secondary); font-size: 9px; }
.nw-trend-summary strong { font-size: 10px; }
.nw-trend-chart { min-height: 185px; margin-top: 4px; }
.nw-trend-chart svg { width: 100%; height: 190px; overflow: visible; }
.nw-chart-grid { stroke: var(--border); stroke-width: 1; }
.nw-chart-line { fill: none; stroke: #10b981; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; vector-effect: non-scaling-stroke; }
.nw-chart-dot { fill: #10b981; stroke: var(--bg-card); stroke-width: 2; vector-effect: non-scaling-stroke; }
.nw-chart-label { fill: var(--text-secondary); font-size: 9px; font-weight: 650; }
.nw-overview-footnote { color: var(--text-secondary); font-size: 8px; line-height: 1.5; }
.nw-action-list { display: grid; gap: 8px; }
.nw-action-list article { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.nw-action-list article > span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; background: var(--bg-input); color: var(--text-secondary); font-size: 9px; font-weight: 850; }
.nw-action-list article > div { min-width: 0; }
.nw-action-list article strong { font-size: 10px; }
.nw-action-list article p { margin-top: 3px; color: var(--text-secondary); font-size: 9px; line-height: 1.45; }
.nw-action-list article > button { min-height: 31px; padding: 5px 8px; border: 0; border-radius: 8px; background: var(--bg-input); color: var(--text-secondary); cursor: pointer; font-size: 8px; font-weight: 750; }
.nw-action-list article.risk { border-color: rgba(225,29,72,.18); background: rgba(225,29,72,.025); }
.nw-action-list article.risk > span { background: #fff1f2; color: #be123c; }
.nw-action-list article.watch { border-color: rgba(245,158,11,.2); background: rgba(245,158,11,.025); }
.nw-action-list article.watch > span { background: #fffbeb; color: #b45309; }
.nw-action-list article.info > span { background: #eff6ff; color: #2563eb; }
.nw-empty-state { display: flex; min-height: 155px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 20px; color: var(--text-secondary); text-align: center; }
.nw-empty-state > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #ecfdf5; color: #047857; }
.nw-empty-state strong { color: var(--text-primary); font-size: 11px; }
.nw-empty-state p { font-size: 9px; }
.nw-empty-state.is-success > span { color: #047857; }

@container main-content (max-width: 1050px) {
  .nw-health-grid { grid-template-columns: 1fr 1fr; }
  .nw-overview-main,
  .nw-overview-secondary { grid-template-columns: 1fr; }
}

@container main-content (max-width: 760px) {
  .nw-command-hero { grid-template-columns: 1fr; }
  .nw-command-actions { justify-content: flex-start; }
  .nw-equation { grid-template-columns: 1fr auto 1fr auto 1fr; }
  .nw-equation strong { font-size: 14px; }
  .nw-cashflow-equation { grid-template-columns: 1fr; }
  .nw-cashflow-equation > i { display: none; }
}

@media (max-width: 639px) {
  .nw-command-hero { padding: 22px 18px; border-radius: 18px 18px 0 0; }
  .nw-command-value { font-size: 37px; }
  .nw-command-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .nw-equation { grid-template-columns: 1fr; gap: 4px; }
  .nw-equation > div { padding: 9px 10px; border-radius: 9px; background: rgba(255,255,255,.045); }
  .nw-equation > i { display: none; }
  .nw-equation strong { font-size: 16px; }
  .nw-section-nav { top: 0; margin-bottom: 0; padding: 8px; }
  .nw-section-nav button { min-height: 38px; }
  .nw-section-content { margin-top: 10px; }
  .nw-overview-grid { gap: 10px; }
  .nw-health-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .nw-health-card { min-height: 125px; padding: 13px; }
  .nw-health-card > strong { font-size: 16px; }
  .nw-overview-panel { padding: 17px; border-radius: 16px; }
  .nw-overview-head { margin-bottom: 15px; }
  .nw-overview-head h3 { font-size: 15px; }
  .nw-equity-summary { align-items: flex-start; flex-direction: column; }
  .nw-trend-chart svg { height: 170px; }
  .nw-action-list article { grid-template-columns: 25px minmax(0,1fr); }
  .nw-action-list article > button { grid-column: 2; justify-self: start; }
}

