:root {
  /* DARK THEME (Tema Gelap Industrial Standar Internasional) */
  --bg: #090d16;
  --bg-glow: #0f1c30;
  --panel: #0d1522;
  --panel-raised: #121c2d;
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-hover: rgba(56, 189, 248, 0.4);
  --grid: rgba(255, 255, 255, 0.05);
  
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.25);
  --red: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.35);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.25);
  --purple: #8b5cf6;
  
  --bekaert-blue: #0284c7;
  --bekaert-blue-dark: #0369a1;
  --bekaert-blue-light: #38bdf8;
  --bekaert-blue-pale: #bae6fd;

  /* Typography Modern Industrial */
  --mono: 'JetBrains Mono', 'SF Mono', Consolas, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: 
    radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(15, 28, 48, 0.8) 0%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    var(--bg);
  background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px, 100% 100%;
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  padding: 20px 24px;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1024px) {
  body {
    padding: 24px 36px;
  }
}

/* ============================================================================
   TOPBAR / HEADER
   ============================================================================ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 22px;
  background: rgba(18, 28, 45, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-logo {
  height: 38px;
  width: auto;
  min-width: 38px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  padding: 4px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.brand-logo-fallback {
  height: 38px;
  width: 38px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.brand-text .company {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--bekaert-blue-pale);
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-text .division {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  font-family: var(--mono);
}

.title-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 2px;
}

.title-group h1 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.title-group p {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  font-family: var(--mono);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.scada-telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(13, 21, 34, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--bekaert-blue-pale);
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.scada-clock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bekaert-blue-light);
  box-shadow: 0 0 8px var(--bekaert-blue-light);
  animation: pulse 1.5s infinite;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  transition: all 0.3s;
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}

.status-dot.offline {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

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

@keyframes flash-danger {
  0%, 100% {
    background: var(--panel-raised);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: none;
  }
  50% {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--red);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
  }
}

/* Modern Industrial Buttons */
.chart-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--panel-border);
  padding: 7px 13px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}

.chart-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.chart-btn.btn-nav.active {
  background: var(--bekaert-blue);
  border-color: var(--bekaert-blue-light);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

.chart-btn.btn-excel {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.chart-btn.btn-excel:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
}

.chart-btn.btn-sound.active {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--red);
  color: #fca5a5;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.chart-btn.btn-settings {
  background: rgba(255, 255, 255, 0.05);
}

.chart-btn.btn-settings:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--bekaert-blue-light);
}

/* ============================================================================
   SUMMARY STRIP (5 COLUMNS) - MODERN KPI CARDS
   ============================================================================ */
.summary-strip {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
  box-shadow: none;
}

.summary-item {
  background: rgba(18, 28, 45, 0.65);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.summary-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s;
}

.summary-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(18, 28, 45, 0.85);
}

.summary-item.status-normal::after { background: var(--green); }
.summary-item.status-warning::after { background: var(--amber); }
.summary-item.status-critical::after { background: var(--red); }
.summary-item.status-offline::after { background: var(--text-dim); }

/* ============================================================================
   OFFLINE ALARM BOX (KOTAK ALARM KHUSUS NODE OFFLINE - SLIM COLLAPSIBLE)
   ============================================================================ */
.offline-alarm-box {
  background: rgba(18, 28, 45, 0.75);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: all 0.2s ease;
}

.offline-alarm-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
  background: rgba(239, 68, 68, 0.05);
  transition: background 0.18s;
}

.offline-alarm-bar:hover {
  background: rgba(239, 68, 68, 0.12);
}

.offline-alarm-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.offline-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  animation: pulse 1.2s infinite;
  flex-shrink: 0;
}

.offline-badge-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.offline-alarm-main-text {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--text);
  letter-spacing: 0.01em;
}

.offline-alarm-main-text strong {
  font-family: var(--mono);
  color: #f87171;
  font-size: 13px;
}

.offline-alarm-right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--mono);
}

.offline-toggle-hint {
  opacity: 0.75;
}

