:root {
  --void-950: #06070d;
  --void-900: #0a0c14;
  --void-850: #10121d;
  --void-800: #151827;
  --void-700: #212637;
  --ink-100: #f7f1df;
  --ink-200: #ded7c6;
  --ink-300: #aaa7b6;
  --ink-500: #6f7486;
  --paladin: #f6c969;
  --paladin-2: #f48cba;
  --mage: #69c8ff;
  --druid: #ff8b3d;
  --rogue: #fff173;
  --priest: #f7f7f7;
  --deathknight: #c41e3a;
  --success: #63e6a0;
  --warning: #ffd166;
  --danger: #ff6678;
  --border: rgba(255, 255, 255, 0.1);
  --panel: rgba(15, 18, 30, 0.82);
  --panel-strong: rgba(21, 24, 39, 0.94);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 8px;
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 22% 9%, rgba(246, 201, 105, 0.18), transparent 34rem),
    radial-gradient(circle at 86% 14%, rgba(244, 140, 186, 0.18), transparent 31rem),
    radial-gradient(circle at 65% 86%, rgba(105, 200, 255, 0.12), transparent 34rem),
    linear-gradient(135deg, #05060c 0%, #0b0e17 48%, #08080f 100%);
  color: var(--ink-100);
  overflow-x: hidden;
}

button,
a {
  color: inherit;
}

button {
  font: inherit;
}

code {
  color: var(--paladin);
}

.app-shell {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100vh;
  padding: 1.25rem;
  border-right: 1px solid var(--border);
  background: rgba(6, 7, 13, 0.76);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
  filter: drop-shadow(0 0 18px rgba(246, 201, 105, 0.35));
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand strong {
  font-size: 1.02rem;
  letter-spacing: 0;
}

.brand small {
  margin-top: 0.18rem;
  color: var(--ink-300);
  font-size: 0.76rem;
}

.nav-list {
  display: grid;
  gap: 0.35rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.55rem;
  padding: 0 0.7rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink-300);
  text-decoration: none;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.nav-link:hover,
.nav-link.active {
  border-color: rgba(246, 201, 105, 0.24);
  background: linear-gradient(135deg, rgba(246, 201, 105, 0.16), rgba(244, 140, 186, 0.08));
  color: var(--ink-100);
}

.icon {
  display: inline-grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border: 1px solid rgba(246, 201, 105, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--paladin);
  font-size: 0.72rem;
  font-weight: 800;
}

.sidebar-panel {
  margin-top: auto;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-panel p {
  margin: 0.6rem 0 0;
  color: var(--ink-300);
  font-size: 0.82rem;
  line-height: 1.5;
}

.main {
  min-width: 0;
  padding: 1.25rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
  margin: -1.25rem -1.25rem 1.25rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 9, 16, 0.78);
  backdrop-filter: blur(22px);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--paladin);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.5vw, 2.5rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 1.02rem;
  line-height: 1.2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: 0;
}

.icon-button,
.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-100);
  cursor: pointer;
}

.icon-button {
  width: 2.5rem;
  padding: 0;
}

.pill-button {
  gap: 0.5rem;
  padding: 0 0.8rem;
  text-decoration: none;
  white-space: nowrap;
}

.icon-button:hover,
.pill-button:hover {
  border-color: rgba(246, 201, 105, 0.34);
  background: rgba(246, 201, 105, 0.12);
}

svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.live-clock {
  display: grid;
  min-width: 5.15rem;
  padding: 0.42rem 0.65rem;
  border: 1px solid rgba(246, 201, 105, 0.2);
  border-radius: var(--radius);
  background: rgba(246, 201, 105, 0.08);
  text-align: right;
}

.live-clock span {
  font-weight: 800;
}

.live-clock small {
  color: var(--ink-300);
  font-size: 0.68rem;
}

.status-strip,
.kpi-grid,
.dashboard-grid {
  display: grid;
  gap: 1rem;
}

.status-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.status-item,
.metric-card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.1rem;
  padding: 0.85rem 1rem;
}

.status-item span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 0.4rem rgba(99, 230, 160, 0.1);
}

