:root {
  color-scheme: dark;
  --factory-bg: #061218;
  --factory-panel: #0a1d24;
  --factory-panel-raised: #0d252d;
  --factory-line: #1d4a54;
  --factory-cyan: #43dff5;
  --factory-green: #4cdda0;
  --factory-yellow: #f2c04f;
  --factory-red: #ff6672;
  --factory-ink: #e9f8fb;
  --factory-muted: #7b9ba4;
  --factory-dim: #567780;
  --factory-font: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--factory-bg);
  color: var(--factory-ink);
  font-family: var(--factory-font);
}
body {
  overflow: auto;
}
button,
select {
  font: inherit;
}
.factory-screen {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  gap: 13px;
  overflow: hidden;
  padding: 15px 20px 11px;
  background: radial-gradient(
    ellipse at 50% 33%,
    #153944 0,
    #0a2028 43%,
    #030a0e 100%
  );
}
.factory-screen:before {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(#35dfff0d 1px, transparent 1px),
    linear-gradient(90deg, #35dfff0d 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 17s linear infinite;
  content: "";
}
.factory-screen > * {
  position: relative;
  z-index: 1;
}
.factory-head {
  display: grid;
  min-height: 62px;
  grid-template-columns: 1fr 1.3fr 1.8fr;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #34d7f544;
  padding-bottom: 10px;
}
.factory-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  text-decoration: none;
}
.factory-brand > b {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #dfb64699;
  border-radius: 8px;
  background: linear-gradient(145deg, #f4ce65, #b47c20);
  color: #102027;
  font-size: 17px;
  box-shadow: 0 0 18px #eabb3850;
}
.factory-brand span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.factory-brand small {
  display: block;
  margin-top: 3px;
  color: #72949e;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.14em;
}
.factory-title {
  text-align: center;
}
.factory-title > small {
  color: var(--factory-cyan);
  font-size: 8px;
  letter-spacing: 0.24em;
}
.factory-title h1 {
  margin: 3px 0 1px;
  font-size: 19px;
  letter-spacing: 0.09em;
}
.factory-title p {
  margin: 0;
  color: #7696a0;
  font-size: 8px;
}
.factory-title p i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 4px 1px;
  border-radius: 50%;
  background: var(--factory-green);
  box-shadow: 0 0 8px var(--factory-green);
}
.head-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.head-controls label {
  display: flex;
  height: 31px;
  align-items: center;
  gap: 6px;
  border: 1px solid #28505a;
  border-radius: 6px;
  background: #091a20d9;
  padding: 0 8px;
  color: #9bb8bf;
  font-size: 9px;
}
.head-controls label > i:first-child {
  color: var(--factory-cyan);
}
.head-controls label > i:last-child {
  color: var(--factory-dim);
  font-size: 8px;
}
.head-controls select {
  max-width: 110px;
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}
.head-controls option {
  background: #0b2027;
}
.head-controls .shift-select select {
  max-width: 123px;
}
.online-status {
  color: #8bb5aa;
  font-size: 8px;
  white-space: nowrap;
}
.online-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--factory-green);
  box-shadow: 0 0 9px var(--factory-green);
  animation: pulse 1.6s infinite;
}
.head-controls > strong {
  color: #f2fbfd;
  font-size: 16px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.head-controls > button,
.floor-head-right button {
  display: grid;
  width: 31px;
  height: 31px;
  flex: none;
  place-items: center;
  border: 1px solid #28505a;
  border-radius: 6px;
  background: #091a20;
  color: var(--factory-cyan);
  cursor: pointer;
  transition: 0.2s;
}
.head-controls > button:hover,
.floor-head-right button:hover {
  border-color: var(--factory-cyan);
  background: #12303a;
}
.head-controls > button.is-refreshing i {
  animation: spin 0.8s linear infinite;
}

.factory-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}
.factory-kpi {
  position: relative;
  min-height: 92px;
  overflow: hidden;
  border: 1px solid #1c4650;
  border-radius: 8px;
  background: linear-gradient(135deg, #0c242bfa, #08171ef5);
  padding: 11px 13px;
  box-shadow: 0 7px 20px #0006;
}
.factory-kpi:after {
  position: absolute;
  top: -30px;
  right: -22px;
  width: 78px;
  height: 78px;
  border: 1px solid #3bd8ec12;
  border-radius: 50%;
  box-shadow:
    0 0 0 10px #3bd8ec08,
    0 0 0 20px #3bd8ec05;
  content: "";
}
.factory-kpi > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #89a9b0;
  font-size: 9px;
}
.factory-kpi > span i {
  color: var(--factory-cyan);
  font-size: 11px;
}
.factory-kpi:nth-child(3) > span i {
  color: var(--factory-yellow);
}
.factory-kpi:nth-child(4) > span i {
  color: var(--factory-green);
}
.factory-kpi > strong {
  display: block;
  margin: 6px 0 3px;
  color: #f2fbfd;
  font-size: 23px;
  line-height: 1;
}
.factory-kpi > strong small {
  margin-left: 3px;
  color: #8daeb5;
  font-size: 10px;
  font-weight: 500;
}
.factory-kpi > div {
  color: #64858e;
  font-size: 8px;
}
.factory-kpi > div b {
  color: #d7eaed;
  font-weight: 600;
}
.factory-kpi > div em {
  float: right;
  color: #567983;
  font-size: 7px;
  font-style: normal;
}
.factory-kpi > div em:before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 4px 2px 0;
  border-radius: 50%;
  background: var(--factory-cyan);
}
.kpi-spark {
  position: absolute;
  right: 10px;
  bottom: 11px;
  width: 48px;
  height: 20px;
  border-bottom: 1px solid #43dff54a;
  clip-path: polygon(
    0 74%,
    15% 52%,
    28% 66%,
    43% 28%,
    56% 49%,
    70% 15%,
    86% 40%,
    100% 0,
    100% 100%,
    0 100%
  );
  background: linear-gradient(180deg, #43dff557, transparent);
}
.spark-green {
  border-color: #4cdda04a;
  background: linear-gradient(180deg, #4cdda052, transparent);
}
.spark-yellow {
  border-color: #f2c04f4a;
  background: linear-gradient(180deg, #f2c04f52, transparent);
}

.factory-workspace {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(235px, 0.91fr) minmax(420px, 1.55fr) minmax(
      250px,
      0.95fr
    );
  gap: 11px;
}
.factory-column {
  display: grid;
  min-height: 0;
  gap: 10px;
}
.left-column {
  grid-template-rows: minmax(185px, 0.9fr) minmax(200px, 1fr) minmax(
      175px,
      0.84fr
    );
}
.right-column {
  grid-template-rows: minmax(275px, 1.25fr) minmax(218px, 1fr) minmax(
      165px,
      0.76fr
    );
}
.factory-center {
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(390px, 1.7fr) minmax(185px, 0.86fr);
  gap: 10px;
}
.factory-panel,
.floor-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #1d4b56;
  border-radius: 9px;
  background: linear-gradient(145deg, #0b2028f2, #07151cf2);
  box-shadow:
    inset 0 0 26px #2bdfff08,
    0 8px 22px #0007;
}
.factory-panel {
  display: flex;
  flex-direction: column;
  padding: 12px;
}
.panel-heading {
  display: flex;
  min-height: 29px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.panel-heading > div > small {
  color: #5d8c98;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.17em;
}
.panel-heading h2 {
  margin: 2px 0 0;
  color: #e6f5f7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.025em;
}
.panel-tag {
  flex: none;
  border: 1px solid #28515c;
  border-radius: 4px;
  background: #0c252d;
  padding: 4px 6px;
  color: #7297a0;
  font-size: 7px;
}
.plan-main {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 12px;
}
.plan-main strong {
  color: #f4fbfc;
  font-size: 27px;
  letter-spacing: 0.01em;
}
.plan-main > span {
  color: #718d95;
  font-size: 9px;
}
.plan-main > b {
  margin-left: auto;
  color: var(--factory-green);
  font-size: 12px;
}
.plan-progress {
  height: 7px;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 8px;
  background: #1a343b;
}
.plan-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--factory-yellow),
    var(--factory-green)
  );
  box-shadow: 0 0 10px #4cdda055;
  transition: width 0.35s;
}
.plan-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
}
.plan-stats span {
  display: grid;
  gap: 3px;
}
.plan-stats small {
  color: #64828b;
  font-size: 7px;
}
.plan-stats b {
  color: #bad0d4;
  font-size: 8px;
  font-weight: 600;
}
.plan-stats em {
  color: var(--factory-yellow);
  font-size: 7px;
  font-style: normal;
}
.plan-order {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid #1b3b44;
  padding-top: 8px;
}
.plan-order > i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  background: #123039;
  color: var(--factory-cyan);
  font-size: 11px;
}
.plan-order span {
  display: grid;
  gap: 2px;
}
.plan-order small {
  color: #66838c;
  font-size: 7px;
}
.plan-order b {
  color: #bdd3d7;
  font-size: 8px;
}
.plan-order em {
  margin-left: auto;
  color: var(--factory-green);
  font-size: 7px;
  font-style: normal;
}
.chart-switch {
  display: flex;
  gap: 2px;
  border: 1px solid #244953;
  border-radius: 5px;
  background: #07171d;
  padding: 2px;
}
.chart-switch button {
  border: 0;
  border-radius: 3px;
  background: transparent;
  padding: 3px 6px;
  color: #66848d;
  font-size: 7px;
  cursor: pointer;
}
.chart-switch button.active {
  background: #12343d;
  color: var(--factory-cyan);
}
.output-panel {
  display: flex;
  flex-direction: column;
}
.output-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 9px 0 1px;
}
.output-summary > strong {
  color: #e9f7f8;
  font-size: 17px;
}
.output-summary > strong small {
  color: #6f8e97;
  font-size: 8px;
  font-weight: 500;
}
.output-summary > span {
  color: #688791;
  font-size: 7px;
}
.output-summary > span i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 3px;
  border-radius: 50%;
  background: var(--factory-yellow);
}
.output-chart {
  min-height: 92px;
  flex: 1;
}
.output-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-grid-line {
  stroke: #23434b;
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.actual-line {
  fill: none;
  stroke: var(--factory-cyan);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px #43dff577);
}
.target-line {
  fill: none;
  stroke: #f2c04f99;
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}
.output-area {
  fill: url(#outputFill);
  opacity: 0.4;
}
.output-point {
  fill: var(--factory-cyan);
  stroke: #0b2028;
  stroke-width: 3;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  color: #597981;
  font-size: 7px;
}
.station-list {
  display: grid;
  gap: 3px;
  margin-top: 7px;
}
.station-row {
  display: grid;
  grid-template-columns: 31px minmax(55px, 1fr) 9px 35px 30px;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  border-bottom: 1px solid #17343c;
  color: #83a0a7;
  font-size: 8px;
}
.station-row:last-child {
  border: 0;
}
.station-row > b {
  color: var(--factory-cyan);
  font-size: 8px;
}
.station-row > strong {
  color: #d7e8ea;
  text-align: right;
  font-size: 8px;
}
.station-row > strong small {
  color: #718e96;
  font-size: 7px;
  font-weight: 400;
}
.station-row > em {
  color: var(--factory-green);
  text-align: right;
  font-size: 7px;
  font-style: normal;
}
.fault-row > em,
.fault-row > strong {
  color: var(--factory-red);
}
.wait-row > em,
.wait-row > strong {
  color: var(--factory-yellow);
}
.state-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--factory-green);
  box-shadow: 0 0 7px var(--factory-green);
}
.state-dot.fault {
  background: var(--factory-red);
  box-shadow: 0 0 8px var(--factory-red);
  animation: pulse 0.8s infinite;
}
.state-dot.waiting {
  background: var(--factory-yellow);
  box-shadow: 0 0 8px var(--factory-yellow);
}

