/* Google Fonts loaded via <link> tags in HTML head (display=optional for CLS) */

/* ======================================================
   Pouls BRVM — Unified Stylesheet
   Dark luxury theme — brvm-design-1
   Single source of truth for all pages (main + Ideas)
====================================================== */

/* ── VARIABLES ─────────────────────────────────────── */
:root {
  /* Core palette */
  --navy:         #080d1c;
  --navy-mid:     #0f1628;
  --navy-light:   #172035;
  --navy-card:    #1c2840;

  /* Gold accents */
  --gold:         #c9a84c;
  --gold-light:   #e8c97e;
  --gold-pale:    rgba(201,168,76,0.10);
  --gold-border:  rgba(201,168,76,0.18);

  /* Semantic aliases (used throughout PHP templates) */
  --bg:           #080d1c;
  --surface:      #172035;
  --surface-2:    #1c2840;
  --border:       rgba(201,168,76,0.15);
  --border-2:     rgba(201,168,76,0.10);
  --text:         #ffffff;
  --muted:        #7a8499;
  --muted-light:  #a0acbe;

  --primary:      #c9a84c;
  --primary-2:    #e8c97e;
  --primary-soft: rgba(201,168,76,0.10);

  --positive:     #2dd4a0;
  --positive-pale: rgba(45,212,160,0.12);
  --negative:     #f87171;
  --negative-pale: rgba(248,113,113,0.12);
  --warning:      #f59e0b;

  --radius:       0px;
  --radius-sm:    0px;

  --shadow-soft:  0 6px 18px rgba(0,0,0,0.35);
  --shadow:       0 14px 36px rgba(0,0,0,0.5);
  --shadow-hover: 0 16px 40px rgba(0,0,0,0.6);
  --table-head:   #0f1628;
  --transition:   .2s cubic-bezier(.4,0,.2,1);
}

/* ── RESET & BASE ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; max-width: 100%; overflow-x: hidden; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Subtle film-grain noise texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9998; opacity: .35;
}

a { color: inherit; text-decoration: none; }
a.company-link { color: var(--primary); font-weight: 700; text-decoration: none; }
a.company-link:hover { color: var(--primary-2); text-decoration: underline; }
h1, h2, h3 { margin: 0; font-family: 'Cormorant Garamond', serif; }
p { margin: 0; }
ul { margin: 0; padding-left: 18px; }
small { color: var(--muted); }
option { background: var(--navy-mid); color: var(--text); }

.ind-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.ind-toggle-wrap label.small {
  margin: 0;
}

.ind-period-input {
  width: 34px;
  min-width: 34px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  text-align: center;
  padding: 0 1px;
  border-radius: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}

.ind-period-input::-webkit-outer-spin-button,
.ind-period-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ind-period-input:focus {
  outline: none;
  border-bottom-color: rgba(201,168,76,0.7);
}

/* ── LAYOUT ────────────────────────────────────────── */
.app { display: block; width: 100%; max-width: 100%; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(8,13,28,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 12px 40px;
}
.topbar-inner {
  display: flex; gap: 12px; align-items: center;
  justify-content: space-between; flex-wrap: wrap;
}
.site-promo-banner-wrap {
  padding: 14px 40px 0;
}
.site-promo-banner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border: 1px solid rgba(45,212,160,0.28);
  background: rgba(45,212,160,0.08);
}
.site-promo-banner__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #d7ffee;
  font-size: .9rem;
  line-height: 1.45;
}
.site-promo-banner__copy strong {
  color: #ffffff;
}
.site-promo-banner__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--positive);
}
.site-promo-banner__eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 10px rgba(45,212,160,0.6);
}

/* Brand — pulsing green dot via ::before */
.brand {
  display: inline-block;
  width: clamp(148px, 18vw, 220px);
  max-width: min(220px, 60vw);
  height: 42px;
  flex-shrink: 0;
  text-indent: -9999px;
  white-space: nowrap;
  overflow: hidden;
  background: url("/BRVM/assets/branding/pouls-brvm-logo-20260330-dark-1.png") no-repeat left center / contain;
}
.brand::before {
  content: none;
  display: none;
}
@keyframes pulse-dot { 0%,100%{opacity:1;} 50%{opacity:.3;} }

.navlinks { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.navlinks a {
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 0;
  font-weight: 500; font-size: .75rem;
  letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  background: none;
  transition: color var(--transition), border-color var(--transition);
}
.navlinks a:hover {
  color: var(--gold-light);
  border-color: var(--border);
  transform: none; box-shadow: none;
}
.navlinks a.active {
  color: var(--gold-light);
  border-color: var(--border);
  background: none;
}
.navlinks a[href*="simulation.php"] { display: none !important; }

/* ── AI Battle pill ────────────────────────────────────── */
.nav-pill--ai {
  color: var(--accent, #c8a96e);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-pill--ai.active,
.nav-pill--ai:hover {
  color: var(--accent, #c8a96e);
  opacity: 0.85;
}
.nav-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--accent, #c8a96e);
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.4;
}

.nav-dropdown {
  position: relative;
  margin: 0;
}
.nav-dropdown summary {
  list-style: none;
}
.nav-dropdown summary::-webkit-details-marker {
  display: none;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid transparent;
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  user-select: none;
}
.nav-dropdown-trigger:focus,
.nav-dropdown-trigger:focus-visible {
  outline: none;
  box-shadow: none;
}
.nav-dropdown-trigger::after {
  content: "▾";
  font-size: .7em;
  color: var(--gold);
  transition: transform var(--transition);
}
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown[open] .nav-dropdown-trigger,
.nav-dropdown--active .nav-dropdown-trigger {
  color: var(--gold-light);
  border-color: var(--border);
}
.nav-dropdown[open] .nav-dropdown-trigger::after {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  padding: 6px 0;
  background: rgba(15, 22, 40, 0.98);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  z-index: 350;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown[open] .nav-dropdown-menu {
  display: flex;
}
.nav-dropdown-menu a {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-light);
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  color: var(--gold-light);
  background: rgba(201,168,76,0.08);
}

.strategies-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.strategies-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.strategies-card-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 8px;
  border: 1px solid var(--border);
  color: var(--gold-light);
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  letter-spacing: .1em;
}
.strategies-card-title {
  margin: 0;
  color: var(--gold-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 500;
}
.strategies-card-desc {
  margin: 0;
  flex: 1;
  color: var(--muted-light);
  font-size: .82rem;
  line-height: 1.65;
}
.strategies-card-usecase {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--border);
  color: var(--muted);
  font-size: .74rem;
}
.strategies-warning {
  margin-top: 16px;
  padding: 10px 14px;
  border-left: 2px solid var(--gold-border);
  background: rgba(201,168,76,0.06);
  color: var(--muted-light);
  font-size: .8rem;
}

/* Auth nav (Ideas topbar) */
.nav-auth { display: flex; gap: 8px; align-items: center; }
.nav-user {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}

.nav-user-dropdown {
  position: relative;
}
.nav-user-toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  cursor: pointer;
  padding: 7px 10px;
  border: 1px solid var(--border);
  background: rgba(12, 23, 48, 0.92);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .01em;
  user-select: none;
}
.nav-user-toggle::-webkit-details-marker { display: none; }
.nav-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 14px;
  border: 1px solid rgba(201, 168, 76, 0.45);
}
.nav-user-name {
  font-weight: 700;
  color: #e7edf8;
}
.nav-user-caret {
  color: var(--gold);
  font-size: .72rem;
  transition: transform var(--transition);
}
.nav-user-dropdown[open] .nav-user-caret { transform: rotate(180deg); }

.nav-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, calc(100vw - 24px));
  background: linear-gradient(180deg, rgba(13, 28, 59, 0.98), rgba(9, 20, 43, 0.98));
  border: 1px solid rgba(130, 154, 197, 0.35);
  box-shadow: 0 22px 36px rgba(1, 8, 19, 0.52);
  z-index: 500;
  padding: 10px;
  display: grid;
  gap: 8px;
}
.nav-user-stats {
  display: grid;
  gap: 8px;
  margin-bottom: 2px;
}
.nav-user-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(130, 154, 197, 0.33);
  font-size: .96rem;
  color: #c9d4e7;
  text-decoration: none;
  background: rgba(14, 29, 60, 0.4);
}
.nav-user-stat strong {
  color: #e0bb66;
  font-family: 'DM Mono', monospace;
  font-size: .9rem;
}
.nav-user-menu-link {
  display: block;
  padding: 9px 10px;
  border: 1px solid rgba(130, 154, 197, 0.33);
  font-size: .84rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #f3f6fd;
  text-decoration: none;
  background: rgba(14, 29, 60, 0.38);
}
.nav-user-menu-link:hover,
.nav-user-stat:hover {
  border-color: rgba(213, 178, 95, 0.62);
  background: rgba(19, 39, 82, 0.68);
}
.nav-user-menu-link--danger {
  color: #f0aaaa;
}


