/* LFCBD — My Board (E5B): cockpit strip, KPI strip, decision queue,
   my deadlines, team pulse. Loaded after overview.css so its dashboard
   block is superseded; token set per DESIGN.md / E5A app.css. */

/* ---- Needs-attention banner (LFC priority signal) ---- */
.attention-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  background: var(--tint-red);
  border: 1px solid var(--tint-red-line);
  border-left: 4px solid var(--scarlet);
  border-radius: var(--r-md, 6px);
  padding: var(--space-3, 12px) var(--space-4, 16px);
}

.attention-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--scarlet);
  flex: 0 0 auto;
}

.attention-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.attention-title {
  font-family: var(--font-stencil);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--scarlet-deep);
}

.attention-detail {
  font-size: var(--font-secondary, 14px);
  color: var(--text);
}

.attention-link {
  margin-left: auto;
  font-size: var(--font-secondary, 14px);
  font-weight: 600;
  color: var(--scarlet);
  text-decoration: none;
  white-space: nowrap;
}

.attention-link:hover {
  color: var(--scarlet-deep);
  text-decoration: underline;
}

/* ---- Shared chrome ---- */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--space-5, 20px);
}

/* Page heading stays inside the design's 20px cap (KPI numerals and the
   cockpit readouts are the only larger type on the board). */
.board-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.dashboard .card {
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md, 6px);
}

.dashboard-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
}

.dashboard-empty {
  font-size: 13px;
  color: var(--muted);
}

.dashboard-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3, 12px);
  padding: 48px 16px;
  text-align: center;
}

.dashboard-empty-text {
  font-size: 15px;
  color: var(--muted);
}

.dashboard-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4, 16px);
  align-items: start;
}

/* ---- Cockpit strip ---- */
.cockpit {
  display: flex;
  align-items: baseline;
  gap: var(--space-2, 8px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  padding: 0 2px;
}

.cockpit-readout {
  font-weight: 600;
  color: var(--text);
}

.cockpit-readout.cockpit-overdue {
  color: var(--red);
}

.cockpit-sep {
  color: var(--hairline);
}

/* ---- KPI strip (five cards per the approved preview) ---- */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3, 12px);
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
  padding: var(--space-4, 16px);
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md, 6px);
  text-decoration: none;
  color: var(--text);
  min-height: var(--target-min, 44px);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.kpi-card:hover {
  border-color: var(--muted);
  background: var(--raised-2);
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: var(--font-kpi, 26px);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kpi-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi-hot {
  color: var(--amber);
}

.kpi-pursuing {
  color: var(--green);
}

/* ---- Decision queue ---- */
.dq-section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: var(--space-1, 4px) 0 0;
}

.dq-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.dq-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3, 12px);
  min-height: var(--space-10, 40px);
  padding: var(--space-2, 8px) 0;
}

.dq-row + .dq-row {
  border-top: 1px solid var(--hairline);
}

.dq-lamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.lamp {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: currentColor;
  display: inline-block;
  flex: none;
}

.lamp-in-review {
  color: var(--blue);
}

.lamp-pursuing {
  color: var(--green);
}

.lamp-passing {
  color: var(--red);
}

.lamp-label {
  font-size: 12px;
  color: var(--muted);
}

.dq-title {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dq-title:hover {
  text-decoration: underline;
}

.dq-due {
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--muted);
}

.dq-due.due-soon {
  color: var(--amber);
}

.dq-due.due-now {
  color: var(--orange);
  font-weight: 600;
}

.dq-due.overdue {
  color: var(--red);
  font-weight: 600;
}

.dq-no-due {
  font-size: 12px;
  color: var(--muted);
}

.dq-tally {
  font-size: 12px;
  white-space: nowrap;
}

.dq-vote {
  display: flex;
  gap: var(--space-2, 8px);
}

/* Safety orange = the vote action (design contract). */
.dq-vote-btn {
  min-height: var(--target-min, 44px);
  padding: var(--space-2, 8px) 18px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-sm, 4px);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.dq-vote-go {
  background: var(--orange);
  border: 1px solid var(--orange);
  color: #fff;
}

.dq-vote-go:hover {
  opacity: 0.92;
}

.dq-vote-nogo {
  background: transparent;
  border: 1px solid var(--orange);
  color: var(--orange);
}

.dq-vote-nogo:hover {
  background: var(--tint-orange, rgba(255, 79, 31, 0.12));
}

/* The reader's VoteTally fragment swaps into .dq-vote after a vote;
   keep it row-shaped here. */
.dq-vote .vote-tally {
  flex-direction: row;
  align-items: center;
  gap: var(--space-2, 8px);
  background: transparent;
  border: none;
  padding: 0;
}

.dq-vote .vote-buttons {
  display: flex;
  gap: var(--space-2, 8px);
}

/* Admin confirm / send-back forms (neutral grammar — not vote actions). */
.dq-confirm,
.queue-sendback {
  display: flex;
  gap: var(--space-2, 8px);
}

.dq-confirm .btn,
.queue-sendback .btn {
  min-height: var(--target-min, 44px);
  border-radius: var(--r-sm, 4px);
  font-size: 13px;
}

.dq-confirm-go {
  background: var(--raised-2);
  border: 1px solid var(--hairline);
  color: var(--text);
}

