:root {
  --text: #f4f7fb;
  --muted: #8f9bad;
  --line: rgba(148, 163, 184, 0.18);
  --soft: rgba(15, 23, 42, 0.78);
  --panel: rgba(15, 23, 42, 0.74);
  --orange: #ff6b35;
  --green: #37d67a;
  --blue: #38bdf8;
  --cyan: #00d5ff;
  --purple: #9b7cff;
  --amber: #fbbf24;
  --danger: #ff4d6d;
  --bg: #070b12;
  --bg-2: #0c1220;
  --glass: rgba(13, 20, 34, 0.72);
  --glass-strong: rgba(18, 27, 43, 0.88);
  --glow-cyan: 0 0 42px rgba(0, 213, 255, 0.18);
  --glow-orange: 0 0 38px rgba(255, 107, 53, 0.16);
  --shadow-panel: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --ui-scale: 0.9;
  color-scheme: dark;
  font-family: Inter, Manrope, "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  scrollbar-color: rgba(56, 189, 248, 0.45) rgba(15, 23, 42, 0.75);
}

body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 213, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(255, 107, 53, 0.12), transparent 28rem),
    linear-gradient(140deg, #05070c 0%, #08111c 44%, #0d1625 100%);
}

@supports (zoom: 1) {
  body {
    zoom: var(--ui-scale);
  }
}

@supports not (zoom: 1) {
  body {
    width: calc(100% / var(--ui-scale));
    min-height: calc(100vh / var(--ui-scale));
    transform: scale(var(--ui-scale));
    transform-origin: 0 0;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 78%);
}

.auth-screen {
  background:
    radial-gradient(circle at 50% 18%, rgba(0, 213, 255, 0.18), transparent 28rem),
    linear-gradient(145deg, #05070c, #0b1321);
}

.login-card,
.stat-card,
.panel,
.chart-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(21, 32, 50, 0.88), rgba(9, 15, 26, 0.74)),
    var(--panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(18px);
}

.login-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.login-card::before,
.panel::before,
.chart-card::before,
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 34%, rgba(0, 213, 255, 0.06));
}

.login-card h1,
.hero h1,
.back-row h1 {
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0;
}

.brand img {
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.22), 0 12px 34px rgba(0, 213, 255, 0.12);
}

.brand strong {
  color: #f8fbff;
  letter-spacing: 0;
}

.brand-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.brand-button:hover strong {
  color: var(--cyan);
}

.brand-button:focus-visible {
  outline: 2px solid rgba(0, 213, 255, 0.72);
  outline-offset: 6px;
  border-radius: 10px;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.report-button {
  position: relative;
  overflow: hidden;
  border-color: rgba(0, 213, 255, 0.4);
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 213, 255, 0.2), transparent 9rem),
    linear-gradient(135deg, rgba(9, 24, 36, 0.94), rgba(15, 23, 42, 0.86));
  color: #e8fbff;
  box-shadow: 0 0 28px rgba(0, 213, 255, 0.12), 0 14px 34px rgba(0, 0, 0, 0.28);
}

.report-button::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 213, 255, 0.16), transparent 48%, rgba(255, 107, 53, 0.1));
  opacity: 0.72;
}

.report-button {
  min-width: 170px;
}

input,
select,
.login-card input,
.toolbar input,
.toolbar select {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(5, 10, 18, 0.72);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

input::placeholder {
  color: rgba(143, 155, 173, 0.86);
}

input:focus,
select:focus,
.login-card input:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: rgba(0, 213, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(0, 213, 255, 0.12), inset 0 0 0 1px rgba(0, 213, 255, 0.18);
}

.button,
.action-button {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.86);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.button.primary,
.login-actions .button.primary,
.action-button {
  border-color: rgba(255, 107, 53, 0.48);
  background: linear-gradient(135deg, #ff6b35, #ff8a3d);
  color: #fff;
  box-shadow: var(--glow-orange), 0 14px 34px rgba(0, 0, 0, 0.3);
}

.button:hover,
.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(0, 213, 255, 0.12), 0 18px 40px rgba(0, 0, 0, 0.34);
}

header {
  background: rgba(5, 10, 18, 0.82);
  border-bottom-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.26);
}

.topbar {
  height: 58px;
}

.hero {
  position: relative;
  min-height: 118px;
  align-items: center;
  padding: 18px 0 8px;
}

.hero h1 {
  font-size: clamp(28px, 2.9vw, 48px);
  line-height: 1;
}

.hero p {
  margin-top: 6px;
  font-size: 15px;
}

.hero p,
.muted,
.status {
  color: var(--muted);
}

.accent {
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(0, 213, 255, 0.36);
}

.stats {
  gap: 16px;
}

.stat-card,
.chart-card,
.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.stat-card {
  min-height: 142px;
  padding: 18px;
}

.stat-card small {
  border-color: rgba(0, 213, 255, 0.22);
  background: rgba(0, 213, 255, 0.08);
  color: #8beeff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  color: #ffffff;
  font-size: clamp(28px, 2.3vw, 40px);
  text-shadow: 0 0 26px rgba(0, 213, 255, 0.2);
}

.stat-card-cyan {
  box-shadow: var(--shadow-panel), 0 0 36px rgba(0, 213, 255, 0.12);
}

.stat-card-orange {
  box-shadow: var(--shadow-panel), 0 0 36px rgba(255, 107, 53, 0.12);
}

.stat-card-blue {
  box-shadow: var(--shadow-panel), 0 0 36px rgba(56, 189, 248, 0.12);
}

.stat-card-purple {
  box-shadow: var(--shadow-panel), 0 0 36px rgba(155, 124, 255, 0.12);
}

.stat-card-green {
  box-shadow: var(--shadow-panel), 0 0 36px rgba(55, 214, 122, 0.12);
}

.stat-card-amber {
  box-shadow: var(--shadow-panel), 0 0 36px rgba(251, 191, 36, 0.1);
}

.toolbar {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(8, 13, 22, 0.64);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.panel-head {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.compare-mode-button {
  border-color: rgba(0, 213, 255, 0.32);
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 213, 255, 0.16), transparent 7rem),
    rgba(5, 10, 18, 0.62);
}

.compare-mode-button.active {
  color: #07101d;
  border-color: rgba(0, 213, 255, 0.78);
  background: linear-gradient(135deg, #00d5ff, #75f3ff);
  box-shadow: 0 0 30px rgba(0, 213, 255, 0.22), 0 18px 42px rgba(0, 0, 0, 0.28);
}

.compare-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 14px 14px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 213, 255, 0.24);
  border-radius: var(--radius-md);
  background:
    linear-gradient(90deg, rgba(0, 213, 255, 0.12), transparent 56%, rgba(255, 107, 53, 0.08)),
    rgba(5, 10, 18, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 32px rgba(0, 213, 255, 0.08);
}

.compare-selection-bar[hidden] {
  display: none;
}

.compare-selection-bar strong {
  display: block;
  color: #f8fbff;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.compare-selection-bar span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 760;
}

.compare-selection-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.compare-selection-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.panel-head h2,
.chart-title {
  color: #f8fbff;
}

.badge {
  border-color: rgba(0, 213, 255, 0.24);
  background: rgba(0, 213, 255, 0.08);
  color: #8beeff;
}

table {
  color: var(--text);
}

th {
  background: rgba(9, 15, 26, 0.82);
  color: rgba(143, 155, 173, 0.92);
}

td,
th {
  border-top-color: rgba(148, 163, 184, 0.12);
}

tbody tr {
  background: rgba(9, 15, 26, 0.28);
  transition: background 140ms ease, transform 140ms ease;
}

tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.34);
}

