/* ============================================================
   DOKUMA DASHBOARD & IOT SHOWCASE — Styles
   Animated weaving machine monitoring dashboard mockup
   ============================================================ */

/* ============================================================
   IOT SHOWCASE (shared with limeiot.html)
   ============================================================ */
.iot-showcase-section,
.dokuma-section {
  padding: 120px 0 140px;
  background:
    radial-gradient(circle at 20% 20%, rgba(38, 185, 241, 0.12) 0%, transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(94, 205, 245, 0.1) 0%, transparent 28%),
    linear-gradient(180deg, #051427 0%, #081d3c 100%);
  position: relative;
  overflow: hidden;
}

/* When embedded after IoT showcase, seamless flow */
.dokuma-section--embedded {
  padding-top: 40px;
  border-top: 1px solid rgba(38, 185, 241, 0.06);
}

.iot-showcase-section::before,
.dokuma-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  pointer-events: none;
}

.iot-showcase-header,
.dokuma-header {
  text-align: center;
  margin-bottom: 56px;
}

.iot-showcase-header h2,
.dokuma-header h1,
.dokuma-header h2 {
  color: var(--white);
  margin-bottom: 8px;
}

.dokuma-header h1 {
  font-size: 3rem;
  padding-top: 60px;
}

.dokuma-section--embedded .dokuma-header h2 {
  font-size: 2.5rem;
}

.iot-showcase-header .section-subtitle,
.dokuma-header .section-subtitle {
  color: rgba(255, 255, 255, 0.68);
}

/* --- IoT Hub (center) --- */
.iot-hub {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -50%);
  z-index: 3;
  text-align: center;
  padding: 32px 40px;
  border-radius: 24px;
  background: rgba(38, 185, 241, 0.08);
  border: 1.5px solid rgba(38, 185, 241, 0.25);
  backdrop-filter: blur(16px);
  box-shadow:
    0 0 60px rgba(38, 185, 241, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: iotHubPulse 4s ease-in-out infinite;
}

.iot-hub-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--secondary);
  margin-bottom: 6px;
}

.iot-hub strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.iot-hub p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}

@keyframes iotHubPulse {
  0%, 100% {
    box-shadow: 0 0 60px rgba(38, 185, 241, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
  50% {
    box-shadow: 0 0 90px rgba(38, 185, 241, 0.22), 0 0 120px rgba(38, 185, 241, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
}

/* --- IoT Showcase Container --- */
.iot-showcase,
.dokuma-iot-showcase {
  position: relative;
  min-height: 480px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 50%, rgba(38, 185, 241, 0.06) 0%, transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.005));
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-bottom: 80px;
}

/* --- Animated Data Streams --- */
.iot-stream {
  position: absolute;
  z-index: 1;
  border-radius: 4px;
}

.iot-stream::before {
  content: '';
  position: absolute;
  border-radius: inherit;
  background: var(--secondary);
  filter: blur(2px);
  animation: iotStreamFlow 2.5s ease-in-out infinite;
}

/* Stream positions */
.stream-top-left {
  top: 18%;
  left: 18%;
  width: 24%;
  height: 3px;
  transform: rotate(-15deg);
}

.stream-top-left::before {
  width: 32px;
  height: 100%;
  animation-delay: 0s;
}

.stream-bottom-left {
  bottom: 18%;
  left: 18%;
  width: 24%;
  height: 3px;
  transform: rotate(15deg);
}

.stream-bottom-left::before {
  width: 32px;
  height: 100%;
  animation-delay: 0.6s;
}

.stream-top-right {
  top: 18%;
  right: 18%;
  width: 24%;
  height: 3px;
  transform: rotate(15deg);
}

.stream-top-right::before {
  width: 32px;
  height: 100%;
  animation-delay: 1.2s;
}

.stream-bottom-right {
  bottom: 18%;
  right: 18%;
  width: 24%;
  height: 3px;
  transform: rotate(-15deg);
}

.stream-bottom-right::before {
  width: 32px;
  height: 100%;
  animation-delay: 1.8s;
}

@keyframes iotStreamFlow {
  0% { left: 0; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: calc(100% - 32px); opacity: 0; }
}

/* --- IoT Nodes --- */
.iot-node {
  position: absolute;
  z-index: 2;
  padding: 18px 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  text-align: center;
  transition: all 0.3s ease;
  animation: iotNodeFloat 5s ease-in-out infinite;
}

.iot-node:hover {
  border-color: rgba(38, 185, 241, 0.3);
  background: rgba(38, 185, 241, 0.08);
  transform: translateY(-4px) scale(1.02);
}

.iot-node-kicker {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary);
  margin-bottom: 4px;
}

.iot-node strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 2px;
}

