/* ================================================================
   TradeTeam v2 — Professional Trading Dashboard
   Thai fonts: Prompt (headers/numbers) + Sarabun (body text)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700;800;900&family=Sarabun:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:         #07080f;
  --surface:    #0c0d18;
  --surface2:   #111220;
  --surface3:   #161728;
  --surface-glass: rgba(255,255,255,0.03);

  /* Borders */
  --border:     rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);

  /* Text */
  --text:       #e2e4f0;
  --text-2:     #a8aac4;
  --muted:      #5c6080;

  /* Brand Colors */
  --profit:     #22c55e;
  --profit-dim: rgba(34,197,94,0.12);
  --profit-glow:rgba(34,197,94,0.25);
  --loss:       #ef4444;
  --loss-dim:   rgba(239,68,68,0.12);
  --loss-glow:  rgba(239,68,68,0.25);
  --hold:       #6b7280;

  --blue:       #6366f1;
  --blue-dim:   rgba(99,102,241,0.15);
  --gold:       #f59e0b;
  --gold-dim:   rgba(245,158,11,0.12);
  --purple:     #8b5cf6;
  --purple-dim: rgba(139,92,246,0.12);
  --cyan:       #06b6d4;
  --pink:       #ec4899;

  /* Gradients */
  --grad-profit: linear-gradient(135deg, #22c55e, #16a34a);
  --grad-loss:   linear-gradient(135deg, #ef4444, #dc2626);
  --grad-blue:   linear-gradient(135deg, #6366f1, #4f46e5);
  --grad-gold:   linear-gradient(135deg, #f59e0b, #d97706);
  --grad-card:   linear-gradient(160deg, rgba(255,255,255,0.04) 0%, transparent 100%);

  /* Shape */
  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  16px;
  --radius-full:999px;

  /* Typography */
  --font-head:  'Prompt', 'Noto Sans Thai', sans-serif;
  --font-body:  'Sarabun', 'Prompt', 'Noto Sans Thai', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow-profit: 0 0 20px rgba(34,197,94,0.15);
  --shadow-glow-loss:   0 0 20px rgba(239,68,68,0.15);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99,102,241,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6,182,212,0.04) 0%, transparent 50%);
}

/* ── Layout ───────────────────────────────────────────────── */
.app { display: flex; flex-direction: column; min-height: 100vh; }

.main {
  flex: 1;
  padding: 20px 28px 32px;
  max-width: 1680px;
  margin: 0 auto;
  width: 100%;
}

/* ── Top Bar ──────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,8,15,0.85);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}

.topbar-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
.topbar-logo .logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--grad-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; box-shadow: 0 0 12px rgba(99,102,241,0.4);
}
.topbar-logo .logo-text {
  font-family: var(--font-head);
  font-size: 17px; font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #fff 30%, rgba(99,102,241,0.9));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.topbar-logo .logo-sub {
  font-size: 10px; color: var(--muted); font-weight: 400;
  font-family: var(--font-body); letter-spacing: 0;
  -webkit-text-fill-color: var(--muted);
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

/* Nav links */
nav { display: flex; gap: 2px; }
nav a {
  font-family: var(--font-head);
  color: var(--muted); text-decoration: none;
  font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: var(--radius-sm);
  transition: all 0.15s; letter-spacing: 0.2px;
  display: flex; align-items: center; gap: 5px;
}
nav a:hover  { color: var(--text); background: var(--surface2); }
nav a.active { color: var(--text); background: var(--surface2); }

/* Status indicators */
.status-live {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  color: var(--profit); font-family: var(--font-head);
}
.status-live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--profit);
  box-shadow: 0 0 0 0 var(--profit-glow);
  animation: pulsate 2s infinite;
}
@keyframes pulsate {
  0%   { box-shadow: 0 0 0 0 var(--profit-glow); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.src-badge {
  font-size: 10px; padding: 3px 9px; border-radius: var(--radius-full);
  font-weight: 700; font-family: var(--font-head);
  letter-spacing: 0.3px;
}
.src-badge.live    { background: var(--profit-dim); color: var(--profit); border: 1px solid rgba(34,197,94,0.2); }
.src-badge.testnet { background: var(--gold-dim);   color: var(--gold);   border: 1px solid rgba(245,158,11,0.2); }
.src-badge.mock    { background: var(--surface2);   color: var(--muted);  border: 1px solid var(--border); }

/* ── Setup Banner ─────────────────────────────────────────── */
.setup-banner {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08));
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.setup-banner strong { font-family: var(--font-head); font-weight: 700; }
.setup-banner span   { font-family: var(--font-body); }
.setup-banner a {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--grad-blue); color: #fff;
  padding: 8px 18px; border-radius: var(--radius-sm);
  text-decoration: none; font-size: 12px; font-weight: 700;
  font-family: var(--font-head); white-space: nowrap;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
  transition: all 0.15s;
}
.setup-banner a:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Section Labels ───────────────────────────────────────── */
.section-label {
  font-family: var(--font-head);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ── Ticker Bars ──────────────────────────────────────────── */
.ticker-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.ticker-label {
  padding: 5px 14px;
  font-size: 9px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-head);
  background: rgba(255,255,255,0.015);
}
.ticker-bar {
  padding: 8px 16px;
  display: flex; gap: 20px; overflow-x: auto;
  scrollbar-width: none;
}
.ticker-bar::-webkit-scrollbar { display: none; }
.ticker-item {
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; padding: 4px 8px;
  border-radius: 6px; cursor: pointer;
  transition: background 0.15s;
}
.ticker-item:hover { background: var(--surface2); }
.ticker-sym   { font-size: 10px; color: var(--muted); font-weight: 700; font-family: var(--font-head); letter-spacing: 0.5px; min-width: 36px; }
.ticker-flag  { font-size: 13px; line-height: 1; }
.ticker-price { font-size: 13px; font-weight: 600; font-family: var(--font-mono); transition: color 0.5s; }
.ticker-chg   { font-size: 10px; font-weight: 700; font-family: var(--font-head); }
.ticker-chg.up { color: var(--profit); }
.ticker-chg.dn { color: var(--loss); }