.dq-confirm-nogo {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--muted);
}

/* ---- My deadlines ---- */
.deadline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.deadline-row {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  min-height: 36px;
  padding: var(--space-2, 8px) 0;
}

.deadline-row + .deadline-row {
  border-top: 1px solid var(--hairline);
}

.deadline-type {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm, 4px);
  padding: 1px 5px;
  flex: none;
}

.deadline-title {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-title:hover {
  text-decoration: underline;
}

.deadline-due {
  margin-left: auto;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.deadline-due.due-soon {
  color: var(--amber);
}

.deadline-due.due-now {
  color: var(--orange);
  font-weight: 600;
}

.deadline-due.overdue {
  color: var(--red);
  font-weight: 600;
}

.deadline-date {
  color: var(--muted);
  margin-left: 6px;
}

.deadline-no-due {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

/* ---- Team pulse ---- */
.pulse-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.pulse-row {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  min-height: 36px;
  padding: var(--space-2, 8px) 0;
}

.pulse-row + .pulse-row {
  border-top: 1px solid var(--hairline);
}

.pulse-seq {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  flex: none;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: currentColor;
  flex: none;
}

.pulse-pursuing {
  color: var(--green);
}

.pulse-passing {
  color: var(--red);
}

.pulse-actor {
  font-size: 13px;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-title {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-title:hover {
  text-decoration: underline;
}

.pulse-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---- A11y (design contract) ---- */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ---- Responsive (design-contract ladder: 900 / 760 / 620) ---- */
@media (max-width: 900px) {
  .kpi-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  /* Cockpit condenses to the left readout only (design contract). */
  .cockpit .cockpit-readout:nth-child(n + 3),
  .cockpit .cockpit-sep {
    display: none;
  }
}

@media (max-width: 620px) {
  .cockpit {
    flex-wrap: wrap;
    font-size: 11px;
  }

  .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Decision queue: buttons full-width, stacked (design contract). */
  .dq-row {
    grid-template-columns: 1fr;
    gap: var(--space-2, 8px);
  }

  .dq-lamp,
  .dq-due {
    justify-self: start;
  }

  .dq-vote {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .dq-vote-btn,
  .dq-confirm .btn,
  .queue-sendback .btn {
    width: 100%;
  }

  .dq-confirm,
  .queue-sendback {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---- My Day rebuild (2026-08-09): pipeline funnel, panel heads, queues ---- */

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3, 12px);
}

.panel-link {
  font-size: var(--font-13, 13px);
  font-weight: 600;
  color: var(--scarlet);
  text-decoration: none;
}

.panel-link:hover {
  color: var(--scarlet-deep);
  text-decoration: underline;
}

/* ---- Pipeline funnel (the BD lifecycle view) ---- */
.funnel-panel {
  background: var(--raised);
}

.funnel {
  display: flex;
  align-items: stretch;
  gap: var(--space-2, 8px);
  flex-wrap: wrap;
}

.funnel-stage {
  flex: 1 1 0;
  min-width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-3, 12px) var(--space-2, 8px);
  background: var(--raised-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md, 6px);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.funnel-stage:hover {
  border-color: var(--scarlet);
  transform: translateY(-1px);
}

.funnel-stage.funnel-hot {
  border-color: var(--scarlet);
  background: var(--tint-red);
}

.funnel-count {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
}

.funnel-label {
  font-size: var(--font-xs, 12px);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-transform: uppercase;
}

.funnel-hot .funnel-label {
  color: var(--scarlet-deep);
}

.funnel-arrow {
  align-self: center;
  color: var(--hairline);
  font-size: 14px;
}

/* ---- My action items ---- */
.action-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
  padding: 0;
  margin: 0;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 12px);
  padding: var(--space-2, 8px) 0;
  border-bottom: 1px solid var(--hairline);
}

.action-row:last-child {
  border-bottom: none;
}

.action-title {
  font-size: var(--font-secondary, 14px);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-title:hover {
  color: var(--scarlet);
  text-decoration: underline;
}

.action-due {
  font-family: var(--font-mono);
  font-size: var(--font-xs, 12px);
  white-space: nowrap;
  color: var(--muted);
}

.action-due.overdue,
.action-due.due-now {
  color: var(--red);
  font-weight: 600;
}

.action-due.due-soon {
  color: var(--amber);
}

/* ---- What changed ---- */
.changed-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
  padding: 0;
  margin: 0;
}

.changed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 12px);
  padding: var(--space-2, 8px) 0;
  border-bottom: 1px solid var(--hairline);
}

.changed-row:last-child {
  border-bottom: none;
}

.changed-title {
  font-size: var(--font-secondary, 14px);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.changed-title:hover {
  color: var(--scarlet);
  text-decoration: underline;
}

.changed-verdict {
  font-family: var(--font-mono);
  font-size: var(--font-xs, 12px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--muted);
}

.changed-verdict.changed-reposition {
  color: var(--gold-dim);
}

.changed-verdict.changed-pass {
  color: var(--green);
}

.changed-verdict.changed-skip {
  color: var(--muted);
}

/* Responsive: funnel stages wrap on narrow screens */
@media (max-width: 720px) {
  .funnel-stage {
    flex: 1 1 40%;
    min-width: 0;
  }
  .funnel-arrow {
    display: none;
  }
}
