/* ============================================================
   SirenUA.online — Referral Hub · Neon Glassmorphism Design System
   Cards, neon badges, tabs, charts, timeline, wallet, tools, leaderboard
   ============================================================ */

:root {
  --hub-bg: rgba(14, 21, 32, 0.62);
  --hub-bg-strong: rgba(12, 18, 28, 0.86);
  --hub-border: rgba(148, 197, 255, 0.14);
  --hub-cyan: #22d3ee;
  --hub-purple: #c084fc;
  --hub-green: #4ade80;
  --hub-gold: #fbbf24;
  --hub-blue: #4f9eff;
  --hub-text: #f1f5f9;
  --hub-muted: #8ea0b8;
  --hub-radius: 20px;
  --hub-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[hidden] { display: none !important; }
.hub-stack { display: grid; gap: 18px; }
.hub-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hub-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hub-expense-rules { display: grid; gap: 8px; margin-top: 12px; }
.hub-expense-rules .hub-row-between { padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,.035); font-size: 11px; }
.hub-expense-rules small { display: block; margin-top: 3px; color: var(--hub-muted, #94a3b8); font-size: 9px; }
.hub-muted { color: var(--hub-muted); font-size: 0.82rem; }
.hub-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.hub-center { text-align: center; }
.hub-align-end { text-align: right; }
.hub-accent { color: var(--accent, var(--hub-cyan)); font-weight: 700; font-size: 0.85rem; }
.hub-eyebrow { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hub-muted); font-weight: 700; }

/* ── Glass card with animated neon edge ── */
.hub-card {
  position: relative;
  padding: 22px;
  border-radius: var(--hub-radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)), var(--hub-bg);
  border: 1px solid var(--hub-border);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: transform 0.35s var(--hub-ease), border-color 0.35s var(--hub-ease), box-shadow 0.35s var(--hub-ease);
}
.hub-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent, var(--hub-cyan)) 70%, transparent), transparent 35%, transparent 65%, color-mix(in srgb, var(--hub-purple) 55%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}
.hub-card:hover { transform: translateY(-2px); border-color: rgba(148, 197, 255, 0.28); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42), 0 0 40px color-mix(in srgb, var(--accent, var(--hub-cyan)) 14%, transparent); }

.hub-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hub-section-head h3 { margin: 0; font-size: 0.8rem; letter-spacing: 0.12em; font-weight: 900; color: var(--hub-text); }
.hub-section-icon { filter: drop-shadow(0 0 8px var(--accent)); }
.hub-section-trailing { margin-left: auto; padding: 3px 10px; border-radius: 999px; font: 700 0.72rem 'JetBrains Mono', monospace; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* ── Neon badges ── */
.hub-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 900; letter-spacing: 0.04em;
  color: var(--badge); background: color-mix(in srgb, var(--badge) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--badge) 55%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--badge) 30%, transparent);
}
.hub-badge i { font-style: normal; }
.hub-badge.is-pulsing { animation: hub-glow 2.2s ease-in-out infinite; }
@keyframes hub-glow { 50% { box-shadow: 0 0 22px color-mix(in srgb, var(--badge) 70%, transparent); } }

/* ── Profile & KPI strip ── */
.hub-profile { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; --accent: var(--tier); }
.hub-profile-id { display: flex; align-items: center; gap: 16px; }
.hub-profile-id h2 { margin: 0 0 8px; font-size: 1.45rem; }
.hub-profile-avatar {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  font-weight: 900; font-size: 1.3rem; color: #0b1118;
  background: linear-gradient(135deg, var(--tier), #ffffff);
  box-shadow: 0 0 28px color-mix(in srgb, var(--tier) 55%, transparent);
}
.hub-profile-code { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--hub-border); }
.hub-profile-code strong { font-size: 1.1rem; color: var(--hub-cyan); letter-spacing: 0.08em; }

