/* =========================================================
   LUMEN — analytics dashboard
   ========================================================= */

.dashboard-page {
  background: #070907;
  color: var(--ink);
  overflow-x: hidden;
}

.dashboard-page::after {
  opacity: 0.022;
}

.dash-shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- sidebar ---------- */

.dash-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: 236px;
  padding: 20px 15px 16px;
  border-right: 1px solid var(--line);
  background: #090b09;
  transition: transform 0.45s var(--ease);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 7px 20px;
}

.sidebar-head .brand {
  font-size: 13px;
  letter-spacing: 0.16em;
}

.sidebar-head .brand-mark {
  width: 26px;
  height: 26px;
}

.sidebar-close {
  display: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.event-switcher {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.event-switcher:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
}

.event-switcher-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: none;
  border: 1px solid rgba(216, 255, 66, 0.22);
  border-radius: 7px;
  background: rgba(216, 255, 66, 0.06);
  color: var(--lime);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.event-switcher-copy {
  min-width: 0;
  flex: 1;
}

.event-switcher-copy strong {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
}

.event-switcher-copy strong .live-dot {
  width: 4px;
  height: 4px;
}

.event-switcher-copy span {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: #676d63;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-switcher > svg {
  width: 12px;
  height: 12px;
  flex: none;
  color: #5f655b;
}

.dash-nav {
  flex: 1;
  overflow-y: auto;
  margin-top: 24px;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.dash-nav::-webkit-scrollbar {
  display: none;
}

.nav-group-label {
  margin: 0 9px 9px;
  color: #555b51;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dash-nav + .nav-group-label {
  margin-top: 23px;
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 37px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #858b80;
  font-family: inherit;
  font-size: 11.5px;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

.dash-nav-link:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink-dim);
}

.dash-nav-link.is-active {
  background: rgba(216, 255, 66, 0.075);
  color: var(--ink);
}

.dash-nav-link.is-active svg {
  color: var(--lime);
}

.dash-nav-link svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: #6e7468;
}

.dash-nav-link .nav-count {
  margin-left: auto;
  padding: 2px 5px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
  color: #8b9185;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
}

.dash-nav-link .nav-count.live-count {
  background: rgba(216, 255, 66, 0.12);
  color: var(--lime);
}

.sidebar-bottom {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.sidebar-help {
  position: relative;
  overflow: hidden;
  margin-bottom: 13px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(216, 255, 66, 0.1), transparent 57%),
    rgba(255, 255, 255, 0.018);
}

.sidebar-help span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--lime);
  font-size: 6.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sidebar-help span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.sidebar-help strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
}

.sidebar-help p {
  margin-top: 3px;
  color: #71776c;
  font-size: 8px;
  line-height: 1.45;
}

.sidebar-help a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  color: var(--ink-dim);
  font-size: 8px;
  font-weight: 500;
}

.sidebar-help a:hover {
  color: var(--lime);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 4px;
}

.sidebar-user .avatar {
  width: 30px;
  height: 30px;
  margin: 0;
  border: 0;
  flex: none;
  background: linear-gradient(145deg, #8b7359, #3a2b1c);
  font-size: 8px;
}

.sidebar-user-copy {
  min-width: 0;
  flex: 1;
}

.sidebar-user-copy strong {
  display: block;
  color: var(--ink-dim);
  font-size: 9.5px;
  font-weight: 500;
}

.sidebar-user-copy span {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: #5e645a;
  font-size: 7.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user > svg {
  width: 13px;
  height: 13px;
  color: #5c6258;
}

.sidebar-backdrop {
  display: none;
}

/* ---------- main region ---------- */

.dash-main {
  display: flex;
  flex-direction: column;
  width: calc(100% - 236px);
  min-height: 100vh;
  margin-left: 236px;
}

.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  flex: none;
  gap: 20px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 7, 0.8);
  backdrop-filter: blur(18px);
}

.dash-menu {
  display: none;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--ink-dim);
}

.dash-menu svg {
  width: 15px;
  height: 15px;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #666c62;
  font-size: 9.5px;
}

.crumb a {
  color: #777d72;
  transition: color 0.2s;
}

.crumb a:hover {
  color: var(--ink);
}

.crumb svg {
  width: 10px;
  height: 10px;
  color: #4f554c;
}

.crumb strong {
  overflow: hidden;
  color: var(--ink-dim);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.dash-search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
  color: #757b70;
  font-size: 9.5px;
  transition: border-color 0.2s, color 0.2s;
}

.dash-search:hover {
  border-color: var(--line-strong);
  color: var(--ink-dim);
}

