/* styles.css — Mission Control dashboard styling */

/* Password gate */
.pw-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.pw-gate.hidden { display: none; }
.pw-card {
  display: flex; flex-direction: column; align-items: center;
  background: #161b24; border: 1px solid #2a3040;
  border-radius: 12px; padding: 40px 36px; min-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.pw-input {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-family: inherit; font-size: 14px;
  padding: 10px 14px; width: 100%; text-align: center;
  letter-spacing: 0.1em; outline: none;
}
.pw-input:focus { border-color: var(--accent); }
.pw-btn {
  margin-top: 12px; width: 100%; padding: 10px;
  background: var(--accent); color: #000; font-weight: 700;
  border: none; border-radius: 6px; cursor: pointer;
  font-size: 12px; letter-spacing: 0.15em;
}
.pw-err { color: var(--red, #d65a5a); font-size: 11px; margin-top: 8px; min-height: 16px; }

:root {
  --bg:           #0b0e13;
  --bg-elev:      #11151c;
  --bg-card:      #141923;
  --border:       #1f2733;
  --border-soft:  #19202a;
  --text:         #d7dde6;
  --text-dim:     #7a8493;
  --text-faint:   #4a5360;
  --green:        #5fb568;
  --green-dim:    #2f5a37;
  --amber:        #e6b54a;
  --amber-dim:    #5a4520;
  --red:          #d65a5a;
  --red-dim:      #5a2424;
  --blue:         #4a9ad6;
  --accent:       #e6e6e6;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 20% -10%, #131a25 0%, transparent 60%),
    radial-gradient(900px 500px at 95% 0%, #15121d 0%, transparent 55%),
    var(--bg);
}

.mono { font-family: var(--mono); }

/* ============ TOPBAR ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.brand-mark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.18em;
  color: var(--green);
  padding: 4px 10px;
  border: 1px solid var(--green-dim);
  border-radius: 3px;
  background: rgba(95,181,104,0.05);
}

.brand-sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--text-dim);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 22px;
}

.meta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}

.meta-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--text-faint);
  margin-bottom: 3px;
}

.meta-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}

/* ============ BUTTONS ============ */
.btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}

.btn:hover {
  background: #1c2330;
  border-color: #2a3344;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: rgba(95,181,104,0.08);
  border-color: var(--green-dim);
  color: var(--green);
}

.btn-primary:hover {
  background: rgba(95,181,104,0.15);
  border-color: var(--green);
}

.btn.wide {
  display: block;
  width: 100%;
  margin-top: 12px;
  text-align: center;
}

/* ============ GRID ============ */
.grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 18px 24px 18px;
  grid-auto-rows: max-content;
  align-items: start;
}

@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
}

/* ============ CARDS ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card > * { min-width: 0; }

.card:hover {
  border-color: #2a3344;
}

.card.flash {
  animation: flash 0.7s ease;
}

@keyframes flash {
  0%   { background: var(--bg-card); }
  20%  { background: #1c2638; box-shadow: 0 0 0 1px rgba(95,154,214,0.3); }
  100% { background: var(--bg-card); }
}

.card-hero {
  grid-column: span 2;
  grid-row: span 2;
  align-self: stretch;
}

@media (max-width: 900px) {
  .card-hero { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 768px) {
  .card-hero { grid-column: 1 / -1; grid-row: auto; }
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.card-head h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
}

.card-age {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

.card-body {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-foot {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  padding: 7px 14px;
  border-top: 1px solid var(--border-soft);
  text-transform: uppercase;
}

/* ============ KV ROWS ============ */
.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  padding: 2px 0;
}

.kv .k {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kv .v {
  color: var(--text);
  text-align: right;
}

.kv .v.small { font-size: 11.5px; color: var(--text); }

/* ============ DOTS / PILLS ============ */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  background: var(--text-faint);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.4);
}
.dot.ok   { background: var(--green); box-shadow: 0 0 6px rgba(95,181,104,0.6); }
.dot.warn { background: var(--amber); box-shadow: 0 0 6px rgba(230,181,74,0.5); }
.dot.down { background: var(--red);   box-shadow: 0 0 6px rgba(214,90,90,0.6); }
.dot.idle { background: var(--text-faint); }

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid var(--border);
}
.pill-ok { background: rgba(95,181,104,0.1); color: var(--green); border-color: var(--green-dim); }

.accent-green { color: var(--green); }
.accent-amber { color: var(--amber); }
.accent-red   { color: var(--red);   }
.accent-blue  { color: var(--blue);  }

