/* ============================================
   iReclaim Health — Dashboard Brand System
   Dark Bloomberg-terminal aesthetic
   Loaded by all dashboard pages
   ============================================ */

:root {
  /* iReclaim brand */
  --ir-navy:        #0B2F5A;
  --ir-navy-deep:   #061B3A;
  --ir-navy-soft:   #1F4F87;
  --ir-cyan:        #1B8CE0;
  --ir-cyan-deep:   #0F6FBE;
  --ir-cyan-bright: #39A8EE;
  --ir-cyan-glow:   #5BC0F4;
  --ir-cyan-pale:   rgba(57,168,238,0.14);
  --ir-cyan-mist:   rgba(27,140,224,0.08);

  /* dark Bloomberg surface */
  --bg:           #050F1F;
  --bg-warm:      #0A1525;
  --bg-cool:      #06101E;
  --panel:        #0C2342;
  --panel-soft:   #102844;
  --panel-tint:   #14365D;
  --border:       #1B3B66;
  --border-strong:#27507F;
  --border-soft:  #15324F;

  /* text */
  --text:         #E8F1FA;
  --text-2:       #BCCFE3;
  --text-dim:     #94B0CD;
  --muted:        #6E89A8;
  --muted-2:      #4C6885;

  /* signal */
  --good:         #4DCBA1;
  --good-light:   #6FD9B4;
  --good-bg:      rgba(77,203,161,0.12);
  --good-line:    rgba(77,203,161,0.30);
  --warn:         #F0B23A;
  --warn-light:   #F5C451;
  --warn-bg:      rgba(240,178,58,0.12);
  --warn-line:    rgba(240,178,58,0.30);
  --bad:          #FF6B6B;
  --bad-light:    #FF8989;
  --bad-bg:       rgba(255,107,107,0.10);
  --bad-line:     rgba(255,107,107,0.30);
  --gold:         #D4B57A;
  --gold-light:   #E8CB95;
  --gold-bg:      rgba(212,181,122,0.12);
  --purple:       #B58CFF;
  --purple-bg:    rgba(181,140,255,0.12);

  /* shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.40), 0 1px 3px rgba(0,0,0,0.30);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.50), 0 4px 16px rgba(0,0,0,0.40);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.55), 0 12px 32px rgba(0,0,0,0.50);
  --shadow-cyan: 0 4px 24px rgba(27,140,224,0.45);
  --shadow-cyan-soft: 0 0 40px rgba(57,168,238,0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 8% -10%, rgba(27,140,224,0.18), transparent 60%),
    radial-gradient(700px 500px at 95% 0%,  rgba(57,168,238,0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-warm) 0%, var(--bg) 50%, var(--bg-cool) 100%);
  background-attachment: fixed;
  position: relative; overflow-x: hidden;
  padding-top: 144px; padding-bottom: 76px;
}

/* Ambient terminal grid */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
}

/* Ambient floating dots */
.ambient-dots { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.ambient-dots span {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: var(--ir-cyan-bright); opacity: 0.4;
  animation: float 14s linear infinite;
}
.ambient-dots span:nth-child(1) { left: 12%; top: 30%; animation-delay: 0s; animation-duration: 18s; }
.ambient-dots span:nth-child(2) { left: 25%; top: 60%; animation-delay: -3s; animation-duration: 22s; }
.ambient-dots span:nth-child(3) { left: 45%; top: 20%; animation-delay: -6s; animation-duration: 16s; }
.ambient-dots span:nth-child(4) { left: 65%; top: 70%; animation-delay: -9s; animation-duration: 20s; }
.ambient-dots span:nth-child(5) { left: 82%; top: 40%; animation-delay: -12s; animation-duration: 24s; }
.ambient-dots span:nth-child(6) { left: 38%; top: 85%; animation-delay: -15s; animation-duration: 19s; }
@keyframes float {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 0.5; }
  50%  { transform: translate(40px, -120px); opacity: 0.7; }
  90%  { opacity: 0.4; }
  100% { transform: translate(80px, -240px); opacity: 0; }
}

/* ============== STICKY TOP ============== */
.sticky-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(6,16,30,0.85);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 4px 24px rgba(0,0,0,0.55);
}

