/* ==========================================================================
   DMG Console — Design Tokens (Phase 2)
   The single source of truth. No magic numbers past this file.
   Brand: Modernist × DIO — navy/steel structure, silver accent, orange signal,
   Proxima Nova, radius 0, top rails. Green retired from the palette.
   ========================================================================== */
:root {
  /* ---- Spacing: 4/8pt scale (6 steps). Every gap/pad/margin uses these. ---- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;  --sp-4: 16px;  --sp-6: 24px;  --sp-8: 32px;

  /* ---- Radius: brand is square. One optional soft step for pills only. ---- */
  --radius-0: 0;  --radius-pill: 999px;

  /* ---- Type scale (8 roles). Financial figures MUST use --nums. ---- */
  --font: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-cond: 'Proxima Nova Cond', 'Proxima Nova', sans-serif;
  --nums: 'Proxima Nova', ui-monospace, monospace;      /* used with tabular-nums */
  --fs-page: 26px;    --lh-page: 1.15;   /* page title */
  --fs-section: 13px; --lh-section: 1.3; /* eyebrow/section label (cond caps) */
  --fs-card: 16px;    --lh-card: 1.25;   /* card title */
  --fs-metric: 30px;  --lh-metric: 1.05; /* big KPI number */
  --fs-metric-sm: 20px;                  /* secondary KPI number */
  --fs-label: 11.5px; --lh-label: 1.4;   /* uppercase micro-label */
  --fs-body: 14px;    --lh-body: 1.55;   /* body copy */
  --fs-table: 13px;   --lh-table: 1.4;   /* table cell */
  --fs-caption: 12px; --lh-caption: 1.45;/* caption / footnote */
  --track-label: .09em;                  /* letter-spacing for uppercase labels */

  /* ---- Neutrals (warm-cool balanced, biased toward navy) ---- */
  --bg:        #F3F4F4;   /* app ground */
  --surface:   #FFFFFF;   /* card */
  --inset:     #ECEEEF;   /* sunken / zebra */
  --line:      #DCE1E5;   /* hairline */
  --line-strong:#C3CBD1;  /* stronger divider */
  --rail:      #2F4452;   /* nav rail (navy) */
  --ink:       #22333D;   /* primary text */
  --ink-2:     #51646F;   /* secondary text */
  --ink-3:     #84929C;   /* muted text */
  --on-rail:   #E7ECEF;   /* text on navy */

  /* ---- Brand ---- */
  --navy:  #2F4452;  --steel: #4C7288;  --blue:  #256C9A;
  --silver:#D1D3D3;  --orange:#ED873C;  /* orange = signal/interactive ONLY */

  /* ---- Semantic (meaning never carried by hue alone; pair with sign/shape) ---- */
  --pos:      #2E7D4F;  --pos-bg: #EAF3EC;   /* positive / good */
  --neg:      #B3402F;  --neg-bg: #FBEEEB;   /* negative / critical */
  --warn:     #B7841E;  --warn-bg:#F7F0DE;   /* warning / attention */
  --info:     #256C9A;  --info-bg:#E7EFF5;   /* info */
  --muted:    var(--ink-3);

  /* ---- ENTITY COLORS — GLOBAL & PERMANENT (CVD-verified, worst pairwise 30) ---
     Same color for each entity on every chart on every tab, forever. ---- */
  --ent-management: #2F4452;   /* DIO Management — navy */
  --ent-doctors:    #4C7288;   /* Doctors / Boca Perio — steel */
  --ent-dental:     #3F7A6B;   /* Dental / Mizner — muted teal */
  --ent-tampa:      #B5883E;   /* Tampa — muted ochre */
  --ent-jax:        #9BA6AE;   /* Jax — light slate */
  --ent-group:      #22333D;   /* Group total — ink */

  /* ---- Chart config (every SVG chart inherits these) ---- */
  --chart-grid:   #E4E8EB;   /* faint horizontal gridline */
  --chart-axis:   #B9C2C8;   /* axis / baseline */
  --chart-label:  var(--ink-2);
  --chart-flag-hatch: #B7841E;  /* provisional/marked treatment */
  --motion: 180ms;
  --ease: cubic-bezier(.4, 0, .2, 1);

  /* ---- Elevation (used sparingly; brand prefers rails over shadows) ---- */
  --shadow-card: 0 1px 2px rgba(34,51,61,.05);
  --shadow-pop:  0 8px 28px rgba(34,51,61,.18);
  --focus: 0 0 0 2px #fff, 0 0 0 4px var(--orange);
}