.content       { padding: 20px; width: 100%; max-width: 100%; }
.ideas-content { padding: 20px; width: 100%; max-width: 1200px; margin: 0 auto; }

/* ── CARDS ─────────────────────────────────────────── */
.card, .table-card, .chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  padding: 16px;
  margin-bottom: 16px;
  width: 100%; max-width: 100%;
  transition: background var(--transition);
}
.card:hover, .table-card:hover { background: var(--surface-2); box-shadow: none; }

.card h3, .table-card h3, .chart-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; font-weight: 500; margin: 0 0 10px 0;
  color: var(--gold-light); letter-spacing: .02em;
}
.table-title {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.table-sub { font-size: 12px; color: var(--muted); }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 28px; max-width: 520px; margin: 32px auto;
}
.form-card--wide { max-width: 760px; }

/* ── GRID LAYOUTS ──────────────────────────────────── */
.grid-2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; width: 100%; max-width: 100%;
}
.grid-2--tight { gap: 10px; }
.grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; width: 100%; max-width: 100%;
}
.grid-full { grid-column: 1 / -1; }

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.kpi {
  border: 1px solid var(--border);
  border-radius: 0; padding: 14px;
  background: var(--surface);
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.kpi::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--gold); transform: scaleX(0); transition: transform .35s;
}
.kpi:hover { background: var(--surface-2); }
.kpi:hover::after { transform: scaleX(1); }
.kpi .n { font-family: 'DM Mono', monospace; font-weight: 500; font-size: 16px; }
.kpi .l { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .08em; }

/* ── TABLES ────────────────────────────────────────── */
.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; max-width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--table-head);
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap;
  font-weight: 400; font-size: .65rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold);
}
tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  white-space: nowrap; vertical-align: middle;
  color: var(--text);
}
tbody tr:hover td { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }

.center { text-align: center; }
.right  { text-align: right; }
.cell-strong { font-weight: 700; }
.cell-muted  { color: var(--muted); font-weight: 500; }
.rank {
  width: 38px; text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: .72rem; color: var(--muted);
}
.perf-positive { color: var(--positive); font-weight: 700; font-family: 'DM Mono', monospace; }
.perf-negative { color: var(--negative); font-weight: 700; font-family: 'DM Mono', monospace; }

/* ── BUTTONS ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: none;
  font-weight: 500; font-size: .75rem;
  letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; text-decoration: none;
  color: var(--muted-light);
  transition: all var(--transition);
}
.btn:hover {
  background: var(--gold-pale);
  color: var(--gold-light);
  border-color: var(--gold-border);
  transform: none; box-shadow: none;
}
.btn:active { transform: none; }

.btn-primary, .btn.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  font-weight: 600;
}
.btn-primary:hover, .btn.primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--navy);
  box-shadow: 0 8px 24px rgba(201,168,76,.3);
  transform: translateY(-2px);
}
.btn-outline, .btn.outline {
  background: none;
  color: var(--muted-light);
  border-color: var(--border);
}
.btn-sm, .btn.small { padding: 6px 12px; font-size: .7rem; }
.btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}
.btn.danger { background: var(--negative-pale); border-color: rgba(248,113,113,.3); color: var(--negative); }
.btn.danger:hover { background: rgba(248,113,113,.2); }
.btn.publish { background: #7e22ce; border-color: #6b21a8; color: #fff; text-transform: none; }
.btn.publish:hover { background: #6b21a8; }

.share-btn {
  border-radius: 0;
  font-weight: 500;
  padding: 8px 13px; gap: 8px;
  border: 1px solid var(--border);
  background: none; color: var(--muted);
}
.share-icon { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: currentColor; }
.share-icon svg { width: 16px; height: 16px; display: block; fill: currentColor; }
.share-facebook { color: #1877f2; }
.share-x        { color: var(--muted-light); }
.share-telegram { color: #229ed9; }
.share-whatsapp { color: #16a34a; }
.share-facebook:hover { border-color: rgba(24,119,242,.35); background: rgba(24,119,242,.08); box-shadow: 0 6px 16px rgba(24,119,242,.15); }
.share-x:hover        { border-color: rgba(160,172,190,.35); background: rgba(160,172,190,.08); box-shadow: 0 6px 16px rgba(160,172,190,.15); }
.share-telegram:hover { border-color: rgba(34,158,217,.35); background: rgba(34,158,217,.08); box-shadow: 0 6px 16px rgba(34,158,217,.15); }
.share-whatsapp:hover { border-color: rgba(22,163,74,.35);  background: rgba(22,163,74,.08);  box-shadow: 0 6px 16px rgba(22,163,74,.15);  }

/* ── FORM ELEMENTS ─────────────────────────────────── */
.input, .form-control {
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 10px 13px;
  font-size: 14px; font-family: inherit;
  font-weight: 400; color: var(--text);
  background: var(--navy-mid); outline: none;
  transition: var(--transition); width: 100%;
}
.input:focus, .form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.10);
}
.input::placeholder, .form-control::placeholder { color: var(--muted); }
textarea.form-control { resize: vertical; }
select.form-control   { width: 100%; }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--muted-light); letter-spacing: .06em; text-transform: uppercase; }
.form-error { color: var(--negative); font-size: 12px; font-weight: 600; }
.form-hint  { color: var(--muted); font-size: 12px; }
.auth-login-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.auth-login-actions .btn {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  font-size: .68rem;
  letter-spacing: .04em;
  white-space: nowrap;
}
.field  { display: flex; flex-direction: column; gap: 6px; }
.label  { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.form-checkbox { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.form-checkbox input { margin-top: 3px; }

.form-preview-img { max-width: 100%; border: 1px solid var(--border); border-radius: 0; }

select {
  border: 1px solid var(--border); background: var(--navy-mid);
  padding: 8px 10px; border-radius: 0;
  font-weight: 500; font-size: 12px;
  color: var(--text); outline: none;
  transition: var(--transition);
}
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.10);
}
.table-title select { min-width: 140px; max-width: 220px; }

.filter-select {
  border: 1px solid var(--border); background: var(--navy-mid);
  padding: 8px 10px; border-radius: 0;
  font-weight: 500; font-size: 12px; color: var(--text);
}
.filters-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.controls    { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* ── BADGES & PILLS ────────────────────────────────── */
.badge, .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--gold-pale);
  font-size: 12px; font-weight: 600;
  color: var(--muted); white-space: nowrap;
  font-family: 'DM Mono', monospace;
}
.pill.good, .badge-success, .badge-bullish { color: var(--positive); border-color: rgba(45,212,160,.3);  background: var(--positive-pale); }
.pill.bad,  .badge-danger,  .badge-bearish { color: var(--negative); border-color: rgba(248,113,113,.3); background: var(--negative-pale); }
.pill.warn, .badge-warning                { color: var(--warning);  border-color: rgba(245,158,11,.3);  background: rgba(245,158,11,.12); }
.badge-neutral { background: var(--surface-2); color: var(--muted); border-color: var(--border); }

.badge-mini {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 0;
  background: var(--surface); font-size: 12px; font-weight: 600; color: var(--muted);
}
.badge-date-cotation {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 0;
  background: var(--gold-pale); border: 1px solid var(--border);
  color: var(--gold); font-size: 11px; font-weight: 700; vertical-align: middle;
  font-family: 'DM Mono', monospace;
}
.badge-trim {
  display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 0;
  background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3); color: var(--warning);
  font-size: 10px; font-weight: 700; text-transform: lowercase; white-space: nowrap;
}
.badge-trim.badge-trim-grey { background: var(--surface-2); border-color: var(--border); color: var(--muted); }

/* ── ALERT BOXES ───────────────────────────────────── */
.alert-error {
  margin: 12px 0; color: var(--negative); font-weight: 600;
  background: var(--negative-pale); border: 1px solid rgba(248,113,113,.3);
  padding: 12px 14px; border-radius: 0; font-size: 13px;
}
.alert-success {
  margin: 12px 0; color: var(--positive); font-weight: 600;
  background: var(--positive-pale); border: 1px solid rgba(45,212,160,.3);
  padding: 12px 14px; border-radius: 0; font-size: 13px;
}

/* ── PUBLISH TOAST ─────────────────────────────────── */
.publish-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9000;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--surface-2); border: 1px solid rgba(45,212,160,.4);
  color: var(--positive); font-weight: 600; font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  animation: toastIn .25s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.publish-toast__close {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 18px; line-height: 1; padding: 0 2px;
}
.publish-toast__close:hover { color: var(--text); }