.offline-toggle-arrow {
  font-size: 9px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.offline-toggle-arrow.open {
  transform: rotate(180deg);
}

.offline-alarm-drawer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(9, 13, 22, 0.6);
}

.offline-nodes-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}

.offline-node-chip {
  background: rgba(18, 28, 45, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 7px 12px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.offline-node-chip:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.offline-node-chip .chip-name {
  color: #fca5a5;
  font-weight: 700;
}

.offline-node-chip .chip-time {
  color: var(--text-dim);
  font-size: 9.5px;
}

.summary-item span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.summary-item strong {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 28px;
  color: var(--text);
  font-weight: 800;
  line-height: 1;
}

.summary-sub {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 6px;
  text-transform: uppercase;
}

.summary-item.status-normal .summary-sub { color: rgba(16, 185, 129, 0.7); }
.summary-item.status-warning .summary-sub { color: rgba(245, 158, 11, 0.75); }
.summary-item.status-critical .summary-sub { color: rgba(239, 68, 68, 0.85); }
.summary-item.status-offline .summary-sub { color: rgba(148, 163, 184, 0.55); }

/* ============================================================================
   TOOLBAR / CONTROL PANEL - INDUSTRIAL COMPACT
   ============================================================================ */
.control-panel {
  background: rgba(18, 28, 45, 0.65);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px 18px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  backdrop-filter: blur(8px);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-wrap {
  display: flex;
  align-items: center;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 13px;
  pointer-events: none;
  color: var(--text-dim);
}

.chart-input {
  background: rgba(13, 21, 34, 0.8);
  color: var(--text);
  border: 1px solid var(--panel-border);
  padding: 7px 12px 7px 34px;
  font-family: var(--mono);
  font-size: 12px;
  border-radius: 6px;
  outline: none;
  width: 260px;
  transition: all 0.2s;
}

.chart-input:hover,
.chart-input:focus {
  border-color: var(--bekaert-blue-light);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
  background: rgba(13, 21, 34, 1);
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--panel-border);
  padding: 6px 14px;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-pill.active {
  background: var(--bekaert-blue);
  color: #ffffff;
  border-color: var(--bekaert-blue-light);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.filter-pill.pill-normal.active {
  background: var(--green);
  border-color: var(--green);
  color: #000;
  box-shadow: 0 2px 8px var(--green-glow);
}

.filter-pill.pill-warning.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #000;
  box-shadow: 0 2px 8px var(--amber-glow);
}

.filter-pill.pill-critical.active {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--red-glow);
}

.filter-pill.pill-offline.active {
  background: #334155;
  border-color: #64748b;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.35);
}

.last-update-tag {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

/* ============================================================================
   MAIN CONTENT & NODE CARD GRID - HIGH-END SCADA / DCS STYLE
   ============================================================================ */
.main-content {
  margin-bottom: 28px;
}

.node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.card,
.node-card {
  background: rgba(18, 28, 45, 0.7);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(8px);
}

.node-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--panel-border);
  transition: background 0.2s;
}

.node-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  border-color: var(--panel-border-hover);
  background: rgba(18, 28, 45, 0.9);
}

