/* Task Manager on-screen cube — always above windows, never in the layout. */

#biostudio-usage-cube {
  position: fixed;
  z-index: 1000050;
  width: 188px;
  height: 338px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 16px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  box-shadow: 0 10px 28px rgb(0 0 0 / 28%);
}

#biostudio-usage-cube.is-hidden,
#biostudio-usage-cube[hidden] {
  display: none;
}

#biostudio-usage-cube.is-dragging {
  cursor: grabbing;
  box-shadow: 0 16px 36px rgb(0 0 0 / 38%);
}

#biostudio-usage-cube.is-hot {
  box-shadow: 0 10px 28px rgb(220 38 38 / 28%);
}

#biostudio-usage-cube .usage-cube-canvas {
  display: block;
  width: 188px;
  height: 338px;
  pointer-events: none;
}

#biostudio-usage-cube .usage-cube-actions {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

#biostudio-usage-cube .usage-cube-check,
#biostudio-usage-cube .usage-cube-race {
  padding: 2px 10px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
  color: #e5e7eb;
  font: 600 10px ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}

#biostudio-usage-cube .usage-cube-check:hover,
#biostudio-usage-cube .usage-cube-race:hover {
  background: rgb(255 255 255 / 20%);
}

#biostudio-usage-cube .usage-cube-check:disabled,
#biostudio-usage-cube .usage-cube-race:disabled {
  opacity: 0.6;
  cursor: progress;
}

#biostudio-usage-proof {
  position: fixed;
  z-index: 1000051;
  width: 300px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgb(134 239 172 / 45%);
  border-radius: 12px;
  background: #141820;
  color: #e5e7eb;
  font: 500 11px/1.45 ui-sans-serif, system-ui, sans-serif;
  box-shadow: 0 10px 28px rgb(0 0 0 / 28%);
}

#biostudio-usage-proof[hidden] {
  display: none;
}

#biostudio-usage-proof.is-bad {
  border-color: rgb(248 113 113 / 60%);
}

#biostudio-usage-proof .usage-proof-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 12px;
  color: #86efac;
}

#biostudio-usage-proof.is-bad .usage-proof-title {
  color: #fca5a5;
}

#biostudio-usage-proof.is-race {
  width: 480px;
  border-color: rgb(196 181 253 / 50%);
}

#biostudio-usage-proof .usage-race-text {
  color: rgb(255 255 255 / 72%);
}

#biostudio-usage-proof .usage-race-table {
  width: 100%;
  margin: 6px 0;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

#biostudio-usage-proof .usage-race-table th,
#biostudio-usage-proof .usage-race-table td {
  padding: 2px 4px;
  text-align: right;
  white-space: nowrap;
}

#biostudio-usage-proof .usage-race-table th:first-child,
#biostudio-usage-proof .usage-race-table td:first-child {
  text-align: left;
  white-space: normal;
}

#biostudio-usage-proof .usage-race-table thead th {
  color: #93c5fd;
  font-weight: 700;
}

#biostudio-usage-proof .usage-race-table thead th:nth-child(3) {
  color: #c4b5fd;
}

#biostudio-usage-proof .usage-race-table thead th:nth-child(4) {
  color: #86efac;
}

#biostudio-usage-proof .usage-race-table .usage-race-sub th {
  color: rgb(255 255 255 / 55%);
  font-size: 10px;
  font-weight: 500;
}

#biostudio-usage-proof .usage-race-table .is-run {
  color: #fbbf24;
}

#biostudio-usage-proof .usage-race-table .is-bad {
  color: #fca5a5;
}

#biostudio-usage-proof .usage-race-table .is-wait {
  color: rgb(255 255 255 / 40%);
}

#biostudio-usage-proof .usage-proof-close {
  border: 0;
  background: none;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.tmgr-cube-btn.on {
  border-color: var(--accent, #2563eb);
  color: var(--accent, #2563eb);
  background: color-mix(in srgb, var(--accent, #2563eb) 12%, transparent);
}
