/* ============================================================
   JAX CAPITAL — INVESTOR PORTAL  |  Style System v2
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;0,14..32,900;1,14..32,400&display=swap');

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: #ffffff;
  color: #0a0a0a;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ===== TABULAR NUMBERS =====
   Force all digits to the same width so dollar amounts align cleanly */
.hero-ror, .hero-roi,
.stat-item-value,
.bench-card-ahead,
.summary-value,
.ledger-amount,
.dist-amt,
.dist-total-row .summary-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes shimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ----- Left panel ----- */
.login-left {
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  padding: 56px 56px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* decorative rings */
.login-left::before {
  content: '';
  position: absolute;
  top: 55%;
  right: -80px;
  transform: translateY(-50%);
  width: 380px; height: 380px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}
.login-left::after {
  content: '';
  position: absolute;
  top: 55%;
  right: -140px;
  transform: translateY(-50%);
  width: 560px; height: 560px;
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 50%;
  pointer-events: none;
}

.ll-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.05s;
}

.ll-logo-mark {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -1px;
  color: #fff;
}

.ll-logo-mark em {
  font-style: normal;
  display: inline-block;
  transform: skewX(-9deg);
}

.ll-logo-div {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.2);
}

.ll-logo-text {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.ll-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 0 40px;
}

.ll-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 20px;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.15s;
}

.ll-headline {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1.5px;
  color: #fff;
  margin-bottom: 22px;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.2s;
}

.ll-subtext {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255,255,255,0.42);
  max-width: 330px;
  font-weight: 400;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.25s;
}

.ll-stats {
  display: flex;
  gap: 0;
  margin-top: 44px;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.3s;
}

.ll-stat-item {
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-right: 32px;
  margin-right: 32px;
}

.ll-stat-item:last-child { padding-right: 0; margin-right: 0; }

.ll-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 6px;
}

.ll-stat-val {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.ll-footer {
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  line-height: 1.7;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.35s;
}

/* ----- Right panel ----- */
.login-right {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 64px;
}

.login-form-wrap {
  width: 100%;
  max-width: 370px;
}

.lf-header {
  margin-bottom: 44px;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.1s;
}

.lf-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #0a0a0a;
  margin-bottom: 6px;
}

.lf-sub {
  font-size: 14px;
  color: #999;
  font-weight: 400;
}

.form-group {
  margin-bottom: 28px;
}

.form-group:nth-of-type(1) { animation: fadeUp 0.6s ease both; animation-delay: 0.18s; }
.form-group:nth-of-type(2) { animation: fadeUp 0.6s ease both; animation-delay: 0.23s; }

.form-group label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 12px;
}

.form-group input {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1.5px solid #e8e8e8;
  background: transparent;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  color: #0a0a0a;
  transition: border-color 0.2s ease;
}

.form-group input:focus { border-bottom-color: #0a0a0a; }
.form-group input::placeholder { color: #d0d0d0; }

.login-btn {
  width: 100%;
  background: #0a0a0a;
  color: #fff;
  border: none;
  padding: 16px 24px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.5px;
  cursor: pointer;
  margin-top: 4px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s ease, transform 0.1s ease;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.28s;
}

.login-btn:hover  { background: #222; }
.login-btn:active { transform: scale(0.99); }

.login-btn:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* shimmer on hover */
.login-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: none;
}
.login-btn:hover::after {
  animation: shimmer 0.6s ease forwards;
}

.login-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fef2f2;
  border-left: 3px solid #dc2626;
  font-size: 13px;
  color: #dc2626;
  display: none;
  animation: fadeUp 0.3s ease;
}

.login-error.visible { display: block; }

.lf-footer {
  margin-top: 36px;
  font-size: 11px;
  color: #ccc;
  text-align: center;
  line-height: 1.6;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.33s;
}

/* ============================================================
   DASHBOARD — HEADER
   ============================================================ */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 48px;
  height: auto;
  background: transparent;
  border: none;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.35s ease, padding 0.35s ease;
  animation: fadeIn 0.4s ease both;
}