.node-card.status-normal::before {
  background: linear-gradient(90deg, var(--green) 0%, #34d399 100%);
}

.node-card.status-warning::before {
  background: linear-gradient(90deg, var(--amber) 0%, #fbbf24 100%);
}

.node-card.status-critical::before {
  background: linear-gradient(90deg, var(--red) 0%, #f87171 100%);
}

.node-card.status-critical {
  animation: flash-danger 1.5s infinite;
}

.node-card.status-offline {
  opacity: 0.7;
}

.node-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.node-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.equip-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--bekaert-blue-light);
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.node-name {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Badges Modern Industrial */
.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge.NORMAL,
.status-badge.normal {
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
}

.badge.WARNING,
.status-badge.warning {
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
}

.badge.CRITICAL,
.badge.DANGER,
.status-badge.critical {
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
}

.badge.OFFLINE,
.status-badge.offline {
  color: var(--text-dim);
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
}

/* Card metrics big values - Precision Telemetry Display */
.node-metrics-big {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: rgba(9, 13, 22, 0.75);
  padding: 12px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  gap: 12px;
}

.big-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 3px;
  min-width: 0;
  width: 100%;
}

.big-metric-value {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 2px;
  letter-spacing: -0.02em;
}

.big-metric-value.warn { color: var(--amber) !important; text-shadow: 0 0 12px var(--amber-glow); }
.big-metric-value.crit { color: var(--red) !important; text-shadow: 0 0 14px var(--red-glow); }

.big-metric-unit {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}

.big-metric-label {
  font-family: var(--sans);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.big-metric-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 2px 0;
}

/* ISA-101 High Performance HMI Horizontal Mini-Gauges */
.scada-gauge {
  width: 100%;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.scada-gauge-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: visible;
}

.scada-gauge-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s;
}

.scada-gauge-fill.fill-normal {
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.45);
}

.scada-gauge-fill.fill-warn {
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.scada-gauge-fill.fill-crit {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.65);
}

.scada-gauge-fill.fill-offline {
  background: rgba(148, 163, 184, 0.25);
}

.scada-gauge-marker {
  display: none !important;
}

.scada-gauge-scale {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--text-dim);
  padding: 0 1px;
  line-height: 1;
}

.scada-gauge-scale .scale-sp {
  display: none !important;
}

/* Submetrics: LoRa RF Meter & Battery Diagnostics */
.node-submetrics {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
  padding: 0 4px;
}

.submetric-rf-group,
.submetric-diag-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rf-meter {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  vertical-align: middle;
}

.rf-bar {
  width: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1px;
  transition: background-color 0.2s;
}

.rf-bar.b1 { height: 3px; }
.rf-bar.b2 { height: 6px; }
.rf-bar.b3 { height: 9px; }
.rf-bar.b4 { height: 12px; }

.rf-bar.active {
  background: var(--bekaert-blue-light);
  box-shadow: 0 0 3px rgba(56, 189, 248, 0.5);
}

.rf-meter.bars-4 .rf-bar.active {
  background: var(--green);
  box-shadow: 0 0 3px rgba(16, 185, 129, 0.5);
}

.rf-meter.bars-1 .rf-bar.active {
  background: var(--amber);
  box-shadow: 0 0 3px rgba(245, 158, 11, 0.5);
}

/* Battery Telemetry Widget */
.batt-widget {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}

.batt-body {
  width: 15px;
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  padding: 1px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: stretch;
}

.batt-fill {
  background: var(--green);
  border-radius: 1px;
  transition: width 0.3s;
}

.batt-widget.warn .batt-fill { background: var(--amber); }
.batt-widget.crit .batt-fill { background: var(--red); }

.batt-tip {
  width: 2px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0 1px 1px 0;
}

.badge-dot.dot-total {
  background: var(--bekaert-blue-light);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.5);
}

/* Tag kustom di node submetrics */
.tag-custom {
  font-size: 9.5px;
  padding: 1px 6px;
  background: rgba(245,158,11,0.18);
  color: var(--amber);
  border-radius: 4px;
  margin-left: 4px;
  border: 1px solid rgba(245,158,11,0.3);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.node-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
  border-top: 1px solid var(--grid);
  padding-top: 8px;
  gap: 6px;
}

.node-footer-status {
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.node-footer-status.ok-label     { color: var(--green); }
.node-footer-status.warn-label   { color: var(--amber); }
.node-footer-status.crit-label   { color: var(--red); }
.node-footer-status.offline-label { color: var(--text-dim); }

.node-footer-time {
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.8;
}

/* Badge status indicator di dot */
.badge-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
}
.badge-dot.dot-normal {
  background: var(--green);
  box-shadow: 0 0 6px var(--green-glow);
}
.badge-dot.dot-warn {
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber-glow);
}
.badge-dot.dot-crit {
  background: var(--red);
  box-shadow: 0 0 6px var(--red-glow);
}
.badge-dot.dot-offline {
  background: var(--text-dim);
}

