/* gtm.css — Cortex GTM Engineering: request + ticketing system */

/* ---------- KPI hero band (overview) ---------- */
.hero-band {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 0;
  background: linear-gradient(135deg, #1a1028 0%, #24153f 50%, #0a0614 100%);
  color: #fff;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}
.hero-band::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(192,175,255,0.12) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: .5; pointer-events: none;
}
.hero-cell { padding: 22px 22px; position: relative; z-index: 1; border-right: 1px solid rgba(255,255,255,0.06); }
.hero-cell:last-child { border-right: 0; }
.hero-cell .hlabel { font-size: 14px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.hero-cell .hvalue { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; font-variant-numeric: tabular-nums; line-height: 1; }
.hero-cell .hunit { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.55); margin-left: 6px; }
.hero-cell.lead .hvalue { font-size: 26px; letter-spacing: -0.01em; }
.hero-cell .lead-sub { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.55; margin-top: 10px; max-width: 320px; }

/* ---------- SIDEBAR additions ---------- */
.sb-count { margin-left: auto; font-size: 14px; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; background: rgba(255,255,255,.06); padding: 1px 7px; border-radius: 99px; }
.sb-item.active .sb-count { color: #fff; background: rgba(255,255,255,.12); }
.sb-views { margin-top: 14px; }
.sb-section-label { color: rgba(255,255,255,.35); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 6px 8px 6px; }
.sb-view { font-size: 14px; padding: 5px 8px; }
.sb-team-dot { width: 8px; height: 8px; border-radius: 99px; margin-right: 2px; }

/* ---------- Ticketing: chips ---------- */
.status-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 99px; border: 1px solid;
  font-size: 13px; font-weight: 500; line-height: 1.4;
}
.status-chip.sm { font-size: 13px; padding: 1px 6px; gap: 4px; }
.prio-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 500;
}
.label-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 7px; border-radius: 99px;
  font-size: 14px; font-weight: 500;
}
.label-chip .d { width: 6px; height: 6px; border-radius: 99px; }
.team-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 99px; background: var(--bg);
  border: 1px solid var(--border); font-size: 13px; color: var(--text-neutral-normal);
}
.team-chip .d { width: 6px; height: 6px; border-radius: 99px; }

/* Person/Avatar */
.person { display: inline-flex; align-items: center; gap: 6px; }
.person-name { font-size: 14px; color: var(--text-neutral-prominent); font-weight: 500; }
.avatar.n5 { background: linear-gradient(135deg, #7458db, #c084fc); }
.avatar.bot { background: linear-gradient(135deg, #7458db, #c084fc); color: #fff; }

.phase-dots { display: inline-flex; gap: 3px; }
.phase-dots .pd { width: 6px; height: 6px; border-radius: 99px; background: var(--neutral-200); }
.phase-dots .pd.done { background: var(--brand-500); }
.phase-dots .pd.current { background: var(--brand-500); box-shadow: 0 0 0 3px rgba(116,88,219,.2); }

.pbar { height: 4px; border-radius: 99px; background: var(--neutral-100); overflow: hidden; }
.pbar > i { display: block; height: 100%; border-radius: 99px; }

/* ---------- PAGE: Inbox (3-pane — sidebar is the nav column; this is list + detail) ---------- */
.page-inbox { padding: 0 !important; overflow: hidden !important; }
.inbox { display: grid; height: 100%; }
.inbox.layout-split { grid-template-columns: minmax(380px, 440px) 1fr; }
.inbox.layout-full  { grid-template-columns: 1fr; }
.inbox.layout-list-only { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; }

/* ---- LIST PANE ---- */
.inbox-list {
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
.inbox.layout-full .inbox-list, .inbox.layout-list-only .inbox-list { border-right: 0; }

.il-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.il-title { display: flex; align-items: center; gap: 10px; }
.il-title h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-neutral-prominent); }
.il-count { font-size: 14px; color: var(--text-neutral-subtle); background: var(--neutral-100); padding: 1px 7px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.il-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.il-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.chip-btn {
  font-size: 13px; padding: 3px 9px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text-neutral-normal);
  cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 4px;
}
.chip-btn:hover { background: var(--neutral-50); }
.chip-btn.on { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.chip-btn .n { font-variant-numeric: tabular-nums; opacity: .8; font-size: 13px; }
.il-sort { font-size: 13px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); padding: 3px 6px; color: var(--text-neutral-normal); }

.il-body { flex: 1; overflow-y: auto; }
.il-group-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px 6px; font-size: 14px; font-weight: 600; color: var(--text-neutral-subtle); text-transform: uppercase; letter-spacing: .04em; background: var(--neutral-50); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; }
.il-group-head .n { margin-left: auto; font-variant-numeric: tabular-nums; }
.il-empty { padding: 60px 20px; text-align: center; }

/* Ticket row */
.ticket-row {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s ease, border-left-color .1s ease;
  border-left: 3px solid transparent;
}
.ticket-row:hover { background: var(--neutral-50); }
.ticket-row.on { background: rgba(116,88,219,.07); border-left-color: var(--brand-500); }

.tr-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.tr-id { font-family: var(--font-mono); font-size: 13px; color: var(--text-neutral-subtle); font-weight: 500; }
.tr-updated { margin-left: auto; font-size: 13px; color: var(--text-neutral-subtle); }
.tr-title { font-size: 13.5px; font-weight: 600; color: var(--text-neutral-prominent); line-height: 1.35; letter-spacing: -0.005em; }
.tr-goal { margin-top: 6px; font-size: 13px; color: var(--text-neutral-normal); line-height: 1.45; display: flex; gap: 6px; align-items: baseline; }
.tr-goal-kicker { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-500); flex: 0 0 auto; padding-top: 1px; }
.tr-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.tr-req { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 500; }
.tr-req .d { width: 5px; height: 5px; border-radius: 99px; }
.tr-labels { display: flex; gap: 4px; }
.tr-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tr-unassigned { font-size: 13px; color: var(--text-neutral-subtle); font-style: italic; }
.tr-progress { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.tr-progress .pbar { flex: 1; }
.tr-phase { font-size: 13px; color: var(--text-neutral-subtle); font-weight: 500; flex: 0 0 auto; }

/* ---- DETAIL PANE ---- */
.detail { display: flex; flex-direction: column; overflow: hidden; background: var(--neutral-50); }
.detail.empty { display: flex; align-items: center; justify-content: center; flex-direction: column; }

.detail-head { padding: 10px 24px; border-bottom: 1px solid var(--border); background: var(--bg); display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; }
.dh-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-neutral-subtle); }
.dh-breadcrumb .here { color: var(--text-neutral-prominent); font-family: var(--font-mono); font-weight: 500; }
.dh-actions { display: flex; gap: 6px; }