/* ── IDEAS: GRID & CARDS ───────────────────────────── */
.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.idea-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 0; box-shadow: none;
  overflow: hidden; display: flex; flex-direction: column;
  transition: background var(--transition), transform var(--transition);
  position: relative;
}
.idea-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--gold); transform: scaleX(0); transition: transform .35s;
}
.idea-card:hover { background: var(--surface-2); transform: translateY(-3px); box-shadow: var(--shadow); }
.idea-card:hover::after { transform: scaleX(1); }

.idea-card__thumb {
  width: 100%; height: 180px;
  object-fit: cover; background: var(--table-head);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-weight: 700;
}
.idea-card__body {
  padding: 14px 16px; flex: 1;
  display: flex; flex-direction: column; gap: 8px;
}
.idea-card__title { font-size: 14px; font-weight: 600; margin: 0; line-height: 1.3; }
.idea-card__title a { color: var(--text); text-decoration: none; }
.idea-card__title a:hover { color: var(--gold-light); }
.idea-card__meta {
  font-size: 12px; color: var(--muted);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.idea-card__excerpt {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  opacity: .9;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.idea-card__footer {
  padding: 10px 16px; border-top: 1px solid var(--border);
  display: flex; gap: 14px; font-size: 12px; color: var(--muted);
}

/* ── IDEAS: DETAIL PAGE ────────────────────────────── */
.idea-detail {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 0; box-shadow: none;
  padding: 20px; margin-bottom: 16px;
}
.idea-detail__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem,3vw,2.2rem); font-weight: 500;
  line-height: 1.2; margin: 0 0 10px 0; color: var(--gold-light);
}
.idea-detail__meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-items: center; color: var(--muted);
  font-size: 13px; margin-bottom: 12px;
}
.idea-detail__img {
  width: 100%; border-radius: 0;
  border: 1px solid var(--border); background: var(--table-head);
}
.idea-levels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px; margin-top: 12px;
}
.idea-level {
  border: 1px solid var(--border); border-radius: 0;
  padding: 10px; background: var(--surface-2);
}
.idea-level .k { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.idea-level .v { font-size: 14px; font-weight: 600; font-family: 'DM Mono', monospace; }
.stat-line { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }

/* ── IDEAS: COMMENTS ───────────────────────────────── */
.comment-list  { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.comment-card  { border: 1px solid var(--border); border-radius: 0; padding: 12px; background: var(--surface); }
.comment-card--reply {
  margin-left: 22px;
  border-left: 2px solid var(--gold-border);
  background: linear-gradient(90deg, rgba(201,168,76,.06), transparent 45%), var(--surface);
}
.comment-replies { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.comment-actions { display: flex; gap: 6px; align-items: center; }
.comment-reply-target {
  display: inline-flex;
  padding: 1px 6px;
  border: 1px solid var(--border);
  color: var(--gold-light);
  font-size: .7rem;
  letter-spacing: .04em;
}

/* ── TOOLTIPS ──────────────────────────────────────── */
.tooltip { position: relative; cursor: help; border-bottom: 1px dotted var(--muted); }
.tooltip .tip {
  position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%);
  background: #050810; color: var(--text); padding: 8px 10px; border-radius: 0;
  border: 1px solid var(--border);
  font-size: 12px; width: 280px; opacity: 0; pointer-events: none;
  transition: .15s; z-index: 10;
}
.tooltip:hover .tip { opacity: 1; }

/* ── CHARTS ────────────────────────────────────────── */
.chart-wrap { width: 100%; max-width: 100%; height: 340px; overflow: hidden; }
canvas { display: block; max-width: 100% !important; }
.chart-premium-badge { font-size: 0.6rem; background: var(--gold, #c9a84c); color: #000; border-radius: 3px; padding: 1px 5px; vertical-align: middle; margin-left: 8px; font-weight: 700; letter-spacing: .03em; }
.chart-upgrade-hint { font-size: 0.8rem; color: var(--text-muted, #94a3b8); text-align: center; padding: 0.5rem 1rem; margin-top: 4px; }
.chart-upgrade-hint a { color: var(--gold, #c9a84c); }

.portfolio-sector-wrap { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.portfolio-sector-donut {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex: none;
  background: radial-gradient(circle at center, var(--surface) 36%, transparent 37%), var(--surface);
}
.portfolio-sector-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  min-width: 220px;
  flex: 1;
}
.portfolio-sector-legend li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted-light);
  border-bottom: 1px solid rgba(255,255,255,.04);
  padding-bottom: 5px;
}
.portfolio-sector-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.portfolio-sector-left span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portfolio-sector-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  background: var(--c, #fff);
  border: 1px solid rgba(255,255,255,.2);
  flex: none;
}

/* ── DASHBOARD SECTION LAYOUT ─────────────────────── */
.layout-item-managed {
  position: relative;
  transition: max-height .22s ease, border-color .2s ease, box-shadow .2s ease;
}
.layout-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  background: rgba(4, 9, 20, .88);
  z-index: 35;
}
.layout-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  width: 24px;
  height: 24px;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}
.layout-btn:hover {
  background: var(--gold-pale);
  color: var(--gold-light);
  border-color: var(--gold-border);
}
.layout-btn.is-active {
  background: var(--gold-pale);
  color: var(--gold-light);
  border-color: var(--gold-border);
}
.layout-item-managed.is-collapsed {
  max-height: 74px;
  overflow: hidden;
}
.layout-item-managed.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(9,18,45,0), rgba(9,18,45,.95));
}
.layout-item-managed.is-enlarged {
  border-color: var(--gold-border);
  box-shadow: 0 0 0 1px rgba(201,168,76,.28), 0 16px 42px rgba(0,0,0,.42);
  min-height: min(78vh, 760px);
}
.layout-item-managed.is-enlarged .chart-wrap {
  height: min(72vh, 620px) !important;
}
.layout-item-managed.is-enlarged .table-scroll {
  max-height: min(62vh, 520px);
  overflow: auto;
}
.layout-item-managed.is-enlarged.grid-2 {
  grid-template-columns: 1fr;
}

/* ── CHAT WIDGET ───────────────────────────────────── */
.chat-fab {
  position: fixed; right: 18px; bottom: 18px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gold); color: var(--navy);
  display: none; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900; cursor: pointer;
  box-shadow: 0 8px 32px rgba(201,168,76,.4);
  z-index: 10000; user-select: none;
  transition: transform .3s, box-shadow .3s;
}
.chat-fab:hover { transform: scale(1.08); box-shadow: 0 12px 40px rgba(201,168,76,.5); }

.chat-widget {
  position: fixed; right: 18px; bottom: 18px;
  width: min(420px, calc(100vw - 24px));
  height: min(62vh, 440px);
  min-width: 300px;
  min-height: 220px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  z-index: 9999; overflow: hidden;
  display: flex; flex-direction: column;
  resize: both;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 16px;
  background: var(--table-head); border-bottom: 1px solid var(--border);
  cursor: grab; user-select: none;
  touch-action: none;
}
.chat-head:active { cursor: grabbing; }
.chat-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem; font-weight: 500; color: var(--gold-light);
}
.chat-actions { display: flex; gap: 6px; align-items: center; }
.chat-icon {
  border: 1px solid var(--border); background: none;
  width: 28px; height: 28px; border-radius: 0;
  font-weight: 700; cursor: pointer; color: var(--muted);
  transition: var(--transition);
  font-size: 12px;
  line-height: 1;
}
.chat-icon:hover { background: var(--gold-pale); color: var(--gold-light); }
.chat-icon.is-active { background: var(--gold-pale); color: var(--gold-light); border-color: var(--gold-border); }
.chat-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1;
}
.chat-widget.is-minimized .chat-body { display: none; }
.chat-widget.is-minimized { height: auto !important; min-height: 0; resize: none; }
.chat-widget.is-minimized .chat-head { border-bottom: none; }
.chat-widget.is-hidden { display: none; }
.chat-widget.is-expanded { border-color: var(--gold-border); }