.iot-node small {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Node positions */
.iot-node-machine-a {
  top: 12%;
  left: 4%;
  animation-delay: 0s;
}

.iot-node-machine-b {
  bottom: 12%;
  left: 4%;
  animation-delay: 0.7s;
}

.iot-node-alarm {
  top: 12%;
  right: 4%;
  animation-delay: 1.4s;
}

.iot-node-dashboard {
  bottom: 12%;
  right: 4%;
  animation-delay: 2.1s;
}

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

/* --- Dashboard Panel (bottom-center) --- */
.iot-dashboard-panel {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  z-index: 4;
  border-radius: 20px;
  background: rgba(10, 22, 46, 0.85);
  border: 1px solid rgba(38, 185, 241, 0.15);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: iotPanelSlideUp 1s ease-out both;
}

.iot-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.iot-panel-top span:last-child,
.iot-live-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #22c55e;
  animation: iotLivePulse 2s ease-in-out infinite;
}

@keyframes iotLivePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Signal chart */
.iot-signal-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 16px 20px 12px;
  height: 64px;
}

.iot-signal-chart span {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--secondary), var(--secondary-light));
  animation: iotBarBounce 2.4s ease-in-out infinite;
}

.iot-signal-chart span:nth-child(1) { animation-delay: 0.0s; height: 60%; }
.iot-signal-chart span:nth-child(2) { animation-delay: 0.15s; height: 80%; }
.iot-signal-chart span:nth-child(3) { animation-delay: 0.3s; height: 45%; }
.iot-signal-chart span:nth-child(4) { animation-delay: 0.45s; height: 90%; }
.iot-signal-chart span:nth-child(5) { animation-delay: 0.6s; height: 55%; }
.iot-signal-chart span:nth-child(6) { animation-delay: 0.75s; height: 75%; }
.iot-signal-chart span:nth-child(7) { animation-delay: 0.9s; height: 85%; }
.iot-signal-chart span:nth-child(8) { animation-delay: 1.05s; height: 65%; }

@keyframes iotBarBounce {
  0%, 100% { opacity: 0.7; transform: scaleY(0.85); }
  50% { opacity: 1; transform: scaleY(1.15); }
}

/* Metric row */
.iot-metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.04);
}

.iot-metric-card {
  padding: 14px 16px;
  text-align: center;
  background: rgba(10, 22, 46, 0.6);
}

.iot-metric-card span {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 4px;
}

.iot-metric-card strong {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
}

@keyframes iotPanelSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(40px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* ============================================================
   DOKUMA DASHBOARD — Monitor Mockup
   ============================================================ */

.dokuma-dashboard-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 1800px;
  margin-bottom: 80px;
}

/* Glow effects */
.dokuma-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.dokuma-glow-left {
  left: -80px;
  top: 120px;
  background: rgba(38, 185, 241, 0.3);
}

.dokuma-glow-right {
  right: -80px;
  bottom: 160px;
  background: rgba(28, 78, 157, 0.3);
}

/* --- Monitor Frame --- */
.dokuma-monitor {
  width: 100%;
  max-width: 1100px;
  position: relative;
  z-index: 1;
  transform: rotateX(4deg);
  animation: dokumaMonitorFloat 8s ease-in-out infinite;
}

.dokuma-monitor-bezel {
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
}

.dokuma-monitor-camera {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 4px rgba(38, 185, 241, 0.2);
}