.masthead {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 28px;
  padding: 18px 36px 14px;
  border-bottom: 1px solid var(--border);
  background: transparent; position: relative;
}
.masthead::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--ir-cyan) 30%, white 50%, var(--ir-cyan-glow) 70%, transparent 100%);
  background-size: 200% 100%;
  animation: stream 2s linear infinite;
  z-index: 2;
  filter: drop-shadow(0 0 6px var(--ir-cyan-bright));
}
@keyframes stream { from { background-position: -100% 0; } to { background-position: 100% 0; } }

.brand { display: flex; align-items: center; gap: 16px; }
.brand img { height: 40px; display: block; }
.brand-divider { width: 1px; height: 28px; background: var(--border-strong); }
.brand-label { display: flex; flex-direction: column; gap: 1px; }
.brand-label .eyebrow {
  font-family: 'Fraunces', serif;
  font-size: 13px; letter-spacing: 0.38em; text-transform: uppercase;
  color: var(--ir-cyan-bright); font-weight: 600;
  font-variation-settings: 'opsz' 9;
}
.brand-label .module {
  font-family: 'Fraunces', serif;
  font-size: 28px; letter-spacing: -0.01em; line-height: 1;
  color: var(--text); font-weight: 500;
  font-variation-settings: 'opsz' 144;
}

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 100px;
  background: var(--good-bg); border: 1px solid var(--good-line);
  font-size: 13px; color: var(--good); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  position: relative;
  animation: pill-breath 1.4s ease-in-out infinite;
}
@keyframes pill-breath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(77,203,161,0); }
  50%      { box-shadow: 0 0 0 14px rgba(77,203,161,0.25); }
}
.status-pill .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 14px var(--good);
  animation: livepulse 0.9s infinite ease-in-out;
}
@keyframes livepulse {
  0%, 100% { opacity: 1; transform: scale(1.15); }
  50%      { opacity: 0.35; transform: scale(0.55); }
}

.timestamp {
  text-align: right; font-family: 'DM Mono', monospace;
  font-size: 13px; color: var(--muted); letter-spacing: 0.04em;
}
.timestamp strong {
  color: var(--text); font-size: 15px; display: block; margin-top: 3px; letter-spacing: 0;
}

/* News ticker */
.news-ticker {
  display: grid; grid-template-columns: auto 1fr; align-items: stretch;
  background: var(--ir-navy); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.news-label {
  background: linear-gradient(135deg, var(--ir-cyan-bright), var(--ir-cyan-deep));
  background-size: 200% 200%;
  animation: shimmer 2.5s ease-in-out infinite;
  color: white;
  font-family: 'Fraunces', serif;
  font-weight: 700; font-size: 13px;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 14px 32px 14px 22px;
  display: flex; align-items: center;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.news-track {
  overflow: hidden; position: relative; padding: 14px 0;
  mask-image: linear-gradient(90deg, transparent, black 40px, black calc(100% - 40px), transparent);
}
.news-scroll {
  display: flex; gap: 52px; white-space: nowrap;
  animation: scroll-x 90s linear infinite;
}
.news-item { display: inline-flex; align-items: center; gap: 14px; font-size: 16px; color: rgba(255,255,255,0.92); }
.news-item .src { font-family: 'Fraunces', serif; font-weight: 700; font-size: 13px; color: var(--ir-cyan-bright); text-transform: uppercase; letter-spacing: 0.12em; }
.news-item .sep { color: rgba(255,255,255,0.35); }
.news-item .head strong { color: white; font-weight: 600; }
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* KPI ticker */
.kpi-ticker {
  display: grid; grid-template-columns: auto 1fr; align-items: stretch;
  background: linear-gradient(180deg, var(--panel-soft), var(--bg-cool));
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm); position: relative;
}
.kpi-ticker::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ir-cyan-bright), transparent);
  opacity: 0.6;
}
.kpi-label {
  background: var(--ir-navy); color: var(--ir-cyan-bright);
  font-family: 'DM Mono', monospace;
  font-weight: 600; font-size: 13px;
  letter-spacing: 0.20em; text-transform: uppercase;
  padding: 16px 28px 16px 36px;
  display: flex; align-items: center; gap: 10px;
}
.kpi-label::before {
  content: ''; width: 11px; height: 11px; border-radius: 50%;
  background: var(--ir-cyan-bright);
  box-shadow: 0 0 18px var(--ir-cyan-bright), 0 0 32px var(--ir-cyan);
  animation: livepulse 0.9s ease-in-out infinite;
}
.kpi-track {
  overflow: hidden; position: relative; padding: 16px 0;
  mask-image: linear-gradient(90deg, transparent, black 60px, black calc(100% - 60px), transparent);
}
.kpi-scroll { display: flex; gap: 50px; white-space: nowrap; animation: scroll-x 60s linear infinite; }
.kpi-tick { display: inline-flex; align-items: baseline; gap: 11px; font-family: 'DM Mono', monospace; font-size: 15px; }
.kpi-tick .name { color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; font-weight: 600; }
.kpi-tick .val { color: var(--text); font-weight: 600; font-size: 18px; }
.kpi-tick .delta { font-size: 13px; padding: 3px 7px; border-radius: 3px; font-weight: 600; }
.kpi-tick .delta.up { color: var(--good); background: var(--good-bg); }
.kpi-tick .delta.down { color: var(--bad); background: var(--bad-bg); }
.kpi-tick .delta.flat { color: var(--muted); background: var(--panel-tint); }