.detail-body { display: grid; grid-template-columns: 1fr 300px; overflow: hidden; flex: 1; }
.detail-main { overflow-y: auto; padding: 28px 40px 80px; max-width: 820px; }
.detail-side { border-left: 1px solid var(--border); background: var(--bg); overflow-y: auto; padding: 22px 20px; }

/* Title block */
.d-title { margin-bottom: 24px; }
.d-title .d-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.d-title .d-id { font-family: var(--font-mono); font-size: 14px; color: var(--text-neutral-subtle); margin-left: auto; }
.d-title h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin: 0 0 8px; color: var(--text-neutral-prominent); text-wrap: pretty; }
.d-title .d-sub { font-size: 14px; color: var(--text-neutral-subtle); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.d-title .d-sub b { color: var(--text-neutral-prominent); font-weight: 500; }

/* Goal hero — THE centerpiece of every ticket */
.goal-hero {
  background: linear-gradient(135deg, rgba(116,88,219,.08), rgba(116,88,219,.02));
  border: 1px solid rgba(116,88,219,.25);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.goal-hero::before {
  content: ''; position: absolute; top: 0; right: 0; width: 180px; height: 180px;
  background: radial-gradient(circle at top right, rgba(116,88,219,.18), transparent 70%);
  pointer-events: none;
}
.gh-kicker {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-600); margin-bottom: 10px;
}
.gh-body {
  font-size: 17px; line-height: 1.55; color: var(--text-neutral-prominent);
  font-weight: 400; letter-spacing: -0.005em; text-wrap: pretty;
}
.gh-when, .gh-need, .gh-so {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--brand-500); margin-right: 4px; vertical-align: 1px;
}
.gh-impact {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(116,88,219,.3);
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 13px; color: var(--text-neutral-prominent); line-height: 1.5;
}
.gh-impact i { color: var(--brand-500); margin-top: 3px; }

/* Progress rail */
.prog-rail-wrap { margin-bottom: 28px; padding: 18px 4px 6px; }
.prog-rail {
  display: grid; grid-template-columns: repeat(7, 1fr);
  position: relative; padding: 0 5%;
}
.prog-rail::before {
  content: ''; position: absolute; left: 8%; right: 8%; top: 7px;
  height: 2px; background: var(--neutral-200); border-radius: 99px;
}
.prog-rail-fill {
  position: absolute; left: 8%; top: 7px; height: 2px;
  background: var(--brand-500); border-radius: 99px;
  max-width: 84%;
  transition: width .3s ease;
}
.prog-node { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; z-index: 1; }
.prog-node .pn-dot {
  width: 14px; height: 14px; border-radius: 99px;
  background: var(--bg); border: 2px solid var(--neutral-300);
}
.prog-node.done .pn-dot { background: var(--brand-500); border-color: var(--brand-500); }
.prog-node.current .pn-dot { background: var(--bg); border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(116,88,219,.2); }
.prog-node .pn-label { font-size: 14px; color: var(--text-neutral-subtle); font-weight: 500; text-align: center; }
.prog-node.done .pn-label, .prog-node.current .pn-label { color: var(--text-neutral-prominent); }
.prog-meta { display: flex; justify-content: center; gap: 20px; margin-top: 14px; font-size: 13px; color: var(--text-neutral-subtle); }
.prog-meta b { color: var(--text-neutral-prominent); font-weight: 600; }

/* Narrative sections */
.narr { margin-bottom: 26px; }
.narr-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-neutral-subtle); margin-bottom: 8px;
}
.narr p {
  margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--text-neutral-prominent);
  text-wrap: pretty;
}
.narr p strong { font-weight: 600; background: rgba(116,88,219,.12); padding: 0 3px; border-radius: 3px; color: var(--brand-700); }
.narr p code { font-family: var(--font-mono); font-size: 13px; background: var(--neutral-100); padding: 1px 5px; border-radius: 3px; }

