:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

body {
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
}

.container {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 20px 40px;
}

h1 {
  margin-bottom: 8px;
}

.upload {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0 24px;
}

button {
  background: #38bdf8;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  background: #0ea5e9;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.alert.error {
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

.summary {
  display: grid;
  gap: 16px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 18px 30px rgba(2, 6, 23, 0.6);
  margin-bottom: 18px;
}

.summary-row {
  display: grid;
  gap: 16px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  overflow-x: auto;
}

.selected-utilization {
  display: contents;
}

.summary-card {
  background: rgba(30, 41, 59, 0.8);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(71, 85, 105, 0.7);
  backdrop-filter: blur(6px);
}

.summary-card.util-card {
  border-color: rgba(56, 189, 248, 0.35);
}

.util-meter {
  --util: 0;
  --util-clamped: clamp(0, var(--util), 1);
  width: 120px;
  height: 64px;
  border-top-left-radius: 120px;
  border-top-right-radius: 120px;
  background:
    conic-gradient(
      from 180deg,
      #64748b 0deg,
      #64748b calc(var(--util-clamped) * 180deg),
      #1e293b 0deg
    );
  margin: 10px 0 12px;
  position: relative;
  display: grid;
  place-items: end center;
  padding-bottom: 6px;
  border: 2px solid rgba(56, 189, 248, 0.35);
  border-bottom: none;
}

.util-meter.danger {
  background:
    conic-gradient(
      from 180deg,
      #f87171 0deg,
      #f87171 calc(var(--util-clamped) * 180deg),
      #1e293b 0deg
    );
  border-color: rgba(248, 113, 113, 0.45);
}

.util-meter.danger::before {
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.9);
}

.util-meter::after {
  content: "";
  position: absolute;
  width: 96px;
  height: 52px;
  background: rgba(15, 23, 42, 0.95);
  border-top-left-radius: 96px;
  border-top-right-radius: 96px;
  bottom: 0;
}

.util-meter::before {
  content: "";
  position: absolute;
  width: 2px;
  height: 46px;
  background: #e2e8f0;
  bottom: 6px;
  left: 50%;
  transform-origin: bottom;
  transform: rotate(calc(var(--util-clamped) * 180deg - 90deg));
  box-shadow: 0 0 6px rgba(148, 163, 184, 0.8);
}

.util-meter span {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  padding-bottom: 2px;
}

.summary-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 6px;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  color: #f8fafc;
}

.summary-sub {
  font-size: 12px;
  color: #cbd5f5;
  margin-top: 4px;
}

.hint {
  color: #fdba74;
}

.table-wrap {
  background: #111827;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.6);
  overflow-x: auto;
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 18px 0 10px;
}

.tab-button {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.tab-button.active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
}

.tab-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tab-button.timeout {
  text-decoration: line-through;
  opacity: 0.7;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid #1f2937;
  text-align: left;
}

th {
  background: #0b1220;
  position: sticky;
  top: 0;
}