.dokuma-monitor-stand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dokuma-monitor-neck {
  width: 60px;
  height: 40px;
  background: linear-gradient(180deg, #2d2d2d, #1a1a1a);
  border-radius: 0 0 4px 4px;
}

.dokuma-monitor-base {
  width: 180px;
  height: 10px;
  background: linear-gradient(180deg, #333, #1a1a1a);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

@keyframes dokumaMonitorFloat {
  0%, 100% { transform: rotateX(4deg) translateY(0); }
  50% { transform: rotateX(5deg) translateY(-6px); }
}

/* --- Screen --- */
.dokuma-screen {
  background: #0c1a2e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(38, 185, 241, 0.06);
}

/* Toolbar */
.dokuma-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: linear-gradient(135deg, #0a1628, #0e1f3a);
  border-bottom: 1px solid rgba(38, 185, 241, 0.1);
}

.dokuma-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dokuma-dots {
  display: flex;
  gap: 6px;
}

.dokuma-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dokuma-dots span:nth-child(1) { background: #ef4444; }
.dokuma-dots span:nth-child(2) { background: #f59e0b; }
.dokuma-dots span:nth-child(3) { background: #22c55e; }

.dokuma-toolbar-brand {
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

.dokuma-toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dokuma-toolbar-time {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Space Grotesk', sans-serif;
}

.dokuma-toolbar-live {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #22c55e;
  animation: iotLivePulse 2s ease-in-out infinite;
}

/* --- KPI Strip --- */
.dokuma-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: rgba(38, 185, 241, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dokuma-kpi {
  padding: 14px 16px;
  background: rgba(10, 22, 46, 0.8);
  text-align: center;
  transition: background 0.3s ease;
}

.dokuma-kpi:hover {
  background: rgba(38, 185, 241, 0.06);
}

.dokuma-kpi-label {
  display: block;
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 4px;
}

.dokuma-kpi-value {
  display: block;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.2;
  margin-bottom: 2px;
}

.dokuma-kpi-number {
  color: inherit;
}

.dokuma-kpi-change {
  font-size: 0.625rem;
  font-weight: 600;
}

.dokuma-kpi-change.up { color: #22c55e; }
.dokuma-kpi-change.down { color: #22c55e; }
.dokuma-kpi-change.neutral { color: rgba(255, 255, 255, 0.35); }

/* --- Body Grid --- */
.dokuma-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1px;
  background: rgba(255, 255, 255, 0.02);
  min-height: 420px;
}

/* --- Machines Panel --- */
.dokuma-machines-panel {
  padding: 18px;
  background: rgba(10, 22, 46, 0.6);
}

.dokuma-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dokuma-panel-header h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

.dokuma-panel-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary);
  background: rgba(38, 185, 241, 0.1);
  border: 1px solid rgba(38, 185, 241, 0.2);
  padding: 3px 10px;
  border-radius: 100px;
}

.alarm-badge {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  animation: alarmBadgePulse 2s ease-in-out infinite;
}

@keyframes alarmBadgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Machine Grid */
.dokuma-machine-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.dokuma-machine {
  padding: 10px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dokuma-machine::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
}

.dokuma-machine.running::before {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.dokuma-machine.warning::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  animation: warningFlash 2s ease-in-out infinite;
}

.dokuma-machine.stopped::before {
  background: linear-gradient(90deg, #ef4444, #f87171);
  animation: stoppedFlash 1.5s ease-in-out infinite;
}

@keyframes warningFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes stoppedFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.dokuma-machine:hover {
  border-color: rgba(38, 185, 241, 0.2);
  background: rgba(38, 185, 241, 0.04);
  transform: translateY(-2px);
}

.dokuma-machine:focus-visible,
.dokuma-machine.is-active {
  outline: none;
  border-color: rgba(38, 185, 241, 0.4);
  box-shadow: 0 0 0 2px rgba(38, 185, 241, 0.18);
  background: rgba(38, 185, 241, 0.08);
}

.dokuma-machine-id {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2px;
}

.dokuma-machine-status {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-bottom: 3px;
}

.dokuma-machine.running .dokuma-machine-status {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.dokuma-machine.warning .dokuma-machine-status {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
  animation: warningFlash 2s ease-in-out infinite;
}

.dokuma-machine.stopped .dokuma-machine-status {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
  animation: stoppedFlash 1.5s ease-in-out infinite;
}

.dokuma-machine-speed {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 4px;
  transition: color 0.3s;
}

.dokuma-machine.stopped .dokuma-machine-speed {
  color: rgba(255, 255, 255, 0.25);
}

.dokuma-machine.warning .dokuma-machine-speed {
  color: #fbbf24;
}

/* Progress bar */
.dokuma-machine-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.dokuma-machine-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}

.dokuma-machine.running .dokuma-machine-fill {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.dokuma-machine.warning .dokuma-machine-fill {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.dokuma-machine.stopped .dokuma-machine-fill {
  background: rgba(239, 68, 68, 0.3);
}

/* Legend */
.dokuma-legend {
  display: flex;
  gap: 18px;
  justify-content: center;
}

.dokuma-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.625rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
}

.dokuma-legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
  font-style: normal;
}

.legend-running { background: #22c55e; }
.legend-warning { background: #f59e0b; }
.legend-stopped { background: #ef4444; }

.dokuma-machine-modal {
  position: absolute;
  inset: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 15;
}

.dokuma-machine-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.dokuma-machine-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 22, 0.72);
  backdrop-filter: blur(8px);
}

.dokuma-machine-modal-dialog {
  position: relative;
  width: min(460px, calc(100% - 32px));
  border-radius: 18px;
  border: 1px solid rgba(38, 185, 241, 0.16);
  background: linear-gradient(180deg, rgba(10, 22, 46, 0.96), rgba(7, 16, 31, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 22px;
  transform: translateY(12px) scale(0.96);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.dokuma-machine-modal.is-open .dokuma-machine-modal-dialog {
  transform: translateY(0) scale(1);
}

.dokuma-machine-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dokuma-machine-modal-close:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #fff;
}

.dokuma-machine-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-right: 34px;
}

.dokuma-machine-modal-kicker {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--secondary);
  margin-bottom: 6px;
}

.dokuma-machine-modal-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--white);
}

.dokuma-machine-modal-subtitle {
  margin: 0 0 18px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.52);
}

.dokuma-machine-modal-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.dokuma-machine-modal-badge.running {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.2);
}

.dokuma-machine-modal-badge.warning {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.2);
}

.dokuma-machine-modal-badge.stopped {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
}

.dokuma-machine-modal-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.dokuma-machine-modal-metric {
  padding: 12px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.dokuma-machine-modal-metric span {
  display: block;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 4px;
}

.dokuma-machine-modal-metric strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
}

.dokuma-machine-modal-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.dokuma-machine-modal-panel {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dokuma-machine-modal-panel-title {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.44);
  margin-bottom: 10px;
}

.dokuma-machine-meta-list {
  display: grid;
  gap: 8px;
}

.dokuma-machine-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dokuma-machine-meta-row span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

.dokuma-machine-meta-row strong {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--white);
  text-align: right;
}

.dokuma-machine-health {
  margin-top: 12px;
}

.dokuma-machine-health-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.dokuma-machine-health-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #26b9f1, #4ade80);
  transition: width 0.6s ease;
}

.dokuma-machine-health-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.46);
}

