/* HSA-Tool.iperf — Lauf-Übersicht, Ampeln, Detail-Modal */

.iperf-meta {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0 0 1rem;
}

.iperf-status {
  font-weight: 650;
  margin: 0.5rem 0 1rem;
}

.iperf-status.is-err {
  color: var(--danger, #c62828);
}

.iperf-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.iperf-dl a {
  display: inline-block;
  text-decoration: none;
}

.iperf-dl-note {
  font-size: 0.85rem;
  opacity: 0.85;
  margin: 0 0 1.25rem;
}

.iperf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.iperf-table th,
.iperf-table td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border, #ccc);
  vertical-align: top;
}

.iperf-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.75;
}

.iperf-ok {
  color: var(--success, #2e8540);
  font-weight: 650;
}

.iperf-err {
  color: var(--danger, #c62828);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.iperf-pre {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 14rem;
  overflow: auto;
}

.iperf-json {
  margin: 0.4rem 0 0;
}

.iperf-json summary {
  cursor: pointer;
  font-size: 0.82rem;
  opacity: 0.8;
}

.iperf-targets-table input[type="text"],
.iperf-targets-table input[type="number"] {
  width: 100%;
  max-width: 16rem;
  box-sizing: border-box;
}

.iperf-targets-table input[type="number"] {
  max-width: 6rem;
}

.iperf-targets-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
}

.iperf-tests {
  min-width: 11rem;
}

.iperf-ck {
  display: inline-block;
  margin: 0 0.45rem 0.2rem 0;
  font-size: 0.82rem;
  white-space: nowrap;
}

.iperf-http input[type="text"] {
  max-width: 6rem;
}

.iperf-http input[type="number"] {
  max-width: 4.5rem;
}

.iperf-http select {
  max-width: 6rem;
}

.iperf-tcp {
  min-width: 12rem;
}

.iperf-tcp input[type="text"] {
  display: block;
  margin-top: 0.25rem;
  max-width: 11rem;
}

.iperf-runs-hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.iperf-runs-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.iperf-runs-table {
  margin: 0;
}

.iperf-runs-table th,
.iperf-runs-table td {
  vertical-align: middle;
}

.iperf-run-row {
  cursor: pointer;
}

.iperf-run-row:hover {
  background: color-mix(in srgb, var(--accent, #00a0c8) 8%, transparent);
}

.iperf-run-row.is-selected {
  outline: 2px solid var(--accent, #00a0c8);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--accent, #00a0c8) 14%, transparent);
}

.iperf-run-row:focus-visible {
  outline: 2px solid var(--accent, #00a0c8);
  outline-offset: -2px;
}

.iperf-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.iperf-pill--ok {
  color: #14532d;
  background: #dcfce7;
}

.iperf-pill--warn {
  color: #7c4a03;
  background: #ffedd5;
}

.iperf-pill--fail {
  color: #7f1d1d;
  background: #fee2e2;
}

.iperf-pill--skip {
  color: var(--text-muted);
  background: color-mix(in srgb, var(--border, #d9dee3) 55%, transparent);
}

html[data-theme="dark"] .iperf-pill--ok {
  color: #bbf7d0;
  background: rgba(46, 133, 64, 0.28);
}

html[data-theme="dark"] .iperf-pill--warn {
  color: #fdba74;
  background: rgba(217, 119, 6, 0.28);
}

html[data-theme="dark"] .iperf-pill--fail {
  color: #fecaca;
  background: rgba(192, 57, 43, 0.32);
}

.iperf-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.12rem;
}

.iperf-lights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.iperf-light {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.4rem;
  padding: 0.18rem 0.28rem 0.22rem;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.68rem;
  line-height: 1.15;
  text-align: center;
}

.iperf-light__k {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.iperf-light__v {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.iperf-light--ok {
  background: #dcfce7;
  color: #14532d;
}

.iperf-light--warn {
  background: #ffedd5;
  color: #7c4a03;
}

.iperf-light--fail {
  background: #fee2e2;
  color: #7f1d1d;
}

.iperf-light--skip {
  background: color-mix(in srgb, var(--border, #d9dee3) 45%, var(--bg-card));
  color: var(--text-muted);
}

html[data-theme="dark"] .iperf-light--ok {
  background: rgba(46, 133, 64, 0.32);
  color: #bbf7d0;
}

html[data-theme="dark"] .iperf-light--warn {
  background: rgba(217, 119, 6, 0.3);
  color: #fdba74;
}

html[data-theme="dark"] .iperf-light--fail {
  background: rgba(192, 57, 43, 0.34);
  color: #fecaca;
}

.iperf-overlay {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem 1rem 2rem;
  overflow: auto;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}

.iperf-overlay[hidden] {
  display: none !important;
}

.iperf-dialog {
  width: min(1080px, 100%);
  max-height: min(94vh, 980px);
  display: flex;
  flex-direction: column;
  margin-top: 0.35rem;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.iperf-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.iperf-dialog__title {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
  font-weight: 650;
}

.iperf-dialog__lead {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.iperf-dialog__close {
  flex-shrink: 0;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
}

.iperf-dialog__close:hover {
  border-color: var(--accent);
}

.iperf-dialog__body {
  overflow: auto;
  padding: 1rem 1.1rem 1.25rem;
}

.iperf-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.iperf-kpi {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--kpi-bg-1, #e8f4f8) 70%, var(--bg-card));
}

.iperf-kpi__k {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.iperf-kpi__v {
  font-size: 0.95rem;
  font-weight: 650;
  word-break: break-word;
}

.iperf-note {
  margin: 0 0 1rem;
  padding: 0.65rem 0.8rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent, #00a0c8) 8%, transparent);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
}

.iperf-reach {
  margin: 0 0 1.1rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-page);
}

.iperf-reach__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.65rem;
}

.iperf-reach__title {
  margin: 0;
  font-size: 0.92rem;
}

.iperf-reach__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.iperf-reach__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.45rem;
}

.iperf-reach__item {
  display: grid;
  grid-template-columns: 0.55rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.iperf-reach__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #9ca3af;
}

.iperf-reach__item--ok .iperf-reach__dot {
  background: #22c55e;
}

.iperf-reach__item--warn .iperf-reach__dot {
  background: #f59e0b;
}

.iperf-reach__item--fail .iperf-reach__dot {
  background: #ef4444;
}

.iperf-reach__name {
  font-weight: 650;
  font-size: 0.86rem;
  line-height: 1.2;
}

.iperf-reach__meta {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin-top: 0.1rem;
}

.iperf-target {
  margin: 0 0 1rem;
  padding: 0.85rem 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-page);
}

.iperf-target__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-bottom: 0.7rem;
}

.iperf-target__name {
  margin: 0;
  font-size: 1.02rem;
}

.iperf-target__host {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.iperf-speeds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin: 0.75rem 0 0.2rem;
}

@media (max-width: 640px) {
  .iperf-speeds {
    grid-template-columns: 1fr;
  }
}

.iperf-speed__label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 0.28rem;
}

.iperf-speed__track {
  height: 10px;
  border-radius: 999px;
  background: var(--donut-track, #e0e8ec);
  overflow: hidden;
}

.iperf-speed__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--success, #2e8540));
  min-width: 0;
}

.iperf-speed__fill--warn {
  background: linear-gradient(90deg, #f59e0b, #ea580c);
}

.iperf-speed__fill--fail {
  background: var(--danger);
}

.iperf-section-title {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.iperf-kv {
  display: grid;
  grid-template-columns: minmax(6rem, 8.5rem) 1fr;
  gap: 0.28rem 0.7rem;
  font-size: 0.86rem;
}

.iperf-kv dt {
  color: var(--text-muted);
  margin: 0;
}

.iperf-kv dd {
  margin: 0;
  word-break: break-word;
}

.iperf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.iperf-chip {
  display: inline-block;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg-card);
}

.iperf-mini {
  width: 100%;
  font-size: 0.82rem;
}

.iperf-mini th,
.iperf-mini td {
  padding: 0.32rem 0.4rem;
}

.iperf-hops {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.iperf-hop {
  display: inline-flex;
  flex-direction: column;
  min-width: 4.2rem;
  padding: 0.28rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.72rem;
}

.iperf-hop__n {
  color: var(--text-muted);
  font-weight: 650;
}

.iperf-hop--timeout {
  opacity: 0.55;
}

.iperf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.iperf-legend i {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 3px;
  margin-right: 0.28rem;
  vertical-align: -1px;
}

.iperf-legend i.ok {
  background: #86efac;
}

.iperf-legend i.warn {
  background: #fdba74;
}

.iperf-legend i.fail {
  background: #fca5a5;
}

.iperf-legend i.skip {
  background: #d1d5db;
}

.iperf-netbadge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}

.iperf-netbadge.is-ok {
  background: #dcfce7;
  color: #166534;
}

.iperf-netbadge.is-wait {
  background: #e5e7eb;
  color: #374151;
}

.iperf-netbadge.is-fail {
  background: #fee2e2;
  color: #991b1b;
}

.iperf-netctx {
  margin: 0.9rem 0 1.1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 10px;
  background: #fafafa;
}

.iperf-netctx h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.iperf-netsum {
  margin: 0 0 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border-left: 4px solid #86efac;
  background: #fff;
}

.iperf-netsum.is-fail {
  border-left-color: #fca5a5;
}

.iperf-netsum__head {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.iperf-netsum ul,
.iperf-wlc-kpis,
.iperf-netwarn {
  margin: 0;
  padding-left: 1.15rem;
}

.iperf-netmeta,
.iperf-netpath {
  font-size: 0.88rem;
  opacity: 0.9;
  margin: 0 0 0.6rem;
}

.iperf-cli {
  margin: 0.55rem 0;
}

.iperf-cli__cmd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  opacity: 0.8;
  margin: 0.3rem 0;
}

.iperf-cli__out {
  max-height: 22rem;
  background: #111827;
  color: #e5e7eb;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
}

.iperf-netctx__actions {
  margin: 0.7rem 0 0;
}

.iperf-netwarn {
  color: #92400e;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}