.hub-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hub-kpi {
  padding: 16px; border-radius: 16px; background: var(--hub-bg); border: 1px solid var(--hub-border);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: hub-rise 0.6s var(--hub-ease) both;
}
.hub-kpi-head { display: flex; justify-content: space-between; color: var(--hub-muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.hub-kpi-head i { font-style: normal; filter: drop-shadow(0 0 6px var(--kpi)); }
.hub-kpi-value { margin: 8px 0 4px; font: 900 1.55rem 'JetBrains Mono', monospace; color: var(--kpi); text-shadow: 0 0 18px color-mix(in srgb, var(--kpi) 40%, transparent); }
.hub-kpi-caption { font-size: 0.75rem; color: var(--hub-muted); }

/* ── Tabs with sliding neon indicator ── */
.hub-tabs {
  position: relative; display: flex; gap: 4px; padding: 5px; overflow-x: auto; scrollbar-width: none;
  border-radius: 16px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--hub-border);
}
.hub-tabs::-webkit-scrollbar { display: none; }
.hub-tab {
  position: relative; z-index: 1; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border: 0; border-radius: 12px; background: transparent; color: var(--hub-muted);
  font-weight: 700; font-size: 0.88rem; cursor: pointer; white-space: nowrap; transition: color 0.25s var(--hub-ease);
}
.hub-tab:hover, .hub-tab.active { color: #fff; }
.hub-tab-indicator {
  position: absolute; top: 5px; left: 0; height: calc(100% - 10px); border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.32), rgba(192, 132, 252, 0.22));
  border: 1px solid rgba(34, 211, 238, 0.55); box-shadow: 0 0 20px rgba(34, 211, 238, 0.28);
  transition: transform 0.45s var(--hub-ease), width 0.45s var(--hub-ease);
}
.hub-tab-content.hub-enter { animation: hub-fade 0.5s var(--hub-ease) both; }
@keyframes hub-fade { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes hub-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── Metrics & progress ── */
.hub-metric-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.hub-metric-row.wrap { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.hub-metric { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.035); border: 1px solid color-mix(in srgb, var(--metric) 25%, transparent); }
.hub-metric-title { display: flex; gap: 6px; font-size: 0.72rem; color: var(--hub-muted); font-weight: 700; }
.hub-metric-value { font: 900 1.25rem 'JetBrains Mono', monospace; color: #fff; margin: 4px 0 2px; }
.hub-metric-caption { font-size: 0.7rem; color: var(--metric); }
.hub-progress { height: 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; margin-top: 8px; }
.hub-progress-fill {
  width: var(--p); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--from), var(--to));
  box-shadow: 0 0 14px color-mix(in srgb, var(--to) 60%, transparent); animation: hub-grow 1.1s var(--hub-ease) both;
}
@keyframes hub-grow { from { width: 0; } }