.chatbox {
  border: 1px solid var(--border); border-radius: 0;
  padding: 10px; max-height: none; overflow: auto;
  min-height: 120px; flex: 1;
  background: var(--navy-mid);
}
.chatrow { padding: 8px 0; font-size: 13px; }
.chatrow b { font-weight: 700; color: var(--gold-light); }
.chatinput {
  flex: 1; min-width: 220px;
  border: 1px solid var(--border); border-radius: 0;
  padding: 10px; font-weight: 400;
  background: var(--navy-mid); color: var(--text);
  outline: none; font-family: inherit;
  transition: border-color var(--transition);
}
.chatinput:focus { border-color: var(--gold); }
.chatinput::placeholder { color: var(--muted); }
.chat-quick-prompts-title {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .03em;
}
.chat-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 132px;
  overflow: auto;
  padding-right: 2px;
  align-content: flex-start;
}
.chat-prompt-btn {
  border: 1px solid var(--border);
  background: rgba(201,168,76,.08);
  color: var(--gold-light);
  border-radius: 0;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  transition: var(--transition);
}
.chat-prompt-btn:hover,
.chat-prompt-btn:focus-visible {
  background: rgba(201,168,76,.18);
  border-color: var(--gold-border);
  outline: none;
}
.chat-dividend-card {
  margin-top: 8px;
  border: 1px solid var(--border);
  background: rgba(10, 20, 48, .75);
}
.chat-dividend-meta {
  padding: 8px 10px;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.chat-dividend-table-wrap {
  overflow-x: auto;
}
.chat-dividend-table {
  width: 100%;
  min-width: 430px;
  border-collapse: collapse;
  font-size: 12px;
}
.chat-dividend-table th,
.chat-dividend-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  white-space: nowrap;
}
.chat-dividend-table th {
  background: rgba(201,168,76,.14);
  color: var(--gold-light);
  font-weight: 700;
  text-align: left;
}
.chat-dividend-table td {
  color: var(--text);
}
.chat-dividend-table tbody tr:nth-child(even) td {
  background: rgba(255,255,255,.02);
}
.chat-dividend-table td:first-child,
.chat-dividend-table th:first-child {
  width: 32px;
  text-align: right;
}
.chat-dividend-table td:nth-child(4),
.chat-dividend-table td:nth-child(5) {
  text-align: right;
}
.chat-dividend-more {
  padding: 8px 10px;
  font-size: 11px;
  color: var(--muted);
}
.chat-market-card {
  margin-top: 8px;
  border: 1px solid var(--border);
  background: rgba(10, 20, 48, .8);
}
.chat-market-head {
  padding: 9px 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(201,168,76,.08);
}
.chat-market-title {
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.chat-market-subtitle {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}
.chat-market-chart {
  padding: 8px 10px 4px;
}
.chat-market-chart svg {
  width: 100%;
  height: 68px;
  display: block;
}
.chat-market-chart-meta {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.chat-market-variation {
  font-weight: 700;
  color: var(--gold-light);
}
.chat-market-variation.is-up {
  color: #2ecf88;
}
.chat-market-variation.is-down {
  color: #f08888;
}
.chat-market-table-wrap {
  overflow-x: auto;
}
.chat-market-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.chat-market-table th,
.chat-market-table td {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 7px 10px;
}
.chat-market-table th {
  width: 44%;
  text-align: left;
  color: var(--muted);
  font-weight: 600;
}
.chat-market-table td {
  text-align: right;
  color: var(--text);
  font-weight: 500;
}
.chat-market-suggestion {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 8px 10px;
  font-size: 11px;
  color: var(--muted);
}

/* ── TABS (profile) ────────────────────────────────── */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabpage { display: block; }
.tabbtn {
  border: 1px solid var(--border); background: none;
  padding: 8px 14px; border-radius: 0;
  font-weight: 500; cursor: pointer;
  color: var(--muted); font-size: .75rem;
  letter-spacing: .06em; text-transform: uppercase;
  transition: var(--transition);
}
.tabbtn.active { background: var(--gold-pale); color: var(--gold-light); border-color: var(--gold-border); }

/* ── TA CONTROLS (profile) ─────────────────────────── */
.ta-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.ta-controls select { border: 1px solid var(--border); background: var(--navy-mid); padding: 8px 10px; border-radius: 0; font-weight: 500; color: var(--text); }
.ta-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 0; background: var(--surface);
  font-size: 12px; font-weight: 500; color: var(--muted);
}
.ta-toggle input { margin: 0; }
.ta-interpreter {
  margin-top: 10px; border: 1px solid var(--border);
  border-radius: 0; background: var(--surface); padding: 10px 12px;
}
.ta-interpreter .title { font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; }
.ta-interpreter .line  { font-size: 13px; margin: 2px 0; color: var(--text); }

/* ── COMPANY FILTER (profile) ──────────────────────── */
.company-filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
select.company-select {
  border: 1px solid var(--border); background: var(--navy-mid);
  padding: 10px 12px; border-radius: 0;
  font-weight: 500; max-width: min(520px, 100%); color: var(--text);
}

/* ── AI TEXT (profile) ─────────────────────────────── */
.ai-text { font-size: 13px; color: var(--text); white-space: pre-wrap; }
.ai-text b { font-weight: 700; color: var(--gold-light); }
.ai-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── CALLOUT (simulation) ──────────────────────────── */
.callout {
  border: 1px solid rgba(201,168,76,.25); background: var(--gold-pale);
  border-radius: 0; padding: 14px;
}
.callout h4 {
  margin: 0 0 6px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem; font-weight: 500; color: var(--gold-light);
}
.callout .small { font-size: 12px; color: var(--muted); }
.cta { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── PORTEFEUILLE: RESULTS TABLE EXTRAS ────────────── */
#resultsCard h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#resultsCard tfoot td {
  padding: 12px 10px; font-weight: 700; font-size: 13px;
  background: var(--table-head); border-top: 2px solid var(--border);
  border-bottom: none; white-space: nowrap; vertical-align: middle;
}
#resultsCard tfoot td:first-child { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
#resultsCard tfoot .good { font-size: 14px; }
#resultsCard tfoot .bad  { font-size: 14px; }
#kpiVarJour.positive { color: var(--positive); }
#kpiVarJour.negative { color: var(--negative); }
.var-day-positive::before { content: "\2191\00a0"; }
.var-day-negative::before { content: "\2193\00a0"; }
.var-day-zero   { color: var(--muted); font-weight: 500; }
.cell-neutral   { color: var(--muted); font-weight: 500; }

/* ── UTILITY CLASSES ───────────────────────────────── */
.flex-row       { display: flex; gap: 8px; flex-wrap: wrap; }
.flex-between   { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.flex-between--top { align-items: flex-start; }
.flex-col       { display: flex; flex-direction: column; }
.pre-wrap       { white-space: pre-wrap; line-height: 1.6; }
.mt-sm { margin-top: 6px; }
.mt-md { margin-top: 12px; }
.mt-lg { margin-top: 14px; }
.mb-sm { margin-bottom: 6px; }
.mb-md { margin-bottom: 12px; }
.page-heading {
  margin: 0 0 14px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem,3vw,2.2rem); font-weight: 400;
  color: var(--gold-light); letter-spacing: -.01em;
}
.page-heading--sm { font-size: 1.4rem; }
.note    { font-size: 12px; color: var(--muted); }
.small, .mini { font-size: 12px; color: var(--muted); }
.bad     { color: var(--negative); font-weight: 700; }
.good    { color: var(--positive); font-weight: 700; }
.warning { color: var(--warning);  font-weight: 700; }
.hr      { height: 1px; background: var(--border); margin: 12px 0; }
.feed-sentinel { padding: 18px; text-align: center; color: var(--muted); }
.thumb-placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; }
.search-input { min-width: 230px; max-width: 320px; }
.title-xl { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 400; color: var(--gold-light); }
.capture-hint { margin-top: 4px; display: none; color: var(--positive); font-weight: 600; }
.capture-preview { display: none; margin-top: 8px; max-width: 100%; border: 1px solid var(--border); border-radius: 0; }
.text-link { color: var(--text); text-decoration: none; }
.hide      { display: none !important; }
.span-all  { grid-column: 1 / -1; }
.comment-meta { margin-bottom: 6px; }