/* ── KPI Grid ─────────────────────────────────────────────── */
.kpi-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 12px; margin-bottom: 24px;
}
@media (max-width: 900px) { .kpi-grid { grid-template-columns: 1fr 1fr; } }

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative; overflow: hidden;
  background-image: var(--grad-card);
  transition: border-color 0.2s, transform 0.2s;
}
.kpi::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}
.kpi:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.kpi-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--muted);
  font-family: var(--font-head); margin-bottom: 6px;
  display: flex; align-items: center; gap: 5px;
}
.kpi-value {
  font-size: 26px; font-weight: 800; font-family: var(--font-head);
  line-height: 1.1; letter-spacing: -0.5px;
}
.kpi-sub { font-size: 11px; color: var(--muted); margin-top: 3px; font-family: var(--font-body); }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background-image: var(--grad-card);
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-hover); }

.card-title {
  font-family: var(--font-head);
  font-size: 10px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 7px;
}

/* ── Main Grid ────────────────────────────────────────────── */
.grid-main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1280px) { .grid-main { grid-template-columns: 1fr; } }

/* ── Forex Grid ───────────────────────────────────────────── */
.forex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.forex-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px; cursor: pointer;
  transition: all 0.18s; position: relative; overflow: hidden;
}
.forex-item:hover {
  border-color: var(--border-hover);
  background: var(--surface3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.forex-item.metals  { border-left: 2px solid rgba(245,158,11,0.5); }
.forex-item.majors  { border-left: 2px solid rgba(99,102,241,0.4); }

.forex-flag   { font-size: 18px; margin-bottom: 5px; display: block; line-height: 1; }
.forex-sym    { font-size: 9px; font-weight: 800; color: var(--muted); letter-spacing: 0.8px; font-family: var(--font-head); }
.forex-price  { font-size: 14px; font-weight: 700; font-family: var(--font-mono); margin: 3px 0; transition: color 0.5s; }
.forex-chg    { font-size: 10px; font-weight: 700; font-family: var(--font-head); }
.forex-chg.up { color: var(--profit); }
.forex-chg.dn { color: var(--loss); }
.forex-spread { font-size: 9px; color: var(--muted); margin-top: 3px; font-family: var(--font-body); }

/* ── Agent Cards ──────────────────────────────────────────── */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px,1fr));
  gap: 12px;
  margin-bottom: 4px;
}