tbody tr:hover {
  background: rgba(0, 213, 255, 0.055);
}

.shots-panel {
  max-height: min(72vh, 760px);
  display: flex;
  flex-direction: column;
}

.shots-panel .panel-head {
  flex: 0 0 auto;
  background:
    linear-gradient(145deg, rgba(21, 32, 50, 0.95), rgba(9, 15, 26, 0.9)),
    var(--panel);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  z-index: 3;
}

.shots-panel .table-scroll {
  flex: 1 1 auto;
  min-height: 260px;
  overflow: auto;
  overscroll-behavior: contain;
}

.shots-panel thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(8, 15, 26, 0.98));
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.14), 0 10px 24px rgba(0, 0, 0, 0.22);
}

.chart-card {
  box-shadow: var(--shadow-panel), var(--glow-cyan);
}

.chart-grid {
  width: 100%;
}

.chart-card {
  padding: 18px 18px 18px;
}

.chart-head {
  padding: 0 6px;
}

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

.line-chart {
  display: block;
  width: 100%;
}

.line-chart text {
  fill: rgba(187, 198, 214, 0.9);
}

.chart-empty {
  background: rgba(5, 10, 18, 0.7);
}

.chart-tooltip {
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 18, 0.96);
  color: #f8fbff;
  box-shadow: 0 0 34px rgba(0, 213, 255, 0.18), 0 18px 44px rgba(0, 0, 0, 0.42);
}

.raw-item {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(5, 10, 18, 0.48);
}

.raw-item span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.raw-item strong {
  color: #f8fbff;
}

.info-section {
  padding: 0 26px 18px;
}

.info-section + .info-section {
  padding-top: 2px;
}

.info-section h3 {
  margin: 0 0 10px;
  color: #f8fbff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-section .raw-grid {
  padding: 0;
}

.debug-details {
  margin: 0 26px 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-md);
  background: rgba(5, 10, 18, 0.38);
}

.debug-details summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}

.debug-details .raw-grid {
  padding: 0 14px 14px;
}

.session-params-layout {
  margin: 0 0 22px;
}

.session-overview {
  display: grid;
  gap: 18px;
}

.instrument-grid {
  display: grid;
  grid-template-columns: minmax(440px, 1.16fr) minmax(400px, 1.08fr) minmax(260px, 0.72fr);
  gap: 18px;
}

.instrument-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 200, 255, 0.2);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 200, 255, 0.13), transparent 24rem),
    linear-gradient(145deg, rgba(8, 22, 34, 0.82), rgba(3, 10, 18, 0.78));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28), 0 0 34px rgba(0, 200, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.instrument-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 213, 255, 0.1), transparent 34%, rgba(255, 107, 53, 0.08)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 82px);
  opacity: 0.42;
}

.instrument-card > * {
  position: relative;
  z-index: 1;
}

.instrument-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 26px 18px;
}

.instrument-title h3 {
  margin: 0;
  color: #f8fbff;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.instrument-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(0, 213, 255, 0.36);
  border-radius: 8px;
  background: rgba(0, 213, 255, 0.08);
  color: #39e6ff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.06em;
  box-shadow: 0 0 22px rgba(0, 213, 255, 0.16);
}

.connected-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.connected-badge i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 16px rgba(55, 214, 122, 0.72);
}

.device-card {
  min-height: 386px;
  border-color: rgba(0, 200, 255, 0.24);
}

.device-content {
  display: grid;
  grid-template-columns: minmax(280px, 1.08fr) minmax(190px, 0.72fr);
  gap: 18px;
  align-items: center;
  padding: 0 26px 26px;
}

.device-visual {
  position: relative;
  min-height: 270px;
  display: grid;
  place-items: center;
  overflow: visible;
  border-radius: var(--radius-md);
  isolation: isolate;
}

.device-visual::before {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(0, 213, 255, 0.08);
  border-radius: 999px;
  background:
    repeating-radial-gradient(circle, rgba(0, 213, 255, 0.08) 0 1px, transparent 1px 28px),
    radial-gradient(circle, rgba(0, 213, 255, 0.12), transparent 64%);
  opacity: 0.75;
}

.device-visual::after {
  content: "";
  position: absolute;
  inset: auto 8% 10% 10%;
  height: 22px;
  border-radius: 999px;
  background: rgba(0, 213, 255, 0.13);
  filter: blur(18px);
  opacity: 0.8;
}

.device-visual img {
  position: relative;
  z-index: 1;
  width: min(620px, 112%);
  max-width: 100%;
  height: 300px;
  object-fit: contain;
  object-position: center;
  transform: rotate(0deg);
  filter: drop-shadow(0 30px 38px rgba(0, 0, 0, 0.7)) saturate(1.08) contrast(1.08) brightness(0.88);
}

.device-facts {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.device-facts span,
.instrument-metric span,
.weapon-node span,
.efficiency-strip span {
  color: rgba(143, 155, 173, 0.98);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.device-facts strong {
  color: #ffffff;
  font-size: clamp(26px, 2vw, 36px);
  line-height: 1;
  text-shadow: 0 0 24px rgba(0, 213, 255, 0.16);
}

.device-facts b {
  color: #f8fbff;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.device-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 24px 22px;
  color: rgba(187, 198, 214, 0.9);
  font-weight: 850;
}

.status-led {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-size: 14px;
  text-transform: uppercase;
}

.status-led i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(55, 214, 122, 0.72);
}

.pcp-card {
  border-color: rgba(0, 213, 255, 0.24);
}

.pcp-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.86fr) minmax(180px, 1fr);
  gap: 22px;
  align-items: center;
  padding: 10px 26px 0;
}

.pressure-ring {
  width: 190px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #07101d 54%, transparent 55%),
    conic-gradient(from 210deg, #00d5ff 0 var(--pressure), rgba(148, 163, 184, 0.16) var(--pressure) 100%);
  box-shadow: 0 0 34px rgba(0, 213, 255, 0.18), inset 0 0 26px rgba(0, 0, 0, 0.54);
}

.pressure-ring > div {
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.95), rgba(4, 9, 16, 0.96));
}

.pressure-ring strong {
  color: #ffffff;
  font-size: 42px;
  line-height: 1;
}

.pressure-ring span {
  margin-top: -28px;
  color: rgba(248, 251, 255, 0.9);
  font-weight: 850;
}

.pcp-metrics {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.instrument-metric,
.overview-metric {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(5, 10, 18, 0.24);
}

.instrument-metric strong,
.overview-metric strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.instrument-metric small,
.overview-metric small {
  color: rgba(187, 198, 214, 0.9);
  font-size: 15px;
  font-weight: 750;
}

.overview-metric span {
  color: rgba(143, 155, 173, 0.98);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.efficiency-strip {
  display: grid;
  grid-template-columns: auto auto;
  gap: 10px 12px;
  align-items: center;
  padding: 18px 26px 26px;
}

.efficiency-strip strong {
  color: var(--green);
  font-size: 24px;
}

.efficiency-strip div {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
}

.efficiency-strip i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d9f75d, #37d67a, #39e6ff);
  box-shadow: 0 0 18px rgba(55, 214, 122, 0.34);
}

.efficiency-strip em {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  color: rgba(187, 198, 214, 0.9);
  font-style: normal;
  font-weight: 750;
}

.meta-card {
  border-color: rgba(255, 107, 53, 0.32);
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 107, 53, 0.16), transparent 18rem),
    linear-gradient(145deg, rgba(17, 28, 44, 0.9), rgba(4, 12, 22, 0.78));
}

.meta-stack {
  display: grid;
  gap: 0;
  padding: 0 20px 22px;
}

