:root {
  --mx-night: #040e1c;
  --mx-panel: #0a1b2e;
  --mx-side: #061525;
  --mx-line: #25415e;
  --mx-soft: #122d49;
  --mx-text: #f3f8ff;
  --mx-muted: #a9bed5;
  --mx-blue: #086ddd;
  --mx-focus: #58caff;
  --mx-led: #36dcff;
  --mx-stage: #ff9a35;
  --mx-power: #c382ff;
  --mx-stock: #45f8a7;
  --mx-lightbox: #ffd86c;
  --mx-paper: #122441;
  --mx-paper-blue: #075d94;
}
body.mx-portal:not(.light), body.mx-led:not(.light) {
  --bg: var(--mx-night);
  --panel: var(--mx-panel);
  --side: var(--mx-side);
  --line: var(--mx-line);
  --soft: var(--mx-soft);
  --text: var(--mx-text);
  --muted: var(--mx-muted);
}
.mx-portal, .mx-led {
  background-image: radial-gradient(ellipse at 75% 0%, #1676d225, transparent 56%);
}
.mx-portal .top button, .mx-led button, .mx-portal .primary {
  border-radius: 10px;
}
.mx-portal button:focus-visible, .mx-led button:focus-visible,
.mx-portal a:focus-visible, .mx-led a:focus-visible {
  outline: 2px solid var(--mx-focus);
  outline-offset: 3px;
}
.mx-portal button.primary, .mx-led button.primary,
.mx-portal nav button.active, .mx-led .tabs button.active {
  background: linear-gradient(115deg, #005fcd, #00478d);
  color: white;
  border-color: var(--mx-blue);
}
.mx-portal aside, .mx-led .sidebar {
  background: linear-gradient(145deg, var(--side) 57%, #086ddd1c);
}
.mx-portal .brand img, .mx-led .brand img {
  width: 63px;
  height: auto;
  flex: none;
}
.mx-portal .top { margin-bottom: 18px; }
.mx-portal .top p { font-weight: 700; }
.mx-portal .mx-hero {
  position: relative;
  padding: 0 0 24px;
  margin-bottom: 6px;
}
.mx-hero-lockup {
  display: grid;
  justify-items: center;
  min-height: 190px;
  margin-bottom: 16px;
  background: linear-gradient(125deg, transparent 25%, #0b7bfc38 25.3%, transparent 35%),
    radial-gradient(ellipse at 50% 40%, #117aee44, transparent 64%);
}
.mx-hero-lockup img {
  display: block;
  width: clamp(160px, 30vw, 285px);
  filter: drop-shadow(0 0 13px #008cff88);
}
.mx-hero-lockup strong {
  font-size: clamp(32px, 6vw, 65px);
  font-style: italic;
  letter-spacing: .11em;
  line-height: 1;
}
.mx-hero-lockup strong span { color: var(--mx-focus); }
.mx-hero-lockup small { letter-spacing: .18em; margin-top: 8px; }
.mx-welcome { border-inline-start: 4px solid #00bfef; padding-inline-start: 17px; }
.mx-welcome p { margin-top: 5px; color: var(--muted); }
.mx-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-block: 14px 24px;
}
.mx-module[data-module="led"] { --app-accent: var(--mx-led); --app-scene: url('mx-led-scene.svg'); }
.mx-module[data-module="rigging"] { --app-accent: var(--mx-stage); --app-scene: url('mx-stage-scene.svg'); }
.mx-module[data-module="power"] { --app-accent: var(--mx-power); --app-scene: url('mx-power-scene.svg'); }
.mx-module[data-module="stock"] { --app-accent: var(--mx-stock); --app-scene: url('mx-stock-scene.svg'); }
.mx-module[data-module="lightbox"] { --app-accent: var(--mx-lightbox); }
.mx-module {
  --app-accent: var(--mx-focus);
  --app-scene: none;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 180px;
  padding: 21px;
  border-radius: 19px;
  border: 1px solid var(--app-accent);
  color: #f5faff;
  background: linear-gradient(92deg, #050f1d 8%, #050f1df4 40%, #050f1d22 100%),
    var(--app-scene) right center / auto 100% no-repeat,
    #08182b;
  box-shadow: inset 0 2px 18px color-mix(in srgb, var(--app-accent) 25%, transparent);
}
.mx-module-icon {
  padding: 4px;
  width: clamp(42px, 6vw, 78px);
  aspect-ratio: 1;
  flex: none;
  border-radius: 15px;
  border: 1px solid var(--app-accent);
  background: #061323db;
  display: grid;
  place-items: center;
}
.mx-module-icon img { width: 100%; display: block; }
.mx-module h3 { font-size: clamp(20px, 2.2vw, 32px); line-height: 1.12; }
.mx-module h3 span { color: var(--app-accent); }
.mx-module p { color: #e7f3ff; margin: 6px 0 14px; max-width: 27ch; }
.mx-module button, .mx-module .mx-status {
  display: inline-block;
  border: 1px solid #496381;
  padding: 7px 14px;
  border-radius: 22px;
  background: #15314d;
  color: #f5faff;
  font-weight: 650;
}
.mx-module .mx-status { background: #0a1828; font-size: 12px; }
.mx-led .top {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--mx-led);
  border-radius: 12px;
  background: var(--panel);
}
.mx-led .nav button.selected { border-color: var(--mx-blue); }
.mx-led .sidebar a { color: var(--text); }
.mx-led .brand small { color: var(--muted); }
.mx-led .card { box-shadow: 0 6px 20px #0002; }
.mx-led .paper { color: var(--mx-paper); }
.mx-led .paper .page > h1 {
  border-bottom: 2px solid var(--mx-paper-blue);
  padding-bottom: 2mm;
  margin-bottom: 2mm;
}
.mx-led .paper thead th { background: #edf5fc; }
.mx-led .paper .p-stats > div { background: #f2f7fc; }
.mx-led .paper .pdf-electrical .stat { background: #153d68; }
.mx-led .cover-frame {
  background: linear-gradient(144deg, #eff8ff, #f9fcff 65%);
  border-top-color: var(--mx-paper-blue);
}
.mx-led .cover-brand { color: var(--mx-paper-blue); }
.mx-led .cover-logo {
  display: block;
  width: 34mm;
  height: 16mm;
  margin: 0 auto 3mm;
  background: url('mx-logo.svg') center / contain no-repeat;
}
@media (max-width: 1120px) {
  .mx-module { padding: 17px; gap: 12px; }
}
@media (max-width: 650px) {
  .mx-module-grid { grid-template-columns: 1fr; }
  .mx-hero-lockup { min-height: 145px; }
}
.mx-stage > header {
  background: var(--mx-panel);
  border-bottom: 1px solid var(--mx-stage);
}
.mx-stage > header b { display: inline-flex; align-items: center; gap: 10px; }
.mx-stage > header img { width: 56px; }
.mx-stage #printout, .mx-stage #previewbody { color: var(--mx-paper); }
.mx-stage #printout h2, .mx-stage #printout h3,
.mx-stage #previewbody h2, .mx-stage #previewbody h3 {
  border-bottom: 2px solid var(--mx-paper-blue);
  padding-bottom: 2mm;
}
.mx-stage .cover::before {
  content: "";
  display: block;
  width: 36mm;
  height: 17mm;
  margin-bottom: 4mm;
  background: url('mx-logo.svg') center / contain no-repeat;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.mx-stage #printout th, .mx-stage #previewbody th { background: #edf5fc; }
@media (max-width: 650px) {
  .mx-stage > header { flex-wrap: wrap; }
}

.mx-stage .cover { flex-direction: column; }
.mx-stage #previewbody { background: white; }
