/* Blackbook Engine — Loop Board (index.html) page-specific styles.
 * Residuals migrated from the page's inline <style>, converted to --ds-* tokens.
 * design-system.css provides the shell, buttons, cards, and shared primitives. */

/* Content wrapper (the shell's .dashboard-content supplies padding) */
.board-body { max-width: 1280px; margin: 0 auto; }

/* ── Section Header ─────────────────────── */
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--ds-space-3); }
.section-title { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.01em; }
.section-count { font-family: var(--ds-font-mono); font-size: 0.7rem; color: var(--ds-ink-muted); }

/* ── Task Cards ─────────────────────────── */
.task-cards { display: flex; flex-direction: column; gap: var(--ds-space-2); }
.task-card {
  background: var(--ds-bg); border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg); padding: 0.875rem 1rem 0.75rem;
  display: grid; grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto; align-items: start; gap: 0 var(--ds-space-3);
}
.task-card.due-today { border-color: var(--ds-ink); }
.task-card.due-soon  { border-color: var(--ds-border-warning); }
.task-card.overdue   { border-color: var(--ds-border-error); }
.task-card.nurture   { border-color: var(--ds-accent); }
.task-card.future    { border-color: var(--ds-border); opacity: 0.8; }
.task-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ds-bg-inverse); color: var(--ds-ink-inverse);
  font-weight: 600; font-size: 0.88rem;
  display: flex; align-items: center; justify-content: center; flex: none;
  grid-row: 1 / 3;
}
.task-info { min-width: 0; }
.task-name-line { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; overflow: hidden; }
.task-name { font-size: 0.92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-company { font-size: 0.78rem; color: var(--ds-ink-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta { font-family: var(--ds-font-mono); font-size: 0.66rem; color: var(--ds-ink-secondary); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-action { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: none; grid-column: 3; grid-row: 1 / 3; justify-self: end; }
.task-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; padding-top: 6px; border-top: 1px solid var(--ds-border); }
.task-footer-due { display: flex; align-items: center; gap: 5px; font-family: var(--ds-font-mono); font-size: 0.62rem; font-weight: 600; }
.task-footer-due .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.task-footer-due.due-today { color: var(--ds-ink); }
.task-footer-due.due-today .dot { background: var(--ds-ink); }
.task-footer-due.due-soon  { color: var(--ds-border-warning); }
.task-footer-due.due-soon .dot  { background: var(--ds-border-warning); }
.task-footer-due.overdue   { color: var(--ds-text-negative); }
.task-footer-due.overdue .dot   { background: var(--ds-text-negative); }
.dismiss-task-btn { font-size: 0.68rem; background: none; border: none; color: var(--ds-ink-muted); cursor: pointer; padding: 0; }
.dismiss-task-btn:hover { color: var(--ds-ink); }

.hot-badge {
  display: inline-block; flex: none; margin-left: 8px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--ds-bg-negative-tint); color: var(--ds-text-negative);
  font-family: var(--ds-font-mono); font-size: 0.6rem; font-weight: 600;
}

/* ── Deal Table ─────────────────────────── */
.deal-group { margin-bottom: var(--ds-space-4); }
.deal-stage-header {
  font-family: var(--ds-font-mono); font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ds-ink-muted); padding: 0 4px 8px;
  display: flex; align-items: center; gap: 8px;
}
.deal-stage-header .badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; border-radius: 999px;
  background: var(--ds-bg-subtle); color: var(--ds-ink-secondary);
  font-family: var(--ds-font-mono); font-size: 0.6rem; padding: 0 6px;
}
.deal-rows { display: flex; flex-direction: column; gap: 6px; }
.deal-row {
  background: var(--ds-bg); border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius); padding: 10px 14px;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px;
}
.deal-name { font-size: 0.84rem; font-weight: 600; }
.deal-contact { font-size: 0.74rem; color: var(--ds-ink-secondary); margin-top: 1px; }
.deal-meta { font-family: var(--ds-font-mono); font-size: 0.64rem; color: var(--ds-ink-muted); margin-top: 2px; }
.deal-amount { font-weight: 600; font-size: 1.0rem; text-align: right; }