/* Metric hero */
.metric-card-hero {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 22px 24px; margin-bottom: 26px;
}
.mh-kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-500); }
.mh-label { font-size: 14px; font-weight: 500; color: var(--text-neutral-normal); margin-top: 4px; margin-bottom: 18px; }
.mh-nums { display: flex; align-items: center; gap: 28px; }
.mh-now, .mh-target { position: relative; }
.mh-was { font-size: 14px; color: var(--text-neutral-subtle); text-decoration: line-through; margin-bottom: 2px; }
.mh-now.improved .mh-v { color: #15803d; }
.mh-v { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--text-neutral-prominent); font-variant-numeric: tabular-nums; }
.mh-target .mh-v { color: var(--brand-600); }
.mh-l { font-size: 14px; color: var(--text-neutral-subtle); margin-top: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.mh-sup { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.mh-sup-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.mh-sup-row .l { color: var(--text-neutral-normal); }
.mh-sup-row .w { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.mh-sup-row .from { color: var(--text-neutral-subtle); text-decoration: line-through; font-size: 13px; }
.mh-sup-row .n { font-weight: 600; color: var(--text-neutral-prominent); }
.mh-sup-row .sep { color: var(--neutral-300); }
.mh-sup-row .t { font-weight: 600; color: var(--brand-600); }

/* Milestones */
.mstones { display: flex; flex-direction: column; gap: 0; }
.mstone { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.mstone:not(:last-child)::after { content: ''; position: absolute; left: 9px; top: 28px; bottom: -4px; width: 2px; background: var(--neutral-200); }
.mstone.done:not(:last-child)::after { background: var(--brand-500); }
.mstone .ms-dot { width: 20px; height: 20px; border-radius: 99px; background: var(--bg); border: 2px solid var(--neutral-300); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; z-index: 1; }
.mstone.done .ms-dot { background: var(--brand-500); border-color: var(--brand-500); }
.mstone.doing .ms-dot { border-color: var(--brand-500); }
.mstone .ms-pulse { width: 8px; height: 8px; border-radius: 99px; background: var(--brand-500); box-shadow: 0 0 0 0 rgba(116,88,219,.5); animation: ms-pulse 1.8s infinite; }
@keyframes ms-pulse { 0% { box-shadow: 0 0 0 0 rgba(116,88,219,.5); } 100% { box-shadow: 0 0 0 10px rgba(116,88,219,0); } }
.mstone .ms-body { flex: 1; }
.mstone .ms-t { font-size: 13.5px; font-weight: 500; color: var(--text-neutral-prominent); }
.mstone.done .ms-t, .mstone.todo .ms-t { color: var(--text-neutral-normal); }
.mstone.doing .ms-t { font-weight: 600; }
.mstone .ms-d { font-size: 13px; color: var(--text-neutral-subtle); margin-top: 1px; font-variant-numeric: tabular-nums; }

/* Risks */
.risks { display: flex; flex-direction: column; gap: 8px; }
.risk-row { display: flex; gap: 12px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; align-items: flex-start; }
.risk-row .rl-bar { width: 3px; align-self: stretch; border-radius: 99px; flex: 0 0 auto; }
.risk-row.high .rl-bar { background: #dc2626; }
.risk-row.med .rl-bar { background: #f59e0b; }
.risk-row.low .rl-bar { background: var(--neutral-300); }
.risk-row .rl-body { flex: 1; }
.risk-row .rl-t { font-size: 13px; font-weight: 500; color: var(--text-neutral-prominent); }
.risk-row .rl-m { font-size: 13px; color: var(--text-neutral-subtle); margin-top: 3px; line-height: 1.5; }

/* Comments */
.comments { display: flex; flex-direction: column; gap: 16px; }
.comment { display: flex; gap: 10px; }
.comment .c-body { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; }
.comment .c-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.comment .c-head b { font-size: 13px; color: var(--text-neutral-prominent); font-weight: 600; }
.comment .c-role { font-size: 14px; color: var(--text-neutral-subtle); }
.comment .c-when { margin-left: auto; font-size: 14px; color: var(--text-neutral-subtle); }
.comment .c-text { font-size: 13.5px; line-height: 1.55; color: var(--text-neutral-prominent); }
.comment-compose { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.comment-compose .inp { flex: 1; }

/* ----- Detail sidebar ----- */
.ds-block { margin-bottom: 18px; }
.ds-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-neutral-subtle); margin-bottom: 6px; }
.ds-kv { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: var(--text-neutral-normal); }
.ds-kv > span:first-child { color: var(--text-neutral-subtle); }
.ds-people { display: flex; flex-direction: column; gap: 6px; }
.ds-person { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.ds-role { color: var(--text-neutral-subtle); font-size: 13px; margin-left: auto; }

/* Activity feed */
.ds-activity .act-feed { display: flex; flex-direction: column; gap: 0; }
.act-item { display: flex; gap: 8px; padding: 8px 0; position: relative; }
.act-item:not(:last-child)::after { content: ''; position: absolute; left: 10px; top: 25px; bottom: -4px; width: 1.5px; background: var(--neutral-200); }
.act-item .act-ic { width: 22px; height: 22px; border-radius: 99px; background: var(--neutral-100); display: flex; align-items: center; justify-content: center; color: var(--text-neutral-subtle); flex: 0 0 auto; z-index: 1; border: 2px solid var(--bg); }
.act-item.bot .act-ic { background: linear-gradient(135deg, #7458db, #c084fc); color: #fff; }
.act-item .act-b { flex: 1; min-width: 0; padding-top: 2px; }
.act-item .act-w { font-size: 13px; line-height: 1.45; color: var(--text-neutral-prominent); }
.act-item .act-w strong { background: rgba(116,88,219,.12); padding: 0 3px; border-radius: 3px; color: var(--brand-700); font-weight: 600; }
.act-item .act-m { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-neutral-subtle); margin-top: 3px; }

/* ---------- OVERVIEW: ticket tiles ---------- */
.overview-ticket {
  padding: 14px 18px; border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background .15s;
}
.overview-ticket:last-child { border-bottom: 0; }
.overview-ticket:hover { background: var(--neutral-50); }
.ot-head { display: flex; align-items: center; gap: 8px; }
.ot-id { font-family: var(--font-mono); font-size: 14px; color: var(--text-neutral-subtle); font-weight: 500; }
.ot-title { font-size: 14px; font-weight: 600; color: var(--text-neutral-prominent); margin-top: 6px; letter-spacing: -0.005em; }
.ot-goal {
  font-size: 14px; color: var(--brand-700); margin-top: 8px; line-height: 1.5;
  background: rgba(116,88,219,.07); border-left: 2px solid var(--brand-400);
  padding: 5px 10px; border-radius: 0 5px 5px 0;
  font-style: italic;
}
.ot-progress { margin-top: 10px; }
.ot-progress .pbar { height: 6px; margin-bottom: 5px; border-radius: 99px; }
.ot-progress .pbar > i { border-radius: 99px; position: relative; }
.ot-progress .pbar > i::after {
  content: ''; position: absolute; right: 0; top: -2px;
  width: 10px; height: 10px; border-radius: 99px;
  background: inherit;
  box-shadow: 0 0 6px 2px currentColor;
  opacity: .7;
}
.ot-meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-neutral-subtle); font-variant-numeric: tabular-nums; }

.up-row { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.up-row:last-child { border-bottom: 0; }
.up-row:hover { background: var(--neutral-50); }
.up-date { width: 54px; text-align: center; flex: 0 0 auto; }
.up-date .d { font-size: 16px; font-weight: 700; color: var(--text-neutral-prominent); font-variant-numeric: tabular-nums; line-height: 1; }
.up-date .m { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-neutral-subtle); margin-top: 2px; }
.up-body { flex: 1; min-width: 0; }
.up-title { font-size: 13px; font-weight: 500; color: var(--text-neutral-prominent); }
.up-meta { font-size: 13px; color: var(--text-neutral-subtle); margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.up-meta .sep { color: var(--neutral-300); }

/* Shipped card */
.shipped-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
  overflow: hidden; position: relative;
}
.shipped-card:hover { border-color: var(--neutral-400); box-shadow: var(--shadow-sm); }
.shipped-card .sc-h { display: flex; align-items: center; gap: 8px; }
.shipped-card .sc-id { font-family: var(--font-mono); font-size: 14px; color: var(--text-neutral-subtle); }
.shipped-card .sc-date { margin-left: auto; font-size: 14px; color: var(--text-neutral-subtle); font-variant-numeric: tabular-nums; }
.shipped-card .sc-title { font-size: 13.5px; font-weight: 600; color: var(--text-neutral-prominent); margin-top: 8px; letter-spacing: -0.005em; }
.shipped-card .sc-goal { font-size: 13px; color: var(--text-neutral-subtle); margin-top: 4px; line-height: 1.5; display: none; }
.shipped-card .sc-outcome {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 10px 12px;
  background: rgba(21,128,61,.07); border-radius: 7px;
  border: 1px solid rgba(21,128,61,.15);
  font-variant-numeric: tabular-nums;
}
.shipped-card .sc-lab { color: var(--text-neutral-subtle); flex: 1; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.shipped-card .sc-from { color: var(--text-neutral-subtle); text-decoration: line-through; font-size: 13px; }
.shipped-card .sc-to { font-weight: 700; color: #15803d; font-size: 18px; font-family: var(--font-mono); }

/* Section header */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 24px 0 10px; }
.section-head .t { font-size: 15px; font-weight: 600; color: var(--text-neutral-prominent); }
.section-head .d { font-size: 13px; color: var(--text-neutral-subtle); margin-top: 2px; }

/* ---------- INTAKE: narrative request cards ---------- */
.intake-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.intake-card { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 20px 22px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.intake-card:hover { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(116,88,219,.1); }
.ic-head { display: flex; align-items: center; gap: 8px; }
.ic-id { font-family: var(--font-mono); font-size: 14px; color: var(--text-neutral-subtle); font-weight: 500; }
.ic-team { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 14px; font-weight: 500; }
.ic-team .d { width: 5px; height: 5px; border-radius: 99px; }
.ic-head .prio-chip { margin-left: auto; }
.ic-title { font-size: 18px; font-weight: 600; color: var(--text-neutral-prominent); letter-spacing: -0.01em; margin-top: 10px; line-height: 1.3; text-wrap: pretty; }
.ic-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-500); margin-bottom: 5px; }
.ic-goal { margin-top: 14px; padding: 12px 14px; background: rgba(116,88,219,.05); border-radius: 6px; border-left: 3px solid var(--brand-500); }
.ic-goal .ic-label { color: var(--brand-600); }
.ic-goal-text { font-size: 13px; line-height: 1.55; color: var(--text-neutral-prominent); }
.ic-problem { margin-top: 14px; }
.ic-problem .ic-label { color: var(--text-neutral-subtle); }
.ic-problem p { font-size: 14px; line-height: 1.55; color: var(--text-neutral-normal); margin: 0; }
.ic-problem p strong { font-weight: 600; color: var(--text-neutral-prominent); }
.ic-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.ic-reqs { display: flex; align-items: center; gap: 6px; }
.ic-req-name { font-size: 13px; color: var(--text-neutral-prominent); font-weight: 500; }
.ic-more { font-size: 14px; color: var(--text-neutral-subtle); background: var(--neutral-100); padding: 1px 6px; border-radius: 99px; }
.ic-actions { display: flex; gap: 2px; }

/* ---------- PLAYBOOKS ---------- */
.pb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pb-card { padding: 18px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; position: relative; overflow: hidden; }
.pb-card .pb-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.pb-card .pb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pb-card .pb-num { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.pb-card .pb-title { font-size: 16px; font-weight: 600; color: var(--text-neutral-prominent); }
.pb-card .pb-meta { font-size: 13px; color: var(--text-neutral-subtle); margin-top: 1px; }
.pb-card ul { margin: 6px 0; padding-left: 18px; }
.pb-card li { font-size: 14px; color: var(--text-neutral-normal); margin: 3px 0; line-height: 1.5; }
.pb-card .pb-section { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-neutral-subtle); margin-top: 12px; }
.pb-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-top: 4px; }

/* ---------- Tweaks panel ---------- */
.tweaks-panel {
  position: fixed; right: 20px; bottom: 20px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow-md);
  width: 260px; z-index: 100;
  font-family: var(--font-sans);
}
.tweaks-head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.tweaks-head .t { font-size: 13px; font-weight: 600; color: var(--text-neutral-prominent); display: flex; align-items: center; gap: 6px; }
.tweaks-body { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.tweak-row { display: flex; flex-direction: column; gap: 6px; }
.tweak-row label { font-size: 14px; font-weight: 500; color: var(--text-neutral-subtle); text-transform: uppercase; letter-spacing: 0.04em; }
.tweak-row .opts { display: flex; gap: 4px; }
.tweak-opt { flex: 1; padding: 6px 8px; font-size: 13px; text-align: center; border: 1px solid var(--border); border-radius: 5px; cursor: pointer; color: var(--text-neutral-normal); background: var(--bg); text-transform: capitalize; }
.tweak-opt:hover { background: var(--neutral-50); }
.tweak-opt.on { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.swatches { display: flex; gap: 6px; }
.swatch { width: 24px; height: 24px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.swatch.on { border-color: var(--text-neutral-prominent); box-shadow: 0 0 0 2px var(--bg) inset; }

/* ---------- Home: mission briefing header ---------- */
.home-greeting {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; gap: 16px;
}
.home-greeting-left { display: flex; flex-direction: column; gap: 6px; }
.hg-role {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-500);
}
.hg-role::before {
  content: ''; width: 6px; height: 6px; border-radius: 99px;
  background: var(--brand-500); box-shadow: 0 0 0 3px rgba(116,88,219,.2);
  animation: hg-pulse 2.4s infinite;
}
@keyframes hg-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(116,88,219,.2); }
  50%       { box-shadow: 0 0 0 6px rgba(116,88,219,.08); }
}
.hg-name {
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text-neutral-prominent); line-height: 1.1;
}
.hg-status {
  font-size: 14px; color: var(--text-neutral-subtle);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.hg-status .sep { color: var(--neutral-300); }
.hg-status .next-review {
  color: var(--text-neutral-prominent); font-weight: 500;
  background: var(--neutral-100); padding: 1px 7px; border-radius: 99px;
}
.home-greeting-actions { display: flex; gap: 8px; padding-top: 4px; }

/* ---------- Density compact ---------- */
.density-compact .page { padding: 14px 18px 30px; }
.density-compact .card-body { padding: 12px 14px; }
.density-compact .hero-cell { padding: 16px 18px; }
.density-compact .ticket-row { padding: 9px 14px; }
.density-compact .detail-main { padding: 20px 32px 60px; }
.density-compact .narr { margin-bottom: 18px; }
.density-compact .goal-hero { padding: 16px 18px; margin-bottom: 18px; }
.density-compact .gh-body { font-size: 15px; }
.density-compact .d-title h1 { font-size: 22px; }

/* ---------- Page head refinements ---------- */
.page-head .title-row { display: flex; align-items: center; gap: 12px; }
.page-head .title-row h1 { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -0.01em; color: var(--text-neutral-prominent); }
.page-head .actions { display: flex; gap: 8px; }
.page-head .title-row h1,
.hero-cell .hvalue,
.kanban-head h2,
.cmdk-item-title,
.cmdk-empty-title {
  font-family: var(--font-display);
}

/* ---------- Misc ---------- */
.stack { display: flex; flex-direction: column; gap: 12px; }
.mb-16 { margin-bottom: 16px; }
.num { font-variant-numeric: tabular-nums; }

.chart-callout {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(116,88,219,.1);
  color: var(--brand-700);
  font-size: 14px;
  font-weight: 600;
}
.overview-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.il-controls,
.layout-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.layout-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-neutral-subtle);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.layout-chip:hover { background: var(--neutral-50); color: var(--text-neutral-prominent); }
.layout-chip.on {
  background: rgba(116,88,219,.12);
  color: var(--brand-700);
  border-color: rgba(116,88,219,.24);
}

.layout-kanban { display: block; overflow: auto; padding: 18px 20px 28px; }
.kanban-shell { display: flex; flex-direction: column; gap: 14px; }
.kanban-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.kanban-head h2 {
  margin: 0;
  font-size: 22px;
  color: var(--text-neutral-prominent);
}
.kanban-sub {
  margin-top: 4px;
  color: var(--text-neutral-subtle);
  font-size: 13px;
  max-width: 620px;
}
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 12px;
  align-items: start;
}
.kanban-column {
  background: var(--neutral-50);
  border: 1px solid var(--border);
  border-radius: 14px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.kanban-column-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-neutral-prominent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}
.kanban-column-head .n {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--text-neutral-subtle);
}
.kanban-column-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kanban-empty {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 18px 14px;
  color: var(--text-neutral-subtle);
  font-size: 13px;
  text-align: center;
}
.kanban-card {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  padding: 14px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.kanban-card:hover {
  transform: translateY(-1px);
  border-color: rgba(116,88,219,.28);
  box-shadow: 0 12px 24px rgba(15,11,26,.08);
}
.kanban-card.active {
  border-color: rgba(116,88,219,.4);
  box-shadow: 0 0 0 3px rgba(116,88,219,.08);
}
.kanban-card-top,
.kanban-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kanban-card-id {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-neutral-subtle);
}
.kanban-card-title {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-neutral-prominent);
  line-height: 1.35;
}
.kanban-card-goal {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-neutral-normal);
  line-height: 1.55;
}
.kanban-card-foot { margin-top: 12px; }
.kanban-card-team {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
}
.kanban-card-team .d { width: 6px; height: 6px; border-radius: 999px; }
.kanban-card-unassigned {
  margin-left: auto;
  color: var(--text-neutral-subtle);
  font-size: 14px;
}