.dokuma-machine-alert-list {
  display: grid;
  gap: 8px;
}

.dokuma-machine-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
}

.dokuma-machine-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.dokuma-machine-alert-dot.running { background: #22c55e; box-shadow: 0 0 10px rgba(34, 197, 94, 0.35); }
.dokuma-machine-alert-dot.warning { background: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.35); }
.dokuma-machine-alert-dot.stopped { background: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.35); }

/* --- Side Panels --- */
.dokuma-side-panels {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(255, 255, 255, 0.02);
}

/* Efficiency Chart */
.dokuma-chart-panel {
  padding: 16px;
  background: rgba(10, 22, 46, 0.6);
}

.dokuma-efficiency-chart {
  position: relative;
  height: 110px;
}

.dokuma-chart-grid {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.dokuma-chart-label {
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.2);
  font-family: 'Space Grotesk', sans-serif;
}

.dokuma-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100%;
  padding-left: 28px;
}

.dokuma-chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.dokuma-chart-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  height: var(--bar-height);
  overflow: hidden;
  position: relative;
}

.dokuma-chart-bar-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--secondary), var(--secondary-light));
  border-radius: inherit;
  animation: chartBarGrow 1.5s ease-out both;
  opacity: 0.85;
}

.dokuma-chart-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
  transform: translateX(-100%);
  animation: chartShimmer 4s linear infinite;
  animation-delay: 2s;
}

@keyframes chartBarGrow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to { transform: scaleY(1); transform-origin: bottom; }
}

@keyframes chartShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.dokuma-chart-bar-wrap span {
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 4px;
  font-family: 'Space Grotesk', sans-serif;
}

/* Stop Reasons */
.dokuma-stops-panel {
  padding: 16px;
  background: rgba(10, 22, 46, 0.6);
}

.dokuma-stops-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dokuma-stop-item {
  display: grid;
  grid-template-columns: 100px 1fr 44px;
  gap: 10px;
  align-items: center;
}

.dokuma-stop-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.dokuma-stop-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dokuma-stop-bar-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
}

.dokuma-stop-bar {
  height: 100%;
  width: var(--stop-width);
  border-radius: 3px;
  animation: stopBarGrow 1.2s ease-out both;
}

@keyframes stopBarGrow {
  from { width: 0; }
  to { width: var(--stop-width); }
}

.dokuma-stop-val {
  font-size: 0.625rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-align: right;
  font-family: 'Space Grotesk', sans-serif;
}