/* ============== FLOATING FOOTER ============== */
.floating-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(6,16,30,0.88);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-top: 1px solid var(--border);
  padding: 14px 36px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px;
  align-items: center;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.55);
}
.floating-footer::before {
  content: ''; position: absolute; left: 0; right: 0; top: -2px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--ir-cyan-bright) 40%, white 50%, var(--ir-cyan-bright) 60%, transparent);
  opacity: 0.9; background-size: 200% 100%;
  animation: stream 2.4s linear infinite;
  filter: drop-shadow(0 0 6px var(--ir-cyan-bright));
}
.floating-footer .ff-brand { display: flex; align-items: center; gap: 14px; }
.floating-footer .ff-brand img {
  height: 32px; display: block;
  animation: brand-breath 2s ease-in-out infinite;
}
@keyframes brand-breath {
  0%, 100% { filter: drop-shadow(0 0 0px rgba(57,168,238,0)); transform: scale(1); }
  50%      { filter: drop-shadow(0 0 14px rgba(57,168,238,0.55)); transform: scale(1.04); }
}
.floating-footer .ff-brand .tag {
  font-family: 'Fraunces', serif; font-size: 13px;
  color: var(--text-2); letter-spacing: 0.02em;
  font-style: italic; font-weight: 400;
}
.floating-footer .ff-center {
  text-align: center; font-family: 'DM Mono', monospace; font-size: 12px;
  color: var(--text-dim); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
}

/* Inter-page nav inside floating footer */
.ff-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.ff-nav-label {
  font-family: 'DM Mono', monospace; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted-2); font-weight: 700;
  margin-right: 2px;
}
.ff-nav-sep {
  width: 1px; height: 16px; background: var(--border-strong);
  margin: 0 6px;
}
.ff-nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 100px;
  font-family: 'DM Mono', monospace; font-size: 11.5px;
  font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim); text-decoration: none;
  background: transparent; border: 1px solid transparent;
  transition: all 0.18s ease;
}
.ff-nav-link:hover {
  color: var(--ir-cyan-bright);
  background: var(--ir-cyan-pale);
  border-color: var(--ir-cyan);
}
.ff-nav-link.active {
  color: var(--ir-cyan-bright);
  background: var(--ir-cyan-pale);
  border-color: var(--ir-cyan);
  box-shadow: 0 0 12px rgba(57,168,238,0.30);
}
.ff-nav-link.active::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ir-cyan-bright);
  box-shadow: 0 0 6px var(--ir-cyan-bright);
  animation: livepulse 0.9s ease-in-out infinite;
}
.floating-footer .ff-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: 'DM Mono', monospace; font-size: 11.5px;
  color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
}
.floating-footer .ff-meta::before {
  content: ''; width: 11px; height: 11px; border-radius: 50%;
  background: var(--ir-cyan-bright);
  box-shadow: 0 0 16px var(--ir-cyan-bright), 0 0 32px var(--ir-cyan);
  animation: livepulse 0.9s ease-in-out infinite;
}