/* ============ BIG STATS (hero) ============ */
.bigstats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.bigstat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px 16px;
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
}

.bigstat-num {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.bigstat-label {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
}

/* ============ TIER BARS ============ */
.tier-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
}

.tier-row {
  display: grid;
  grid-template-columns: 88px 1fr 50px;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
}

.tier-code {
  color: var(--text-dim);
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tier-bar {
  height: 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.tier-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.tier-count {
  text-align: right;
  color: var(--text);
}

/* ============ AVATAR ============ */
.avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a3344, #1a2130);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--text);
  border: 1px solid var(--border);
}

.avatar-meta { display: flex; flex-direction: column; }
.avatar-name { font-weight: 600; font-size: 13px; }
.avatar-status { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* ============ SOURCE LIST / LINE LIST ============ */
.src-list, .line-list, .disc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.src-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  font-size: 12px;
}

.src-name { font-weight: 500; }
.src-note { font-family: var(--mono); font-size: 10.5px; color: var(--text-dim); }

.line-row {
  display: grid;
  grid-template-columns: 16px 70px 1fr;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
}
.line-who { color: var(--text); }
.line-num { font-family: var(--mono); color: var(--text-dim); text-align: right; }

.disc-row {
  padding: 8px 10px;
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.disc-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--text-dim); text-transform: uppercase;
}
.disc-snip { font-size: 12px; color: var(--text); line-height: 1.4; }
.unread {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  background: var(--amber);
  color: #1a1304;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  text-align: center;
}

/* ============ QUAD (codex) ============ */
.quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quad-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 12px;
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
}

.quad-num {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.quad-num.small { font-size: 14px; }
.quad-lbl {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

/* ============ ACTION BAR ============ */
.actionbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  position: sticky;
  bottom: 0;
}

.actionbar-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-faint);
}

.actionbar-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Mobile/tablet: actionbar becomes horizontal scroll (single row) to avoid eating vertical screen.
   Topbar wraps so the dashboard never horizontally overflows. */
@media (max-width: 768px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .topbar-meta { flex-wrap: wrap; gap: 12px; }
  .meta-block { align-items: flex-start; }
  .grid { padding: 10px 12px; gap: 10px; }
  .actionbar { gap: 8px; padding: 8px 12px; overflow-x: auto; flex-wrap: nowrap; }
  .actionbar-btns { flex-wrap: nowrap; min-width: 0; }
  .actionbar-btns .btn { white-space: nowrap; flex-shrink: 0; font-size: 10px; padding: 6px 10px; }
  .actionbar-label { font-size: 9px; flex-shrink: 0; }

  /* Touch targets: all buttons must be 44px minimum */
  .btn { min-height: 44px; }

  /* Meta labels readable */
  .meta-label { font-size: 11px; }
  .meta-value { font-size: 14px; }

  /* Collapse toggle bigger for touch */
  .card-collapse { width: 44px; height: 44px; font-size: 18px; }

  /* Run modal full-width on tablet/phone */
  .run-modal-card { width: 100vw; border-radius: 0; max-height: 100dvh; }

  /* Calendar: word-break long titles at tablet too */
  .cal-row .cal-title { word-break: break-word; min-width: 0; }
}

@media (max-width: 480px) {
  /* Topbar: let it scroll away on phones */
  .topbar { position: relative; }

  /* Grid: tighter padding */
  .grid { padding: 8px 8px; gap: 8px; }

  /* Brand: hide subtitle to save space */
  .brand-sub { display: none; }

  /* Font bumps for readability */
  .card-head h2 { font-size: 13px; }
  .card-foot { font-size: 10px; }
  .card-age { font-size: 11px; }
  .kv .k { font-size: 11.5px; }
  .quad-lbl { font-size: 10px; }

  /* Tier bars: tighter columns */
  .tier-row { grid-template-columns: 70px 1fr 40px; font-size: 10px; }

  /* Callback queue: simplify to 2 columns, hide phone+note */
  .cbq-row { grid-template-columns: 1fr auto; gap: 4px; }
  .cbq-phone, .cbq-note { display: none; }

  /* Process table: hide PID column */
  .proc-row { grid-template-columns: 1fr 42px 42px; font-size: 10px; }
  .proc-row .proc-pid { display: none; }

  /* Funnel rows: smaller min */
  .funnel-row { grid-template-columns: minmax(60px, 1fr) 1fr 32px; }

  /* Activity rows: hide newest file column, prevent overflow */
  .act-row { grid-template-columns: 1fr auto; }
  .act-row .act-newest { display: none; }

  /* Toast: full-width on phones */
  .toast-stack { right: 8px; left: 8px; }
  .toast { min-width: unset; width: 100%; }

  /* Notion input: bigger for touch */
  .notion-add input { padding: 10px 12px; font-size: 14px; }

  /* Calendar: word-break long titles */
  .cal-row .cal-title { word-break: break-word; min-width: 0; }

  /* Actionbar: scroll away on small phones */
  .actionbar { position: relative; }
}