.dash-search svg {
  width: 13px;
  height: 13px;
}

.dash-search kbd {
  margin-left: 9px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
  color: #61675d;
  font-family: var(--sans);
  font-size: 7px;
}

.topbar-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: #757b70;
  transition: color 0.2s, border-color 0.2s;
}

.topbar-icon:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.topbar-icon svg {
  width: 14px;
  height: 14px;
}

.topbar-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: #858b80;
  font-size: 9px;
  transition: color 0.2s;
}

.topbar-home:hover {
  color: var(--lime);
}

.topbar-home svg {
  width: 12px;
  height: 12px;
}

.dash-content {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding: 30px 30px 56px;
}

.dash-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.dash-heading h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.9rem, 2.6vw, 2.65rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(216, 255, 66, 0.3);
  border-radius: 30px;
  background: rgba(216, 255, 66, 0.05);
  color: var(--lime);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.live-pill .live-dot {
  width: 4px;
  height: 4px;
}

.dash-subtitle {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: #71776c;
  font-size: 10px;
}

.dash-subtitle i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #4f554c;
}

.dash-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.range-picker {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
}

.range-btn {
  height: 25px;
  padding: 0 9px;
  border-radius: 5px;
  background: transparent;
  color: #777d72;
  font-size: 8px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.range-btn:hover {
  color: var(--ink-dim);
}

.range-btn.is-active {
  background: rgba(255, 255, 255, 0.075);
  color: var(--ink);
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink-dim);
  font-size: 9px;
  transition: border-color 0.2s, color 0.2s;
}

.export-btn:hover {
  border-color: rgba(216, 255, 66, 0.35);
  color: var(--lime);
}

.export-btn svg {
  width: 12px;
  height: 12px;
}

/* ---------- KPI cards ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  scroll-margin-top: 84px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  padding: 17px 17px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(23, 26, 22, 0.55), rgba(11, 13, 11, 0.82));
}

.kpi-card::after {
  content: "";
  position: absolute;
  top: -45px;
  right: -35px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 255, 66, 0.045), transparent 68%);
  pointer-events: none;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #7d8378;
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 5px;
  border-radius: 30px;
  background: rgba(216, 255, 66, 0.08);
  color: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
  letter-spacing: 0;
}

.kpi-delta.is-down {
  background: rgba(255, 116, 108, 0.08);
  color: var(--red);
}

.kpi-value {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: clamp(1.65rem, 2.3vw, 2.15rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.055em;
}

.kpi-sub {
  margin-top: 7px;
  color: #62685e;
  font-size: 8px;
}

.kpi-sub strong {
  color: #8d9388;
  font-weight: 500;
}

.kpi-spark {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 86px;
  height: 30px;
  opacity: 0.75;
}

.kpi-spark path {
  fill: none;
  stroke: rgba(216, 255, 66, 0.65);
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
}

/* ---------- panels ---------- */

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(280px, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.dash-grid-three {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.dash-grid-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(280px, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b0d0b;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head h2 {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.panel-head p {
  margin-top: 4px;
  color: #686e64;
  font-size: 8.5px;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-select {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: #7c8277;
  font-size: 7.5px;
}

.mini-select svg {
  width: 9px;
  height: 9px;
}

.panel-more {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: #6c7268;
}

.panel-more:hover {
  color: var(--ink);
}

.panel-more svg {
  width: 12px;
  height: 12px;
}

/* ---------- chart ---------- */

.chart-card {
  min-height: 391px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 7px;
  border-radius: 4px;
  background: transparent;
  color: #8a9085;
  font-size: 7.5px;
  transition: opacity 0.2s, background 0.2s;
}

.legend-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
}

.legend-toggle i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
}

.legend-toggle[data-series="attendance"] i {
  background: var(--violet);
}

.legend-toggle.is-off {
  opacity: 0.36;
}

.legend-toggle.is-off i {
  background: #585e54;
}

.chart-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.chart-total strong {
  color: var(--ink);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.chart-total span {
  color: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
}

.chart-total small {
  color: #646a60;
  font-size: 7.5px;
}

.chart-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 760 / 300;
  margin-top: 10px;
  touch-action: pan-y;
}

.chart-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-axis text {
  fill: #555b51;
  font-family: var(--sans);
  font-size: 7px;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.055);
  stroke-width: 1;
}

.chart-hover-line {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  top: 12px;
  min-width: 118px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(10, 13, 10, 0.95);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0);
  transition: opacity 0.14s;
  backdrop-filter: blur(10px);
}

.chart-tooltip.is-visible {
  opacity: 1;
}

.chart-tooltip-date {
  margin-bottom: 6px;
  color: #8d9388;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.chart-tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: #8a9085;
  font-size: 8px;
}

.chart-tooltip-row i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
}