.meta-stack .instrument-metric,
.meta-stack .overview-metric {
  min-height: 78px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-bottom: 0;
  border-radius: 0;
}

.meta-stack .overview-metric:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.meta-stack .overview-metric:last-child {
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.status-metric strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
}

.status-metric strong i {
  width: 20px;
  height: 20px;
  border: 2px solid var(--green);
  border-radius: 999px;
  position: relative;
}

.status-metric strong i::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 7px;
  height: 4px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

.quality-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 20px 22px;
  padding: 12px 14px;
  border: 1px solid rgba(55, 214, 122, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(55, 214, 122, 0.08);
  color: rgba(187, 198, 214, 0.92);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quality-pill strong {
  color: var(--green);
  font-size: 16px;
  text-transform: none;
}

.weapon-card {
  border-color: rgba(255, 107, 53, 0.26);
}

.weapon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 4px 26px 22px;
}

.weapon-node {
  display: grid;
  grid-template-columns: 136px 180px;
  gap: 14px;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  padding: 0 24px;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
}

.weapon-node:last-child {
  border-right: 0;
}

.weapon-node > div {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.weapon-node strong {
  display: block;
  margin: 8px 0;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.08;
}

.weapon-node small {
  display: block;
  max-width: 180px;
  color: rgba(187, 198, 214, 0.95);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.2;
}

.node-mark {
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(5, 10, 18, 0.4);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.32);
}

.weapon-image-mark,
.ammo-image-mark,
.rof-image-mark {
  width: 177px;
  height: 177px;
  border: 0;
  border-radius: 999px;
  background-color: transparent;
  background-size: 176% auto;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
  overflow: hidden;
}

.weapon-image-mark {
  background-image: url("assets/weapon-loadout-icon.png");
}

.ammo-image-mark {
  background-image: url("assets/ammo-loadout-icon.png");
}

.rof-image-mark {
  background-image: url("assets/rof-loadout-icon.png");
}

.weapon-image-mark::before,
.ammo-image-mark::before,
.rof-image-mark::before {
  content: "" !important;
  display: none;
}

.node-mark::before {
  color: #00d5ff;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px rgba(0, 213, 255, 0.4);
}

.rifle-mark::before {
  content: "RFL";
}

.pellet-mark::before {
  content: "PEL";
}

.rof-mark::before {
  content: "ROF";
}

.weapon-image-mark::before,
.ammo-image-mark::before,
.rof-image-mark::before {
  content: "" !important;
  display: none !important;
}

.environment-card {
  border-color: rgba(0, 213, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(11, 23, 36, 0.9), rgba(5, 12, 20, 0.82));
}

.environment-title {
  align-items: center;
  padding: 28px 28px 12px;
}

.environment-title > div {
  display: grid;
  gap: 4px;
}

.environment-title p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 780;
  letter-spacing: 0;
}

.environment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 16px 28px 28px;
}

.environment-sensor {
  position: relative;
  min-height: 180px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 28px 30px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(8, 18, 29, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 48px rgba(0, 0, 0, 0.12);
}

.environment-sensor::before {
  content: none;
}

.environment-sensor > * {
  position: relative;
  z-index: 1;
}

.environment-orbit {
  position: relative;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(47, 123, 255, 0.16), rgba(47, 123, 255, 0.05));
  color: #2f7bff;
}

.environment-orbit svg {
  width: 50px;
  height: 50px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.environment-orbit .material-env-thermometer {
  width: 50px;
  height: 50px;
  overflow: visible;
}

.environment-orbit .material-env-icon text {
  fill: currentColor;
  stroke: none;
  font-size: 6px;
  font-weight: 950;
  dominant-baseline: middle;
}

.environment-orbit .material-env-thermometer circle,
.environment-orbit .material-env-pressure circle {
  fill: currentColor;
  stroke: none;
}

.environment-reading {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.environment-reading span {
  color: rgba(143, 155, 173, 0.98);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.environment-reading strong {
  color: #ffffff;
  font-size: clamp(28px, 2.2vw, 38px);
  line-height: 1;
}

.environment-status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 18px;
  border: 1px solid rgba(55, 214, 122, 0.18);
  border-radius: 999px;
  background: rgba(55, 214, 122, 0.13);
  color: #37d67a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.environment-status i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
}

.session-overview .debug-details {
  margin: 8px 0 0;
  border-color: rgba(148, 163, 184, 0.2);
  background: linear-gradient(145deg, rgba(21, 32, 50, 0.76), rgba(9, 15, 26, 0.68));
}

.session-overview .debug-details summary {
  min-height: 72px;
  padding: 0 26px;
  color: #dbeafe;
  font-size: 18px;
}

.empty {
  color: var(--muted);
}

.sessions-panel {
  padding-bottom: 12px;
}

.sessions-list {
  display: grid;
  gap: 12px;
  padding: 0 14px 16px;
}

.session-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(170px, 0.58fr) minmax(420px, 1.25fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 116px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(18, 27, 43, 0.76), rgba(7, 11, 18, 0.64)),
    rgba(9, 15, 26, 0.78);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.session-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 4% 0%, rgba(0, 213, 255, 0.12), transparent 18rem),
    linear-gradient(90deg, rgba(0, 213, 255, 0.08), transparent 36%);
  opacity: 0.64;
}

.session-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 213, 255, 0.32);
  box-shadow: 0 0 36px rgba(0, 213, 255, 0.1), 0 22px 58px rgba(0, 0, 0, 0.3);
}

.session-card.compare-selected {
  border-color: rgba(0, 213, 255, 0.68);
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 213, 255, 0.2), transparent 20rem),
    linear-gradient(135deg, rgba(18, 37, 54, 0.92), rgba(7, 11, 18, 0.72));
  box-shadow: 0 0 0 1px rgba(0, 213, 255, 0.18), 0 0 42px rgba(0, 213, 255, 0.18), 0 24px 64px rgba(0, 0, 0, 0.34);
}

.session-card.compare-selected::after {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgba(0, 213, 255, 0.26);
  border-radius: calc(var(--radius-md) - 4px);
  animation: comparePulse 1.8s ease-in-out infinite;
}

@keyframes comparePulse {
  0%, 100% { opacity: 0.32; }
  50% { opacity: 0.88; }
}

.session-card > * {
  position: relative;
  z-index: 1;
}

.session-card-main {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px 16px;
  align-items: center;
  min-width: 0;
}

.session-date {
  display: grid;
  gap: 5px;
}

.session-date strong {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.05;
}

.session-date span,
.session-equipment small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.session-device {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}

.session-device .muted {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 740;
}

.session-equipment {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.session-equipment span {
  min-width: 0;
  overflow: hidden;
  color: #f8fbff;
  font-size: 15px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-sparkline {
  min-height: 64px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(5, 10, 18, 0.48);
  overflow: hidden;
}

.session-sparkline svg {
  display: block;
  width: 100%;
  height: 64px;
  filter: drop-shadow(0 0 10px rgba(0, 213, 255, 0.28));
}

.sparkline-empty {
  display: grid;
  height: 64px;
  place-items: center;
  color: rgba(143, 155, 173, 0.78);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.session-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.session-metrics div {
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(5, 10, 18, 0.44);
}

.session-metrics span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.session-metrics strong {
  display: block;
  overflow-wrap: anywhere;
  color: #f8fbff;
  font-size: 15px;
  line-height: 1.05;
}

.session-card .action-button {
  min-width: 126px;
  white-space: nowrap;
}

.session-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.compare-pick-button {
  min-width: 126px;
  min-height: 42px;
  border: 1px solid rgba(0, 213, 255, 0.32);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(0, 213, 255, 0.12), rgba(5, 10, 18, 0.72));
  color: #9cf2ff;
  font-weight: 950;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.compare-pick-button:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 213, 255, 0.68);
  box-shadow: 0 0 26px rgba(0, 213, 255, 0.18);
}

.compare-pick-button.active {
  color: #07101d;
  background: linear-gradient(135deg, #00d5ff, #7bf5ff);
  box-shadow: 0 0 28px rgba(0, 213, 255, 0.24);
}

.compare-view.active {
  display: block;
}

.compare-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
  margin-bottom: 18px;
}

.compare-session-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 22px;
  border: 1px solid rgba(0, 213, 255, 0.22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 8% 0%, rgba(0, 213, 255, 0.16), transparent 18rem),
    linear-gradient(145deg, rgba(12, 24, 38, 0.86), rgba(5, 10, 18, 0.76));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28), 0 0 34px rgba(0, 213, 255, 0.08);
}

