.upload-mode-toolbar {
  min-height: 56px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.upload-mode-summary,
.upload-mode-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-mode-summary {
  min-width: 260px;
}

.upload-mode-current {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #b8c4d1;
  border-radius: 4px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.upload-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
}

.upload-required-control {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.upload-required-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-required-switch {
  position: relative;
  width: 34px;
  height: 20px;
  border: 1px solid #b8c4d1;
  border-radius: 10px;
  background: #e5e7eb;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.upload-required-switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s ease;
}

.upload-required-control input:checked + .upload-required-switch {
  border-color: var(--primary);
  background: var(--primary);
}

.upload-required-control input:checked + .upload-required-switch i {
  transform: translateX(14px);
}

.upload-required-control input:focus-visible + .upload-required-switch {
  outline: 2px solid rgba(224, 46, 36, 0.35);
  outline-offset: 2px;
}

.upload-mode-option {
  position: relative;
  min-height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line-strong);
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.upload-mode-option:last-child {
  border-right: 0;
}

.upload-mode-option:hover {
  background: #f8fafc;
  color: #111827;
}

.upload-mode-option.active {
  background: var(--primary);
  color: #ffffff;
}

.upload-mode-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-mode-option:has(input:focus-visible) {
  outline: 2px solid rgba(224, 46, 36, 0.35);
  outline-offset: -2px;
}

@media (max-width: 760px) {
  .upload-mode-toolbar,
  .upload-mode-summary,
  .upload-mode-actions {
    align-items: stretch;
  }

  .upload-mode-summary,
  .upload-mode-actions {
    width: 100%;
    justify-content: space-between;
  }

  .upload-mode-switch {
    flex: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-mode-option {
    min-width: 0;
    padding: 0 8px;
  }
}

.ops-disk-card {
  min-height: 184px;
}

.ops-resource-card {
  min-height: 220px;
}

.resource-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.resource-main b {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.resource-main span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.resource-chart {
  --resource-line-color: #d4380d;
  --resource-area-color: rgba(212, 56, 13, 0.14);
  --resource-bg: linear-gradient(180deg, #fff7f0 0%, #ffffff 72%);
  height: 104px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 4px;
  margin: 6px 0 12px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--resource-bg);
  overflow: hidden;
}

.resource-chart.memory {
  --resource-line-color: #1677ff;
  --resource-area-color: rgba(22, 119, 255, 0.13);
  --resource-bg: linear-gradient(180deg, #f0f7ff 0%, #ffffff 72%);
}

.resource-chart svg {
  width: 100%;
  min-width: 0;
  height: 78px;
  display: block;
}

.resource-guide {
  stroke: #f2d6c8;
  stroke-width: 1;
  stroke-dasharray: 4 5;
  vector-effect: non-scaling-stroke;
}

.resource-guide.danger {
  stroke: #f3b7a5;
}

.resource-area {
  fill: var(--resource-area-color);
}

.resource-line {
  fill: none;
  stroke: var(--resource-line-color);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.resource-point {
  fill: #ffffff;
  stroke: var(--resource-line-color);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.resource-chart-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.resource-chart.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

.ops-meter {
  margin-bottom: 14px;
}

.role-tag {
  background: #eef2f6;
  color: #344054;
  border-color: var(--line);
}

.scope-tag {
  background: #ecfeff;
  color: #d4380d;
  border-color: #ffbb96;
  margin: 2px;
}

.permission-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #bae6fd;
  background: #fff7e6;
  border-radius: 8px;
  margin-bottom: 16px;
}

.permission-banner strong {
  display: block;
  color: #075985;
  margin-bottom: 3px;
}

.permission-banner span {
  color: #ad4e00;
  font-size: 13px;
}

.update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #ffd2cc;
  border-radius: 8px;
  background: #fff6f4;
  color: var(--text);
  margin-bottom: 16px;
}

.update-banner strong {
  display: block;
  color: #d4380d;
  margin-bottom: 3px;
}

.update-banner span {
  color: #7a2e12;
  font-size: 13px;
}
