/* Client dashboard styles — business-oriented, calm.
   Loaded after styles.css so it can override spacing without !important. */

#view-client .client-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 12px 14px; border-bottom: 1px solid var(--border, #e2e8f0);
  background: var(--panel, #f8fafc);
}
#view-client .client-toolbar label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted-fg, #475569);
}
#view-client .client-toolbar select {
  padding: 5px 8px; border-radius: 6px; border: 1px solid var(--border, #cbd5e1);
  background: var(--panel-hi, #fff); color: inherit; font-size: 13px;
}
#view-client .client-toolbar .spacer { flex: 1; }
#view-client .client-toggles { display: inline-flex; gap: 12px; }

#view-client .client-chips { display: inline-flex; gap: 6px; }
#view-client .client-chip {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; cursor: pointer;
  background: var(--panel-hi, #fff); border: 1px solid var(--border, #cbd5e1);
  color: var(--muted-fg, #64748b); user-select: none;
}
#view-client .client-chip.active {
  background: #0ea5e9; border-color: #0284c7; color: #fff;
}

#view-client .client-narrative {
  padding: 18px 20px 8px; border-bottom: 1px solid var(--border, #e2e8f0);
}
#view-client .client-lede {
  font-size: 18px; line-height: 1.45; color: var(--fg, #0f172a);
}
#view-client .client-lede-sub {
  margin-top: 6px; font-size: 13px; color: var(--muted-fg, #475569);
}
#view-client .client-lede-sub .muted { color: var(--muted-fg, #94a3b8); }

#view-client .client-charts-row {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px;
  padding: 14px; align-items: start;
}
@media (max-width: 960px) {
  #view-client .client-charts-row { grid-template-columns: 1fr; }
}
#view-client .client-chart-wrap {
  background: var(--panel, #fff); border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px; padding: 10px 12px;
}
#view-client .client-chart-title {
  font-size: 13px; font-weight: 600; color: var(--fg, #0f172a);
  margin-bottom: 6px;
}
/* Bounded box for each Chart.js canvas. MUST have an explicit height (not
   min-height) — Chart.js responsive mode reads the parent's computed height
   and resizes the canvas to match; if the parent has no height, the canvas
   grows every frame until the grid row fills the viewport. Keep the two
   charts at the same height so the row lines up. */
#view-client .client-chart-box {
  position: relative;
  width: 100%;
  height: 300px;
}
#view-client .client-chart-box > canvas {
  position: absolute; inset: 0;
  width: 100% !important; height: 100% !important;
}

#view-client .client-section-title {
  margin: 18px 14px 2px; font-size: 15px;
}
#view-client .client-section-sub {
  margin: 0 14px 10px; font-size: 12px; color: var(--muted-fg, #64748b);
}
#view-client #client-all-tbl { margin: 0 14px 18px; }

#view-client .client-error {
  color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 6px; padding: 10px 12px; font-size: 13px;
}