.cmdk-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 240;
}
.cmdk-panel {
  position: fixed;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 32px));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(15,11,26,.2);
  overflow: hidden;
  z-index: 241;
}
.cmdk-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.cmdk-input {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--text-neutral-prominent);
  font-size: 14px;
  outline: none;
}
.cmdk-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: var(--neutral-100);
  color: var(--text-neutral-subtle);
  cursor: pointer;
}
.cmdk-list {
  max-height: min(54vh, 480px);
  overflow: auto;
  padding: 8px;
}
.cmdk-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.cmdk-item:hover,
.cmdk-item.active { background: rgba(116,88,219,.08); }
.cmdk-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(116,88,219,.12);
  color: var(--brand-600);
}
.cmdk-item-icon.kind-ticket {
  background: rgba(37,99,235,.12);
  color: #2563eb;
}
.cmdk-item-icon.kind-view {
  background: rgba(22,163,74,.12);
  color: #15803d;
}
.cmdk-item-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.cmdk-item-title {
  color: var(--text-neutral-prominent);
  font-size: 14px;
  font-weight: 700;
}
.cmdk-item-sub {
  color: var(--text-neutral-subtle);
  font-size: 13px;
}
.cmdk-item-meta {
  margin-left: auto;
  color: var(--text-neutral-subtle);
  font-size: 14px;
  font-weight: 600;
}
.cmdk-empty {
  padding: 36px 20px;
  text-align: center;
}
.cmdk-empty-title {
  color: var(--text-neutral-prominent);
  font-size: 16px;
  font-weight: 700;
}
.cmdk-empty-sub {
  margin-top: 4px;
  color: var(--text-neutral-subtle);
  font-size: 13px;
}
.cmdk-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
  background: var(--neutral-50);
  color: var(--text-neutral-subtle);
  font-size: 14px;
}
.cmdk-foot kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-right: 4px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-neutral-prominent);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Scrollbars */
.il-body::-webkit-scrollbar, .detail-main::-webkit-scrollbar, .detail-side::-webkit-scrollbar { width: 8px; }
.il-body::-webkit-scrollbar-thumb, .detail-main::-webkit-scrollbar-thumb, .detail-side::-webkit-scrollbar-thumb { background: var(--neutral-200); border-radius: 99px; }