.status-item.warning span {
  background: var(--warning);
  box-shadow: 0 0 0 0.4rem rgba(255, 209, 102, 0.1);
}

.status-item strong,
.status-item small {
  display: block;
}

.status-item small {
  margin-top: 0.15rem;
  color: var(--ink-300);
  font-size: 0.78rem;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.metric-card {
  position: relative;
  min-height: 10rem;
  padding: 1rem;
  overflow: hidden;
}

.metric-card::before {
  position: absolute;
  inset: auto -10% -34% -10%;
  height: 7rem;
  background: radial-gradient(circle, rgba(246, 201, 105, 0.28), transparent 66%);
  content: "";
}

.metric-card.mage::before {
  background: radial-gradient(circle, rgba(105, 200, 255, 0.22), transparent 66%);
}

.metric-card.druid::before {
  background: radial-gradient(circle, rgba(255, 139, 61, 0.22), transparent 66%);
}

.metric-card.rogue::before {
  background: radial-gradient(circle, rgba(255, 102, 120, 0.18), transparent 66%);
}

.metric-card p {
  margin-bottom: 0.35rem;
  color: var(--ink-300);
  font-size: 0.82rem;
}

.metric-card strong {
  display: block;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1;
}

.metric-card canvas {
  position: absolute;
  inset: auto 0.8rem 0.65rem;
  width: calc(100% - 1.6rem);
  height: 4.2rem;
}

.trend {
  position: absolute;
  top: 1rem;
  right: 1rem;
  min-width: 3.2rem;
  padding: 0.25rem 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
}

.trend.down {
  color: var(--paladin);
}

.dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.panel {
  min-width: 0;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 56%),
    var(--panel);
}

.panel.wide {
  grid-column: span 2;
}

.panel.full {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.65rem;
  padding: 0 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-300);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.tag.success {
  border-color: rgba(99, 230, 160, 0.22);
  color: var(--success);
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13rem;
  gap: 1rem;
  align-items: center;
}

.chart-canvas {
  display: block;
  width: 100%;
  height: 20rem;
}

.chart-canvas.compact {
  height: 17.5rem;
}

.legend-list,
.legend-grid,
.ranking-list,
.health-stack {
  display: grid;
  gap: 0.6rem;
}

.legend-item,
.rank-row,
.health-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.legend-line,
.rank-top,
.health-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: var(--paladin);
}

.legend-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  color: var(--ink-200);
  font-size: 0.82rem;
}

.legend-value,
.rank-value,
.health-value {
  color: var(--ink-100);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.meter {
  height: 0.4rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--paladin), var(--paladin-2));
}

.legend-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.health-row {
  grid-template-columns: 1fr;
}

.health-row small,
.rank-row small {
  color: var(--ink-300);
}

.lookup-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: min(42rem, 100%);
  min-height: 2.7rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(246, 201, 105, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-100);
  font: inherit;
}

.search-box input::placeholder {
  color: var(--ink-500);
}

.privacy-note {
  color: var(--ink-300);
  font-size: 0.78rem;
  text-align: right;
}

.user-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(21rem, 0.65fr);
  gap: 1rem;
  align-items: start;
}

.user-table-wrap,
.log-table-wrap,
.performance-table-wrap,
.run-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.user-table,
.log-table,
.performance-table,
.run-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.performance-table {
  min-width: 820px;
}

.run-table {
  min-width: 980px;
}

.user-table th,
.user-table td,
.log-table th,
.log-table td,
.performance-table th,
.performance-table td,
.run-table th,
.run-table td {
  padding: 0.78rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  text-align: left;
  vertical-align: top;
  font-size: 0.83rem;
}

.user-table th,
.log-table th,
.performance-table th,
.run-table th {
  color: var(--ink-300);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.user-table tr:last-child td,
.log-table tr:last-child td,
.performance-table tr:last-child td,
.run-table tr:last-child td {
  border-bottom: 0;
}

.performance-table td:first-child {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.run-table td small {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-500);
}

.rank-number {
  display: inline-grid;
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(246, 201, 105, 0.18);
  border-radius: 50%;
  color: var(--paladin);
  font-size: 0.72rem;
  font-weight: 900;
}

.key-chip {
  display: inline-flex;
  min-width: 2.5rem;
  min-height: 1.6rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(105, 200, 255, 0.2);
  border-radius: 999px;
  background: rgba(105, 200, 255, 0.1);
  color: var(--mage);
  font-weight: 900;
}

.user-select {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  min-width: 9.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-100);
  cursor: pointer;
  text-align: left;
}