/* ── SPINNER ───────────────────────────────────────── */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(201,168,76,.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  display: inline-block;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FOOTER ────────────────────────────────────────── */
.site-footer {
  margin-top: 40px; padding: 24px 40px;
  border-top: 1px solid var(--border);
  text-align: center; font-size: 12px;
  color: var(--muted); background: #050810;
  letter-spacing: .04em;
}
.site-footer a { color: var(--gold); }
.site-footer a:hover { color: var(--gold-light); }

/* ── GRAPHIQUES: LAYOUT ────────────────────────────── */
.chart-layout {
  display: flex; gap: 0; align-items: flex-start;
}
.ticker-sidebar {
  width: 190px; flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: none;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  position: sticky; top: 60px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-border) transparent;
}
.ticker-sidebar::-webkit-scrollbar { width: 4px; }
.ticker-sidebar::-webkit-scrollbar-thumb { background: var(--gold-border); }
.sidebar-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; font-size: .62rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--table-head); z-index: 1;
}
.sidebar-head-pct {
  font-size: .58rem; color: var(--muted);
  font-weight: 400; letter-spacing: 0; text-transform: none;
}
#varPeriodSelect {
  background: transparent; border: none; outline: none;
  color: var(--muted); font-size: .58rem; font-weight: 400;
  font-family: inherit; cursor: pointer; padding: 0;
  -webkit-appearance: auto;
}
.sidebar-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 12px; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: background var(--transition);
  gap: 6px;
}
.sidebar-item:hover { background: var(--surface-2); }
.sidebar-item.active {
  background: var(--gold-pale);
  border-left: 2px solid var(--gold);
}
.sidebar-ticker-group { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sidebar-ticker {
  font-family: 'DM Mono', monospace; font-weight: 600; font-size: 11px;
  color: var(--text); white-space: nowrap;
}
.sidebar-name {
  font-size: 9px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 118px;
}
.sidebar-pct {
  font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 700;
  white-space: nowrap; text-align: right;
}
.sidebar-pct.good { color: var(--positive); }
.sidebar-pct.bad  { color: var(--negative); }
.sidebar-pct.neutral { color: var(--muted); }
.chart-main { flex: 1; min-width: 0; }

/* ── GRAPHIQUES: DRAWING TOOLS ─────────────────────── */
.draw-wrap { position: relative; overflow: visible; }
.draw-toolbar {
  position: absolute; right: -38px; top: 0;
  display: flex; flex-direction: column; gap: 3px; z-index: 20;
}
.draw-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  background: var(--surface); color: var(--muted);
  cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); padding: 0;
  line-height: 1;
}
.draw-btn:hover {
  background: var(--gold-pale); color: var(--gold-light);
  border-color: var(--gold-border);
}
.draw-btn.active {
  background: var(--gold-pale); color: var(--gold-light);
  border-color: var(--gold); border-left-width: 2px;
}
#drawCanvas { position: absolute; top: 0; left: 0; pointer-events: none; }

/* ── CHART CONTEXT MENU ─────────────────────── */
.ctx-item {
  padding: 8px 16px; cursor: pointer; color: var(--text);
  transition: background 0.15s;
}
.ctx-item:hover, .ctx-item:focus {
  background: var(--gold-pale); color: var(--gold-light); outline: none;
}
.ctx-separator {
  height: 1px; background: var(--border); margin: 4px 0;
}

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpis   { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .grid-2    { grid-template-columns: 1fr; }
  .idea-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-wrap  { height: 300px; }
  .chart-layout { flex-direction: column; }
  .site-promo-banner-wrap { padding: 12px 16px 0; }
  .site-promo-banner { padding: 12px 14px; }
  .ticker-sidebar {
    width: 100%; max-height: 100px; position: static;
    display: flex; flex-direction: row;
    overflow-x: auto; overflow-y: hidden;
    border-right: 1px solid var(--border); border-bottom: none;
    scrollbar-width: none;
  }
  .ticker-sidebar::-webkit-scrollbar { display: none; }
  .sidebar-head { display: none; }
  .sidebar-item {
    flex-direction: column; align-items: center;
    min-width: 68px; padding: 8px 10px; gap: 3px;
    border-bottom: none; border-right: 1px solid rgba(255,255,255,.03);
  }
  .sidebar-item.active { border-left: none; border-bottom: 2px solid var(--gold); }
  .draw-toolbar { right: -34px; }
  .draw-btn { width: 28px; height: 28px; font-size: 13px; }
}

@media (max-width: 767px) {
  #resultsCard .col-buy-price,
  #resultsCard .col-current-value,
  #resultsCard .col-day-var,
  #resultsCard .col-source { display: none; }
}

@media (max-width: 700px) {
  .grid-3 { grid-template-columns: 1fr; }
  #top10LastYear   td:nth-child(3), #top10LastYear   th:nth-child(3),
  #top10LastYear   td:nth-child(4), #top10LastYear   th:nth-child(4),
  #flop10LastYear  td:nth-child(3), #flop10LastYear  th:nth-child(3),
  #flop10LastYear  td:nth-child(4), #flop10LastYear  th:nth-child(4) { display: none; }
}

@media (max-width: 600px) {
  .topbar { padding: 10px 16px; }
  .topbar-inner { align-items: flex-start; }
  .brand { height: 36px; max-width: min(180px, 56vw); }
  .navlinks { width: 100%; }
  .nav-auth { width: 100%; justify-content: flex-start; }
  .nav-user { width: 100%; justify-content: flex-start; }
  .nav-user-menu { left: 0; right: auto; min-width: min(280px, calc(100vw - 40px)); }
  .site-promo-banner { align-items: stretch; }
  .site-promo-banner .btn { width: 100%; justify-content: center; }
  .comment-card--reply { margin-left: 10px; }
  .ideas-grid { grid-template-columns: 1fr; }
  .form-card  { margin: 16px; padding: 20px; }
  .chat-widget {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    min-width: 0;
    resize: none;
  }
  .chat-actions { gap: 4px; }
  .chat-icon { width: 26px; height: 26px; font-size: 11px; }
  .layout-controls {
    top: 6px;
    right: 6px;
    gap: 3px;
    padding: 3px;
  }
  .layout-btn {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }
}

/* .kpis 1-col déplacé dans le bloc 480px ci-dessous */

/* ══════════════════════════════════════════════════════
   ALERTES DE COURS — Modal + composants
══════════════════════════════════════════════════════ */

/* Badge sur le bouton Alertes */
.alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #080d1c;
  font-size: 10px;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  margin-left: 5px;
  line-height: 1;
  vertical-align: middle;
}

/* Overlay */
.alert-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,13,28,0.82);
  backdrop-filter: blur(4px);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* Boîte centrale */
.alert-modal-box {
  background: var(--navy-card, #1c2840);
  border: 1px solid var(--gold-border);
  border-radius: 10px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

/* En-tête modal */
.alert-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--gold-border);
}
.alert-modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--gold);
  margin: 0;
}
.alert-modal-close {
  background: none;
  border: none;
  color: var(--muted, #7a8499);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color .15s;
}
.alert-modal-close:hover { color: #fff; }

/* Corps modal */
#alertModalBody {
  padding: 16px 20px 20px;
}

/* En-tête de la liste */
.alert-list-header {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted, #7a8499);
  margin-bottom: 8px;
}

/* Liste des alertes */
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 24px;
  margin-bottom: 4px;
}
.alert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
}
.alert-item-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.alert-item-label {
  flex: 1;
  color: #e2e8f0;
  line-height: 1.4;
}
.alert-item-note {
  display: block;
  font-size: 11px;
  color: var(--muted, #7a8499);
  margin-top: 1px;
}
.alert-item-email {
  margin-left: 4px;
  font-size: 12px;
}
.alert-item-del {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--muted, #7a8499);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 3px;
  line-height: 1;
  transition: color .15s;
}
.alert-item-del:hover { color: #f87171; }

/* Formulaire */
.alert-form { margin-top: 16px; }
.alert-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.alert-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.alert-form-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted, #7a8499);
}
.alert-form-error {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: 5px;
  color: #f87171;
  font-size: 13px;
}

/* Bloc premium upgrade */
.alert-upgrade {
  text-align: center;
  padding: 20px 10px 8px;
}
.alert-upgrade-icon {
  font-size: 36px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 10px rgba(201,168,76,0.5));
}
.alert-upgrade h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--gold);
  margin: 0 0 10px;
}
.alert-upgrade p {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.55;
}
.alert-upgrade-features {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 16px 0 0;
  text-align: left;
  background: rgba(201,168,76,0.06);
  border: 1px solid var(--gold-border);
  border-radius: 7px;
  padding: 12px 14px;
  font-size: 13px;
  color: #94a3b8;
}

@media (max-width: 500px) {
  .alert-form-row { grid-template-columns: 1fr; }
  .alert-modal-box { max-height: 95vh; }
}

/* ══════════════════════════════════════════════════════
   AI BATTLE
══════════════════════════════════════════════════════ */

.battle-page {
  padding: 0;
}

.battle-hero {
  background: linear-gradient(135deg, #080d1c 0%, #0f1628 50%, #080d1c 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 40px 40px;
  position: relative;
  overflow: hidden;
}

.battle-hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.battle-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.battle-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 900px;
  font-family: 'Cormorant Garamond', serif;
  margin: 0 0 8px;
  text-align: center;
}

.battle-title-kicker {
  font-size: 3.05rem;
  font-weight: 700;
  color: rgba(201,168,76,0.88);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.battle-title-main {
  font-size: 2.35rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: .02em;
  line-height: 1.04;
}

.battle-title--gate .battle-title-kicker {
  letter-spacing: .1em;
}

.battle-title--gate .battle-title-main {
  font-size: 2.05rem;
}

.battle-subtitle {
  color: var(--muted);
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 32px;
  text-align: center;
}
.battle-subtitle span {
  color: var(--positive);
  font-weight: 600;
}

.leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
}

