:root {
  --bg: #0b1220;
  --bg-elevated: #111827;
  --card: #151d2e;
  --card-border: #243044;
  --sidebar: linear-gradient(180deg, #0f1b33 0%, #0a1324 100%);
  --text: #e8eef9;
  --muted: #93a0b8;
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --red: #ef4444;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --radius: 12px;
  --sidebar-w: 240px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.app-shell { display: flex; width: 100%; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar);
  border-right: 1px solid var(--card-border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-shrink: 0;
  align-self: stretch;
  height: auto;
  max-height: none;
  overflow: visible;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;  
}
.sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 4px;
}
.sidebar-avatar {
  width: 44px; height: 44px; border-radius: 999px; object-fit: cover;
  border: 2px solid rgba(255,255,255,0.15); background: #1f2937; flex-shrink: 0;
}
.sidebar-avatar.placeholder {
  display: grid; place-items: center; font-weight: 700; color: #dbe4f5; font-size: 16px;
}
.sidebar-user-text { min-width: 0; }
.sidebar-name {
  font-weight: 700; font-size: 14px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-nick {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand {
  display: flex; align-items: flex-start; justify-content: flex-start;
  margin: 2px 0 16px; padding: 2px 4px;
}
.brand-logo-link { display: inline-flex; line-height: 0; text-decoration: none; }
.brand-logo {
  display: block; width: 190px; height: auto; max-width: 100%;
  object-fit: contain;
}
.brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.brand-wordmark {
  font-size: 15px; font-weight: 800; letter-spacing: 0.02em; color: #e8eef9;
  padding-left: 4px;
}
.brand-mark { display: none; }
.nav-section { display: flex; flex-direction: column; gap: 4px; }
.nav-label {
  color: var(--muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 10px 10px 6px;
}
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 10px 14px; border-radius: 8px; color: #dbe4f5;
  border: 1px solid transparent;
}
.nav-link:hover { background: rgba(255,255,255,0.05); }
.nav-link.active {
  background: transparent; color: #fff; font-weight: 600;
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: #13c744; /* eToro green accent */
}
.nav-foot { margin-top: auto; padding: 8px; }
.pill-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--card-border); border-radius: 999px;
  padding: 8px 12px; color: var(--muted); font-size: 13px;
}

.main { flex: 1; min-width: 0; padding: 22px 28px 40px; max-width: 1800px; margin-left: 240px; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.topbar h1 { margin: 0; font-size: 22px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 10px 14px; border: 1px solid var(--card-border);
  background: var(--card); color: var(--text); cursor: pointer;
}
.btn:hover { border-color: #3b4d6b; }
.btn-primary {
  background: var(--green); color: #04140a; border-color: transparent; font-weight: 700;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-blue { background: var(--blue); border-color: transparent; color: white; font-weight: 600; }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.card + .card { margin-top: 14px; }
.card.profile { margin-bottom: 18px; }

.profile {
  display: flex; justify-content: space-between; gap: 18px; align-items: center; flex-wrap: wrap;
  margin-bottom: 18px;
}
.kpi-row { margin-top: 4px; }
.profile-left { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 64px; height: 64px; border-radius: 999px; object-fit: cover;
  border: 3px solid var(--pi-border, var(--card-border)); background: #1f2937;
  box-sizing: border-box;
}
.avatar.placeholder {
  display: grid; place-items: center; font-weight: 700; color: var(--muted);
}
.profile h2 { margin: 0 0 4px; font-size: 26px; }
.profile .sub { color: var(--muted); font-size: 14px; }
.disclaimer { color: var(--muted); font-size: 11px; max-width: 280px; text-align: right; }

.pill-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; margin: 14px 0;
}
.pill-tab {
  white-space: nowrap; border: 1px solid var(--card-border); background: transparent;
  color: var(--muted); border-radius: 999px; padding: 8px 14px; font-size: 13px;
}
.pill-tab.active {
  background: var(--green); color: #04140a; border-color: transparent; font-weight: 700;
}

.kpi-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px;
}
.kpi {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 14px 16px; min-height: 96px;
}
.kpi .label {
  color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
}
.kpi .value { font-size: 28px; font-weight: 750; margin-top: 8px; line-height: 1.1; }
.kpi .hint { color: var(--muted); font-size: 12px; margin-top: 6px; }

.positive { color: var(--green); }
.negative { color: var(--red); }
.amber { color: var(--amber); }
.muted { color: var(--muted); }

.grid-2 {
  display: grid; grid-template-columns: 1.7fr 0.9fr; gap: 14px;
}
.chart-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.ranges { display: flex; gap: 6px; flex-wrap: wrap; }
.range-btn {
  border: none; background: transparent; color: var(--muted); padding: 6px 8px;
  border-bottom: 2px solid transparent; cursor: pointer; font-size: 13px;
}
.range-btn.active { color: var(--text); border-bottom-color: var(--green); font-weight: 650; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }

.chart-box { position: relative; height: 360px; }
.chart-box.tall { height: 440px; }

.summary-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; margin-top: 8px;
}
.summary-item .v { font-size: 22px; font-weight: 700; }
.summary-item .l { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Period summary mini cards under KPI row — equal fixed height (THIS MONTH must stay 1 line) */
.summary-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
  width: 100%;
  align-items: stretch;
}
.summary-row > .card { margin-top: 0; }
.summary-mini {
  text-align: center;
  padding: 12px 10px;
  height: 72px;
  width: 100%;
  box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center;
  margin-top: 0 !important;
}
.summary-mini .v { font-size: 18px; font-weight: 700; line-height: 1.15; }
.summary-mini .l {
  color: var(--muted); font-size: 10px; margin-top: 4px; letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.summary-note { color: var(--muted); font-size: 11px; margin: 8px 2px 0; }
/* Overview: collapsible blocks (Since your last visit, Key figures, Returns by period). */
.ov-fold { margin: 0 0 14px; }
.ov-fold-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; width: 100%;
  box-sizing: border-box; margin: 0 0 12px; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.ov-fold.is-collapsed .ov-fold-head { margin-bottom: 0; }
.ov-fold.is-static .ov-fold-head { cursor: default; }
.ov-fold-title { font-size: 15px; font-weight: 700; color: var(--text); }
.ov-fold-sub { color: var(--muted); font-size: 12px; }
.ov-fold.is-collapsed .ov-fold-sub { display: none; }
.ov-fold-summary { display: none; color: var(--muted); font-size: 13px; min-width: 0; }
.ov-fold-summary strong { color: var(--text); }
.ov-fold-summary strong.positive { color: var(--green); }
.ov-fold-summary strong.negative { color: var(--red); }
.ov-fold-summary strong.amber { color: var(--amber); }
.ov-fold.is-collapsed .ov-fold-summary { display: inline; }
.ov-fold-toggle { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ov-fold-toggle::after { content: " \25B4"; }
.ov-fold.is-collapsed .ov-fold-toggle::after { content: " \25BE"; }
.ov-fold-head:hover .ov-fold-toggle { color: var(--text); }
.ov-fold-body > .kpi-row,
.ov-fold-body > .summary-row { margin-bottom: 0; }
.slv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.slv-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
}
.slv-tile span { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.slv-tile strong { font-size: 20px; font-weight: 750; }
.slv-tile small { color: var(--muted); font-size: 12px; }
.slv-lists { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.slv-list {
  padding: 12px 14px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
}
.slv-list h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.slv-list ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.slv-list li { display: flex; align-items: center; gap: 9px; min-width: 0; }
.slv-list li img { width: 22px; height: 22px; object-fit: contain; border-radius: 6px; background: rgba(255,255,255,.06); flex-shrink: 0; }
.slv-name { font-weight: 700; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slv-val { margin-left: auto; font-weight: 700; font-size: 14px; white-space: nowrap; }
.slv-empty { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.slv-empty strong { color: var(--text); }
.slv-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
@media (max-width: 1100px) {
  .slv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slv-lists { grid-template-columns: 1fr; }
}
.chart-card-full { width: 100%; margin-top: 0; }
.chart-card-full + .ripartizione,
.chart-card-full + .diversification { margin-top: 18px; }

.section-title { margin: 0 0 12px; font-size: 16px; }
.banner {
  border: 1px solid var(--card-border); background: #182338; color: var(--muted);
  padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 14px;
}
.banner.warn { border-color: #7c4a12; background: #2a1c0b; color: #fbbf24; }
.stub {
  min-height: 280px; display: grid; place-items: center; text-align: center; color: var(--muted);
}
.form-grid { display: grid; gap: 12px; max-width: 480px; }
.form-grid label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.form-grid input {
  background: #0f172a; border: 1px solid var(--card-border); border-radius: 10px;
  padding: 10px 12px; color: var(--text);
}

@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .summary-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
    width: 100%;
    max-width: none;
    padding: 16px;
  }

  .kpi-row {
    grid-template-columns: 1fr;
  }

  .summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Open / Share actions */
.share-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; position: relative; }
.btn .ico { width: 16px; height: 16px; flex-shrink: 0; }
.btn-etoro, .btn-share { display: inline-flex; align-items: center; gap: 8px; }
.btn-etoro { background: var(--green); color: #04140a; border-color: transparent; font-weight: 700; }
.share-wrap { position: relative; }
.share-popover {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 40;
  width: min(360px, 86vw);
  background: #151c29; border: 1px solid var(--card-border); border-radius: 14px;
  padding: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.share-pop-title { font-weight: 700; font-size: 15px; }
.share-pop-sub { color: var(--muted); font-size: 12px; margin: 4px 0 12px; }
.share-url-row {
  display: flex; align-items: center; gap: 8px;
  background: #0d1420; border: 1px solid var(--card-border); border-radius: 10px; padding: 8px 10px;
}
.share-url {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #e8eef9;
  font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.share-copy {
  border: 0; background: transparent; color: #c9d4e8; cursor: pointer; padding: 4px; border-radius: 8px;
}
.share-copy:hover, .share-copy.copied { color: var(--green); background: rgba(34,197,94,.08); }
.share-social { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.share-social-btn { justify-content: center; font-size: 13px; }
.profile-actions { align-items: flex-start; }


/* Sidebar nav icons */
.nav-ico { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.9; }
.nav-link { gap: 12px; border-radius: 10px; padding: 11px 12px 11px 14px; }
.nav-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Charts */
.chart-box { height: 360px; position: relative; }
.chart-box.tall { height: 440px; }
.chart-box canvas { width: 100% !important; height: 100% !important; }
.chart-card .chart-head { align-items: center; }
.chart-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.chart-tab {
  border: 1px solid var(--card-border); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 8px 12px; cursor: pointer; font-size: 13px;
}
.chart-tab.active { background: #e8eef9; color: #0b1220; font-weight: 600; border-color: transparent; }
.live-pill { border-color: #14532d; color: #86efac; }
.legend .dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; margin-right: 6px; }


/* Demo-style range underline tabs */
.demo-ranges { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.demo-ranges .range-btn {
  background: transparent; border: 0; color: #93a0b8; padding: 6px 2px 8px;
  cursor: pointer; font-size: 14px; border-radius: 0; border-bottom: 2px solid transparent;
}
.demo-ranges .range-btn:hover { color: #e8eef9; }
.demo-ranges .range-btn.active {
  color: #fff; font-weight: 600; border-bottom-color: #fff; background: transparent;
}
.demo-legend { margin-top: 10px; }
.chart-loading {
  position: absolute; right: 18px; top: 18px; font-size: 12px; color: var(--muted);
}
.chart-card { position: relative; }

/* Cumulative equity curve (above period bars) */
.equity-card { margin-bottom: 14px; }
.chart-card-full + .chart-card-full { margin-top: 14px; }
.equity-box { height: 420px; }
.add-benchmark-stub {
  color: #64748b;
  font-size: 12px;
  cursor: default;
  user-select: none;
  margin-left: 4px;
  opacity: 0.75;
}
.add-benchmark-stub:hover { color: #64748b; }

/* Overview charts, own profile: benchmarks the user chooses (charts.js) */
.demo-legend { position: relative; }
.legend-item .bench-x {
  background: none; border: 0; padding: 0 2px; margin-left: -2px; cursor: pointer;
  color: #64748b; font-size: 12px; line-height: 1;
}
.legend-item .bench-x:hover { color: #fca5a5; }
.legend-item.is-off { opacity: .55; text-decoration: line-through; text-decoration-color: rgba(147,160,184,.6); }
.legend-item.is-off .bench-x { text-decoration: none; color: #93a0b8; }
.legend-item.is-off .bench-x:hover { color: #86efac; }
.legend-item .bench-wait { color: #64748b; font-size: 11px; }
.bench-add, .bench-reset {
  background: none; border: 1px dashed rgba(147,160,184,.45); border-radius: 999px;
  color: #93c5fd; font-size: 12px; padding: 2px 10px; cursor: pointer; margin-left: 4px;
}
.bench-add:hover { border-color: #60a5fa; color: #bfdbfe; }
.bench-reset { border: 0; color: #64748b; padding: 2px 4px; }
.bench-reset:hover { color: #e8eef9; text-decoration: underline; }
.bench-pop {
  position: absolute; z-index: 30; left: 0; top: calc(100% + 6px); width: min(360px, 92vw);
  background: #0e1626; border: 1px solid #2a3a52; border-radius: 12px; padding: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
}
.bench-pop input {
  width: 100%; box-sizing: border-box; background: #0b1220; border: 1px solid #2a3a52; border-radius: 8px;
  color: #e8eef9; padding: 8px 10px; font-size: 13px; outline: none;
}
.bench-pop input:focus { border-color: #3b82f6; }
.bench-pop ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 260px; overflow-y: auto; }
.bench-pop li button {
  width: 100%; display: flex; justify-content: space-between; gap: 10px; text-align: left;
  background: none; border: 0; border-radius: 8px; color: #e8eef9; padding: 7px 8px; cursor: pointer; font-size: 13px;
}
.bench-pop li button:hover { background: #162235; }
.bench-pop li small { color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bench-pop-msg { margin: 8px 2px 0; font-size: 12px; color: #93a0b8; }
.bench-note { margin: 6px 0 0; font-size: 12px; color: #fbbf24; }


/* Allocation (Overview): one card, header with Hide (data-ov-collapse), four donuts side by side. */
.ripartizione { margin-top: 18px; padding: 20px 24px 24px; }
.ripartizione .ov-fold-head {
  margin: 0 0 18px; padding: 0; background: none; border: 0; border-radius: 0; align-items: baseline;
}
.ripartizione.is-collapsed .ov-fold-head { margin-bottom: 0; }
.ripartizione-title { margin: 0; font-size: 22px; font-weight: 700; color: var(--text); }
.ripartizione.is-collapsed .ov-fold-sub { display: none; }
.ripartizione.is-collapsed .ov-fold-summary { display: inline; }
.ripartizione.is-collapsed .ov-fold-toggle::after { content: " \25BE"; }
.ripartizione-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.ripartizione-grid[hidden] { display: none; }
.ripartizione-pie { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ripartizione-pie-title {
  margin: 0; align-self: flex-start; color: var(--muted); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.ripartizione-donut { position: relative; width: 160px; height: 160px; max-width: 100%; }
.ripartizione-donut svg { display: block; width: 100%; height: 100%; }
.ripartizione-donut circle { cursor: default; }
.ripartizione-donut circle:hover { filter: brightness(1.12); }
.ripartizione-donut-mid {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
}
.ripartizione-donut-mid b { font-size: 22px; font-weight: 800; color: var(--text); }
.ripartizione-donut-mid span {
  color: var(--muted); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; max-width: 90px;
}
.ripartizione-empty {
  display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: 14px;
}
.ripartizione-pie-legend { align-self: stretch; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.ripartizione-pie-legend > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ripartizione-pie-legend i { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; }
.ripartizione-pie-legend span {
  flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ripartizione-pie-legend b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.ripartizione-pie-cov {
  align-self: stretch; margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--card-border);
  color: var(--muted); font-size: 11px;
}
.ripartizione-pie-cov:empty { display: none; }
@media (max-width: 1100px) {
  .ripartizione-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
}
@media (max-width: 560px) {
  .ripartizione { padding: 16px; }
  .ripartizione-grid { grid-template-columns: minmax(0, 1fr); }
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Legacy diversification (unused) */
.diversification { margin-top: 22px; }
.diversification-title {
  text-align: center; margin: 0 0 14px; font-size: 20px; font-weight: 700;
}

.demo-chart-head { justify-content: space-between; gap: 16px; }
.demo-chart-head .chart-tabs { margin-left: auto; }


.etoro-brand {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 800; letter-spacing: -0.02em;
  color: #13d46a; font-size: 15px;
}

/* Chart legend swatches (solid vs outlined) */
.legend-item { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.legend .swatch, .swatch {
  width: 14px; height: 10px; border-radius: 3px; display: inline-block;
  box-sizing: border-box; flex-shrink: 0;
}

/* Dividends 3-column section (English copy) */
.dividends-section { margin-top: 18px; }
.dividends-grid {
  display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 14px;
  align-items: stretch;
}
.dividends-grid > .card { margin-top: 0; }
.div-card {
  padding: 18px 18px 16px;
  min-height: 320px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.div-card h3 {
  margin: 0 0 12px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); font-weight: 650;
}
.div-yield-big {
  font-size: 42px; font-weight: 800; color: #f5c542; line-height: 1.05; margin: 4px 0 10px;
}
.div-meta { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0 0 6px; }
.div-meta strong { color: var(--text); }
.div-highest { margin-top: 14px; }
.div-highest-title { font-size: 12px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.div-highest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.div-highest-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 14px;
}
.div-highest-list .sym { color: #f5c542; font-weight: 700; }
.div-footer-note {
  margin-top: auto; padding-top: 14px; font-size: 11px; color: var(--muted); line-height: 1.4;
}
.div-table-wrap { overflow: auto; max-height: 280px; margin: 0 -4px; scrollbar-gutter: stable; padding-right: 6px; }
.div-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.div-table th {
  text-align: left; color: var(--muted); font-weight: 650; font-size: 10px;
  letter-spacing: 0.05em; text-transform: uppercase; padding: 6px 8px; position: sticky; top: 0;
  background: var(--card); border-bottom: 1px solid var(--card-border);
}
.div-table td { padding: 8px; border-bottom: 1px solid rgba(36,48,68,0.7); vertical-align: middle; }
.div-inst { display: flex; align-items: center; gap: 8px; min-width: 0; }
.div-logo {
  width: 22px; height: 22px; border-radius: 999px; object-fit: cover; background: #1f2937;
  flex-shrink: 0;
}
.div-logo.ph {
  display: grid; place-items: center; font-size: 9px; color: var(--muted); font-weight: 700;
}
.div-upcoming {
  list-style: none; margin: 0; padding: 0 16px 0 0; overflow: auto; max-height: 280px;
  display: grid; gap: 10px; scrollbar-gutter: stable;
}
.div-upcoming li {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 4px 8px 0; border-bottom: 1px solid rgba(36,48,68,0.7);
}
.div-upcoming .ticker { font-weight: 700; font-size: 13px; }
.div-upcoming .when { color: var(--muted); font-size: 11px; margin-top: 2px; }
.div-badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  background: rgba(245,197,66,0.12); color: #f5c542; border: 1px solid rgba(245,197,66,0.35);
}
.div-badge.pay { background: rgba(34,197,94,0.12); color: #86efac; border-color: rgba(34,197,94,0.35); }
.div-badge.est {
  background: rgba(147,160,184,0.12); color: #c9d4e8; border-color: rgba(147,160,184,0.4);
}
.div-amt {
  font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px;
  padding-right: 14px; min-width: 4.5ch; text-align: right; justify-self: end;
}
.div-table td:last-child, .div-table th:last-child { padding-right: 16px; }
@media (max-width: 1100px) {
  .dividends-grid { grid-template-columns: 1fr; }
}


/* Worst Historical Drawdowns */
.dd-monthly-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; align-items: stretch;
}
.dd-monthly-grid > .drawdowns-section,
.dd-monthly-grid > .monthly-section { margin-top: 0; min-width: 0; }
.dd-monthly-grid .drawdowns-card,
.dd-monthly-grid .monthly-card { height: 100%; }
@media (max-width: 1100px) {
  .dd-monthly-grid { grid-template-columns: 1fr; }
}
.drawdowns-section { margin-top: 18px; }
.drawdowns-card { padding: 22px 22px 18px; }
.drawdowns-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.drawdowns-title { margin: 0; font-size: 20px; font-weight: 700; }
.drawdowns-badge {
  display: inline-flex; align-items: center;
  border: 1px solid rgba(34,197,94,0.45); color: #86efac;
  background: rgba(34,197,94,0.1); border-radius: 999px;
  padding: 5px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; white-space: nowrap;
}
.drawdowns-sub { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.drawdowns-table-wrap { overflow: auto; }
.drawdowns-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.drawdowns-table th {
  text-align: left; color: var(--muted); font-weight: 700; font-size: 11px;
  letter-spacing: 0.05em; text-transform: uppercase; padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
}
.drawdowns-table td {
  padding: 10px 12px; border-bottom: 1px solid rgba(36,48,68,0.7); vertical-align: middle;
}
.dd-depth { color: #fb7185; font-weight: 800; font-variant-numeric: tabular-nums; }
.dd-empty { color: var(--muted); text-align: center; padding: 18px 12px; }

/* Monthly Performance heatmap */
.monthly-section { margin-top: 18px; }
.monthly-card { padding: 18px 14px 14px; overflow: hidden; }
.monthly-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.monthly-title { margin: 0; font-size: 18px; font-weight: 700; }
.monthly-sub { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; max-width: 720px; }
.monthly-pills {
  display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 10px;
}
.monthly-pill {
  border: 1px solid var(--card-border); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 6px 10px; cursor: pointer; font-size: 12px;
}
.monthly-pill:hover { color: #e8eef9; border-color: #3b4d6b; }
.monthly-pill.active { background: #e8eef9; color: #0b1220; font-weight: 600; border-color: transparent; }
.monthly-table-wrap { overflow-x: hidden; margin: 0; width: 100%; }
.monthly-table {
  width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; font-size: 10px;
  min-width: 0;
}
.monthly-table th {
  padding: 6px 1px; color: var(--muted); font-size: 9px; font-weight: 700;
  letter-spacing: 0.02em; text-transform: uppercase; border-bottom: 1px solid var(--card-border);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.monthly-table th:first-child,
.monthly-table td:first-child { width: 9%; }
.monthly-table th.mp-fy,
.monthly-table td.mp-fy { width: 8.5%; }
.monthly-table td {
  padding: 4px 1px; border-bottom: 1px solid rgba(36,48,68,0.7); vertical-align: middle;
}
.monthly-year {
  text-align: left; font-weight: 700; color: var(--text); padding-left: 4px !important;
  white-space: normal; word-break: break-word; font-size: 10px; line-height: 1.15;
}
.mp-cell {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 0; min-height: 22px; width: 100%; max-width: none;
  border-radius: 2px; padding: 2px 1px; box-sizing: border-box;
  font-weight: 700; font-variant-numeric: tabular-nums; font-size: 9px; line-height: 1.1;
  --mp-i: 0.35;
}
.mp-cell.pos {
  color: #86efac;
  background: rgba(34,197,94, calc(0.12 + var(--mp-i) * 0.28));
  border: 1px solid rgba(34,197,94, calc(0.2 + var(--mp-i) * 0.35));
}
.mp-cell.neg {
  color: #fda4af;
  background: rgba(251,113,133, calc(0.12 + var(--mp-i) * 0.28));
  border: 1px solid rgba(251,113,133, calc(0.2 + var(--mp-i) * 0.35));
}
.mp-cell.neu {
  color: #c9d4e8;
  background: rgba(147,160,184,0.1);
  border: 1px solid rgba(147,160,184,0.25);
}
.mp-empty { color: rgba(147,160,184,0.45); font-weight: 600; }
.mp-fy { border-left: 2px solid rgba(36,48,68,0.9); font-weight: 800; }
.monthly-foot {
  margin: 12px 0 0; font-size: 11px; color: var(--muted); line-height: 1.4;
}

/* Performance Metrics gauges */
.metrics-section { margin-top: 18px; padding: 22px 22px 16px; }
.metrics-head {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.metrics-title-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center;
}
.metrics-title { margin: 0; font-size: 22px; font-weight: 700; }
.metrics-score {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(34,197,94,0.45); color: #86efac;
  background: rgba(34,197,94,0.1); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.03em;
}
.metrics-score.is-empty {
  border-color: rgba(147,160,184,0.35); color: var(--muted); background: transparent;
}
.metrics-period-wrap { justify-self: end; }
.metrics-period {
  appearance: none; background: #0f172a; color: var(--text);
  border: 1px solid var(--card-border); border-radius: 999px;
  padding: 10px 36px 10px 14px; font-size: 13px; font-weight: 500; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #93a0b8 50%),
    linear-gradient(135deg, #93a0b8 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(1em + 2px), calc(100% - 11px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.metrics-period:hover { border-color: #3b4d6b; }
.metrics-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.metrics-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 24px; }
.gauge-card {
  background: #121a27; border: 1px solid var(--card-border); border-radius: 12px;
  padding: 16px 16px 14px; min-height: 168px;
  display: flex; flex-direction: column;
}
.gauge-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gauge-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted);
}
.gauge-help {
  position: relative;
  width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #93a0b8; border: 1px solid rgba(147,160,184,0.45);
  cursor: help; flex-shrink: 0; background: transparent; padding: 0; line-height: 1;
}
.gauge-help:hover, .gauge-help:focus-visible, .gauge-help.is-open {
  color: #e8eef9; border-color: #93a0b8; outline: none;
}
.gauge-tip {
  display: none; position: absolute; z-index: 40;
  top: calc(100% + 8px); right: 0; width: min(260px, 70vw);
  padding: 10px 12px; border-radius: 8px; text-align: left;
  background: #0f172a; color: #e8eef9; border: 1px solid #3b4d6b;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
  font-size: 11px; font-weight: 500; line-height: 1.45; letter-spacing: 0;
  text-transform: none; white-space: normal;
}
.gauge-tip::before {
  content: ""; position: absolute; top: -6px; right: 6px;
  border: 6px solid transparent; border-top: 0; border-bottom-color: #3b4d6b;
}
.gauge-help:hover .gauge-tip,
.gauge-help:focus-visible .gauge-tip,
.gauge-help.is-open .gauge-tip { display: block; }
.gauge-value {
  font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums;
  margin: 8px 0 12px; line-height: 1.1; color: #fff;
}
.gauge-track-wrap {
  position: relative; height: 10px; border-radius: 999px;
  background: rgba(255,255,255,0.08); margin-bottom: 6px;
}
.gauge-bar-gradient {
  position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(90deg, #FF4D6D 0%, #F5B800 45%, #13C636 100%);
}
.gauge-bar-gradient.inverse {
  background: linear-gradient(90deg, #13C636 0%, #F5B800 45%, #FF4D6D 100%);
}
.gauge-pin {
  position: absolute; top: -4px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 3px solid #0b1220; box-shadow: 0 0 8px rgba(255,255,255,0.55);
  transform: translateX(-50%); z-index: 2;
}
.gauge-scale {
  display: flex; justify-content: space-between; font-size: 10px; color: var(--muted);
  font-variant-numeric: tabular-nums; margin-bottom: 6px;
}
.gauge-desc { margin: auto 0 0; font-size: 12px; color: var(--muted); line-height: 1.35; }
.metrics-foot { margin: 14px 0 0; font-size: 11px; color: var(--muted); }
@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-head { grid-template-columns: 1fr; }
  .metrics-period-wrap { justify-self: center; }
}
@media (max-width: 640px) {
  .metrics-grid { grid-template-columns: 1fr; }
}


/* Holdings price-change treemap — reference look: sector chrome, solid tiles, readable labels */
.treemap-section { margin-top: 18px; padding: 22px 22px 16px; }
.treemap-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.treemap-title { margin: 0; font-size: 20px; font-weight: 700; }
.treemap-sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; max-width: 640px; }
.treemap-controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.treemap-size { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid #243044; border-radius: 999px; }
.treemap-size-label { font-size: 11px; color: var(--muted); padding: 0 6px 0 8px; }
.treemap-legend { display: flex; flex-direction: column; gap: 4px; min-width: 190px; margin-right: auto; margin-left: 18px; }
.treemap-legend-cap { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.treemap-legend-bar { height: 8px; border-radius: 999px; background: linear-gradient(90deg, #dc2626, #450a0a 45%, #052e16 55%, #16a34a); }
.treemap-legend-ends { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
@media (max-width: 800px) { .treemap-legend { margin-left: 0; width: 100%; } }
.treemap-size-btn { background: transparent; border: 0; color: var(--muted); font-size: 12px; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.treemap-size-btn:hover { color: #e8eef9; }
.treemap-size-btn.active { background: #243044; color: #e8eef9; font-weight: 600; }
.treemap-periods { display: flex; gap: 8px; flex-wrap: wrap; }
.treemap-period {
  border: 1px solid var(--card-border); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 8px 12px; cursor: pointer; font-size: 13px;
}
.treemap-period:hover { color: #e8eef9; border-color: #3b4d6b; }
.treemap-period.active { background: #e8eef9; color: #0b1220; font-weight: 600; border-color: transparent; }
.treemap-canvas {
  position: relative; width: 100%; min-height: 560px; height: clamp(560px, 64vh, 720px);
  background: #03060c; border: 1px solid var(--card-border); border-radius: 10px; overflow: hidden;
}
.treemap-empty {
  display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 14px; padding: 24px; text-align: center;
}
.tm-sector {
  position: absolute; box-sizing: border-box; overflow: hidden;
  background: #0a0f18; border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.tm-sector-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center;
  padding: 0 10px;
  background: linear-gradient(180deg, #1a2233 0%, #121a28 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 12px; font-weight: 700; letter-spacing: 0.03em;
  color: #f3f6fc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
.tm-sector-label { display: none; }
.tm-tile {
  position: absolute; box-sizing: border-box; overflow: hidden;
  border-radius: 4px; border: 1px solid rgba(0,0,0,0.35);
  padding: 8px 6px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-align: center;
  --tm-i: 0.55;
  --tm-ticker: 16px;
  --tm-pct: 13px;
  --tm-logo: 28px;
}
.tm-tile.tm-other { opacity: 0.88; }
.tm-tile.up {
  /* solid green with intensity via opacity layering — reference-like, no hairline wash */
  background: color-mix(in srgb, #16a34a calc(45% + var(--tm-i) * 45%), #052e16);
  color: #f0fdf4;
}
.tm-tile.down {
  background: color-mix(in srgb, #dc2626 calc(45% + var(--tm-i) * 45%), #450a0a);
  color: #fff1f2;
}
.tm-logo {
  width: var(--tm-logo); height: var(--tm-logo); border-radius: 8px; object-fit: cover;
  background: rgba(0,0,0,0.28); flex: 0 0 auto; margin-bottom: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.tm-ticker {
  font-size: var(--tm-ticker); font-weight: 800; line-height: 1.05;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  letter-spacing: -0.01em; text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.tm-pct {
  font-size: var(--tm-pct); font-weight: 700; font-variant-numeric: tabular-nums;
  opacity: 0.96; line-height: 1.1; text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.treemap-foot { margin: 12px 0 0; font-size: 11px; color: var(--muted); line-height: 1.4; }

/* Trades page */
.trades-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trades-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
}

.trades-top > .card {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .trades-top {
    grid-template-columns: 1fr;
  }
}
.trades-card { padding: 18px 18px 16px; }
.trades-card h3 { margin: 0 0 14px; font-size: 16px; font-weight: 700; color: #e8eef9; }
.trades-logos { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.trades-logo {
  width: 76px; height: 76px; border-radius: 999px; object-fit: cover;
  background: #1a2333; border: 1px solid #2a364d;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.trades-logo-more {
  width: 76px; height: 76px; border-radius: 999px; display: grid; place-items: center;
  background: #2a3346; color: #c5d0e4; font-size: 16px; font-weight: 700;
}
.trades-empty {
  padding: 36px 20px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5;
  border: 1px dashed #2a364d; border-radius: 10px; background: rgba(255,255,255,0.02);
}
.trades-empty-inline { margin: 0; color: var(--muted); font-size: 13px; }
.winrate-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 140px; }
.winrate-gauge { width: 180px; height: 100px; position: relative; }
.winrate-gauge canvas { width: 180px !important; height: 100px !important; }
.winrate-value {
  margin-top: -8px; font-size: 28px; font-weight: 800; color: #f3f6fc;
  font-variant-numeric: tabular-nums;
}
.trade-stats-list { display: flex; flex-direction: column; gap: 12px; }
.trade-stats-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px; color: #93a0b8;
}
.trade-stats-row strong { font-size: 15px; font-weight: 700; }
.stat-green { color: #22c55e; }
.stat-blue { color: #38bdf8; }
.stat-orange { color: #fb923c; }
.stat-pink { color: #f472b6; }
.stat-red { color: #ef4444; }

/* Latest Trades (live open positions) */
.trades-latest-card { padding: 18px 18px 12px; }
.trades-latest-head { margin-bottom: 10px; }
.trades-latest-eyebrow {
  font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.trades-latest-title-row {
  display: flex; align-items: center; gap: 8px;
}
.trades-latest-title-row h3 {
  margin: 0; font-size: 20px; font-weight: 750; color: #e8eef9;
}
.trades-latest-card .trades-info { margin-top: 2px; }
.trades-latest-scroll {
  /* ~20 dense rows visible (~44px each + sticky head) */
  /* No min-height: with the last-60-days window the list is often short. */
  max-height: min(920px, 72vh);
  overflow-y: auto; overflow-x: auto;
  border-radius: 8px; scrollbar-width: thin; scrollbar-color: #3b4d6b transparent;
}
.trades-latest-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.trades-latest-scroll::-webkit-scrollbar-thumb {
  background: #3b4d6b; border-radius: 999px;
}
.trades-latest-table {
  width: 100%; border-collapse: collapse; min-width: 640px;
}
.trades-latest-table th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: #7f8aa3; font-weight: 650; padding: 10px 8px;
  border-bottom: 1px solid #243044; background: var(--card);
}
.trades-latest-table td {
  padding: 10px 8px; border-bottom: 1px solid #1b2434; font-size: 15px; color: #e8eef9;
  vertical-align: middle; font-variant-numeric: tabular-nums; line-height: 1.25;
}
.trades-latest-table tbody tr:last-child td { border-bottom: none; }
.trades-latest-table .trades-inst { gap: 12px; font-size: 15px; font-weight: 700; }
.trades-latest-table .trades-inst img {
  width: 32px; height: 32px; border-radius: 999px; object-fit: cover; background: #1a2333;
  flex-shrink: 0;
}
.trades-latest-table .pos { color: #22c55e; font-weight: 700; }
.trades-latest-table .neg { color: #ef4444; font-weight: 700; }
.trades-latest-date { color: #c5d0e4; white-space: nowrap; font-size: 14px; }

.trades-table-card { padding: 18px 18px 10px; }
.trades-table-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.trades-table-head h3 { margin: 0; font-size: 18px; font-weight: 700; }
.trades-export {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #3b4d6b; background: transparent; color: #e8eef9;
  border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px;
}
.trades-table-wrap { overflow-x: auto; }
.trades-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.trades-table th {
  text-align: left; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: #7f8aa3; font-weight: 650; padding: 10px 8px; border-bottom: 1px solid #243044;
}
.trades-table td {
  padding: 12px 8px; border-bottom: 1px solid #1b2434; font-size: 13px; color: #e8eef9;
  vertical-align: middle;
}
.trades-inst { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.trades-inst img {
  width: 32px; height: 32px; border-radius: 999px; object-fit: cover; background: #1a2333;
}
.trades-table .pos { color: #22c55e; font-weight: 700; }
.trades-table .neg { color: #ef4444; font-weight: 700; }
.trades-demo-note { display: none; }


/* Compact monthly table inside half grid — must fit without horizontal scroll */
.dd-monthly-grid .monthly-table { min-width: 0; font-size: 10px; table-layout: fixed; }
.dd-monthly-grid .mp-cell { min-width: 0; max-width: none; font-size: 9px; padding: 2px 1px; }
.dd-monthly-grid .monthly-pills { gap: 6px; }
.dd-monthly-grid .monthly-pill { padding: 6px 10px; font-size: 12px; }
.dd-monthly-grid .monthly-table-wrap { overflow-x: hidden; }
.dd-monthly-grid .monthly-card { padding: 16px 12px 12px; }

/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

.mobile-menu-toggle {
  display: none;
}

.mobile-menu-overlay {
  display: none;
}

@media (max-width: 800px) {

  /* ---------- Mobile header button ---------- */

  .mobile-menu-toggle {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1100;

    width: 44px;
    height: 44px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    padding: 0;

    background: #151d2e;
    border: 1px solid var(--card-border);
    border-radius: 10px;

    cursor: pointer;
  }

  .mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;

    background: #e8eef9;
    border-radius: 999px;

    transition: transform .2s ease, opacity .2s ease;
  }

  .mobile-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }


  /* ---------- Sidebar drawer ---------- */

  .sidebar {
    display: flex;

    position: fixed;
    z-index: 1050;

    top: 0;
    bottom: 0;
    left: 0;

    width: min(280px, 82vw);
    height: 100vh;
    max-height: none;

    margin: 0;
    padding: 20px 14px;

    flex-direction: column;

    background: var(--sidebar);

    border-right: 1px solid var(--card-border);

    overflow-y: auto;
    overflow-x: hidden;

    transform: translateX(-105%);
    transition: transform .25s ease;

    box-shadow: 12px 0 35px rgba(0,0,0,.35);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }


  /* ---------- Keep the original sidebar content ---------- */

  .sidebar .brand,
  .sidebar .sidebar-user,
  .sidebar .nav-label {
    display: flex;
  }

  .sidebar .nav-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .sidebar .nav-foot {
    display: block;
  }

  .sidebar .nav-link {
    display: flex;
    flex-direction: row;

    width: auto;
    min-width: 0;
    height: auto;

    padding: 11px 12px 11px 14px;

    gap: 12px;

    font-size: inherit;
  }

  .sidebar .nav-link span {
    max-width: none;
  }

  .sidebar .nav-ico {
    width: 18px;
    height: 18px;
  }

  .sidebar .nav-link.active::before {
    left: 0;
    top: 8px;
    bottom: 8px;

    width: 3px;
    height: auto;

    transform: none;
  }


  /* ---------- Dark overlay ---------- */

  .mobile-menu-overlay {
    display: block;

    position: fixed;
    inset: 0;

    z-index: 1040;

    background: rgba(0, 0, 0, .62);

    opacity: 0;
    visibility: hidden;

    transition: opacity .25s ease, visibility .25s ease;
  }

  .mobile-menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }


  /* ---------- Main content ---------- */

  .main {
    margin-left: 0;
    width: 100%;
    max-width: none;

    padding: 68px 16px 30px;
  }

  .kpi-row {
    grid-template-columns: 1fr;
  }

  .summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Main topbar + user menu ---------- */

/* User menu beside Share in profile card */
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 18px;
}
.profile-user-menu {
  display: flex;
  align-items: center;
  align-self: flex-start;
  padding-top: 4px;
  margin-left: 10px;
}
.profile-user-menu .user-menu-dropdown {
  right: 0;
  left: auto;
}

.main-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: -6px 0 12px;
  min-height: 40px;
}

.user-menu {
  position: relative;
  z-index: 40;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border: 1px solid var(--card-border);
  background: #111a2b;
  cursor: pointer;
  border-radius: 999px;
  line-height: 0;
  color: var(--muted);
}
.user-menu-trigger:hover { border-color: #3a4a64; color: #dbe4f5; }
.user-menu-gear { flex-shrink: 0; }

.user-menu-trigger:focus-visible {
  outline: 2px solid #13c744;
  outline-offset: 2px;
}

.user-menu-avatar {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.18);
  background: #1f2937;
  display: block;
}

.user-menu-avatar.placeholder {
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #dbe4f5;
  font-size: 14px;
}

.user-menu-avatar--sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: #1a2336;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  padding: 8px 0;
  z-index: 50;
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
}

.user-menu-email {
  font-size: 16px;
  color: #e8eef9;
  word-break: break-all;
  line-height: 1.3;
}

.user-menu-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #dbe4f5;
  text-decoration: none;
  font-size: 16px;
  border: 0;
  background: transparent;
  width: 100%;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}

.user-menu-item:hover,
.user-menu-item:focus-visible {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.user-menu-item--button {
  font: inherit;
  font-size: 16px;
}

.user-menu-logout-form {
  margin: 0;
}

.user-menu-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

.user-menu-login {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  color: #dbe4f5;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.user-menu-login:hover {
  border-color: #3b4d6b;
  color: #fff;
}

/* Discord and X icons side by side at the bottom of the menu, just above the version. */
.sidebar-social { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 6px; }
.sidebar-social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; color: #a5b4fc;
}
.sidebar-social-link:hover { background: rgba(255,255,255,0.05); color: #c7d2fe; }
.sidebar-social-link .nav-ico { width: 20px; height: 20px; }
.sidebar-social + .sidebar-version { margin-top: 0; padding-top: 6px; }

.sidebar-version { margin-top: 0; padding-top: 6px; }

.sidebar-version {
  margin-top: auto;
  padding: 14px 12px 8px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
  opacity: 0.85;
}

/* One-line footer of the app pages, with the legal links. */
.app-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--card-border);
  font-size: 11.5px; color: var(--muted);
}
.app-footer a { color: var(--muted); text-decoration: none; }
.app-footer a:hover { color: var(--green); }
.app-footer span:nth-child(2) { flex: 1 1 auto; opacity: 0.8; }
/* Room for the fixed Feedback button (bottom right), which covered Disclaimer / Contact. */
.app-footer { padding-right: 120px; }
@media (max-width: 800px) {
  .app-footer { padding-right: 0; padding-bottom: 56px; }
}

@media (max-width: 800px) {
  .main-topbar {
    margin: 0 0 10px;
    padding-right: 48px;
  }

  .user-menu-dropdown {
    right: 0;
    min-width: 220px;
  }
}

/* Page loading bar (public/assets/js/page-loader.js) */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  width: 0;
  height: 3px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, var(--green), var(--blue));
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: width 0.25s ease, opacity 0.2s ease;
}
.page-loader.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .page-loader { transition: opacity 0.2s ease; }
}

/* Trades: other users' profiles only show Most Traded (full width) */
.trades-top.trades-top-single { grid-template-columns: 1fr; }

/* Overview charts card: Growth / Returns / Value vs Deposits tabs */
.ov-charts-head { flex-wrap: wrap; }
.ov-charts-head .ov-tabs { margin-left: 0; }
.ov-charts-head .demo-ranges { margin-left: auto; }
.ov-panel[hidden], .ov-panel [hidden] { display: none !important; }
.ov-subhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.ov-subhead .demo-legend { margin: 0; }
.ov-subhead-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ov-toggle { display: inline-flex; border: 1px solid var(--card-border); border-radius: 999px; padding: 2px; }
.ov-toggle button {
  border: 0; background: transparent; color: var(--muted); border-radius: 999px;
  padding: 5px 12px; font-size: 12px; cursor: pointer;
}
.ov-toggle button.active { background: #e8eef9; color: #0b1220; font-weight: 600; }
.ov-badge {
  font-size: 11px; color: #7dd3fc; border: 1px solid rgba(56,189,248,.4);
  background: rgba(56,189,248,.08); border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.ov-capital-kpis { display: flex; gap: 22px; flex-wrap: wrap; }
.ov-capital-kpis div { display: flex; flex-direction: column; gap: 2px; }
.ov-capital-kpis span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ov-capital-kpis strong { font-size: 18px; font-weight: 700; }
.ov-capital-kpis strong.pos { color: var(--green); }
.ov-capital-kpis strong.neg { color: var(--red); }
.ov-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.ov-msg {
  margin: 14px 0 4px; padding: 28px 18px; text-align: center; font-size: 14px; color: var(--muted);
  border: 1px dashed var(--card-border); border-radius: 10px;
}
.ov-diamond { display: inline-block; width: 8px; height: 8px; background: #f59e0b; transform: rotate(45deg); margin-right: 6px; }
.ov-gap { display: inline-block; width: 14px; height: 9px; border-radius: 2px; background: rgba(34,197,94,.35); margin-right: 6px; }
.ov-tri { display: inline-block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; margin-right: 6px; }
.ov-tri.up { border-bottom: 9px solid #38bdf8; }
.ov-tri.down { border-top: 9px solid #ef4444; }
@media (max-width: 700px) {
  .ov-charts-head .demo-ranges { margin-left: 0; width: 100%; }
  .ov-capital-kpis { gap: 14px; }
  .ov-capital-kpis strong { font-size: 15px; }
}

/* Premium card shown to a Free user instead of the card (Admin → Feature access). */
.bl-locked-card { margin: 0 0 14px; padding: 14px 18px; border-style: dashed; border-color: rgba(245, 158, 11, .45); background: rgba(245, 158, 11, .04); }
.bl-locked-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bl-locked-head strong { color: var(--text); font-size: 15px; }
.bl-locked-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border: 1px solid rgba(245, 158, 11, .5); border-radius: 999px; color: #fbbf24; font-size: 11px; font-weight: 700; white-space: nowrap; }
.bl-locked-badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.bl-locked-card p { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }
.bl-locked-card p a { color: #fbbf24; font-weight: 700; }
/* With a demo preview: the card as it looks, faded, with the upgrade button on top. */
.bl-locked-card.has-preview { border-style: solid; border-color: rgba(245, 158, 11, .35); background: var(--card); }
/* One surface inside the amber border: the screenshot is taken inside the
   card's own border, on the same --card background, so it reads as the
   card's content and not as a frame in a frame. */
.bl-locked-shot { position: relative; margin-top: 8px; display: flex; justify-content: center; align-items: flex-start; max-height: 720px; overflow: hidden; background: transparent; }
.bl-locked-shot img { display: block; max-width: 100%; height: auto; }
.bl-locked-shot.is-cut::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(180deg, rgba(21, 29, 46, 0), var(--card)); pointer-events: none; }
.bl-locked-demo { position: absolute; bottom: 8px; left: 8px; z-index: 1; font-size: 10.5px; font-weight: 700; color: #cbd5e1; background: rgba(11, 18, 32, .85); border: 1px solid var(--card-border); border-radius: 999px; padding: 2px 8px; }
.bl-locked-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; }
.bl-locked-card .bl-locked-foot p { margin: 0; }
.bl-locked-cta { flex: 0 0 auto; background: #fbbf24; color: #1a1300; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 8px 18px; text-decoration: none; white-space: nowrap; }
.bl-locked-cta:hover { background: #fcd34d; }
@media (max-width: 640px) { .bl-locked-foot { flex-direction: column; align-items: stretch; text-align: center; } }
/* Locked card in a narrow slot (figure tiles of Risk, Dividends...): a shrunken
   screenshot is unreadable, so the tile keeps the text and the button only. */
.bl-locked-card.has-preview { container-type: inline-size; }
@container (max-width: 380px) {
  .bl-locked-shot { display: none; }
  .bl-locked-foot { flex-direction: column; align-items: stretch; text-align: left; }
  .bl-locked-cta { text-align: center; }
}
/* Inside the page grids and rows the gap does the spacing. */
/* A locked card right after a grid of figures (Dividends: Historical activity → Dividend Income). */
[class*="grid"] + .bl-locked-card { margin-top: 14px; }
[class*="grid"] > .bl-locked-card,
[class*="row"] > .bl-locked-card,
[class*="kpis"] > .bl-locked-card { margin: 0; }

/* Menu: no visible scrollbar (it still scrolls on very short screens), and
   a tighter list on laptop-height screens so every item fits (My Lens added
   one more item in 1.1.0). */
.sidebar { scrollbar-width: none; -ms-overflow-style: none; }
.sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; }
@media (min-width: 801px) and (max-height: 980px) {
  .sidebar { gap: 12px; padding-top: 14px; padding-bottom: 12px; }
  .sidebar .brand { margin-bottom: 8px; }
  .sidebar .nav-link { padding-top: 8px; padding-bottom: 8px; }
}
@media (min-width: 801px) and (max-height: 820px) {
  /* 1366x768 laptops: the whole menu (14 items) without scrolling, same logo and text size. */
  .sidebar { gap: 6px; padding-top: 10px; padding-bottom: 6px; }
  .sidebar .brand { margin-bottom: 0; }
  .sidebar .nav-section { gap: 3px; }
  .sidebar .nav-link { padding-top: 6px; padding-bottom: 6px; }
  .sidebar .nav-section.is-setup { gap: 2px; }
  .sidebar .nav-link.is-locked { padding-top: 2px; padding-bottom: 2px; }
  .sidebar-social-link { width: 30px; height: 30px; }
  .sidebar-version { padding-top: 2px; padding-bottom: 2px; }
}

/* Premium page (/premium): plan, free trial, PayPal subscription; and the
   one-line Premium notice at the top of the app pages. */
.premium-page { width: 100%; }
.premium-head h1 { margin: 0 0 4px; font-size: 26px; }
.premium-head p { margin: 0 0 18px; color: var(--muted); }
.premium-flash { margin: 0 0 16px; padding: 11px 14px; border-radius: 10px; font-size: 14px; border: 1px solid rgba(96, 165, 250, .4); background: rgba(96, 165, 250, .1); color: #bfdbfe; }
.premium-flash.is-success { border-color: rgba(34, 197, 94, .45); background: var(--green-dim); color: #86efac; }
.premium-flash.is-error { border-color: rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .1); color: #fca5a5; }
.premium-status, .premium-trial { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.premium-status p, .premium-trial p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.premium-status-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.premium-status-title { font-size: 20px; font-weight: 750; margin-top: 2px; }
.premium-trial { border-color: rgba(245, 158, 11, .5); background: linear-gradient(90deg, rgba(251, 191, 36, .08), transparent 70%), var(--card); }
.premium-trial strong { font-size: 16px; }
.premium-trial.is-muted { border-color: var(--card-border); background: var(--card); }
.premium-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 14px; }
.premium-plan { display: flex; flex-direction: column; gap: 10px; }
.premium-plans > .card { margin-top: 0; }
.premium-plan.is-best { border-color: rgba(245, 158, 11, .55); }
.premium-plan-name { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.premium-plan-save { color: #1a1300; background: #fbbf24; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 800; }
.premium-plan-price { font-size: 28px; font-weight: 800; }
.premium-plan-price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.premium-plan ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; flex: 1; }
.premium-plan li { margin: 3px 0; }
.premium-plan-current { text-align: center; padding: 9px; border: 1px solid var(--card-border); border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600; }
.premium-plan-note { color: var(--muted); font-size: 12px; }
.premium-btn { display: inline-block; border: 1px solid transparent; border-radius: 999px; padding: 9px 18px; font-weight: 750; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; text-align: center; font-family: inherit; }
.premium-btn-gold { background: #fbbf24; color: #1a1300; }
.premium-btn-gold:hover { background: #fcd34d; }
.premium-btn-paypal { width: 100%; background: #ffc439; color: #111; }
.premium-btn-paypal:hover { background: #f2ba36; }
.premium-btn-paypal:disabled { background: transparent; border-color: var(--card-border); color: var(--muted); cursor: default; }
.premium-btn-ghost { background: transparent; border-color: var(--card-border); color: var(--text); }
.premium-btn-ghost:hover { border-color: var(--muted); }
.premium-fine { color: var(--muted); font-size: 12px; line-height: 1.6; }
.premium-fine a { color: var(--muted); }
@media (max-width: 900px) {
  .premium-plans { grid-template-columns: 1fr; }
  .premium-status, .premium-trial { flex-direction: column; align-items: flex-start; }
}
.bl-premium-notice { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 9px 12px 9px 14px; border: 1px solid rgba(245, 158, 11, .45); border-radius: 10px; background: rgba(251, 191, 36, .08); color: #fde68a; font-size: 13px; }
.bl-premium-notice[hidden] { display: none; }
.bl-premium-notice.is-warning { border-color: rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .08); color: #fecaca; }
.bl-premium-notice span { flex: 1; }
.bl-premium-notice a { color: #1a1300; background: #fbbf24; border-radius: 999px; padding: 4px 12px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.bl-premium-notice button { background: none; border: 0; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; opacity: .7; }

/* What's new notice, Getting started checklist and Feedback button (tester tools). */
.bl-whats-new { margin: 0 0 14px; padding: 14px 16px; border: 1px solid rgba(34, 197, 94, .4); border-radius: var(--radius); background: linear-gradient(90deg, rgba(34, 197, 94, .08), transparent 70%), var(--card); }
.bl-whats-new[hidden] { display: none; }
.bl-whats-new-head { display: flex; align-items: center; gap: 10px; }
.bl-whats-new-head strong { flex: 1; font-size: 15px; }
.bl-whats-new-tag { background: var(--green); color: #04140a; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 9px; text-transform: uppercase; letter-spacing: .04em; }
.bl-whats-new-close { background: transparent; border: 1px solid var(--card-border); color: var(--text); border-radius: 999px; padding: 5px 14px; font-weight: 650; cursor: pointer; font-family: inherit; }
.bl-whats-new ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; display: grid; gap: 3px; }
.bl-whats-new li a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.bl-whats-new-more { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid rgba(148, 163, 184, .15); padding-top: 9px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.bl-whats-new-more a { color: #4ade80; font-weight: 700; text-decoration: none; }
.bl-whats-new-more a:hover { text-decoration: underline; }
.bl-whats-new li a:hover { color: #4ade80; }
.bl-onboarding { margin-bottom: 14px; }
.bl-onboarding[hidden] { display: none; }
.bl-onboarding-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bl-onboarding-head strong { font-size: 16px; margin-right: 10px; }
.bl-onboarding-head span { color: var(--muted); font-size: 13px; }
.bl-onboarding-close { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; }
.bl-onboarding-bar { height: 6px; border-radius: 999px; background: var(--card-border); margin: 10px 0 12px; overflow: hidden; }
.bl-onboarding-bar i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.bl-onboarding-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.bl-onboarding-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: 10px; min-width: 0; }
.bl-onboarding-steps li > div { display: grid; gap: 2px; min-width: 0; }
.bl-onboarding-steps a { color: var(--text); font-weight: 650; }
.bl-onboarding-steps small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.bl-onboarding-steps li.is-done { opacity: .6; }
.bl-onboarding-check { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--card-border); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #04140a; }
.bl-onboarding-steps li.is-done .bl-onboarding-check { background: var(--green); border-color: var(--green); }
.bl-feedback { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.bl-feedback-open { background: var(--card); color: var(--text); border: 1px solid var(--card-border); border-radius: 999px; padding: 8px 16px; font: 650 13px var(--font); cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.bl-feedback-open:hover { border-color: var(--green); }
.bl-feedback-panel { width: min(360px, calc(100vw - 36px)); background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .45); order: -1; }
.bl-feedback-panel[hidden] { display: none; }
.bl-feedback-kinds { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.bl-feedback-panel textarea { width: 100%; resize: vertical; background: var(--bg); color: var(--text); border: 1px solid var(--card-border); border-radius: 8px; padding: 8px 10px; font: 13px/1.5 var(--font); }
.bl-feedback-actions { display: flex; align-items: center; gap: 8px; }
.bl-feedback-status { flex: 1; color: var(--muted); font-size: 12px; }
.bl-feedback-cancel { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; }
.bl-feedback-send { background: var(--green); color: #04140a; border: 0; border-radius: 999px; padding: 6px 16px; font: 750 13px var(--font); cursor: pointer; }
.bl-feedback-send:disabled { opacity: .6; cursor: default; }
html.lens-embed .bl-feedback { display: none; }

/* Sidebar "Get started" for a signed-in user without an eToro connection (templates/sidebar.php, setupMode). */
.sidebar-setup { margin: 0 8px 2px; padding: 7px 12px; border: 1px solid rgba(34,197,94,.35); border-radius: 12px; background: rgba(34,197,94,.06); }
.sidebar-setup-title { font-weight: 700; font-size: 13px; color: #fff; margin-bottom: 0; }
.sidebar-setup-step { display: flex; gap: 9px; align-items: center; font-size: 12.5px; color: #94a3b8; margin-top: 4px; text-decoration: none; }
.sidebar-setup-step b { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #475569; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: 0 0 auto; }
.sidebar-setup-step.is-current { color: #4ade80; }
.sidebar-setup-step.is-current b { background: #22c55e; border-color: #22c55e; color: #0b1220; }
.sidebar-setup-step.is-current:hover { text-decoration: underline; }
.nav-link.is-locked { opacity: .42; cursor: default; }
.nav-link.is-locked:hover { background: none; }
/* Setup menu: the label reads like a menu item (not clickable), the locked pages sit close together. */
.sidebar .nav-section.is-setup { gap: 2px; }
.sidebar .nav-link.sidebar-setup-label { color: #fff; font-weight: 600; font-size: 14.5px; line-height: 1.25; cursor: default; padding-top: 4px; padding-bottom: 4px; align-items: flex-start; }
.sidebar .nav-link.sidebar-setup-label span { white-space: normal; overflow: visible; }
.sidebar .nav-link.sidebar-setup-label .nav-ico { margin-top: 1px; }
.sidebar .nav-link.sidebar-setup-label:hover { background: none; }
.sidebar .nav-link.sidebar-setup-label .nav-ico { color: #4ade80; }
.sidebar .nav-link.is-locked { padding-top: 2px; padding-bottom: 2px; font-size: 14px; }
.sidebar .nav-link.is-locked .nav-ico { width: 15px; height: 15px; }

/* "?" help on cards (Features\CardHelp, public/assets/js/card-help.js) */
.bl-help {
  width: 17px; height: 17px; border-radius: 999px; display: inline-grid; place-items: center;
  font-size: 10px; font-weight: 800; line-height: 1; color: var(--muted); background: transparent;
  border: 1px solid rgba(147,160,184,0.55); padding: 0; margin-left: 6px; cursor: pointer; vertical-align: 1px;
}
.bl-help:hover, .bl-help:focus-visible, .bl-help[aria-expanded="true"] { color: var(--text); border-color: var(--muted); outline: none; }
.bl-help-box {
  position: relative; background: #0f172a; border: 1px solid #2b3a55; border-radius: 10px;
  padding: 12px 34px 12px 14px; margin: 10px 0 12px; font-size: 12px; line-height: 1.55; color: var(--text);
}
.bl-help-box[hidden] { display: none; }
.bl-help-box h4 { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.bl-help-box p { margin: 0 0 6px; }
.bl-help-box p:last-child { margin-bottom: 0; }
.bl-help-close {
  position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--muted);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 4px;
}
.bl-help-close:hover { color: var(--text); }

/* ---------- Profile header (1.1.1): copiers after the eToro level, badges, username opens eToro ---------- */
.profile-copiers { font-size: 14px; font-weight: 600; color: var(--muted); }
.profile-copiers strong { color: var(--text); }
.profile-badges { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.profile-badge { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid; cursor: default; }
/* Badge name on hover / keyboard focus (the native title tooltip was slow or missing). */
.profile-badge::after {
  content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  white-space: nowrap; padding: 5px 9px; border-radius: 7px; border: 1px solid var(--card-border);
  background: #0b1220; color: var(--text); font-size: 12px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 30;
}
.profile-badge:hover::after, .profile-badge:focus-visible::after { opacity: 1; }
.profile-badge:focus-visible { outline: 2px solid #13c744; outline-offset: 2px; }
.profile-badge.is-premium, .badge-icon.is-premium { background: rgba(251, 191, 36, .10); border-color: rgba(251, 191, 36, .50); }
.profile-badge.is-founding, .badge-icon.is-founding { background: rgba(249, 115, 22, .10); border-color: rgba(249, 115, 22, .50); }
.profile-badge.is-connected, .badge-icon.is-connected { background: rgba(45, 212, 191, .10); border-color: rgba(45, 212, 191, .50); }
.profile-badge.is-bughunter, .badge-icon.is-bughunter { background: rgba(59, 130, 246, .10); border-color: rgba(59, 130, 246, .50); }
.profile-badge.is-ambassador, .badge-icon.is-ambassador { background: rgba(217, 70, 239, .10); border-color: rgba(217, 70, 239, .50); }
.profile-badge.is-veteran, .badge-icon.is-veteran { background: rgba(34, 197, 94, .10); border-color: rgba(34, 197, 94, .50); }
.profile-badge.is-dividends, .badge-icon.is-dividends { background: rgba(34, 197, 94, .10); border-color: rgba(34, 197, 94, .50); }
.profile-badge.is-diversified, .badge-icon.is-diversified { background: rgba(96, 165, 250, .10); border-color: rgba(96, 165, 250, .50); }
.profile-badge.is-diamond, .badge-icon.is-diamond { background: rgba(167, 139, 250, .10); border-color: rgba(167, 139, 250, .50); }
.profile-badge.is-greenyear, .badge-icon.is-greenyear { background: rgba(74, 222, 128, .10); border-color: rgba(74, 222, 128, .50); }
.profile-badge.is-popular, .badge-icon.is-popular { background: rgba(244, 114, 182, .10); border-color: rgba(244, 114, 182, .50); }
.profile-badge.is-dailylens, .badge-icon.is-dailylens { background: rgba(249, 115, 22, .10); border-color: rgba(249, 115, 22, .50); }
.profile-badge.is-lensbuilder, .badge-icon.is-lensbuilder { background: rgba(45, 212, 191, .10); border-color: rgba(45, 212, 191, .50); }
.profile-badge.is-idea, .badge-icon.is-idea { background: rgba(250, 204, 21, .10); border-color: rgba(250, 204, 21, .50); }
.profile-badge.is-storyteller, .badge-icon.is-storyteller { background: rgba(56, 189, 248, .10); border-color: rgba(56, 189, 248, .50); }
.profile-badge.lv-silver { box-shadow: 0 0 0 2px rgba(203, 213, 225, .35); }
.profile-badge.lv-gold { box-shadow: 0 0 0 2px rgba(250, 204, 21, .45); }
.profile-badge-more { border-color: transparent; color: var(--muted); font-size: 12px; font-weight: 700; width: auto; padding: 0 4px; }
.profile-badge img, .badge-icon img { display: block; }
.profile-etoro-link { display: inline-flex; align-items: center; gap: 5px; color: #13c636; font-weight: 600; text-decoration: none; }
.profile-etoro-link:hover { text-decoration: underline; }
.profile-actions .profile-user-menu { padding-top: 0; align-self: center; }

/* Account settings → Your badges */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.badge-tile { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--card-border); border-radius: 10px; background: #111a2b; }
.badge-tile { position: relative; color: inherit; text-decoration: none; }
.badge-icon { border-radius: 50%; display: grid; place-items: center; border: 2px solid; }
.badge-tile .badge-icon { flex: 0 0 40px; height: 40px; }
.badge-tile b { display: block; font-size: 14px; padding-right: 40px; }
.badge-tile small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.badge-tile small.badge-note { color: var(--text); opacity: .8; }
.badge-tile.is-locked { opacity: .45; }
.badge-tile.is-locked .badge-icon { filter: grayscale(1); border-color: #64748b; }
a.badge-tile.is-locked:hover { opacity: .7; }
.badge-levels { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; }
.badge-levels i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #475569; }
.badge-levels i.is-bronze { background: #cd7f32; border-color: #cd7f32; }
.badge-levels i.is-silver { background: #cbd5e1; border-color: #cbd5e1; }
.badge-levels i.is-gold { background: #facc15; border-color: #facc15; }
.badge-new { position: absolute; top: 10px; right: 10px; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; color: #06210f; background: #22c55e; border-radius: 999px; padding: 2px 7px; }
.badge-progress { display: block; height: 5px; border-radius: 4px; background: #0f1729; margin-top: 8px; overflow: hidden; }
.badge-progress i { display: block; height: 100%; background: #60a5fa; }
.badge-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.badge-head span { color: var(--muted); font-size: 13px; }

/* Ticker check: the "?" sits in the body (the card head is a button). */
.tc-help-line{display:flex;align-items:center;gap:6px;margin:0 0 10px;color:var(--muted);font-size:12.5px}