/* ============================================================
   INTAKE FORM SLIDE-OVER
   ============================================================ */

.so-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 6, 20, .52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 200;
  animation: so-fade .2s ease;
}
@keyframes so-fade { from { opacity: 0 } to { opacity: 1 } }

.so-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 560px;
  background: var(--bg);
  z-index: 201;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 48px rgba(10, 6, 20, .22);
  animation: so-slide .28s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes so-slide {
  from { transform: translateX(100%); opacity: .6; }
  to   { transform: translateX(0);    opacity: 1;  }
}

.so-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between;
  flex: 0 0 auto;
}
.so-head-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-neutral-prominent); }
.so-head-sub   { font-size: 13px; color: var(--text-neutral-subtle); margin-top: 3px; }

.so-body {
  flex: 1; overflow-y: auto; padding: 20px;
}
.so-body::-webkit-scrollbar { width: 6px; }
.so-body::-webkit-scrollbar-thumb { background: var(--neutral-200); border-radius: 99px; }

.so-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--neutral-50);
  display: flex; align-items: center; gap: 8px;
  flex: 0 0 auto;
}

/* ---- Form sections ---- */

.so-section {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--neutral-100);
}
.so-section:last-child { border-bottom: none; padding-bottom: 4px; }

.so-section-label {
  font-size: 13px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-neutral-subtle);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px;
}