/* ============ TOAST ============ */
.toast-stack {
  position: fixed;
  top: 70px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-card);
  border: 1px solid var(--green-dim);
  border-left: 3px solid var(--green);
  padding: 10px 14px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: toast-in 0.2s ease;
}

.toast.fade { animation: toast-out 0.3s ease forwards; }

@keyframes toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
  to { transform: translateX(20px); opacity: 0; }
}

/* ============ LIVE / MOCK BADGES ============ */
.badge-live, .badge-mock, .badge-local, .badge-stale, .badge-static {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 6px;
  vertical-align: middle;
  cursor: help;
}
.badge-live {
  background: var(--green);
  color: #0a1a0e;
  box-shadow: 0 0 4px rgba(95,181,104,0.5);
}
.badge-mock {
  background: #2a3344;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.badge-local {
  background: rgba(230,181,74,0.18);
  color: var(--amber);
  border: 1px solid var(--amber-dim);
}
.badge-stale {
  background: rgba(214,90,90,0.15);
  color: var(--red);
  border: 1px solid var(--red-dim);
}
.badge-static {
  background: rgba(255,255,255,0.04);
  color: var(--text-faint);
  border: 1px dashed var(--border);
}

/* ============ SERVER STATUS (header) ============ */
.server-status-online,
.server-status-offline {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
}
.server-status-online { color: var(--green); }
.server-status-offline { color: var(--amber); }

/* ============ SCRAPER LOG ROW (live) ============ */
.src-row.log-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 6px 10px;
  align-items: center;
  padding: 4px 0;
}
.src-row.log-row + .src-row.log-row { border-top: 1px dashed var(--border-soft); }
.src-row .src-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
}
.src-row .src-tail {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 2px;
  opacity: 0.8;
}

/* ============ QUICK ACTIONS RUN MODAL ============ */
.btn.btn-danger {
  border-color: #c0392b;
  color: #ff8a7a;
}
.btn.btn-danger:hover {
  background: rgba(192, 57, 43, 0.18);
}
.btn.is-running {
  opacity: 0.55;
  cursor: not-allowed;
}

.run-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 14, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  font-family: var(--mono);
}
.run-modal.hidden { display: none; }

.run-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 4px;
  width: min(720px, 92vw);
  max-height: 86vh;
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
}