/* ============== CONTAINER ============== */
.container { max-width: 1840px; margin: 0 auto; padding: 32px 36px 64px; position: relative; z-index: 1; }

/* Page head */
.page-head { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; margin-bottom: 28px; }
.page-head .eyebrow {
  font-family: 'Fraunces', serif;
  font-size: 14px; letter-spacing: 0.38em; text-transform: uppercase;
  color: var(--ir-cyan-bright); font-weight: 600; margin-bottom: 12px;
  font-variation-settings: 'opsz' 9;
}
.page-head h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400; font-size: 64px; line-height: 1.0;
  letter-spacing: -0.025em; color: var(--text);
  font-variation-settings: 'opsz' 144;
}
.page-head h1 em {
  font-style: italic; color: var(--ir-cyan-bright); font-weight: 400;
  background: linear-gradient(90deg, var(--ir-cyan-bright), var(--ir-cyan-glow), var(--ir-cyan-bright));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s ease-in-out infinite;
}
.page-head .lede {
  color: var(--text-dim); font-size: 19px; max-width: 620px;
  margin-top: 16px; line-height: 1.55;
  border-left: 3px solid var(--ir-cyan); padding-left: 18px;
}
.page-head .meta-cluster {
  text-align: right; font-family: 'DM Mono', monospace;
  font-size: 14px; color: var(--muted); letter-spacing: 0.04em; line-height: 1.7;
}
.page-head .meta-cluster .big {
  font-family: 'Fraunces', serif;
  font-size: 40px; color: var(--text); letter-spacing: -0.02em;
  line-height: 1; margin-bottom: 8px;
  font-variation-settings: 'opsz' 144;
}
.page-head .meta-cluster .big em { font-style: italic; color: var(--ir-cyan-bright); }

/* Motto ribbon */
.motto {
  margin: 0 0 28px 0; padding: 18px 28px;
  background: linear-gradient(90deg, transparent 0%, rgba(57,168,238,0.10) 50%, transparent 100%);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-family: 'Fraunces', serif; font-size: 22px; font-style: italic;
  color: var(--text-2); letter-spacing: -0.01em;
  font-variation-settings: 'opsz' 144;
}
.motto .lhs { display: flex; align-items: center; gap: 16px; }
.motto .gly {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--ir-cyan-glow), var(--ir-cyan-deep));
  box-shadow: 0 0 26px var(--ir-cyan-bright);
  animation: orb-breath 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes orb-breath {
  0%, 100% { transform: scale(1); box-shadow: 0 0 16px var(--ir-cyan-bright), 0 0 32px rgba(57,168,238,0.5); }
  50%      { transform: scale(1.35); box-shadow: 0 0 36px var(--ir-cyan-glow), 0 0 64px var(--ir-cyan-bright); }
}
.motto .rhs {
  font-family: 'DM Mono', monospace; font-size: 12px;
  color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase;
  font-style: normal; font-weight: 600;
}

/* Section eyebrow */
.section-eyebrow { display: flex; align-items: center; gap: 14px; margin: 40px 0 18px; }
.section-eyebrow .num {
  font-family: 'Fraunces', serif; font-size: 16px;
  color: var(--ir-cyan-bright); letter-spacing: 0.04em; font-weight: 600;
  font-variation-settings: 'opsz' 9;
}
.section-eyebrow .line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); }
.section-eyebrow .label {
  font-family: 'DM Mono', monospace; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--text-2);
  font-weight: 700;
}
.section-eyebrow .pulse {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  background: var(--ir-cyan-bright);
  box-shadow: 0 0 14px var(--ir-cyan-bright), 0 0 28px var(--ir-cyan);
  animation: livepulse 0.9s ease-in-out infinite;
}