.compare-session-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 72px),
    linear-gradient(90deg, rgba(0, 213, 255, 0.08), transparent);
  opacity: 0.56;
}

.compare-session-card > * {
  position: relative;
  z-index: 1;
}

.compare-session-right {
  border-color: rgba(255, 107, 53, 0.28);
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 107, 53, 0.18), transparent 18rem),
    linear-gradient(145deg, rgba(32, 20, 18, 0.84), rgba(5, 10, 18, 0.76));
}

.compare-session-label {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(0, 213, 255, 0.28);
  border-radius: 999px;
  padding: 3px 10px;
  color: #9cf2ff;
  background: rgba(0, 213, 255, 0.08);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compare-session-right .compare-session-label {
  border-color: rgba(255, 107, 53, 0.34);
  color: #ffc7ae;
  background: rgba(255, 107, 53, 0.08);
}

.compare-session-card h3 {
  margin: 18px 0 6px;
  color: #ffffff;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 0.98;
}

.compare-session-card p,
.compare-session-equipment small,
.compare-session-strip span {
  color: var(--muted);
  font-weight: 760;
}

.compare-session-equipment {
  display: grid;
  gap: 4px;
  margin-top: 18px;
}

.compare-session-equipment span {
  color: #f8fbff;
  font-size: 22px;
  font-weight: 950;
}

.compare-session-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.compare-session-strip b {
  display: block;
  color: #ffffff;
  font-size: 24px;
}

.compare-versus {
  align-self: center;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(0, 213, 255, 0.22);
  border-radius: 999px;
  background: rgba(5, 10, 18, 0.78);
  color: #f8fbff;
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 0 32px rgba(0, 213, 255, 0.12), 0 0 32px rgba(255, 107, 53, 0.1);
}

.compare-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.compare-metric-card {
  min-height: 138px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(21, 32, 50, 0.86), rgba(8, 13, 22, 0.7)),
    rgba(9, 15, 26, 0.78);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.26);
}

.compare-metric-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compare-metric-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.compare-metric-values strong {
  color: #ffffff;
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1;
}

.compare-metric-values strong.left {
  color: #52e5ff;
}

.compare-metric-values strong.right {
  color: #ff9c6c;
  text-align: right;
}

.compare-metric-values small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 13px;
}

.compare-metric-card em {
  display: block;
  margin-top: 12px;
  color: rgba(187, 198, 214, 0.92);
  font-style: normal;
  font-weight: 760;
  line-height: 1.25;
}

.compare-chart-card {
  min-height: 340px;
}

.compare-chart-wrap {
  overflow: visible;
}

.compare-line-chart {
  height: 280px;
}

.compare-line-chart .compare-grid line {
  stroke: rgba(148, 163, 184, 0.12);
  stroke-width: 1;
}

.compare-line-chart text {
  fill: rgba(187, 198, 214, 0.88);
  font-size: 12px;
  font-weight: 760;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 5px 0 10px;
  border-radius: 999px;
  vertical-align: -1px;
}

.legend-dot.left {
  background: #00d5ff;
  box-shadow: 0 0 14px rgba(0, 213, 255, 0.6);
}

.legend-dot.right {
  background: #ff6b35;
  box-shadow: 0 0 14px rgba(255, 107, 53, 0.6);
}

.compare-shots-panel td small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.compare-left {
  color: #52e5ff;
}

.compare-right {
  color: #ff9c6c;
}

.compare-winner {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(0, 213, 255, 0.18);
  border-radius: 999px;
  padding: 3px 10px;
  background: rgba(0, 213, 255, 0.06);
  color: #f8fbff;
  font-weight: 900;
}

@media (max-width: 1320px) {
  .instrument-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.92fr);
  }

  .meta-card {
    grid-column: 1 / -1;
  }

  .meta-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .session-card {
    grid-template-columns: minmax(260px, 1fr) minmax(170px, 0.6fr);
  }

  .session-metrics {
    grid-column: 1 / -1;
  }

  .session-card .action-button {
    justify-self: end;
  }

  .compare-hero {
    grid-template-columns: 1fr;
  }

  .compare-versus {
    justify-self: center;
  }

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

@media (max-width: 780px) {
  body::before {
    background-size: 34px 34px;
  }

  .topbar {
    gap: 12px;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

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

  .panel-actions,
  .compare-selection-bar,
  .compare-selection-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .compare-selection-actions .button,
  .compare-mode-button {
    width: 100%;
  }

  .button {
    min-height: 44px;
  }

  .stat-card {
    min-height: 118px;
  }

  .chart-card {
    padding: 14px 10px;
  }

  .shots-panel {
    max-height: 70vh;
  }

  .sessions-list {
    padding: 0 10px 14px;
  }

  .session-card,
  .session-card-main,
  .session-equipment {
    display: grid;
    grid-template-columns: 1fr;
  }

  .session-card {
    gap: 12px;
    min-height: 0;
    padding: 14px;
  }

  .session-equipment {
    gap: 6px;
  }

  .session-sparkline {
    min-height: 54px;
  }

  .session-sparkline svg,
  .sparkline-empty {
    height: 54px;
  }

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

  .session-card .action-button {
    width: 100%;
  }

  .session-actions {
    justify-items: stretch;
  }

  .compare-pick-button {
    width: 100%;
  }

  .compare-metric-grid {
    grid-template-columns: 1fr;
  }

  .compare-session-card {
    min-height: 0;
    padding: 18px;
  }

  .compare-session-strip {
    grid-template-columns: 1fr;
  }

  .compare-metric-values {
    grid-template-columns: 1fr;
  }

  .compare-metric-values strong.right {
    text-align: left;
  }

  .info-section {
    padding: 0 16px 16px;
  }

  .debug-details {
    margin: 0 16px 18px;
  }

  .session-params-layout {
    padding: 0 14px 16px;
  }

  .instrument-grid,
  .weapon-grid,
  .environment-grid,
  .device-content,
  .pcp-layout,
  .meta-stack {
    grid-template-columns: 1fr;
  }

  .instrument-title {
    padding: 18px 18px 12px;
  }

  .device-content,
  .pcp-layout,
  .weapon-grid,
  .environment-grid,
  .meta-stack {
    padding-left: 16px;
    padding-right: 16px;
  }

  .environment-sensor {
    min-height: 118px;
    grid-template-columns: 74px minmax(0, 1fr);
    padding: 14px;
  }

  .environment-orbit {
    width: 68px;
    height: 68px;
  }

  .device-visual {
    min-height: 220px;
  }

  .device-visual img {
    width: min(430px, 100%);
    height: 210px;
    transform: none;
  }

  .pcp-layout {
    justify-items: center;
  }

  .pcp-metrics,
  .efficiency-strip {
    width: 100%;
  }

  .pcp-metrics,
  .efficiency-strip {
    grid-template-columns: 1fr;
  }

  .weapon-node {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 112px;
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  }

  .weapon-node:last-child {
    border-bottom: 0;
  }

  .weapon-node > div {
    transform: none;
  }

  .node-mark {
    width: 72px;
    height: 72px;
  }

  .weapon-image-mark,
  .ammo-image-mark,
  .rof-image-mark {
    width: min(190px, 100%);
    height: min(190px, 100vw);
  }

  .session-overview .debug-details summary {
    min-height: 58px;
    padding: 0 16px;
    font-size: 15px;
  }
}

body.theme-light {
  --text: #101828;
  --muted: #475467;
  --line: rgba(15, 23, 42, 0.13);
  --soft: rgba(239, 246, 255, 0.78);
  --panel: rgba(255, 255, 255, 0.78);
  --green: #13a765;
  --blue: #0ea5e9;
  --cyan: #0891b2;
  --bg: #f4f8fb;
  --bg-2: #eaf3f8;
  --glass: rgba(255, 255, 255, 0.74);
  --glass-strong: rgba(255, 255, 255, 0.92);
  --glow-cyan: 0 18px 48px rgba(14, 165, 233, 0.16);
  --glow-orange: 0 18px 48px rgba(255, 107, 53, 0.14);
  --shadow-panel: 0 22px 70px rgba(15, 23, 42, 0.11);
  color-scheme: light;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.17), transparent 34rem),
    radial-gradient(circle at 88% 8%, rgba(255, 107, 53, 0.12), transparent 32rem),
    linear-gradient(135deg, #f7fbff 0%, #edf7fb 42%, #f7fafc 100%);
}