.chart-tooltip-row:nth-child(3) i {
  background: var(--violet);
}

.chart-tooltip-row b {
  margin-left: auto;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 500;
}

.chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #5f655b;
  font-size: 7.5px;
}

.chart-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-foot .live-dot {
  width: 3px;
  height: 3px;
}

/* ---------- live panel ---------- */

.live-panel {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(216, 255, 66, 0.055), transparent 50%),
    #0b0d0b;
}

.live-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.live-top .panel-head {
  margin-bottom: 0;
}

.live-number {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 17px;
}

.live-number strong {
  color: var(--ink);
  font-size: clamp(2.25rem, 3.3vw, 2.9rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.live-number span {
  padding-bottom: 4px;
  color: #71776c;
  font-size: 8px;
  line-height: 1.35;
}

.live-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 72px;
  margin-top: 18px;
}

.live-chart i {
  flex: 1;
  min-width: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(to top, rgba(216, 255, 66, 0.08), rgba(216, 255, 66, 0.62));
  animation: liveBar 1.1s var(--ease) both;
}

.live-chart i:nth-child(5n + 2) {
  background: linear-gradient(to top, rgba(216, 255, 66, 0.06), rgba(216, 255, 66, 0.35));
}

.live-chart i:last-child {
  background: var(--lime);
  box-shadow: 0 0 10px rgba(216, 255, 66, 0.3);
}

@keyframes liveBar {
  from {
    opacity: 0;
    transform: scaleY(0.2);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.live-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  color: #62685e;
  font-size: 7.5px;
}

.live-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.live-meta strong {
  color: var(--ink-dim);
  font-weight: 500;
}

.live-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 10px;
}

.live-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.live-feed-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.live-feed-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--lime);
}

.live-feed-icon svg {
  width: 9px;
  height: 9px;
}

.live-feed-copy {
  min-width: 0;
  flex: 1;
  color: #858b80;
  font-size: 8.5px;
  line-height: 1.4;
}

.live-feed-copy strong {
  color: var(--ink-dim);
  font-weight: 500;
}

.live-feed-item time {
  color: #555b51;
  font-size: 7px;
  white-space: nowrap;
}

/* ---------- funnel ---------- */

.funnel {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 77px 1fr auto;
  align-items: center;
  gap: 9px;
}

.funnel-row > span {
  color: #8b9185;
  font-size: 8.5px;
}

.funnel-row > strong {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 500;
}

.funnel-track {
  height: 7px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.funnel-fill {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(216, 255, 66, 0.38), var(--lime));
  box-shadow: 0 0 12px rgba(216, 255, 66, 0.1);
}

.funnel-row:nth-child(3) .funnel-fill {
  background: linear-gradient(90deg, rgba(190, 224, 58, 0.3), #bedf3b);
}
.funnel-row:nth-child(4) .funnel-fill {
  background: linear-gradient(90deg, rgba(168, 200, 53, 0.3), #a8c835);
}
.funnel-row:nth-child(5) .funnel-fill {
  background: linear-gradient(90deg, rgba(150, 180, 49, 0.25), #8ea930);
}

.funnel-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 13px;
  color: #60665c;
  font-size: 7.5px;
}

.funnel-foot svg {
  width: 10px;
  height: 10px;
  color: var(--lime);
}

/* ---------- engagement ---------- */

.engagement-body {
  display: flex;
  align-items: center;
  gap: 21px;
}

.donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 113px;
  height: 113px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--lime) calc(var(--value, 87) * 1%), rgba(255, 255, 255, 0.06) 0);
}

.donut::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #0b0d0b;
}

.donut-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.donut-center strong {
  display: block;
  color: var(--ink);
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.06em;
}

.donut-center span {
  display: block;
  margin-top: 3px;
  color: #656b61;
  font-size: 6.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.engagement-stats {
  flex: 1;
  min-width: 0;
}

.engagement-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.engagement-stat:last-child {
  border-bottom: 0;
}

.engagement-stat span {
  color: #7e8479;
  font-size: 8px;
}

.engagement-stat strong {
  color: var(--ink-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8.5px;
  font-weight: 500;
}

/* ---------- top questions ---------- */

.top-questions {
  display: flex;
  flex-direction: column;
}

.top-question {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-question:first-child {
  padding-top: 0;
}

.top-question:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.top-question-votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 29px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7.5px;
}

.top-question-votes svg {
  width: 7px;
  height: 7px;
  margin-bottom: 2px;
}

.top-question-copy {
  min-width: 0;
  color: #969c91;
  font-size: 8.5px;
  line-height: 1.45;
}

.top-question-copy strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-dim);
  font-size: 9.5px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-question-copy span {
  color: #5f655b;
  font-size: 7px;
}

.top-questions-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--lime);
  font-size: 7.5px;
}