/* Stat strip */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; margin-bottom: 24px; box-shadow: var(--shadow-md);
}
.stat {
  padding: 24px 28px; border-right: 1px solid var(--border);
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end;
}
.stat:last-child { border-right: none; }
.stat::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--ir-cyan); }
.stat.warn::before { background: var(--warn); }
.stat.bad::before  { background: var(--bad); }
.stat.good::before { background: var(--good); }
.stat .meta-col { grid-column: 1; }
.stat .label {
  font-family: 'DM Mono', monospace; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--text-2); margin-bottom: 14px; font-weight: 700;
}
.stat .val {
  font-family: 'Fraunces', serif;
  font-size: 52px; font-weight: 400; line-height: 1;
  letter-spacing: -0.03em; color: var(--text);
  font-variation-settings: 'opsz' 144;
}
.stat.warn .val { color: var(--warn); }
.stat.bad  .val { color: var(--bad); }
.stat.good .val { color: var(--good); }
.stat .footnote { font-size: 14px; color: var(--text-dim); margin-top: 10px; font-weight: 500; }
.stat.good .footnote { color: var(--good); font-weight: 500; }
.stat .spark { width: 100px; height: 36px; opacity: 0.85; }

/* Generic panel */
.panel-x { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-md); margin-bottom: 18px; }
.panel-x .ph {
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: var(--panel-soft);
  display: flex; justify-content: space-between; align-items: center; position: relative;
}
.panel-x .ph::after {
  content: ''; position: absolute; left: 0; bottom: -1px; width: 80px; height: 2px;
  background: linear-gradient(90deg, var(--ir-cyan), transparent);
}
.panel-x .ph h3 {
  font-family: 'Fraunces', serif;
  font-size: 22px; font-weight: 500; letter-spacing: -0.005em;
  font-variation-settings: 'opsz' 144;
}
.panel-x .ph h3 em { font-style: italic; color: var(--ir-cyan-bright); font-weight: 400; }
.panel-x .ph .ph-meta {
  font-family: 'DM Mono', monospace; font-size: 13px;
  color: var(--text-dim); letter-spacing: 0.06em; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.ph-meta .live-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 100px;
  background: var(--good-bg); color: var(--good);
  border: 1px solid var(--good-line);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
}
.ph-meta .live-tag::before {
  content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 12px var(--good);
  animation: livepulse 0.9s ease-in-out infinite;
}
.panel-x .ph.danger h3 { color: var(--bad); }
.panel-x .ph.warn   h3 { color: var(--warn); }
.panel-x .ph.good   h3 { color: var(--good); }
.panel-x .ph.purple h3 { color: var(--purple); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-family: 'DM Mono', monospace;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-2); font-weight: 700;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: var(--panel-soft);
}
thead th.right, td.right { text-align: right; }
thead th.ctr, td.ctr { text-align: center; }
tbody td {
  padding: 16px 24px; border-bottom: 1px solid var(--border-soft);
  font-size: 16px;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(57,168,238,0.06); }

.amount { font-variant-numeric: tabular-nums; font-weight: 500; }
.timecell { font-family: 'DM Mono', monospace; font-size: 14px; color: var(--text-dim); letter-spacing: 0.02em; font-weight: 500; }
.firm-name { color: var(--text-2); font-weight: 500; font-size: 16px; }

/* Status / Stage / Pill */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 4px;
  font-family: 'DM Mono', monospace; font-size: 12.5px;
  font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pill.scheduled { background: var(--panel-tint); color: var(--muted); }
.pill.due-soon  { background: var(--warn-bg);    color: var(--warn); }
.pill.overdue   { background: var(--bad-bg);     color: var(--bad); }
.pill.paid      { background: var(--good-bg);    color: var(--good); }
.pill.action    { background: var(--purple-bg);  color: var(--purple); }
.pill.received  { background: var(--ir-cyan-pale); color: var(--ir-cyan-bright); }
.pill.welcomed  { background: var(--good-bg);     color: var(--good); }
.pill.contacted { background: var(--warn-bg);     color: var(--warn); }
.pill.intake    { background: var(--gold-bg);     color: var(--gold); }
.pill.client    { background: var(--good-bg);     color: var(--good); border: 1px solid var(--good-line); }

