:root{
  --bs-body-font-size: .86rem;
  --line: #232a36;
  --muted: #aeb6c3;

  /* Dark theme tokens */
  --page-bg: #0f1115;
  --table-bg: #0f1115;
  --table-stripe: #141820;
  --table-hover: #181d26;
}

/* dark background */
.bg-body{
  background-color: var(--page-bg);
}

/* fixed header padding fallback */
body{
  padding-top:64px;
}

/* Compact table base spacing (Bootstrap still uses .table-sm but we keep this consistent) */
.table-sm>:not(caption)>*>*{
  padding:.10rem .25rem;
}

/* Keep digits aligned, unclipped + compact text */
.table td,
.table th{
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
  vertical-align:middle;
  font-variant-numeric:tabular-nums;

  font-size:0.72rem !important;
  padding:0.15rem 0.35rem !important;
  line-height:1.1 !important;
}

/* Dark table palette (applies to EVERY .table-dark in the app) */
.table-dark{
  --bs-table-color: #f9fafb;
  --bs-table-bg: var(--table-bg);
  --bs-table-border-color: var(--line);
  --bs-table-striped-bg: var(--table-stripe);
  --bs-table-striped-color: #f9fafb;
  --bs-table-hover-bg: var(--table-hover);
  --bs-table-hover-color: #f9fafb;
}

/* Accounting numbers */
.accounting{
  text-align:right;
  font-size:.83rem;
}

/* Red negatives */
.neg{
  color:#ff3b3b !important;
  font-weight:600;
}

/* Keep negatives vivid inside dark tables */
.table-dark td.accounting .neg{
  color:#ff5e57 !important;
}

/* Sorting caret */
th.sort-asc::after{
  content:" ▲";
  font-size:.75rem;
  opacity:.7;
}
th.sort-desc::after{
  content:" ▼";
  font-size:.75rem;
  opacity:.7;
}

/* Center numeric headers */
th.th-num{
  text-align:center;
}

/* Totals row */
.total-row td{
  font-weight:700;
  border-top:2px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.03);
}

/* Summary cards */
.summary-cards{
  display:flex;
  gap:.6rem;
  flex-wrap:wrap;
  margin:.35rem 0 .65rem 0;
}
.summary-card{
  flex:1 1 320px;
  background:#131a24;
  border:1px solid var(--line);
  border-radius:8px;
  padding:.5rem .7rem;
}
.summary-card .label{
  color:var(--muted);
  margin-right:.35rem;
}
.summary-card .value{
  font-weight:700;
}
.summary-card .value.neg{
  color:#ff3b3b;
}

/* top horizontal scroll bar */
.hscroll-top{
  height:14px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  border-bottom:1px solid var(--line) !important;
  margin:0 !important;
}
.hscroll-inner{
  height:1px !important;
  width:max-content !important;
}

/* card footer */
.card-footer{
  padding-top:.35rem;
  padding-bottom:.35rem;
}

.text-muted-soft{
  color: var(--muted);
}

/* ============================================================
   NO CATEGORY COLORING — col-annuity / col-life / col-totalall
   (classes are now harmless if they ever appear)
   ============================================================ */

.table th.col-annuity,
.table th.col-life,
.table th.col-totalall,
.table td.col-annuity,
.table td.col-life,
.table td.col-totalall{
  background:transparent !important;
  color:inherit !important;
}

/* ============================================================
   NO HEATMAP COLORS — heat-positive / heat-negative / heat-neutral
   (we also stop generating these classes in JS)
   ============================================================ */

.table td.heat-positive,
.table td.heat-negative,
.table td.heat-neutral{
  background:transparent !important;
  color:inherit !important;
}

/* Leaderboard title tint fix */
.leaderboard-header{
  color:#fff !important;
}

/* Navbar – Salesforce-ish (this is outside of tables) */
.pca-nav{
  background: linear-gradient(90deg, #0176d3, #0c4ea3);
  box-shadow: 0 3px 6px rgba(0,0,0,.25);
}
.pca-nav .navbar-brand .brand-title{
  font-size:1.35rem;
  font-weight:700;
  color:#fff;
}
.pca-nav .nav-link{
  color:#e8f2ff;
  font-weight:500;
  padding:.55rem 1rem;
  transition:all .18s ease;
  font-size:.95rem;
}
.pca-nav .nav-link:hover{
  color:#fff;
  background:rgba(255,255,255,.15);
  border-radius:6px;
}
.pca-nav .nav-link.active{
  color:#fff !important;
  background:rgba(255,255,255,.25);
  border-radius:6px;
}

/* Footer */
.pca-footer{
  background:#f8f9fb;
  border-color:#d0d7e2 !important;
  color:#555;
  font-size:.82rem;
}

/* Larger Prosperity Header Logo */
.pca-nav .navbar-brand .brand-logo{
  height:70px;
  width:auto;
  object-fit:contain;
  margin-right:12px;
  border-radius:6px;
}
.pca-nav{
  min-height:85px;
  display:flex;
  align-items:center;
}

/* Small inline action buttons used in Library lists */
.lib-actions{
  display:inline-flex;
  gap:.4rem;
  align-items:center;
}
.lib-actions .btn{
  --bs-btn-padding-y: .25rem;
  --bs-btn-padding-x: .5rem;
  --bs-btn-font-size: .75rem;
}

/* ============================================================
   STICKY FIRST / SECOND COLUMNS
   (no background override → striping stays consistent)
   ============================================================ */

.table td:first-child,
.table th:first-child{
  position:sticky;
  left:0;
  z-index:5;
  box-shadow:2px 0 4px rgba(0,0,0,0.35);
}

/* Sticky OFFICE column on Advisors page */
body[data-page="advisors"] .table td:nth-child(2),
body[data-page="advisors"] .table th:nth-child(2){
  position:sticky;
  left:130px;
  z-index:4;
  box-shadow:2px 0 4px rgba(0,0,0,0.25);
}

/* (Nothing else here – all table colors come only from the dark palette above
   and from red .neg text.) */


.table td,
.table th {
  font-size:0.72rem !important;
  padding:0.15rem 0.35rem !important;
  line-height:1.1 !important;
}
