/* Shared layout, inputs, dialogs, tables and original component defaults. */

:root {
  --bg: #07110c;
  --surface: #0f1e17;
  --card: #16271c;
  --line: #34533e;
  --txt: #f0f5ea;
  --dim: #a2b9a4;
  --mint: #a5edb5;
  --amber: #f3c084;
  --alert: #ef9b88;
  --muted: #83998a;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% -12%, #243c2a, #07110c 44%);
  color: var(--txt);
  font:
    14px/1.45 system-ui,
    -apple-system,
    Segoe UI,
    Arial,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #55755d;
  background: #1c3525;
  color: #e7f3e7;
  border-radius: 10px;
  padding: 10px 13px;
  transition:
    0.16s background,
    0.16s transform;
}
button:hover {
  background: #2c4b35;
}
button:active {
  transform: scale(0.985);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #b6f9c3;
  outline-offset: 2px;
}
select,
input[type='number'] {
  background: #1b2b21;
  border: 1px solid #44614c;
  border-radius: 9px;
  color: #ebf4e8;
  padding: 9px;
  max-width: 210px;
  width: 100%;
}
input[type='range'] {
  accent-color: var(--mint);
}
small,
.muted {
  color: var(--dim);
}
.mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}
.layout {
  max-width: 1800px;
  padding: 0 clamp(12px, 2.2vw, 38px) 36px;
  margin: auto;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px clamp(12px, 2.2vw, 38px);
  border-bottom: 1px solid #2b4532;
  background: #0b1811c9;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #62916c;
  border-radius: 12px;
  background: #20432a;
  font-size: 22px;
  color: #b1efbf;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #97e7a8;
}
.top h1 {
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: -0.045em;
  margin: 3px 0 0;
}
.topright {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.status {
  color: #a8e6ae;
  font-size: 11px;
  font-weight: 700;
}
.introline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 0;
  color: #c7ddcc;
  font-size: 13px;
}
.introline b {
  color: #eef9ed;
}
.stagepill {
  border: 1px solid #41674b;
  background: #142a1c;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  color: #bcebc5;
}
.viewbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 7px 0 10px;
}
.switches,
.camActions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}
.switches button {
  padding: 9px 11px;
  font-size: 12px;
}
.switches button.active {
  background: var(--mint);
  color: #0f2818;
  border-color: #d0fadb;
  font-weight: 800;
}
.camActions button {
  font-size: 12px;
  padding: 9px 12px;
}
.views {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  position: relative;
}
.scene {
  height: clamp(470px, 67vh, 800px);
  position: relative;
  background: #18241c;
  border: 1px solid #607b64;
  border-radius: 18px;
  overflow: hidden;
  min-width: 0;
}
.scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
.scene canvas:active {
  cursor: grabbing;
}
.sceneTop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 15px 17px 55px;
  background: linear-gradient(#07120cef, transparent);
  pointer-events: none;
  z-index: 3;
}
.sceneTop strong {
  font-size: 17px;
  letter-spacing: -0.02em;
  display: block;
}
.sceneTop small {
  font-size: 11px;
  color: #d2e4d4;
  display: block;
  margin-top: 4px;
}
.sceneTop .tag {
  display: inline-block;
  background: #15261bcc;
  border: 1px solid #56765b;
  border-radius: 99px;
  padding: 4px 9px;
  margin-top: 7px;
  font-size: 10px;
  color: #d1edd7;
}
.sceneBottom {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: end;
  padding: 52px 16px 14px;
  background: linear-gradient(transparent, #07120de8);
  pointer-events: none;
  z-index: 3;
}
.sceneBottom span {
  display: block;
  color: #b3cbb7;
  font-size: 10px;
}
.sceneBottom strong {
  font-size: 24px;
  letter-spacing: -0.045em;
  display: block;
  font-variant-numeric: tabular-nums;
}
.sceneBottom .right {
  text-align: right;
}
.accentAmber {
  color: var(--amber);
}
.accentMint {
  color: var(--mint);
}
.cornerTools {
  position: absolute;
  right: 12px;
  top: 91px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cornerTools button {
  width: 37px;
  height: 37px;
  padding: 0;
  background: #11271bdd;
  backdrop-filter: blur(5px);
  font-size: 21px;
}
.ledCount {
  position: absolute;
  left: 14px;
  bottom: 84px;
  border-radius: 9px;
  border: 1px solid #476452;
  background: #0a1912bd;
  padding: 7px 9px;
  color: #d9f2df;
  font:
    11px ui-monospace,
    monospace;
  z-index: 4;
  pointer-events: none;
}
.startOverlay {
  position: absolute;
  z-index: 12;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(450px, 89%);
  text-align: center;
  background: linear-gradient(160deg, #173121f2, #0b1e14f7);
  border: 1px solid #a6e8b7a6;
  border-radius: 22px;
  box-shadow: 0 24px 110px #000c;
  padding: 23px 24px 24px;
}
.startOverlay .eyebrow {
  font-size: 11px;
}
.startOverlay h2 {
  font-size: 27px;
  line-height: 1.06;
  letter-spacing: -0.05em;
  margin: 10px 0;
}
.startOverlay p {
  font-size: 13px;
  color: #bfd7c4;
  margin: 7px 0 19px;
}
.startOverlay button {
  width: 100%;
  font-size: 16px;
  background: #a8efbd;
  color: #092615;
  border-color: #dcffe7;
  font-weight: 850;
  padding: 15px;
}
.startOverlay small {
  display: block;
  margin-top: 12px;
  color: #b1ccba;
  font-size: 11px;
}
.startOverlay.hidden {
  display: none;
}
.player {
  display: flex;
  gap: 11px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0;
  background: #101e16;
  border: 1px solid #35563d;
  border-radius: 14px;
  padding: 11px 14px;
}
.primary {
  background: #a3efb5;
  color: #0c2414;
  border: 1px solid #bafbc6;
  font-weight: 800;
}
.player .date {
  min-width: 93px;
  font:
    12px ui-monospace,
    monospace;
  color: #ecf5e9;
}
.player input {
  flex: 1;
  min-width: 180px;
}
.player select {
  width: 90px;
}
.story {
  background: #14291b;
  border: 1px solid #375b40;
  padding: 10px 13px;
  border-radius: 11px;
  font-size: 12px;
  color: #c4dfca;
  margin: 10px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.story strong {
  color: #f4f8f2;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.kpi {
  border: 1px solid #38533d;
  background: #14231b;
  border-radius: 12px;
  padding: 11px 12px;
}
.kpi label {
  display: block;
  color: #adc4b3;
  font-size: 10px;
}
.kpi strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.045em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.kpi small {
  font-size: 10px;
}
.kpi .warning {
  color: #edbba7;
}
.analytics {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr;
  gap: 12px;
  margin: 13px 0;
}
.card {
  background: #111e16;
  border: 1px solid #36543d;
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 0;
}
.card h2 {
  font-size: 14px;
  margin: 0;
}
.cardHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.cardHeader small {
  font-size: 11px;
}
.chart {
  width: 100%;
  height: 200px;
  display: block;
}
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: #c9dccb;
  font-size: 11px;
}
.swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  background: var(--amber);
}
.swatch.mint {
  background: var(--mint);
}
.compactGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}
.compactGrid > div {
  background: #1a2c20;
  padding: 10px;
  border: 1px solid #345441;
  border-radius: 10px;
}
.compactGrid label {
  display: block;
  color: #b0c6b4;
  font-size: 10px;
}
.compactGrid strong {
  display: block;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
}
.validity {
  border-radius: 9px;
  padding: 9px 11px;
  border: 1px solid #7b5447;
  background: #2b221b;
  color: #f1d4bf;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 11px;
}
.validity.good {
  border-color: #446e4b;
  background: #183324;
  color: #d4f3db;
}
.smalltext {
  font-size: 10px;
  color: #a9bdad;
  margin: 9px 1px 0;
}
.inspector {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 18;
  width: min(395px, calc(100vw - 32px));
  border: 1px solid #6ea87b;
  border-radius: 16px;
  background: #112a1cd9;
  backdrop-filter: blur(17px);
  padding: 16px;
  box-shadow: 0 18px 70px #000a;
  display: none;
}
.inspector.open {
  display: block;
}
.inspector h3 {
  margin: 0 0 9px;
  font-size: 16px;
}
.inspector button {
  float: right;
  padding: 3px 9px;
}
.inspector p {
  margin: 6px 0;
  color: #c7e3cc;
  font-size: 12px;
}
.inspector .detailRows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.inspector .detailRows > div {
  background: #1a3322;
  border-radius: 8px;
  padding: 8px;
}
.inspector label {
  color: #a9c4af;
  font-size: 10px;
  display: block;
}
.inspector strong {
  color: #f4f8ed;
  font-size: 15px;
}
.drawerCover {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: #0009;
  display: none;
}
.drawerCover.open {
  display: block;
}
.drawer {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(480px, 96vw);
  overflow-y: auto;
  background: #13271b;
  border-left: 1px solid #688a70;
  padding: 24px 25px;
  box-shadow: -20px 0 90px #0009;
}
.drawerHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.drawer h2 {
  font-size: 21px;
  letter-spacing: -0.04em;
  margin: 0;
}
.drawer p {
  color: #b3cdb9;
  font-size: 12px;
}
.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid #385441;
}
.setting label {
  font-size: 12px;
  flex: 1;
}
.setting small {
  font-size: 10px;
  display: block;
  color: #96ad9a;
}
.setting select,
.setting input {
  max-width: 155px;
}
.segmentGroup {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 9px 0;
}
.segmentGroup button {
  padding: 8px 0;
  font-weight: 700;
}
.segmentGroup button.off {
  background: #352c20;
  color: #bfb4a1;
}
.channelGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.channelGrid button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 11px;
}
.channelGrid button.off {
  color: #b7a69a;
  background: #382920;
}
.channelGrid small {
  font-size: 10px;
  color: #b3dcc0;
}
.guideRow {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.guideRow button {
  flex: 1;
}
.footer {
  font-size: 11px;
  color: #9bb29e;
  padding: 16px 0;
}
.footer b {
  color: #d0e6d6;
}
@media (max-width: 1050px) {
  .scene {
    height: 550px;
  }
  .analytics {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: repeat(3, 1fr);
  }
  .sceneBottom strong {
    font-size: 20px;
  }
}
@media (max-width: 720px) {
  .top h1 {
    font-size: 18px;
  }
  .views {
    grid-template-columns: 1fr;
  }
  .scene {
    height: clamp(420px, 62dvh, 650px);
  }
  .player input {
    min-width: 100px;
  }
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .analytics {
    grid-template-columns: 1fr;
  }
  .introline {
    font-size: 11px;
  }
  .startOverlay {
    position: fixed;
    width: min(400px, 90%);
    top: 45%;
  }
  .startOverlay h2 {
    font-size: 23px;
  }
  .sceneBottom strong {
    font-size: 21px;
  }
  .chart {
    height: 175px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