.agent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.2s; cursor: pointer;
  position: relative; overflow: hidden;
  background-image: var(--grad-card);
}
.agent-card::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--agent-color, transparent);
  opacity: 0; transition: opacity 0.2s;
}
.agent-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.agent-card.active { border-color: rgba(var(--agent-color-rgb, 99,102,241), 0.25); }
.agent-card.active::before { opacity: 1; }

.agent-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.agent-avatar {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: var(--agent-color-bg, var(--surface2));
  border: 1px solid var(--agent-color-border, var(--border));
  flex-shrink: 0;
}
.agent-name { font-size: 13px; font-weight: 700; font-family: var(--font-head); }
.agent-role { font-size: 10px; color: var(--muted); font-family: var(--font-body); }

.agent-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600; padding: 3px 9px;
  border-radius: var(--radius-full); margin-bottom: 10px;
  font-family: var(--font-head); letter-spacing: 0.3px;
}
.agent-status.active    { background: var(--profit-dim); color: var(--profit); border: 1px solid rgba(34,197,94,0.2); }
.agent-status.idle      { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }
.agent-status.suspended { background: var(--loss-dim); color: var(--loss); border: 1px solid rgba(239,68,68,0.2); }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.agent-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.a-stat {
  background: var(--surface2); border-radius: 6px; padding: 7px 9px;
  border: 1px solid transparent; transition: border-color 0.15s;
}
.a-stat:hover { border-color: var(--border); }
.a-stat-label { font-size: 9px; color: var(--muted); font-family: var(--font-head); font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; }
.a-stat-val   { font-size: 13px; font-weight: 700; font-family: var(--font-mono); margin-top: 1px; }

/* ── Tables ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  font-family: var(--font-head);
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--muted); padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td {
  padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 12px; font-family: var(--font-body);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.015); }
.mono { font-family: var(--font-mono); font-size: 12px; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
  font-family: var(--font-head);
}
.badge.buy  { background: var(--profit-dim); color: var(--profit); border: 1px solid rgba(34,197,94,0.2); }
.badge.sell { background: var(--loss-dim);   color: var(--loss);   border: 1px solid rgba(239,68,68,0.2); }

/* ── AI Signal Cards ──────────────────────────────────────── */
.signal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.signal-refresh-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; padding: 7px 14px;
  background: var(--blue-dim); border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-sm); color: var(--blue);
  cursor: pointer; transition: all 0.15s; font-family: var(--font-head);
  white-space: nowrap;
}
.signal-refresh-btn:hover { background: rgba(99,102,241,0.2); transform: translateY(-1px); }
.signal-refresh-btn.loading { opacity: 0.6; cursor: wait; pointer-events: none; }
.spin { animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.signal-src {
  font-size: 9px; font-weight: 800; padding: 2px 8px;
  border-radius: var(--radius-full); font-family: var(--font-head); letter-spacing: 0.5px;
}
.signal-src.claude { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(139,92,246,0.25); }
.signal-src.rule   { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }
.signal-src.mock   { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }

.signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}

.signal-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  transition: all 0.2s; position: relative; overflow: hidden;
}
.signal-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
}
.signal-card.buy-card  { border-color: rgba(34,197,94,0.2); }
.signal-card.buy-card::before  { background: var(--grad-profit); }
.signal-card.sell-card { border-color: rgba(239,68,68,0.2); }
.signal-card.sell-card::before { background: var(--grad-loss); }
.signal-card.hold-card { border-color: var(--border); }
.signal-card.hold-card::before { background: var(--surface3); }
.signal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-hover); }