.ai-card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  padding: 24px;
  position: relative;
  transition: border-color .2s, transform .2s;
  animation: fadeUp .4s ease both;
}
.ai-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.ai-card:nth-child(2) { animation-delay: .08s; }
.ai-card:nth-child(3) { animation-delay: .16s; }

.ai-card.rank-1 {
  border-color: rgba(201,168,76,0.45);
  background: linear-gradient(135deg, #1c2840 0%, #1a2438 100%);
}
.ai-card.rank-1::before,
.ai-card.rank-2::before,
.ai-card.rank-3::before {
  position: absolute;
  top: -12px;
  left: 16px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 10px;
}
.ai-card.rank-1::before {
  content: '🥇 1er';
  background: var(--gold);
  color: #080d1c;
}
.ai-card.rank-2::before {
  content: '🥈 2ème';
  background: #9ca3af;
  color: #080d1c;
}
.ai-card.rank-3::before {
  content: '🥉 3ème';
  background: #cd7f32;
  color: #fff;
}

.ai-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.ai-logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
}
.ai-logo img,
.ai-logo svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.ai-logo.claude   { background: rgba(217,119,87,0.14); border: 1px solid rgba(217,119,87,0.34); }
.ai-logo.openai   { background: rgba(16,163,127,0.15); border: 1px solid rgba(16,163,127,0.3); }
.ai-logo.deepseek { background: rgba(77,107,254,0.16); border: 1px solid rgba(77,107,254,0.34); }

.ai-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.ai-strategy {
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ai-capital {
  font-family: 'DM Mono', monospace;
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -.02em;
  margin-bottom: 4px;
}

.ai-pnl {
  font-family: 'DM Mono', monospace;
  font-size: .95rem;
  font-weight: 500;
}
.ai-pnl.pos { color: var(--positive); }
.ai-pnl.neg { color: var(--negative); }

.ai-card-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-2);
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--muted);
}
.ai-card-footer span b {
  color: var(--muted-light);
  font-weight: 600;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(45,212,160,0.1);
  border: 1px solid rgba(45,212,160,0.3);
  color: var(--positive);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  margin-bottom: 32px;
}
.live-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--positive);
  animation: pulse-dot 1.5s infinite;
}

.countdown-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 40px;
  background: var(--navy-mid);
  border-bottom: 1px solid var(--border);
}

.countdown-label {
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.countdown-units {
  display: flex;
  gap: 20px;
}

.countdown-unit {
  text-align: center;
}

.countdown-num {
  font-family: 'DM Mono', monospace;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--gold-light);
  display: block;
  line-height: 1;
}

.countdown-unit-label {
  font-size: .62rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.countdown-sep {
  font-family: 'DM Mono', monospace;
  font-size: 1.2rem;
  color: var(--gold);
  align-self: flex-start;
  padding-top: 2px;
}

.countdown-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.countdown-progress-bar {
  height: 3px;
  background: var(--border);
  flex: 1;
}

.countdown-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  width: 0;
  transition: width .3s;
}

.countdown-progress-text {
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.battle-content {
  padding: 32px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.battle-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  margin-bottom: 24px;
}

.section-card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  padding: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: .03em;
}

.section-meta {
  font-size: .7rem;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.chart-container {
  position: relative;
  height: 280px;
}

.battle-legend-row {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-2);
  flex-wrap: wrap;
}

.battle-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .72rem;
  color: var(--muted);
}

.battle-legend-logo {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}
.battle-legend-logo img,
.battle-legend-logo svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.battle-legend-line {
  width: 28px;
  height: 3px;
  display: inline-block;
  border-radius: 999px;
}

.battle-legend-tail {
  margin-left: auto;
  font-size: .68rem;
  color: var(--muted);
}

.ai-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.ai-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  user-select: none;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.ai-tab-logo-wrap {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
}
.ai-tab-logo {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}
.ai-tab:hover { color: var(--gold-light); }
.ai-tab.active { color: var(--gold-light); border-bottom-color: var(--gold); }

.positions-type-tabs {
  display: flex;
  gap: 4px;
}
.positions-type-tab {
  padding: 4px 12px;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: none;
  transition: color .2s, border-color .2s, background .2s;
  user-select: none;
}
.positions-type-tab:hover { color: var(--gold-light); border-color: var(--gold); }
.positions-type-tab.active { color: var(--gold-light); border-color: var(--gold); background: rgba(201,168,76,0.08); }

.battle-auth-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 24px;
  text-align: center;
}
.battle-auth-gate-icon { font-size: 2rem; }
.battle-auth-gate-title { font-size: .95rem; font-weight: 600; color: var(--text); }
.battle-auth-gate-body { font-size: .82rem; color: var(--muted); max-width: 320px; }

.positions-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.positions-table-wrap::-webkit-scrollbar {
  height: 6px;
}
.positions-table-wrap::-webkit-scrollbar-track {
  background: rgba(255,255,255,.03);
}
.positions-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(201,168,76,.28);
  border-radius: 999px;
}

.closed-reasoning {
  vertical-align: top;
}
.closed-reasoning-text {
  font-family: 'DM Sans', sans-serif;
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.closed-pnl--flat {
  color: var(--muted-light);
}

.positions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.positions-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--navy-mid);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.positions-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-2);
  color: var(--text);
  font-family: 'DM Mono', monospace;
}
.positions-table td:first-child {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--gold-light);
}
.positions-table tr:last-child td { border-bottom: none; }
.positions-table tr:hover td { background: rgba(201,168,76,0.03); }
.positions-table--closed {
  table-layout: fixed;
}
.positions-table--closed th:nth-child(1),
.positions-table--closed td:nth-child(1) {
  width: 72px;
}
.positions-table--closed th:nth-child(2),
.positions-table--closed td:nth-child(2) {
  width: 88px;
}
.positions-table--closed th:nth-child(3),
.positions-table--closed td:nth-child(3) {
  width: 120px;
}
.positions-table--closed th:nth-child(4),
.positions-table--closed td:nth-child(4) {
  width: 146px;
}
.positions-table--closed th:nth-child(5),
.positions-table--closed td:nth-child(5) {
  width: 122px;
}
.positions-table--closed th:nth-child(6),
.positions-table--closed td:nth-child(6) {
  width: 104px;
}
.positions-table--closed th:nth-child(7),
.positions-table--closed td:nth-child(7) {
  width: 118px;
}
.pnl-pos { color: var(--positive); }
.pnl-neg { color: var(--negative); }

.trades-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  position: relative;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.trades-feed::-webkit-scrollbar { width: 3px; }
.trades-feed::-webkit-scrollbar-track { background: var(--navy-mid); }
.trades-feed::-webkit-scrollbar-thumb { background: var(--gold); }

.trade-item {
  background: var(--navy-mid);
  border: 1px solid var(--border-2);
  border-left: 3px solid;
  padding: 12px 14px;
  transition: border-color .2s;
}
.trade-item.buy  { border-left-color: var(--positive); }
.trade-item.sell { border-left-color: var(--negative); }
.trade-item:hover { border-color: var(--border); }