/* ==========================================================================
   Primitives — one definition each, used everywhere.
   ========================================================================== */

/* ---- Card ---- */
.ds-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius-0);
  padding: var(--sp-6);
  margin-bottom: var(--sp-4);
}
.ds-card__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-4);
}
.ds-card__toolbar { display: flex; gap: var(--sp-2); align-items: center; }
.ds-card__foot {
  margin-top: var(--sp-4); padding-top: var(--sp-2);
  border-top: 1px solid var(--line);
  font-size: var(--fs-caption); color: var(--ink-3);
}
.ds-eyebrow {
  font-family: var(--font-cond); font-size: var(--fs-section); font-weight: 600;
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--steel);
}
.ds-card-title { font-family: var(--font-cond); font-size: var(--fs-card); font-weight: 600; color: var(--navy); }

/* ---- KPI tile ---- */
.ds-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-3); }
.ds-kpi {
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--navy);
  padding: var(--sp-3) var(--sp-4);
}
.ds-kpi__label { font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3); }
.ds-kpi__value { font-size: var(--fs-metric); line-height: var(--lh-metric); color: var(--navy);
  font-variant-numeric: tabular-nums; margin-top: var(--sp-1); }
.ds-kpi__sub { font-size: var(--fs-caption); color: var(--ink-3); margin-top: var(--sp-1); }
.ds-kpi--pos { border-top-color: var(--pos); } .ds-kpi--pos .ds-kpi__value { color: var(--pos); }
.ds-kpi--neg { border-top-color: var(--neg); } .ds-kpi--neg .ds-kpi__value { color: var(--neg); }

/* ---- Table (ONE table style) ---- */
.ds-table { width: 100%; border-collapse: collapse; font-size: var(--fs-table); }
.ds-table th {
  text-align: left; font-family: var(--font-cond); font-size: var(--fs-label);
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--steel);
  font-weight: 600; padding: var(--sp-2) var(--sp-3); border-bottom: 2px solid var(--navy);
}
.ds-table td { padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line);
  color: var(--ink-2); vertical-align: top; }
.ds-table td:first-child { color: var(--ink); }
.ds-table tbody tr:hover td, .ds-table tr:hover td { background: var(--inset); }
.ds-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-neg { color: var(--neg); }
.ds-pos { color: var(--pos); }
.ds-scroll { overflow-x: auto; }