body.scrolled .site-header {
  background: rgba(255, 255, 255, 0.95);
  padding: 18px 48px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Logo image — used in header and login */
.logo-img {
  height: 46px;
  width: auto;
  display: block;
}

/* Inverted white version for dark backgrounds */
.logo-img-white {
  filter: brightness(0) invert(1);
}

/* Login right panel logo */
.lf-logo {
  height: 38px;
  margin-bottom: 32px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 13px;
  color: #666;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.nav-link:hover { background: #f5f5f5; color: #0a0a0a; }

.nav-link--active {
  background: #0a0a0a;
  color: #fff;
  font-weight: 600;
}
.nav-link--active:hover { background: #222; color: #fff; }

.nav-divider {
  width: 1px;
  height: 16px;
  background: #ebebeb;
  margin: 0 6px;
}

.logout-btn {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  background: none;
  border: 1px solid #e4e4e4;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.logout-btn:hover {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
}

/* ============================================================
   PORTFOLIO HEADER (replaces dark hero + stats bar)
   ============================================================ */

.pf-header {
  padding: 24px 48px 0;
  animation: fadeUp 0.5s ease both;
}

.pf-hero-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 16px;
  padding: 32px 40px;
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 12px;
}

.pf-hero-left {
  flex: 1;
  min-width: 0;
}

.pf-fund-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #ccc;
  margin-bottom: 12px;
}

.pf-name {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #0a0a0a;
  line-height: 1.1;
  margin-bottom: 10px;
}

.pf-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #bbb;
  font-weight: 400;
}

.pf-sep { color: #e0e0e0; }

.pf-hero-divider {
  width: 1px;
  height: 64px;
  background: #ebebeb;
  flex-shrink: 0;
  margin: 0 48px;
}

.pf-hero-right {
  text-align: right;
  flex-shrink: 0;
}

.pf-ror-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #ccc;
  margin-bottom: 10px;
}

.pf-ror {
  font-size: 60px;
  font-weight: 900;
  letter-spacing: -3px;
  line-height: 1;
  color: #16a34a;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.pf-roi {
  font-size: 18px;
  font-weight: 400;
  color: #bbb;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.pf-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 0;
  animation: fadeUp 0.5s ease both;
  animation-delay: 0.07s;
}

.pf-stat-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 12px;
  padding: 20px 24px;
}

.pf-stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #bbb;
  margin-bottom: 10px;
}

.pf-stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #0a0a0a;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Keep old classes for tabular nums declaration at top (already there) */
.stat-item-value { font-size: 26px; font-weight: 800; letter-spacing: -0.8px; color: #0a0a0a; line-height: 1; }

/* ============================================================
   DASHBOARD — BODY WRAPPER
   ============================================================ */

.dash-body {
  padding: 20px 48px 64px;
  animation: fadeUp 0.5s ease both;
  animation-delay: 0.1s;
}

/* ============================================================
   BENCHMARK CARDS
   ============================================================ */

.bench-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.bench-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  padding: 32px 36px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 28px;
}

.bench-card-content {
  flex: 1;
  min-width: 0;
}

.bench-mini-chart {
  flex-shrink: 0;
  width: 340px;
  height: 132px;
  display: block;
}

.bench-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: #0a0a0a;
}

.bench-card-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 8px;
}

.bench-card-label {
  font-size: 14px;
  font-weight: 600;
  color: #0a0a0a;
  margin-bottom: 20px;
}

.bench-card-ahead {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  color: #0a0a0a;
  margin-bottom: 14px;
}