.signal-agent-row { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.signal-avatar {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.signal-agent-name { font-size: 12px; font-weight: 700; font-family: var(--font-head); }
.signal-agent-role { font-size: 9px; color: var(--muted); font-family: var(--font-body); }
.signal-symbol-badge {
  margin-left: auto; font-size: 10px; font-weight: 800;
  padding: 3px 9px; border-radius: var(--radius-full);
  background: var(--blue-dim); color: var(--blue);
  border: 1px solid rgba(99,102,241,0.2);
  font-family: var(--font-head); letter-spacing: 0.5px;
}

.signal-action-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.signal-action {
  font-size: 22px; font-weight: 900; letter-spacing: 1px;
  font-family: var(--font-head); min-width: 60px;
}
.signal-action.buy  { color: var(--profit); }
.signal-action.sell { color: var(--loss); }
.signal-action.hold { color: var(--muted); }

.confidence-wrap { flex: 1; }
.confidence-label {
  display: flex; justify-content: space-between;
  font-size: 9px; color: var(--muted); margin-bottom: 4px;
  font-family: var(--font-head); font-weight: 600;
}
.confidence-val { font-weight: 800; }
.confidence-bar {
  height: 4px; background: var(--surface);
  border-radius: var(--radius-full); overflow: hidden;
}
.confidence-fill {
  height: 100%; border-radius: var(--radius-full);
  transition: width 0.9s cubic-bezier(0.4,0,0.2,1);
}
.buy-card  .confidence-fill { background: var(--grad-profit); }
.sell-card .confidence-fill { background: var(--grad-loss); }
.hold-card .confidence-fill { background: linear-gradient(90deg, var(--muted), var(--surface3)); }

.signal-reason {
  font-size: 11px; color: var(--text-2); line-height: 1.55;
  margin-bottom: 12px; font-family: var(--font-body);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.signal-levels { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
.signal-level {
  background: var(--surface); border-radius: 6px;
  padding: 6px 7px; text-align: center;
  border: 1px solid var(--border);
}
.signal-level-lbl { font-size: 8px; color: var(--muted); font-weight: 700; font-family: var(--font-head); letter-spacing: 0.5px; }
.signal-level-val { font-size: 11px; font-weight: 700; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.sl-val { color: var(--loss); }
.tp-val { color: var(--profit); }
.rr-val { color: var(--blue); }

.signal-footer {
  display: flex; align-items: center; gap: 7px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 10px; color: var(--muted); font-family: var(--font-head);
}
.signal-tf-badge {
  padding: 2px 7px; border-radius: 5px; font-weight: 800; font-size: 9px;
  background: rgba(255,255,255,0.05); letter-spacing: 0.5px;
}
.risk-dots { display: flex; gap: 2px; align-items: center; }
.risk-dot  { width: 5px; height: 5px; border-radius: 2px; }
.risk-dot.filled { background: var(--gold); }
.risk-dot.empty  { background: var(--surface3); }

/* ── AI Brain Widget ──────────────────────────────────────── */
.ai-status-card {
  background: linear-gradient(160deg, rgba(99,102,241,0.08), rgba(139,92,246,0.05));
  border: 1px solid rgba(99,102,241,0.18); border-radius: var(--radius);
  padding: 16px;
}
.ai-model-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ai-brain-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.ai-model-name { font-size: 13px; font-weight: 700; font-family: var(--font-head); }
.ai-model-sub  { font-size: 10px; color: var(--muted); font-family: var(--font-body); }
.ai-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ai-stat  { background: rgba(0,0,0,0.25); border-radius: 8px; padding: 8px 10px; text-align: center; border: 1px solid rgba(255,255,255,0.04); }
.ai-stat-val { font-size: 16px; font-weight: 800; font-family: var(--font-head); }
.ai-stat-lbl { font-size: 9px; color: var(--muted); font-family: var(--font-head); font-weight: 600; letter-spacing: 0.3px; }

/* ── News Feed ────────────────────────────────────────────── */
.news-list { display: flex; flex-direction: column; gap: 6px; }

.news-item {
  display: flex; gap: 10px; padding: 11px 13px;
  background: var(--surface2); border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all 0.15s; cursor: pointer;
}
.news-item:hover { background: var(--surface3); transform: translateX(2px); }
.news-item.positive { border-left-color: var(--profit); }
.news-item.negative { border-left-color: var(--loss); }
.news-item.neutral  { border-left-color: var(--muted); }

.news-title {
  font-size: 12px; font-weight: 500; line-height: 1.45;
  margin-bottom: 5px; font-family: var(--font-body); color: var(--text);
}
.news-meta {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 10px; color: var(--muted); font-family: var(--font-body);
}
.news-source-tag {
  font-weight: 700; font-family: var(--font-head); color: var(--text-2);
  font-size: 9px; letter-spacing: 0.3px;
}
.news-badge {
  font-size: 9px; font-weight: 800; padding: 1px 6px;
  border-radius: 4px; font-family: var(--font-head); letter-spacing: 0.3px;
  background: rgba(255,255,255,0.06);
}
.news-badge.critical { background: var(--loss-dim); color: var(--loss); }
.news-badge.high     { background: var(--gold-dim);  color: var(--gold); }
.news-badge.medium   { background: var(--blue-dim);  color: var(--blue); }

.news-cur-tag {
  background: rgba(255,255,255,0.05); padding: 1px 6px;
  border-radius: 4px; font-size: 9px; font-weight: 700;
  font-family: var(--font-head); color: var(--muted);
}

/* Sentiment dot */
.sentiment-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  margin-top: 4px;
}
.sentiment-dot.positive { background: var(--profit); box-shadow: 0 0 4px var(--profit); }
.sentiment-dot.negative { background: var(--loss); box-shadow: 0 0 4px var(--loss); }
.sentiment-dot.neutral  { background: var(--muted); }

/* ── Risk Monitor ─────────────────────────────────────────── */
.risk-row { margin-bottom: 10px; }
.risk-row:last-child { margin-bottom: 0; }
.risk-label-row {
  display: flex; justify-content: space-between;
  font-size: 11px; margin-bottom: 5px; font-family: var(--font-body);
}
.risk-label { color: var(--muted); }
.risk-value { font-weight: 700; font-family: var(--font-head); }
.risk-track {
  background: var(--surface2); border-radius: var(--radius-full);
  height: 4px; overflow: hidden;
}
.risk-fill {
  height: 100%; border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Colors ───────────────────────────────────────────────── */
.c-profit { color: var(--profit) !important; }
.c-loss   { color: var(--loss)   !important; }
.c-blue   { color: var(--blue)   !important; }
.c-gold   { color: var(--gold)   !important; }
.c-muted  { color: var(--muted)  !important; }
.c-purple { color: var(--purple) !important; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* ── Animations ───────────────────────────────────────────── */
.flip   { animation: flip  0.35s ease; }
.nudge  { animation: nudge 0.35s ease; }
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes flip    { 0%{transform:scaleY(0)} 60%{transform:scaleY(1.04)} 100%{transform:scaleY(1)} }
@keyframes nudge   { 0%{transform:translateX(-4px)} 60%{transform:translateX(2px)} 100%{transform:translateX(0)} }
@keyframes fadeIn  { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* Staff cards */
.staff-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--surface2);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  transition: all 0.15s;
}
.staff-card:hover { border-color: var(--border-hover); }
.staff-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.staff-name { font-size: 13px; font-weight: 700; font-family: var(--font-head); }
.staff-role { font-size: 10px; color: var(--muted); font-family: var(--font-body); }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  text-align: center; padding: 16px 24px;
  color: var(--muted); font-size: 11px;
  border-top: 1px solid var(--border);
  font-family: var(--font-body);
}
footer a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
footer a:hover { color: var(--text-2); }