/* ── Empty State ────────────────────────── */
.board-empty { color: var(--ds-ink-muted); font-size: 0.85rem; padding: var(--ds-space-5) 0; text-align: center; }

/* ── Channel colors ─────────────────────── */
.ch-email    { color: var(--ds-ink-secondary); }
.ch-linkedin { color: var(--ds-ink-muted); }
.ch-call     { color: var(--ds-text-positive); }

/* ── Draft Editor (inline card expansion) ── */
.draft-editor {
  grid-column: 1 / -1;
  border-top: 1px solid var(--ds-border);
  padding-top: 14px; margin-top: 6px;
  display: flex; flex-direction: column; gap: 8px;
}
.draft-editor label { font-family: var(--ds-font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ds-ink-muted); }
.draft-editor input[type=text] {
  font-size: 0.88rem; padding: 8px 12px;
  border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius);
  background: var(--ds-bg); color: var(--ds-ink); outline: none;
}
.draft-editor input[type=text]:focus { border-color: var(--ds-ink); outline: 2px solid var(--ds-accent); outline-offset: 0; }
.draft-editor textarea {
  font-size: 0.84rem; line-height: 1.55; padding: 10px 12px;
  border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius);
  background: var(--ds-bg); color: var(--ds-ink); resize: vertical; min-height: 140px; outline: none;
}
.draft-editor textarea:focus { border-color: var(--ds-ink); outline: 2px solid var(--ds-accent); outline-offset: 0; }
.draft-editor-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.draft-editor .draft-status { font-family: var(--ds-font-mono); font-size: 0.7rem; color: var(--ds-ink-muted); text-align: center; padding: 4px 0; }

/* The desk lives inside a reused .signal-widget container on the board;
   funnel CSS moved to ads.css (Attribution tab). */
.signal-widget { background: var(--ds-bg); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); padding: var(--ds-space-3); margin-bottom: var(--ds-space-5); }