.top-questions-foot svg {
  width: 9px;
  height: 9px;
}

/* ---------- sessions table ---------- */

.sessions-panel {
  padding: 18px 0 0;
}

.sessions-panel .panel-head {
  padding: 0 18px;
  margin-bottom: 15px;
}

.table-search {
  position: relative;
  width: 160px;
}

.table-search svg {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 11px;
  height: 11px;
  transform: translateY(-50%);
  color: #5d6359;
  pointer-events: none;
}

.table-search input {
  width: 100%;
  height: 27px;
  padding: 0 8px 0 25px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 8px;
}

.table-search input::placeholder {
  color: #5d6359;
}

.table-search input:focus {
  border-color: rgba(216, 255, 66, 0.35);
}

.table-scroll {
  overflow-x: auto;
}

.sessions-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.sessions-table th {
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #5d6359;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}

.sessions-table th:first-child,
.sessions-table td:first-child {
  padding-left: 18px;
}

.sessions-table th:last-child,
.sessions-table td:last-child {
  padding-right: 18px;
  text-align: right;
}

.sessions-table td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #92988d;
  font-size: 8.5px;
}

.sessions-table tr:last-child td {
  border-bottom: 0;
}

.session-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.session-thumb {
  display: grid;
  place-items: center;
  width: 31px;
  height: 24px;
  flex: none;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 4px;
  background:
    radial-gradient(ellipse at 75% 20%, rgba(199, 168, 255, 0.38), transparent 52%),
    radial-gradient(ellipse at 25% 70%, rgba(216, 255, 66, 0.2), transparent 55%),
    #141b15;
  color: rgba(255, 255, 255, 0.45);
  font-size: 5.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.session-name strong {
  display: block;
  color: var(--ink-dim);
  font-size: 9px;
  font-weight: 500;
}

.session-name span {
  display: block;
  margin-top: 2px;
  color: #5e645a;
  font-size: 7px;
}

.session-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 30px;
  color: #7c8277;
  font-size: 6.5px;
  letter-spacing: 0.04em;
}

.session-status.live {
  border-color: rgba(216, 255, 66, 0.25);
  background: rgba(216, 255, 66, 0.055);
  color: var(--lime);
}

.session-status.upcoming {
  border-color: rgba(199, 168, 255, 0.2);
  color: var(--violet);
}

.session-status .live-dot {
  width: 3px;
  height: 3px;
}

.table-meter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.table-meter i {
  display: block;
  width: 45px;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
}

.table-meter i::after {
  content: "";
  display: block;
  width: var(--w, 80%);
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
}

.table-meter span {
  color: #8f958a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7.5px;
}

.sessions-empty {
  display: none;
  padding: 30px;
  color: #656b61;
  font-size: 9px;
  text-align: center;
}

.sessions-panel.is-empty .sessions-empty {
  display: block;
}

.sessions-panel.is-empty .table-scroll {
  display: none;
}

/* ---------- audience panel ---------- */

.audience-headline {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: -6px;
  margin-bottom: 12px;
}

.audience-headline strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.audience-headline span {
  color: #666c62;
  font-size: 8px;
}

.geo-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.geo-row {
  display: grid;
  grid-template-columns: 27px 1fr auto;
  align-items: center;
  gap: 8px;
}

.geo-code {
  display: grid;
  place-items: center;
  width: 22px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: #8c9287;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 6.5px;
}

.geo-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.055);
}

.geo-bar i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(216, 255, 66, 0.3), var(--lime));
}

.geo-value {
  color: #989e93;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7.5px;
}

.audience-divider {
  height: 1px;
  margin: 14px 0 12px;
  background: var(--line);
}

.device-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: #6a7066;
  font-size: 7.5px;
}

.device-bar {
  display: flex;
  gap: 2px;
  height: 7px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.device-bar i {
  display: block;
  width: var(--w);
  height: 100%;
}

.device-bar i:nth-child(1) {
  background: var(--lime);
}
.device-bar i:nth-child(2) {
  background: #8d75b9;
}
.device-bar i:nth-child(3) {
  background: #4f5c47;
}

.device-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.device-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #666c62;
  font-size: 6.5px;
}