body.theme-light,
body.theme-light * {
  text-shadow: none;
}

body.theme-light::before {
  background-image:
    linear-gradient(rgba(14, 116, 144, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 116, 144, 0.07) 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), transparent 86%);
}

body.theme-light header {
  background: rgba(248, 252, 255, 0.86);
  border-bottom-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.08);
}

body.theme-light .brand strong,
body.theme-light .login-card h1,
body.theme-light .hero h1,
body.theme-light .back-row h1,
body.theme-light .panel-head h2,
body.theme-light .chart-title,
body.theme-light .instrument-title h3,
body.theme-light .compare-session-card h3,
body.theme-light .compare-session-equipment span {
  color: #0f172a;
}

body.theme-light .accent {
  color: #2563eb;
}

body.theme-light .login-card,
body.theme-light .stat-card,
body.theme-light .panel,
body.theme-light .chart-card,
body.theme-light .compare-metric-card {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-panel);
}

body.theme-light .login-card::before,
body.theme-light .panel::before,
body.theme-light .chart-card::before,
body.theme-light .stat-card::before {
  opacity: 0;
}

body.theme-light .instrument-card,
body.theme-light .compare-session-card {
  border-color: rgba(14, 165, 233, 0.24);
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.15), transparent 24rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(226, 242, 249, 0.72));
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12), 0 0 34px rgba(14, 165, 233, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.theme-light .instrument-card::before,
body.theme-light .compare-session-card::before {
  background:
    linear-gradient(90deg, rgba(14, 165, 233, 0.1), transparent 36%, rgba(255, 107, 53, 0.08)),
    repeating-linear-gradient(90deg, rgba(14, 116, 144, 0.04) 0 1px, transparent 1px 82px);
  opacity: 0.58;
}

body.theme-light .meta-card,
body.theme-light .compare-session-right {
  border-color: rgba(255, 107, 53, 0.28);
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 107, 53, 0.15), transparent 20rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(248, 238, 232, 0.72));
}

body.theme-light .environment-card {
  border-color: rgba(15, 23, 42, 0.07);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.08);
}

body.theme-light .environment-card::before {
  opacity: 0;
}

body.theme-light .environment-title h3 {
  color: #101828;
}

body.theme-light .environment-title p {
  color: #667085;
  opacity: 1;
}

body.theme-light input,
body.theme-light select,
body.theme-light .login-card input,
body.theme-light .toolbar input,
body.theme-light .toolbar select {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.54);
}

body.theme-light input::placeholder {
  color: #667085;
}

body.theme-light .button,
body.theme-light .action-button,
body.theme-light .compare-pick-button {
  border-color: rgba(15, 23, 42, 0.13);
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
}

body.theme-light .button.primary,
body.theme-light .login-actions .button.primary,
body.theme-light .action-button {
  border-color: rgba(255, 107, 53, 0.42);
  background: linear-gradient(135deg, #ff6b35, #ff8a3d);
  color: #fff;
}

.theme-toggle-button {
  min-width: 126px;
  border-color: rgba(0, 213, 255, 0.28);
  background:
    radial-gradient(circle at 14% 0%, rgba(0, 213, 255, 0.14), transparent 7rem),
    rgba(15, 23, 42, 0.82);
  color: #dff9ff;
}

body.theme-light .theme-toggle-button {
  border-color: rgba(14, 165, 233, 0.28);
  background:
    radial-gradient(circle at 14% 0%, rgba(14, 165, 233, 0.16), transparent 7rem),
    rgba(255, 255, 255, 0.86);
  color: #075985;
}

body.theme-light .toolbar,
body.theme-light .compare-selection-bar {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

body.theme-light .stat-card small,
body.theme-light .badge,
body.theme-light .compare-session-label,
body.theme-light .instrument-icon {
  border-color: rgba(14, 165, 233, 0.24);
  background: rgba(14, 165, 233, 0.09);
  color: #0e7490;
}

body.theme-light .stat-card strong,
body.theme-light .device-facts strong,
body.theme-light .device-facts b,
body.theme-light .instrument-metric strong,
body.theme-light .overview-metric strong,
body.theme-light .weapon-node strong,
body.theme-light .environment-reading strong,
body.theme-light .session-date strong,
body.theme-light .session-equipment span,
body.theme-light .session-metrics strong,
body.theme-light .raw-item strong,
body.theme-light .compare-session-strip b,
body.theme-light .compare-metric-values strong,
body.theme-light .compare-versus,
body.theme-light .compare-winner,
body.theme-light table {
  color: #0f172a;
}

body.theme-light .muted,
body.theme-light .status,
body.theme-light .device-facts span,
body.theme-light .instrument-metric span,
body.theme-light .overview-metric span,
body.theme-light .weapon-node span,
body.theme-light .efficiency-strip span,
body.theme-light .environment-reading span,
body.theme-light .session-metrics span,
body.theme-light .raw-item span,
body.theme-light .compare-metric-card > span,
body.theme-light .session-device .muted,
body.theme-light .dashboard-device-id span,
body.theme-light .dashboard-device-id small,
body.theme-light .dashboard-info-rows span,
body.theme-light .dashboard-pcp-mini span,
body.theme-light .dashboard-sensor-tile span:not(.dashboard-mini-icon),
body.theme-light .dashboard-loadout-grid span:not(.dashboard-mini-icon) {
  color: #475467;
  opacity: 1;
}

body.theme-light .instrument-metric,
body.theme-light .overview-metric,
body.theme-light .session-metrics div,
body.theme-light .raw-item,
body.theme-light .session-sparkline,
body.theme-light .debug-details {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.86);
}

body.theme-light .environment-sensor {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.05);
}

body.theme-light .environment-orbit {
  background: radial-gradient(circle, rgba(239, 246, 255, 0.98), rgba(229, 240, 255, 0.92));
  color: #2f7bff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 14px 28px rgba(47, 123, 255, 0.08);
}