/* Type pills */
.type-pill {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  background: var(--ir-cyan-pale); color: var(--ir-cyan-bright);
}
.type-pill.pt     { background: var(--gold-bg);     color: var(--gold); }
.type-pill.intake { background: rgba(143,176,248,0.14); color: #8fb0f8; }
.type-pill.emc    { background: var(--bad-bg);      color: var(--bad-light); }
.type-pill.counsel { background: var(--bad-bg);     color: var(--bad-light); }
.type-pill.software { background: var(--good-bg);   color: var(--good); }
.type-pill.rent    { background: var(--gold-bg);    color: var(--gold); }
.type-pill.insurance { background: var(--warn-bg);  color: var(--warn); }
.type-pill.utility { background: var(--panel-tint); color: var(--muted); }

/* Owner / firm-tier / SLA */
.owner-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 10px;
  font-family: 'DM Mono', monospace; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em;
  background: rgba(143,176,248,0.14); color: #8fb0f8;
  border: 1px solid transparent;
}
.owner-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  flex-shrink: 0;
}

/* Per-person color identity — one color per teammate */
.owner-pill.farooq  { background: rgba(57,168,238,0.16);  color: #39A8EE; border-color: rgba(57,168,238,0.30); }
.owner-pill.haque   { background: rgba(181,140,255,0.16); color: #B58CFF; border-color: rgba(181,140,255,0.30); }
.owner-pill.emmy    { background: rgba(255,143,171,0.16); color: #FF8FAB; border-color: rgba(255,143,171,0.30); }
.owner-pill.mircea  { background: rgba(255,162,89,0.16);  color: #FFA259; border-color: rgba(255,162,89,0.30); }
.owner-pill.karen   { background: rgba(92,221,176,0.16);  color: #5CDDB0; border-color: rgba(92,221,176,0.30); }
.owner-pill.candy   { background: rgba(201,160,240,0.16); color: #C9A0F0; border-color: rgba(201,160,240,0.30); }
.owner-pill.charlie { background: rgba(123,200,245,0.16); color: #7BC8F5; border-color: rgba(123,200,245,0.30); }
.owner-pill.nick    { background: rgba(232,203,149,0.16); color: #E8CB95; border-color: rgba(232,203,149,0.30); }
.owner-pill.kyle    { background: rgba(240,104,138,0.16); color: #F0688A; border-color: rgba(240,104,138,0.30); }
.owner-pill.cina    { background: rgba(159,180,205,0.16); color: #9FB4CD; border-color: rgba(159,180,205,0.30); }
.owner-pill.sean    { background: rgba(79,195,199,0.16);  color: #4FC3C7; border-color: rgba(79,195,199,0.30); }
.owner-pill.team    { background: rgba(110,137,168,0.16); color: #8DA3BC; border-color: rgba(110,137,168,0.30); }
.owner-pill.company { background: rgba(110,137,168,0.14); color: #6E89A8; border-color: rgba(110,137,168,0.24); }
.owner-pill.bdteam  { background: rgba(255,162,89,0.16);  color: #FFA259; border-color: rgba(255,162,89,0.30); }
.owner-pill.mircea-candy { background: linear-gradient(90deg, rgba(255,162,89,0.16), rgba(201,160,240,0.16)); color: #E8B89A; border-color: rgba(255,162,89,0.30); }
.owner-pill.farooq-emmy  { background: linear-gradient(90deg, rgba(57,168,238,0.16), rgba(255,143,171,0.16)); color: #B0AECE; border-color: rgba(57,168,238,0.30); }

/* People legend (optional, used on dashboards with team to-dos) */
.people-legend {
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  padding: 14px 20px; margin-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
}
.people-legend .pl-title {
  font-family: 'DM Mono', monospace; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted); font-weight: 700;
  margin-right: 8px;
}
.people-legend .owner-pill { font-size: 12px; }
.firm-tier {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 10.5px; font-weight: 700; margin-left: 6px; letter-spacing: 0.04em;
}
.firm-tier.gold   { background: var(--gold-bg);    color: var(--gold); }
.firm-tier.silver { background: rgba(110,137,168,0.22); color: var(--text-dim); }
.firm-tier.bronze { background: rgba(212,140,74,0.15); color: #d48c4a; }
.firm-tier.new    { background: var(--ir-cyan-pale); color: var(--ir-cyan-bright); }

.sla {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'DM Mono', monospace; font-size: 14px; font-weight: 600;
}
.sla::before { content: ''; width: 11px; height: 11px; border-radius: 50%; }
.sla.green::before  { background: var(--good); box-shadow: 0 0 8px var(--good); }
.sla.yellow::before { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.sla.red::before    {
  background: var(--bad);
  box-shadow: 0 0 14px rgba(255,107,107,0.8);
  animation: alert-pulse 0.7s ease-in-out infinite;
}
@keyframes alert-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(255,107,107,0.5), 0 0 0 0 rgba(255,107,107,0.4); transform: scale(1); }
  50%      { box-shadow: 0 0 28px rgba(255,107,107,1), 0 0 0 10px rgba(255,107,107,0); transform: scale(1.5); }
}
.sla.red { color: var(--bad); font-weight: 600; }
.sla.green, .sla.yellow { color: var(--text-dim); }

/* Row entrance flash */
tbody tr.live-row td { animation: row-flash 1.6s ease-out; }
@keyframes row-flash {
  from { background: rgba(57,168,238,0.25); }
  to   { background: transparent; }
}

/* Date helpers */
.date { color: var(--text); font-variant-numeric: tabular-nums; font-size: 14px; }
.days-ago { color: var(--muted); font-size: 12px; margin-left: 4px; }
.days-ago.warn { color: var(--warn); }
.days-ago.danger { color: var(--bad); }

/* Progress bars */
.progress-wrap { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.progress-bar { background: var(--panel-tint); border-radius: 4px; height: 6px; width: 80px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; }
.progress-fill.green  { background: var(--good); box-shadow: 0 0 8px var(--good); }
.progress-fill.yellow { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.progress-fill.red    { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.progress-text { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.progress-text.green { color: var(--good); }
.progress-text.yellow { color: var(--warn); }
.progress-text.red { color: var(--bad); }

/* Fade-in entrance */
.container > * { animation: fade-in 0.7s ease-out backwards; }
.container > *:nth-child(1) { animation-delay: 0.05s; }
.container > *:nth-child(2) { animation-delay: 0.15s; }
.container > *:nth-child(3) { animation-delay: 0.25s; }
.container > *:nth-child(4) { animation-delay: 0.35s; }
.container > *:nth-child(5) { animation-delay: 0.45s; }
.container > *:nth-child(6) { animation-delay: 0.55s; }
.container > *:nth-child(7) { animation-delay: 0.65s; }
.container > *:nth-child(8) { animation-delay: 0.75s; }
.container > *:nth-child(9) { animation-delay: 0.85s; }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Layout helpers */
.row-2col-asym { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; margin-bottom: 24px; }
.row-2col-eq   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.row-3col      { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }

/* ============================================
   Check-off (assets/checkoff.js) — collections + agenda boards
   Generic pieces only; surface-specific .has-co layout lives in each page.
   ============================================ */
.co-check {
  font-size: 16px; line-height: 1; background: none; border: 0; cursor: pointer;
  color: var(--ir-cyan-bright); padding: 0; margin: 0; flex: 0 0 auto;
  transition: color .12s ease, transform .08s ease;
}
.co-check:hover:not([disabled]) { color: #fff; transform: scale(1.12); }
.co-check.is-done { color: var(--good); }
.co-check[disabled] { cursor: default; color: var(--muted); opacity: .5; }
.co-body { flex: 1 1 auto; min-width: 0; }

.co-done-strip { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 10px; }
.co-done-strip > summary {
  cursor: pointer; list-style: none; font-family: 'DM Mono', monospace; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px; user-select: none;
}
.co-done-strip > summary::-webkit-details-marker { display: none; }
.co-done-strip > summary::before { content: '▸'; font-size: 10px; transition: transform .15s ease; }
.co-done-strip[open] > summary::before { transform: rotate(90deg); }
.co-done-strip[open] > summary { color: var(--text-dim); }
.co-done-strip > summary:hover { color: var(--text-dim); }
.co-done-body { margin-top: 12px; }
/* completed items read as quietly settled, not active — still legible on the dark theme */
.co-done-body > * { opacity: 0.72; }
.co-done-body > *:hover { opacity: 0.95; }

.co-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px);
  background: var(--panel-tint); border: 1px solid var(--warn); color: var(--warn);
  font-family: 'DM Mono', monospace; font-size: 12.5px; letter-spacing: .02em;
  padding: 11px 18px; border-radius: 8px; box-shadow: var(--shadow-md, 0 8px 28px rgba(0,0,0,.4));
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 9999;
}
.co-toast.show { opacity: 1; transform: translate(-50%, 0); }