.user-select:hover,
.user-select.selected {
  border-color: rgba(246, 201, 105, 0.25);
  background: rgba(246, 201, 105, 0.09);
}

.user-select small,
.character-name + small {
  display: block;
  margin-top: 0.16rem;
  color: var(--ink-500);
  font-size: 0.72rem;
}

.character-name {
  font-weight: 900;
}

.status-chip {
  display: inline-flex;
  min-height: 1.55rem;
  align-items: center;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: rgba(99, 230, 160, 0.11);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-chip.offline {
  background: rgba(170, 167, 182, 0.1);
  color: var(--ink-300);
}

.user-detail {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(246, 201, 105, 0.14);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 78% 0%, rgba(246, 201, 105, 0.16), transparent 14rem),
    rgba(255, 255, 255, 0.04);
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.detail-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.detail-head small {
  color: var(--ink-300);
}

.class-orb {
  width: 2.3rem;
  height: 2.3rem;
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 1.4rem currentColor;
}

.identity-grid,
.stat-strip {
  display: grid;
  gap: 0.6rem;
}

.identity-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.identity-grid div,
.stat-strip div,
.support-note,
.mini-section {
  padding: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.identity-grid span,
.stat-strip span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink-500);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.identity-grid strong,
.stat-strip strong {
  display: block;
  overflow-wrap: anywhere;
}

.stat-strip small {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-300);
  font-size: 0.68rem;
  line-height: 1.3;
}