body.theme-light .environment-status {
  border-color: rgba(22, 135, 90, 0.14);
  background: rgba(232, 247, 239, 0.92);
  color: #16875a;
}

body.theme-light .pressure-ring {
  background:
    radial-gradient(circle at center, #f8fcff 54%, transparent 55%),
    conic-gradient(from 210deg, #22c4e8 0 var(--pressure), rgba(148, 163, 184, 0.24) var(--pressure) 100%);
  box-shadow: 0 0 34px rgba(14, 165, 233, 0.16), inset 0 0 26px rgba(15, 23, 42, 0.08);
}

body.theme-light .pressure-ring > div {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98), rgba(231, 244, 251, 0.9));
  box-shadow: inset 0 0 18px rgba(15, 23, 42, 0.08);
}

body.theme-light .pressure-ring strong,
body.theme-light .pressure-ring span {
  color: #0f172a;
}

body.theme-light .device-visual::before {
  border-color: rgba(14, 165, 233, 0.12);
  background:
    repeating-radial-gradient(circle, rgba(14, 165, 233, 0.11) 0 1px, transparent 1px 28px),
    radial-gradient(circle, rgba(14, 165, 233, 0.12), transparent 64%);
}

body.theme-light .device-visual::after {
  background: rgba(14, 165, 233, 0.16);
}

body.theme-light .device-visual img {
  filter: drop-shadow(0 24px 30px rgba(15, 23, 42, 0.22)) saturate(1.04) contrast(1.04) brightness(1.02);
}

body.theme-light .weapon-image-mark,
body.theme-light .ammo-image-mark,
body.theme-light .rof-image-mark {
  filter: drop-shadow(0 18px 24px rgba(14, 116, 144, 0.18));
}

body.theme-light .session-card {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.09);
}

body.theme-light .session-card:hover {
  border-color: rgba(14, 165, 233, 0.32);
  box-shadow: 0 18px 54px rgba(14, 165, 233, 0.14);
}

body.theme-light th,
body.theme-light .shots-panel thead th {
  background: rgba(226, 242, 249, 0.9);
  color: #64748b;
}

body.theme-light tbody tr,
body.theme-light tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.42);
}

body.theme-light tbody tr:hover {
  background: rgba(14, 165, 233, 0.08);
}

body.theme-light .shots-panel .panel-head {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(226, 242, 249, 0.86)),
    var(--panel);
}

body.theme-light .line-chart text,
body.theme-light .compare-line-chart text {
  fill: rgba(71, 85, 105, 0.92);
}

body.theme-light .chart-empty,
body.theme-light .compare-versus {
  background: rgba(255, 255, 255, 0.64);
}

body.theme-light .chart-tooltip {
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

body.theme-light .session-overview .debug-details summary {
  color: #334155;
}

.dashboard-sidebar {
  display: none;
}

body[data-view="dashboard"] .dashboard-sidebar,
body[data-view="settings"] .dashboard-sidebar,
body[data-view="chronographs"] .dashboard-sidebar,
body[data-view="ammo"] .dashboard-sidebar,
body[data-view="reports"] .dashboard-sidebar {
  position: fixed;
  top: 58px;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: block;
  width: 288px;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 213, 255, 0.1), transparent 18rem),
    rgba(5, 10, 18, 0.74);
  backdrop-filter: blur(18px);
}

.dashboard-sidebar-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 18px 22px;
}

.dashboard-sidebar nav {
  display: grid;
  gap: 10px;
}

.sidebar-item {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  text-align: left;
  cursor: default;
}

.sidebar-item span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 213, 255, 0.24);
  border-radius: 8px;
  color: #7eeaff;
  background: rgba(0, 213, 255, 0.07);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.sidebar-item svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-item.active {
  border-color: rgba(0, 213, 255, 0.12);
  background: linear-gradient(90deg, rgba(0, 213, 255, 0.12), rgba(0, 213, 255, 0.02));
  color: #f8fbff;
}

.sidebar-user {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
}

.sidebar-user > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #00d5ff, #3152ff);
  color: #ffffff;
  font-weight: 950;
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong {
  color: #f8fbff;
  font-weight: 950;
}

.sidebar-user small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

body[data-view="dashboard"] .page-main,
body[data-view="settings"] .page-main,
body[data-view="chronographs"] .page-main,
body[data-view="ammo"] .page-main,
body[data-view="reports"] .page-main {
  width: calc(100% - 360px);
  max-width: 1720px;
  margin-left: 328px;
  margin-right: 32px;
}

body[data-view="dashboard"] header .topbar,
body[data-view="settings"] header .topbar,
body[data-view="chronographs"] header .topbar,
body[data-view="ammo"] header .topbar,
body[data-view="reports"] header .topbar {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0 28px;
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(720px, 1.28fr) minmax(380px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.dashboard-sessions-panel .session-card {
  grid-template-columns: minmax(216px, 0.92fr) minmax(142px, 0.46fr) minmax(0, 1.18fr) minmax(108px, auto);
  gap: 12px;
  min-height: 92px;
  padding: 12px;
}

.dashboard-sessions-panel .session-card-main {
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 8px 12px;
}

.dashboard-sessions-panel .session-sparkline,
.dashboard-sessions-panel .session-sparkline svg,
.dashboard-sessions-panel .sparkline-empty {
  height: 54px;
  min-height: 54px;
}

.dashboard-sessions-panel .session-metrics {
  gap: 6px;
  min-width: 0;
}

.dashboard-sessions-panel .session-metrics div {
  min-height: 52px;
  min-width: 0;
  padding: 8px;
}

.dashboard-sessions-panel .session-metrics strong {
  font-size: 13px;
}

.dashboard-sessions-panel .action-button,
.dashboard-sessions-panel .compare-pick-button {
  min-width: 108px;
  padding-inline: 12px;
}

.dashboard-preview {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 76px;
  margin-top: 20px;
}

.dashboard-preview-charts {
  display: grid;
  gap: 16px;
}

.dashboard-preview .chart-card {
  min-height: 272px;
  padding: 18px;
}

.dashboard-preview .line-chart {
  height: 210px;
}

.dashboard-preview-info,
.dashboard-quick-cards {
  display: grid;
  gap: 16px;
}

.dashboard-quick-cards {
  grid-template-columns: minmax(420px, 1.45fr) minmax(240px, 0.62fr) minmax(300px, 0.82fr);
  grid-auto-rows: 1fr;
  align-items: stretch;
  justify-items: stretch;
  margin-top: 18px;
}

.dashboard-quick-cards > * {
  align-self: stretch;
  width: 100%;
  margin: 0;
}

.dashboard-info-card,
.dashboard-device-summary {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-md);
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(21, 32, 50, 0.82), rgba(8, 13, 22, 0.68)),
    rgba(9, 15, 26, 0.78);
  box-shadow: var(--shadow-panel);
}

.dashboard-info-card h3,
.dashboard-device-summary h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #f8fbff;
  font-size: 18px;
  font-weight: 950;
}

.dashboard-info-rows {
  display: grid;
  gap: 12px;
}

.dashboard-info-rows div,
.dashboard-pcp-mini div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  background: rgba(5, 10, 18, 0.32);
}

.dashboard-info-rows span,
.dashboard-pcp-mini span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 880;
}

.dashboard-info-rows strong,
.dashboard-pcp-mini strong {
  color: #f8fbff;
  font-weight: 950;
  text-align: right;
}

.dashboard-device-summary {
  grid-column: span 1;
}

.dashboard-device-summary-body {
  flex: 1;
  display: grid;
  grid-template-columns: 230px minmax(180px, 0.72fr) minmax(320px, 1fr);
  gap: 22px;
  align-items: center;
}