.so-field { margin-bottom: 12px; }
.so-field:last-child { margin-bottom: 0; }

.so-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }

.so-label {
  display: block;
  font-size: 14px; font-weight: 500; color: var(--text-neutral-normal);
  margin-bottom: 5px;
}
.so-req  { color: #dc2626; }
.so-opt  { font-weight: 400; color: var(--text-neutral-subtle); }

.so-hint { font-size: 13px; color: var(--text-neutral-subtle); margin-bottom: 12px; line-height: 1.5; }

.so-errmsg { font-size: 14px; color: #dc2626; margin-top: 4px; font-weight: 500; }

.inp-err { border-color: #dc2626 !important; }
.inp-err:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .15) !important; }

.so-ta-lg { min-height: 100px; resize: vertical; line-height: 1.55; }
.so-ta-sm { min-height: 54px;  resize: vertical; line-height: 1.55; }

.so-select {
  font: inherit; font-size: 13px;
  padding: 7px 32px 7px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background-color: var(--bg); color: var(--text-neutral-prominent);
  outline: none; width: 100%; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2371717a' viewBox='0 0 256 256'%3E%3Cpath d='M213.66 101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.so-select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(116,88,219,.18); outline: none; }

/* Label multi-select chips */
.label-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.label-pick-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 99px;
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 500;
  cursor: pointer; user-select: none; background: var(--bg);
  color: var(--text-neutral-normal);
  transition: background .12s, border-color .12s;
}
.label-pick-chip:hover { background: var(--neutral-50); }

/* JTBD form block */
.jtbd-form-block {
  background: rgba(116, 88, 219, .04);
  border: 1px solid rgba(116, 88, 219, .18);
  border-radius: 8px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.jtbd-form-row { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: flex-start; }
.jtbd-form-kicker {
  font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-600); padding-top: 8px; line-height: 1;
}

/* Slack opt-in */
.slack-opt {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; color: var(--text-neutral-normal);
  cursor: pointer; user-select: none; margin-right: auto;
}
.slack-opt-ch { color: var(--brand-600); font-weight: 600; }

/* Intake empty state */
.intake-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 24px; text-align: center;
}
.ie-title { font-size: 17px; font-weight: 600; color: var(--text-neutral-prominent); margin-bottom: 6px; }
.ie-sub   { font-size: 13.5px; color: var(--text-neutral-subtle); max-width: 400px; line-height: 1.5; }