.run-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.run-modal-title {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--text);
}
.run-modal-x {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.run-modal-x:hover { color: var(--text); }

.run-modal-body {
  padding: 14px 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 80px;
}

.run-modal-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.run-confirm {
  font-size: 13px;
  color: var(--text);
  padding: 8px 4px;
}

.run-log {
  background: #05080d;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 10px 12px;
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #cfd8e3;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 50vh;
  overflow: auto;
}

.run-banner {
  font-size: 11px;
  letter-spacing: 0.15em;
  padding: 6px 10px;
  border-radius: 2px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.run-banner.ok {
  border-color: var(--green-dim);
  border-left: 3px solid var(--green);
  color: var(--green);
  background: rgba(95, 181, 104, 0.08);
}
.run-banner.err {
  border-color: #c0392b;
  border-left: 3px solid #c0392b;
  color: #ff8a7a;
  background: rgba(192, 57, 43, 0.10);
}
.run-banner:empty { display: none; }

/* Claude Code Usage */
.cu-tokens {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.cu-tokens > span > span { color: var(--text); font-weight: 600; }

/* Discord bridges — live view */
.disc-row .disc-head { display: flex; justify-content: space-between; align-items: center; }
.disc-row .disc-age { font-size: 11px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.disc-row .disc-author { font-weight: 600; opacity: 0.9; }

.sys-foot { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border-soft); }

.cal-list { display: flex; flex-direction: column; gap: 6px; }
.cal-row { font-family: var(--mono); font-size: 11.5px; display: flex; gap: 10px; }
.cal-row .cal-time { color: var(--text-dim); width: 64px; flex-shrink: 0; }
.cal-row .cal-title { color: var(--text); }
.cal-row .cal-until { color: var(--green); margin-left: auto; font-size: 10.5px; }
.cal-empty { font-size: 11px; color: var(--text-dim); padding: 6px 2px; }
.notion-count { font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--green); }
.notion-count #notion-open { color: var(--green); }
.notion-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.notion-list li { font-family: var(--mono); font-size: 11.5px; color: var(--text); display: flex; gap: 8px; }
.notion-list li .notion-age { color: var(--text-dim); margin-left: auto; font-size: 10.5px; }

/* ---------- Callback Queue (inside Lead Pipeline) ---------- */
.callback-queue { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.cbq-summary { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-bottom: 8px; }
.cbq-summary span span { font-weight: 700; }
.cbq-summary .muted { color: var(--text-dim); }
.cbq-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cbq-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.2fr) auto auto 1fr;
  gap: 8px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 0;
}
.cbq-name { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.cbq-phone { color: var(--text-dim); font-size: 10.5px; }
.cbq-when { color: var(--text-dim); font-size: 10.5px; text-align: right; min-width: 56px; }
.cbq-note { color: var(--text-dim); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbq-row.cbq-overdue .cbq-when { color: var(--red); font-weight: 600; }
.cbq-row.cbq-today   .cbq-when { color: var(--amber, #e6c200); font-weight: 600; }
.cbq-empty { font-size: 11px; color: var(--text-dim); padding: 4px 2px; font-family: var(--mono); }

/* ---------- Conversion Funnel (7d) card ---------- */
.funnel-total { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--text); }
.funnel-total #fn-total { color: var(--text); }
.funnel-bars { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.funnel-row {
  display: grid;
  grid-template-columns: minmax(100px, 1.2fr) 1fr 38px;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
}
.funnel-label { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.funnel-bar { height: 8px; background: rgba(255,255,255,0.04); border-radius: 4px; overflow: hidden; }
.funnel-bar-fill { display: block; height: 100%; border-radius: 4px; }
.funnel-count { color: var(--text-dim); text-align: right; font-variant-numeric: tabular-nums; }

/* Top Processes card */
.proc-section { margin-bottom: 10px; }
.proc-section:last-child { margin-bottom: 0; }
.proc-section-label { font-family: var(--mono); font-size: 10px; color: var(--text-dim); letter-spacing: 0.08em; margin-bottom: 4px; }
.proc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.proc-row { font-family: var(--mono); font-size: 11px; display: grid; grid-template-columns: 52px 1fr 48px 48px; gap: 6px; align-items: center; color: var(--text); }
.proc-row .proc-pid { color: var(--text-dim); font-variant-numeric: tabular-nums; text-align: right; }
.proc-row .proc-name { color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; }
.proc-row .proc-cpu, .proc-row .proc-mem { font-variant-numeric: tabular-nums; text-align: right; color: var(--text-dim); }
.proc-row.proc-empty { color: var(--text-dim); grid-template-columns: 1fr; text-align: left; }
.proc-tag { display: inline-block; padding: 0 5px; border-radius: 3px; font-size: 9px; line-height: 14px; letter-spacing: 0.05em; text-transform: uppercase; background: rgba(255,255,255,0.06); color: var(--text-dim); border: 1px solid var(--border-soft); }
.proc-tag-claude { background: rgba(224,164,72,0.15); color: #e0a448; border-color: rgba(224,164,72,0.4); }
.proc-tag-codex  { background: rgba(120,160,220,0.15); color: #78a0dc; border-color: rgba(120,160,220,0.4); }
.proc-tag-python { background: rgba(95,181,104,0.15); color: var(--green); border-color: rgba(95,181,104,0.4); }
.proc-tag-node   { background: rgba(95,168,160,0.15); color: #5fa8a0; border-color: rgba(95,168,160,0.4); }
.proc-tag-browser{ background: rgba(176,122,208,0.15); color: #b07ad0; border-color: rgba(176,122,208,0.4); }

/* Battery / power line in System Health */
.sys-power { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border-soft); letter-spacing: 0.04em; }

/* SSL row in SPS Website card */
[data-card="website"] .row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-family: var(--mono); font-size: 11.5px; }
[data-card="website"] .row .lbl { color: var(--text-dim); letter-spacing: 0.06em; }
[data-card="website"] .row .val { color: var(--text); font-variant-numeric: tabular-nums; }

/* Recent Sessions card */
.sess-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sess-row { display: flex; gap: 10px; align-items: baseline; font-size: 12px; line-height: 1.4; }
.sess-row .sess-when { flex: 0 0 auto; color: var(--text-dim); font-size: 11px; min-width: 64px; }
.sess-row .sess-prev { flex: 1 1 auto; color: var(--text); overflow: hidden; text-overflow: ellipsis; min-width: 0; white-space: nowrap; }

/* Cold-Call Window */
[data-card="callwindow"] .cw-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.cw-bigstat { display: flex; flex-direction: column; }
.cw-state { font-size: 36px; font-weight: 700; line-height: 1; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.cw-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.cw-timer { text-align: right; }
.cw-timer #cw-countdown { display: block; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.cw-timer-lbl { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.cw-bar { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.cw-bar-fill { height: 100%; width: 0%; transition: width 1s ease, background 1s ease; }

/* Services */
.svc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.svc-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.svc-row .svc-state { color: var(--text-dim); font-size: 11px; }

/* Weather */
.wx-row { display: flex; align-items: center; gap: 16px; }
.wx-temp { font-size: 44px; font-weight: 700; line-height: 1; }
.wx-meta { display: flex; flex-direction: column; gap: 4px; }
.wx-cond { font-size: 14px; color: var(--text); }
.wx-sub { font-size: 11px; color: var(--text-dim); }

/* Inbox quad-2 */
.quad-2 { grid-template-columns: repeat(2, 1fr) !important; }

/* Recent File Activity */
.act-list { list-style: none; padding: 0; margin: 8px 0 0 0; display: flex; flex-direction: column; gap: 4px; }
.act-row { display: grid; grid-template-columns: 1fr auto 1.6fr; gap: 10px; align-items: baseline; font-size: 11px; }
.act-row .act-name { font-weight: 500; color: var(--text); }
.act-row .act-count { color: var(--text-dim); }
.act-row .act-newest { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lead Velocity */
.vel-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.vel-stat { display: flex; flex-direction: column; }
.vel-num { font-size: 22px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.vel-lbl { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
.vel-spark { width: 100%; height: 50px; display: block; }
.vel-foot { margin-top: 6px; }

/* Ambient strip */
.amb-row { display: flex; gap: 10px; align-items: baseline; font-size: 12px; margin-bottom: 4px; }
.amb-label { color: var(--text-dim); width: 28px; flex: 0 0 auto; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.amb-val { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* GitHub */
.gh-runs { list-style: none; padding: 0; margin: 6px 0 0 0; display: flex; flex-direction: column; gap: 4px; }
.gh-run { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; }

/* Help overlay */
.help-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.help-overlay.hidden { display: none; }
.help-card { background: var(--card-bg, #161a1f); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 24px 32px; min-width: 280px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.help-card h3 { margin: 0 0 12px 0; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
.help-card ul { list-style: none; padding: 0; margin: 0 0 12px 0; }
.help-card li { padding: 4px 0; font-size: 13px; }
.help-card kbd { display: inline-block; padding: 2px 6px; margin-right: 8px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 3px; font-family: monospace; font-size: 11px; min-width: 16px; text-align: center; }
.help-close { color: var(--text-dim); font-size: 11px; text-align: center; margin-top: 8px; }

/* Card collapse */
.card-collapse { background: transparent; border: 1px solid rgba(255,255,255,0.12); color: var(--text-dim); width: 20px; height: 20px; line-height: 1; cursor: pointer; border-radius: 3px; font-size: 14px; padding: 0; margin-left: auto; opacity: 0.6; transition: opacity 0.15s; }
.card-collapse:hover { opacity: 1; color: var(--text); }
.card.collapsed .card-body { display: none; }
.card.collapsed .card-foot { display: none; }
.card.collapsed .card-collapse::after { content: "+"; }
.card.collapsed .card-collapse { font-size: 0; }
.card.collapsed .card-collapse::after { font-size: 14px; }

/* Notion add-todo */
.notion-add { margin: 6px 0 8px 0; }
.notion-add input { width: 100%; box-sizing: border-box; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10); border-radius: 4px; color: var(--text); padding: 6px 8px; font-size: 12px; font-family: inherit; }
.notion-add input:focus { outline: none; border-color: rgba(95,181,104,0.5); background: rgba(255,255,255,0.06); }
.notion-add input:disabled { opacity: 0.5; }

/* Drag-reorder */
.card[draggable="true"] { cursor: grab; }
.card.dragging { opacity: 0.4; cursor: grabbing; }