/* ---- Chips (ONE chip system) ---- */
.ds-chip {
  display: inline-block; font-family: var(--font); font-size: var(--fs-label);
  font-weight: 700; letter-spacing: .04em; padding: 2px var(--sp-2);
  border: 1px solid var(--line-strong); color: var(--ink-2); background: transparent;
  border-radius: var(--radius-0);
}
.ds-chip--pos  { color: var(--pos);  border-color: color-mix(in srgb, var(--pos) 45%, transparent); }
.ds-chip--neg  { color: var(--neg);  border-color: color-mix(in srgb, var(--neg) 45%, transparent); }
.ds-chip--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.ds-chip--info { color: var(--info); border-color: color-mix(in srgb, var(--info) 45%, transparent); }
.ds-chip--on   { color: #fff; background: var(--navy); border-color: var(--navy); }

/* ---- Filter/toolbar bar (ONE pattern) ---- */
.ds-filterbar {
  display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap;
  padding: var(--sp-2) 0; margin-bottom: var(--sp-3);
}
.ds-filterbar__group { display: flex; gap: var(--sp-1); align-items: center; }
.ds-fchip {
  font-family: var(--font); font-size: var(--fs-caption); font-weight: 600;
  letter-spacing: .04em; padding: var(--sp-1) var(--sp-3); cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
}
.ds-fchip:hover { border-color: var(--steel); color: var(--navy); }
.ds-fchip.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---- Utilization / inline mini-bar (for ratios in tables) ---- */
.ds-bar { position: relative; height: 8px; background: var(--inset); min-width: 60px; }
.ds-bar__fill { position: absolute; inset: 0 auto 0 0; background: var(--steel); }
.ds-bar--warn .ds-bar__fill { background: var(--warn); }
.ds-bar--neg  .ds-bar__fill { background: var(--neg); }

/* ---- Flag treatment (provisional / marked) — hatch, never hue alone ---- */
.ds-flag-hatch {
  background-image: repeating-linear-gradient(45deg,
    transparent, transparent 4px,
    color-mix(in srgb, var(--warn) 22%, transparent) 4px,
    color-mix(in srgb, var(--warn) 22%, transparent) 8px);
}
.ds-flag-dot::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: var(--sp-1);
  background: var(--warn); vertical-align: 1px;
}