.badge-dot.dot-crit-low {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(239,68,68,0.5);
  border: 1.5px solid var(--red);
  vertical-align: middle;
  margin-right: 4px;
}
.badge-dot.dot-warn-low {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(245,158,11,0.5);
  border: 1.5px solid var(--amber);
  vertical-align: middle;
  margin-right: 4px;
}

/* ============================================================================
   MODAL PANEL & HISTORICAL CHARTS
   ============================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  background: rgba(18, 28, 45, 0.95);
  border: 1px solid var(--panel-border);
  border-top: 3px solid var(--bekaert-blue);
  border-radius: 14px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75);
  padding: 24px 28px;
  backdrop-filter: blur(16px);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.modal-header h2 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--bekaert-blue-pale);
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-top: 4px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3);
}

.modal-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.detail-item {
  background: rgba(9, 13, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.detail-value.warn { color: var(--amber) !important; }
.detail-value.crit { color: var(--red) !important; }

.chart-panel {
  background: linear-gradient(160deg, var(--panel-raised) 0%, var(--panel) 100%);
  border: 1px solid var(--panel-border);
  border-top: 3px solid var(--bekaert-blue);
  border-radius: 6px;
  padding: 20px;
}

.chart-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-panel-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.panel-subtitle {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--bekaert-blue-pale);
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.range-btn {
  background: var(--panel);
  color: var(--text-dim);
  border: 1px solid var(--panel-border);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-family: var(--mono);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.range-btn:hover {
  border-color: var(--bekaert-blue-light);
  color: var(--bekaert-blue-pale);
}

.range-btn.active {
  background: var(--bekaert-blue);
  color: white;
  border-color: var(--bekaert-blue-light);
}

.chart-wrap {
  background: var(--panel);
  border: 1px solid var(--grid);
  border-radius: 4px;
  padding: 12px;
  position: relative;
  height: 180px;
}

/* ============================================================================
   FOOTER
   ============================================================================ */
.footer-note {
  margin-top: 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
  border-top: 1px solid var(--panel-border);
  padding-top: 16px;
}

/* ============================================================================
   SETTINGS MODAL & QUICK RENAME
   ============================================================================ */
.btn-settings {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid var(--bekaert-blue-light);
  color: var(--bekaert-blue-pale);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-settings:hover {
  background: var(--bekaert-blue-light);
  color: white;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-quick-rename {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--panel-border);
  color: var(--bekaert-blue-pale);
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-quick-rename:hover {
  background: var(--bekaert-blue);
  color: white;
  border-color: var(--bekaert-blue-light);
}

.inline-rename-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.inline-rename-box input {
  padding: 6px 10px;
  font-size: 13px;
  max-width: 260px;
}

.inline-thresh-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--amber);
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 10px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inline-thresh-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inline-thresh-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
}

.inline-thresh-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.inline-thresh-inputs label {
  display: block;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-dim);
  margin-bottom: 3px;
}

.input-mini {
  width: 100%;
  padding: 5px 8px;
  font-size: 13px;
  font-family: var(--mono);
  font-weight: 600;
}

.inline-thresh-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-save-mini {
  background: var(--bekaert-blue-light);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel-mini {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.btn-cancel-mini:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.modal-panel-settings {
  max-width: 760px;
}

.settings-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: 18px;
  padding-bottom: 2px;
}

.settings-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-tab:hover {
  color: var(--text);
}

.settings-tab.active {
  color: var(--bekaert-blue-pale);
  border-bottom-color: var(--bekaert-blue-light);
}

.settings-section-info {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: #bfdbfe;
  line-height: 1.5;
  margin-bottom: 18px;
}

.threshold-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.threshold-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.threshold-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--grid);
  padding-bottom: 8px;
}

.threshold-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.threshold-badge {
  font-size: 10px;
  font-family: var(--mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--text-dim);
}