/* ── Watchlist ticker (Bloomberg style) ── */
.ticker { background: var(--ds-bg-inverse); border: 1.5px solid var(--ds-ink); border-radius: var(--ds-radius-lg); overflow: hidden; margin-bottom: var(--ds-space-4); }
.ticker-window { overflow: hidden; }
.ticker-track { display: flex; width: max-content; white-space: nowrap; animation: ticker-x 45s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } .ticker-window { overflow-x: auto; } }
.ticker-half { display: flex; white-space: nowrap; }
.ticker-item { font-family: var(--ds-font-mono); font-size: 0.72rem; color: rgba(255,255,255,0.8); padding: 8px 18px; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; border-right: 1px solid rgba(255,255,255,0.12); }
.ticker-sym { color: #FFF; font-weight: 600; }
.ticker-val { color: rgba(255,255,255,0.55); font-variant-numeric: tabular-nums; }
.ticker-up { color: #34D37B; font-weight: 600; }
.ticker-down { color: #FF6B6B; font-weight: 600; }
.ticker-flat { color: rgba(255,255,255,0.4); }
.ticker-grain { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.38); }
/* Idle state: no ticker_items yet — keep the band visible with a muted label, never collapse. */
.ticker:empty { min-height: 34px; display: flex; align-items: center; justify-content: center; }
.ticker:empty::before { content: 'No account signals yet'; font-family: var(--ds-font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.4); }

/* ── Featured hero signal ── */
/* Resets gap/align-items/padding inherited from design-system.css's marketing .hero. */
.hero { display: grid; grid-template-columns: 230px 1fr; gap: 0; align-items: stretch; padding: 0; border: 1.5px solid var(--ds-ink); border-radius: var(--ds-radius-lg); overflow: hidden; margin-bottom: var(--ds-space-4); background: var(--ds-bg); }
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; } }
.hero:empty { display: none; } /* hide when no job-change hero */
.hero-visual { background: var(--ds-bg-accent-tint); display: flex; align-items: center; justify-content: center; gap: 10px; padding: 26px 20px; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-monogram { width: 46px; height: 46px; border-radius: 50%; background: var(--ds-bg-inverse); color: #FFF; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.05rem; }
.hero-swap { font-family: var(--ds-font-mono); color: var(--ds-accent); font-size: 1.15rem; font-weight: 600; }
.hero-body { padding: 18px 22px; }
.hero-kicker { display: inline-block; font-family: var(--ds-font-mono); font-size: 0.58rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ds-accent-hover); background: var(--ds-bg); border: 1px solid var(--ds-accent); padding: 2px 8px; border-radius: 999px; }
.hero-company { font-family: var(--ds-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ds-ink-muted); margin-top: 10px; }
.hero-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; margin-top: 3px; }
.hero-why { font-size: 0.82rem; color: var(--ds-ink-muted); margin-top: 10px; max-width: 62ch; line-height: 1.5; }
.hero-actions { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.hero-open { font-family: var(--ds-font-mono); font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; color: #FFF; background: var(--ds-ink); border: 1px solid var(--ds-ink); border-radius: var(--ds-radius-sm); padding: 6px 12px; }
.hero-score { font-family: var(--ds-font-mono); font-size: 0.66rem; color: var(--ds-ink-muted); }

/* ── Signal desk: three grain columns ── */
.desk { border: 1.5px solid var(--ds-ink); border-radius: var(--ds-radius-lg); overflow: hidden; }
.desk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 16px; background: var(--ds-bg-inverse); }
.desk-title { font-family: var(--ds-font-mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #FFF; display: flex; align-items: center; gap: 8px; }
.desk-title .fresh { width: 7px; height: 7px; background: var(--ds-text-positive); border-radius: 1px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,0.4); }
.desk-refresh { font-family: var(--ds-font-mono); font-size: 0.6rem; color: rgba(255,255,255,0.55); }
.cols { display: grid; grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }
.col { background: var(--ds-bg); min-width: 0; }
.col + .col { border-left: 1.5px solid var(--ds-ink); }
@media (max-width: 820px) { .col + .col { border-left: none; border-top: 1.5px solid var(--ds-ink); } }
.col.jc { background: var(--ds-bg-accent-tint); }
.col.com { background: var(--ds-bg-subtle); }
.col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 12px 16px 8px; }
.col-name { font-family: var(--ds-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ds-ink); display: flex; align-items: center; gap: 7px; font-weight: 600; }
.col-name .pulse { width: 7px; height: 7px; border: 1px solid var(--ds-border-strong); border-radius: 1px; flex: none; }
.col-count { font-family: var(--ds-font-mono); font-size: 0.62rem; color: var(--ds-ink-muted); }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 9px 16px; border-top: 1px solid var(--ds-border); cursor: pointer; }
.row:hover { background: rgba(10,10,10,0.05); }
.row-time { font-family: var(--ds-font-mono); font-size: 0.62rem; color: var(--ds-ink-muted); padding-top: 1px; font-variant-numeric: tabular-nums; }
.row-kicker { display: inline-block; font-family: var(--ds-font-mono); font-size: 0.56rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; margin-bottom: 3px; }
.row-kicker.violet { color: var(--ds-accent-hover); background: var(--ds-bg); border: 1px solid var(--ds-accent); }
.row-kicker.neutral { color: var(--ds-ink-secondary); background: var(--ds-bg); border: 1px solid var(--ds-border-strong); }
.row-kicker.muted { color: var(--ds-ink-muted); background: var(--ds-bg); border: 1px solid var(--ds-border); }
.row-title { font-size: 0.84rem; font-weight: 600; line-height: 1.35; }
.row-sub { font-size: 0.74rem; color: var(--ds-ink-secondary); margin-top: 1px; line-height: 1.4; }
.row-sub .arrow { color: var(--ds-ink-muted); }
.row-sub .src { color: var(--ds-accent); font-weight: 600; }
.signal-vertical { margin-top: var(--ds-space-2); font-size: var(--ds-body-sm); }
.signal-vertical ul { margin: var(--ds-space-1) 0 0 var(--ds-space-4); padding: 0; }