/* ============================================================
   TOASTS
   ============================================================ */

.toast-container {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: #18181b; color: #fff;
  padding: 11px 16px; border-radius: 8px;
  font-size: 13.5px; line-height: 1.35; font-weight: 400;
  box-shadow: 0 8px 24px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.14);
  pointer-events: all; white-space: nowrap;
  animation: toast-in .22s cubic-bezier(0.32, 0.72, 0, 1);
  max-width: 560px;
}
.toast.success { background: #15803d; }
.toast.error   { background: #b91c1c; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast a { color: rgba(255,255,255,.85); text-decoration: underline; }
.toast a:hover { color: #fff; }

/* ============================================================
   POLISH TWEAKS
   ============================================================ */

/* Overview ticket: left accent on hover */
.overview-ticket { border-left: 3px solid transparent; transition: background .15s, border-left-color .15s; }
.overview-ticket:hover { border-left-color: var(--brand-300); }

/* Goal hero: inset highlight */
.goal-hero { box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 0 0 1px rgba(116,88,219,.14); }

/* Intake card shadow */
.intake-card { box-shadow: var(--shadow-xs); }
.intake-card:hover { box-shadow: var(--shadow-sm); }

/* Detail head "Post to channel" button slight accent */
.dh-actions .btn-secondary:has(.ph-chat-circle) { border-color: rgba(116,88,219,.3); color: var(--brand-700); }
.dh-actions .btn-secondary:has(.ph-chat-circle):hover { background: rgba(116,88,219,.06); border-color: var(--brand-400); }

/* New ticket flash animation */
@keyframes row-flash {
  0%   { background: rgba(116,88,219,.16); border-left-color: var(--brand-500); }
  100% { background: transparent; }
}
.ticket-row.new-flash { animation: row-flash 1.4s ease forwards; }

/* Top bar new-request button */
.topbar .btn-primary { margin-left: 4px; }

/* ---------- Playbook examples (combined builds, Playbooks page) ---------- */
.playbook-examples {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}
.pex-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .15s;
}
.pex-card:hover {
  box-shadow: 0 0 0 1px var(--border), 0 8px 24px rgba(0,0,0,.08);
}
.pex-accent { height: 3px; }
.pex-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.pex-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pex-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.pex-pill {
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 99px;
}
.pex-title { font-size: 15px; font-weight: 700; color: var(--text-neutral-prominent); letter-spacing: -0.01em; line-height: 1.25; font-family: var(--font-display); }
.pex-problem { font-size: 14px; color: var(--text-neutral-subtle); line-height: 1.55; }
.pex-builds-label { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-neutral-muted); margin-bottom: 7px; }
.pex-build-chain { display: flex; flex-direction: column; gap: 5px; }
.pex-build-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-neutral-normal);
}
.pex-build-dot { width: 6px; height: 6px; border-radius: 99px; flex-shrink: 0; }
.pex-outcome {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--neutral-50); border-radius: 7px;
  border: 1px solid var(--border);
  font-size: 13px; color: var(--text-neutral-normal); line-height: 1.4;
}
.pex-outcome-arrow { font-size: 15px; color: var(--brand-500); font-weight: 700; flex-shrink: 0; }
.pex-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--neutral-50);
}
.pex-cta {
  background: none; border: 1px solid; border-radius: 6px;
  font-size: 13px; font-weight: 500; padding: 6px 14px;
  cursor: pointer; transition: opacity .15s; display: inline-flex; align-items: center; gap: 6px;
}
.pex-cta:hover { opacity: .7; }

/* ---------- Department catalog (Playbooks) ---------- */
.dept-catalog { display: flex; flex-direction: column; gap: 32px; padding-bottom: 48px; }

.dept-section { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }

.dept-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-left: 4px solid transparent;
  border-bottom: 1px solid var(--border);
  background: var(--neutral-50);
}
.dept-header-left { display: flex; align-items: center; gap: 14px; }
.dept-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dept-name { font-size: 15px; font-weight: 600; color: var(--text-neutral-normal); line-height: 1.3; }
.dept-tagline { font-size: 13px; color: var(--text-neutral-subtle); margin-top: 2px; }

.dept-bottlenecks { padding: 22px 28px 24px; border-bottom: 1px solid var(--border); }
.dept-bottleneck-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-neutral-muted); margin-bottom: 14px; }
.dept-bottleneck-list { display: flex; flex-direction: column; gap: 12px; }
.dept-bottleneck-item { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--text-neutral-normal); line-height: 1.55; }

.dept-builds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.dept-builds::after {
  content: '';
  display: none;
}
.dept-build-card {
  background: var(--bg);
  padding: 22px 24px 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: background .15s;
}
.dept-build-card:hover {
  background: var(--neutral-50);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--dept-color, var(--brand-500)) 15%, transparent);
}
/* Fill empty grid cells so the background border-color doesn't show through */
.dept-build-card-empty {
  background: var(--bg);
}

.dbc-top { display: flex; align-items: center; justify-content: space-between; }
.dbc-icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.dbc-complexity {
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 99px;
}
.dbc-title { font-size: 15px; font-weight: 600; color: var(--text-neutral-prominent); line-height: 1.3; letter-spacing: -0.005em; }
.dbc-desc { font-size: 14px; color: var(--text-neutral-subtle); line-height: 1.6; flex: 1; }
.dbc-cta {
  margin-top: 6px; align-self: flex-start;
  background: none; border: 1px solid; border-radius: 6px;
  font-size: 13px; font-weight: 500; padding: 5px 12px;
  cursor: pointer; transition: opacity .15s;
}
.dbc-cta:hover { opacity: .7; }

/* ============================================================
   ANIMATION ADDITIONS
   ============================================================ */

