/* ========== TorchRank Pro Base ========== */
/* === Pro Flow Bar === */
:root{
  --pro1:#00c4ff; /* cyan */
  --pro2:#00d4bf; /* torchrank teal */
  --pro3:#34d399; /* green-teal */
  --pro4:#fb923c; /* warm accent */
}


/* subtle speed-up on hover for fun */
.tr-probar:hover{ animation-duration: 5s; }

  100% { background-position: 300% 50%; }
}

/* mobile spacing tweak */
@media (max-width: 640px){



*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:linear-gradient(180deg,var(--bg1),var(--bg2));color:var(--text);font:14px/1.55 ui-sans-serif,system-ui,Segoe UI,Roboto,Helvetica,Arial}

.tr-page{min-height:100%;display:flex;flex-direction:column}

/* Topbar */
.tr-topbar{
  position:sticky;top:0;z-index:40;
  display:flex;align-items:center;gap:.75rem;
  padding:10px 14px;border-bottom:1px solid var(--border);
  background:linear-gradient(180deg,rgba(8,13,24,.85),rgba(8,13,24,.6));
  backdrop-filter: blur(10px) saturate(1.1);
}
.tr-left{display:flex;align-items:center;gap:.5rem}
.tr-brand{font-weight:700;letter-spacing:.2px}
.tr-pill{
  padding:.2rem .5rem;border:1px solid var(--border);
  border-radius:999px;font-size:12px;color:var(--muted)
}
.tr-spacer{flex:1}
.tr-user{display:flex;align-items:center;}

/* Content */
.tr-content{padding:18px;max-width:1200px;margin:0 auto;width:100%}
.tr-title{font-size:22px;letter-spacing:.2px}
.tr-muted{color:var(--muted)}
.tr-status{margin:6px 0 18px;color:var(--muted)}

/* Grid + Cards */
.tr-grid{
  display:grid;gap:14px;
  grid-template-columns:repeat(12,minmax(0,1fr));
}
.tr-card{
  grid-column:span 6;
  background:var(--panel);border:1px solid var(--border);
  border-radius:16px;padding:14px;
}
.tr-card-h{font-weight:700;margin-bottom:10px}
.tr-foot{margin-top:10px;color:var(--muted);font-size:12px}

@media (max-width: 980px){
  .tr-card{grid-column:span 12}
}

.tr-kv > div{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px dashed rgba(148,163,184,.2)}
.tr-kv > div:last-child{border-bottom:0}

.tr-big{font-size:28px;font-weight:800;margin:6px 0}
.tr-sub{color:var(--muted)}

