/* ---------------------------------------------------------------------------
 * dashboard.css — page-specific styles for the Dashboard template
 * ---------------------------------------------------------------------------
 * Extracted from the former inline <style> block in templates/dashboard.ts
 * (App-Building Bible principle 5 — no inline <style>; principle 17 — no inline
 * style= attributes). Dynamic bar widths/heights/colors that used to be inline
 * are now driven by CSS custom properties (--bar-w, --bar-c, --bar-h) that the
 * dashboard client module sets from data-* attributes.
 * --------------------------------------------------------------------------- */

/* Dashboard grid */
.dash-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}
.dash-left,.dash-right{display:flex;flex-direction:column;gap:20px}

/* Empty state */
.dash-empty{display:flex;align-items:center;justify-content:center;min-height:60vh}
.dash-empty-inner{text-align:center;max-width:480px;padding:40px 24px}
.dash-empty-icon{width:80px;height:80px;border-radius:24px;background:var(--primary-light);
  display:flex;align-items:center;justify-content:center;margin:0 auto 24px}
.dash-empty-title{font-size:22px;font-weight:700;letter-spacing:-.02em;color:var(--ink);margin-bottom:8px}
.dash-empty-desc{font-size:14px;color:var(--muted);line-height:1.6;margin-bottom:24px;text-wrap:pretty}
.dash-empty-actions{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}

/* Pipeline health */
.pipeline-phases{display:flex;flex-direction:column;gap:14px}
.pipeline-phase-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.pipeline-phase-name{font-size:13px;font-weight:500;color:var(--ink)}
.pipeline-phase-count{font-size:13px;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums}
.pipeline-bar-track{height:8px;background:var(--border-light);border-radius:4px;overflow:hidden}
.pipeline-bar-fill{height:100%;border-radius:4px;transition:width .4s ease;width:var(--bar-w,0%);background:var(--bar-c,var(--primary))}
.pipeline-stage-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.pipeline-stage-chip{font-size:11px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--chip-c,var(--muted))}

/* Cadence */
.cadence-legend{display:flex;gap:12px;font-size:11px;color:var(--muted)}
.cadence-legend-item{display:flex;align-items:center;gap:4px}
.cadence-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.cadence-dot-published{background:#059669}
.cadence-chart{display:flex;gap:0;justify-content:space-between}
.cadence-week{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px}
.cadence-bars{height:80px;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:3px}
.cadence-bar{width:14px;border-radius:3px 3px 0 0;transition:height .3s ease;min-height:2px;height:var(--bar-h,0%)}
.cadence-bar-published{background:#059669}
.cadence-label{font-size:11px;color:var(--muted)}
.cadence-count{font-size:11px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}

/* Priority */
.priority-grid{display:flex;flex-direction:column;gap:16px}
.priority-row-header{display:flex;align-items:center;gap:8px;margin-bottom:4px}
.priority-count{font-size:12px;color:var(--muted);font-weight:500}
.priority-bar-track{height:6px;background:var(--border-light);border-radius:3px;overflow:hidden}
.priority-bar-fill{height:100%;border-radius:3px;transition:width .4s ease;width:var(--bar-w,0%);background:var(--bar-c,var(--primary))}

/* Review items */
.review-items-list{display:flex;flex-direction:column;gap:2px}
.review-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;
  border-bottom:1px solid var(--border-light)}
.review-item:last-child{border-bottom:none}
.review-item-main{display:flex;align-items:center;gap:8px;min-width:0;flex:1}
.review-item-title{font-size:13px;font-weight:500;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  transition:color .15s}
.review-item-title:hover{color:var(--primary)}
.review-item-meta{display:flex;align-items:center;gap:8px;flex-shrink:0}
.review-wait{font-size:11px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.review-wait-overdue{color:#DC2626;font-weight:600}

/* Performance tabs */
.perf-tab{padding:4px 10px;border-radius:6px;font-size:12px;font-weight:500;color:var(--muted);transition:all .15s}
.perf-tab:hover{background:var(--border-light);color:var(--ink)}
.perf-tab-active{background:var(--primary-light);color:var(--primary)}

/* Heartbeat */
.heartbeat-list{display:flex;flex-direction:column;gap:0}
.heartbeat-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--border-light)}
.heartbeat-row:last-child{border-bottom:none}
.heartbeat-indicator{width:8px;height:8px;border-radius:50%;background:#059669;flex-shrink:0}
.heartbeat-warn{background:#D97706}
.heartbeat-info{flex:1;min-width:0}
.heartbeat-name{font-size:13px;font-weight:500;color:var(--ink);display:block}
.heartbeat-meta{font-size:11px;color:var(--muted)}
.heartbeat-items{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;flex-shrink:0}

/* Shared small helpers used by dashboard panels */
.dash-empty-icon-svg{color:var(--primary)}
.empty-state-pad{padding:20px}
.dash-viewall{font-size:12px}
.dash-table-title-link{color:var(--ink);text-decoration:none}
.dash-table-pl{padding-left:20px}
.dash-table-pr{padding-right:20px}
.dash-cardbody-flush{padding:0}
.mt-8{margin-top:8px}

/* Responsive */
@media(max-width:1024px){
  .dash-grid{grid-template-columns:1fr}
}
@media(max-width:768px){
  .review-item{flex-direction:column;align-items:flex-start}
  .review-item-meta{padding-left:0}
}