/* ── Board grid: hero + desk (left) | full-height tasks rail (right) ──
   Layout v2: hero moved into the desk column (same width); rail spans the
   full column height. Sticky dropped — it no-ops on a stretched grid cell. */
.main-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: var(--ds-space-4); margin-bottom: var(--ds-space-5); }
@media (max-width: 980px) { .main-grid { grid-template-columns: 1fr; } }
.main-left { min-width: 0; }
/* The desk lives inside the reused .signal-widget container; strip the card
   chrome so the desk's own ink border is the module edge (mockup parity). */
.main-left .signal-widget { padding: 0; border: none; background: transparent; margin-bottom: 0; }
.rail { border: 1.5px solid var(--ds-ink); border-radius: var(--ds-radius-lg); background: var(--ds-bg); padding: 14px; }
.deals { border: 1.5px solid var(--ds-ink); border-radius: var(--ds-radius-lg); background: var(--ds-bg); padding: 14px 16px; }

/* Not-configured strip at the top of the desk — viewport still renders. */
.desk-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 16px; border-bottom: 1px solid var(--ds-border);
  background: var(--ds-bg-subtle);
  font-family: var(--ds-font-mono); font-size: 0.62rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ds-ink-muted);
}
.desk-banner a {
  font-family: var(--ds-font-mono); font-size: 0.62rem; letter-spacing: 0.04em;
  text-transform: uppercase; text-decoration: none;
  color: #FFF; background: var(--ds-ink); border: 1px solid var(--ds-ink);
  border-radius: var(--ds-radius-sm); padding: 4px 10px;
}
.desk-banner a:hover { background: var(--ds-ink-2); }

/* ── Signal card action popover (opens on card click, fixed-positioned) ── */
.signal-popover {
  position: fixed; z-index: 200; width: 244px;
  background: var(--ds-bg); border: 1.5px solid var(--ds-ink);
  border-radius: var(--ds-radius-lg);
  box-shadow: 0 8px 24px rgba(10,10,10,0.18);
  overflow: hidden;
}
.po-head { padding: 10px 12px; border-bottom: 1px solid var(--ds-border); }
.po-title { font-size: 0.86rem; font-weight: 700; }
.po-meta { font-family: var(--ds-font-mono); font-size: 0.6rem; color: var(--ds-ink-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.po-nav { padding: 6px 0; border-bottom: 1px solid var(--ds-border); }
.po-nav a { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; font-size: 0.8rem; color: var(--ds-ink); text-decoration: none; }
.po-nav a:hover { background: var(--ds-bg-subtle); }
.po-nav .po-x { font-family: var(--ds-font-mono); font-size: 0.7rem; color: var(--ds-ink-muted); }
.po-reach { padding: 10px 12px; }
.po-reach-label { font-family: var(--ds-font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ds-ink-muted); margin-bottom: 8px; }
.po-btn { display: block; width: 100%; text-align: left; font: inherit; font-size: 0.8rem; padding: 7px 10px; margin-bottom: 6px; border-radius: var(--ds-radius); cursor: pointer; }
.po-btn:last-child { margin-bottom: 0; }
.po-btn.po-email { background: var(--ds-bg-accent-tint); border: 1px solid var(--ds-accent); color: var(--ds-accent); }
.po-btn.po-linkedin { background: var(--ds-bg-subtle); border: 1px solid var(--ds-border-strong); color: var(--ds-ink); }
.po-reach-note { font-size: 0.76rem; color: var(--ds-ink-muted); margin-top: 6px; }
.po-reach-note a { color: var(--ds-accent); }
/* Draft editor inside the popover inherits the task-card editor styles. */