.bench-card-ahead.positive { color: #16a34a; }
.bench-card-ahead.negative { color: #dc2626; }

.bench-card-meta {
  font-size: 12px;
  color: #aaa;
  line-height: 1.7;
}

.bench-card-meta strong {
  color: #555;
  font-weight: 600;
}

/* ============================================================
   MONTHLY CONSISTENCY BRICK CHART
   ============================================================ */

.monthly-brick-wrap {
  display: flex;
  align-items: flex-end;
  width: 100%;
  margin-top: 16px;
}

.month-brick-col {
  flex: 1;             /* each column takes equal share of full width */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mini-brick-stack {
  position: relative;
  width: 88px;         /* matches left chart .brick-stack width */
  max-width: 100%;
  flex-shrink: 0;
}

/* individual mini brick — reuses brickDrop keyframe */
.mb {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 3px;
  opacity: 0;
  animation: brickDrop 0.42s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.month-brick-divider {
  width: 88px;         /* same width as the brick stack */
  max-width: 100%;
  height: 2px;
  background: #ebebeb;
  margin: 10px 0 8px;  /* matches left chart .brick-divider spacing */
  flex-shrink: 0;
}

/* $ / % value — fades in after bricks land, mirrors left-chart .brick-col-value */
.month-brick-value {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.3px;
  text-align: center;
  margin-top: 6px;
  transition: opacity 0.4s;
  white-space: nowrap;
}

/* Month label — mirrors left-chart .brick-col-label */
.month-brick-label {
  font-size: 8px;
  font-weight: 700;
  color: #bbb;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 3px;
  text-align: center;
  white-space: nowrap;
}

/* ============================================================
   INFLATION / CPI COMPARISON BRICK CHART
   ============================================================ */

.inflation-brick-wrap {
  display: flex;
  align-items: flex-end;
  width: 100%;
  margin-top: 16px;
}

.inf-year-group {
  flex: 1;             /* each year group takes equal share of full width */
  display: flex;
  flex-direction: column;
  align-items: center; /* brick pair + year label centered in their space */
}

.inf-pair-cols {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  justify-content: center;
}

.inf-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.inf-mini-stack {
  position: relative;
  width: 88px;         /* matches .brick-stack / .mini-brick-stack width */
}

/* individual inflation brick */
.ib {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 2px;
  opacity: 0;
  animation: brickDrop 0.42s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.inf-pair-divider {
  width: 88px;         /* same as inf-mini-stack width */
  height: 2px;
  background: #ebebeb;
  margin: 10px 0 8px;  /* matches left chart .brick-divider spacing */
}

.inf-col-val {
  font-size: 14px;     /* matches center chart .month-brick-value */
  font-weight: 800;
  letter-spacing: -0.3px;
  text-align: center;
  margin-top: 6px;
  opacity: 0;
  transition: opacity 0.4s;
  white-space: nowrap;
}

.inf-col-label {
  font-size: 9px;      /* matches center chart .month-brick-label size */
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 3px;
  text-align: center;
  white-space: nowrap;
}

.inf-year-label {
  font-size: 9px;
  font-weight: 700;
  color: #aaa;
  letter-spacing: 0.5px;
  text-align: center;
  margin-top: 6px;
}

/* ============================================================
   CHART CARD
   ============================================================ */

.chart-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 16px;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #0a0a0a;
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-group {
  display: flex;
  background: #f2f2f2;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.toggle-btn {
  padding: 6px 18px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: #999;
  transition: all 0.15s;
}

.toggle-btn.active {
  background: #fff;
  color: #0a0a0a;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.chart-amount-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.amount-label {
  font-size: 12px;
  color: #aaa;
  font-weight: 500;
}

.amount-input {
  width: 140px;
  padding: 7px 12px;
  border: 1px solid #e8e8e8;
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #fafafa;
  color: #0a0a0a;
  transition: border-color 0.15s, background 0.15s;
}

.amount-input:focus {
  border-color: #0a0a0a;
  background: #fff;
}

.update-btn {
  background: #0a0a0a;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.update-btn:hover { background: #333; }

.chart-wrapper {
  height: 380px;
  border-radius: 8px;
  overflow: hidden;
}

#performanceChart { width: 100%; height: 100%; }

/* ============================================================
   MONTHLY RETURNS CHART
   ============================================================ */

.chart-subtitle {
  font-size: 11px;
  color: #bbb;
  font-weight: 400;
  margin-top: 4px;
  letter-spacing: 0;
  text-transform: none;
}

.monthly-chart-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

.monthly-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.monthly-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}

.mcl-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #888;
}

.mcl-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}

.monthly-chart-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.monthly-chart-wrapper svg {
  display: block;
}

/* Year filter pills — reuses ledger pill style */
.returns-year-filter {
  display: flex;
  gap: 6px;
  margin: -18px 0 12px;
  flex-wrap: wrap;
}

.returns-year-filter:empty {
  margin: 0;
}

/* ============================================================
   LEDGER CARD
   ============================================================ */

/* ── Ledger + Sidebar two-column layout ──────────────────────── */
.ledger-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.ledger-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Side cards ──────────────────────────────────────────────── */
.side-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  padding: 24px 28px;
}
.side-card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #bbb;
  margin-bottom: 18px;
}

.summary-rows { display: flex; flex-direction: column; }

.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #f4f4f4;
}
.summary-row:last-child { border-bottom: none; }