.dashboard-device-render {
  min-height: 160px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background:
    radial-gradient(circle at 45% 50%, rgba(0, 213, 255, 0.12), transparent 64%),
    rgba(5, 10, 18, 0.14);
}

.dashboard-device-render img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.34));
}

.dashboard-device-id strong {
  display: block;
  color: #f8fbff;
  font-size: clamp(28px, 2.1vw, 38px);
  line-height: 1;
}

.dashboard-device-id span,
.dashboard-device-id small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 760;
}

.dashboard-pcp-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-pcp-mini div {
  min-height: 86px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
}

.dashboard-pcp-mini span {
  font-size: 11px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-pcp-mini strong {
  max-width: 100%;
  font-size: clamp(20px, 1.7vw, 28px);
  line-height: 1.04;
  overflow-wrap: anywhere;
  text-align: left;
}

.dashboard-mini-icon {
  flex: 0 0 auto;
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(0, 213, 255, 0.24);
  border-radius: 9px;
  background: rgba(0, 213, 255, 0.08);
  color: #7eeaff;
}

.dashboard-mini-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-sensor-grid,
.dashboard-loadout-grid {
  flex: 1;
  display: grid;
  grid-auto-rows: 1fr;
  gap: 12px;
}

.dashboard-sensor-tile,
.dashboard-loadout-grid div {
  display: grid;
  height: 100%;
  min-height: 74px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(5, 10, 18, 0.32);
}

.dashboard-sensor-tile {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.dashboard-sensor-tile span:not(.dashboard-mini-icon),
.dashboard-loadout-grid span:not(.dashboard-mini-icon) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-sensor-tile strong,
.dashboard-loadout-grid strong {
  color: #f8fbff;
  font-weight: 950;
  overflow-wrap: anywhere;
}

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

.dashboard-loadout-grid div {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 12px;
}

.dashboard-loadout-grid .dashboard-mini-icon {
  grid-row: span 2;
}

.dashboard-preview-selected {
  border-color: rgba(0, 213, 255, 0.46);
  box-shadow: 0 0 0 1px rgba(0, 213, 255, 0.12), 0 0 34px rgba(0, 213, 255, 0.12), 0 16px 46px rgba(0, 0, 0, 0.24);
}

.dashboard-empty-preview {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-weight: 850;
}

body.theme-light[data-view="dashboard"] .dashboard-sidebar,
body.theme-light[data-view="settings"] .dashboard-sidebar,
body.theme-light[data-view="chronographs"] .dashboard-sidebar,
body.theme-light[data-view="ammo"] .dashboard-sidebar,
body.theme-light[data-view="reports"] .dashboard-sidebar {
  border-right-color: rgba(15, 23, 42, 0.1);
  background:
    radial-gradient(circle at 0% 0%, rgba(47, 123, 255, 0.12), transparent 18rem),
    rgba(255, 255, 255, 0.78);
  box-shadow: 12px 0 46px rgba(15, 23, 42, 0.06);
}

body.theme-light .sidebar-item {
  color: #667085;
}

body.theme-light .sidebar-item span {
  border-color: rgba(47, 123, 255, 0.16);
  background: rgba(47, 123, 255, 0.08);
  color: #2f7bff;
}

body.theme-light .sidebar-item.active {
  border-color: rgba(47, 123, 255, 0.12);
  background: linear-gradient(90deg, rgba(47, 123, 255, 0.12), rgba(47, 123, 255, 0.03));
  color: #2f6df6;
}

body.theme-light .sidebar-user,
body.theme-light .dashboard-info-card,
body.theme-light .dashboard-device-summary {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

body.theme-light .sidebar-user strong,
body.theme-light .dashboard-info-card h3,
body.theme-light .dashboard-device-summary h3,
body.theme-light .dashboard-info-rows strong,
body.theme-light .dashboard-pcp-mini strong,
body.theme-light .dashboard-device-summary strong {
  color: #101828;
  opacity: 1;
}

body.theme-light .dashboard-info-rows div,
body.theme-light .dashboard-pcp-mini div,
body.theme-light .dashboard-sensor-tile,
body.theme-light .dashboard-loadout-grid div {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

body.theme-light .dashboard-device-render {
  background:
    radial-gradient(circle at 45% 50%, rgba(47, 123, 255, 0.1), transparent 64%),
    rgba(248, 252, 255, 0.7);
}

body.theme-light .dashboard-device-render img {
  filter: drop-shadow(0 18px 24px rgba(15, 23, 42, 0.16));
}

body.theme-light .dashboard-mini-icon {
  border-color: rgba(47, 123, 255, 0.16);
  background: rgba(47, 123, 255, 0.08);
  color: #2f7bff;
}

body.theme-light .dashboard-sensor-tile strong,
body.theme-light .dashboard-loadout-grid strong {
  color: #101828;
}

body.theme-light .dashboard-preview-selected {
  border-color: rgba(47, 123, 255, 0.36);
  box-shadow: 0 0 0 1px rgba(47, 123, 255, 0.08), 0 18px 48px rgba(47, 123, 255, 0.12);
}

body.theme-light[data-view="dashboard"] .stat-card {
  min-height: 116px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.82)),
    #ffffff;
}

body.theme-light[data-view="dashboard"] .stat-card small {
  border: 0;
  background: rgba(47, 123, 255, 0.08);
  color: #3b82f6;
}

body.theme-light[data-view="dashboard"] .accent {
  color: #2f7bff;
  text-shadow: none;
}

.settings-view {
  display: none;
}

.settings-view.active {
  display: block;
}

.chronographs-view {
  display: none;
}

.chronographs-view.active {
  display: block;
}

.chronographs-panel {
  min-height: 360px;
  padding: 24px;
}

.chronographs-list {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.reports-view {
  display: none;
}

.reports-view.active {
  display: block;
}

.reports-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.reports-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(360px, 1.08fr);
  gap: 18px;
  align-items: stretch;
}

.reports-builder-panel,
.reports-analytics-panel,
.reports-recent-panel {
  padding: 24px;
}

.reports-recent-panel {
  margin-top: 18px;
}

.reports-builder {
  display: grid;
  gap: 14px;
}

.reports-compare-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reports-field {
  display: grid;
  gap: 9px;
}

.reports-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reports-field select {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(5, 10, 18, 0.42);
  color: #f8fbff;
  font: inherit;
  font-weight: 850;
}

.reports-status {
  min-height: 20px;
  margin: 16px 0 0;
  font-weight: 800;
}

.reports-status.error {
  color: #ff6b6b;
}

.analytics-report-list {
  display: grid;
  gap: 14px;
}

.analytics-report-card {
  min-height: 122px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid rgba(0, 213, 255, 0.18);
  border-radius: 16px;
  padding: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 213, 255, 0.12), transparent 12rem),
    rgba(5, 10, 18, 0.34);
  color: #f8fbff;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.analytics-report-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 213, 255, 0.42);
  box-shadow: 0 18px 44px rgba(0, 213, 255, 0.1);
}

.analytics-report-card strong {
  font-size: 20px;
  line-height: 1.15;
}

.analytics-report-card span {
  color: var(--muted);
  font-weight: 780;
}

.reports-recent-list {
  display: grid;
  gap: 12px;
}

.reports-recent-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: rgba(5, 10, 18, 0.3);
}

.reports-recent-card strong,
.reports-recent-card span {
  display: block;
  min-width: 0;
}

.reports-recent-card strong {
  color: #f8fbff;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.reports-recent-card span {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 780;
}

.ammo-view {
  display: none;
}

.ammo-view.active {
  display: block;
}

.ammo-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 18px;
  align-items: start;
}