.floor-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 12px;
}
.floor-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
}
.floor-head > div:first-child > small {
  color: #5d9baa;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.floor-head h2 {
  margin: 3px 0 0;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.floor-head-right {
  display: flex;
  align-items: center;
  gap: 9px;
}
.floor-head-right > span {
  color: #92b3b7;
  font-size: 8px;
}
.floor-head-right > span i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--factory-green);
  box-shadow: 0 0 8px var(--factory-green);
}
.floor-head-right button {
  width: 27px;
  height: 27px;
  font-size: 10px;
}
.factory-twin {
  position: relative;
  min-height: 230px;
  flex: 1;
  overflow: hidden;
  margin: 9px 0 8px;
  border: 1px solid #3a758085;
  border-radius: 7px;
  background: url("assets/digital-twin.webp") center 52% / cover no-repeat;
  isolation: isolate;
}
.twin-vignette {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, #06151ac4, #06151a50 50%, #06151a92),
    linear-gradient(180deg, #06151a42 0, transparent 38%, #06151aa6 100%);
}
.factory-grid {
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: 0.48;
  background-image:
    linear-gradient(#46dff218 1px, transparent 1px),
    linear-gradient(90deg, #46dff218 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(transparent, #000 15%, #000 80%, transparent);
}
.factory-scan {
  position: absolute;
  z-index: 1;
  right: 5%;
  left: 5%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    #61eaff,
    #fff,
    #61eaff,
    transparent
  );
  box-shadow: 0 0 17px #47e2ff;
  animation: scan 5.5s linear infinite;
}
.line-paths {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
}
.line-paths path {
  fill: none;
  stroke: #47dafa9c;
  stroke-width: 1.6;
  stroke-dasharray: 7 7;
  filter: drop-shadow(0 0 4px #43dff5);
  animation: route 20s linear infinite;
}
.line-paths path:nth-child(2) {
  stroke: #f2c04f99;
  stroke-width: 1.1;
}
.line-paths path:nth-child(3) {
  stroke: #4cdda088;
  stroke-width: 1.1;
}
.floor-badge {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #9beaff55;
  border-radius: 6px;
  background: #061a21c9;
  padding: 6px 8px;
  backdrop-filter: blur(5px);
}
.floor-badge > i {
  color: var(--factory-yellow);
  font-size: 14px;
}
.floor-badge span {
  color: #e5f4f5;
  font-size: 8px;
  font-weight: 700;
}
.floor-badge small {
  display: block;
  margin-top: 2px;
  color: #76979f;
  font-size: 7px;
  font-weight: 400;
}
.twin-legend {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 12px;
  display: flex;
  gap: 9px;
  border: 1px solid #6997a055;
  border-radius: 5px;
  background: #071a20be;
  padding: 5px 7px;
  color: #c2d8da;
  font-size: 7px;
  backdrop-filter: blur(5px);
}
.twin-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.twin-legend i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.legend-running {
  background: var(--factory-green);
  box-shadow: 0 0 5px var(--factory-green);
}
.legend-warning {
  background: var(--factory-yellow);
}
.legend-fault {
  background: var(--factory-red);
}
.machine-node {
  position: absolute;
  z-index: 5;
  display: flex;
  min-width: 142px;
  align-items: center;
  gap: 7px;
  border: 1px solid #54dfb28c;
  border-radius: 6px;
  background: #071a20df;
  padding: 7px 9px;
  color: #dff8f4;
  text-align: left;
  box-shadow: 0 0 18px #3be39b33;
  cursor: pointer;
  animation: float 3.4s ease-in-out infinite;
  backdrop-filter: blur(5px);
}
.machine-node > i {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  place-items: center;
  border-radius: 5px;
  background: #12362e;
  color: var(--factory-green);
  font-size: 11px;
}
.machine-node span {
  min-width: 0;
}
.machine-node b {
  display: block;
  font-size: 8px;
}
.machine-node small {
  display: block;
  margin-top: 3px;
  color: #83b3a6;
  font-size: 7px;
  white-space: nowrap;
}
.machine-node em {
  width: 6px;
  height: 6px;
  flex: none;
  margin-left: auto;
  border-radius: 50%;
  background: var(--factory-green);
  box-shadow: 0 0 8px var(--factory-green);
}
.machine-node:hover {
  border-color: var(--factory-cyan);
  transform: translateY(-2px);
}
.node-one {
  top: 30%;
  left: 9%;
}
.node-two {
  top: 34%;
  right: 8%;
  animation-delay: -0.7s;
}
.node-three {
  right: 16%;
  bottom: 18%;
  animation-delay: -1.4s;
}
.node-four {
  bottom: 20%;
  left: 12%;
  animation-delay: -2.1s;
}
.fault-node {
  border-color: #ff66728c;
  box-shadow: 0 0 20px #ff536144;
}
.fault-node > i {
  background: #3a1c20;
  color: var(--factory-red);
}
.fault-node small {
  color: #ffadb2;
}
.fault-node em {
  background: var(--factory-red);
  box-shadow: 0 0 8px var(--factory-red);
  animation: pulse 0.8s infinite;
}
.wait-node {
  border-color: #f2c04f80;
}
.wait-node > i {
  background: #382f1a;
  color: var(--factory-yellow);
}
.wait-node small {
  color: #e8c96f;
}
.wait-node em {
  background: var(--factory-yellow);
  box-shadow: 0 0 8px var(--factory-yellow);
}
.twin-coordinates {
  position: absolute;
  z-index: 4;
  right: 10px;
  bottom: 8px;
  left: 10px;
  display: flex;
  justify-content: space-between;
  color: #9bbcc3;
  font-size: 7px;
  text-shadow: 0 1px 4px #001;
}
.floor-summary {
  display: grid;
  flex: none;
  grid-template-columns: 1.5fr 1.1fr 1fr 1fr;
  border-top: 1px solid #1b414a;
  padding-top: 8px;
}
.floor-summary > div {
  display: grid;
  gap: 3px;
  border-right: 1px solid #1b414a;
  padding: 0 9px;
}
.floor-summary > div:first-child {
  padding-left: 0;
}
.floor-summary > div:last-child {
  border: 0;
}
.floor-summary span {
  color: #688792;
  font-size: 7px;
}
.floor-summary b {
  color: #d7e8eb;
  font-size: 8px;
}
.floor-summary small {
  color: #75a1ab;
  font-size: 7px;
  font-weight: 400;
}
.order-panel {
  min-height: 0;
}
.text-action {
  border: 0;
  background: transparent;
  color: #78aebb;
  font-size: 8px;
  cursor: pointer;
}
.text-action:hover {
  color: var(--factory-cyan);
}
.order-list {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}
.order-row {
  display: grid;
  grid-template-columns: 34px minmax(100px, 1.5fr) minmax(45px, 1fr) 39px 55px;
  align-items: center;
  gap: 8px;
  min-height: 33px;
  border-top: 1px solid #193941;
  padding-top: 5px;
}
.order-priority {
  border: 1px solid #315360;
  border-radius: 4px;
  background: #102a33;
  padding: 3px 4px;
  color: #7598a2;
  text-align: center;
  font-size: 7px;
}
.order-priority.current {
  border-color: #468f8c;
  background: #123c38;
  color: var(--factory-green);
}
.order-info b {
  display: block;
  overflow: hidden;
  color: #cce1e4;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-info small {
  display: block;
  margin-top: 2px;
  color: #69868f;
  font-size: 7px;
}
.order-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 5px;
  background: #1b373f;
}
.order-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #24a7be, var(--factory-cyan));
}
.order-row > strong {
  color: #cce6e7;
  text-align: right;
  font-size: 8px;
}
.order-row > em {
  color: #71919b;
  text-align: right;
  font-size: 7px;
  font-style: normal;
}

.quality-panel {
  min-height: 0;
}
.quality-seal {
  color: var(--factory-green);
  font-size: 8px;
}
.quality-seal i {
  margin-right: 3px;
}
.quality-main {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 10px;
  margin: 10px 0 7px;
}
.quality-ring {
  position: relative;
  display: flex;
  width: 88px;
  height: 88px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    var(--factory-green) 0 98.8%,
    #24433e 98.8% 100%
  );
  box-shadow: 0 0 18px #4cdda01a;
}
.quality-ring:before {
  position: absolute;
  inset: 6px;
  border: 1px solid #355c55;
  border-radius: 50%;
  background: linear-gradient(145deg, #0e262c, #08171c);
  content: "";
}
.quality-ring strong,
.quality-ring span {
  position: relative;
  z-index: 1;
}
.quality-ring strong {
  font-size: 18px;
}
.quality-ring strong small {
  color: #91b7ad;
  font-size: 9px;
}
.quality-ring span {
  margin-top: 2px;
  color: #6e9690;
  font-size: 7px;
}
.quality-stats {
  display: grid;
  gap: 5px;
}
.quality-stats > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #193940;
  padding: 0 0 4px;
}
.quality-stats small {
  color: #718d94;
  font-size: 7px;
}
.quality-stats b {
  color: #d7e9e8;
  font-size: 9px;
}
.quality-stats b i {
  color: #718c94;
  font-size: 7px;
  font-style: normal;
  font-weight: 400;
}
.quality-stats .good-text {
  color: var(--factory-green);
}
.quality-stats .bad-text {
  color: var(--factory-red);
}
.defect-title {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #1a3c43;
  padding-top: 7px;
  color: #a9c2c7;
  font-size: 8px;
}
.defect-title small {
  color: #63838b;
  font-size: 7px;
}
.defect-list {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}
.defect-list > div {
  display: grid;
  grid-template-columns: 52px 1fr 14px;
  align-items: center;
  gap: 6px;
  color: #829ca1;
  font-size: 7px;
}
.defect-list i {
  height: 4px;
  overflow: hidden;
  border-radius: 5px;
  background: #25363a;
}
.defect-list i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--factory-yellow), var(--factory-red));
}
.defect-list strong {
  color: #dce9e9;
  text-align: right;
  font-size: 8px;
}
.alarm-counter {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid #80434a;
  border-radius: 50%;
  background: #391d24;
  color: #ff9ca1;
  font-size: 8px;
}
.andon-list {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}
.andon-item {
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid #24414a;
  border-left: 2px solid #617d82;
  border-radius: 5px;
  background: #0a2026;
  padding: 5px 6px;
}
.andon-item.critical {
  border-left-color: var(--factory-red);
  background: #26191d;
}
.andon-item.warning {
  border-left-color: var(--factory-yellow);
  background: #282419;
}
.andon-icon {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 5px;
  background: #153039;
  color: var(--factory-cyan);
  font-size: 10px;
}
.critical .andon-icon {
  background: #3a2024;
  color: var(--factory-red);
}
.warning .andon-icon {
  background: #3d321a;
  color: var(--factory-yellow);
}
.andon-item > span:nth-child(2) b {
  display: block;
  color: #d6e5e6;
  font-size: 8px;
}
.andon-item > span:nth-child(2) small {
  display: block;
  margin-top: 3px;
  color: #779096;
  font-size: 7px;
}
.andon-item > button {
  border: 1px solid #4a5350;
  border-radius: 4px;
  background: #162521;
  padding: 3px 5px;
  color: #a8c4b8;
  font-size: 7px;
  cursor: pointer;
}
.critical > button {
  border-color: #86464a;
  background: #351f23;
  color: #ff9ca1;
}
.warning > button {
  border-color: #79653a;
  background: #342b1c;
  color: #edce80;
}
.andon-item.is-acknowledged {
  opacity: 0.62;
}
.andon-item.is-acknowledged > button {
  border-color: #32644f;
  background: #153328;
  color: var(--factory-green);
}
.andon-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  border: 0;
  border-top: 1px solid #1c3b42;
  background: transparent;
  padding: 8px 0 0;
  color: #83aeb4;
  text-align: left;
  font-size: 8px;
  cursor: pointer;
}
.andon-action:hover {
  color: var(--factory-cyan);
}
.resource-panel {
  min-height: 0;
}
.resource-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px;
  margin-top: 10px;
}
.resource-item > span {
  color: #83a0a4;
  font-size: 8px;
}
.resource-item > span i {
  margin-right: 5px;
  color: var(--factory-cyan);
}
.resource-item > strong {
  color: #dce9e9;
  font-size: 9px;
}
.resource-item > strong small {
  color: #80969a;
  font-size: 7px;
  font-weight: 400;
}
.resource-item > div {
  height: 4px;
  grid-column: 1 / 3;
  overflow: hidden;
  border-radius: 5px;
  background: #20373b;
}
.resource-item > div i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #25a5b7, var(--factory-cyan));
}
.resource-item > div.energy-bar i {
  background: linear-gradient(90deg, #bd922c, var(--factory-yellow));
}
.resource-item > div.air-bar i {
  background: linear-gradient(90deg, #398b75, var(--factory-green));
}

.factory-ticker {
  display: grid;
  min-height: 32px;
  grid-template-columns: 88px minmax(0, 1fr) 110px;
  align-items: center;
  border: 1px solid #285761;
  border-radius: 5px;
  background: #07181ded;
  font-size: 8px;
}
.factory-ticker > b {
  display: grid;
  height: 100%;
  place-items: center;
  background: linear-gradient(90deg, #a9313d, #df4855);
  color: #fff;
  font-size: 8px;
  letter-spacing: 0.06em;
}
.factory-ticker > b i {
  margin-right: 4px;
}
.ticker-track {
  display: flex;
  min-width: 0;
  gap: 42px;
  overflow: hidden;
  padding-left: 14px;
  color: #89a6ab;
  white-space: nowrap;
  animation: ticker 26s linear infinite;
}
.factory-ticker > em {
  color: #74949a;
  text-align: center;
  font-size: 7px;
  font-style: normal;
}
.factory-ticker > em i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 3px;
  border-radius: 50%;
  background: var(--factory-green);
  box-shadow: 0 0 7px var(--factory-green);
}
.factory-toast {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 52px;
  opacity: 0;
  transform: translateY(7px);
  border: 1px solid #347179;
  border-radius: 6px;
  background: #0c262c;
  padding: 9px 13px;
  color: #e4f3f3;
  font-size: 10px;
  pointer-events: none;
  transition: 0.2s;
}
.factory-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes scan {
  from {
    top: 8%;
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  85% {
    opacity: 0.9;
  }
  to {
    top: 92%;
    opacity: 0;
  }
}
@keyframes pulse {
  50% {
    opacity: 0.38;
  }
}
@keyframes gridMove {
  to {
    background-position: 40px 40px;
  }
}
@keyframes float {
  50% {
    translate: 0 -4px;
  }
}
@keyframes route {
  to {
    stroke-dashoffset: -280px;
  }
}
@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 1600px) {
  .factory-screen {
    gap: 15px;
    padding: 20px 28px 13px;
  }
  .factory-head {
    min-height: 70px;
  }
  .factory-kpi {
    min-height: 104px;
    padding: 13px 16px;
  }
  .factory-kpi > strong {
    font-size: 27px;
  }
  .factory-workspace {
    gap: 14px;
  }
  .factory-column,
  .factory-center {
    gap: 13px;
  }
  .factory-panel,
  .floor-panel {
    padding: 14px;
  }
}
@media (max-width: 1180px) {
  .factory-screen {
    padding: 12px;
  }
  .factory-head {
    grid-template-columns: 0.8fr 1fr 1.7fr;
  }
  .factory-title h1 {
    font-size: 16px;
  }
  .head-controls {
    gap: 4px;
  }
  .head-controls .shift-select {
    display: none;
  }
  .factory-workspace {
    grid-template-columns: minmax(205px, 0.9fr) minmax(360px, 1.45fr) minmax(
        220px,
        0.9fr
      );
    gap: 8px;
  }
  .factory-column,
  .factory-center {
    gap: 8px;
  }
  .factory-panel {
    padding: 9px;
  }
  .machine-node {
    min-width: 124px;
    padding: 6px;
  }
}
@media (max-width: 850px) {
  .factory-screen {
    min-height: 100vh;
    overflow: visible;
    gap: 10px;
    padding: 10px;
  }
  .factory-head {
    grid-template-columns: 1fr auto;
  }
  .factory-title {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }
  .head-controls {
    grid-column: 2;
    grid-row: 1;
  }
  .factory-title h1 {
    font-size: 17px;
  }
  .head-controls > strong,
  .online-status {
    display: none;
  }
  .factory-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .factory-kpi {
    min-height: 86px;
  }
  .factory-kpi:last-child {
    grid-column: 1 / -1;
  }
  .factory-workspace {
    grid-template-columns: 1fr;
  }
  .factory-center {
    grid-row: 1;
    grid-template-rows: minmax(390px, 58vh) auto;
  }
  .left-column,
  .right-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }
  .left-column > *,
  .right-column > * {
    min-height: 205px;
  }
  .right-column .quality-panel {
    grid-row: span 2;
  }
  .factory-ticker {
    grid-template-columns: 76px minmax(0, 1fr) 87px;
  }
}
@media (max-width: 560px) {
  .factory-brand > b {
    width: 32px;
    height: 32px;
  }
  .factory-brand span {
    font-size: 11px;
  }
  .factory-brand small {
    font-size: 6px;
  }
  .factory-title h1 {
    font-size: 15px;
  }
  .factory-title > small {
    font-size: 7px;
  }
  .head-controls label {
    height: 29px;
    padding: 0 6px;
    font-size: 8px;
  }
  .head-controls select {
    max-width: 75px;
  }
  .head-controls > button {
    width: 28px;
    height: 29px;
  }
  .factory-kpi {
    min-height: 82px;
    padding: 9px;
  }
  .factory-kpi > span {
    font-size: 8px;
  }
  .factory-kpi > strong {
    font-size: 20px;
  }
  .factory-kpi > div {
    font-size: 7px;
  }
  .factory-workspace {
    gap: 8px;
  }
  .factory-center {
    grid-template-rows: 390px auto;
  }
  .floor-panel {
    padding: 9px;
  }
  .factory-twin {
    min-height: 230px;
    background-position: center;
  }
  .machine-node {
    min-width: 108px;
    gap: 4px;
    padding: 5px;
  }
  .machine-node > i {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }
  .machine-node b {
    font-size: 7px;
  }
  .machine-node small {
    font-size: 6px;
  }
  .node-one {
    left: 4%;
  }
  .node-two {
    right: 3%;
  }
  .node-three {
    right: 5%;
    bottom: 15%;
  }
  .node-four {
    left: 5%;
    bottom: 17%;
  }
  .floor-summary {
    grid-template-columns: 1.3fr 1.1fr 1fr;
  }
  .floor-summary > div:last-child {
    display: none;
  }
  .left-column,
  .right-column {
    grid-template-columns: 1fr;
  }
  .left-column > *,
  .right-column > * {
    min-height: 205px;
  }
  .right-column .quality-panel {
    grid-row: auto;
    min-height: 300px;
  }
  .factory-ticker {
    min-height: 30px;
    grid-template-columns: 68px minmax(0, 1fr);
  }
  .factory-ticker > em {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
