/* ============ Tokens ============ */
:root {
  --bg: #0a0e17;
  --bg-2: #0d1320;
  --panel: #11182a;
  --panel-2: #141c30;
  --panel-3: #1a233a;
  --line: #1d2740;
  --line-2: #243152;
  --text: #e7ecf5;
  --text-2: #a7b0c4;
  --text-3: #6c7693;
  --muted: #4a5170;
  --brand: #6b8aff;
  --brand-2: #7a98ff;
  --brand-bg: rgba(107,138,255,0.10);
  --brand-bg-2: rgba(107,138,255,0.18);
  --brand-ring: rgba(107,138,255,0.35);
  --critical: #ff5e6b;
  --critical-bg: rgba(255,94,107,0.13);
  --high: #ffb547;
  --high-bg: rgba(255,181,71,0.13);
  --good: #3ec27b;
  --good-bg: rgba(62,194,123,0.15);
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 0 rgba(255,255,255,0.02) inset, 0 8px 24px rgba(0,0,0,0.30);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font-family: inherit; color: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1c2538; border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ App shell ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex: 0 0 248px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 20px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 8px 22px;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #5479ff 0%, #8c6dff 100%);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(86,116,255,0.35);
}
.brand-mark svg { width: 20px; height: 20px; color: white; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: 0.5px; }
.brand-sub { font-size: 10px; color: var(--text-3); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 3px; }

.nav-label { font-size: 11px; letter-spacing: 1.5px; color: var(--text-3); padding: 12px 10px 8px; text-transform: uppercase; font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--text-2); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background 0.15s, color 0.15s;
  width: 100%; text-align: left;
}
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active {
  background: var(--brand-bg);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--brand-ring);
}
.nav-item .ico { width: 18px; height: 18px; flex: 0 0 18px; opacity: 0.85; }
.nav-item .dot { width: 6px; height: 6px; background: var(--brand); border-radius: 50%; margin-left: auto; }
.nav-item .count {
  margin-left: auto;
  font-size: 11px; font-weight: 600;
  background: var(--panel-2); color: var(--text);
  padding: 2px 7px; border-radius: 6px;
  min-width: 22px; text-align: center;
}
/* Not-yet-built nav items: visible but inert, badged "Soon". */
.nav-item.soon { opacity: 0.42; cursor: not-allowed; }
.nav-item.soon:hover { background: none; color: var(--text-2); }
.nav-item .soon-tag {
  margin-left: auto;
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--panel-2); color: var(--text-3);
  padding: 2px 6px; border-radius: 6px;
}

.sidebar-foot { margin-top: auto; padding-top: 16px; }
.sidebar-user {
  padding: 12px; border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.sidebar-user .email { font-size: 12px; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .role { font-size: 10px; letter-spacing: 1.5px; color: var(--text-3); margin-top: 6px; }
.brief-confirm {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding: 10px 14px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 13px; color: var(--text-2);
}
.brief-confirm .ico { color: var(--brand-2); flex: 0 0 auto; }
.brief-confirm strong { color: var(--text); }
.brief-confirm .btn { margin-left: 2px; }
.brief-confirm .btn.ghost { margin-left: 0; }
.sidebar-user .credit-chip {
  margin-top: 10px;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-2);
  padding: 6px 9px; border-radius: 7px;
  background: var(--panel-2); border: 1px solid var(--line-2);
}
.sidebar-user .credit-chip strong { color: var(--brand-2); font-weight: 600; }
.sidebar-user .credit-chip .ico { color: var(--brand-2); flex: 0 0 auto; }
.sidebar-user .signout {
  margin-top: 10px; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; padding: 8px; border-radius: 7px;
  background: var(--panel-2); color: var(--text-2);
  border: 1px solid var(--line-2);
}
.sidebar-user .signout:hover { background: var(--panel-3); color: var(--text); }

/* ============ Main area ============ */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}
.search {
  flex: 1; max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 9px 14px; border-radius: 10px;
  color: var(--text-2);
}
.search input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font-size: 14px; }
.search input::placeholder { color: var(--text-3); }
.kbd {
  font-size: 11px; padding: 2px 6px; border-radius: 5px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text-3);
  font-family: 'Inter', sans-serif;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.tenders-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 9px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--text); font-size: 13px; font-weight: 500;
}
.tenders-btn:hover { background: var(--panel-2); }
.tenders-btn .pill {
  background: var(--critical); color: white;
  font-size: 11px; padding: 1px 7px; border-radius: 6px; font-weight: 600;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--panel); border: 1px solid var(--line);
  display: grid; place-items: center; position: relative;
  color: var(--text-2);
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn .badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--brand); color: white;
  font-size: 10px; font-weight: 700;
  border-radius: 9px; display: grid; place-items: center;
  border: 2px solid var(--bg);
}

.content { padding: 32px 32px 64px; max-width: 1500px; width: 100%; margin: 0 auto; }