.device-legend i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
}

.device-legend span:nth-child(2) i {
  background: #8d75b9;
}
.device-legend span:nth-child(3) i {
  background: #4f5c47;
}

/* ---------- responsive ---------- */

@media (max-height: 780px) {
  .dash-nav {
    margin-top: 16px;
  }
  .dash-nav-link {
    height: 34px;
  }
  .dash-nav + .nav-group-label {
    margin-top: 17px;
  }
  .sidebar-help {
    padding: 11px;
  }
  .sidebar-help p {
    display: none;
  }
}

@media (max-width: 1280px) {
  .dash-grid,
  .dash-grid-bottom {
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, 1fr);
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-grid-three {
    grid-template-columns: 1fr 1fr;
  }
  .dash-grid-three .panel:last-child {
    grid-column: span 2;
  }
  .top-questions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
  }
  .top-question:nth-child(2) {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .top-question:nth-child(3) {
    padding-top: 9px;
  }
  .top-questions-foot {
    grid-column: span 2;
  }
}

@media (max-width: 1080px) {
  .dash-sidebar {
    transform: translateX(-100%);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.4);
  }
  .dashboard-page.sidebar-open .dash-sidebar {
    transform: translateX(0);
  }
  .sidebar-close {
    display: grid;
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(3, 5, 3, 0.62);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(3px);
  }
  .dashboard-page.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .dash-main {
    width: 100%;
    margin-left: 0;
  }
  .dash-menu {
    display: grid;
  }
  .dash-topbar {
    padding: 0 20px;
  }
  .dash-content {
    padding: 26px 20px 50px;
  }
}

@media (max-width: 880px) {
  .dash-grid,
  .dash-grid-bottom {
    grid-template-columns: 1fr;
  }
  .chart-card {
    min-height: 0;
  }
  .live-panel {
    min-height: 330px;
  }
  .chart-legend {
    display: none;
  }
  .dash-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .dash-head-actions {
    width: 100%;
    justify-content: space-between;
  }
  .dash-grid-three {
    grid-template-columns: 1fr;
  }
  .dash-grid-three .panel:last-child {
    grid-column: auto;
  }
  .top-questions {
    display: flex;
  }
  .top-questions-foot {
    grid-column: auto;
  }
  .dash-search kbd {
    display: none;
  }
  .dash-search span {
    display: none;
  }
  .dash-search {
    width: 32px;
    padding: 0;
    justify-content: center;
  }
  .sessions-panel {
    overflow: hidden;
  }
  .table-search {
    width: 130px;
  }
}

@media (max-width: 560px) {
  .dash-topbar {
    height: 56px;
    padding: 0 14px;
    gap: 10px;
  }
  .crumb > *:not(:last-child) {
    display: none;
  }
  .crumb {
    margin-left: 0;
  }
  .topbar-home {
    display: none;
  }
  .topbar-icon {
    display: none;
  }
  .dash-content {
    padding: 20px 14px 42px;
  }
  .dash-heading h1 {
    font-size: 2rem;
  }
  .dash-subtitle {
    flex-wrap: wrap;
    line-height: 1.5;
  }
  .dash-head-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
  .range-picker {
    justify-content: space-between;
  }
  .range-btn {
    flex: 1;
    height: 28px;
  }
  .export-btn {
    justify-content: center;
  }
  .kpi-grid {
    gap: 8px;
  }
  .kpi-card {
    padding: 14px 13px 12px;
  }
  .kpi-spark {
    width: 58px;
  }
  .panel {
    padding: 15px;
  }
  .chart-wrap {
    aspect-ratio: 1.15;
  }
  .chart-tooltip {
    top: 4px;
  }
  .chart-foot {
    flex-wrap: wrap;
    gap: 6px;
  }
  .engagement-body {
    gap: 16px;
    flex-wrap: wrap;
  }
  .donut {
    width: 100px;
    height: 100px;
  }
  .sessions-panel {
    padding-top: 15px;
  }
  .sessions-panel .panel-head {
    padding: 0 15px;
    flex-direction: column;
    gap: 10px;
  }
  .table-search {
    width: 100%;
  }
  .sessions-table th:first-child,
  .sessions-table td:first-child {
    padding-left: 15px;
  }
  .sessions-table th:last-child,
  .sessions-table td:last-child {
    padding-right: 15px;
  }
  .funnel-row {
    grid-template-columns: 65px 1fr auto;
  }
}