.external-link {
  display: inline-flex;
  width: fit-content;
  min-height: 2.2rem;
  align-items: center;
  padding: 0 0.7rem;
  border: 1px solid rgba(105, 200, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(105, 200, 255, 0.08);
  color: var(--mage);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.external-link:hover {
  border-color: rgba(105, 200, 255, 0.42);
  background: rgba(105, 200, 255, 0.14);
}

.download-link {
  display: inline-flex;
  min-height: 1.8rem;
  align-items: center;
  padding: 0 0.55rem;
  border: 1px solid rgba(105, 200, 255, 0.25);
  border-radius: var(--radius);
  background: rgba(105, 200, 255, 0.08);
  color: var(--mage);
  font-size: 0.72rem;
  font-weight: 850;
  text-decoration: none;
}

.download-link:hover {
  border-color: rgba(105, 200, 255, 0.48);
  background: rgba(105, 200, 255, 0.14);
}

.muted-value {
  color: var(--ink-300);
  font-size: 0.74rem;
}

.support-note p {
  margin: 0.35rem 0 0;
  color: var(--ink-300);
  line-height: 1.45;
}

.mini-section h4 {
  margin: 0 0 0.6rem;
  font-size: 0.84rem;
}

.session-row,
.upload-row {
  display: grid;
  gap: 0.18rem;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.session-row:first-of-type,
.upload-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.session-row small,
.upload-row small {
  color: var(--ink-300);
}

.run-history-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.run-history-row > div:first-child {
  min-width: 0;
}

.run-history-row small {
  display: block;
  margin-top: 0.2rem;
}

.run-output {
  display: grid;
  gap: 0.18rem;
  color: var(--ink-200);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.empty-state {
  margin: 0;
  color: var(--ink-300);
  font-size: 0.8rem;
  line-height: 1.5;
}

.level {
  display: inline-flex;
  min-width: 3.9rem;
  justify-content: center;
  padding: 0.22rem 0.42rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
}

.level.debug {
  background: rgba(105, 200, 255, 0.14);
  color: var(--mage);
}

.level.warn {
  background: rgba(255, 209, 102, 0.14);
  color: var(--warning);
}

.level.error {
  background: rgba(255, 102, 120, 0.16);
  color: var(--danger);
}

.compact-mode .metric-card {
  min-height: 8.8rem;
}

.compact-mode .panel {
  padding: 0.8rem;
}

.compact-mode .chart-canvas {
  height: 17.5rem;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 5rem minmax(0, 1fr);
  }

  .sidebar {
    padding: 0.9rem;
    align-items: center;
  }

  .brand span,
  .nav-link:not(.active)::after,
  .nav-link {
    font-size: 0;
  }

  .nav-link {
    justify-content: center;
    width: 3rem;
    padding: 0;
  }

  .nav-link .icon {
    margin: 0;
  }

  .sidebar-panel {
    display: none;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    z-index: 5;
    top: 0;
    flex-direction: row;
    width: 100%;
    height: auto;
    padding: 0.75rem;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .brand {
    min-width: 2.8rem;
  }

  .nav-list {
    display: flex;
  }

  .main {
    padding: 1rem;
  }

  .topbar {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    margin: 0 0 1rem;
    padding: 0 0 1rem;
    background: transparent;
    backdrop-filter: none;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .status-strip,
  .kpi-grid,
  .dashboard-grid,
  .panel.wide {
    grid-template-columns: 1fr;
  }

  .panel.wide,
  .panel.full {
    grid-column: 1 / -1;
  }

  .lookup-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .privacy-note {
    text-align: left;
  }

  .chart-row {
    grid-template-columns: 1fr;
  }

  .legend-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .pill-button {
    width: 100%;
  }

  .live-clock {
    text-align: left;
  }

  .metric-card strong {
    font-size: 2rem;
  }

  .identity-grid,
  .stat-strip {
    grid-template-columns: 1fr;
  }

  .run-history-row {
    grid-template-columns: 1fr;
  }

  .run-output {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: left;
  }
}

/* --- Mythic+ resultat og version-sammenligning --- */
.result-chip {
  display: inline-flex;
  min-width: 4.6rem;
  min-height: 1.6rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.result-chip.ok {
  border-color: rgba(99, 230, 160, 0.28);
  background: rgba(99, 230, 160, 0.12);
  color: #63e6a0;
}

.result-chip.warn {
  border-color: rgba(255, 139, 61, 0.28);
  background: rgba(255, 139, 61, 0.12);
  color: #ff8b3d;
}

.result-chip.bad {
  border-color: rgba(255, 102, 120, 0.26);
  background: rgba(255, 102, 120, 0.1);
  color: #ff6678;
}

.result-chip.neutral {
  border-color: rgba(222, 215, 198, 0.16);
  background: rgba(222, 215, 198, 0.07);
  color: #9aa0b0;
}

.delta {
  margin-left: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.delta.up { color: #63e6a0; }
.delta.down { color: #ff8b3d; }

.stat-estimate { color: #ffd166; }
.stat-estimate sup { font-size: 0.7em; opacity: 0.8; }

/* --- Stats-siden --- */
.stats-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.hero-tile {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.hero-tile strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero-tile span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.9rem;
  /* Uden denne straekkes et lavt kort (fx region-listen) til samme hoejde som
     donut-kortene ved siden af, og efterlader et stort tomt felt. */
  align-items: start;
}

.stats-card {
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
  min-width: 0;
}

.stats-card.wide { grid-column: 1 / -1; }

.stats-card h3 {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.stats-card h3 small {
  margin-left: 0.4rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.7;
}

.stats-card canvas { display: block; width: 100%; }
#classDonut, #roleDonut { width: 150px; height: 150px; flex: 0 0 150px; }
#hourChart { height: 150px; }

.donut-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.legend-list { flex: 1 1 160px; min-width: 0; }

.bar-list { display: flex; flex-direction: column; gap: 0.4rem; }

.bar-list.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 0.4rem 1.6rem;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) 1fr auto;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.8rem;
}

.bar-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 700;
}

.bar-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  min-width: 3px;
}

.bar-value {
  min-width: 3.2rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.region-chip {
  display: inline-flex;
  padding: 0.1rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.run-total {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Sidehovedet er sticky, saa et #anker-spring lander bag det uden denne. */
.panel[id] { scroll-margin-top: 92px; }
