/* ============================================================================
   FEED — Support Tools Library Monitor
   Enterprise activity stream. Theme-aware: reads the shared design tokens set by
   themeEngine (--panel/--panel2/--text/--muted/--border/--accent/--accent-rgb/
   --radius/--shadow), so it adapts to APEX (dark) and Bright Board (light) with
   zero JS. Gold/brand (--accent) is reserved for brand + primary actions;
   data categories get their own categorical colours (per the Service-Report
   colour architecture — no mono-gold on data).
   ADDITIVE: scoped entirely under .feed-page. Touches no existing selectors.
============================================================================ */

.feed-page{
  --fd-gap:14px;
  max-width:980px;
  margin:0 auto;
  padding:18px 20px 44px;
  color:var(--text,#eef0f5);
  font-family:var(--font, "DM Sans", system-ui, -apple-system, Segoe UI, Arial, sans-serif);
  animation:feedIn .28s ease both;
}
@keyframes feedIn{ from{ opacity:0; transform:translateY(6px);} to{ opacity:1; transform:none;} }

/* ── Header ───────────────────────────────────────────────────────────────── */
.feed-hd{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  flex-wrap:wrap; margin-bottom:16px;
  padding-bottom:15px; border-bottom:1px solid var(--border,rgba(255,255,255,.08));
}
.feed-hd-left{ display:flex; align-items:center; gap:12px; min-width:0; }
.feed-hd-ico{
  width:42px; height:42px; flex:0 0 auto; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  color:var(--accent,#C9A84C);
  background:rgba(var(--accent-rgb,201,168,76),.12);
  border:1px solid rgba(var(--accent-rgb,201,168,76),.34);
}
.feed-hd-title{ margin:0; font-size:21px; font-weight:800; letter-spacing:.2px; line-height:1.1; color:var(--text); }
.feed-hd-sub{ margin:2px 0 0; font-size:12px; color:var(--muted,#9aa1ab); }
.feed-hd-right{ display:flex; align-items:center; gap:9px; flex-wrap:wrap; }

.feed-live{
  display:inline-flex; align-items:center; gap:7px;
  font-size:11px; font-weight:700; letter-spacing:.3px;
  color:#12b76a; background:rgba(18,183,106,.12);
  border:1px solid rgba(18,183,106,.30); padding:4px 10px; border-radius:20px;
}
.feed-live-dot{ width:7px; height:7px; border-radius:50%; background:#12b76a; box-shadow:0 0 0 3px rgba(18,183,106,.20); animation:feedPulse 1.9s ease-in-out infinite; }
.feed-live.is-off{ color:var(--muted); background:rgba(148,148,148,.12); border-color:rgba(148,148,148,.25); }
.feed-live.is-off .feed-live-dot{ background:var(--muted); box-shadow:none; animation:none; }
@keyframes feedPulse{ 0%,100%{ transform:scale(1); opacity:1; } 50%{ transform:scale(.7); opacity:.55; } }

.feed-count{
  font-size:11px; color:var(--muted);
  background:var(--panel2,rgba(255,255,255,.04));
  border:1px solid var(--border,rgba(255,255,255,.08)); padding:4px 10px; border-radius:20px; white-space:nowrap;
}
.feed-refresh{
  display:inline-flex; align-items:center; gap:6px;
  font:inherit; font-size:11.5px; font-weight:700; cursor:pointer;
  color:var(--accent,#C9A84C);
  background:rgba(var(--accent-rgb,201,168,76),.08);
  border:1px solid rgba(var(--accent-rgb,201,168,76),.26);
  padding:5px 11px; border-radius:8px; transition:background .15s, transform .1s;
}
.feed-refresh:hover{ background:rgba(var(--accent-rgb,201,168,76),.16); }
.feed-refresh:active{ transform:scale(.97); }
.feed-refresh[disabled]{ opacity:.6; cursor:default; }
.feed-refresh.is-spin svg{ animation:feedSpin .7s linear infinite; }
@keyframes feedSpin{ to{ transform:rotate(360deg); } }

/* ── Filter chips ─────────────────────────────────────────────────────────── */
.feed-filters{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.feed-chip{
  font:inherit; font-size:12px; font-weight:600; cursor:pointer;
  color:var(--muted); background:var(--panel2,rgba(255,255,255,.04));
  border:1px solid var(--border,rgba(255,255,255,.09)); padding:6px 14px; border-radius:20px;
  transition:color .15s, background .15s, border-color .15s;
}
.feed-chip:hover{ color:var(--text); border-color:rgba(var(--accent-rgb,201,168,76),.4); }
.feed-chip.on{
  color:#0d0e13; background:var(--accent,#C9A84C);
  border-color:var(--accent,#C9A84C); font-weight:700;
}

/* ── Stream + timeline cards ──────────────────────────────────────────────── */
.feed-stream{ display:flex; flex-direction:column; }

.feed-card{
  position:relative; display:grid; grid-template-columns:44px 1fr; gap:13px;
  padding:2px 12px 4px 6px; border-radius:12px; cursor:pointer;
  border:1px solid transparent; transition:background .15s, border-color .15s, transform .1s;
  outline:none;
}
.feed-card:hover{ background:var(--panel2,rgba(255,255,255,.03)); border-color:var(--border,rgba(255,255,255,.08)); }
.feed-card:focus-visible{ border-color:rgba(var(--accent-rgb,201,168,76),.55); box-shadow:0 0 0 3px rgba(var(--accent-rgb,201,168,76),.16); }
.feed-card.is-new{ background:rgba(var(--accent-rgb,201,168,76),.05); }

/* rail: bubble + connector line */
.feed-rail{ display:flex; flex-direction:column; align-items:center; padding-top:6px; }
.feed-bubble{
  width:38px; height:38px; flex:0 0 auto; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color:var(--tc,#8a93a3); background:rgba(var(--tcr,138,147,163),.14); border:1px solid rgba(var(--tcr,138,147,163),.40);
}
.feed-line{ flex:1 1 auto; width:2px; min-height:8px; margin-top:6px; background:var(--border,rgba(255,255,255,.08)); border-radius:2px; }
.feed-card:last-child .feed-line{ display:none; }

/* tone palette — categorical, readable on both light + dark */
.feed-bubble--pc,.feed-pill--pc{ --tc:#3987e5; --tcr:57,135,229; }
.feed-bubble--md,.feed-pill--md{ --tc:#12a074; --tcr:18,160,116; }
.feed-bubble--tr,.feed-pill--tr{ --tc:#8b7ff0; --tcr:139,127,240; }
.feed-bubble--an,.feed-pill--an{ --tc:#e8991f; --tcr:232,153,31; }
.feed-bubble--remove,.feed-pill--remove{ --tc:#e24b4a; --tcr:226,75,74; }

/* body */
.feed-body{ min-width:0; padding-bottom:16px; }
.feed-metarow{ display:flex; align-items:center; gap:8px; margin-bottom:3px; flex-wrap:wrap; }
.feed-avwrap{ display:inline-flex; }
.feed-av{ width:25px; height:25px; border-radius:50%; object-fit:cover; flex:0 0 auto; display:block; }
.feed-av--ini{
  display:inline-flex; align-items:center; justify-content:center;
  font-size:10px; font-weight:800; letter-spacing:.3px;
  color:var(--accent,#C9A84C); background:rgba(var(--accent-rgb,201,168,76),.16);
}
.feed-name{ font-size:13px; font-weight:700; color:var(--text); }
.feed-when{ font-size:11.5px; color:var(--muted); }
.feed-dot{ width:7px; height:7px; border-radius:50%; background:var(--accent,#C9A84C); margin-left:auto; flex:0 0 auto; box-shadow:0 0 0 3px rgba(var(--accent-rgb,201,168,76),.16); }

.feed-action{ font-size:13px; color:var(--muted); margin-bottom:5px; display:flex; align-items:center; gap:7px; flex-wrap:wrap; line-height:1.5; }
.feed-pill{
  font-size:10px; font-weight:800; letter-spacing:.4px; text-transform:uppercase;
  color:var(--tc,#8a93a3); background:rgba(var(--tcr,138,147,163),.13);
  border:1px solid rgba(var(--tcr,138,147,163),.30); padding:2px 8px; border-radius:6px; white-space:nowrap;
}
.feed-pill--aud{ --tc:var(--accent,#C9A84C); color:var(--accent,#C9A84C); background:rgba(var(--accent-rgb,201,168,76),.12); border-color:rgba(var(--accent-rgb,201,168,76),.30); }
.feed-new{
  font-size:9.5px; font-weight:800; letter-spacing:.5px; color:var(--accent,#C9A84C);
  background:rgba(var(--accent-rgb,201,168,76),.14); border:1px solid rgba(var(--accent-rgb,201,168,76),.34);
  padding:2px 6px; border-radius:5px;
}

.feed-title{ font-size:14.5px; font-weight:700; color:var(--text); line-height:1.35; word-break:break-word; }
.feed-extra{ display:flex; align-items:center; gap:9px; flex-wrap:wrap; margin-top:4px; }
.feed-ref{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:11px; font-weight:600;
  color:var(--muted); background:var(--panel2,rgba(255,255,255,.05));
  border:1px solid var(--border,rgba(255,255,255,.09)); padding:1px 7px; border-radius:5px;
}
.feed-sum{ font-size:12px; color:var(--muted); line-height:1.5; }

.feed-cta{
  display:inline-flex; align-items:center; gap:5px; margin-top:10px;
  font-size:11.5px; font-weight:700; color:var(--accent,#C9A84C);
  background:rgba(var(--accent-rgb,201,168,76),.09); border:1px solid rgba(var(--accent-rgb,201,168,76),.24);
  padding:5px 11px; border-radius:8px; transition:background .15s, gap .15s;
}
.feed-card:hover .feed-cta{ background:rgba(var(--accent-rgb,201,168,76),.17); gap:8px; }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.feed-empty{ text-align:center; padding:48px 20px; color:var(--muted); }
.feed-empty-ico{ width:56px; height:56px; margin:0 auto 14px; border-radius:16px; display:flex; align-items:center; justify-content:center; color:var(--accent,#C9A84C); background:rgba(var(--accent-rgb,201,168,76),.10); border:1px solid rgba(var(--accent-rgb,201,168,76),.26); }
.feed-empty-ico svg{ width:26px; height:26px; }
.feed-empty-h{ font-size:15px; font-weight:700; color:var(--text); margin-bottom:5px; }
.feed-empty-sub{ font-size:12.5px; max-width:420px; margin:0 auto; line-height:1.6; }

/* ── Footer hint ──────────────────────────────────────────────────────────── */
.feed-foot{ margin-top:8px; padding-top:14px; border-top:1px solid var(--border,rgba(255,255,255,.06)); font-size:11.5px; color:var(--muted); display:flex; align-items:center; gap:7px; }
.feed-foot-ico{ display:inline-flex; color:var(--accent,#C9A84C); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width:560px){
  .feed-page{ padding:14px 12px 34px; }
  .feed-hd-right{ width:100%; }
  .feed-card{ grid-template-columns:38px 1fr; gap:10px; }
  .feed-bubble{ width:34px; height:34px; }
}
@media (prefers-reduced-motion:reduce){
  .feed-page,.feed-live-dot,.feed-refresh.is-spin svg{ animation:none !important; }
}