.threshold-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.threshold-input-group label {
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-warn {
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber);
}

.dot-crit {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
}

.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.threshold-input {
  width: 100%;
  padding-right: 36px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}

.unit-tag {
  position: absolute;
  right: 10px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-dim);
  pointer-events: none;
}

.threshold-desc {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
}

.settings-subheading {
  margin-top: 24px;
  margin-bottom: 12px;
  border-top: 1px solid var(--grid);
  padding-top: 16px;
}

.subheading-title {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--bekaert-blue-pale);
}

.subheading-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 3px;
}

.node-thresh-picker-box {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.node-thresh-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.node-thresh-picker-row label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.select-node-picker {
  max-width: 240px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: var(--mono);
}

.node-thresh-status-tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.15);
  color: var(--bekaert-blue-pale);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.node-thresh-status-tag.custom {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.4);
}

.node-thresh-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.node-thresh-field label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-family: var(--mono);
  color: var(--text-dim);
  margin-bottom: 4px;
}

.node-thresh-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.node-names-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.node-names-toolbar input {
  max-width: 280px;
}

.node-names-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 16px;
}

.node-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 8px 12px;
  transition: border-color 0.2s;
}

.node-name-row:hover {
  border-color: var(--bekaert-blue-light);
}

.node-tag-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.18);
  color: var(--bekaert-blue-pale);
  padding: 4px 8px;
  border-radius: 3px;
  min-width: 65px;
  text-align: center;
}

.node-name-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--sans);
  transition: all 0.2s;
}

.node-name-input:focus {
  outline: none;
  border-color: var(--bekaert-blue-light);
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.4);
}

.btn-reset-single {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.2s;
}

.btn-reset-single:hover {
  color: var(--amber);
}

.settings-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--grid);
  padding-top: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 12px;
}

.settings-feedback {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.settings-feedback.success {
  color: var(--green);
}

.settings-feedback.error {
  color: var(--red);
}

.footer-actions {
  display: flex;
  gap: 10px;
}

.btn-save {
  background: var(--bekaert-blue-light);
  color: white;
  border: none;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-save:hover {
  background: #1d4ed8;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.6);
}

.btn-cancel {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--panel-border);
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 900px) {
  .summary-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  body {
    padding: 16px;
  }
  .title-divider {
    display: none;
  }
  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .summary-item {
    border-right: none;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 10px;
  }
  .chart-input {
    width: 100%;
  }
}

/* ============================================================================
   TOMBOL TAMBAH NODE
   ============================================================================ */
.chart-btn.btn-add-node {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
}

.chart-btn.btn-add-node:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: var(--green);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

/* ============================================================================
   TOMBOL HAPUS NODE (DI MODAL DETAIL)
   ============================================================================ */
.btn-quick-rename.btn-delete-node {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

.btn-quick-rename.btn-delete-node:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--red);
  color: #fca5a5;
}

/* ============================================================================
   MODAL TAMBAH NODE BARU
   ============================================================================ */
.modal-panel-add-node {
  max-width: 520px;
}

.add-node-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 0;
}

.add-node-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.add-node-field label {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.field-hint {
  font-weight: 400;
  color: var(--text-dim);
  font-size: 11px;
}

.field-desc {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
}

.add-node-section-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--bekaert-blue-pale);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 6px;
  border-top: 1px solid var(--panel-border);
}

.add-node-thresh-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.add-node-feedback {
  font-family: var(--mono);
  font-size: 12px;
  min-height: 18px;
}

.add-node-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

/* ============================================================================
   TOMBOL TAMBAH NODE DI TAB KELOLA NODE (SETTINGS MODAL)
   ============================================================================ */
.node-names-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.btn-add-node-settings {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-add-node-settings:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--green);
}

/* Tombol hapus inline di setiap baris node */
.btn-delete-inline {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--red);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 3px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-delete-inline:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--red);
}

/* ============================================================================
   TOPBAR: NAV SWITCHER (Bearing Monitor <-> Remote Console)
   ============================================================================ */