.ammo-catalog-panel {
  min-height: 360px;
  padding: 24px;
}

.catalog-list {
  display: grid;
  gap: 14px;
}

.catalog-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 213, 255, 0.12), transparent 14rem),
    rgba(5, 10, 18, 0.36);
}

.catalog-card-projectile {
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 107, 53, 0.12), transparent 14rem),
    rgba(5, 10, 18, 0.36);
}

.chronograph-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.12), transparent 14rem),
    rgba(5, 10, 18, 0.36);
}

.catalog-card-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.catalog-card-head h3 {
  margin: 0;
  color: #f8fbff;
  font-size: 19px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.catalog-card-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 850;
}

.catalog-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 213, 255, 0.28);
  border-radius: 14px;
  background: rgba(0, 213, 255, 0.08);
  color: #7eeaff;
}

.catalog-card-projectile .catalog-icon {
  border-color: rgba(255, 107, 53, 0.28);
  background: rgba(255, 107, 53, 0.08);
  color: #ffb08c;
}

.chronograph-icon {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
  color: #86efac;
}

.catalog-rows {
  display: grid;
  gap: 9px;
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.28);
}

.catalog-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.catalog-row strong {
  color: #f8fbff;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: right;
}

.catalog-empty {
  margin: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(320px, 760px);
  gap: 18px;
  align-items: start;
}

.settings-card {
  min-height: 280px;
  padding: 24px;
}

.settings-theme-card {
  min-height: 180px;
}

.settings-units-card {
  grid-row: auto;
}

.settings-theme-toggle {
  justify-content: center;
  width: 100%;
  min-height: 54px;
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.settings-card-head h2 {
  margin: 0;
  color: #f8fbff;
  font-size: 24px;
  line-height: 1.1;
}

.settings-card-head p {
  margin: 6px 0 0;
}

.settings-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(0, 213, 255, 0.28);
  border-radius: 12px;
  background: rgba(0, 213, 255, 0.08);
  color: #7eeaff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.settings-field {
  display: grid;
  gap: 10px;
}

.settings-field span,
.settings-unit-block > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.settings-field select {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 0 16px;
  background: rgba(5, 10, 18, 0.42);
  color: #f8fbff;
  font: inherit;
  font-weight: 850;
}

.settings-units-grid {
  display: grid;
  gap: 16px;
}

.settings-unit-block {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(220px, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(5, 10, 18, 0.28);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.segmented-control button {
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.segmented-control button:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 213, 255, 0.44);
}

.segmented-control button.active {
  border-color: rgba(0, 213, 255, 0.7);
  background: linear-gradient(135deg, #00d5ff, #2f7bff);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(0, 213, 255, 0.18);
}

.settings-status {
  margin: 18px 0 0;
  min-height: 22px;
  font-weight: 780;
}

.settings-status.error {
  color: #ff6b6b;
}

body.theme-light .settings-card-head h2 {
  color: #101828;
}

body.theme-light .catalog-card {
  border-color: rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at 0% 0%, rgba(47, 123, 255, 0.1), transparent 14rem),
    rgba(255, 255, 255, 0.88);
}

body.theme-light .catalog-card-projectile {
  background:
    radial-gradient(circle at 0% 0%, rgba(234, 88, 12, 0.1), transparent 14rem),
    rgba(255, 255, 255, 0.88);
}

body.theme-light .chronograph-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(22, 163, 74, 0.1), transparent 14rem),
    rgba(255, 255, 255, 0.88);
}

body.theme-light .catalog-card-head h3,
body.theme-light .catalog-row strong {
  color: #101828;
}

body.theme-light .catalog-icon {
  border-color: rgba(47, 123, 255, 0.18);
  background: rgba(47, 123, 255, 0.08);
  color: #2f7bff;
}

body.theme-light .catalog-card-projectile .catalog-icon {
  border-color: rgba(234, 88, 12, 0.16);
  background: rgba(234, 88, 12, 0.08);
  color: #ea580c;
}

body.theme-light .chronograph-icon {
  border-color: rgba(22, 163, 74, 0.16);
  background: rgba(22, 163, 74, 0.08);
  color: #16a34a;
}

body.theme-light .catalog-row {
  border-color: rgba(15, 23, 42, 0.07);
  background: rgba(248, 252, 255, 0.82);
}

body.theme-light .reports-field select,
body.theme-light .reports-recent-card,
body.theme-light .analytics-report-card {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: #101828;
}

body.theme-light .reports-recent-card strong,
body.theme-light .analytics-report-card strong {
  color: #101828;
}

body.theme-light .analytics-report-card:hover {
  border-color: rgba(47, 123, 255, 0.28);
  box-shadow: 0 18px 44px rgba(47, 123, 255, 0.1);
}

body.theme-light .settings-card-icon {
  border-color: rgba(47, 123, 255, 0.16);
  background: rgba(47, 123, 255, 0.08);
  color: #2f7bff;
}

body.theme-light .settings-field select,
body.theme-light .settings-unit-block {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: #101828;
}

body.theme-light .segmented-control button {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(248, 252, 255, 0.96);
  color: #475467;
}

body.theme-light .segmented-control button.active {
  border-color: rgba(47, 123, 255, 0.34);
  background: linear-gradient(135deg, #2f7bff, #3b82f6);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(47, 123, 255, 0.18);
}

@media (max-width: 1500px) {
  body[data-view="dashboard"] .page-main,
  body[data-view="settings"] .page-main,
  body[data-view="chronographs"] .page-main,
  body[data-view="ammo"] .page-main,
  body[data-view="reports"] .page-main {
    width: calc(100% - 320px);
    margin-left: 304px;
    margin-right: 16px;
  }

  body[data-view="dashboard"] .dashboard-sidebar,
  body[data-view="settings"] .dashboard-sidebar,
  body[data-view="chronographs"] .dashboard-sidebar,
  body[data-view="ammo"] .dashboard-sidebar,
  body[data-view="reports"] .dashboard-sidebar {
    width: 268px;
  }

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

  .dashboard-preview {
    position: static;
    margin-top: 0;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.46fr);
  }

  .dashboard-quick-cards {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-device-summary {
    grid-column: 1 / -1;
  }

  .dashboard-info-card,
  .dashboard-device-summary {
    height: 100%;
    min-height: 320px;
  }

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

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

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

@media (max-width: 1060px) {
  body[data-view="dashboard"] .dashboard-sidebar,
  body[data-view="settings"] .dashboard-sidebar,
  body[data-view="chronographs"] .dashboard-sidebar,
  body[data-view="ammo"] .dashboard-sidebar,
  body[data-view="reports"] .dashboard-sidebar {
    display: none;
  }

  body[data-view="dashboard"] .page-main,
  body[data-view="settings"] .page-main,
  body[data-view="chronographs"] .page-main,
  body[data-view="ammo"] .page-main,
  body[data-view="reports"] .page-main {
    width: min(1760px, calc(100% - 28px));
    margin: 0 auto;
  }

  .dashboard-preview,
  .dashboard-quick-cards,
  .dashboard-device-summary-body {
    grid-template-columns: 1fr;
  }

  .dashboard-pcp-mini {
    grid-template-columns: 1fr;
  }

  .settings-card {
    padding: 18px;
  }

  .settings-unit-block {
    grid-template-columns: 1fr;
  }

  .ammo-catalog-grid {
    grid-template-columns: 1fr;
  }

  .reports-summary-grid,
  .reports-compare-fields,
  .reports-recent-card {
    grid-template-columns: 1fr;
  }

  .reports-builder-panel,
  .reports-analytics-panel,
  .reports-recent-panel {
    padding: 18px;
  }
}