/* ---- States: skeleton / empty / error ---- */
.ds-skel {
  background: linear-gradient(90deg, var(--inset) 25%, #F5F6F7 37%, var(--inset) 63%);
  background-size: 400% 100%; animation: ds-shimmer 1.4s ease infinite; height: 1em; border-radius: var(--radius-0);
}
@keyframes ds-shimmer { 0% { background-position: 100% 0 } 100% { background-position: 0 0 } }
.ds-empty, .ds-error {
  padding: var(--sp-8) var(--sp-4); text-align: center; color: var(--ink-3);
  font-size: var(--fs-body); border: 1px dashed var(--line-strong);
}
.ds-error { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 40%, transparent); }
.ds-zero { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---- Accessibility + motion ---- */
:where(a, button, input, [tabindex]):focus-visible { outline: none; box-shadow: var(--focus); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---- Print (P&L / cash to a bank meeting) ---- */
@media print {
  .rail, .topbar, .ds-filterbar, .no-print, button { display: none !important; }
  .ds-card { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; }
  body { background: #fff; font-size: 11px; }
  .ds-table th { color: #000; }
}

/* ==== 2026-08-30 cohesion pass — shell, page head, cascade fixes ====
   Loaded LAST so these tokens and rules win over app.css / the modernist layer. */
:root { --muted-text: var(--ink-3); }                 /* reva.html used an undefined var */
body { font-size: var(--fs-body) !important; }         /* 14, not modernist's 15 — tables/captions are calibrated to 14 */
.rail__group {
  font-family: var(--font-cond); font-size: 10.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.45); padding: 14px 18px 4px;
}
#rail-collapse:checked ~ .layout .rail__group, .rail.is-collapsed .rail__group { display: none; }
/* one page head: title (base) + description + meta (freshness/scope) + filters */
.page-head { margin: 0 0 16px; }
.page-head__desc { font-size: var(--fs-body); color: var(--ink-2); margin: 0; max-width: 78ch; }
.page-head__meta { font-size: var(--fs-caption); color: var(--ink-3); margin: 6px 0 0; }
.page-head__meta .warn { color: var(--neg); font-weight: 600; }
.page-head__filters { margin-top: 12px; }
/* buttons: anchors and buttons must look identical (a.btn kept 8px corners) */
a.btn, .btn, .dz-btn, .seg a, .fin-tab { border-radius: 0 !important; }
/* .num used on .ds-table rows in financials was scoped to table.data only */
.ds-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-table .neg { color: var(--neg); }
/* inputs the modernist layer missed keep 8px corners — square them */
input[type=date], input[type=search], input[type=email], input[type=password], input[type=number] { border-radius: 0 !important; }
.page-head__desc:empty, .page-head__meta:empty, .page-head__filters:empty { display: none; }
.page-head:not(:has(> :not(:empty))) { display: none; }
/* totals are emphasis, not "good news": orange rail, navy number (green/red stay semantic) */
.ds-kpi--total { border-top-color: var(--orange); }
.ds-kpi--total .ds-kpi__value { color: var(--navy); }
.ds-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* ---- Team roster (2026-08-30) ------------------------------------------ */
.tm-roster { width: 100%; border-collapse: collapse; font-size: var(--fs-table, 13px); }
.tm-roster th { text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tm-roster td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft, #EDECE8); vertical-align: middle; color: var(--ink-2); }
.tm-roster th.num, .tm-roster td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-roster td.tm-nm { color: var(--ink); font-weight: 600; white-space: nowrap; }
.tm-roster tr.tm-tier td { padding: 12px 10px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); border-bottom: 2px solid var(--navy); background: transparent; }
.tm-roster tr.tm-row { cursor: pointer; }
.tm-roster tr.tm-row:hover td { background: var(--inset, #F7F9FA); }
.tm-roster tr.tm-row.open td { background: var(--inset, #F7F9FA); border-bottom-color: transparent; }
.tm-roster td.tm-tog { width: 28px; text-align: center; color: var(--ink-3); font-size: 11px; }
.tm-roster tr.tm-row.open td.tm-tog::before { content: "▾"; } .tm-roster td.tm-tog::before { content: "▸"; }
.tm-roster tr.tm-detail { display: none; }
.tm-roster tr.tm-detail.show { display: table-row; }
.tm-roster tr.tm-detail > td { padding: 0 10px 14px 38px; background: var(--inset, #F7F9FA); border-bottom: 1px solid var(--line); }
.tm-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px 28px; padding: 10px 0 4px; }
.tm-panel > div { min-width: 0; }
.tm-panel .tm-line { padding: 3px 0; }
.tm-panel .tm-k { width: 104px; }
.tm-panel .tm-wide, .tm-full { grid-column: 1 / -1; }
.tm-cred { font-size: 12.5px; }
.tm-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.tm-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.tm-status--active { color: var(--pos); } .tm-status--active::before { background: var(--pos); }
.tm-status--leave, .tm-status--locum { color: var(--warn); } .tm-status--leave::before, .tm-status--locum::before { background: var(--warn); }
.tm-dots { display: inline-flex; gap: 8px; align-items: center; }
.tm-dots .dz-dot { width: 8px; height: 8px; }
.tm-roster tr.tm-alum td { color: var(--ink-3); }
.tm-roster tr.tm-alum td.tm-nm { color: var(--ink-2); font-weight: 600; }
.tm-alumni { border-top: 1px solid var(--line); margin-top: 6px; }
.tm-alumni > summary { cursor: pointer; list-style: none; padding: 10px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.tm-alumni > summary::-webkit-details-marker { display: none; }
.tm-alumni > summary::before { content: "▸"; font-size: 10px; } .tm-alumni[open] > summary::before { content: "▾"; }
.tm-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0 0; border-top: 1px dashed var(--line); margin-top: 8px; }
.tm-act label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.tm-act input[type=date], .tm-act input[type=text], .tm-act select { font: inherit; font-size: 12.5px; padding: 4px 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.tm-act input[type=text] { min-width: 240px; }
.tm-hist { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.tm-prin { width: 100%; border-collapse: collapse; font-size: 13px; }
.tm-prin td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft, #EDECE8); vertical-align: top; color: var(--ink-2); }
.tm-prin td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; width: 200px; }
.tm-prin td:nth-child(2) { white-space: nowrap; width: 220px; }
.tm-card--office .ds-card__head { align-items: baseline; }
.tm-counts { font-size: 12px; color: var(--ink-3); display: flex; gap: 14px; }
.tm-counts b { color: var(--ink-2); font-weight: 600; }
@media (max-width: 900px) { .tm-roster .tm-hide-sm { display: none; } }
.tm-panel { grid-template-columns: minmax(380px, 1.4fr) minmax(280px, 1fr); }
@media (max-width: 1100px) { .tm-panel { grid-template-columns: 1fr; } }
.tm-act select, .tm-act input[type=date], .tm-act input[type=text] { width: auto; flex: 0 1 auto; margin: 0; }
.tm-act input[type=text] { flex: 1 1 260px; max-width: 520px; }
.tm-roster tr.tm-row.has-sub td { border-bottom: none; padding-bottom: 2px; }
.tm-roster tr.tm-sub td { padding: 0 10px 9px; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; cursor: pointer; }
.tm-roster tr.tm-sub td:first-child { padding: 0; }
.tm-roster tr.tm-sub:hover td { background: var(--inset, #F7F9FA); }
.tm-sub__k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); margin-right: 4px; }
.tm-sub__sep { margin: 0 8px; }
.tm-file__head { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); margin: 6px 0 4px; }
.tm-file__miss { color: var(--neg); font-weight: 700; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.tm-filetbl { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.tm-filetbl th { text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 3px 8px; border-bottom: 1px solid var(--line); }
.tm-filetbl td { padding: 5px 8px; border-bottom: 1px solid var(--line-soft, #EDECE8); vertical-align: middle; color: var(--ink-2); }
.tm-filetbl td:first-child { width: 18px; padding-right: 0; }
.tm-filetbl .tm-file__item { color: var(--ink); font-weight: 600; white-space: nowrap; }
.tm-filetbl .tm-doc { display: block; margin: 1px 0; }
.tm-up { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tm-up input[type=file] { font-size: 11.5px; width: auto; max-width: 220px; margin: 0; }
.tm-up input[type=text] { font: inherit; font-size: 12px; padding: 3px 7px; border: 1px solid var(--line); width: 150px; margin: 0; }
.tm-file__foot { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.tm-flash { background: #EDF5F0; border-left: 3px solid var(--pos); color: #2E5A3E; padding: 8px 12px; font-size: 13px; margin-bottom: 14px; }
.tm-filetbl .dz-dot, .tm-dots .dz-dot { display: inline-block; }
.dz-dot--blue { background: var(--info, #256C9A); }
.tm-file__state--expired, .tm-file__state--confirm { color: var(--neg); font-weight: 700; }
.tm-file__state--expiring { color: var(--warn); font-weight: 700; }
.tm-file__state--review { color: var(--info, #256C9A); font-weight: 700; }
.tm-file__state--ok { color: var(--pos); }
.tm-prev { margin-top: 2px; } .tm-prev summary { cursor: pointer; font-size: 11px; color: var(--ink-3); list-style: none; }
.tm-prev summary::before { content: "▸ "; font-size: 9px; } .tm-prev[open] summary::before { content: "▾ "; }
.tm-prev .tm-doc { font-size: 11.5px; color: var(--ink-3); }
.tm-hr { border-top: 1px solid var(--line); padding-top: 10px; }
.tm-hr__text { max-width: 420px; white-space: normal; line-height: 1.4; }
.tm-hr__by { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.tm-act--hr { border-top: none; margin-top: 4px; padding-top: 4px; }
.tm-act--hr input[type=file] { font-size: 11.5px; width: auto; max-width: 210px; margin: 0; }
.tm-roster td:nth-child(3) { white-space: nowrap; }

/* ---- preview bar + accounts (2026-08-30) ---- */
.preview-bar { background: var(--orange); color: #fff; padding: 8px 20px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.preview-bar b { font-weight: 700; }
.preview-bar button { font: inherit; font-size: 12px; font-weight: 700; padding: 5px 12px; border: 1px solid #fff; background: #fff; color: var(--orange); cursor: pointer; }
.ac-table td { vertical-align: middle; }
.ac-table select { font: inherit; font-size: 12.5px; padding: 4px 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); width: auto; margin: 0; }
.ac-active { font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.ac-active input { width: auto; margin: 0; }
.ac-actions { white-space: nowrap; text-align: right; }
.ac-preview-row td { padding-top: 0; border-bottom: 1px solid var(--line); }
.ac-preview-row .caption { margin-left: 10px; }
.ac-new { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.ac-new > summary { cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); }
.ac-newform { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.ac-newform input[type=text], .ac-newform input[type=email], .ac-newform select { font: inherit; font-size: 13px; padding: 5px 9px; border: 1px solid var(--line); background: #fff; width: auto; margin: 0; }
.ac-newform input[type=text] { min-width: 180px; } .ac-newform input[type=email] { min-width: 240px; }
.warn { color: var(--warn); font-weight: 700; }

/* ---- Team page: detail-panel primitives (consolidated 2026-08-30 — the ONE
   home for .tm-*; dash.css and the theme files no longer define any) ------- */
.tm-line { display: flex; gap: 10px; padding: 3px 0; font-size: var(--fs-body); }
.tm-k { flex: none; width: 110px; color: var(--ink-3); font-size: var(--fs-label); font-weight: 600; text-transform: uppercase; letter-spacing: var(--track-label); padding-top: 2px; }
.tm-v { flex: 1; min-width: 0; color: var(--ink-2); }
.tm-creds { display: flex; gap: 16px; flex-wrap: wrap; }
.tm-cred { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 12.5px; }
.tm-cred--missing { color: var(--ink-3); }
.tm-doc { display: inline-block; margin-right: 10px; font-size: 13px; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--orange); }
.tm-pending { color: var(--ink-3); font-size: var(--fs-caption); }
.tm-foot { color: var(--ink-3); font-size: var(--fs-caption); line-height: var(--lh-caption); margin: 4px 2px 0; }
.tm-chip { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: var(--radius-0); padding: 2px 9px; border: 1px solid var(--silver); color: var(--ink-2); background: transparent; }
.tm-chip--good { color: var(--pos); border-color: var(--pos); }
.tm-chip--recon { color: var(--warn); border-color: var(--warn); }
.tm-pay { margin: 2px 0 0; }
.tm-pay summary { cursor: pointer; font-size: var(--fs-caption); color: var(--steel); font-weight: 700; letter-spacing: .04em; list-style: none; display: inline-flex; align-items: center; gap: 5px; }
.tm-pay summary::before { content: "▸"; font-size: 10px; color: var(--orange); transition: transform .12s; }
.tm-pay[open] summary::before { transform: rotate(90deg); }
.tm-pay summary::-webkit-details-marker { display: none; }
.tm-pay .tm-line { padding-left: 14px; }
.tm-pay-year { margin: 6px 0 4px 14px; }
.tm-pay-totals { font-size: 12.5px; color: var(--ink); display: flex; gap: 10px; align-items: baseline; padding: 2px 0 4px; }
.tm-pay-totals span { color: var(--ink-2); }
.tm-pay-stream { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: var(--track-label); color: var(--ink-3); font-weight: 700; margin: 8px 0 0 14px; }
.tm-cktbl { border-collapse: collapse; font-size: var(--fs-caption); font-variant-numeric: tabular-nums; margin: 2px 0 4px; }
.tm-cktbl th { text-align: right; font-weight: 700; color: var(--ink-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; padding: 2px 14px 3px 0; border-bottom: 1px solid var(--line); }
.tm-cktbl th:first-child, .tm-cktbl td:first-child { text-align: left; }
.tm-cktbl td { text-align: right; color: var(--ink-2); padding: 2px 14px 2px 0; border-bottom: 1px solid var(--line); }
.tm-cktbl td:first-child { color: var(--ink); }
.tm-cktbl tr:last-child td { border-bottom: none; }
.tm-total-row td { border-top: 2px solid var(--line-strong); color: var(--navy); font-weight: 600; }
.tm-recon-head { font-size: var(--fs-body); font-weight: 600; color: var(--ink); margin: 8px 0 2px 14px; }
.tm-recon-rule { font-size: 11.5px; color: var(--ink-3); margin: 0 0 6px 14px; max-width: 720px; line-height: var(--lh-caption); }
.tm-recon-tbl { margin-left: 14px; }
.tm-recon-note { font-size: 11.5px; color: var(--ink-2); margin: 6px 0 0 14px; max-width: 720px; line-height: var(--lh-caption); }
.tm-recon-scroll { overflow-x: auto; }
.tm-over { color: var(--warn); font-weight: 600; }
.tm-needs td { color: var(--ink-3); font-style: italic; }
.tm-recon-need { font-size: var(--fs-caption); color: var(--ink-2); margin: 10px 0 4px 14px; background: var(--inset); border-left: 3px solid var(--steel); padding: 8px 14px; border-radius: var(--radius-0); max-width: 720px; }
.tm-recon-need ul { margin: 4px 0 0; padding-left: 18px; }
.tm-recon-need li { margin: 3px 0; line-height: 1.45; }
.tm-proposed { border-left-color: var(--pos); background: var(--pos-bg); }
.tm-contract { margin: 4px 0 0 14px; }

/* ---- one button, everywhere (Team forms, credential uploads, Accounts) --- */
.ds-btn, .tm-act button, .tm-up button, .ac-btn {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 5px 12px; border: 1px solid var(--navy); background: var(--navy);
  color: #fff; cursor: pointer; border-radius: var(--radius-0);
}
.ds-btn--ghost, .tm-act button.tm-act--ghost, .tm-up button, .tm-act--hr button, .ac-btn--ghost {
  background: var(--surface); color: var(--navy);
}
.ac-btn--view { background: var(--surface); color: var(--orange); border-color: var(--orange); }

/* ---- entity ownership tree (2026-08-31) ---- */
.en-tree td.cell-primary { white-space: nowrap; }
.en-tree .en-d1 { padding-left: 30px; position: relative; }
.en-tree .en-d2 { padding-left: 54px; position: relative; }
.en-tree .en-d3 { padding-left: 78px; position: relative; }
.en-tree .en-d1::before, .en-tree .en-d2::before, .en-tree .en-d3::before {
  content: "└"; position: absolute; color: var(--line-strong); font-size: 12px; top: 8px;
}
.en-tree .en-d1::before { left: 14px; } .en-tree .en-d2::before { left: 38px; } .en-tree .en-d3::before { left: 62px; }
.ds-muted { color: var(--ink-3); }
.en-flag { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--warn); border: 1px solid var(--warn); padding: 1px 6px; margin-left: 6px; white-space: nowrap; }

/* ---- shadow bookkeeper banner (2026-08-31) ---- */
.sh-note { padding: 12px 16px; }
.sh-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sh-head .ds-muted { font-size: 12px; }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; }
.sh-k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.sh-v { font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); margin: 2px 0; }
.sh-s { font-size: 11.5px; color: var(--ink-2); line-height: 1.35; }
.sh-foot { font-size: 12px; color: var(--ink-2); line-height: 1.5; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); max-width: 78ch; }
.dz-pair { display: grid; grid-template-columns: minmax(340px, 460px) minmax(340px, 1fr); gap: 12px; margin-top: 12px; align-items: start; }
@media (max-width: 900px) { .dz-pair { grid-template-columns: 1fr; } }
.ds-kpi--warn { border-top-color: var(--warn); } .ds-kpi--warn .ds-kpi__value { color: var(--warn); }
.register-grid--fixed { align-items: stretch; }
.register-grid--fixed .register-card { display: flex; flex-direction: column; }
.register-grid--fixed .register-card__updated { margin-top: auto; padding-top: 8px; }
/* ---- advisor roster columns (2026-08-31) ---- */
.adv-what { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adv-contact { max-width: 230px; }
.adv-contact .caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-roster tr.tm-row td.adv-what, .tm-roster tr.tm-row td.adv-contact { vertical-align: top; }
