.operations-hero {
  background:
    radial-gradient(circle at 80% 18%, rgba(79, 179, 191, 0.18), transparent 28%),
    radial-gradient(circle at 18% 76%, rgba(43, 76, 126, 0.08), transparent 34%),
    linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.ops-hero-flow {
  display: grid;
  grid-template-columns: 1fr 34px 1fr 34px 1fr 34px 1fr;
  gap: 8px;
  align-items: center;
  margin: 42px 0;
}

.ops-hero-flow span {
  min-height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(43, 76, 126, 0.14);
  background: #f8fafc;
  color: #0f2744;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.ops-hero-flow i,
.bpmn-flow i {
  height: 2px;
  background: linear-gradient(90deg, rgba(79, 179, 191, 0.1), #4fb3bf);
  animation: flowPulse 1.8s linear infinite;
}

.ops-problem-grid,
.ops-kpi-grid,
.ops-chart-grid {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.ops-problem-grid {
  grid-template-columns: repeat(3, 1fr);
}

.ops-problem-grid article,
.ops-kpi-grid div,
.ops-chart-grid article {
  border: 1px solid rgba(43, 76, 126, 0.13);
  background: #fff;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.ops-problem-grid article {
  min-height: 180px;
  padding: 20px;
}

.ops-problem-grid article:hover,
.ops-kpi-grid div:hover,
.ops-chart-grid article:hover {
  transform: translateY(-5px);
  border-color: rgba(79, 179, 191, 0.68);
  box-shadow: 0 22px 58px rgba(15, 39, 68, 0.12);
}

.ops-problem-grid strong {
  color: #0f2744;
  font-size: 21px;
}

.ops-problem-grid span {
  display: block;
  margin-top: 12px;
  color: #526174;
  line-height: 1.5;
}

.bpmn-flow {
  display: grid;
  grid-template-columns: repeat(11, auto);
  gap: 9px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 8px;
}

.bpmn-flow div {
  min-width: 132px;
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(43, 76, 126, 0.14);
  background: #fff;
}

.bpmn-flow strong {
  color: #0f2744;
  font-size: 13px;
}

.bpmn-flow span {
  color: #4fb3bf;
  font-size: 12px;
  font-weight: 900;
}

.bpmn-flow i {
  width: 44px;
}

.ops-lab {
  margin-top: 28px;
  border: 1px solid rgba(43, 76, 126, 0.14);
  background: #f8fafc;
  padding: 18px;
  box-shadow: 0 28px 80px rgba(15, 39, 68, 0.12);
}

.ops-controls {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.ops-controls label {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(43, 76, 126, 0.12);
  background: #fff;
  color: #2b4c7e;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ops-controls input {
  accent-color: #4fb3bf;
}

.ops-controls span {
  color: #0f2744;
  font-size: 20px;
  font-weight: 900;
}

.coffee-sim {
  height: 330px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1.1fr 1fr;
  gap: 16px;
  margin-top: 16px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(43, 76, 126, 0.12);
  background:
    linear-gradient(rgba(43, 76, 126, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 76, 126, 0.045) 1px, transparent 1px),
    #fff;
  background-size: 26px 26px;
}

.sim-lane,
.station {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 250px;
  padding: 16px;
  border: 1px solid rgba(43, 76, 126, 0.14);
  background: rgba(255, 255, 255, 0.86);
}

.sim-lane strong,
.station strong {
  color: #0f2744;
  font-size: 18px;
}

.station span {
  color: #2b4c7e;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.station.saturated {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.18);
}

.station.saturated span {
  color: #b91c1c;
}

.queue,
#incoming-customers,
#served-customers {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: start;
}

.customer-dot {
  width: 15px;
  height: 15px;
  border: 1px solid rgba(15, 39, 68, 0.28);
  border-radius: 50%;
  background: #4fb3bf;
  box-shadow: 0 8px 18px rgba(79, 179, 191, 0.24);
  animation: customerMove 1.4s ease-in-out infinite;
}

.customer-dot.waiting {
  background: rgba(15, 39, 68, 0.2);
}

.customer-dot.out {
  background: #0f2744;
}

.sim-lines {
  position: absolute;
  inset: 36px 20px auto;
  z-index: 1;
  width: calc(100% - 40px);
  height: 260px;
}

.sim-lines path {
  fill: none;
  stroke: rgba(79, 179, 191, 0.55);
  stroke-width: 4;
  stroke-dasharray: 12 10;
  animation: dashFlow 1.2s linear infinite;
}

.ops-kpi-grid {
  grid-template-columns: repeat(3, 1fr);
}

.ops-kpi-grid div {
  padding: 18px;
}

.ops-kpi-grid span {
  color: #2b4c7e;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ops-kpi-grid strong {
  display: block;
  margin-top: 10px;
  color: #0f2744;
  font-size: 26px;
  font-weight: 900;
}

.ops-chart-grid {
  grid-template-columns: repeat(2, 1fr);
}

.ops-chart-grid article {
  min-height: 260px;
  padding: 16px;
}

.ops-chart-grid article > strong {
  display: block;
  margin-bottom: 16px;
  color: #0f2744;
}

.bar-chart,
.comparison-chart,
.ops-heatmap {
  display: grid;
  gap: 10px;
}

.bar-chart div,
.comparison-chart div {
  height: 34px;
  position: relative;
  border: 1px solid rgba(43, 76, 126, 0.1);
  background: #f8fafc;
}

.bar-chart span,
.comparison-chart span {
  width: var(--w);
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 10px;
  background: linear-gradient(90deg, #4fb3bf, rgba(79, 179, 191, 0.14));
  color: #0f2744;
  font-size: 12px;
  font-weight: 900;
}

#wait-chart {
  width: 100%;
}

.ops-heatmap {
  grid-template-columns: repeat(5, 1fr);
}

.ops-heatmap div {
  min-height: 46px;
  display: grid;
  place-items: center;
  background: rgba(79, 179, 191, var(--a));
  color: #0f2744;
  font-size: 11px;
  font-weight: 900;
}

.is-changing {
  color: #4fb3bf !important;
  transform: translateY(-1px);
  transition: color 180ms ease, transform 180ms ease;
}

@keyframes flowPulse {
  0% { background-position: 0 0; opacity: 0.55; }
  50% { opacity: 1; }
  100% { background-position: 40px 0; opacity: 0.55; }
}

@keyframes dashFlow {
  to { stroke-dashoffset: -44; }
}

@keyframes customerMove {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@media (max-width: 1120px) {
  .ops-controls,
  .ops-problem-grid,
  .ops-kpi-grid,
  .ops-chart-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .coffee-sim {
    grid-template-columns: repeat(2, 1fr);
    height: auto;
  }
}

@media (max-width: 720px) {
  .ops-hero-flow,
  .ops-controls,
  .ops-problem-grid,
  .ops-kpi-grid,
  .ops-chart-grid,
  .coffee-sim {
    grid-template-columns: 1fr;
  }

  .ops-hero-flow i,
  .sim-lines {
    display: none;
  }

  .ops-lab {
    padding: 12px;
  }

  .coffee-sim {
    padding: 12px;
    gap: 10px;
  }

  .sim-lane,
  .station {
    min-height: 150px;
    padding: 14px;
  }

  .bpmn-flow {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .bpmn-flow div {
    min-width: 0;
    width: 100%;
  }

  .bpmn-flow i {
    width: 2px;
    height: 22px;
    justify-self: center;
  }

  .ops-chart-grid article {
    min-height: auto;
  }

  .ops-heatmap {
    grid-template-columns: repeat(2, 1fr);
  }
}