/* Active Alarms */
.dokuma-alarms-panel {
  padding: 16px;
  background: rgba(10, 22, 46, 0.6);
  flex: 1;
}

.dokuma-alarm-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dokuma-alarm {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  position: relative;
}

.dokuma-alarm.critical {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.dokuma-alarm.warning {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.dokuma-alarm-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.dokuma-alarm-content {
  flex: 1;
  min-width: 0;
}

.dokuma-alarm-content strong {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dokuma-alarm-content small {
  display: block;
  font-size: 0.5625rem;
  color: rgba(255, 255, 255, 0.35);
}

.dokuma-alarm-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dokuma-alarm.critical .dokuma-alarm-pulse {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: alarmPulse 1.5s ease-in-out infinite;
}

.dokuma-alarm.warning .dokuma-alarm-pulse {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
  animation: alarmPulse 2s ease-in-out infinite;
}

@keyframes alarmPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
}

/* --- Feature Badges --- */
.dokuma-features {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.dokuma-feature-badge {
  text-align: center;
  padding: 28px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  animation: featureBadgeFloat 5s ease-in-out infinite;
}

.dokuma-feature-badge:nth-child(1) { animation-delay: 0s; }
.dokuma-feature-badge:nth-child(2) { animation-delay: 0.6s; }
.dokuma-feature-badge:nth-child(3) { animation-delay: 1.2s; }
.dokuma-feature-badge:nth-child(4) { animation-delay: 1.8s; }
.dokuma-feature-badge:nth-child(5) { animation-delay: 2.4s; }

.dokuma-feature-badge:hover {
  border-color: rgba(38, 185, 241, 0.2);
  background: rgba(38, 185, 241, 0.06);
  transform: translateY(-6px);
}

.dokuma-feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.dokuma-feature-badge strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.dokuma-feature-badge span {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}

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


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .dokuma-body {
    grid-template-columns: 1fr;
  }

  .dokuma-machine-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .dokuma-kpi:nth-child(4),
  .dokuma-kpi:nth-child(5) {
    display: none;
  }

  .dokuma-side-panels {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dokuma-chart-panel,
  .dokuma-stops-panel,
  .dokuma-alarms-panel {
    flex: 1;
    min-width: 200px;
  }

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

  .iot-node {
    padding: 12px 16px;
  }

  .iot-node strong {
    font-size: 0.9375rem;
  }
}

@media (max-width: 768px) {
  .dokuma-section {
    padding: 80px 0 100px;
  }

  .dokuma-header h1 {
    font-size: 2rem;
    padding-top: 80px;
  }

  .dokuma-iot-showcase {
    min-height: 360px;
    border-radius: 20px;
  }

  .iot-hub {
    padding: 20px 24px;
    border-radius: 16px;
  }

  .iot-hub strong {
    font-size: 1rem;
  }

  .iot-node {
    padding: 10px 14px;
  }

  .iot-node strong {
    font-size: 0.875rem;
  }

  .iot-node small {
    font-size: 0.625rem;
  }

  .iot-dashboard-panel {
    width: 280px;
    border-radius: 14px;
  }

  .dokuma-monitor {
    transform: none;
    animation: none;
  }

  .dokuma-monitor-bezel {
    padding: 8px;
    border-radius: 14px;
  }

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

  .dokuma-kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .dokuma-kpi:nth-child(3),
  .dokuma-kpi:nth-child(4),
  .dokuma-kpi:nth-child(5) {
    display: none;
  }

  .dokuma-body {
    grid-template-columns: 1fr;
  }

  .dokuma-side-panels {
    flex-direction: column;
  }

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

  .dokuma-feature-badge:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 240px;
    justify-self: center;
  }

  .dokuma-stop-item {
    grid-template-columns: 80px 1fr 36px;
  }

  .dokuma-machine-modal {
    inset: 8px;
  }

  .dokuma-machine-modal-dialog {
    width: min(100%, calc(100% - 8px));
    padding: 18px;
  }

  .dokuma-machine-modal-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .dokuma-machine-modal-grid {
    grid-template-columns: 1fr;
  }

  .dokuma-monitor-stand {
    display: none;
  }
}

@media (max-width: 480px) {
  .dokuma-machine-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dokuma-machine-modal-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .dokuma-machine-modal-badge {
    align-self: flex-start;
  }

  .dokuma-features {
    grid-template-columns: 1fr;
  }

  .dokuma-chart-bars {
    padding-left: 0;
  }

  .dokuma-chart-grid {
    display: none;
  }
}