.trade-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.trade-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 8px;
}
.trade-ai-badge-logo {
  width: 13px;
  height: 13px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  flex: 0 0 13px;
}
.trade-ai-badge.claude   { background: rgba(217,119,87,0.12); color: #f6b39f; border: 1px solid rgba(217,119,87,0.25); }
.trade-ai-badge.openai   { background: rgba(16,163,127,0.12); color: #10a37f; border: 1px solid rgba(16,163,127,0.25); }
.trade-ai-badge.deepseek { background: rgba(77,107,254,0.12); color: #9db0ff; border: 1px solid rgba(77,107,254,0.25); }

.trade-action {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 8px;
}
.trade-action.buy  { color: var(--positive); background: var(--positive-pale); }
.trade-action.sell { color: var(--negative); background: var(--negative-pale); }

.trade-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}

.trade-ticker {
  font-family: 'DM Mono', monospace;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text);
}

.trade-detail {
  font-family: 'DM Mono', monospace;
  font-size: .75rem;
  color: var(--muted-light);
}

.trade-total {
  font-family: 'DM Mono', monospace;
  font-size: .75rem;
  color: var(--muted);
  margin-left: auto;
}

.trade-reasoning {
  font-size: .73rem;
  color: var(--muted);
  line-height: 1.4;
  font-style: italic;
  border-top: 1px solid var(--border-2);
  padding-top: 6px;
  margin-top: 4px;
}

.trade-time {
  font-size: .62rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.positions-section {
  margin-bottom: 24px;
}

.battle-strategy-grid,
.battle-strategy-lab {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.strategy-card,
.strategy-discovery-card {
  background: var(--navy-mid);
  border: 1px solid var(--border-2);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.strategy-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.strategy-card-title,
.strategy-discovery-title {
  color: var(--gold-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.15;
}

.strategy-card-subtitle {
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.strategy-card-commentary {
  margin: 0;
  color: var(--text);
  font-size: .8rem;
  line-height: 1.55;
}

.strategy-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.strategy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(201,168,76,0.22);
  color: var(--gold);
  background: rgba(201,168,76,0.08);
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.strategy-badge--validated {
  color: var(--positive);
  border-color: rgba(34,197,94,0.28);
  background: rgba(34,197,94,0.08);
}

.strategy-badge--insufficient_data,
.strategy-badge--underperforms {
  color: #f59e0b;
  border-color: rgba(245,158,11,0.28);
  background: rgba(245,158,11,0.08);
}

.strategy-rule-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-2);
}

.strategy-rule-block strong {
  color: var(--text);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.strategy-rule-list {
  list-style: disc;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.strategy-rule-empty {
  color: var(--muted);
  font-size: .76rem;
}

.strategy-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(201,168,76,0.12);
  color: var(--gold, #c9a84c);
  font-size: .72rem;
  font-weight: 500;
  margin: 2px 2px 2px 0;
  white-space: nowrap;
}

.battle-position-summary {
  margin-top: 12px;
  display: flex;
  gap: 24px;
  padding: 12px 16px;
  background: var(--navy-mid);
  font-size: .78rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.battle-position-summary span {
  color: var(--muted);
}
.battle-position-summary b {
  color: var(--text);
  font-family: 'DM Mono', monospace;
}

.refresh-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.refresh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--positive);
  animation: pulse-dot 2s infinite;
}

.battle-empty {
  color: var(--muted);
  font-size: .85rem;
  padding: 14px 0;
}

/* ── Battle — Contexte marché du jour ───────────────────────────────────── */
.battle-market-ctx { margin-bottom: 1.5rem; }
.battle-mkt-session {
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: .6rem;
}
.battle-mkt-grid {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}
.battle-mkt-item {
  flex: 1 1 140px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(201,168,76,.1);
  border-radius: 10px;
  padding: .75rem 1rem;
}
.battle-mkt-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: .3rem;
}
.battle-mkt-value {
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text, #e2e8f4);
  line-height: 1.3;
}
.battle-mkt-var {
  font-size: .78rem;
  font-family: 'DM Mono', monospace;
  margin-top: .2rem;
}
.battle-mkt-ytd {
  font-size: .67rem;
  color: var(--muted);
  margin-top: .18rem;
}
.mkt-up   { color: #4ade80; }
.mkt-down { color: #f87171; }
.mkt-flat { color: var(--muted); }
.battle-mkt-link {
  font-size: .78rem;
  color: var(--color-gold, #c9a84c);
  text-decoration: none;
  white-space: nowrap;
}
.battle-mkt-link:hover { text-decoration: underline; }

.battle-footnote {
  text-align: center;
  padding: 24px 0 8px;
  font-size: .7rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.battle-human-gate {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.battle-human-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.battle-human-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.battle-human-submit {
  min-width: 240px;
}

.battle-human-error {
  padding: 12px 14px;
  border: 1px solid rgba(248,113,113,0.28);
  background: rgba(248,113,113,0.12);
  color: #fecaca;
  font-size: .86rem;
}

.battle-bell-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--navy-mid);
  color: var(--muted);
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  user-select: none;
  z-index: 2;
}
.battle-bell-btn:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  transform: scale(1.08);
}
.battle-bell-btn.subscribed {
  background: rgba(201,168,76,0.15);
  border-color: var(--gold);
  color: var(--gold);
}
.battle-bell-btn.subscribed::after {
  content: '';
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--positive);
  border: 1.5px solid var(--navy-card);
}

.battle-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,13,28,0.82);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.battle-modal-overlay.open { display: flex; }

.battle-modal {
  background: var(--navy-card);
  border: 1px solid rgba(201,168,76,0.3);
  padding: 36px 32px;
  max-width: 400px;
  width: 90%;
  position: relative;
  animation: fadeUp .25s ease both;
}

.battle-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color .2s;
}
.battle-modal-close:hover { color: var(--text); }

.battle-modal-icon {
  font-size: 2.4rem;
  text-align: center;
  margin-bottom: 16px;
}

.battle-modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 10px;
}

.battle-modal-body {
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 24px;
}

.battle-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.battle-modal-btn-primary {
  background: var(--gold);
  color: #080d1c;
  border: none;
  padding: 11px 20px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .2s;
  width: 100%;
}
.battle-modal-btn-primary:hover { opacity: .88; }

.battle-modal-btn-secondary {
  background: none;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 9px 20px;
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  width: 100%;
}
.battle-modal-btn-secondary:hover { border-color: var(--muted); color: var(--text); }

.battle-setup-page {
  padding: 32px 20px 48px;
  max-width: 1120px;
  margin: 0 auto;
}

.battle-setup-card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
}

.battle-setup-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--gold-light);
  margin: 0 0 4px;
}

.battle-setup-subtitle {
  color: var(--muted);
  margin: 0 0 20px;
}

.battle-setup-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 24px;
}

.battle-setup-form,
.battle-setup-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.battle-setup-form label span {
  display: block;
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.battle-setup-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: .9rem;
}

.battle-setup-flash {
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: .9rem;
}
.battle-setup-flash--success {
  background: rgba(45,212,160,0.1);
  color: #d1fae5;
  border: 1px solid rgba(45,212,160,0.25);
}
.battle-setup-flash--error {
  background: rgba(248,113,113,0.1);
  color: #fecaca;
  border: 1px solid rgba(248,113,113,0.25);
}

.battle-setup-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--navy-mid);
  border: 1px solid var(--border-2);
}
.battle-setup-stat span {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.battle-setup-stat strong {
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: .84rem;
}

.battle-setup-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

.battle-setup-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.battle-setup-actions form {
  margin: 0;
}

@media (max-width: 1024px) {
  .leaderboard-grid { grid-template-columns: 1fr 1fr; }
  .battle-grid { grid-template-columns: 1fr; }
  .battle-strategy-grid,
  .battle-strategy-lab { grid-template-columns: 1fr; }
  .battle-setup-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .battle-hero { padding: 32px 20px 28px; }
  .battle-content { padding: 20px 16px; }
  .leaderboard-grid { grid-template-columns: 1fr; }
  .countdown-bar { padding: 14px 20px; flex-wrap: wrap; gap: 16px; }
  .battle-legend-tail { margin-left: 0; width: 100%; }
  .battle-title-kicker { font-size: .82rem; letter-spacing: .12em; }
  .battle-title-main { font-size: 1.9rem; }
  .battle-title--gate .battle-title-main { font-size: 1.72rem; }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE MOBILE — Additions
   Breakpoints ajoutés : 768px · 480px · 375px
══════════════════════════════════════════════════════ */

/* ── Hamburger (CSS-only, visible sur mobile) ─────── */
.nav-toggle-input { display: none; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

/* ── 768px : tablettes & grands téléphones ─────────── */
@media (max-width: 768px) {
  /* Grilles : couvre le gap 900px→480px */
  .kpis   { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }

  /* Navigation : hamburger actif */
  .nav-hamburger { display: flex; }
  .navlinks {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 4px;
  }
  .nav-toggle-input:checked ~ .navlinks { display: flex; }
  .navlinks a {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid var(--border-2);
    font-size: .8rem;
  }
  .nav-dropdown {
    width: 100%;
  }
  .nav-dropdown-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid var(--border-2);
  }
  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    padding: 0 0 6px;
    border: none;
    box-shadow: none;
    background: transparent;
  }
  .nav-dropdown-menu a {
    width: 100%;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-2);
    font-size: .76rem;
  }
  /* Hamburger → X */
  .nav-toggle-input:checked ~ .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-input:checked ~ .nav-hamburger span:nth-child(2) { opacity: 0; }
  .nav-toggle-input:checked ~ .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .topbar-inner { flex-wrap: nowrap; align-items: center; }
  .brand { flex: 1; }

  /* Filtres secteurs/screener → empilés verticalement */
  .filters-inline {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    white-space: normal !important;
  }
  .filters-inline .input,
  .filters-inline select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .filters-inline .label { width: 100%; }
}