.btn-nav {
  background: var(--panel-raised);
  color: var(--text-dim);
  border: 1px solid var(--panel-border);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-nav:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #fff;
  border-color: var(--bekaert-blue-light);
  transform: translateY(-1px);
}

.btn-nav.active {
  background: var(--bekaert-blue);
  color: #ffffff;
  border-color: var(--bekaert-blue-light);
  box-shadow: 0 0 16px rgba(0, 70, 173, 0.5);
}

/* ============================================================================
   NODE CARD: "ACTION YANG HARUS DILAKUKAN" SECTION
   ============================================================================ */
.node-action-box {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 11px;
  line-height: 1.45;
  transition: all 0.2s ease;
  position: relative;
}

.node-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.node-action-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.node-action-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.node-action-text {
  font-size: 11px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

/* Warna tema status untuk Action Box */
.node-action-box.action-critical {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}
.node-action-box.action-critical .node-action-header {
  color: #fca5a5;
}
.node-action-box.action-critical .node-action-badge {
  background: rgba(239, 68, 68, 0.3);
  color: #fee2e2;
}

.node-action-box.action-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}
.node-action-box.action-warning .node-action-header {
  color: #fde68a;
}
.node-action-box.action-warning .node-action-badge {
  background: rgba(245, 158, 11, 0.3);
  color: #fef3c7;
}

.node-action-box.action-normal {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}
.node-action-box.action-normal .node-action-header {
  color: #6ee7b7;
}
.node-action-box.action-normal .node-action-badge {
  background: rgba(16, 185, 129, 0.22);
  color: #d1fae5;
}

.node-action-box.action-offline {
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.2);
}
.node-action-box.action-offline .node-action-header {
  color: var(--text-dim);
}
.node-action-box.action-offline .node-action-badge {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-dim);
}