.summary-row-total {
  margin-top: 4px;
  padding-top: 13px !important;
  border-top: 1.5px solid #ebebeb !important;
  border-bottom: 1px solid #f4f4f4 !important;
}
.summary-row-total .summary-label { font-weight: 700 !important; color: #0a0a0a !important; }
.summary-row-total .summary-value { font-size: 15px !important; font-weight: 800 !important; color: #0a0a0a !important; }

/* Sub-rows below the total line — informational, muted */
.summary-row-sub { padding: 7px 0 !important; }
.summary-row-sub .summary-label { font-size: 11px !important; color: #bbb !important; }
.summary-row-sub .summary-value { font-size: 11px !important; font-weight: 500 !important; color: #bbb !important; }
.summary-row-sub:last-child { border-bottom: none; }

.summary-label {
  font-size: 12px;
  font-weight: 500;
  color: #999;
  white-space: nowrap;
}
.summary-value {
  font-size: 13px;
  font-weight: 700;
  color: #0a0a0a;
  text-align: right;
}
.summary-link { color: #0a0a0a; text-decoration: none; font-size: 12px; }
.summary-link:hover { text-decoration: underline; }

/* ── Distributions mini-table ────────────────────────────────── */
.dist-table { width: 100%; border-collapse: collapse; margin-bottom: 4px; }
.dist-table td {
  padding: 8px 0;
  font-size: 12px;
  color: #555;
  border-bottom: 1px solid #f4f4f4;
  vertical-align: middle;
}
.dist-table tbody tr:last-child td { border-bottom: none; }
.dist-date { color: #999; white-space: nowrap; padding-right: 12px !important; }
.dist-amt  { text-align: right !important; font-weight: 700; color: #6b7280; white-space: nowrap; }

.dist-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0 0;
  margin-top: 4px;
  border-top: 1.5px solid #ebebeb;
}
.dist-total-row .summary-label { font-weight: 700; color: #0a0a0a; }
.dist-total-row .summary-value { font-size: 14px; font-weight: 800; color: #6b7280; }

@media (max-width: 900px) {
  .ledger-section { grid-template-columns: 1fr; }
}

/* ── Ledger card ─────────────────────────────────────────────── */
.ledger-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  padding: 28px 32px;
}

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

/* Year filter pills */
.ledger-filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ledger-filter-btn {
  padding: 5px 14px;
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  color: #aaa;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.ledger-filter-btn:hover {
  border-color: #ccc;
  color: #555;
}

.ledger-filter-btn.active {
  background: #0a0a0a;
  border-color: #0a0a0a;
  color: #fff;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
}

.ledger-table th {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #bbb;
  padding: 0 20px 14px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.ledger-table th:last-child { text-align: right; }

.ledger-table td {
  padding: 14px 20px;
  font-size: 13px;
  color: #555;
  border-bottom: 1px solid #f8f8f8;
  vertical-align: middle;
}

.ledger-table tbody tr:last-child td { border-bottom: none; }
.ledger-table tbody tr { transition: background 0.1s; }
.ledger-table tbody tr:hover { background: #fafafa; }

/* Date column */
.ledger-date {
  color: #999;
  font-size: 12px;
  white-space: nowrap;
  width: 110px;
}

/* Description column */
.ledger-desc {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ledger-reason {
  font-size: 13px;
  font-weight: 500;
  color: #0a0a0a;
}

/* Method column */
.ledger-method {
  font-size: 12px;
  color: #aaa;
}

/* Amount column */
.ledger-amount {
  text-align: right !important;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

/* Type badge tags */
.ledger-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tag-dividend     { background: #eff6ff; color: #2563eb; }
.tag-gains        { background: #f0fdf4; color: #16a34a; }
.tag-fee          { background: #fafafa; color: #888; }
.tag-withdrawal   { background: #fff7ed; color: #ea580c; }
.tag-contribution { background: #0a0a0a; color: #fff; }
.tag-default      { background: #f4f4f4; color: #888; }

.amount-positive  { color: #16a34a !important; }
.amount-negative  { color: #6b7280 !important; }
.amount-zero      { color: #ccc !important; }

/* ============================================================
   UTILITIES
   ============================================================ */

.loading {
  text-align: center;
  padding: 40px;
  color: #ccc;
  font-size: 13px;
}

/* hidden but in DOM for JS targets */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .bench-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .dash-body { padding: 24px 24px 48px; }
  .site-header { padding: 0 24px; }
  .pf-header { padding: 16px 24px 0; }
  .pf-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-hero-divider { display: none; }
  .pf-hero-card { flex-direction: column; align-items: flex-start; gap: 20px; }
  .pf-hero-right { text-align: left; }
  .pf-ror { font-size: 44px; }
}

@media (max-width: 768px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-right { padding: 48px 32px; }
}

@media (max-width: 600px) {
  .pf-stats-grid { grid-template-columns: 1fr; }
  .chart-card-header { flex-direction: column; align-items: flex-start; }
  .chart-controls { flex-wrap: wrap; }
  .bench-card-ahead { font-size: 36px; }
  .bench-mini-chart { display: none; }
  .brick-charts-row { flex-direction: column; }
  .brick-charts-divider { width: 100%; height: 1px; margin: 24px 0; }
}

/* ── User chip ───────────────────────────────────────────────── */
.user-chip {
  display: flex; align-items: center; gap: 8px;
  position: relative;
  cursor: pointer;
  padding: 4px 8px 4px 4px;
  border-radius: 8px;
  transition: background 0.15s;
  user-select: none;
}
.user-chip:hover { background: #f4f4f4; }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #0a0a0a; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.3px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name {
  font-size: 13px; font-weight: 600; color: #0a0a0a;
}
.user-chip-caret {
  color: #999;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.user-chip.open .user-chip-caret { transform: rotate(180deg); }

/* ── User dropdown ───────────────────────────────────────────── */
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  padding: 6px;
  min-width: 140px;
  z-index: 1000;
}
.user-chip.open .user-dropdown { display: block; }
.user-dropdown-item {
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  background: none;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: background 0.12s;
  font-family: inherit;
}
.user-dropdown-item:hover { background: #f4f4f4; color: #0a0a0a; }

/* ============================================================
   MONEY BRICK COMPARISON
   ============================================================ */

.brick-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  padding: 32px 36px 28px;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.brick-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: #0a0a0a;
}
.brick-card-tag {
  font-size: 9px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: #aaa; margin-bottom: 8px;
}
.brick-card-label {
  font-size: 14px; font-weight: 600; color: #0a0a0a; margin-bottom: 32px;
}

/* Columns */
.brick-cols {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 48px;
}
.brick-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* The fixed-height area where bricks stack */
.brick-stack {
  position: relative;
  width: 88px;
  height: 354px; /* 20 bricks × (14px + 3px gap) + a few px extra */
}

/* Individual brick */
.b {
  position: absolute;
  width: 100%;
  height: 14px;
  border-radius: 3px;
  opacity: 0;
  animation: brickDrop 0.42s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes brickDrop {
  0%   { transform: translateY(-340px); opacity: 0; }
  55%  { opacity: 1; }
  78%  { transform: translateY(5px); }
  90%  { transform: translateY(-2px); }
  100% { transform: translateY(0); opacity: 1; }
}

/* Divider line between stack and value */
.brick-divider {
  width: 100%;
  height: 2px;
  background: #ebebeb;
  border-radius: 1px;
  margin: 10px 0 10px;
}

/* Dollar value under each column */
.brick-col-value {
  font-size: 14px;
  font-weight: 800;
  color: #0a0a0a;
  font-variant-numeric: tabular-nums;
  text-align: center;
  margin-bottom: 5px;
  min-height: 20px;
  transition: opacity 0.4s;
}
.jax-brick-value { color: #d97706; }

/* Column label */
.brick-col-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #aaa;
  text-align: center;
}

/* Footnote */
.brick-footnote {
  font-size: 11px;
  color: #bbb;
  text-align: center;
  margin-top: 24px;
}

/* ── Brick card 3-column layout ── */
.brick-three-col-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.brick-three-col {
  flex: 1;
  min-width: 0;
}

/* Center the brick stacks within their column */
.brick-three-col .brick-cols {
  gap: 48px;
  justify-content: center;
}

.brick-col-sep {
  width: 1px;
  align-self: stretch;
  background: #f0f0f0;
  flex-shrink: 0;
  margin: 0 32px;
}

.brick-section-label {
  font-size: 14px;
  font-weight: 600;
  color: #0a0a0a;
  margin-bottom: 16px;
}

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

/* Responsive */
@media (max-width: 600px) {
  .brick-cols { gap: 24px; }
  .brick-stack { width: 70px; height: 354px; }
  .brick-col-value { font-size: 11px; }
  .brick-three-col-row { flex-direction: column; gap: 32px; }
  .brick-col-sep { width: 100%; height: 1px; margin: 0; align-self: auto; }
}

/* ═══════════════════════════════════════════════════════════════
   DARK THEME OVERRIDES
   Toggle: document.documentElement.setAttribute('data-theme','dark')
════════════════════════════════════════════════════════════════ */

[data-theme="dark"] body {
  background: #0d0d0d;
  color: #f2f2f2;
}

/* ── Logo — invert black logo to white on dark bg ── */
[data-theme="dark"] .logo-img:not(.logo-img-white) {
  filter: invert(1);
}

/* ── Login page — right panel only (left panel is already dark) ── */
[data-theme="dark"] .login-right { background: #0d0d0d; }
[data-theme="dark"] .lf-title    { color: #f2f2f2; }
[data-theme="dark"] .lf-sub      { color: #555; }
[data-theme="dark"] .lf-footer   { color: #333; }
[data-theme="dark"] .form-group label { color: #888; }
[data-theme="dark"] .form-group input {
  border-bottom-color: #2e2e2e;
  color: #f2f2f2;
  background: transparent;
}
[data-theme="dark"] .form-group input:focus { border-bottom-color: #f2f2f2; }
[data-theme="dark"] .form-group input::placeholder { color: #444; }
[data-theme="dark"] .login-btn {
  background: #f2f2f2;
  color: #0a0a0a;
}
[data-theme="dark"] .login-btn:hover    { background: #d9d9d9; }
[data-theme="dark"] .login-btn:disabled { background: #333; color: #666; }
[data-theme="dark"] .login-error {
  background: rgba(220,38,38,0.12);
}

/* ── Header ── */
[data-theme="dark"] body.scrolled .site-header {
  background: rgba(13,13,13,0.95);
}
[data-theme="dark"] .nav-link            { color: #666; }
[data-theme="dark"] .nav-link:hover      { background: #1a1a1a; color: #f2f2f2; }
[data-theme="dark"] .nav-link--active    { background: #f2f2f2; color: #0a0a0a; }
[data-theme="dark"] .nav-link--active:hover { background: #d9d9d9; color: #0a0a0a; }
[data-theme="dark"] .nav-divider         { background: #2a2a2a; }
[data-theme="dark"] .logout-btn          { color: #777; border-color: #2e2e2e; }
[data-theme="dark"] .logout-btn:hover    { background: #f2f2f2; color: #0a0a0a; border-color: #f2f2f2; }

/* ── User chip ── */
[data-theme="dark"] .user-chip:hover     { background: #1a1a1a; }
[data-theme="dark"] .user-name           { color: #f2f2f2; }
[data-theme="dark"] .user-dropdown       { background: #1e1e1e; border-color: #2e2e2e; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
[data-theme="dark"] .user-dropdown-item  { color: #a0a0a0; }
[data-theme="dark"] .user-dropdown-item:hover { background: #2a2a2a; color: #f2f2f2; }

/* ── Portfolio header ── */
[data-theme="dark"] .pf-hero-card    { background: #161616; border-color: #262626; }
[data-theme="dark"] .pf-name         { color: #f2f2f2; }
[data-theme="dark"] .pf-hero-divider { background: #262626; }
[data-theme="dark"] .pf-stat-card    { background: #161616; border-color: #262626; }
[data-theme="dark"] .pf-stat-value   { color: #f2f2f2; }
[data-theme="dark"] .stat-item-value { color: #f2f2f2; }

/* ── Benchmark cards ── */
[data-theme="dark"] .bench-card           { background: #161616; border-color: #262626; }
[data-theme="dark"] .bench-card::before   { background: #f2f2f2; }
[data-theme="dark"] .bench-card-label     { color: #f2f2f2; }
[data-theme="dark"] .bench-card-ahead              { color: #f2f2f2; }
[data-theme="dark"] .bench-card-ahead.positive     { color: #16a34a; }
[data-theme="dark"] .bench-card-ahead.negative     { color: #dc2626; }
[data-theme="dark"] .bench-card-meta strong { color: #a0a0a0; }

/* ── Chart card ── */
[data-theme="dark"] .chart-card       { background: #161616; border-color: #262626; }
[data-theme="dark"] .section-title    { color: #f2f2f2; }
[data-theme="dark"] .chart-subtitle   { color: #555; }
[data-theme="dark"] .toggle-group     { background: #1a1a1a; }
[data-theme="dark"] .toggle-btn       { color: #666; }
[data-theme="dark"] .toggle-btn.active {
  background: #262626;
  color: #f2f2f2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
[data-theme="dark"] .amount-input {
  background: #1a1a1a;
  border-color: #2e2e2e;
  color: #f2f2f2;
}
[data-theme="dark"] .amount-input:focus {
  border-color: #f2f2f2;
  background: #1e1e1e;
}
[data-theme="dark"] .update-btn       { background: #f2f2f2; color: #0a0a0a; }
[data-theme="dark"] .update-btn:hover { background: #d9d9d9; }

/* ── Brick card ── */
[data-theme="dark"] .brick-card         { background: #161616; border-color: #262626; }
[data-theme="dark"] .brick-card::before { background: #f2f2f2; }
[data-theme="dark"] .brick-card-label   { color: #f2f2f2; }
[data-theme="dark"] .brick-section-label { color: #f2f2f2; }
[data-theme="dark"] .brick-col-value    { color: #f2f2f2; }
[data-theme="dark"] .brick-divider      { background: #2a2a2a; }
[data-theme="dark"] .month-brick-divider { background: #2a2a2a; }
[data-theme="dark"] .inf-pair-divider   { background: #2a2a2a; }
[data-theme="dark"] .brick-col-sep      { background: #2a2a2a; }

/* ── Ledger card ── */
[data-theme="dark"] .ledger-card              { background: #161616; border-color: #262626; }
[data-theme="dark"] .ledger-filter-btn        { border-color: #2e2e2e; color: #555; }
[data-theme="dark"] .ledger-filter-btn:hover  { border-color: #444; color: #a0a0a0; }
[data-theme="dark"] .ledger-filter-btn.active { background: #f2f2f2; border-color: #f2f2f2; color: #0a0a0a; }
[data-theme="dark"] .ledger-table th          { border-bottom-color: #2a2a2a; }
[data-theme="dark"] .ledger-table td          { color: #a0a0a0; border-bottom-color: #1e1e1e; }
[data-theme="dark"] .ledger-table tbody tr:hover { background: #1e1e1e; }
[data-theme="dark"] .ledger-reason            { color: #f2f2f2; }

/* ── Ledger tags ── */
[data-theme="dark"] .tag-dividend   { background: rgba(37,99,235,0.15); }
[data-theme="dark"] .tag-gains      { background: rgba(22,163,74,0.15); }
[data-theme="dark"] .tag-fee        { background: #1a1a1a; }
[data-theme="dark"] .tag-withdrawal { background: rgba(234,88,12,0.15); }
[data-theme="dark"] .tag-default    { background: #1e1e1e; }

/* ── Side cards ── */
[data-theme="dark"] .side-card                 { background: #161616; border-color: #262626; }
[data-theme="dark"] .summary-row               { border-bottom-color: #2a2a2a; }
[data-theme="dark"] .summary-value             { color: #f2f2f2; }
[data-theme="dark"] .summary-link              { color: #f2f2f2; }
[data-theme="dark"] .summary-row-total         { border-top-color: #2e2e2e !important; border-bottom-color: #2a2a2a !important; }
[data-theme="dark"] .summary-row-total .summary-label { color: #f2f2f2 !important; }
[data-theme="dark"] .summary-row-total .summary-value { color: #f2f2f2 !important; }
[data-theme="dark"] .dist-table td             { color: #a0a0a0; border-bottom-color: #1e1e1e; }
[data-theme="dark"] .dist-total-row            { border-top-color: #2e2e2e; }
[data-theme="dark"] .dist-total-row .summary-label { color: #f2f2f2; }

/* ── Support page (support.html inline styles) ── */
[data-theme="dark"] .sp-wrap           { background: #0d0d0d; }
[data-theme="dark"] .sp-title          { color: #f2f2f2; }
[data-theme="dark"] .sp-table-wrap     { background: #161616; border-color: #262626; }
[data-theme="dark"] .sp-table-hdr      { background: #1a1a1a; border-bottom-color: #262626; }
[data-theme="dark"] .sp-th             { color: #555; }
[data-theme="dark"] .sp-td             { color: #a0a0a0; border-bottom-color: #1e1e1e; }
[data-theme="dark"] .sp-tr:hover       { background: #1e1e1e; }
[data-theme="dark"] .sp-subject        { color: #f2f2f2; }
[data-theme="dark"] .sp-view-btn       { background: #1e1e1e; color: #f2f2f2; border-color: #2e2e2e; }
[data-theme="dark"] .sp-view-btn:hover { background: #262626; }
[data-theme="dark"] .btn-new-ticket    { background: #f2f2f2; color: #0a0a0a; }
[data-theme="dark"] .btn-new-ticket:hover { background: #d9d9d9; }

/* Thread view */
[data-theme="dark"] .thread-header-card   { background: #161616; border-color: #262626; }
[data-theme="dark"] .thread-subject       { color: #f2f2f2; }
[data-theme="dark"] .thread-meta          { color: #888; }
[data-theme="dark"] .thread-messages-wrap { background: #161616; border-color: #262626; }
[data-theme="dark"] .msg-wrap.from-admin .msg-text { background: #1e1e1e; color: #f2f2f2; }
[data-theme="dark"] .msg-name             { color: #888; }
[data-theme="dark"] .msg-time             { color: #555; }
[data-theme="dark"] .reply-wrap           { background: #161616; border-color: #262626; }
[data-theme="dark"] .reply-ta {
  background: #1a1a1a;
  border-color: #2e2e2e;
  color: #f2f2f2;
}
[data-theme="dark"] .reply-ta:focus        { border-color: #f2f2f2; }
[data-theme="dark"] .reply-ta::placeholder { color: #444; }
[data-theme="dark"] .btn-send              { background: #f2f2f2; color: #0a0a0a; }
[data-theme="dark"] .btn-send:hover        { background: #d9d9d9; }
[data-theme="dark"] .btn-resolve           { background: rgba(22,163,74,0.15); }
[data-theme="dark"] .thread-back:hover     { color: #f2f2f2; }

/* Support modal */
[data-theme="dark"] .modal-box       { background: #161616; }
[data-theme="dark"] .modal-heading   { color: #f2f2f2; }
[data-theme="dark"] .modal-close-btn { color: #555; background: #262626; }
[data-theme="dark"] .modal-close-btn:hover { color: #f2f2f2; background: #2e2e2e; }
[data-theme="dark"] .mf-label        { color: #888; }
[data-theme="dark"] .mf-input,
[data-theme="dark"] .mf-ta {
  background: #1a1a1a;
  border-color: #2e2e2e;
  color: #f2f2f2;
}
[data-theme="dark"] .mf-input:focus,
[data-theme="dark"] .mf-ta:focus { border-color: #f2f2f2; }
[data-theme="dark"] .btn-cancel      { background: #1e1e1e; color: #a0a0a0; border-color: #2e2e2e; }
[data-theme="dark"] .btn-cancel:hover { background: #262626; }
[data-theme="dark"] .btn-submit-ticket      { background: #f2f2f2; color: #0a0a0a; }
[data-theme="dark"] .btn-submit-ticket:hover { background: #d9d9d9; }