/* ── 480px : téléphones standards ──────────────────── */
@media (max-width: 480px) {
  /* Grilles */
  .kpis        { grid-template-columns: 1fr; }
  .idea-levels { grid-template-columns: 1fr 1fr; }
  .content     { padding: 12px; }
  .site-footer { padding: 16px; font-size: 11px; }

  /* Polices tableaux */
  thead th { font-size: .72rem; letter-spacing: .10em; padding: 9px 8px; }
  tbody td { font-size: 12px; padding: 9px 8px; }
  table    { font-size: 12px; }
  .kpi .n  { font-size: 14px; }
  .kpi .l  { font-size: 10px; }

  /* Boutons */
  .controls .btn { font-size: .68rem; padding: 8px 10px; }
  .chat-quick-prompts { max-height: 116px; }
  .chat-prompt-btn { font-size: 10px; padding: 6px 7px; }

  /* Chat FAB */
  .chat-fab    { right: 12px; bottom: 12px; width: 46px; height: 46px; font-size: 18px; }
  .chat-widget { bottom: 0; right: 0; }

  /* Graphiques sidebar */
  .sidebar-item { min-width: 54px; padding: 6px 8px; }
  .sidebar-name { display: none; }
  .sidebar-pct  { font-size: 10px; }

  /* Heatmap */
  .heatmap-cell       { min-width: 58px; padding: 4px; }
  .heatmap-cell-value { font-size: 10px; }
  .heatmap-cell-label { font-size: 9px; }

  /* Scatter plot */
  .scatter-wrap     { overflow-x: hidden; }
  .scatter-wrap svg { min-width: 0 !important; width: 100% !important; }

  /* Portefeuille : masquer colonne Qté */
  #resultsCard th:nth-child(3),
  #resultsCard td:nth-child(3) { display: none; }

  /* Screener toolbar */
  .sector-select,
  .screener-search  { width: 100%; min-width: 0; }
  .toolbar-left     { width: 100%; }
  .screener-toolbar { flex-direction: column; align-items: flex-start; }
}

/* ── 375px : iPhone SE (tabs seulement) ────────────── */
@media (max-width: 375px) {
  .tabbtn { font-size: .65rem; padding: 7px 8px; }

  /* Abréger les libellés longs des onglets */
  .tabbtn[data-tab="tab-recommendations"] { font-size: 0; line-height: 0; }
  .tabbtn[data-tab="tab-recommendations"]::after { content: "Reco."; font-size: .65rem; line-height: 1; }

  .tabbtn[data-tab="tab-overview"] { font-size: 0; line-height: 0; }
  .tabbtn[data-tab="tab-overview"]::after { content: "Cours"; font-size: .65rem; line-height: 1; }

  .tabbtn[data-tab="tab-ta"] { font-size: 0; line-height: 0; }
  .tabbtn[data-tab="tab-ta"]::after { content: "Tech."; font-size: .65rem; line-height: 1; }

  .tabbtn[data-tab="tab-finances"] { font-size: 0; line-height: 0; }
  .tabbtn[data-tab="tab-finances"]::after { content: "Finances"; font-size: .65rem; line-height: 1; }
}

/* ── ONBOARDING TOUR ─────────────────────────────────── */
#brvm-tour-launcher {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(232, 190, 94, 0.5);
  background: linear-gradient(180deg, rgba(232, 190, 94, 0.98), rgba(189, 145, 39, 0.96));
  color: #081326;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 9800;
}

#brvm-tour-launcher:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.brvm-tour-active .chat-fab,
.brvm-tour-active .chat-widget {
  opacity: 0;
  pointer-events: none;
}

.brvm-onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
}

.brvm-onboarding-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 20, 0.78);
  backdrop-filter: blur(2px);
}

.brvm-onboarding-highlight {
  position: fixed;
  z-index: 10002;
  border: 1px solid rgba(232, 190, 94, 0.9);
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(5, 9, 20, 0.78), 0 0 0 3px rgba(232, 190, 94, 0.16);
  pointer-events: none;
  transition: left .22s ease, top .22s ease, width .22s ease, height .22s ease;
}

.brvm-onboarding-highlight.is-hidden {
  display: none;
}

.brvm-onboarding-card {
  position: fixed;
  z-index: 10003;
  width: min(360px, calc(100vw - 32px));
  border-radius: 20px;
  border: 1px solid var(--gold-border, rgba(232, 190, 94, 0.32));
  background: linear-gradient(180deg, rgba(10, 19, 42, 0.98), rgba(7, 15, 32, 0.98));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
  color: var(--text, #eef2ff);
  padding: 18px;
}

.brvm-onboarding-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.brvm-onboarding-eyebrow {
  color: var(--gold-light, #f5d27c);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.brvm-onboarding-close {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-light, #d5e0f2);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.brvm-onboarding-close:hover {
  border-color: rgba(232, 190, 94, 0.42);
  color: var(--gold-light, #f5d27c);
}

.brvm-onboarding-title {
  margin: 0 0 8px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--gold-light, #f5d27c);
}

.brvm-onboarding-body {
  margin: 0;
  color: var(--muted-light, #d5e0f2);
  line-height: 1.6;
  font-size: .95rem;
}

.brvm-onboarding-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brvm-onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.brvm-onboarding-dot.is-active {
  background: var(--gold, #e8be5e);
}

.brvm-onboarding-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.brvm-onboarding-actions--single {
  justify-content: flex-end;
}

.brvm-onboarding-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brvm-onboarding-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #eef2ff);
  padding: 10px 14px;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
}

.brvm-onboarding-btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.brvm-onboarding-btn--primary {
  border-color: rgba(232, 190, 94, 0.8);
  background: linear-gradient(180deg, rgba(232, 190, 94, 0.94), rgba(189, 145, 39, 0.94));
  color: #081326;
}

.brvm-onboarding-selector {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.brvm-onboarding-choice {
  width: 100%;
  text-align: left;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text, #eef2ff);
  padding: 14px 16px;
  cursor: pointer;
}

.brvm-onboarding-choice strong {
  display: block;
  color: var(--gold-light, #f5d27c);
  font-size: 1rem;
  margin-bottom: 4px;
}

.brvm-onboarding-choice span {
  display: block;
  color: var(--muted-light, #d5e0f2);
  font-size: .88rem;
  line-height: 1.55;
}

.brvm-onboarding-choice:hover {
  border-color: rgba(232, 190, 94, 0.42);
  background: rgba(232, 190, 94, 0.06);
}

.brvm-onboarding-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10004;
  max-width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(45, 212, 160, 0.26);
  background: rgba(9, 22, 19, 0.96);
  color: #d9fff2;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  transform: translateY(10px);
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
}

.brvm-onboarding-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.screener-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.strategy-alert-btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

.card-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.6;
}

.shortlist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.shortlist-row:last-child {
  border-bottom: none;
}
.shortlist-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.shortlist-ticker {
  color: var(--gold-light);
  font-family: 'DM Mono', monospace;
  font-size: .9rem;
}
.shortlist-company {
  color: var(--muted-light);
  font-size: .78rem;
}
.shortlist-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.empty-hint {
  color: var(--muted);
  font-size: .82rem;
  padding: 8px 0;
}

.portfolio-framing-note {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-border);
  background: var(--surface);
}
.portfolio-framing-note p {
  margin: 0;
  color: var(--muted-light);
  font-size: .82rem;
  line-height: 1.7;
}
.portfolio-framing-note strong {
  color: var(--gold-light);
}

.portfolio-risk-row td {
  background: var(--surface);
  border-top: none;
}
.portfolio-risk-intro {
  margin: 0 0 10px;
  color: var(--gold-light);
  font-size: .75rem;
  letter-spacing: .04em;
}
.portfolio-risk-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  padding: 10px 0 14px;
}
.portfolio-risk-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.portfolio-risk-field--note {
  grid-column: 1 / -1;
}
.portfolio-risk-field label {
  color: var(--muted);
  font-size: .72rem;
}
.portfolio-risk-field input,
.portfolio-risk-field textarea {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg);
  color: var(--fg);
  font-size: .8rem;
}
.portfolio-risk-field textarea {
  resize: vertical;
  min-height: 72px;
}

@media (max-width: 700px) {
  .shortlist-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .shortlist-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .brvm-onboarding-backdrop {
    backdrop-filter: none;
  }

  .brvm-onboarding-card {
    width: auto;
    max-width: none;
    left: 16px;
    right: 16px;
    bottom: 16px;
    top: auto;
    border-radius: 18px;
  }

  .brvm-onboarding-title {
    font-size: 1.45rem;
  }

  .brvm-onboarding-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .brvm-onboarding-actions-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* ── Indices BRVM ─────────────────────────── */
#indicesCards,
#indicesLoading {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  width: 100%;
}
#indicesCards .kpi { min-width: 0; }
#indicesCards svg polyline { vector-effect: non-scaling-stroke; }
#indicesCards .indices-commentary {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted-light);
  font-size: 12px;
  line-height: 1.6;
}