.tr-list{list-style:none;padding:0;margin:0}
.tr-list li{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px dashed rgba(148,163,184,.2)}
.tr-list li:last-child{border-bottom:0}
.tr-list .muted{color:var(--muted)}
.tr-list .ok{color:#7de2c2}

/* Table */
.tr-table{width:100%;border-collapse:separate;border-spacing:0 8px}
.tr-table th{font-size:12px;color:var(--muted);text-align:left;padding:0 8px}
.tr-table td{padding:10px 8px;background:rgba(255,255,255,.02);border:1px solid var(--border);border-left-width:0;border-right-width:0}
.tr-table tr td:first-child{border-left-width:1px;border-top-left-radius:10px;border-bottom-left-radius:10px}
.tr-table tr td:last-child{border-right-width:1px;border-top-right-radius:10px;border-bottom-right-radius:10px}
.tr-table .muted{color:var(--muted);text-align:center}

/* Buttons (for Clerk primary actions) */
.tr-btn{
  background:var(--brand);color:#0b1220;font-weight:700;
  border:none;border-radius:14px;padding:10px 14px;cursor:pointer
}
.tr-btn:hover{filter:brightness(.93)}

/* ========== Clerk Visibility/Contrast Fixes ========== */
/* Make sure the trigger text/icon is visible on dark header */
.cl-userButton-root button,
.cl-userButtonTrigger,
.cl-userButtonPopoverTrigger {
  color: var(--text) !important;
  fill: var(--text) !important;
}

/* Ensure popover uses solid dark bg for contrast */
.cl-userButtonPopoverCard,
.cl-userButtonPopoverRoot,
.cl-userPreview,
.cl-internal-1v6q90g { /* fallback class */
  background: rgba(11,18,32,.98) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
}

/* Menu items readable */
.cl-userButtonPopoverActionButton,
.cl-userButtonPopoverActionButtonText {
  color: var(--text) !important;
}

/* Divider visibility */
.cl-dividerLine { background: rgba(148,163,184,.35) !important; }

/* Badges / initials contrast */
.cl-userAvatarBox, .cl-avatarBox {
  border: 1px solid rgba(148,163,184,.35) !important;
}
/* ========== TorchRank Pro Base ========== */
:root{
  --bg1:#0b1220; --bg2:#0f172a;
  --text:#e6eaee; --muted:#94a3b8;
  --panel:rgba(15,23,42,0.65);
  --border:rgba(148,163,184,.35);
  --brand:#00d4bf;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:linear-gradient(180deg,var(--bg1),var(--bg2));color:var(--text);font:14px/1.55 ui-sans-serif,system-ui,Segoe UI,Roboto,Helvetica,Arial}

.tr-page{min-height:100%;display:flex;flex-direction:column}

/* Topbar */
.tr-topbar{
  position:sticky;top:0;z-index:40;
  display:flex;align-items:center;gap:.75rem;
  padding:10px 14px;border-bottom:1px solid var(--border);
  background:linear-gradient(180deg,rgba(8,13,24,.85),rgba(8,13,24,.6));
  backdrop-filter: blur(10px) saturate(1.1);
}
.tr-left{display:flex;align-items:center;gap:.5rem}
.tr-brand{font-weight:700;letter-spacing:.2px}
.tr-pill{
  padding:.2rem .5rem;border:1px solid var(--border);
  border-radius:999px;font-size:12px;color:var(--muted)
}
.tr-spacer{flex:1}
.tr-user{display:flex;align-items:center;}

/* Content */
.tr-content{padding:18px;max-width:1200px;margin:0 auto;width:100%}
.tr-title{font-size:22px;letter-spacing:.2px}
.tr-muted{color:var(--muted)}
.tr-status{margin:6px 0 18px;color:var(--muted)}

/* Grid + Cards */
.tr-grid{
  display:grid;gap:14px;
  grid-template-columns:repeat(12,minmax(0,1fr));
}
.tr-card{
  grid-column:span 6;
  background:var(--panel);border:1px solid var(--border);
  border-radius:16px;padding:14px;
}
.tr-card-h{font-weight:700;margin-bottom:10px}
.tr-foot{margin-top:10px;color:var(--muted);font-size:12px}

@media (max-width: 980px){
  .tr-card{grid-column:span 12}
}

.tr-kv > div{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px dashed rgba(148,163,184,.2)}
.tr-kv > div:last-child{border-bottom:0}

.tr-big{font-size:28px;font-weight:800;margin:6px 0}
.tr-sub{color:var(--muted)}

.tr-list{list-style:none;padding:0;margin:0}
.tr-list li{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px dashed rgba(148,163,184,.2)}
.tr-list li:last-child{border-bottom:0}
.tr-list .muted{color:var(--muted)}
.tr-list .ok{color:#7de2c2}

/* Table */
.tr-table{width:100%;border-collapse:separate;border-spacing:0 8px}
.tr-table th{font-size:12px;color:var(--muted);text-align:left;padding:0 8px}
.tr-table td{padding:10px 8px;background:rgba(255,255,255,.02);border:1px solid var(--border);border-left-width:0;border-right-width:0}
.tr-table tr td:first-child{border-left-width:1px;border-top-left-radius:10px;border-bottom-left-radius:10px}
.tr-table tr td:last-child{border-right-width:1px;border-top-right-radius:10px;border-bottom-right-radius:10px}
.tr-table .muted{color:var(--muted);text-align:center}

/* Buttons (for Clerk primary actions) */
.tr-btn{
  background:var(--brand);color:#0b1220;font-weight:700;
  border:none;border-radius:14px;padding:10px 14px;cursor:pointer
}
.tr-btn:hover{filter:brightness(.93)}

/* ========== Clerk Visibility/Contrast Fixes ========== */
/* Make sure the trigger text/icon is visible on dark header */
.cl-userButton-root button,
.cl-userButtonTrigger,
.cl-userButtonPopoverTrigger {
  color: var(--text) !important;
  fill: var(--text) !important;
}

/* Ensure popover uses solid dark bg for contrast */
.cl-userButtonPopoverCard,
.cl-userButtonPopoverRoot,
.cl-userPreview,
.cl-internal-1v6q90g { /* fallback class */
  background: rgba(11,18,32,.98) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
}

/* Menu items readable */
.cl-userButtonPopoverActionButton,
.cl-userButtonPopoverActionButtonText {
  color: var(--text) !important;
}

/* Divider visibility */
.cl-dividerLine { background: rgba(148,163,184,.35) !important; }

/* Badges / initials contrast */
.cl-userAvatarBox, .cl-avatarBox {
  border: 1px solid rgba(148,163,184,.35) !important;
}

/* === Pro Flow Bar === */
:root{
  --pro1:#00c4ff; /* cyan */
  --pro2:#00d4bf; /* torchrank teal */
  --pro3:#34d399; /* green-teal */
  --pro4:#fb923c; /* warm accent */
}
.tr-probar:hover{ animation-duration:5s; }
  100%{background-position:300% 50%}
}
.tr-probar:hover{ animation-duration:5s !important; }

.tr-topbar::after{
  content:"";
  position:absolute;
  left:14px;               /* align with existing header padding */
  right:14px;
  bottom:-3px;             /* hug the bottom edge; move to 0 if you prefer inside */
  height:8px;              /* visible */
  border-radius:999px;
  background:linear-gradient(90deg,#00c4ff,#00d4bf,#34d399,#fb923c,#00c4ff);
  background-size:300% 100%;
  animation:proflow 8s linear infinite;
  box-shadow:0 0 14px rgba(0,212,191,.45), inset 0 0 8px rgba(255,255,255,.08);
  pointer-events:none;     /* purely decorative */
}
/* === PRO TOPBAR v1 === */
/* match main site edge padding and keep a clean span */
.tr-topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 32px;            /* ← adjust if your main site uses different */
  border-bottom:1px solid var(--border);
  background:linear-gradient(180deg,rgba(8,13,24,.85),rgba(8,13,24,.6));
  backdrop-filter: blur(10px) saturate(1.1);
}
.tr-left{display:flex; align-items:center; gap:.5rem}
.tr-brand{font-weight:700; letter-spacing:.3px; font-size:18px}
.tr-pill{padding:.2rem .5rem; border:1px solid var(--border); border-radius:999px; font-size:12px; color:var(--muted)}

/* centered nav between brand and user button */
.tr-nav{display:flex; gap:1.5rem; margin:0 2rem; flex:1; align-items:center}
.tr-nav a{
  color:var(--text); text-decoration:none; font-weight:600; opacity:.9;
  padding:6px 2px; border-bottom:2px solid transparent; transition:opacity .15s, border-color .15s;
}
.tr-nav a:hover{ opacity:1; border-bottom-color: rgba(0,212,191,.45) }
.tr-nav a.is-active{ border-bottom-color: var(--brand); }

/* user button hard-right */
.tr-user{margin-left:auto; display:flex; align-items:center}

/* style Clerk avatar (ditch purple) */
.cl-userButtonTrigger, .cl-userAvatarBox, .cl-avatarBox{
  background:#00d4bf !important; color:#0b1220 !important;
  border:1px solid rgba(255,255,255,.25) !important; box-shadow:0 0 6px rgba(0,212,191,.25);
}
.cl-userButtonTrigger:hover{ filter:brightness(.92) }

/* keep Clerk popover above glow */
.cl-userButtonPopoverRoot{ z-index:1000 !important }

/* mobile collapse */
@media (max-width: 880px){
  .tr-nav{ gap:1rem; margin:0 1rem }
  .tr-brand{ font-size:16px }
}
@media (max-width: 680px){
  .tr-nav{ display:none }        /* hide nav on very small screens for now */
}
/* === PRO TOPBAR — spacing + nav polish === */
.tr-topbar{
  padding:14px 32px;                 /* edges "come in" like main site */
}
.tr-nav{                              /* keep nav centered between brand and user */
  display:flex; gap:1.5rem; margin:0 2rem; flex:1; align-items:center;
}
.tr-nav a{
  color:var(--text); text-decoration:none; font-weight:600; opacity:.9;
  padding:6px 2px; border-bottom:2px solid transparent;
  transition:opacity .15s, border-color .15s;
}
.tr-nav a:hover{ opacity:1; border-bottom-color: rgba(0,212,191,.45) }
.tr-nav a.is-active{ border-bottom-color: var(--brand); }

/* Clerk avatar (no purple) */

.cl-userButtonTrigger, .cl-userAvatarBox, .cl-avatarBox{
  background:#00d4bf !important; color:#0b1220 !important;
  border:1px solid rgba(255,255,255,.25) !important;
  box-shadow:0 0 6px rgba(0,212,191,.25);
}
/* keep popover above glow */
.cl-userButtonPopoverRoot{ z-index:1000 !important }

/* compact on smaller screens */
@media (max-width: 880px){ .tr-topbar{ padding:12px 24px } .tr-nav{ gap:1rem; margin:0 1rem } }
@media (max-width: 680px){ .tr-nav{ display:none } }
/* === Pro Topbar Container === */
.tr-topbar{ padding:0 16px; }  /* breathing room on edges */
.tr-topbar-inner{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}
/* === Pro Header Logo === */
.tr-logo{ display:flex; align-items:center; margin-right:.5rem; }
.tr-logo img{
  height:26px; width:auto; display:block;
  filter: drop-shadow(0 0 6px rgba(0,212,191,.18));
}
@media (max-width:880px){ .tr-logo img{ height:22px } }

/* === Nav underline animation (restored) === */
.tr-nav a{
  position:relative;
  color:var(--text); text-decoration:none; font-weight:600; opacity:.9;
  padding:6px 2px;
  border-bottom:none !important; /* use animated underline instead */
  transition:opacity .15s;
}
.tr-nav a::after{
  content:""; position:absolute; left:0; right:0; bottom:0;
  height:2px; border-radius:2px;
  background: linear-gradient(90deg, #00c4ff, #00d4bf, #34d399);
  transform: scaleX(0); transform-origin:left center;
  transition: transform .18s ease-out;
  opacity:.95;
}
.tr-nav a:hover{ opacity:1; }
.tr-nav a:hover::after{ transform: scaleX(1); }

/* Active page underline shown by default */
.tr-nav a.is-active::after{ transform: scaleX(1); }

/* keep spacing tidy with logo present */
.tr-left{ gap:.65rem; }
/* === Clerk UserButton → TorchRank logo avatar === */
.cl-userButtonTrigger .cl-avatarImage{ display:none !important; }   /* hide default img */
.cl-userButtonTrigger .cl-avatarBox,
.cl-userButtonTrigger .cl-userAvatarBox{
  background:
    url("/data/img/torchrank-avatar-64.png") center/cover no-repeat,
    #0b1220 !important;
  color: trnsparent !important; /* hide initials text */
  border:1px solid rgba(255,255,255,.25) !important;
  box-shadow:0 0 6px rgba(0,212,191,.25);
  border-radius:999px !important;
}
/* === Clerk Sign-in / Sign-up Theming (readable on dark) === */
.cl-card, .cl-signIn-root, .cl-signUp-root, .cl-userButtonPopoverCard{
  background: rgba(11,18,32,.98) !important;
  color: #e6eaee !important;
  border: 1px solid rgba(148,163,184,.35) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(10px) saturate(1.1);
}

/* Titles + subtitles */
.cl-headerTitle, .cl-headerSubtitle, .cl-formFieldLabel, .cl-formFieldHintText,
.cl-formSubtitle, .cl-identityPreviewText, .cl-userPreviewMainIdentifier{
  color: #e6eaee !important;
  opacity: .95;
}

/* Inputs */
.cl-input, .cl-formFieldInput{
  background:#0f1820 !important;
  color:#e6eaee !important;
  border:1px solid rgba(148,163,184,.35) !important;
  border-radius:12px !important;
}
.cl-input:focus, .cl-formFieldInput:focus{
  outline: none !important;
  border-color: #00d4bf !important;
  box-shadow: 0 0 0 2px rgba(0,212,191,.25) !important;
}

/* Primary buttons */
.cl-formButtonPrimary, .cl-buttonPrimary, .cl-socialButtonsIconButton{
  background:#00d4bf !important;
  color:#0b1220 !important;
  font-weight:700 !important;
  border-radius:14px !important;
  border:none !important;
}
.cl-formButtonPrimary:hover, .cl-buttonPrimary:hover{ filter:brightness(.93) }

/* Secondary/ghost buttons readable */
.cl-button, .cl-formResendCodeLink{
  color:#e6eaee !important;
}

/* Divider + links */
.cl-dividerLine{ background: rgba(148,163,184,.35) !important; }
.cl-footerAction, .cl-footer, .cl-footerText, .cl-formFieldAction{
  color:#94a3b8 !important;
}
.cl-link{ color:#00d4bf !important; }

/* Error text visible */
.cl-formMessage, .cl-badge, .cl-alertText, .cl-formFieldErrorText{
  color:#ffb4b4 !important;
}

/* Popover z-index above glow */
.cl-userButtonPopoverRoot{ z-index: 1000 !important; }



/* === Clerk UserButton → TorchRank custom logo === */
.cl-userButtonTrigger .cl-avatarImage{ display:none !important; }
.cl-userButtonTrigger .cl-avatarBox,
.cl-userButtonTrigger .cl-userAvatarBox{
  background:
    url("/data/img/torchrank-avatar-64.png") center/cover no-repeat,
    #00d4bf !important;
  color: transparent !important;
  border:1px solid rgba(255,255,255,.25) !important;
  box-shadow:0 0 6px rgba(0,212,191,.25);
  border-radius:999px !important;
}
/* === UserButton: force TorchRank logo avatar === */
.cl-userButtonTrigger .cl-avatarImage{ display:none !important; }
.cl-userButtonTrigger .cl-avatarBox,
.cl-userButtonTrigger .cl-userAvatarBox{
  background:
    url("/data/img/torchrank-avatar-64.png") center/cover no-repeat,
    #00d4bf !important;
  color: transparent !important; /* hide initials */
  border:1px solid rgba(255,255,255,.25) !important;
  box-shadow:0 0 6px rgba(0,212,191,.25);
  border-radius:999px !important;
}

/* Keep container visible and on top */
.tr-user{ display:flex; align-items:center; margin-left:auto; }
.cl-userButtonPopoverRoot{ z-index:1000 !important; }
/* === Clerk popover theming === */
.cl-userButtonPopoverCard, .cl-userPreview, .cl-userButtonPopoverRoot{
  background: rgba(11,18,32,.98) !important;
  color: #e6eaee !important;
  border: 1px solid rgba(148,163,184,.35) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(10px) saturate(1.1);
}
.cl-userButtonPopoverActionButton, .cl-userButtonPopoverActionButtonText{ color:#e6eaee !important; }
.cl-dividerLine{ background: rgba(148,163,184,.35) !important; }
.cl-badge, .cl-alertText{ color:#ffb4b4 !important; }
/* === PRO FLOW BAR — AUTHORITATIVE === */
.tr-topbar{ position:sticky; top:0; z-index:40; } /* safe if already present */
.tr-topbar::after{
  content:""; position:absolute; left:14px; right:14px; bottom:0; height:6px; border-radius:999px;
  background:linear-gradient(90deg,#00c4ff,#00d4bf,#34d399,#fb923c,#00c4ff);
  background-size:300% 100%; animation:proflow 12s linear infinite;
  box-shadow:0 0 8px rgba(0,212,191,.28), inset 0 0 6px rgba(255,255,255,.05); pointer-events:none;
}
/* keyframes guard (if removed earlier) */
@keyframes proflow{ 0%{background-position:0% 50%} 100%{background-position:300% 50%} }
/* === PRO DASHBOARD CARDS === */
.tr-grid{ display:grid; gap:14px; grid-template-columns:repeat(12,minmax(0,1fr)); }
.tr-card{
  grid-column:span 6; background:rgba(15,23,42,.65);
  border:1px solid rgba(148,163,184,.25); border-radius:16px; padding:14px;
  box-shadow:0 4px 16px rgba(0,0,0,.35); transition: box-shadow .15s, border-color .15s;
}
.tr-card:hover{ box-shadow:0 6px 22px rgba(0,0,0,.45), 0 0 0 1px rgba(0,212,191,.20) inset; border-color:rgba(0,212,191,.35); }
.tr-card-h{ font-weight:700; margin-bottom:8px; }
.tr-kv > div{ display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px dashed rgba(148,163,184,.2) }
.tr-kv > div:last-child{ border-bottom:0 }
.tr-big{ font-size:28px; font-weight:800; margin:6px 0 }
.tr-sub{ color:#94a3b8 }
.tr-list{ list-style:none; margin:0; padding:0 }
.tr-list li{ display:flex; justify-content:space-between; gap:12px; padding:6px 0; border-bottom:1px dashed rgba(148,163,184,.2) }
.tr-list li:last-child{ border-bottom:0 }
.tr-foot{ margin-top:10px; color:#94a3b8; font-size:12px }
@media (max-width: 980px){ .tr-card{ grid-column:span 12 } }
/* === HERO: Network Health === */
.tr-hero{
  margin:12px 0 18px;
}
.tr-hero-card{
  background:rgba(15,23,42,.75);
  border:1px solid rgba(148,163,184,.30);
  border-radius:18px;
  padding:18px;
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:20px;
  box-shadow:0 8px 28px rgba(0,0,0,.45);
}
.tr-hero-left{
  display:flex; align-items:center; justify-content:center;
}
.tr-gauge{
  width:260px; height:260px;
}
.tr-hero-right{
  display:grid; grid-template-rows: auto auto 1fr; gap:10px;
}
.tr-hero-title{
  font-size:20px; font-weight:800; letter-spacing:.3px;
}
.tr-hero-sub{ color:#94a3b8 }
.tr-hero-metrics{
  display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px;
}
.tr-metric{
  background:rgba(255,255,255,.03);
  border:1px solid rgba(148,163,184,.25);
  border-radius:12px; padding:10px;
}
.tr-metric h4{ margin:0 0 6px; font-size:12px; color:#94a3b8; font-weight:600; letter-spacing:.2px }
.tr-metric .num{ font-size:22px; font-weight:800 }
.tr-metric .muted{ color:#94a3b8; font-size:12px }

.tr-spark{
  height:120px; width:100%;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
  border:1px solid rgba(148,163,184,.25);
  border-radius:12px; padding:8px;
}
.tr-spark svg{ width:100%; height:100%; display:block }
.tr-spark .label{ color:#94a3b8; font-size:12px; margin:6px 4px 0 }

@media (max-width: 980px){
  .tr-hero-card{ grid-template-columns: 1fr; }
}
/* === SUBNET HEATMAP === */
.tr-heat-card{
  grid-column: span 12;
  background:rgba(15,23,42,.75);
  border:1px solid rgba(148,163,184,.30);
  border-radius:18px; padding:16px;
  box-shadow:0 8px 28px rgba(0,0,0,.45);
}
.tr-heat-h{ font-weight:800; margin-bottom:10px; font-size:16px; letter-spacing:.2px }
.tr-heat-wrap{ overflow:auto; padding:6px; }
.tr-heat-legend{ display:flex; gap:8px; align-items:center; color:#94a3b8; font-size:12px; margin-top:8px }
.tr-heat-grad{ height:8px; width:160px; border-radius:999px;
  background: linear-gradient(90deg,#ef4444,#fb923c,#34d399,#00d4bf); }
.tr-heat-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(44px,1fr)); gap:8px; }
.tr-heat-cell{
  position:relative; border-radius:10px; height:44px;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:12px; color:#0b1220;
  border:1px solid rgba(0,0,0,.25);
  box-shadow: inset 0 0 1px rgba(255,255,255,.08);
}
.tr-heat-cell .label{ position:absolute; bottom:4px; right:6px; font-size:10px; color:rgba(0,0,0,.5) }
.tr-heat-cell[data-state="down"]{ outline:2px solid #ef4444aa }
.tr-heat-sub{ color:#94a3b8; font-size:12px; margin-top:6px }
@media (max-width: 980px){ .tr-heat-card{ grid-column:span 12 } }
/* === Heartbeat ticker === */
.tr-hb{ margin-top:4px; font-size:12px; color:#94a3b8; display:flex; gap:6px; align-items:center }
.tr-hb .dot{ width:8px; height:8px; border-radius:999px; background:#22c55e; display:inline-block; box-shadow:0 0 8px rgba(34,197,94,.6); animation:hb 1.8s ease-in-out infinite }
@keyframes hb{ 0%,100%{ transform:scale(1); opacity:1 } 50%{ transform:scale(1.3); opacity:.6 } }
.tr-hb.warn .dot{ background:#fb923c; box-shadow:0 0 8px rgba(251,146,60,.6) }
.tr-hb.error .dot{ background:#ef4444; box-shadow:0 0 8px rgba(239,68,68,.6) }
/* === Polished Controls & Badges === */
.tr-toolbar{ position:sticky; top:64px; z-index:30; background:rgba(11,18,32,.85); backdrop-filter:blur(8px);
  border:1px solid rgba(148,163,184,.25); border-radius:12px; padding:10px; display:flex; gap:10px; align-items:center; margin-bottom:12px }
.tr-chip{ font-size:12px; padding:4px 8px; border:1px solid rgba(148,163,184,.35); border-radius:999px; color:#94a3b8 }
.tr-badge{ font-size:11px; padding:2px 6px; border-radius:999px; border:1px solid transparent }
.tr-badge.ok{ color:#072; background:rgba(52,211,153,.18); border-color:rgba(52,211,153,.35) }
.tr-badge.warn{ color:#6a3; background:rgba(251,146,60,.18); border-color:rgba(251,146,60,.35) }
.tr-badge.err{ color:#722; background:rgba(239,68,68,.18); border-color:rgba(239,68,68,.35) }

/* === Table polish === */
.tr-table{ width:100%; border-collapse:separate; border-spacing:0 8px }
.tr-table thead th{ font-size:12px; color:#94a3b8; text-align:left; padding:0 8px; cursor:pointer; user-select:none }
.tr-table tbody tr{ transition: background .12s, transform .12s }
.tr-table tbody tr:hover{ background:rgba(255,255,255,.03); transform: translateY(-1px) }
.tr-num{ text-align:right }
.tr-right{ text-align:right }
.th-sort::after{ content:""; display:inline-block; margin-left:6px; border:5px solid transparent; border-top-color:#94a3b8; transform:translateY(2px) }
.th-sort.asc::after{ border-top-color:transparent; border-bottom-color:#94a3b8; transform:translateY(-2px) }

/* === Skeletons === */
.skel{ position:relative; overflow:hidden; background:rgba(255,255,255,.04); height:12px; border-radius:6px }
.skel::after{ content:""; position:absolute; inset:0; background:linear-gradient(90deg,transparent,rgba(255,255,255,.1),transparent);
  animation:shimmer 1.2s infinite; transform:translateX(-100%) }
@keyframes shimmer{ 100%{ transform:translateX(100%) } }

/* === Modal (details) === */
.tr-modal-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.5); display:none; align-items:center; justify-content:center; z-index:1001 }
.tr-modal{ width:min(720px,92vw); background:rgba(11,18,32,.98); border:1px solid rgba(148,163,184,.35); border-radius:16px; padding:16px; box-shadow:0 16px 48px rgba(0,0,0,.6) }
.tr-modal-h{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px }
.tr-modal-h .title{ font-weight:800; font-size:16px }
.tr-modal-close{ cursor:pointer; padding:6px 10px; border:1px solid rgba(148,163,184,.35); border-radius:8px }
.tr-modal-body{ display:grid; gap:10px }
.tr-modal-open{ display:flex }

/* === Inputs (shared) === */
.tr-input{ padding:8px 10px; border-radius:10px; border:1px solid rgba(148,163,184,.35); background:#0f1820; color:#e6eaee }
.tr-select{ padding:8px 10px; border-radius:10px; border:1px solid rgba(148,163,184,.35); background:#0f1820; color:#e6eaee }
.tr-btn-sm{ padding:8px 12px; border-radius:10px; border:1px solid rgba(148,163,184,.35); background:rgba(255,255,255,.04); color:#e6eaee; cursor:pointer }
.tr-btn-sm:hover{ border-color:rgba(0,212,191,.45) }

/* Cap grid spacing on these pages */
.tr-content .tr-grid{ grid-template-columns:repeat(12,minmax(0,1fr)); }
/* === Polished Controls & Badges === */
.tr-toolbar{ position:sticky; top:64px; z-index:30; background:rgba(11,18,32,.85); backdrop-filter:blur(8px);
  border:1px solid rgba(148,163,184,.25); border-radius:12px; padding:10px; display:flex; gap:10px; align-items:center; margin-bottom:12px }
.tr-chip{ font-size:12px; padding:4px 8px; border:1px solid rgba(148,163,184,.35); border-radius:999px; color:#94a3b8 }
.tr-badge{ font-size:11px; padding:2px 6px; border-radius:999px; border:1px solid transparent }
.tr-badge.ok{ color:#072; background:rgba(52,211,153,.18); border-color:rgba(52,211,153,.35) }
.tr-badge.warn{ color:#6a3; background:rgba(251,146,60,.18); border-color:rgba(251,146,60,.35) }
.tr-badge.err{ color:#722; background:rgba(239,68,68,.18); border-color:rgba(239,68,68,.35) }

/* === Table polish === */
.tr-table{ width:100%; border-collapse:separate; border-spacing:0 8px }
.tr-table thead th{ font-size:12px; color:#94a3b8; text-align:left; padding:0 8px; cursor:pointer; user-select:none }
.tr-table tbody tr{ transition: background .12s, transform .12s }
.tr-table tbody tr:hover{ background:rgba(255,255,255,.03); transform: translateY(-1px) }
.tr-num{ text-align:right }
.tr-right{ text-align:right }
.th-sort::after{ content:""; display:inline-block; margin-left:6px; border:5px solid transparent; border-top-color:#94a3b8; transform:translateY(2px) }
.th-sort.asc::after{ border-top-color:transparent; border-bottom-color:#94a3b8; transform:translateY(-2px) }

/* === Skeletons === */
.skel{ position:relative; overflow:hidden; background:rgba(255,255,255,.04); height:12px; border-radius:6px }
.skel::after{ content:""; position:absolute; inset:0; background:linear-gradient(90deg,transparent,rgba(255,255,255,.1),transparent);
  animation:shimmer 1.2s infinite; transform:translateX(-100%) }
@keyframes shimmer{ 100%{ transform:translateX(100%) } }

/* === Modal (details) === */
.tr-modal-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.5); display:none; align-items:center; justify-content:center; z-index:1001 }
.tr-modal{ width:min(720px,92vw); background:rgba(11,18,32,.98); border:1px solid rgba(148,163,184,.35); border-radius:16px; padding:16px; box-shadow:0 16px 48px rgba(0,0,0,.6) }
.tr-modal-h{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px }
.tr-modal-h .title{ font-weight:800; font-size:16px }
.tr-modal-close{ cursor:pointer; padding:6px 10px; border:1px solid rgba(148,163,184,.35); border-radius:8px }
.tr-modal-body{ display:grid; gap:10px }
.tr-modal-open{ display:flex }

/* === Inputs (shared) === */
.tr-input{ padding:8px 10px; border-radius:10px; border:1px solid rgba(148,163,184,.35); background:#0f1820; color:#e6eaee }
.tr-select{ padding:8px 10px; border-radius:10px; border:1px solid rgba(148,163,184,.35); background:#0f1820; color:#e6eaee }
.tr-btn-sm{ padding:8px 12px; border-radius:10px; border:1px solid rgba(148,163,184,.35); background:rgba(255,255,255,.04); color:#e6eaee; cursor:pointer }
.tr-btn-sm:hover{ border-color:rgba(0,212,191,.45) }

/* Cap grid spacing on these pages */
.tr-content .tr-grid{ grid-template-columns:repeat(12,minmax(0,1fr)); }
/* === Forms & Toggles (shared) === */
.tr-form{ display:grid; gap:12px }
.tr-row{ display:grid; grid-template-columns: 220px 1fr; gap:12px; align-items:center }
.tr-row label{ color:#94a3b8; font-size:13px }
.tr-switch{ position:relative; width:46px; height:26px; background:#0f1820; border:1px solid rgba(148,163,184,.35); border-radius:999px; cursor:pointer; }
.tr-switch .knob{ position:absolute; top:2px; left:2px; width:22px; height:22px; background:#94a3b8; border-radius:50%; transition:transform .15s, background .15s }
.tr-switch.on{ background:#00d4bf; border-color:#00d4bf; }
.tr-switch.on .knob{ background:#0b1220; transform: translateX(20px) }
.tr-help{ color:#94a3b8; font-size:12px }
.tr-code{ background:#0f1820; border:1px solid rgba(148,163,184,.35); border-radius:10px; padding:10px; font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color:#e6eaee; }
/* === Validators polish v2 === */
#valTable tbody tr{ cursor:pointer }
.tr-mini{ width:100%; height:120px; background:linear-gradient(180deg,rgba(255,255,255,.03),transparent);
  border:1px solid rgba(148,163,184,.25); border-radius:12px; padding:8px; }
.tr-mini svg{ width:100%; height:100%; display:block }
.tr-mini .label{ color:#94a3b8; font-size:12px; margin:6px 4px 0 }
/* === Validators polish v2 === */
#valTable tbody tr{ cursor:pointer }
.tr-mini{ width:100%; height:120px; background:linear-gradient(180deg,rgba(255,255,255,.03),transparent);
  border:1px solid rgba(148,163,184,.25); border-radius:12px; padding:8px; }
.tr-mini svg{ width:100%; height:100%; display:block }
.tr-mini .label{ color:#94a3b8; font-size:12px; margin:6px 4px 0 }
/* === Validators polish v3 — continuity with dashboard === */

/* Metrics ribbon (reuse hero metric look) */
.tr-metrics{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; margin-bottom:12px }
.tr-metric{
  background:rgba(255,255,255,.03);
  border:1px solid rgba(148,163,184,.25);
  border-radius:12px; padding:10px;
}
.tr-metric h4{ margin:0 0 6px; font-size:12px; color:#94a3b8; font-weight:600; letter-spacing:.2px }
.tr-metric .num{ font-size:22px; font-weight:800 }
.tr-metric .muted{ color:#94a3b8; font-size:12px }

/* Stable table container with sticky header */
.tr-table-wrap{
  border:1px solid rgba(148,163,184,.25);
  border-radius:12px; overflow:auto; max-height:min(70vh,900px);
  background:rgba(15,23,42,.50);
}
.tr-table{ width:100%; border-collapse:separate; border-spacing:0; table-layout:fixed }
.tr-table thead th{
  position:sticky; top:0; z-index:1;
  background:rgba(11,18,32,.95);
  border-bottom:1px solid rgba(148,163,184,.25);
  font-size:12px; color:#94a3b8; text-align:left; padding:10px 10px; cursor:pointer; user-select:none;
}
.tr-table tbody td{ padding:10px 10px; border-bottom:1px dashed rgba(148,163,184,.18) }
.tr-table tbody tr:hover{ background:rgba(255,255,255,.03) }

/* Column sizing + ellipsis */
.col-hotkey{ width:40%; }
.col-netuid{ width:10%; }
.col-stake{ width:16%; }
.col-weight{ width:12%; }
.col-emiss{ width:12%; }
.col-uptime{ width:10%; }

.tr-ellipsis{ overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block }
code.tr-ellipsis{ display:block }

/* Density toggle */
.table-compact .tr-table tbody td{ padding:6px 8px }
.table-compact .tr-table thead th{ padding:6px 8px }
.table-compact .tr-table-wrap{ max-height:min(78vh,1000px) }

/* Toolbar refinement */
.tr-toolbar .seg{ display:inline-flex; border:1px solid rgba(148,163,184,.35); border-radius:10px; overflow:hidden }
.tr-toolbar .seg button{
  padding:8px 10px; background:transparent; border:none; color:#e6eaee; cursor:pointer;
}
.tr-toolbar .seg button.active{ background:rgba(255,255,255,.06) }
/* === Fixed-width content alignment (matches dashboard) === */
.tr-content.fixed{
  max-width:1400px;
  margin:0 auto;
}
/* === Standard fixed content width (matches dashboard) === */
.tr-section.fixed, .tr-card.fixed { max-width:1400px; margin:0 auto; }
.tr-card.fixed .tr-table-wrap{ max-width:100%; margin:0 auto; }
/* === Fixed-width content alignment === */
.tr-content.fixed{ max-width:1400px; margin:0 auto; }

/* === Subnets compare polish === */
.tr-compare{ display:grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap:12px }
.tr-compare .col{ grid-column: span 6; }
.tr-compare .kv{ display:grid; gap:8px }
.tr-compare .row{ display:flex; justify-content:space-between; align-items:center; padding:8px 10px; border:1px solid rgba(148,163,184,.25); border-radius:10px; background:rgba(255,255,255,.03) }
.tr-compare .label{ color:#94a3b8; font-size:12px }
.tr-compare .val{ font-weight:700 }
.tr-diff{ font-size:11px; padding:2px 6px; border-radius:999px; border:1px solid transparent; margin-left:8px }
.tr-diff.better{ color:#072; background:rgba(52,211,153,.18); border-color:rgba(52,211,153,.35) }
.tr-diff.worse{ color:#722; background:rgba(239,68,68,.18); border-color:rgba(239,68,68,.35) }
.tr-diff.neutral{ color:#445; background:rgba(148,163,184,.14); border-color:rgba(148,163,184,.28) }

.tr-mini-bar{ height:8px; border-radius:999px; background:rgba(255,255,255,.06); overflow:hidden; }
.tr-mini-bar > span{ display:block; height:8px; background:linear-gradient(90deg,#34d399,#00d4bf); width:0% }

/* toolbar alignment */
.tr-toolbar{ position:sticky; top:64px; z-index:30; background:rgba(11,18,32,.85); backdrop-filter:blur(8px);
  border:1px solid rgba(148,163,184,.25); border-radius:12px; padding:10px; display:flex; gap:10px; align-items:center; margin-bottom:12px }
.tr-chip{ font-size:12px; padding:4px 8px; border:1px solid rgba(148,163,184,.35); border-radius:999px; color:#94a3b8 }
.tr-input{ padding:8px 10px; border-radius:10px; border:1px solid rgba(148,163,184,.35); background:#0f1820; color:#e6eaee }
.tr-select{ padding:8px 10px; border-radius:10px; border:1px solid rgba(148,163,184,.35); background:#0f1820; color:#e6eaee }
/* === Analytics === */
.tr-ana-grid{ display:grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap:12px }
.tr-chart{ background:rgba(15,23,42,.75); border:1px solid rgba(148,163,184,.30); border-radius:18px; padding:16px; box-shadow:0 8px 28px rgba(0,0,0,.45) }
.tr-chart .h{ font-weight:800; margin-bottom:8px }
.tr-plot{ width:100%; height:320px; border:1px solid rgba(148,163,184,.25); border-radius:12px; background:linear-gradient(180deg,rgba(255,255,255,.03),transparent); padding:8px }
.tr-plot svg{ width:100%; height:100%; display:block }
.tr-form-row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:8px }
.tr-input, .tr-select, .tr-btn-sm{ padding:8px 10px; border-radius:10px; border:1px solid rgba(148,163,184,.35); background:#0f1820; color:#e6eaee }
.tr-btn-sm{ cursor:pointer }
.tr-note{ color:#94a3b8; font-size:12px; margin-top:6px }
.tr-content.fixed{ max-width:1400px; margin:0 auto; } /* reuse */
/* === Analytics v2 compact === */
.tr-content.fixed{ max-width:1400px; margin:0 auto }
.tr-ana-controls{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:10px 0 8px }
.tr-tabs{ display:inline-flex; border:1px solid rgba(148,163,184,.35); border-radius:10px; overflow:hidden }
.tr-tabs button{ padding:8px 12px; background:transparent; border:0; color:#e6eaee; cursor:pointer }
.tr-tabs button.active{ background:rgba(255,255,255,.06) }
.tr-ana-grid{ display:grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap:10px }
.tr-chart{ background:rgba(15,23,42,.75); border:1px solid rgba(148,163,184,.30); border-radius:14px; padding:12px }
.tr-chart .h{ font-weight:800; margin-bottom:6px; font-size:14px }
.tr-plot{ width:100%; height:200px; border:1px solid rgba(148,163,184,.25); border-radius:10px; background:linear-gradient(180deg,rgba(255,255,255,.03),transparent); padding:6px }
.tr-plot svg{ width:100%; height:100%; display:block }
.tr-kpis{ display:grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap:10px; margin:8px 0 10px }
.tr-kpi{ background:rgba(255,255,255,.03); border:1px solid rgba(148,163,184,.25); border-radius:10px; padding:10px }
.tr-kpi h5{ margin:0 0 4px; font-size:11px; color:#94a3b8 }
.tr-kpi .num{ font-size:18px; font-weight:800 }
.tr-kpi .diff{ font-size:11px; border-radius:999px; padding:2px 6px; border:1px solid transparent; margin-left:6px }
.tr-kpi .better{ color:#072; background:rgba(52,211,153,.18); border-color:rgba(52,211,153,.35) }
.tr-kpi .worse{ color:#722; background:rgba(239,68,68,.18); border-color:rgba(239,68,68,.35) }
.tr-kpi .neutral{ color:#445; background:rgba(148,163,184,.14); border-color:rgba(148,163,184,.28) }
.tr-mini-note{ color:#94a3b8; font-size:12px; margin-top:4px }
.tr-input,.tr-select,.tr-btn-sm{ padding:8px 10px; border-radius:10px; border:1px solid rgba(148,163,184,.35); background:#0f1820; color:#e6eaee }
.tr-btn-sm{ cursor:pointer }
.tr-chip{ font-size:12px; padding:4px 8px; border:1px solid rgba(148,163,184,.35); border-radius:999px; color:#94a3b8 }
.tr-ab{ display:flex; align-items:center; gap:8px }

/* Donut */
.tr-donut{ position:relative; width:100%; height:200px }
.tr-donut svg{ width:100%; height:100% }
.tr-donut .legend{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-top:6px; font-size:12px; color:#94a3b8 }

/* Uptime strip */
.tr-strip{ display:grid; grid-template-columns: repeat(48,1fr); gap:2px; height:10px; margin-top:6px }
.tr-strip span{ display:block; height:10px; border-radius:2px; background:#334155 }
.tr-strip span.up{ background:#00d4bf } .tr-strip span.warn{ background:#fb923c } .tr-strip span.down{ background:#ef4444 }

/* Compare badge */
.tr-diff{ font-size:11px; padding:2px 6px; border-radius:999px; border:1px solid transparent; }
.tr-diff.better{ color:#072; background:rgba(52,211,153,.18); border-color:rgba(52,211,153,.35) }
.tr-diff.worse{ color:#722; background:rgba(239,68,68,.18); border-color:rgba(239,68,68,.35) }
.tr-diff.neutral{ color:#445; background:rgba(148,163,184,.14); border-color:rgba(148,163,184,.28) }
