/* OT/ICS Security Dashboard — extends base style.css */

/* Bar Charts */
.ot-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 140px;
}
.ot-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}
.ot-bar-label {
  min-width: 100px;
  text-align: right;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ot-bar-track {
  flex: 1;
  height: 18px;
  background: rgba(100, 116, 139, 0.1);
  border-radius: 3px;
  overflow: hidden;
}
.ot-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.ot-bar-fill.vendor { background: linear-gradient(90deg, #3b82f6 0%, #6366f1 100%); }
.ot-bar-fill.protocol { background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%); }
.ot-bar-count {
  min-width: 24px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

/* Risk Chart */
.ot-risk-chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  min-height: 140px;
  padding-top: 10px;
}
.ot-risk-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ot-risk-bar-fill {
  width: 36px;
  border-radius: 4px 4px 0 0;
  transition: height 0.6s ease;
  min-height: 4px;
}
.ot-risk-bar-fill.critical { background: var(--critical, #e32c5b); }
.ot-risk-bar-fill.high { background: var(--high, #f97316); }
.ot-risk-bar-fill.medium { background: var(--medium, #f59e0b); }
.ot-risk-bar-fill.low { background: var(--low, #10b981); }
.ot-risk-bar-value {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  font-weight: 600;
}
.ot-risk-bar-label {
  font-size: 0.7rem;
  color: var(--ink-soft);
}

/* Firmware Timeline */
.ot-firmware-timeline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
}
.ot-fw-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.ot-fw-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ot-fw-dot.change { background: #f59e0b; }
.ot-fw-dot.initial { background: #3b82f6; }
.ot-fw-host { font-weight: 600; min-width: 110px; }
.ot-fw-version {
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink-soft);
  font-size: 0.78rem;
}
.ot-fw-arrow { color: #f59e0b; font-weight: 600; }
.ot-fw-time {
  margin-left: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: var(--ink-soft);
}

/* Device Table */
.ot-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}
.ot-status-dot.online { background: #10b981; }
.ot-status-dot.offline { background: #ef4444; }
.ot-status-dot.unknown { background: #94a3b8; }

.ot-risk-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: "IBM Plex Mono", monospace;
}
.ot-risk-badge.critical { background: rgba(227,44,91,0.15); color: var(--critical, #e32c5b); }
.ot-risk-badge.high { background: rgba(249,115,22,0.15); color: var(--high, #f97316); }
.ot-risk-badge.medium { background: rgba(245,158,11,0.15); color: var(--medium, #d97706); }
.ot-risk-badge.low { background: rgba(16,185,129,0.15); color: var(--low, #059669); }

.ot-protocol-tags { display: flex; gap: 3px; flex-wrap: wrap; }
.ot-protocol-tag {
  padding: 0 5px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-family: "IBM Plex Mono", monospace;
  background: rgba(100, 116, 139, 0.08);
  border: 1px solid rgba(100, 116, 139, 0.15);
  color: var(--ink-soft);
}

/* Import SBOM button styled as secondary */
.btn-file-label {
  display: inline-block;
  cursor: pointer;
}