/* ============ Page header ============ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-3); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600;
  margin-bottom: 12px;
}
.eyebrow .ico { width: 14px; height: 14px; }
.h1 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 800; font-size: 44px; line-height: 1.05;
  letter-spacing: -0.02em; margin: 0 0 12px;
}
.h-sub { color: var(--text-2); font-size: 15px; max-width: 720px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-head .actions { display: flex; gap: 10px; align-items: center; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 9px;
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  transition: all 0.15s;
}
.btn:hover { background: var(--panel-2); }
.btn.primary {
  background: var(--brand-bg-2); border-color: var(--brand-ring); color: var(--text);
}
.btn.primary:hover { background: rgba(107,138,255,0.25); }
.btn.solid { background: var(--brand); border-color: var(--brand); color: white; }
.btn.solid:hover { background: var(--brand-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel); color: var(--text); }
.btn.danger-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.danger-ghost:hover { color: var(--critical); }

/* ============ Cards ============ */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.card.hoverable:hover { border-color: var(--line-2); }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-h h3 { margin: 0; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.card-h .meta { font-size: 12px; color: var(--text-3); }

/* ============ Metrics ============ */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.metric { position: relative; padding: 22px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.metric .label { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.metric .num { font-family: 'Sora', sans-serif; font-size: 56px; font-weight: 700; line-height: 1; margin-top: 14px; letter-spacing: -0.02em; }
.metric .foot { font-size: 12px; color: var(--text-3); margin-top: 12px; }
.metric .corner { position: absolute; top: 18px; right: 18px; opacity: 0.4; }
.metric .corner.ok { color: var(--good); opacity: 1; }
.metric .corner.crit { color: var(--critical); opacity: 1; }
.metric.click { cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.metric.click:hover { border-color: var(--brand-ring); transform: translateY(-2px); }

/* ============ Your pipeline (dashboard strip) ============ */
/* Segmented stage bar: one colored block per stage, width proportional to its
   lead count, colors from STAGE_META so it reads like the tracker board. */
.pipe-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px 24px;
  margin-bottom: 24px; cursor: pointer; transition: border-color 0.15s;
}
.pipe-card:hover { border-color: var(--brand-ring); }
.pipe-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pipe-h h3 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pipe-side { display: flex; align-items: center; gap: 10px; }
.pipe-chip {
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 99px; border: 1px solid transparent;
}
.pipe-chip.quiet { color: #fdab3d; background: rgba(253,171,61,0.10); border-color: rgba(253,171,61,0.35); }
.pipe-chip.cold { color: #e2445c; background: rgba(226,68,92,0.10); border-color: rgba(226,68,92,0.35); }
.pipe-open { font-size: 13px; color: var(--brand-2); }
.pipe-bar { display: flex; gap: 3px; height: 26px; border-radius: 8px; overflow: hidden; }
.pipe-seg {
  flex-basis: 0; min-width: 26px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff;
  font-family: 'Sora', sans-serif;
}
.pipe-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.pipe-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.pipe-leg b { color: var(--text); font-weight: 600; }
.pipe-leg.empty { opacity: 0.45; }
.pipe-leg i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ============ AI insights ============ */
.insights {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px;
  margin-bottom: 24px;
}
.insights-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.insights-title { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; font-family: 'Sora',sans-serif; }
.insights-title .badge-auto { font-size: 10px; padding: 3px 7px; background: var(--panel-2); border-radius: 5px; color: var(--text-3); letter-spacing: 1px; font-weight: 600; font-family: 'Inter',sans-serif; }
.insights-title .glyph { width: 36px; height: 36px; border-radius: 9px; background: var(--brand-bg); display: grid; place-items: center; color: var(--brand); }
.insights-sub { color: var(--text-2); font-size: 13px; }
.insights-sub .warn { color: var(--critical); }
.insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.insight-card {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; background: rgba(255,255,255,0.01);
  display: flex; gap: 14px; align-items: flex-start;
  transition: border-color 0.15s;
}
.insights { overflow: hidden; }
.insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-width: 0; }
.insight-card { min-width: 0; }
.insight-body { min-width: 0; overflow: hidden; }
.insight-title { font-weight: 600; font-size: 14px; color: var(--text); white-space: normal; overflow-wrap: anywhere; word-break: break-word; line-height: 1.4; }
.insight-foot { line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.insight-card.crit { border-color: rgba(255,94,107,0.30); background: rgba(255,94,107,0.04); }
.insight-card.warn { border-color: rgba(255,181,71,0.25); background: rgba(255,181,71,0.03); }
.insight-card { cursor: pointer; }
.insight-card:hover { border-color: var(--brand-ring); }
.insight-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; flex: 0 0 32px;
}
.insight-icon.crit { background: var(--critical-bg); color: var(--critical); }
.insight-icon.warn { background: var(--high-bg); color: var(--high); }
.insight-body { flex: 1; min-width: 0; }
.insight-tags { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 11px; letter-spacing: 1px; font-weight: 600; }
.insight-tags .tag-p { color: var(--critical); }
.insight-tags .tag-p.p2 { color: var(--high); }
.insight-tags .tag-type { color: var(--text-3); }
.insight-title { font-weight: 600; font-size: 14px; color: var(--text); }
.insight-foot { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ============ Two-col charts ============ */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.bar-row { display: grid; grid-template-columns: 60px 1fr 80px; align-items: center; gap: 14px; margin: 14px 0; }
.bar-row .label { font-size: 11px; letter-spacing: 1.2px; color: var(--text-3); font-weight: 600; }
.bar { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; }
.bar-row .num { font-size: 12px; color: var(--text-2); text-align: right; }

.sector-row { display: grid; grid-template-columns: 160px 1fr 30px; align-items: center; gap: 14px; margin: 12px 0; }
.sector-row .label { font-size: 13px; color: var(--text-2); }
.sector-row .num { font-size: 12px; color: var(--text-2); text-align: right; }

/* ============ Activity / Top opps ============ */
.activity-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 24px; }
/* Cap the feed at roughly the height of the Top opportunities card and scroll
   inside — the raw feed (20 days of signals) was stretching the whole page. */
.act-scroll { max-height: 430px; overflow-y: auto; overflow-x: hidden; padding: 0 6px; margin: 0 -6px; }
.act-scroll::-webkit-scrollbar { width: 6px; }
.act-scroll::-webkit-scrollbar-thumb { background: var(--panel-2); border-radius: 99px; }
.act-scroll::-webkit-scrollbar-thumb:hover { background: var(--line); }
.act-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.act-day { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-3); padding: 16px 0 10px; font-weight: 600; }
.act-scroll > div:first-child > .act-day { padding-top: 4px; }
.act-item { display: flex; gap: 14px; padding: 10px 0; align-items: flex-start; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--critical); margin-top: 7px; flex: 0 0 8px; }
.act-item h4 { margin: 0 0 4px; font-size: 14px; font-weight: 500; }
.act-item .meta { font-size: 12px; color: var(--text-3); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wl-range { font-family: 'Inter', sans-serif; font-size: 13px; color: var(--text-1); background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 30px 7px 12px; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; }
.wl-range:hover { border-color: var(--brand-ring); }
.wl-range:focus { outline: none; border-color: var(--brand-2); }

.opp-row {
  display: grid; grid-template-columns: 28px 1fr auto auto;
  align-items: center; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.opp-row:last-child { border-bottom: 0; }
.opp-row .idx { font-size: 12px; color: var(--text-3); font-weight: 600; }
.opp-row .name { font-size: 14px; font-weight: 500; }
.opp-row .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.opp-row .score { font-size: 18px; font-weight: 700; font-family: 'Sora',sans-serif; }
.opp-row .score .of15 { font-size: 11px; font-weight: 500; color: var(--text-3); margin-left: 1px; }

/* ============ Badges ============ */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 6px;
  font-size: 10px; letter-spacing: 1.2px; font-weight: 600; text-transform: uppercase;
  background: var(--panel-2); color: var(--text-2);
  border: 1px solid var(--line-2);
}
.tag.high { background: rgba(255,181,71,0.10); color: var(--high); border-color: rgba(255,181,71,0.3); }
.tag.medium { background: rgba(107,138,255,0.10); color: #8aa4ff; border-color: rgba(107,138,255,0.3); }
.tag.low { background: var(--panel-2); color: var(--text-2); border-color: var(--line-2); }
.tag.crit { background: var(--critical-bg); color: var(--critical); border-color: rgba(255,94,107,0.3); }
.tag.good { background: var(--good-bg); color: var(--good); border-color: rgba(62,194,123,0.3); }
.tag.dm { background: var(--panel-2); color: var(--text-2); }
.tag.met { background: var(--good-bg); color: var(--good); border-color: rgba(62,194,123,0.3); }
.tag.notmet { background: var(--panel-2); color: var(--text-3); border-color: var(--line-2); }
.tag.upcoming { background: var(--brand-bg); color: var(--brand-2); border-color: var(--brand-ring); }
.tag.role { background: rgba(107,138,255,0.08); color: #8aa4ff; border-color: rgba(107,138,255,0.25); text-transform: lowercase; letter-spacing: 0; font-size: 11px; padding: 3px 10px; }
.tag.added { background: var(--good-bg); color: var(--good); border-color: rgba(62,194,123,0.3); }
.tag.removed { background: var(--critical-bg); color: var(--critical); border-color: rgba(255,94,107,0.3); }

/* Provenance badges — "who put this here?". Rounded pills with a color
   language of their own: violet gradient = machine-written (the shared visual
   grammar of AI features everywhere), green = a human typed it. Still quiet
   enough not to out-shout the tier/severity tags beside them. */
.tag.origin {
  padding: 2.5px 9px 2.5px 7px; font-size: 9px; letter-spacing: 0.8px; gap: 5px;
  white-space: nowrap; flex: none; border-radius: 999px;
}
.tag.origin-ai {
  background: linear-gradient(100deg, rgba(162,93,220,0.20), rgba(87,155,252,0.14));
  color: #c0a8ff; border-color: rgba(162,93,220,0.38);
}
.tag.origin-user {
  background: rgba(0,200,117,0.10); color: #4ed9a4; border-color: rgba(0,200,117,0.30);
}

/* Same identity on avatars: a thin ring says who produced the person's data
   before you read a single word. Violet = AI-enriched, green = user-entered. */
.avatar.av-ai   { box-shadow: 0 0 0 2px rgba(162,93,220,0.55); }
.avatar.av-user { box-shadow: 0 0 0 2px rgba(0,200,117,0.50); }

/* Lead profile — Monday-style stage stepper + snapshot stats */
.stage-stepper { margin-top: 16px; }
.stage-stepper-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.stage-seg {
  height: 10px; border-radius: 4px; padding: 0; cursor: pointer;
  background: var(--panel-3); border: 1px solid var(--line-2);
  transition: background .15s, border-color .15s;
}
.stage-seg.filled { border-color: transparent; }
.stage-seg:hover { border-color: var(--text-3); }
.stage-stepper-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; }
.stage-stepper-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.stage-lost-btn {
  background: none; border: none; cursor: pointer; color: var(--text-3); font-size: 11px;
  text-decoration: underline dotted; text-underline-offset: 3px;
}
.stage-lost-btn:hover { color: var(--critical); }

.lead-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.lead-stat {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 6px; text-align: center;
}
.lead-stat .v { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 18px; line-height: 1.1; }
.lead-stat .k { font-size: 9px; letter-spacing: .07em; color: var(--text-3); text-transform: uppercase; margin-top: 4px; }

/* Score donut — what earned the lead's 0-100 score (LeadDetail) */
.score-pie {
  display: flex; align-items: center; gap: 14px; margin-top: 12px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px;
}
.score-pie-legend { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.score-pie-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); position: relative; cursor: default; }
.score-pie-tip {
  display: none; position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 30;
  width: 230px; background: var(--panel-3); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 8px 10px; font-size: 11px; line-height: 1.5;
  color: var(--text-2); box-shadow: var(--shadow); font-weight: 500; white-space: normal;
}
.score-pie-row:hover .score-pie-tip { display: block; }
.score-pie-row i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.score-pie-lab { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-pie-row b { font-weight: 700; color: var(--text); }
.score-pie-max { font-weight: 500; color: var(--text-3); font-size: 11px; }

/* "Where you left off" chips — the brief's actionable footer */
.brief-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.brief-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text-2);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.brief-chip.next { color: var(--brand-2); border-color: var(--brand-ring); background: var(--brand-bg); }
.brief-chip.meet { color: #8aa4ff; border-color: rgba(107,138,255,0.3); background: rgba(107,138,255,0.10); }
.brief-chip.warn { color: var(--high); border-color: rgba(255,181,71,0.35); background: rgba(255,181,71,0.10); }
/* Going-cold (deal rotting) + healthy last-touch stamps. .cold gets its
   border/text color inline (amber quiet / red cold). */
.brief-chip.cold { background: rgba(226,68,92,0.08); font-weight: 600; }
.brief-chip.touch { color: var(--text-3); border-color: var(--line-2); background: var(--panel-2); }
/* "Where you left off" as three scannable fact tiles + one loud rot banner. */
.brief-cold-banner { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; border: 1px dashed; border-radius: 9px; padding: 8px 12px; margin-bottom: 12px; background: rgba(226,68,92,0.07); }
.brief-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.brief-cell { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; min-width: 0; }
.brief-cell .bc-k { display: flex; align-items: center; gap: 5px; font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 600; color: var(--text-3); margin-bottom: 7px; }
.brief-cell .bc-v { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brief-cell .bc-v.warn { color: var(--high); }
.brief-cell .bc-v.muted { color: var(--text-3); font-weight: 500; }
.brief-cell .bc-sub { font-size: 11px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brief-card .brief-body { margin-bottom: 12px; }
@media (max-width: 1100px) { .brief-grid { grid-template-columns: 1fr; } }
/* Tracker rows: the compact rotting tag. */
.tag.coldtag { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; flex: none; }
/* Stage playbook — one-click suggested next steps when a lead has no open
   step (Pipedrive's activity loop + "next best action"). */
.playbook { border: 1px dashed var(--brand-ring); background: var(--brand-bg); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.playbook-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--brand-2); margin-bottom: 9px; }
.playbook-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.playbook-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text-2); cursor: pointer; }
.playbook-chip:hover { border-color: var(--brand-ring); color: var(--text); background: var(--brand-bg); }
.playbook-chip:disabled { opacity: 0.5; cursor: default; }
.playbook-due { font-size: 10px; color: var(--text-3); }

/* Unified composer — one capture point for note/call/email/meeting/next step */
.compose-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px 18px; margin-bottom: 16px;
}
.compose-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.compose-tab {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line-2); color: var(--text-3);
  transition: background .12s, color .12s, border-color .12s;
}
.compose-tab:hover { color: var(--text-2); border-color: var(--text-3); }
.compose-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.compose-body { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Inputs used to inherit styling from .task-form/.meet-form wrappers that no
   longer exist here — style them directly. */
.compose-body input, .compose-body select {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; color: var(--text); font-size: 13px; outline: none;
  color-scheme: dark; min-width: 0;
}
.compose-body input:focus, .compose-body select:focus { border-color: var(--brand-ring); }
.compose-body .log-row { display: flex; gap: 10px; align-items: center; }
/* Meeting tab: inputs on one line, fast-booking chips on the next. */
.compose-body.compose-meet { flex-direction: column; align-items: stretch; }
.compose-meet .meet-form-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.compose-meet .meet-quick { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.compose-meet .meet-quick-lab { font-size: 10px; letter-spacing: 1px; font-weight: 600; color: var(--text-3); text-transform: uppercase; }
.compose-body .log-row input { flex: 1; }

/* Next-step plan — Monday to-do buckets */
.task-plan { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.task-bucket-h {
  display: flex; align-items: center; gap: 7px;
  font-family: 'Sora', sans-serif; font-size: 12.5px; font-weight: 700;
  letter-spacing: .03em; margin-bottom: 6px;
}
.task-bucket-ct { color: var(--text-3); font-weight: 500; font-size: 11px; }
.task-bucket-body {
  border-left: 3px solid; border-radius: 4px 10px 10px 4px;
  background: var(--panel-2); border-top: 1px solid var(--line);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 0 12px;
}
.task-bucket-body .task-item:first-child { border-top: none; }
/* Monday's struck-through "Meet client": a finished step reads as finished. */
.task-item.done .task-name { text-decoration: line-through; color: var(--text-3); }
.task-chip {
  flex: none; align-self: center; color: #fff; font-size: 9px; font-weight: 700;
  letter-spacing: .07em; padding: 3px 8px; border-radius: 5px;
}
.task-add-row {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px; cursor: pointer; font-size: 12.5px; font-weight: 600;
  color: var(--text-3); background: transparent;
  border: 1px dashed var(--line-2); border-radius: 10px;
  transition: color .12s, border-color .12s;
}
.task-add-row:hover { color: var(--brand-2); border-color: var(--brand-ring); }

/* Companies table: drop low-value columns as the window narrows so the table
   FITS instead of forcing a sideways scroll. Order is deliberate — Refreshed is
   the least load-bearing, Sector the most, and Company/Tier/Score/Signals are
   the four you actually scan, so they never drop. The data is still in the CSV
   export and on the company detail page; only this summary view sheds columns.
   Breakpoints are on the viewport, so they apply with the sidebar in place. */
@media (max-width: 1280px) { .table .c-refreshed, .table .c-industry { display: none; } }
@media (max-width: 1150px) { .table .c-certs,     .table .c-hq       { display: none; } }
@media (max-width: 1040px) { .table .c-contacts,  .table .c-website  { display: none; } }
@media (max-width: 920px)  { .table .c-sector     { display: none; } }
/* Last resort before a sideways scroll: let the action buttons stack instead of
   holding one wide nowrap line. Overrides the inline white-space on that cell. */
@media (max-width: 1040px) {
  .table td.c-actions { white-space: normal !important; }
  .table td.c-actions > * { margin-bottom: 4px; }
}

/* ============ Lead tracker — Monday-style stage groups ============ */
/* Each lifecycle stage renders as its own group: colored header with a count,
   a colored left rail, and the rows fused into one block with dividers instead
   of floating cards. Stage colors come from STAGE_META in screens.jsx. */
.lead-group { margin-bottom: 22px; }
.lead-group-head {
  display: flex; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer; padding: 0 0 8px;
  font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700;
  user-select: none;
}
.lead-group-count { color: var(--text-3); font-weight: 500; font-size: 12px; margin-left: 2px; }
.lead-group-body {
  border: 1px solid var(--line);
  border-left: 4px solid; /* color set inline per stage */
  border-radius: 6px 12px 12px 6px;
  overflow: hidden;
  background: var(--panel-2);
}
.lead-group-body .lead-row {
  border: none; border-bottom: 1px solid var(--line);
  border-radius: 0; margin-bottom: 0; background: transparent;
}
.lead-group-body .lead-row:last-child { border-bottom: none; }
.lead-group-body .lead-row:hover { background: var(--panel-3); }

/* Stage status pill — the select IS the colored status, Monday-style: solid
   stage color, white text, white chevron. The option list reverts to the
   normal popup colors on its own (options don't inherit the pill styling). */
.select-mini.stage-pill {
  color: #fff; border-color: transparent; font-weight: 700; text-align: center;
  min-width: 108px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
}
.select-mini.stage-pill option { background: var(--panel); color: var(--text); font-weight: 600; }
.select-mini.stage-new       { background-color: #579bfc; }
.select-mini.stage-contacted { background-color: #fdab3d; }
.select-mini.stage-engaged   { background-color: #a25ddc; }
.select-mini.stage-won       { background-color: #00c875; }
.select-mini.stage-lost      { background-color: #e2445c; }

/* ============ Tables ============ */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  font-weight: 600; color: var(--text-3); padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.table td { padding: 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.table tr:last-child td { border-bottom: 0; }
.table tr.row-h:hover td { background: rgba(255,255,255,0.015); }
/* overflow-x: auto so a wide table scrolls sideways on narrow screens instead
   of clipping its right-hand columns (Actions/Unlink); overflow-y: hidden keeps
   the rounded corners clean and avoids a spurious vertical scrollbar. */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow-x: auto; overflow-y: hidden; }
.co-cell { display: flex; align-items: center; gap: 12px; }
.co-cell .star { color: var(--text-3); cursor: pointer; }
.co-cell .star.on { color: var(--high); }
.co-name { font-weight: 500; color: var(--text); }
.co-url { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ============ Filters bar ============ */
.filters {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
}
.filter-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px; align-items: center; }
.filter-row + .filter-row { margin-top: 14px; }
.input, select.input {
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 9px 12px; border-radius: 9px;
  color: var(--text); font-size: 13px; width: 100%;
  outline: none; color-scheme: dark;
}
.input:focus { border-color: var(--brand-ring); }
.input::placeholder { color: var(--text-3); }
.filter-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 13px; color: var(--text-2); }
.filter-h .ico { width: 14px; height: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.slider {
  -webkit-appearance: none; width: 100%; height: 6px; background: var(--panel-2); border-radius: 99px; outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; background: var(--brand); border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(107,138,255,0.18);
}

/* ============ Lead tracker ============ */
.pipe-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 14px; }
.pipe-cell {
  padding: 18px; border-radius: 12px; background: var(--panel-2);
  border: 1px solid var(--line);
}
.pipe-cell .label { font-size: 11px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 600; }
.pipe-cell .num { font-family: 'Sora',sans-serif; font-size: 36px; font-weight: 700; margin-top: 8px; line-height: 1; }

.lead-row {
  display: grid; grid-template-columns: 40px 1fr auto auto auto auto;
  align-items: center; gap: 14px;
  padding: 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-2);
  margin-bottom: 10px;
}
.lead-row:hover { border-color: var(--line-2); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #5479ff, #8c6dff);
  display: grid; place-items: center;
  color: white; font-size: 13px; font-weight: 600;
}
.avatar.lg { width: 64px; height: 64px; font-size: 18px; }
.lead-name { font-weight: 500; color: var(--text); }
.lead-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
/* Next-step chip on a lead row: the soonest open follow-up. */
.lead-next {
  display: flex; align-items: center; gap: 7px; max-width: 220px;
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2);
}
.lead-next:hover { border-color: var(--line-2); }
.lead-next .lead-next-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.lead-next .lead-next-t { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-next .lead-next-due { font-size: 10.5px; color: var(--text-3); }
.lead-next.overdue { background: var(--bad-bg, rgba(239,90,90,0.12)); border-color: var(--bad, #ef5a5a); color: var(--bad, #ef5a5a); }
.lead-next.overdue .lead-next-due { color: var(--bad, #ef5a5a); font-weight: 600; }
.lead-next.empty { background: transparent; border-style: dashed; color: var(--text-3); font-size: 12px; opacity: 0; transition: opacity .12s; }
.lead-row:hover .lead-next.empty { opacity: 1; }

/* Column-header ⓘ popovers — the meaning of computed columns lives on the
   header itself: a small "i" chip, a styled card on hover. */
.th-info { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: help; }
.th-i {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  display: inline-grid; place-items: center;
  background: var(--panel-3); border: 1px solid var(--line-2); color: var(--text-3);
  font-size: 9px; font-weight: 700; font-style: normal; text-transform: lowercase;
}
.th-info:hover .th-i { border-color: var(--brand-ring); color: var(--brand-2); }
.th-pop {
  position: absolute; top: calc(100% + 9px); left: -8px; z-index: 60; width: 240px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 11px 13px; box-shadow: 0 14px 34px rgba(0,0,0,0.45);
  font-size: 11.5px; font-weight: 400; line-height: 1.55; color: var(--text-2);
  text-transform: none; letter-spacing: normal; white-space: normal;
  opacity: 0; visibility: hidden; transition: opacity .12s;
}
.th-info:hover .th-pop { opacity: 1; visibility: visible; }
.th-pop b { color: var(--text); font-weight: 600; }
.th-pop .pop-row { display: flex; align-items: center; gap: 7px; padding: 2px 0; }
.th-pop .pop-row i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Table pager: first / prev / page chip / next / last. */
.pg { display: flex; align-items: center; gap: 6px; }
.pg-btn {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px;
  color: var(--text-2); cursor: pointer; padding: 0;
  transition: border-color .12s, color .12s;
}
.pg-btn:hover:not(:disabled) { border-color: var(--brand-ring); color: var(--text); }
.pg-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pg-dbl { display: inline-flex; }
.pg-dbl :last-child { margin-left: -8px; }
.pg-cur {
  min-width: 58px; text-align: center; font-size: 12.5px; color: var(--text-3);
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 6px 10px;
}
.pg-cur b { color: var(--text); font-weight: 700; }
.pg-range { color: var(--text-2); background: var(--panel-2); border-radius: 6px; padding: 3px 8px; font-size: 12px; }

/* Companies table: score with a mini range bar (scaled to the filtered book)
   so hot accounts read as hot without decoding raw numbers. */
.score-cell { display: flex; flex-direction: column; gap: 4px; min-width: 44px; }
.score-cell b { font-weight: 700; font-size: 14px; }
.score-bar { display: block; width: 44px; height: 4px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.score-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* Company profile — "Your leads here" bridge strip + contact-card actions. */
.co-mywork {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 22px;
}
.cmw-h {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-2);
  margin-bottom: 10px;
}
.cmw-n { font-size: 12px; color: var(--brand-2); background: var(--brand-bg); border-radius: 20px; padding: 1px 8px; }
.cmw-list { display: flex; flex-direction: column; }
.cmw-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  padding: 9px 4px; cursor: pointer; border-radius: 6px; transition: background .1s;
}
.cmw-row:last-child { border-bottom: none; }
.cmw-row:hover { background: var(--panel-2); }
.cmw-av {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.cmw-nm { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.cmw-role { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.cmw-stage {
  flex-shrink: 0; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  color: #fff; border-radius: 99px; padding: 3px 10px;
}
.cmw-touch { flex-shrink: 0; font-size: 11px; color: var(--text-3); }
.cmw-go { flex-shrink: 0; color: var(--text-3); }
.cont-actions { margin-top: 10px; display: flex; }
.cont-btn { padding: 5px 12px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }

/* ===== My Day — cross-lead follow-ups + agenda ===== */
.md-hi { color: var(--critical); font-weight: 600; }
/* At-a-glance strip: same tile language as the dashboard metrics, colored top
   border per urgency so the numbers scan without reading the labels. */
.md-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 760px) { .md-stats { grid-template-columns: repeat(2, 1fr); } }
.md-stat {
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid;
  border-radius: var(--radius); padding: 12px 14px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.ms-n { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.ms-l { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-top: 4px; }
.md-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .md-grid { grid-template-columns: 1fr; } }
.md-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.md-section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.md-sec-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
  color: var(--text-2); text-transform: uppercase; border-bottom: 1px solid var(--line);
}
.md-sec-h .ico { vertical-align: -2px; margin-right: 5px; }
.md-sec-h.od { color: var(--critical); }
.md-sec-n { font-size: 12px; color: var(--text-3); background: var(--panel-3); border-radius: 20px; padding: 1px 8px; }
.md-sec-h.od .md-sec-n { color: var(--critical); background: var(--critical-bg); }
.md-list { display: flex; flex-direction: column; }
.md-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background .1s;
}
.md-item:last-child { border-bottom: none; }
.md-item:hover { background: var(--panel-2); }
.md-check {
  flex-shrink: 0; display: grid; place-items: center; width: 24px; height: 24px;
  background: transparent; border: none; padding: 0; cursor: pointer; color: var(--text-3);
  border-radius: 50%; transition: color .1s;
}
.md-check:hover { color: var(--good); }
.md-check.on { color: var(--good); }
.md-check:disabled { cursor: default; opacity: 0.7; }
.md-item.done .md-title { text-decoration: line-through; color: var(--text-3); }
.md-item.done .md-sub { text-decoration: line-through; }
.md-item.done .md-due { color: var(--good); font-weight: 600; }
.md-hide {
  flex-shrink: 0; display: grid; place-items: center; width: 24px; height: 24px;
  background: transparent; border: none; padding: 0; cursor: pointer;
  color: var(--text-3); border-radius: 6px; transition: color .1s, background .1s;
}
.md-hide:hover { color: var(--text); background: var(--panel-3); }
.md-hidden-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; padding: 8px 14px; font-size: 12.5px; color: var(--text-3);
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
}
.md-hidden-bar .ico { vertical-align: -1px; }
.md-showhidden {
  background: transparent; border: none; padding: 0; cursor: pointer;
  color: var(--brand); font-size: 12.5px; font-weight: 600;
}
.md-showhidden:hover { text-decoration: underline; }
.md-body { flex: 1; min-width: 0; line-height: 1.3; }
.md-title { font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-sub { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-co { color: var(--text-3); }
/* Who a row is about, made to pop: mini gradient avatar + bright name, and the
   company as its own little pill instead of a gray afterthought. */
.md-who { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; font-size: 12px; }
.md-av {
  width: 17px; height: 17px; border-radius: 50%; flex-shrink: 0;
  display: inline-grid; place-items: center;
  font-size: 8px; font-weight: 700; letter-spacing: 0.3px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.md-co-chip {
  display: inline-block; margin-left: 7px; padding: 1px 8px; border-radius: 99px;
  background: var(--panel-3); border: 1px solid var(--line-2);
  font-size: 10.5px; font-weight: 600; color: var(--text-2); letter-spacing: 0.2px;
  vertical-align: middle; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.md-sub { display: flex; align-items: center; }
.md-item.done .md-who { color: var(--text-3); }
.md-due { flex-shrink: 0; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.md-due.od { color: var(--critical); font-weight: 600; }
.md-mtime { flex-shrink: 0; display: grid; place-items: center; width: 24px; height: 24px; color: var(--brand); }
.md-empty { padding: 16px 14px; font-size: 12.5px; color: var(--text-3); }
.md-agenda { position: sticky; top: 16px; }
@media (max-width: 980px) { .md-agenda { position: static; } }
.md-cold-dot { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; margin: 0 8px 0 7px; }

/* My Day quick jot — capture-first: two seconds from thought to saved note. */
.md-jot { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.md-jot-h { font-size: 12px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.md-jot-ok { margin-left: auto; font-size: 11px; color: var(--good); text-transform: none; letter-spacing: 0; display: inline-flex; align-items: center; gap: 4px; }
.md-jot-input {
  width: 100%; margin-top: 10px; resize: vertical; min-height: 44px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px;
  color: var(--text); font-size: 13px; padding: 8px 10px; font-family: inherit;
}
.md-jot-input:focus { outline: none; border-color: var(--brand-ring); }
.md-jot-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.md-jot-foot a { font-size: 12px; color: var(--brand-2); cursor: pointer; }
.btn.sm { padding: 6px 12px; font-size: 12px; }

/* ===== Workpad — personal notes + idea board ===== */
.wp-add { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 22px; }
.wp-add-input {
  flex: 1; resize: vertical; min-height: 52px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); font-size: 14px; padding: 12px 14px; font-family: inherit;
}
.wp-add-input:focus { outline: none; border-color: var(--brand-ring); }
.wp-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1180px) { .wp-board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .wp-board { grid-template-columns: 1fr; } }

/* Opportunities: 5-stage pipeline reusing the Workpad column/card skeleton. */
.opp-board { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1350px) { .opp-board { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .opp-board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .opp-board { grid-template-columns: 1fr; } }
.opp-card { background: var(--panel-2); }
.opp-card.closed { opacity: .65; }
.opp-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 2px; }
.opp-co { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600;
  color: var(--text-2); background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 8px; max-width: 100%; }
.opp-co.link { cursor: pointer; }
.opp-co.link:hover { border-color: var(--brand-ring); color: var(--text); }
.opp-dl { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700;
  border-radius: 999px; padding: 2px 8px; cursor: pointer; border: 1px solid transparent; }
.opp-dl.ok   { color: var(--text-3); background: var(--panel); border-color: var(--line); }
.opp-dl.soon { color: #fdab3d; background: rgba(253,171,61,.12); }
.opp-dl.over { color: #ff5e6b; background: rgba(255,94,107,.13); }
.opp-dl.none { color: var(--text-3); border: 1px dashed var(--line); font-weight: 500; }
.opp-dl.none:hover { color: var(--text-2); border-color: var(--text-3); }
.opp-date-input { font-size: 11px; background: var(--panel); color: var(--text);
  border: 1px solid var(--brand-ring); border-radius: 6px; padding: 2px 6px; }
.opp-dl-edit { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.opp-dl-q { font-size: 10px; font-weight: 700; color: var(--text-2); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; cursor: pointer; }
.opp-dl-q:hover { border-color: var(--brand-ring); color: var(--text); }
.opp-dl-q.x { color: var(--text-3); border-style: dashed; }

/* @mention picker in the quick-add. */
.opp-addwrap { position: relative; flex: 1; display: flex; }
.opp-addwrap .wp-add-input { flex: 1; }
.opp-men { position: absolute; top: 100%; left: 0; margin-top: 4px; z-index: 40; min-width: 280px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 4px;
  box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.opp-men-g { display: flex; align-items: center; gap: 6px; padding: 6px 10px 3px; font-size: 9.5px;
  font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); }
.opp-men-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.opp-men-item b { color: var(--text); font-weight: 600; }
.opp-men-item:hover { background: var(--brand-bg); }
.opp-men-item.new { color: var(--brand-2); border-top: 1px dashed var(--line); border-radius: 0 0 7px 7px; }
.opp-men-sub { margin-left: auto; font-size: 10.5px; color: var(--text-3); }
.opp-pend { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
  color: var(--text); background: var(--brand-bg); border: 1px solid var(--brand-ring);
  border-radius: 999px; padding: 4px 10px; white-space: nowrap; align-self: center; }
.opp-pend i { font-style: normal; color: var(--text-3); cursor: pointer; padding: 0 2px; }
.opp-pend i:hover { color: var(--critical); }
.opp-stale { font-size: 10px; font-weight: 700; color: #fdab3d; border: 1px dashed rgba(253,171,61,.5);
  border-radius: 999px; padding: 1px 7px; }

/* AI suggestion strip above the board. */
.opp-sugg-wrap { margin-bottom: 14px; }
.opp-sugg-h { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.opp-sugg-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.opp-sugg { flex: 0 0 300px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.opp-sugg-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.opp-sev { font-size: 9px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; flex: 0 0 auto; }
.opp-sev.tender   { color: #a25ddc; background: rgba(162,93,220,.14); }
.opp-sev.critical { color: var(--critical); background: var(--critical-bg); }
.opp-sev.high     { color: #ff8a4d; background: rgba(255,138,77,.13); }
.opp-sugg-co { font-size: 11.5px; font-weight: 600; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opp-sugg-date { margin-left: auto; font-size: 10.5px; color: var(--text-3); flex: 0 0 auto; }
.opp-sugg-date.due { color: #fdab3d; font-weight: 700; }

/* ── Calendar diary (Outlook-style agenda + two attribution tracks) ── */
.cal-tracks { display: flex; gap: 8px; align-items: center; margin: 2px 0 18px; flex-wrap: wrap; }
.cal-track-chip {
  font-size: 12px; font-weight: 600; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--text-2); cursor: pointer;
  background: var(--panel-2); display: inline-flex; align-items: center; gap: 7px;
}
.cal-track-chip:hover { border-color: var(--brand-ring); }
.cal-track-chip.on { border-color: var(--brand-ring); background: var(--brand-bg-2); color: var(--text); }
.cal-track-chip i { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.cal-diary-wrap { display: flex; gap: 22px; align-items: flex-start; }
.cal-diary { flex: 1; min-width: 0; }
.cal-side { flex: 0 0 252px; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1100px) { .cal-side { display: none; } }
.diary-day { margin-bottom: 8px; }
.diary-day-h {
  font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 700;
  color: var(--text-3); padding: 16px 0 8px; border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.diary-day-h.today { color: var(--brand-2); border-bottom-color: var(--brand-ring); }
.diary-entry {
  display: flex; gap: 13px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 15px; margin-bottom: 10px;
}
.diary-entry.clickable { cursor: pointer; }
.diary-entry.clickable:hover { border-color: var(--line-2); background: var(--panel-2); }
.diary-entry.past { opacity: 0.6; }
.diary-entry.ghost { border-style: dashed; background: transparent; }
.diary-entry .title { font-weight: 600; font-size: 14px; }
.diary-entry .meta { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.diary-entry .desc { color: var(--text-2); font-size: 13px; margin-top: 6px; }
.de-rail { flex: 0 0 3px; border-radius: 3px; align-self: stretch; }
.de-time { flex: 0 0 96px; font-size: 12px; color: var(--text-2); font-weight: 600; padding-top: 3px; }
.de-body { flex: 1; min-width: 0; }
.mini-cal { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; }
.mini-cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 700; font-size: 13px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mini-dow { font-size: 9px; color: var(--text-3); text-align: center; padding: 2px 0; text-transform: uppercase; }
.mini-day {
  position: relative; font-size: 11px; color: var(--text-2); text-align: center;
  padding: 5px 0 10px; border-radius: 7px; cursor: pointer; border: none; background: none;
}
.mini-day:hover { background: var(--panel-3); }
.mini-day.today { background: var(--brand-bg-2); color: var(--text); font-weight: 700; }
.mini-day .dots { position: absolute; left: 0; right: 0; bottom: 3px; display: flex; gap: 2px; justify-content: center; }
.mini-day .dots i { width: 4px; height: 4px; border-radius: 999px; }
.opp-sugg-title { font-size: 12.5px; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.opp-sugg-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.opp-sugg-src { margin-left: auto; color: var(--text-3); display: inline-flex; }
.opp-sugg-src:hover { color: var(--text-2); }
.wp-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-width: 0; }
.wp-col-h {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-2);
}
.wp-col-n { font-size: 12px; color: var(--text-3); background: var(--panel-3); border-radius: 20px; padding: 1px 8px; font-weight: 600; }
.wp-col-hint { font-size: 11px; color: var(--text-3); margin: 3px 0 10px; }
.wp-col-list { display: flex; flex-direction: column; gap: 10px; }
.wp-note {
  border: 1px solid var(--line); border-left: 3px solid; border-radius: 10px;
  padding: 10px 12px 8px; transition: border-color .15s, opacity .15s;
  cursor: grab;
}
.wp-note:hover { border-color: var(--line-2); }
.wp-note.dragging { opacity: 0.35; cursor: grabbing; }
/* Jira-style drop target: the hovered column lights up while a card is in flight. */
.wp-col.drop { border-color: var(--brand-ring); background: var(--brand-bg); }
.wp-col.drop .wp-col-list { min-height: 40px; }
.wp-note-body { font-size: 13px; line-height: 1.5; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; }
.wp-note-edit {
  width: 100%; resize: vertical; background: var(--panel-2); border: 1px solid var(--brand-ring);
  border-radius: 8px; color: var(--text); font-size: 13px; padding: 8px 10px; font-family: inherit;
}
.wp-note-edit:focus { outline: none; }
.wp-note-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.wp-ago { font-size: 10.5px; color: var(--text-3); }
.wp-tools { display: inline-flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.wp-note:hover .wp-tools { opacity: 1; }
.wp-tool {
  width: 22px; height: 22px; display: grid; place-items: center;
  background: transparent; border: none; padding: 0; cursor: pointer;
  color: var(--text-3); border-radius: 5px; transition: color .1s, background .1s;
}
.wp-tool:hover { color: var(--text); background: var(--panel-3); }
.wp-tool.del:hover { color: var(--critical); background: var(--critical-bg); }
.wp-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.wp-empty { font-size: 12px; color: var(--text-3); padding: 6px 2px 4px; }
.lead-tags { display: flex; align-items: center; gap: 8px; }
.select-mini {
  background: var(--panel-3); border: 1px solid var(--line-2); color: var(--text); font-size: 12px; padding: 6px 22px 6px 10px; border-radius: 6px; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236c7693' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 6px center;
  text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
}
.iconlink {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 6px; color: var(--text-3);
}
.iconlink:hover { background: var(--panel-3); color: var(--text); }
.lead-del-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 9px; color: var(--text-3);
  background: var(--panel-3); border: 1px solid var(--line-2);
  transition: all 0.15s;
}
.lead-del-btn:hover { background: var(--critical-bg); border-color: rgba(255,94,107,0.4); color: var(--critical); }

/* ============ Calendar ============ */
.cal-suggested { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.suggest-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px;
}
.suggest-card.high { border-color: rgba(255,181,71,0.25); }
.suggest-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 11px; }
.suggest-h .pp { letter-spacing: 1.2px; font-weight: 700; text-transform: uppercase; }
.suggest-h .pp.high { color: var(--high); }
.suggest-h .pp.medium { color: var(--text-2); }
.suggest-h .co { color: var(--text); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.suggest-h .co .ico { width: 12px; height: 12px; }
.suggest-name { font-size: 18px; font-weight: 600; font-family: 'Sora',sans-serif; margin: 6px 0 8px; }
.suggest-body { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.suggest-sig { font-size: 12px; color: var(--text-3); font-style: italic; margin-bottom: 14px; }
.suggest-sig em { color: var(--text-2); font-style: normal; }
.suggest-actions { display: flex; gap: 8px; }

.meet-day { font-size: 11px; letter-spacing: 1.5px; color: var(--text-3); padding: 18px 0 8px; font-weight: 600; }
.meet-row {
  display: grid; grid-template-columns: 1fr auto;
  padding: 16px 18px; border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  margin-bottom: 8px;
  gap: 14px;
}
.meet-row .title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.meet-row .meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.meet-row .desc { font-size: 13px; color: var(--text-2); margin-top: 8px; }

/* ============ Tasks ============ */
.assign-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.assign-h { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: var(--brand); margin-bottom: 18px; font-family: 'Sora',sans-serif; }
.assign-h .ico { color: var(--brand); }
.field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.field input, .field select, .field textarea { background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; color: var(--text); font-size: 13px; outline: none; }
.field textarea { min-height: 110px; resize: vertical; font-family: inherit; }
.assignees { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.assignee {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 8px; font-size: 13px;
}
.assign-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 22px 0 18px; }
.tab { padding: 12px 14px; font-size: 14px; color: var(--text-3); border-bottom: 2px solid transparent; cursor: pointer; }
.tab.active { color: var(--text); border-bottom-color: var(--brand); }
.view-toggle { display: inline-flex; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; gap: 2px; }
.view-toggle button { display: flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 6px; color: var(--text-3); font-size: 13px; }
.view-toggle button.active { background: var(--panel-3); color: var(--text); }

/* ============ Library ============ */
.lib-search { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; }
.lib-search input { background: none; border: 0; outline: none; flex: 1; color: var(--text); font-size: 14px; }
.lib-item {
  display: grid; grid-template-columns: 48px 1fr auto;
  gap: 16px; align-items: center;
  padding: 18px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; margin-bottom: 10px;
}
.lib-item .file-ico { width: 48px; height: 48px; background: var(--panel-3); border-radius: 9px; display: grid; place-items: center; color: var(--text-2); }
.lib-item .name { font-weight: 500; }
.lib-item .meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.drop {
  margin-top: 14px;
  padding: 38px; text-align: center;
  background: var(--panel-2); border: 1px dashed var(--line-2);
  border-radius: 12px; color: var(--text-3); font-size: 13px;
}
.drop .ico { width: 28px; height: 28px; opacity: 0.5; margin-bottom: 8px; }

/* ============ Compare ============ */
.cmp-head { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 20px; position: relative; }
.cmp-add { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; font-size: 13px; color: var(--text); min-width: 220px; justify-content: space-between; cursor: pointer; }
.cmp-menu {
  position: absolute; top: calc(100% + 6px); right: 178px;
  background: var(--panel-3); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 0; min-width: 260px; overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  z-index: 20;
}
.cmp-menu button { display: block; width: 100%; text-align: left; padding: 9px 16px; font-size: 13px; color: var(--text); }
.cmp-menu button:hover { background: var(--panel-2); }
.cmp-menu .sel { color: var(--brand-2); background: var(--brand-bg); }
.cmp-table {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.cmp-row { display: grid; grid-template-columns: 200px 1fr 1fr; border-bottom: 1px solid var(--line); }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row > div { padding: 22px; }
.cmp-row .attr { color: var(--text-3); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; }
.cmp-row .head-cell { position: relative; padding-bottom: 28px; }
.cmp-row .head-cell h3 { margin: 0; font-family: 'Sora',sans-serif; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.cmp-row .head-cell .url { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.cmp-row .head-cell .close { position: absolute; top: 18px; right: 18px; color: var(--text-3); cursor: pointer; }
.cmp-row .head-cell .close:hover { color: var(--critical); }
.cmp-row .val { color: var(--text); font-size: 14px; }
.cmp-row .val.big { font-size: 26px; font-weight: 700; font-family: 'Sora',sans-serif; }
.cmp-sig { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; font-size: 13px; line-height: 1.45; }
.cmp-sig:first-child { padding-top: 0; }
.cmp-sig + .cmp-sig { border-top: 1px solid var(--line); }
.cmp-sig .tag { flex: 0 0 auto; margin-top: 1px; }
.cmp-contact { font-size: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cmp-contact .cmp-contact-id { min-width: 0; }
.cmp-contact .nm { display: flex; align-items: center; gap: 6px; }
.cmp-contact .role { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cmp-contact + .cmp-contact { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.cmp-tracked { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--brand-2); background: var(--brand-bg); border: 1px solid var(--brand-ring); padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.cmp-addlead { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--line-2); padding: 3px 8px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.cmp-addlead:hover:not(:disabled) { color: var(--brand-2); border-color: var(--brand-ring); background: var(--brand-bg); }
.cmp-addlead:disabled { opacity: 0.5; cursor: not-allowed; }
.cmp-add.disabled { opacity: 0.5; cursor: not-allowed; }
.cmp-menu-filter { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.cmp-menu-filter .meet-tz { width: 100%; }
.cmp-menu-list { max-height: 320px; overflow-y: auto; padding: 6px 0; }
.cmp-menu .cmp-menu-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cmp-menu .cmp-menu-list button .sec { font-size: 11px; color: var(--text-3); flex: 0 0 auto; }
.cmp-menu-empty { padding: 12px 16px; font-size: 13px; color: var(--text-3); }
.cmp-empty { background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); padding: 64px 22px; text-align: center; color: var(--text-3); font-size: 14px; }
.cmp-na { color: var(--text-3); }
.cmp-row .val.big.cmp-best { color: var(--brand-2); display: flex; align-items: baseline; gap: 8px; }
.cmp-best-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--brand-2); background: var(--brand-bg); border: 1px solid var(--brand-ring); padding: 2px 7px; border-radius: 99px; font-family: 'Inter', sans-serif; }
.cmp-certs { display: flex; flex-wrap: wrap; gap: 6px; }
.cmp-cert { font-size: 12px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-2); }

/* ============ Team ============ */
.team-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.emp-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.emp-list h4 { margin: 0 0 14px; font-size: 12px; color: var(--text-3); letter-spacing: 1.2px; text-transform: uppercase; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.emp-card {
  padding: 14px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  cursor: pointer;
}
.emp-card:hover, .emp-card.active { border-color: var(--brand-ring); background: var(--brand-bg); }
.emp-card .name { font-weight: 500; }
.emp-card .email { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.emp-detail { display: flex; flex-direction: column; gap: 16px; }
.emp-head { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.emp-head .ttl { font-family: 'Sora',sans-serif; font-size: 26px; font-weight: 700; }
.emp-head .em { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.emp-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.remarks-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.remarks-h { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; margin-bottom: 14px; color: var(--brand-2); }
.remark-input { display: flex; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.remark-input input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font-size: 14px; }
.remark-send { width: 36px; height: 36px; border-radius: 9px; background: var(--brand-bg); border: 1px solid var(--brand-ring); display: grid; place-items: center; color: var(--brand-2); }
.no-rem { text-align: center; color: var(--text-3); padding: 32px; font-size: 13px; }

/* ============ Admin ============ */
.admin-bulk { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.admin-bulk .lab { color: var(--text-2); font-size: 14px; }
.admin-bulk .ctrls { display: flex; gap: 8px; align-items: center; }
.role-table th { background: transparent; }
.role-table td { vertical-align: middle; }
.cb { width: 16px; height: 16px; border: 1.5px solid var(--line-2); border-radius: 4px; background: transparent; display: inline-block; vertical-align: middle; cursor: pointer; position: relative; }
.cb.on { background: var(--brand); border-color: var(--brand); }
.cb.on::after { content: ''; position: absolute; left: 3.5px; top: 0px; width: 5px; height: 9px; border-right: 2px solid white; border-bottom: 2px solid white; transform: rotate(45deg); }

/* ============ Side panels ============ */
.panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.panel-overlay.open { opacity: 1; pointer-events: auto; }
.side-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px;
  background: var(--bg-2); border-left: 1px solid var(--line);
  z-index: 101; padding: 24px; overflow-y: auto;
  transform: translateX(100%); transition: transform 0.25s ease;
}
.side-panel.open { transform: translateX(0); }
.panel-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.panel-h h3 { margin: 0; font-size: 22px; font-weight: 700; font-family: 'Sora',sans-serif; display: flex; align-items: center; gap: 10px; }
.panel-x { width: 28px; height: 28px; display: grid; place-items: center; color: var(--text-3); border-radius: 6px; }
.panel-x:hover { background: var(--panel); color: var(--text); }
.panel-sub { color: var(--text-2); font-size: 13px; margin-bottom: 18px; }
.panel-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.notif-tabs { display: flex; gap: 4px; padding: 3px; background: var(--panel); border-radius: 9px; }
.notif-tabs button { padding: 7px 12px; font-size: 12px; color: var(--text-3); border-radius: 6px; }
.notif-tabs button.active { background: var(--panel-3); color: var(--text); }
.mark-read { font-size: 12px; color: var(--brand-2); display: inline-flex; gap: 6px; align-items: center; }
.notif-item { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.notif-item:last-child { border-bottom: 0; }
.notif-ico { width: 28px; height: 28px; border-radius: 7px; background: var(--panel); display: grid; place-items: center; color: var(--text-2); flex: 0 0 28px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 500; }
.notif-desc { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.notif-time { font-size: 11px; color: var(--text-3); margin-top: 6px; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-top: 7px; flex: 0 0 7px; }

.tend-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tend-tabs button { padding: 6px 14px; font-size: 12px; border-radius: 7px; background: var(--panel); color: var(--text-2); border: 1px solid var(--line); }
.tend-tabs button.active { background: var(--brand-bg-2); color: var(--text); border-color: var(--brand-ring); }
.tender {
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.tender-h { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.tender-h .ico { width: 22px; height: 22px; color: var(--critical); flex: 0 0 22px; margin-top: 2px; }
.tender-tags { font-size: 10px; letter-spacing: 1.2px; font-weight: 700; color: var(--text-3); display: flex; gap: 10px; align-items: center; }
.tender-tags .crit { color: var(--critical); }
.tender-tags .div { width: 3px; height: 3px; background: var(--text-3); border-radius: 50%; }
.tender h4 { margin: 6px 0 8px; font-size: 15px; font-weight: 600; font-family: 'Sora',sans-serif; line-height: 1.3; }
.tender .agency { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.tender p { font-size: 12px; color: var(--text-2); margin: 0 0 14px; line-height: 1.5; }
.tender p em { color: var(--text); font-weight: 500; font-style: normal; }
.tender-foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: 12px; }
.tender-foot .pill { padding: 4px 10px; border-radius: 7px; background: var(--panel-2); color: var(--text); font-weight: 500; }
.tender-foot .left { display: flex; gap: 10px; align-items: center; }
.tender-foot .red { color: var(--critical); display: inline-flex; align-items: center; gap: 4px; }
.tender-foot .right { display: flex; gap: 8px; align-items: center; }
.tender-foot .acct { color: var(--brand-2); }
.tender-foot .portal { color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 7px; }

/* ============ Lead detail ============ */
.lead-detail { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: flex-start; }
.lead-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lead-profile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
/* Notes: personal sticky-note panel under the profile — amber, unmissable,
   separate from the interaction timeline. */
.notes-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.notes-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.notes-h .lab { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.notes-h .ct { color: var(--text-3); font-size: 12px; }
.note-add { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.note-add textarea { width: 100%; resize: vertical; min-height: 44px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--text); font-size: 13px; font-family: inherit; line-height: 1.5; }
.note-add textarea::placeholder { color: var(--text-3); }
.note-add textarea:focus { outline: none; border-color: var(--brand-ring); }
.note-add .btn { align-self: flex-end; padding: 6px 12px; font-size: 12px; }
.notes-scroll { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.note-item { background: rgba(253,171,61,0.07); border: 1px solid rgba(253,171,61,0.22); border-left: 3px solid #fdab3d; border-radius: 10px; padding: 10px 12px; }
.note-body { font-size: 13px; color: var(--text); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.note-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; min-height: 18px; }
.note-ago { font-size: 11px; color: var(--text-3); }
.note-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.note-item:hover .note-actions { opacity: 1; }
.note-undo { display: flex; align-items: center; justify-content: space-between; color: var(--text-3); font-size: 12px; }
.lead-profile .ph { display: flex; align-items: center; gap: 14px; }
.lead-profile .name { font-family: 'Sora',sans-serif; font-size: 22px; font-weight: 700; margin: 0; }
.lead-profile .role { color: var(--text-3); font-size: 13px; }
.lead-profile .tagrow { display: flex; gap: 8px; margin: 16px 0; }
.lead-profile .meta-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.lead-profile .meta-list .row { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; }
.lead-profile .meta-list .row .ico { color: var(--text-3); width: 16px; height: 16px; flex: none; }
/* Channel value truncates so the AI/You provenance badge always fits. */
.lead-profile .meta-list .row .chan-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lifecycle { margin-top: 18px; }
.lifecycle .lab { font-size: 11px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 600; margin-bottom: 8px; }
.score-block { margin-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.score-ring { width: 140px; height: 140px; position: relative; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.score-ring .num { font-family: 'Sora',sans-serif; font-size: 34px; font-weight: 800; line-height: 1; text-align: center; }
.score-ring .lab { font-size: 10px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 600; text-align: center; }
.score-state { font-size: 11px; letter-spacing: 2px; color: var(--brand-2); font-weight: 700; }
.brief-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 16px; }
.brief-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.brief-h .lab { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.brief-h .lab .dot { width: 7px; height: 7px; background: var(--brand); border-radius: 50%; }
.brief-h .time { font-size: 10px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 600; }
.brief-body { font-size: 14px; color: var(--text); line-height: 1.6; }
.brief-body .brief-line + .brief-line { margin-top: 7px; }
.brief-body .brief-line:first-child { color: var(--text); font-weight: 600; }
.brief-body .brief-line:not(:first-child) { color: var(--text-2); }
.brief-body em { color: var(--high); font-style: normal; font-weight: 500; }
.brief-body code { background: var(--panel-2); color: var(--text); padding: 2px 6px; border-radius: 4px; font-size: 13px; font-family: 'JetBrains Mono', ui-monospace, monospace; }
/* Spinner for in-flight buttons (Mark met / Remove / etc.). */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.7s linear infinite; transform-origin: center; }
button:disabled { opacity: 0.65; cursor: default; }

/* Follow-up tasks (next steps) — CRM discipline panel on the lead detail. */
.task-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 16px; }
.task-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.task-h .lab { display: flex; align-items: center; gap: 8px; color: var(--brand-2); font-size: 14px; }
.task-h .ct { color: var(--text-3); font-size: 12px; }
.task-form { display: flex; flex-direction: column; gap: 10px; padding: 0 0 12px; }
.task-form input { background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; color: var(--text); font-size: 13px; outline: none; color-scheme: dark; width: 100%; box-sizing: border-box; }
.task-form input:focus { border-color: var(--brand-ring); }
.task-form-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.task-list { display: flex; flex-direction: column; }
.task-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.task-check { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px; border: 1.5px solid var(--line-2, var(--line)); background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .12s, border-color .12s; }
.task-check:hover { border-color: var(--brand-2); }
.task-check.on { background: var(--good, #3fb984); border-color: var(--good, #3fb984); }
.task-body { flex: 1; min-width: 0; }
.task-name { font-size: 13.5px; color: var(--text); line-height: 1.45; }
.task-due { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; font-size: 11px; color: var(--text-3); }
.task-due .task-due-lab { font-weight: 600; }
.task-due .task-due-when { color: var(--text-3); opacity: .85; }
.task-due.overdue { color: var(--bad, #ef5a5a); }
.task-due.overdue .task-due-when { color: var(--bad, #ef5a5a); opacity: .8; }
.task-item.done .task-name { color: var(--text-3); text-decoration: line-through; }
.task-item.done .task-due { text-decoration: none; }
.task-actions { display: flex; align-items: center; gap: 2px; opacity: 0; transition: opacity .12s; }
.task-item:hover .task-actions { opacity: 1; }
/* inline edit row */
.task-item.task-edit { flex-direction: column; align-items: stretch; gap: 10px; }
.task-edit input { background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; color: var(--text); font-size: 13px; outline: none; color-scheme: dark; width: 100%; box-sizing: border-box; }
.task-edit input:focus { border-color: var(--brand-ring); }
.task-edit-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }

.log-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 16px; }
.log-h { display: flex; align-items: center; justify-content: space-between; font-size: 14px; margin-bottom: 14px; }
.log-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.log-row select { background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 28px 10px 12px; color: var(--text); font-size: 13px; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236c7693' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 8px center; }
.log-row input { background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; color: var(--text); font-size: 13px; outline: none; }
.log-send { width: 38px; height: 38px; border-radius: 9px; background: var(--good-bg); border: 1px solid rgba(62,194,123,0.35); color: var(--good); display: grid; place-items: center; }
.act-rsp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.act-rsp-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.act-rsp-card .ch { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.act-rsp-card .ch .ttl { font-size: 14px; font-weight: 500; }
.act-rsp-card .ch .ct { color: var(--text-3); font-size: 12px; }
.act-row { padding: 14px 0; border-top: 1px solid var(--line); }
.act-row .meta-line { display: flex; align-items: center; justify-content: space-between; font-size: 10px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 600; margin-bottom: 6px; }
.act-row .meta-line .name { color: var(--text); font-weight: 600; letter-spacing: 1.2px; }
.act-row .meta-line .ago { color: var(--text-3); letter-spacing: 0; text-transform: none; font-weight: 400; font-size: 12px; }
.act-row .body { font-size: 13px; color: var(--text); }

/* Log activity: direction toggle (You / lead) + type select on one control row */
.log-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.log-controls select { background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 28px 9px 12px; color: var(--text); font-size: 13px; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236c7693' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 8px center; }
.dir-toggle { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; }
.dir-opt { padding: 8px 16px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--text-3); background: transparent; border: none; cursor: pointer; transition: background .12s, color .12s; }
.dir-opt:hover { color: var(--text); }
.dir-opt.on { background: var(--brand-2); color: #fff; }
.dir-opt.them.on { background: var(--good); color: #04130b; }

/* Unified activity timeline (replaces the two-column my-actions / responses split) */
.timeline-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.timeline-card .ch { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.timeline-card .ch .ttl { font-size: 14px; font-weight: 500; }
.timeline-card .ch .ct { color: var(--text-3); font-size: 12px; }
/* List scrolls inside the card so the timeline never grows the page unbounded. */
.tl-scroll { max-height: 430px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.tl-row { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.tl-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.tl-dot.you { background: var(--brand-bg, rgba(106,140,255,0.14)); color: var(--brand-2); }
.tl-dot.them { background: var(--good-bg); color: var(--good); }
.tl-main { flex: 1; min-width: 0; }
.tl-meta { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: 1.2px; color: var(--text-3); font-weight: 600; margin-bottom: 5px; text-transform: uppercase; }
.tl-who { color: var(--text); font-weight: 700; letter-spacing: 1px; }
.tl-type { color: var(--text-3); }
.tl-ago { margin-left: auto; letter-spacing: 0; text-transform: none; font-weight: 400; font-size: 12px; }
.tl-body { font-size: 13px; color: var(--text); word-break: break-word; }
.tl-empty { padding: 18px 2px 4px; font-size: 13px; color: var(--text-3); }
/* Per-row edit / delete controls — dim until the row is hovered. */
.tl-actions { display: inline-flex; gap: 2px; flex: none; opacity: .3; transition: opacity .12s; }
.tl-row:hover .tl-actions { opacity: 1; }
.tl-ic { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: transparent; border: none; color: var(--text-3); cursor: pointer; }
.tl-ic:hover { background: var(--bg-2); color: var(--text); }
.tl-ic.ok { color: var(--good); }
.tl-ic[title="Delete"]:hover { color: var(--bad, #ef5a5a); background: var(--bad-bg, rgba(239,90,90,0.14)); }
.tl-edit { display: flex; align-items: center; gap: 6px; }
.tl-edit input { flex: 1; min-width: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); font-size: 13px; outline: none; }
/* Single-click delete turns the row into this inline "deleted · Undo" strip (5s). */
.tl-dot.del { background: var(--bad-bg, rgba(239,90,90,0.14)); color: var(--bad, #ef5a5a); }
.tl-undo { display: flex; align-items: center; gap: 12px; align-self: center; font-size: 13px; color: var(--text-3); }
.tl-undo-btn { background: transparent; border: none; color: var(--brand-2); font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; }
.tl-undo-btn:hover { text-decoration: underline; }
.cal-history { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin-top: 16px; }
.cal-history .hh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-history .hh .lab { display: flex; align-items: center; gap: 8px; color: var(--brand-2); font-size: 14px; }
.cal-history .hh a { font-size: 12px; color: var(--brand-2); }
.cal-history .item { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); }
.cal-history .item .nm { font-size: 14px; font-weight: 500; }
.cal-history .item .dt { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cal-history .hh .ct { color: var(--text-3); font-size: 12px; }
.cal-history .hh-right { display: flex; align-items: center; gap: 10px; }
.meet-tz { appearance: none; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text-2); font-size: 12px; padding: 5px 26px 5px 10px; outline: none; cursor: pointer; color-scheme: dark; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236c7693' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 8px center; }
.meet-tz:focus { border-color: var(--brand-ring); }
/* log-meeting composer */
.meet-form { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 14px; }
.meet-form input, .meet-form select, .meet-edit input, .meet-edit select { background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; color: var(--text); font-size: 13px; outline: none; color-scheme: dark; }
.meet-form input:focus, .meet-form select:focus, .meet-edit input:focus, .meet-edit select:focus { border-color: var(--brand-ring); }
.meet-form-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.meet-form-row select, .meet-edit select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236c7693' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 8px center; }
.meet-scroll { max-height: 320px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.meet-scroll .item:first-child { border-top: none; }
.meet-item .meet-right { display: flex; align-items: center; gap: 8px; }
/* Outlook-style meeting row: date tile + growing middle + actions. The parent
   .item is justify-content:space-between; the tile and mid slot in before. */
.meet-item { gap: 12px; }
.meet-item .meet-mid { flex: 1; min-width: 0; }
.meet-date-tile { width: 44px; flex: none; border: 1px solid; border-radius: 10px; overflow: hidden; text-align: center; background: var(--panel-2); }
.mdt-mon { display: block; font-size: 9px; font-weight: 700; letter-spacing: 1px; color: #fff; text-transform: uppercase; padding: 2px 0; }
.mdt-day { display: block; font-family: 'Sora',sans-serif; font-size: 17px; font-weight: 700; padding: 3px 0 4px; }
.meet-rel { color: var(--text-3); }
.outlook-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(0,120,212,0.45); background: rgba(0,120,212,0.12); color: #4ba3e8; cursor: pointer; white-space: nowrap; }
.outlook-btn:hover { background: rgba(0,120,212,0.24); color: #7cc0f2; }
.meet-actions { display: inline-flex; gap: 2px; opacity: .3; transition: opacity .12s; }
.meet-item:hover .meet-actions { opacity: 1; }
.cal-history .item.meet-edit { flex-direction: column; align-items: stretch; gap: 10px; }
.meet-edit .meet-form-row { grid-template-columns: 1fr auto; }
.meet-edit-actions { display: flex; gap: 8px; }
.cal-history .item.meet-undo { justify-content: space-between; font-size: 13px; color: var(--text-3); }
.meet-undo .tl-undo-btn { background: transparent; border: none; color: var(--brand-2); font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; }
.meet-undo .tl-undo-btn:hover { text-decoration: underline; }
.lead-tabs { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; min-width: 0; max-width: 100%; padding-bottom: 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.lead-tabs::-webkit-scrollbar { height: 6px; }
.lead-tabs::-webkit-scrollbar-thumb { background: var(--line-2, var(--line)); border-radius: 3px; }
.lead-tab { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; white-space: nowrap; padding: 7px 14px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); cursor: pointer; text-align: left; }
.lead-tab .lead-tab-name { font-size: 13px; }
.lead-tab .lead-tab-co { font-size: 10.5px; color: var(--text-3); max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.lead-tab.active { background: var(--brand-bg); color: var(--text); border-color: var(--brand-ring); }
.lead-tab.active .lead-tab-co { color: var(--brand-2); }
.lead-tab:hover { color: var(--text); }

/* Company line under the name in the lead profile header. */
.lead-co { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 13px; color: var(--text-2); }
.lead-co .lead-co-link { cursor: pointer; color: var(--brand-2); }
.lead-co .lead-co-link:hover { text-decoration: underline; }

/* ============ Unauthorized ============ */
.unauth { display: grid; place-items: center; padding: 80px 24px; }
.unauth-box { max-width: 500px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 48px 32px; }
.unauth-ico { width: 56px; height: 56px; margin: 0 auto 14px; background: var(--critical-bg); border-radius: 12px; display: grid; place-items: center; color: var(--critical); }
.unauth-lab { font-size: 11px; letter-spacing: 1.8px; color: var(--text-3); font-weight: 700; margin-bottom: 8px; }
.unauth h2 { font-family: 'Sora',sans-serif; font-size: 28px; font-weight: 700; margin: 0 0 12px; }
.unauth p { color: var(--text-2); font-size: 14px; margin: 0 0 22px; }

/* ============ Company detail ============ */
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; margin-bottom: 22px; }
.back-link:hover { color: var(--text); }
.co-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.co-title h1 { margin: 0; }
.co-meta { display: flex; align-items: center; gap: 14px; color: var(--text-3); font-size: 13px; margin-top: 14px; flex-wrap: wrap; }
.co-meta a { color: var(--text-3); }
.co-meta a:hover { color: var(--text); }
.co-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.co-desc { color: var(--text-2); font-size: 15px; line-height: 1.55; max-width: 920px; margin: 16px 0 22px; }
.co-actions { display: flex; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
.co-actions .btn.primary { background: var(--brand-bg-2); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.kpi { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.kpi .label { font-size: 11px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 600; }
.kpi .num { font-family: 'Sora',sans-serif; font-size: 48px; font-weight: 700; line-height: 1; margin-top: 16px; letter-spacing: -0.02em; }

.co-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 22px; padding-left: 4px; }
.co-tab { padding: 12px 6px 14px; font-size: 14px; color: var(--text-3); border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px; font-weight: 500; }
.co-tab:hover { color: var(--text-2); }
.co-tab.active { color: var(--text); border-bottom-color: var(--brand); }

.sig-group-h { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; font-size: 11px; letter-spacing: 1.5px; font-weight: 700; }
.sig-group-h .pip { width: 8px; height: 8px; border-radius: 50%; }
.sig-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 10px; position: relative; }
.sig-card .kind { position: absolute; top: 14px; right: 14px; max-width: 150px; text-align: right; line-height: 1.4;
  font-size: 9px; letter-spacing: 1.2px; color: var(--text-3); font-weight: 700;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.sig-card .sig-head { display: flex; align-items: baseline; gap: 10px; padding-right: 170px; margin-bottom: 6px; }
.sig-card h4 { margin: 0; font-size: 15px; font-weight: 600; }
.sig-card .sev-pill { flex: 0 0 auto; font-size: 9px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; position: relative; top: -1px; }
.sig-card .body { color: var(--text-2); font-size: 13px; font-style: italic; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Severity mix chips above the signal list. --sc = the severity's color. */
.sev-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sev-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text-2);
  font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: capitalize; cursor: pointer;
  transition: border-color .15s, background .15s; }
.sev-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); flex: 0 0 auto; }
.sev-chip b { color: var(--text); font-weight: 700; }
.sev-chip:hover:not(:disabled) { border-color: var(--sc); }
.sev-chip.on { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 14%, transparent); color: var(--text); }
.sev-chip.empty { opacity: .38; cursor: default; }
.sev-chip.clear { border-style: dashed; text-transform: none; color: var(--text-3); }

.sig-toolbar { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.sig-control { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
/* select.input forces width:100%; this 2-class+element selector outranks it. */
.sig-control select.input { width: auto; min-width: 150px; max-width: 320px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.sig-empty { padding: 40px 20px; text-align: center; color: var(--text-3); border: 1px dashed var(--line); border-radius: 12px; }
.sig-more { margin-top: 6px; }
.sig-card .foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-3); }
.sig-card .foot a { color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.sig-card .foot .ev { color: var(--brand-2); display: inline-flex; align-items: center; gap: 6px; }
.sig-card .foot .ev::before { content: '·'; margin-right: 4px; }
.sig-card .foot .foot-l { display: inline-flex; align-items: center; gap: 10px; }
/* Extraction-confidence chip: High = calm green, Medium = neutral, Low = warns. */
.conf-chip { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-3); }
.conf-chip.c-high { color: #4ade80; border-color: rgba(74,222,128,.35); background: rgba(74,222,128,.08); }
.conf-chip.c-low { color: var(--high); border-color: rgba(255,181,71,.35); background: var(--high-bg); }

.cont-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cont-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; position: relative; }
.cont-card .stage { position: absolute; top: 18px; right: 18px; }
.cont-card .top { display: flex; align-items: center; gap: 12px; }
.cont-card .nm { font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.cont-card .ro { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.cont-card .em { font-size: 12px; color: var(--text-2); margin-top: 14px; padding-left: 52px; }

.cert-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.cert-chip { padding: 9px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; color: var(--text); }

.doc-drop { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 64px 24px; text-align: center; margin-bottom: 12px; }
.doc-drop .up { width: 40px; height: 40px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; margin: 0 auto 16px; color: var(--text-2); }
.doc-drop .ttl { font-size: 14px; color: var(--text); margin-bottom: 6px; }
.doc-drop .scope { font-size: 11px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 600; }

.chat-empty { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 80px 24px; text-align: center; color: var(--text-3); font-size: 14px; }

.audit-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 24px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; line-height: 2; color: var(--text-2); }
.audit-box .arrow { color: var(--text-3); }

/* ============ Auth ============ */
.auth-bg { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(60% 80% at 80% 0%, rgba(107,138,255,0.18), transparent 60%),
    radial-gradient(60% 60% at 0% 100%, rgba(140,109,255,0.14), transparent 60%),
    var(--bg);
}
.auth-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 36px 34px; box-shadow: 0 30px 60px rgba(0,0,0,0.45); }
.auth-card .brand-mark { width: 46px; height: 46px; border-radius: 12px; margin-bottom: 22px; }
.auth-card h1 { margin: 0 0 6px; font-family: 'Sora',sans-serif; font-size: 30px; font-weight: 800; letter-spacing: -0.01em; }
.auth-card .sub { color: var(--text-2); font-size: 13px; margin-bottom: 26px; }
.auth-tabs { display: flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 22px; }
.auth-tabs button { flex: 1; padding: 9px; font-size: 13px; color: var(--text-2); border-radius: 7px; font-weight: 500; }
.auth-tabs button.active { background: var(--panel-3); color: var(--text); }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 11px; letter-spacing: 1.4px; color: var(--text-3); font-weight: 600; margin-bottom: 6px; }
.auth-field input { width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 11px 14px; color: var(--text); font-size: 14px; outline: none; }
.auth-field input:focus { border-color: var(--brand-ring); }
.auth-card .err { color: var(--critical); font-size: 12px; margin: -6px 0 12px; }
.auth-submit { width: 100%; padding: 12px; background: var(--brand); border-radius: 10px; color: white; font-weight: 600; font-size: 14px; margin-top: 6px; }
.auth-submit:hover { background: var(--brand-2); }
.auth-foot { text-align: center; margin-top: 22px; font-size: 12px; color: var(--text-3); }
.auth-foot strong { color: var(--text); font-weight: 500; }

/* ============ Command palette ============ */
.cmd-overlay { position: fixed; inset: 0; background: rgba(5,8,15,0.6); backdrop-filter: blur(4px); z-index: 200; display: grid; place-items: flex-start center; padding-top: 12vh; }
.cmd { width: 100%; max-width: 560px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); overflow: hidden; }
.cmd-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cmd-input input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font-size: 16px; }
.cmd-list { max-height: 50vh; overflow-y: auto; padding: 8px 0; }
.cmd-group { padding: 8px 18px 4px; font-size: 10px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 700; text-transform: uppercase; }
.cmd-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; font-size: 14px; cursor: pointer; color: var(--text); }
.cmd-item:hover, .cmd-item.sel { background: var(--brand-bg); }
.cmd-item .ico { color: var(--text-3); }
.cmd-item .sub { font-size: 12px; color: var(--text-3); margin-left: auto; }

/* ============ Kanban ============ */
.kb-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kb-col { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-height: 400px; }
.kb-col.over { border-color: var(--brand-ring); background: var(--brand-bg); }
.kb-col-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 11px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 700; }
.kb-col-h .ct { background: var(--panel-2); padding: 2px 8px; border-radius: 6px; color: var(--text); font-size: 11px; letter-spacing: 0; }
.kb-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 8px; cursor: grab; }
.kb-card:active { cursor: grabbing; }
.kb-card.dragging { opacity: 0.4; }
.kb-card .ttl { font-size: 13px; font-weight: 500; }
.kb-card .meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.kb-card .due { font-size: 11px; color: var(--text-3); }
.kb-card .av { width: 22px; height: 22px; border-radius: 50%; font-size: 10px; }
.kb-card.p-high { border-left: 3px solid var(--critical); }
.kb-card.p-medium { border-left: 3px solid var(--high); }
.kb-card.p-low { border-left: 3px solid var(--text-3); }

/* ============ Task drawer ============ */
.tk-drawer { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.tk-drawer h2 { margin: 0 0 6px; font-family: 'Sora',sans-serif; font-size: 22px; font-weight: 700; }
.tk-drawer .meta-row { display: flex; gap: 10px; align-items: center; color: var(--text-3); font-size: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.tk-section { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.tk-section h4 { margin: 0 0 12px; font-size: 11px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 700; display: flex; justify-content: space-between; }
.tk-check { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }
.tk-check .cb { width: 14px; height: 14px; flex: 0 0 14px; }
.tk-check.done { color: var(--text-3); text-decoration: line-through; }
.tk-attach { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel-2); border-radius: 8px; margin-bottom: 6px; font-size: 13px; }
.tk-attach .ico { color: var(--text-3); }
.tk-attach .size { margin-left: auto; color: var(--text-3); font-size: 11px; }
.tk-comment { display: flex; gap: 12px; padding: 12px 0; }
.tk-comment .av { width: 30px; height: 30px; border-radius: 50%; font-size: 11px; flex: 0 0 30px; }
.tk-comment .body { flex: 1; }
.tk-comment .body .nm { font-size: 13px; font-weight: 600; }
.tk-comment .body .ago { font-size: 11px; color: var(--text-3); margin-left: 8px; }
.tk-comment .body .txt { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.tk-comment .body .txt .mention { color: var(--brand-2); font-weight: 500; }
.tk-comp-input { display: flex; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.tk-comp-input input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font-size: 13px; }

/* ============ Watchlist redesign ============ */
.wl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 32px; }
.wl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.wl-card:hover { border-color: var(--brand-ring); cursor: pointer; }
.wl-card .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.wl-card .ttl { font-size: 16px; font-weight: 600; font-family: 'Sora',sans-serif; }
.wl-card .sect { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.wl-card .row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.wl-card .scr { font-family: 'Sora',sans-serif; font-size: 34px; font-weight: 700; line-height: 1; }
.wl-card .stats { display: flex; gap: 16px; font-size: 11px; color: var(--text-3); }
.wl-card .stats b { display: block; color: var(--text); font-size: 16px; font-weight: 600; margin-bottom: 2px; }

/* ============ Meeting drawer ============ */
.meet-row.clickable { cursor: pointer; }
.meet-row.clickable:hover { border-color: var(--brand-ring); }
.md-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.md-h h3 { margin: 0; font-family: 'Sora',sans-serif; font-size: 22px; font-weight: 700; }
.md-block { padding: 16px 0; border-top: 1px solid var(--line); }
.md-block h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 700; }
.md-att { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }

/* ============ Chat (RAG) sidebar ============ */
.chat-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand) 0%, #8c6dff 100%);
  color: white; font-weight: 600; font-size: 13px;
  box-shadow: 0 14px 28px rgba(107,138,255,0.35);
  cursor: pointer;
  border: 0;
}
.chat-fab:hover { transform: translateY(-1px); }
.chat-fab .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: white;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
  animation: chatPulse 1.8s infinite;
}
@keyframes chatPulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.6); } 100% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } }

.chat-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 460px;
  background: var(--bg-2); border-left: 1px solid var(--line);
  z-index: 101;
  transform: translateX(100%); transition: transform 0.28s ease;
  display: flex; flex-direction: column;
}
.chat-panel.open { transform: translateX(0); }
.chat-h { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.chat-h .row1 { display: flex; align-items: center; justify-content: space-between; }
.chat-h h3 { margin: 0; font-family: 'Sora',sans-serif; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.chat-mode { display: inline-flex; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; gap: 2px; margin-top: 12px; }
.chat-mode button { padding: 7px 14px; border-radius: 6px; color: var(--text-3); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.chat-mode button.active { background: var(--panel-3); color: var(--text); }
/* New chat / History quick-actions in the chat header row. */
.chat-actions { display: flex; align-items: center; gap: 6px; }
.chat-act { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 7px; background: var(--panel); border: 1px solid var(--line); color: var(--text-2); font-size: 11.5px; font-weight: 500; cursor: pointer; }
.chat-act:hover { background: var(--panel-2); color: var(--text); }
.chat-act.active { background: var(--panel-3); color: var(--text); border-color: var(--brand-ring); }
/* In-panel chat history list (reuses .notif-item markup). */
.chat-history { display: flex; flex-direction: column; }
.chat-history .lab { font-size: 10px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 700; margin-bottom: 6px; }
.chat-history .lab:not(:first-child) { margin-top: 16px; }
.chat-hist-empty { padding: 40px 8px; text-align: center; color: var(--text-3); font-size: 13px; }
.chat-scope {
  margin-top: 14px; padding: 10px 14px; border-radius: 9px;
  background: var(--brand-bg); border: 1px solid var(--brand-ring);
  font-size: 12px; color: var(--text); display: flex; align-items: center; gap: 10px;
}
.chat-scope.general { background: var(--panel); border-color: var(--line); }
.chat-scope .ico { color: var(--brand-2); }
.chat-scope .ttl { font-weight: 600; }
.chat-scope .ttl + span { color: var(--text-3); }
.chat-body { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.chat-suggest { display: flex; flex-direction: column; gap: 8px; }
.chat-suggest .lab { font-size: 10px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 700; }
.chat-suggest button { text-align: left; padding: 11px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.chat-suggest button:hover { background: var(--panel-2); color: var(--text); border-color: var(--brand-ring); }
.msg { display: flex; gap: 10px; }
.msg.user { flex-direction: row-reverse; }
.msg .av { width: 28px; height: 28px; border-radius: 50%; flex: 0 0 28px; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.msg.user .av { background: var(--panel-3); color: var(--text); }
.msg.ai .av { background: linear-gradient(135deg, var(--brand) 0%, #8c6dff 100%); color: white; }
.msg .bubble { max-width: 78%; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.55; }
.msg.user .bubble { background: var(--brand-bg-2); border: 1px solid var(--brand-ring); color: var(--text); border-bottom-right-radius: 4px; }
.msg.ai .bubble { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-bottom-left-radius: 4px; }
/* Rendered-markdown AI replies: tight spacing inside the chat bubble. */
.msg.ai .bubble .md > :first-child { margin-top: 0; }
.msg.ai .bubble .md > :last-child { margin-bottom: 0; }
.msg.ai .bubble .md p { margin: 0 0 8px; }
.msg.ai .bubble .md ul, .msg.ai .bubble .md ol { margin: 0 0 8px; padding-left: 20px; }
.msg.ai .bubble .md li { margin: 2px 0; }
.msg.ai .bubble .md strong { font-weight: 650; color: var(--text); }
.msg.ai .bubble .md code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.msg.ai .src { font-size: 11px; color: var(--text-3); margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.msg.ai .src .pill { padding: 2px 8px; background: var(--panel-2); border-radius: 5px; }
/* Hint shown when Focused mode would give a sharper, doc-grounded answer. */
.msg.ai .mode-hint { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; padding: 7px 10px; font-size: 11.5px; line-height: 1.45; color: var(--text-3); background: var(--panel); border: 1px dashed var(--line); border-radius: 7px; }
.msg.ai .mode-hint .ico { color: var(--brand-2); flex: 0 0 auto; margin-top: 1px; }
/* Thinking indicator while the RAG backend answers. */
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 2px 0; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); opacity: 0.4; animation: typing-bounce 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-input { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-end; }
.chat-input textarea { flex: 1; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; color: var(--text); font-size: 13px; outline: none; resize: none; min-height: 44px; max-height: 120px; font-family: inherit; }
.chat-input textarea:focus { border-color: var(--brand-ring); }

.mic-btn {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text-2);
  display: grid; place-items: center; flex: 0 0 44px;
  cursor: pointer; position: relative; transition: all 0.15s;
}
.mic-btn:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }
.mic-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.mic-btn.on {
  background: var(--critical); border-color: var(--critical); color: white;
  animation: micGlow 1.4s infinite;
}
.mic-btn .mic-pulse {
  position: absolute; inset: -4px;
  border-radius: 14px; border: 2px solid var(--critical);
  animation: micRing 1.4s infinite;
}
@keyframes micGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,94,107,0.5); } 50% { box-shadow: 0 0 0 8px rgba(255,94,107,0); } }
@keyframes micRing { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.4); } }

.chat-send { width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: white; display: grid; place-items: center; flex: 0 0 44px; cursor: pointer; }
.chat-send:hover { background: var(--brand-2); }

.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(107,138,255,0.7); animation: chatPulse 1.4s infinite; display: inline-block; }

.pipe-cell:hover { border-color: var(--line-2); }
.pipe-cell.active { border-color: var(--brand-ring); background: var(--brand-bg); }
.pipe-cell.active .label { color: var(--brand-2); }

/* ============ Add lead modal ============ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); z-index: 250; display: grid; place-items: center; padding: 24px; }
/* Long forms (e.g. Add Lead with the "new company" details block expanded) can
   grow taller than the viewport. Without a cap the modal overflows the fixed
   overlay with no scrollbar, so the footer's Cancel/submit buttons become
   unreachable. Cap it to the available height and let IT scroll internally. */
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 48px); overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,0.5); padding: 26px; }
.modal h3 { margin: 0 0 6px; font-family: 'Sora',sans-serif; font-size: 22px; font-weight: 700; }
.modal .sub { color: var(--text-3); font-size: 13px; margin-bottom: 18px; }
.modal .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal .full { grid-column: 1 / -1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--bg-2); }
.contact-edit { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; margin-top: 8px; }
.contact-add { font-size: 12px; color: var(--brand-2); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; }

.pipe-panel { margin-top: 12px; padding: 16px; border-radius: 12px; border: 1px solid var(--brand-ring); background: var(--brand-bg); }
.pipe-panel.done { border-color: rgba(62,194,123,0.35); background: rgba(62,194,123,0.06); }
.pipe-glyph { width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: white; display: grid; place-items: center; flex: 0 0 32px; }
.pipe-steps { display: flex; flex-direction: column; gap: 4px; }
.pipe-step { display: flex; align-items: center; gap: 10px; padding: 6px 0; transition: opacity 0.2s; }
.pipe-step.pending { opacity: 0.45; }
.pipe-step.done .pipe-ico { background: var(--good-bg); color: var(--good); border-color: rgba(62,194,123,0.4); }
.pipe-step.running .pipe-ico { background: var(--brand-bg-2); border-color: var(--brand-ring); }
.pipe-ico { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--text-2); }
.pipe-text { flex: 1; min-width: 0; }
.pipe-lab { font-size: 12px; color: var(--text); font-weight: 500; }
.pipe-step.done .pipe-lab { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--text-3); }
.pipe-det { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.pipe-result-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pipe-result-grid .prc { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 8px; text-align: center; }
.pipe-result-grid .lab { font-size: 9px; letter-spacing: 1.2px; color: var(--text-3); font-weight: 700; }
.pipe-result-grid .val { font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 700; margin-top: 4px; }

/* ============ Company combobox ============ */
.combo { position: relative; }
.combo-input {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 14px;
  cursor: text;
}
.combo-input:focus-within { border-color: var(--brand-ring); }
.combo-q { flex: 1; background: none; border: 0; outline: none; color: var(--text); font-size: 14px; }
.combo-q::placeholder { color: var(--text-3); }
.combo-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 6px 0;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  max-height: 320px; overflow-y: auto;
}
.combo-group { padding: 10px 16px 6px; font-size: 10px; letter-spacing: 1.4px; color: var(--text-3); font-weight: 700; text-transform: uppercase; }
.combo-divider { height: 1px; background: var(--line); margin: 6px 0; }
.combo-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; cursor: pointer;
}
.combo-item:hover { background: var(--brand-bg); }
.combo-name { font-size: 13px; color: var(--text); font-weight: 500; }
.combo-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.combo-index {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; margin: 0 6px 6px; border-radius: 9px;
  background: var(--brand-bg); border: 1px solid var(--brand-ring);
  cursor: pointer;
}
.combo-index:hover { background: var(--brand-bg-2); }
.combo-index-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: white; display: grid; place-items: center; flex: 0 0 30px; }
.combo-index-ttl { font-size: 13px; color: var(--text); font-weight: 600; }
.combo-index-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* ============ Backend admin console ============ */
.adm-shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; background: var(--bg); }
.adm-shell .sidebar { border-color: var(--line); background: linear-gradient(180deg, #0e1422 0%, var(--bg) 100%); }
.adm-brand-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; letter-spacing: 1.8px; padding: 3px 8px; border-radius: 5px; background: var(--critical-bg); color: var(--critical); font-weight: 700; margin-left: 8px; }
.adm-main { padding: 32px 40px 64px; max-width: 1500px; width: 100%; margin: 0 auto; }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 24px; }
.adm-head h1 { font-family: 'Sora',sans-serif; font-size: 40px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 8px; }
.adm-head .sub { color: var(--text-2); font-size: 14px; max-width: 720px; }
.adm-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.adm-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; position: relative; }
.adm-kpi .lab { font-size: 10px; letter-spacing: 1.5px; color: var(--text-3); font-weight: 700; }
.adm-kpi .num { font-family: 'Sora',sans-serif; font-size: 32px; font-weight: 700; margin-top: 6px; line-height: 1; }
.adm-kpi .delta { font-size: 11px; color: var(--good); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.adm-kpi .delta.down { color: var(--critical); }

/* Discovery search */
.disc-row { display: grid; grid-template-columns: 1fr 220px 180px auto; gap: 10px; margin-bottom: 16px; }
.disc-row .big { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px 4px 14px; }
.disc-row .big input { flex: 1; background: none; border: 0; outline: none; font-size: 14px; color: var(--text); padding: 12px 0; }
.disc-result { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; display: grid; grid-template-columns: 28px 1fr auto auto auto; gap: 14px; align-items: center; margin-bottom: 8px; }
.disc-result .nm { font-weight: 600; }
.disc-result .nm + .sb { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.disc-result.indexed { border-color: rgba(62,194,123,0.3); }
.disc-progress { background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 18px 22px; margin-bottom: 14px; }
.disc-progress h4 { margin: 0 0 10px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.disc-progress .bar { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.disc-progress .bar > i { height: 100%; background: linear-gradient(90deg, var(--brand), #8c6dff); display: block; transition: width 0.6s ease; }
.disc-progress .lg { font-size: 11px; font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--text-3); margin-top: 10px; line-height: 1.7; max-height: 110px; overflow-y: auto; }
.disc-progress .lg span { display: block; }
.disc-progress .lg .ok { color: var(--good); }

/* DB explorer */
.db-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.db-bulk { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.db-bulk .selcount { color: var(--brand-2); font-size: 13px; font-weight: 500; }
.db-row-actions { display: flex; gap: 4px; }
.db-row-actions button { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: var(--text-3); }
.db-row-actions button:hover { background: var(--panel-3); color: var(--text); }
.db-row-actions .del:hover { color: var(--critical); background: var(--critical-bg); }

/* Industry priority list */
.ind-list { display: flex; flex-direction: column; gap: 8px; }
.ind-row {
  display: grid; grid-template-columns: 28px 1fr 110px 130px 1fr 100px auto;
  align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; transition: border-color 0.15s;
}
.ind-row:hover { border-color: var(--line-2); }
.ind-row.p-critical { border-left: 3px solid var(--critical); }
.ind-row.p-high { border-left: 3px solid var(--high); }
.ind-row.p-medium { border-left: 3px solid var(--brand); }
.ind-row.p-low { border-left: 3px solid var(--text-3); }
.ind-row .nm { font-weight: 500; font-size: 14px; }
.ind-row .meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ind-row .handle { color: var(--text-3); cursor: grab; }
.ind-row .freq { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--text-2); }
.prio-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 6px;
  font-size: 10px; letter-spacing: 1.4px; font-weight: 700; text-transform: uppercase;
  cursor: pointer; transition: all 0.15s;
}
.prio-pill.critical { background: var(--critical-bg); color: var(--critical); border: 1px solid rgba(255,94,107,0.4); }
.prio-pill.high { background: var(--high-bg); color: var(--high); border: 1px solid rgba(255,181,71,0.4); }
.prio-pill.medium { background: var(--brand-bg); color: var(--brand-2); border: 1px solid var(--brand-ring); }
.prio-pill.low { background: var(--panel-2); color: var(--text-3); border: 1px solid var(--line-2); }
.prio-menu { position: absolute; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 4px; z-index: 30; box-shadow: 0 16px 30px rgba(0,0,0,0.4); min-width: 130px; }
.prio-menu .prio-pill { display: flex; width: 100%; margin: 0; border: 0; }
.prio-menu .prio-pill:hover { background: var(--panel-3); }
.sl-bar { height: 4px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.sl-bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* Classification flow */
.pipeline-canvas {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 20px 20px;
}
.pipe-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; align-items: center; position: relative; }
.pipe-node {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 14px; text-align: center;
  position: relative;
}
.pipe-node.active { border-color: var(--brand-ring); background: var(--brand-bg); }
.pipe-node .ic { width: 36px; height: 36px; border-radius: 9px; background: var(--panel-3); display: grid; place-items: center; margin: 0 auto 10px; color: var(--brand-2); }
.pipe-node.active .ic { background: var(--brand); color: white; }
.pipe-node .lab { font-size: 12px; font-weight: 600; }
.pipe-node .det { font-size: 10px; color: var(--text-3); margin-top: 4px; letter-spacing: 0.5px; }
.pipe-arrow { position: absolute; top: 50%; transform: translateY(-50%); right: -28px; width: 28px; height: 2px; background: var(--line-2); }
.pipe-arrow::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left-color: var(--line-2); }

/* Tabs */
.adm-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.adm-tab {
  padding: 12px 16px; font-size: 14px; color: var(--text-3);
  border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 8px; font-weight: 500;
}
.adm-tab:hover { color: var(--text-2); }
.adm-tab.active { color: var(--text); border-bottom-color: var(--brand); }
.adm-tab .count { background: var(--panel-2); padding: 1px 7px; border-radius: 5px; font-size: 11px; }

/* Status pills */
.st-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; font-size: 10px; letter-spacing: 1.2px; font-weight: 700; text-transform: uppercase; }
.st-pill.indexed { background: var(--good-bg); color: var(--good); }
.st-pill.discovery { background: var(--brand-bg); color: var(--brand-2); }
.st-pill.stale { background: var(--high-bg); color: var(--high); }
.st-pill.missing { background: var(--panel-2); color: var(--text-3); }

/* Tweaks panel ============ */
.tweaks {
  position: fixed; bottom: 18px; right: 18px; z-index: 200;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 16px; width: 260px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.tweaks h4 { margin: 0 0 12px; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.tweaks h4 button { color: var(--text-3); }
.tweaks .row { display: flex; align-items: center; justify-content: space-between; margin: 8px 0; font-size: 12px; color: var(--text-2); }
.tweaks .swatches { display: flex; gap: 6px; }
.tweaks .swatch { width: 22px; height: 22px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.tweaks .swatch.sel { border-color: var(--text); }

/* ── Admin Overview: "ops console" futuristic skin (scoped to .adm-ov) ─────── */
.adm-ov {
  background-image: radial-gradient(rgba(107,138,255,.055) 1px, transparent 1px);
  background-size: 26px 26px;
}
.adm-ov .adm-head h1 {
  background: linear-gradient(120deg, #fff 30%, #93a7ff 70%, #6b8aff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.adm-ov .adm-kpi {
  background: linear-gradient(180deg, rgba(107,138,255,.06), rgba(17,24,42,0) 55%), var(--panel);
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
/* thin energized top line */
.adm-ov .adm-kpi::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122,152,255,.6), transparent);
}
/* HUD corner ticks */
.adm-ov .adm-kpi::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .38;
  background:
    linear-gradient(var(--brand), var(--brand)) 10px 10px / 10px 1px no-repeat,
    linear-gradient(var(--brand), var(--brand)) 10px 10px / 1px 10px no-repeat,
    linear-gradient(var(--brand), var(--brand)) calc(100% - 20px) calc(100% - 11px) / 10px 1px no-repeat,
    linear-gradient(var(--brand), var(--brand)) calc(100% - 11px) calc(100% - 20px) / 1px 10px no-repeat;
}
.adm-ov .adm-kpi[style*="cursor"]:hover {
  border-color: rgba(122,152,255,.55);
  box-shadow: 0 0 0 1px rgba(122,152,255,.25), 0 8px 28px rgba(107,138,255,.16), inset 0 0 22px rgba(107,138,255,.05);
  transform: translateY(-2px);
}
.adm-ov .adm-kpi .lab {
  display: flex; align-items: center; gap: 7px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 2px;
}
.adm-ov .adm-kpi .lab::before {
  content: ""; width: 5px; height: 5px; border-radius: 1px; flex: none;
  background: var(--brand); box-shadow: 0 0 7px var(--brand);
}
.adm-ov .adm-kpi .num { display: flex; align-items: center; text-shadow: 0 0 24px rgba(122,152,255,.35); }
.adm-ov .card { position: relative; overflow: hidden; }
.adm-ov .card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(122,152,255,.5), transparent 45%);
}
.adm-ov .card-h h3 { letter-spacing: .4px; }

/* ── Sticky table headers (user app) ─────────────────────────────────────────
   Column labels stay pinned under the topbar while long tables (e.g. Companies
   at 15 rows/page) scroll. overflow-x:auto makes .table-wrap a scroll container,
   which would trap the sticky header inside it — so on wide screens we switch to
   overflow-x:clip (no scroll container, sticky works against the page). Narrow
   screens keep auto for sideways scrolling and just lose the pinned header. */
.main .table thead th { position: sticky; top: 0; z-index: 5; background: var(--panel); }
@media (min-width: 1100px) {
  /* Wide screens: header sticks against the PAGE scroll, pinned under the
     topbar. overflow-y must ALSO be clip: a clip/hidden mix computes to
     hidden, which re-creates the scroll container and kills the sticky. */
  .main .table-wrap { overflow: clip; }
  .main .table thead th { top: 76px; /* just under the sticky .topbar (77px incl. border) */ }
}
@media (max-width: 1099.98px) {
  /* Narrow screens: the table needs overflow-x:auto for sideways scrolling,
     which traps sticky inside the wrapper — so let the wrapper scroll
     vertically too (data-grid style) and pin the header to ITS top. */
  .main .table-wrap { max-height: calc(100vh - 96px); overflow: auto; }
}

/* The admin console reuses .main but has NO sticky topbar — without this the
   header would stick 76px down and rows would float visibly above it. */
.adm-shell .main .table thead th { top: 0; }

/* ── Leadsale Pipeline facelift: pill tabs, striped live bar, terminal log ── */
.pipe-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.pipe-tab {
  display: flex; align-items: center; gap: 7px; padding: 8px 16px;
  border-radius: 999px; background: transparent; border: 1px solid transparent;
  color: var(--text-3); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: color .18s, border-color .18s, background .18s, box-shadow .18s;
}
.pipe-tab:hover { color: var(--text-2); border-color: var(--line); }
.pipe-tab.on {
  color: var(--text);
  background: linear-gradient(180deg, rgba(107,138,255,.16), rgba(107,138,255,.05));
  border-color: rgba(122,152,255,.45);
  box-shadow: 0 0 14px rgba(107,138,255,.12);
}
.pipe-bar { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 4px 0 12px; }
.pipe-bar-fill { height: 100%; border-radius: 4px; transition: width .3s; }
/* candy-stripe sweep while the run is live (rides ON TOP of the status color,
   which is set as backgroundColor inline so this image survives) */
.pipe-bar-fill.live {
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 8px, transparent 8px 16px);
  animation: pipeStripes .7s linear infinite;
}
@keyframes pipeStripes { to { background-position: 22.6px 0; } }
.pipe-log {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px;
  line-height: 1.75; color: var(--text-2);
  background: #0a0f1d; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; max-height: 320px; overflow-y: auto;
  box-shadow: inset 0 0 24px rgba(107,138,255,.05);
}
.pipe-log.running::after { content: "▋"; color: var(--brand); animation: pipeCaret 1s steps(1) infinite; }
@keyframes pipeCaret { 50% { opacity: 0; } }

/* ── Automation Controls: power-switch master + cascading child reveal ── */
.sched-master { display: flex; align-items: center; gap: 18px; padding: 14px 0 10px; }
.sched-master .sw { transform: scale(1.5); transform-origin: left center; width: 62px; flex: 0 0 62px; }
.sched-master .sw button { box-shadow: 0 0 0 rgba(61,220,151,0); transition: background .15s, box-shadow .35s; }
.sched-master.on .sw button { box-shadow: 0 0 18px rgba(61,220,151,.55); }
.sched-master .ttl { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 16px; transition: color .3s, text-shadow .3s; }
.sched-master.on .ttl { color: var(--good); text-shadow: 0 0 16px rgba(61,220,151,.45); }
.sched-kids { overflow: hidden; max-height: 0; opacity: 0; transform: translateY(-8px); transition: max-height .5s ease, opacity .35s ease, transform .35s ease; }
.sched-kids.open { max-height: 460px; opacity: 1; transform: none; }
.sched-kids .kid { opacity: 0; transform: translateX(-14px); transition: opacity .3s ease, transform .3s ease; }
.sched-kids.open .kid { opacity: 1; transform: none; }
.sched-kids.open .kid:nth-child(1) { transition-delay: .10s; }
.sched-kids.open .kid:nth-child(2) { transition-delay: .22s; }
.sched-kids.open .kid:nth-child(3) { transition-delay: .34s; }
.sched-kids.open .kid-hour { transition-delay: .46s; }
/* The three features are independent of each other — show them side by side
   as equal cards, not a stacked list. */
.sched-kids .kid-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 8px 0 4px; }
@media (max-width: 1099.98px) { .sched-kids .kid-row { grid-template-columns: 1fr; } }
.sched-kids .kid-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  background: var(--panel-2); transition: border-color .25s, box-shadow .25s;
}
.sched-kids .kid-card.on { border-color: rgba(61,220,151,.4); box-shadow: 0 0 14px rgba(61,220,151,.08); }

/* ── Team facelift (2026-08-18): scrollable member rail, avatar cards, pill
   tabs, hover rows. Overrides the earlier .team-grid/.emp-* block below it. */
.team-grid { grid-template-columns: 300px 1fr; align-items: start; }
.emp-list { padding: 16px 14px; }
.emp-scroll { max-height: calc(100vh - 330px); min-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.emp-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.emp-card:hover { transform: translateY(-1px); }
.emp-av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-bg-2); color: var(--brand-2); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: 0 0 34px; border: 1px solid var(--brand-ring); }
.emp-av.lg { width: 46px; height: 46px; flex-basis: 46px; font-size: 14px; }
.emp-av.sm { width: 30px; height: 30px; flex-basis: 30px; font-size: 10px; }
.emp-meta { flex: 1; min-width: 0; }
.emp-meta .name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-meta .email { font-size: 11.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-stats { display: flex; gap: 8px; margin-top: 4px; font-size: 10.5px; color: var(--text-3); }
.emp-stats .n { color: var(--brand-2); font-weight: 600; }
.emp-stats .w { color: #00c875; }
.emp-stats .r { margin-left: auto; text-transform: capitalize; }
.tm-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tm-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text-2); font-size: 12.5px; cursor: pointer; transition: all .15s ease; }
.tm-tab:hover { border-color: var(--brand-ring); color: var(--text); }
.tm-tab.on { background: var(--brand-bg); border-color: var(--brand-ring); color: var(--brand-2); font-weight: 600; }
.tm-body { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 8px 16px; max-height: 46vh; overflow-y: auto; }
.tm-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--line); transition: background .12s ease; }
.tm-row:last-child { border-bottom: none; }
.tm-row:hover { background: var(--brand-bg); border-radius: 10px; }
.tm-main { flex: 1; min-width: 0; }
.tm-main .t { font-size: 13.5px; font-weight: 500; }
.tm-main .s { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-sig { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 0 0 auto; text-align: right; }
.tm-dm { font-size: 9.5px; color: var(--brand-2); font-weight: 700; margin-left: 5px; letter-spacing: .5px; }
.tm-day { font-size: 10.5px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin: 14px 0 4px; padding-left: 2px; }
.tm-empty { padding: 40px 6px; text-align: center; color: var(--text-3); font-size: 13px; }
.tm-invite { background: var(--panel); border: 1px solid var(--brand-ring); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 20px; max-width: 640px; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); }
.tm-invite h5 { margin: 0 0 8px; font-size: 10.5px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.tm-inv-scroll { max-height: 260px; overflow-y: auto; }
.tm-inv-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.tm-inv-row:last-child { border-bottom: none; }
.tm-rem { padding: 10px 2px; border-bottom: 1px solid var(--line); }
.tm-rem:last-child { border-bottom: none; }
.tm-rem .h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.tm-rem .h strong { color: var(--text-2); }
.tm-rem .b { font-size: 13.5px; white-space: pre-wrap; }
.tm-rem .del { margin-left: auto; background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 11px; }
.tm-rem .del:hover { color: #e2445c; }
@media (max-width: 1100px) { .team-grid { grid-template-columns: 1fr; } .emp-scroll { max-height: 300px; } }

/* ── Bell renovation (2026-08-18): day groups, unread emphasis, severity
   chips, per-tab unread badges, hover mark-as-read. */
.ntf-hcount { font-size: 11px; font-weight: 600; color: var(--brand-2); background: var(--brand-bg); border: 1px solid var(--brand-ring); border-radius: 999px; padding: 2px 8px; letter-spacing: 0; }
.ntf-tab-n { margin-left: 6px; background: var(--brand-2); color: #0b1020; border-radius: 999px; padding: 0 6px; font-size: 10px; font-weight: 700; display: inline-block; line-height: 15px; }
.ntf-day { font-size: 10.5px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin: 16px 0 4px; }
.notif-item.ntf { padding: 12px 10px; margin: 2px -10px; border-radius: 12px; border-bottom: 0; position: relative; transition: background .12s ease, opacity .12s ease; }
.notif-item.ntf:hover { background: var(--panel); }
.notif-item.ntf.unread { background: var(--brand-bg); box-shadow: inset 2px 0 0 var(--brand-2); }
.notif-item.ntf.unread:hover { background: var(--brand-bg-2); }
.notif-item.ntf:not(.unread) { opacity: .6; }
.notif-item.ntf:not(.unread):hover { opacity: 1; }
.notif-item.ntf.unread .notif-title { font-weight: 600; }
.ntf-sev { margin-left: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.ntf-qa { position: absolute; right: 10px; top: 12px; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; background: var(--panel-3); color: var(--brand-2); border: 1px solid var(--brand-ring); }
.ntf-qa:hover { background: var(--brand-bg-2); }
.notif-item.ntf.unread:hover .ntf-qa { display: grid; }
.notif-item.ntf.unread:hover .notif-dot { visibility: hidden; }

/* ── Account menu (2026-08-18): topbar person icon dropdown — identity,
   credits, going-cold thresholds, sign out. */
.acct-wrap { position: relative; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 292px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; z-index: 120; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.acct-id { display: flex; align-items: center; gap: 10px; }
.acct-meta { flex: 1; min-width: 0; }
.acct-meta .n { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-meta .e { font-size: 11.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-role { font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--brand-2); background: var(--brand-bg); border: 1px solid var(--brand-ring); border-radius: 999px; padding: 3px 8px; font-weight: 700; flex: 0 0 auto; }
.acct-sec { font-size: 9.5px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--text-3); font-weight: 700; margin: 16px 0 6px; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--text-2); padding: 4px 0; }
.acct-row strong { color: var(--text); font-weight: 600; }
.acct-in { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 11.5px; }
.acct-num { width: 58px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 5px 8px; font-size: 12.5px; text-align: right; }
.acct-num:focus { outline: none; border-color: var(--brand-ring); }
.acct-note { font-size: 10.5px; color: var(--text-3); margin-top: 8px; line-height: 1.5; }
.acct-signout { margin-top: 14px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; background: transparent; cursor: pointer; transition: all .15s ease; }
.acct-signout:hover { border-color: #e2445c; color: #e2445c; }