/* ── Tier hero & Active Bonus ── */
.hub-tier-hero { --accent: var(--tier); background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--tier) 30%, transparent), transparent 55%), var(--hub-bg); }
.hub-tier-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hub-tier-title { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 900; letter-spacing: 0.02em; background: linear-gradient(90deg, var(--tier), #ffffff); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--tier) 45%, transparent)); }
.hub-tier-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hub-next-tier { display: grid; gap: 4px; font-size: 0.88rem; }
.hub-bonus { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hub-bonus-body { flex: 1 1 260px; }
.hub-bonus p { margin: 0 0 12px; color: #dbe4ef; }
.hub-countdown { display: inline-flex; gap: 8px; padding: 7px 14px; border-radius: 999px; font: 900 1rem 'JetBrains Mono', monospace; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.hub-ring-arc { animation: hub-ring 1.3s var(--hub-ease) forwards; filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.6)); }
@keyframes hub-ring { to { stroke-dashoffset: var(--ring-offset); } }
.hub-ring-value { fill: #fff; font: 900 28px 'JetBrains Mono', monospace; }
.hub-ring-caption { fill: var(--hub-muted); font: 700 11px Inter, sans-serif; }

/* ── Status timeline ── */
.hub-timeline { display: flex; align-items: flex-start; overflow-x: auto; padding: 8px 4px 14px; scroll-behavior: smooth; scrollbar-width: thin; }
.hub-tl-node { flex: 0 0 78px; display: grid; justify-items: center; gap: 5px; background: none; border: 0; color: var(--hub-muted); cursor: pointer; }
.hub-tl-dot {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: var(--node);
  background: rgba(255, 255, 255, 0.05); border: 2px solid color-mix(in srgb, var(--node) 40%, transparent); transition: transform 0.3s var(--hub-ease);
}
.hub-tl-node.done .hub-tl-dot { background: var(--node); color: #0b1118; box-shadow: 0 0 18px color-mix(in srgb, var(--node) 70%, transparent); }
.hub-tl-node.next .hub-tl-dot { animation: hub-pulse 1.6s ease-in-out infinite; border-color: var(--node); }
.hub-tl-node.selected .hub-tl-dot { transform: scale(1.12); outline: 2px solid color-mix(in srgb, var(--node) 60%, transparent); outline-offset: 3px; }
.hub-tl-title { font-size: 0.72rem; font-weight: 800; color: #e2e8f0; }
.hub-tl-threshold { font: 700 0.68rem 'JetBrains Mono', monospace; color: var(--node); }
.hub-tl-link { flex: 0 0 26px; height: 3px; margin-top: 20px; border-radius: 3px; background: linear-gradient(90deg, var(--from), var(--to)) 0 0 / var(--p) 100% no-repeat, rgba(255, 255, 255, 0.08); }
@keyframes hub-pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--node) 18%, transparent), 0 0 22px color-mix(in srgb, var(--node) 55%, transparent); } }
.hub-tl-detail { margin-top: 6px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--node) 8%, transparent); border: 1px solid color-mix(in srgb, var(--node) 30%, transparent); animation: hub-rise 0.45s var(--hub-ease); }
.hub-remaining b { font: 900 1.1rem 'JetBrains Mono', monospace; color: #fff; }

/* ── Chips, toolbars, legends ── */
.hub-toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-bottom: 12px; }
.hub-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.hub-chip {
  padding: 6px 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.09); background: rgba(255, 255, 255, 0.04);
  color: var(--hub-muted); font-weight: 700; font-size: 0.78rem; cursor: pointer; transition: all 0.25s var(--hub-ease);
}
.hub-chip:hover { color: #fff; border-color: color-mix(in srgb, var(--chip) 50%, transparent); }
.hub-chip.active { color: #fff; background: color-mix(in srgb, var(--chip) 28%, transparent); border-color: var(--chip); box-shadow: 0 0 14px color-mix(in srgb, var(--chip) 35%, transparent); }
.hub-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.hub-legend-item { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); color: #e2e8f0; font-size: 0.78rem; cursor: pointer; }
.hub-legend-item i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.hub-legend-item b { font-family: 'JetBrains Mono', monospace; color: var(--c); }
.hub-legend-item.off { opacity: 0.35; text-decoration: line-through; }
.hub-legend-total { margin-left: auto; font: 900 0.9rem 'JetBrains Mono', monospace; color: var(--hub-green); }

/* ── SVG charts ── */
.hub-chart { position: relative; }
.hub-svg { width: 100%; height: auto; overflow: visible; display: block; }
.hub-grid { stroke: rgba(255, 255, 255, 0.06); }
.hub-axis { fill: var(--hub-muted); font: 600 11px 'JetBrains Mono', monospace; }
.hub-guide { stroke: rgba(255, 255, 255, 0.4); stroke-dasharray: 4 3; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.hub-bar { transform-box: fill-box; transform-origin: bottom; animation: hub-bar 0.7s var(--hub-ease) both; filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.25)); }
@keyframes hub-bar { from { transform: scaleY(0); } }
.hub-tooltip {
  position: absolute; top: 4px; transform: translateX(-50%); min-width: 170px; padding: 10px 12px; border-radius: 12px; pointer-events: none;
  background: rgba(10, 16, 26, 0.88); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transition: opacity 0.18s; font-size: 0.75rem; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.hub-tooltip.visible { opacity: 1; }
.hub-tooltip-title { font-weight: 900; margin-bottom: 6px; color: #fff; }
.hub-tooltip-row { display: flex; align-items: center; gap: 6px; color: #cbd5e1; }
.hub-tooltip-row i { width: 7px; height: 7px; border-radius: 50%; }
.hub-tooltip-row b { margin-left: auto; font-family: 'JetBrains Mono', monospace; color: #fff; }

/* ── Funnel ── */
.hub-funnel { display: grid; gap: 10px; }
.hub-funnel-row { display: grid; grid-template-columns: 170px 1fr 110px; gap: 12px; align-items: center; animation: hub-rise 0.6s var(--hub-ease) both; }
.hub-funnel-label { font-size: 0.82rem; font-weight: 700; color: #e2e8f0; }
.hub-funnel-track { height: 30px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.hub-funnel-bar {
  width: var(--w); height: 100%; border-radius: inherit; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 35%, transparent), var(--c)); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 45%, transparent);
  animation: hub-funnel 1s var(--hub-ease) both; font: 900 0.8rem 'JetBrains Mono', monospace; color: #0b1118;
}
@keyframes hub-funnel { from { width: 0; } }
.hub-funnel-row:hover .hub-funnel-bar, .hub-funnel-row:focus .hub-funnel-bar { filter: brightness(1.15); }
.hub-funnel-rate { font: 900 0.9rem 'JetBrains Mono', monospace; color: #fff; display: grid; }
.hub-funnel-rate small { font: 600 0.68rem Inter, sans-serif; color: var(--hub-muted); }

/* ── Network explorer ── */
.hub-search { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--hub-border); }
.hub-search input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; font-size: 0.9rem; }
.hub-member-list { display: grid; gap: 8px; }
.hub-member { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); transition: background 0.25s; }
.hub-member:hover { background: rgba(255, 255, 255, 0.06); }
.hub-avatar { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; background: linear-gradient(135deg, var(--level), color-mix(in srgb, var(--level) 25%, transparent)); }
.hub-avatar i { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--status); border: 2px solid #0e1520; box-shadow: 0 0 8px var(--status); }
.hub-member-name { font-weight: 800; color: #fff; }
.hub-level { margin-left: 6px; padding: 1px 7px; border-radius: 999px; font: 900 0.68rem 'JetBrains Mono', monospace; color: var(--level); background: color-mix(in srgb, var(--level) 15%, transparent); }
.hub-member-meta { font: 500 0.74rem 'JetBrains Mono', monospace; color: var(--hub-muted); }
.hub-member-side { text-align: right; display: grid; gap: 2px; }
.hub-status { font-size: 0.74rem; font-weight: 800; color: var(--status); }
.hub-member-side b { font: 900 0.82rem 'JetBrains Mono', monospace; color: var(--hub-green); }

/* Shared server-driven pagination for all cabinet list surfaces. */
.hub-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 16px 0 4px; }
.hub-page { min-width: 32px; height: 32px; padding: 0 9px; border: 1px solid var(--hub-border); border-radius: 9px; background: rgba(255,255,255,.04); color: var(--hub-muted); font-weight: 800; cursor: pointer; }
.hub-page:hover, .hub-page.active { color: #06121c; background: var(--hub-cyan); border-color: var(--hub-cyan); }
.hub-page-gap { color: var(--hub-muted); padding: 0 3px; }

/* ── Wallet ── */
.hub-balance { font: 900 clamp(2rem, 5vw, 2.6rem) 'JetBrains Mono', monospace; background: linear-gradient(90deg, var(--hub-green), var(--hub-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 16px rgba(74, 222, 128, 0.35)); }
.hub-btn { padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); color: #fff; font-weight: 800; cursor: pointer; transition: all 0.25s var(--hub-ease); }
.hub-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 0 18px rgba(34, 211, 238, 0.3); }
.hub-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.hub-btn.primary { background: linear-gradient(135deg, var(--hub-green), var(--hub-cyan)); color: #06121c; border: 0; }
.hub-btn.ghost { background: rgba(34, 211, 238, 0.08); border-color: rgba(34, 211, 238, 0.4); }
.hub-btn.tiny { padding: 5px 10px; font-size: 0.74rem; }
.hub-btn.wide { width: 100%; margin-top: 14px; padding: 13px; }
.hub-btn.is-done { background: var(--hub-green); color: #06121c; }
.hub-method { display: flex; gap: 12px; align-items: center; padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
.hub-method > div { display: grid; gap: 2px; }
.hub-method small { color: var(--hub-muted); font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; }
.hub-method-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(34, 211, 238, 0.1); font-weight: 900; color: var(--hub-cyan); }
.hub-auto { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: rgba(74, 222, 128, 0.07); border: 1px dashed rgba(74, 222, 128, 0.3); margin: 10px 0; font-size: 0.84rem; }
.hub-ledger-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; margin-top: 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
.hub-ledger-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); font-weight: 900; }
.hub-ledger-main { display: grid; gap: 2px; min-width: 0; }
.hub-ledger-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.86rem; }
.hub-ledger-main small { color: var(--hub-muted); font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; }
.hub-ledger-side { text-align: right; display: grid; }
.hub-ledger-side b { font: 900 0.9rem 'JetBrains Mono', monospace; color: #fff; }
.hub-ledger-side b.plus { color: var(--hub-green); }
.hub-ledger-side small { font-size: 0.7rem; color: var(--hub-muted); }
.hub-ledger-side small.st-held { color: var(--hub-gold); }
.hub-dialog { border: 0; padding: 0; background: transparent; color: var(--hub-text); }
.hub-dialog::backdrop { background: rgba(3, 7, 14, 0.7); backdrop-filter: blur(6px); }
.hub-dialog-card { display: grid; gap: 12px; min-width: min(420px, 90vw); padding: 24px; border-radius: 22px; background: var(--hub-bg-strong); border: 1px solid var(--hub-border); }
.hub-dialog-card label { display: grid; gap: 6px; font-size: 0.82rem; color: var(--hub-muted); }
.hub-dialog-card input, .hub-dialog-card select, .hub-inline-form input { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--hub-border); background: rgba(0, 0, 0, 0.35); color: #fff; font-size: 0.95rem; }
.hub-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ── Tools ── */
.hub-channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; margin-bottom: 12px; }
.hub-channel { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.04); color: #e2e8f0; font-weight: 700; cursor: pointer; transition: all 0.25s var(--hub-ease); }
.hub-channel.active { border-color: var(--hub-cyan); background: rgba(34, 211, 238, 0.18); box-shadow: 0 0 16px rgba(34, 211, 238, 0.3); }
.hub-inline-form { display: flex; gap: 8px; margin-bottom: 12px; }
.hub-inline-form input { flex: 1; font-family: 'JetBrains Mono', monospace; }
.hub-url { display: block; padding: 12px 14px; border-radius: 14px; background: rgba(34, 211, 238, 0.07); border: 1px solid rgba(34, 211, 238, 0.25); font: 600 0.8rem 'JetBrains Mono', monospace; word-break: break-all; color: #e0f2fe; }
.hub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hub-qr-card { text-align: center; }
.hub-qr { display: inline-block; padding: 14px; border-radius: 24px; background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 40px rgba(192, 132, 252, 0.25); animation: hub-rise 0.6s var(--hub-ease); }
.hub-qr svg { display: block; max-width: 100%; height: auto; }
.hub-promo { padding: 12px; margin-bottom: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(251, 191, 36, 0.15); }
.hub-promo pre { margin: 8px 0 0; white-space: pre-wrap; font: 500 0.82rem Inter, system-ui, sans-serif; color: #cbd5e1; }

/* ── Leaderboard ── */
.hub-me { display: flex; align-items: center; gap: 20px; }
.hub-me-rank { font: 900 2.6rem 'JetBrains Mono', monospace; color: #fff; text-shadow: 0 0 24px rgba(251, 191, 36, 0.55); min-width: 110px; text-align: center; }
.hub-live { font: 800 0.72rem 'JetBrains Mono', monospace; color: var(--hub-muted); }
.hub-live.on { color: #ef4444; animation: hub-blink 1.4s steps(2, start) infinite; }
@keyframes hub-blink { to { opacity: 0.35; } }
.hub-podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; height: 210px; margin: 16px 0; }
.hub-podium-col { display: grid; grid-template-rows: auto auto 1fr; justify-items: center; gap: 4px; height: 100%; }
.hub-podium-col strong { font-size: 0.8rem; text-align: center; }
.hub-podium-col.me strong { color: var(--hub-cyan); }
.hub-podium-bar {
  align-self: end; width: 100%; height: var(--h); border-radius: 14px 14px 6px 6px; display: grid; place-content: center; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 60%, transparent), color-mix(in srgb, var(--c) 10%, transparent));
  border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 35%, transparent);
  animation: hub-bar 0.8s var(--hub-ease) both; transform-origin: bottom;
}
.hub-podium-bar b { font: 900 1.2rem 'JetBrains Mono', monospace; }
.hub-podium-crown { font-size: 1.3rem; filter: drop-shadow(0 0 8px var(--c)); }
.hub-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hub-board li { display: grid; grid-template-columns: 56px 1fr auto auto 56px; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); animation: hub-rise 0.5s var(--hub-ease) both; }
.hub-board li.me { background: rgba(34, 211, 238, 0.12); border: 1px solid rgba(34, 211, 238, 0.35); }
.hub-board-rank { font: 900 0.9rem 'JetBrains Mono', monospace; color: #cbd5e1; }
.hub-board-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-board small { color: var(--hub-muted); text-transform: capitalize; }
.hub-board b { text-align: right; font: 900 0.95rem 'JetBrains Mono', monospace; }

/* ── Admin bars ── */
.hub-hbar { display: grid; grid-template-columns: 150px 1fr 90px; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 0.84rem; }
.hub-hbar div { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.hub-hbar i { display: block; width: var(--w); height: 100%; background: var(--c); box-shadow: 0 0 12px var(--c); animation: hub-funnel 1s var(--hub-ease) both; }
.hub-hbar b { text-align: right; font-family: 'JetBrains Mono', monospace; }

/* ── Empty, skeleton, toast ── */
.hub-empty { display: grid; justify-items: center; gap: 6px; padding: 26px; text-align: center; color: var(--hub-muted); }
.hub-empty-icon { font-size: 1.8rem; }
.hub-empty p { margin: 0; font-size: 0.82rem; }
.hub-skeleton { border-radius: var(--hub-radius); background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 70%) 0 0 / 300% 100%, var(--hub-bg); animation: hub-shimmer 1.4s linear infinite; }
@keyframes hub-shimmer { to { background-position: -300% 0, 0 0; } }
.hub-toast { position: fixed; left: 50%; bottom: 28px; z-index: 9999; transform: translate(-50%, 20px); opacity: 0; padding: 12px 20px; border-radius: 999px; background: rgba(10, 16, 26, 0.92); border: 1px solid rgba(74, 222, 128, 0.4); color: #fff; font-weight: 700; box-shadow: 0 0 30px rgba(74, 222, 128, 0.25); transition: all 0.35s var(--hub-ease); }
.hub-toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ── Responsive & accessibility ── */
@media (max-width: 1024px) { .hub-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .hub-card { padding: 16px; }
  .hub-kpi-grid, .hub-metric-row { grid-template-columns: 1fr 1fr; }
  .hub-funnel-row { grid-template-columns: 1fr; gap: 6px; }
  .hub-board li { grid-template-columns: 44px 1fr auto 44px; }
  .hub-board li small { display: none; }
  .hub-hbar { grid-template-columns: 90px 1fr 70px; }
  .hub-me { flex-direction: column; text-align: center; }
  .hub-tier-badges { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