/* --- Count-up color shift (#1 & #7) --- */
@keyframes count-pulse {
  0%   { color: var(--brand-500); }
  60%  { color: var(--brand-500); }
  100% { color: inherit; }
}
.ib-value.counting { animation: count-pulse 1.1s ease forwards; }
/* hero-band hvalue counting: same pulse on white text */
.hero-cell .hvalue.counting { animation: count-pulse-white 1.1s ease forwards; }
@keyframes count-pulse-white {
  0%   { color: #a78bfa; }
  60%  { color: #a78bfa; }
  100% { color: #fff; }
}
/* accent/green variant counting — no shift needed, already colored */
.ib-value.accent.counting { animation: none; }
.ib-value.green.counting  { animation: none; }

/* --- Playbook example card stagger fade-in-up (#2) --- */
@keyframes pex-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.playbook-examples.animate .pex-card {
  animation: pex-in 360ms ease both;
}
.playbook-examples.animate .pex-card:nth-child(1) { animation-delay: 0ms; }
.playbook-examples.animate .pex-card:nth-child(2) { animation-delay: 60ms; }
.playbook-examples.animate .pex-card:nth-child(3) { animation-delay: 120ms; }
.playbook-examples.animate .pex-card:nth-child(4) { animation-delay: 180ms; }
.playbook-examples.animate .pex-card:nth-child(5) { animation-delay: 240ms; }
.playbook-examples.animate .pex-card:nth-child(6) { animation-delay: 300ms; }

/* --- Slide-over closing animation (#3) --- */
.so-panel.closing {
  animation: so-slide-out .26s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
.so-backdrop.closing {
  animation: so-fade-out .26s ease forwards;
}
@keyframes so-slide-out {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: .6; }
}
@keyframes so-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* --- Toast enter / exit animations (#4) --- */
@keyframes toast-enter {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
@keyframes toast-exit {
  from { opacity: 1; transform: translateY(0)   scale(1);   }
  to   { opacity: 0; transform: translateY(10px) scale(.96); }
}
.toast.entering {
  animation: toast-enter .28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.toast.exiting {
  animation: toast-exit .2s ease both;
}

/* --- Page transition (#5) --- */
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-transition {
  animation: page-fade-in .18s ease-out both;
}

/* --- Sidebar active indicator (#8) --- */
.sb-item { position: relative; overflow: hidden; }
.sb-item::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--brand-500);
  border-radius: 0 2px 2px 0;
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sb-item.active::before {
  transform: scaleY(1);
}

/* --- Command palette enter animation (#9) --- */
@keyframes cmdk-panel-in {
  from { opacity: 0; transform: translateX(-50%) scale(0.97); }
  to   { opacity: 1; transform: translateX(-50%) scale(1);    }
}
.cmdk-panel {
  animation: cmdk-panel-in .16s ease-out both;
}

/* --- Status chip "shipped" shimmer (#10) --- */
.status-chip.shipped-shimmer {
  position: relative;
  overflow: hidden;
}
.status-chip.shipped-shimmer::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; bottom: 0;
  width: 60%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255,255,255,.18) 50%,
    transparent 100%
  );
  animation: chip-shimmer 2.2s ease-in-out 1.2s infinite;
  pointer-events: none;
}
@keyframes chip-shimmer {
  from { left: -60%; }
  to   { left: 140%; }
}

/* ============================================================
   END ANIMATION ADDITIONS
   ============================================================ */

/* ---------- Impact band (Home overview) ---------- */
.impact-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: linear-gradient(135deg, #0f0c1e 0%, #1a1028 60%, #0a0614 100%);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}
.impact-band::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(192,175,255,0.07) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}
.ib-cell {
  background: transparent;
  padding: 22px 26px;
  border-right: 1px solid rgba(255,255,255,.06);
  position: relative; z-index: 1;
}
.ib-cell:last-child { border-right: 0; }
.ib-label {
  font-size: 13px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: 10px;
}
.ib-value {
  font-size: 48px; font-weight: 700; letter-spacing: -0.03em;
  color: #fff; font-variant-numeric: tabular-nums; line-height: 1;
  font-family: var(--font-mono);
}
.ib-unit { font-size: 20px; font-weight: 500; color: rgba(255,255,255,.35); margin-left: 2px; font-family: var(--font-mono); }
.ib-sub { font-size: 13px; color: rgba(255,255,255,.35); margin-top: 10px; line-height: 1.45; }
.ib-value.accent { color: #a78bfa; }
.ib-value.green  { color: #4ade80; }

/* ---------- Phase methodology grid (Playbooks) ---------- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}
.method-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.mc-header { display: flex; align-items: flex-start; gap: 10px; }
.mc-num {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--brand-500); color: #fff;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.mc-phase { font-size: 13px; font-weight: 600; color: var(--text-neutral-prominent); line-height: 1.2; }
.mc-dur { font-size: 14px; color: var(--text-neutral-subtle); margin-top: 2px; }
.mc-goals { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.mc-goal-row {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 13px; color: var(--text-neutral-normal); line-height: 1.45;
}
.mc-automations {
  display: flex; flex-direction: column; gap: 4px;
  padding-top: 8px; border-top: 1px solid var(--neutral-100);
}
.mc-auto-chip {
  display: flex; align-items: center; gap: 5px;
  font-size: 14px; color: var(--text-neutral-subtle); line-height: 1.4;
}

/* ---------- Sidebar new-request CTA ---------- */
.sb-new-req {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 7px 10px; margin-bottom: 4px;
  border-radius: 6px; border: 1px solid rgba(116,88,219,.32);
  background: rgba(116,88,219,.14); color: rgba(255,255,255,.9);
  font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background .15s ease, border-color .15s ease;
  text-align: left;
}
.sb-new-req:hover {
  background: rgba(116,88,219,.26);
  border-color: rgba(116,88,219,.5);
  color: #fff;
}
