/* Phase 5B Production Dashboard — extends picks.css + Bootstrap 5 */
.dash-body .picks-shell {
  max-width: 1280px;
}

.dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dash-header h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: 0.02em;
}

.dash-header-meta {
  font-size: 0.85rem;
  color: var(--mubin-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.dash-header-meta strong {
  color: var(--mubin-ink);
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.dash-refresh-hint {
  font-size: 0.78rem;
  color: var(--mubin-muted);
}

.dash-state {
  border-radius: var(--mubin-radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--mubin-line);
  background: rgba(255, 255, 255, 0.88);
}

.dash-state--loading { color: var(--mubin-muted); }
.dash-state--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.dash-state--empty {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.dash-grid-health {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.85rem;
}

.dash-card {
  background: var(--mubin-card);
  border: 1px solid var(--mubin-line);
  border-radius: calc(var(--mubin-radius) - 4px);
  padding: 0.95rem 1rem;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dash-card h3 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mubin-muted);
}

.dash-card-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.15;
  margin: 0;
}

.dash-card-sub {
  font-size: 0.78rem;
  color: var(--mubin-muted);
  margin: 0;
  line-height: 1.35;
}

.dash-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: fit-content;
}

.dash-status--ok { background: #dcfce7; color: #166534; }
.dash-status--degraded { background: #fef3c7; color: #92400e; }
.dash-status--error { background: #fee2e2; color: #991b1b; }
.dash-status--neutral { background: #e2e8f0; color: #334155; }
.dash-status--empty { background: #f1f5f9; color: #64748b; }

.dash-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.dash-badge--buy { background: #dcfce7; color: #166534; }
.dash-badge--watch { background: #fef3c7; color: #92400e; }
.dash-badge--weak { background: #e2e8f0; color: #475569; }
.dash-badge--avoid { background: #fee2e2; color: #991b1b; }
.dash-badge--neutral { background: #f1f5f9; color: #64748b; }

.dash-panel {
  background: var(--mubin-card);
  border: 1px solid var(--mubin-line);
  border-radius: var(--mubin-radius);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.dash-panel h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.dash-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem 1rem;
  margin: 0;
}

.dash-kv {
  font-size: 0.82rem;
}

.dash-kv dt {
  margin: 0;
  color: var(--mubin-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-kv dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
  word-break: break-word;
}

.dash-table-wrap {
  overflow-x: auto;
  max-height: min(60vh, 560px);
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin: 0;
}

.dash-table th,
.dash-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--mubin-line);
  text-align: left;
  white-space: nowrap;
}

.dash-table--sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mubin-muted);
  background: #f8fafc;
}

.dash-table td.num,
.dash-table th.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.dash-row-clickable {
  cursor: pointer;
}

.dash-row-clickable:hover,
.dash-row-clickable:focus {
  background: rgba(15, 23, 42, 0.04);
  outline: none;
}

.dash-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dash-empty,
.dash-inline-error {
  font-size: 0.88rem;
  padding: 0.75rem 0.9rem;
  border-radius: calc(var(--mubin-radius) - 4px);
  margin-bottom: 0.75rem;
}

.dash-empty {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.dash-inline-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.dash-page-label {
  font-size: 0.8rem;
  color: var(--mubin-muted);
  min-width: 5.5rem;
  text-align: center;
}

.dash-select {
  width: auto;
  min-width: 9rem;
}

.dash-offcanvas {
  width: min(420px, 100vw);
}

.dash-footnote {
  font-size: 0.75rem;
  color: var(--mubin-muted);
  margin: 0.5rem 0 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .dash-header {
    flex-direction: column;
  }
  .dash-table {
    font-size: 0.78rem;
  }
  .dash-table-wrap {
    max-height: 50vh;
  }
}