/* Card Quick Remote Link */
.node-card-remote-btn {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  border-radius: 4px;
  font-size: 10px;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.node-card-remote-btn:hover {
  background: var(--panel-raised);
  color: var(--bekaert-blue-pale);
  border-color: var(--bekaert-blue-light);
}

/* ============================================================================
   MODAL DETAIL: SEKSI "ACTION YANG HARUS DILAKUKAN"
   ============================================================================ */
.modal-action-section {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.modal-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.modal-action-title {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-action-rec {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.modal-action-edit-box {
  margin-top: 8px;
}

.modal-action-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
  min-height: 58px;
  box-sizing: border-box;
}

.modal-action-textarea:focus {
  outline: none;
  border-color: var(--bekaert-blue-light);
}

.modal-action-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.modal-action-btns {
  display: flex;
  gap: 6px;
}

.btn-open-remote-modal {
  background: rgba(37, 99, 235, 0.15);
  color: var(--bekaert-blue-pale);
  border: 1px solid var(--bekaert-blue-light);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-family: var(--mono);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-open-remote-modal:hover {
  background: var(--bekaert-blue);
  color: #fff;
}

/* ============================================================================
   VIEW 2: INTEGRATED REMOTE CONSOLE & OTA MANAGER
   ============================================================================ */
.rc-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 0 32px 0;
}

.rc-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.rc-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.rc-login-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.rc-login-card h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.rc-login-card p {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.rc-login-card input {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.92rem;
  box-sizing: border-box;
}

.rc-login-card input:focus {
  outline: none;
  border-color: var(--bekaert-blue-light);
}

.rc-err {
  color: var(--red);
  font-size: 0.82rem;
  font-family: var(--mono);
  margin-top: 8px;
  min-height: 1.2em;
}

.rc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--panel-border);
}

.rc-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rc-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rc-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.rc-pill.on {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.rc-pill.off {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.rc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.rc-stat {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  padding: 10px 14px;
  border-radius: 8px;
}

.rc-stat-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-family: var(--mono);
  font-weight: 700;
}

.rc-stat-value {
  font-size: 0.92rem;
  color: var(--bekaert-blue-pale);
  font-weight: 700;
  font-family: var(--mono);
  margin-top: 4px;
  word-break: break-all;
}

.rc-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg);
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  margin-bottom: 18px;
}

.rc-tab {
  flex: 1;
  padding: 9px 12px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.rc-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.rc-tab.active {
  background: var(--bekaert-blue);
  color: #fff;
}

.rc-pane {
  display: none;
}
.rc-pane.active {
  display: block;
}

.rc-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 10px 14px;
}

.rc-filter {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  width: 200px;
}
.rc-filter:focus {
  outline: none;
  border-color: var(--bekaert-blue-light);
}

.rc-term {
  background: #040711;
  border: 1px solid var(--panel-border);
  border-radius: 0 0 8px 8px;
  height: 480px;
  overflow-y: auto;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
}

.ln {
  display: flex;
  gap: 10px;
  word-break: break-all;
  padding: 2px 4px;
  border-radius: 3px;
}
.ln:hover {
  background: rgba(255, 255, 255, 0.03);
}
.ln .t {
  color: var(--text-dim);
  font-size: 0.74rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.ln.srv {
  color: #fbbf24;
}

.t-lora { color: #38bdf8; font-weight: 600; }
.t-sens { color: #34d399; font-weight: 600; }
.t-wifi { color: #fbbf24; font-weight: 600; }
.t-http { color: #c084fc; font-weight: 600; }
.t-rtd  { color: #f59e0b; font-weight: 600; }
.t-mpu  { color: #06b6d4; font-weight: 600; }
.t-rem  { color: #a78bfa; font-weight: 600; }
.t-err  { color: #f87171; font-weight: 700; background: rgba(239, 68, 68, 0.18); padding: 0 4px; border-radius: 3px; }
.t-ok   { color: #4ade80; font-weight: 600; }

.rc-drop {
  border: 2px dashed var(--panel-border);
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: rgba(10, 15, 29, 0.6);
  transition: all 0.2s;
}
.rc-drop:hover {
  border-color: var(--bekaert-blue-light);
  background: rgba(0, 70, 173, 0.08);
}

.rc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 0.84rem;
}
.rc-table th, .rc-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--panel-border);
  vertical-align: middle;
}
.rc-table th {
  color: var(--text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  font-family: var(--mono);
}
.rc-table td.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  word-break: break-all;
}

.st-ok { color: var(--green); font-weight: 600; }
.st-error, .st-timeout, .st-cancelled { color: var(--red); font-weight: 600; }
.st-queued, .st-sent, .st-running { color: var(--amber); font-weight: 600; }

.btn-danger-mini {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-danger-mini:hover {
  background: var(--red);
  color: #fff;
}

/* ============================================================================
   MODAL EKSPOR CSV TELEMETRI
   ============================================================================ */
.modal-panel-export {
  max-width: 520px;
}

.export-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0;
}

.export-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.export-field label {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.export-select {
  width: 100%;
  cursor: pointer;
}

.export-preset-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.export-preset-btn {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.export-preset-btn:hover {
  border-color: var(--bekaert-blue);
  color: var(--text);
  background: var(--panel-raised);
}

.export-preset-btn.active {
  border-color: var(--bekaert-blue);
  background: rgba(30, 115, 190, 0.18);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--bekaert-blue);
}

.export-date-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px;
  border-radius: 6px;
  border: 1px dashed var(--panel-border);
}

.export-date-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.export-date-field label {
  font-size: 11.5px;
  color: var(--text-dim);
  font-family: var(--mono);
}

.export-summary-box {
  background: rgba(30, 115, 190, 0.08);
  border-left: 3px solid var(--bekaert-blue);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

.export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.btn-export-download {
  background: var(--green);
  color: #0b0f14 !important;
  font-weight: 700;
  border: none;
  cursor: pointer;
  padding: 9px 18px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 13px;
  transition: all 0.15s ease;
}

.btn-export-download:hover {
  background: #00c853;
  transform: translateY(-1px);
}


