/* Client/src/workroom.css */
.workroom-scrim {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: rgb(0 0 0 / 45%);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fade-in .15s ease-out;
}
.workroom-dialog {
  width: min(760px, 100%);
  height: min(820px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  outline: none;
  animation: pop-in .18s ease-out;
}
.room-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 24px 14px;
}
.room-header > div {
  flex: 1;
  min-width: 0;
}
.room-header small {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-500);
  margin-bottom: 2px;
}
.room-header h2 {
  font-size: 22px;
}
.room-live {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--grey-100);
  color: var(--grey-600);
  font-size: 13px;
  font-weight: 600;
}
.room-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grey-400);
}
.room-live.online {
  background: var(--green-50);
  color: var(--green-700);
}
.room-live.online i {
  background: var(--green-500);
  animation: room-pulse 1.6s ease-in-out infinite;
}
@keyframes room-pulse {
  50% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-500) 25%, transparent);
  }
}
.room-tabs {
  display: flex;
  gap: 4px;
  margin: 0 24px;
  padding: 4px;
  background: var(--grey-100);
  border-radius: 12px;
}
.room-tabs button {
  flex: 1;
  min-height: 38px;
  background: transparent;
  color: var(--grey-600);
  font-size: 14px;
  border-radius: 9px;
}
.room-tabs button:hover {
  background: rgb(255 255 255 / 60%);
}
.room-tabs button[aria-selected=true] {
  background: #fff;
  color: var(--grey-900);
  box-shadow: 0 1px 3px rgb(0 27 55 / 10%);
}
.room-tabs button span {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--blue-500);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.room-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px 24px;
  scrollbar-gutter: stable;
}
.room-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--grey-50);
  margin-bottom: 16px;
}
.room-progress > span {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-500);
}
.room-progress strong {
  display: block;
  margin: 4px 0 12px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--grey-900);
}
.room-progress strong small {
  font-size: 18px;
  font-weight: 600;
  color: var(--grey-500);
}
.room-progress {
  position: relative;
  min-width: 0;
}
.room-progress > em {
  position: absolute;
  right: 0;
  top: 0;
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
  color: var(--grey-700);
}
.room-progress p {
  margin-top: 10px;
  font-size: 13px;
  color: var(--grey-600);
}
.room-counts {
  display: flex;
  gap: 8px;
  margin: 0;
}
.room-counts > div {
  min-width: 84px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}
.room-counts dt {
  font-size: 12px;
  font-weight: 600;
  color: var(--grey-500);
}
.room-counts dd {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--grey-900);
  font-variant-numeric: tabular-nums;
}
.room-stale {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--orange-50);
  color: var(--orange-700);
  font-size: 13px;
  font-weight: 500;
}
.room-group {
  margin-top: 20px;
}
.room-group h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 15px;
}
.room-group h3 span {
  color: var(--blue-500);
}
.room-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.room-worker,
.room-columns {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto 90px;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
}
.room-worker {
  border-bottom: 1px solid var(--grey-100);
}
.room-columns {
  margin-bottom: 8px;
  padding: 0 4px 0 0;
}
.room-columns h3 {
  grid-column: 1 / 3;
  margin: 0;
}
.room-columns button {
  min-height: 28px;
  padding: 2px 0;
  justify-content: flex-end;
  gap: 3px;
  background: transparent;
  color: var(--grey-500);
  font-size: 12px;
}
.room-columns button[aria-pressed=true] {
  color: var(--blue-600);
}
.room-worker:last-child {
  border-bottom: 0;
}
.room-worker > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-500);
}
.room-worker[data-state=waiting] > i {
  background: var(--grey-300);
}
.room-worker[data-state=done] > i {
  background: var(--green-500);
}
.room-worker[data-state=error] > i {
  background: var(--red-500);
}
.room-worker > .fire {
  justify-self: center;
}
.room-worker.burning {
  position: relative;
  isolation: isolate;
}
.room-worker.burning::before {
  content: "";
  position: absolute;
  inset: 3px 0 3px -10px;
  z-index: -1;
  pointer-events: none;
  border-radius: 12px;
  background:
    linear-gradient(
      90deg,
      rgb(255 122 26 / 14%),
      rgb(255 122 26 / 4%) 40%,
      transparent 75%);
  animation: room-heat 2.2s ease-in-out infinite;
}
@keyframes room-heat {
  50% {
    opacity: .45;
  }
}
.room-worker > div {
  min-width: 0;
}
.room-worker p {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 22px;
}
.room-worker p + p {
  gap: 8px;
  font-size: 13px;
  line-height: 18px;
  color: var(--grey-500);
}
.room-worker p > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-worker b {
  font-size: 15px;
  font-weight: 600;
  color: var(--grey-900);
}
.room-stage {
  flex: none;
  max-width: 100%;
  font-weight: 600;
  color: var(--grey-700);
}
.room-worker[data-state=error] .room-stage {
  color: var(--red-500);
}
.room-role {
  flex: none;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--grey-100);
  color: var(--grey-600);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
}
.room-fast {
  flex: none;
  display: inline-flex;
}
.room-fast svg {
  width: 15px;
  height: 15px;
  fill: #ffd43b;
  stroke: #f5a300;
  stroke-width: 1.5;
}
.room-metrics {
  display: grid;
  grid-template-columns: 72px 60px 60px;
  gap: 8px;
  margin: 0;
  text-align: right;
}
.room-metrics > span {
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  color: var(--grey-800);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.room-metrics > span.idle {
  font-size: 13px;
  font-weight: 500;
  color: var(--grey-400);
}
.room-time {
  text-align: right;
  font-size: 12px;
  color: var(--grey-400);
  font-variant-numeric: tabular-nums;
}
.room-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 180px;
  text-align: center;
  color: var(--grey-500);
  font-size: 14px;
}
.room-empty b {
  font-size: 16px;
  color: var(--grey-800);
}
.room-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px 20px;
  font-size: 13px;
  color: var(--grey-500);
}
.session-flow {
  margin-top: 10px;
}
.room-summary > .session-flow {
  grid-column: 1 / -1;
  margin-top: 0;
}
.session-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--grey-600);
}
.session-legend li,
.session-tip span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.session-legend li::before,
.session-tip span::before {
  content: "";
  width: 14px;
  border-top: 2px solid var(--blue-500);
}
.session-legend .using::before,
.session-legend .active::before,
.session-tip .using::before,
.session-tip .active::before {
  width: 12px;
  height: 10px;
  border: 0;
  border-radius: 3px;
  background: var(--blue-100);
}
.session-legend .active::before,
.session-tip .active::before {
  background: var(--orange-100);
}
.session-legend .ram::before,
.session-tip .ram::before {
  border-color: var(--grey-600);
}
.session-legend .limited::before {
  width: 0;
  height: 9px;
  border: 0;
  border-left: 2px solid var(--red-500);
}
.session-legend b {
  color: var(--grey-900);
  font-variant-numeric: tabular-nums;
}
.session-plot {
  position: relative;
  height: 150px;
  touch-action: pan-y;
}
.session-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--grey-500);
  font-size: 13px;
}
.session-plot svg {
  display: block;
  overflow: visible;
}
.session-grid {
  stroke: var(--grey-200);
}
.session-tick {
  fill: var(--grey-400);
  font-size: 11px;
  text-anchor: end;
  font-variant-numeric: tabular-nums;
}
.session-active {
  fill: var(--orange-100);
  fill-opacity: .6;
}
.session-using {
  fill: var(--blue-100);
}
.session-ram {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
}
.session-ram {
  stroke: var(--grey-600);
}
.session-mark {
  stroke: var(--red-500);
}
.session-cursor {
  stroke: var(--grey-500);
}
.session-tip {
  position: absolute;
  top: 0;
  transform: translateX(10px);
  display: grid;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--grey-900);
  color: var(--grey-400);
  font-size: 12px;
  line-height: 1.55;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.session-tip.left {
  transform: translateX(calc(-100% - 10px));
}
.session-tip span::before {
  width: 10px;
  border-top-color: transparent;
}
.session-tip .waiting::before {
  border-color: var(--blue-500);
}
.session-tip .using::before,
.session-tip .active::before {
  width: 10px;
  height: 8px;
  border-radius: 2px;
}
.session-tip b {
  color: #fff;
  font-weight: 700;
}
.session-tip em {
  font-style: normal;
  font-weight: 700;
  color: var(--red-300);
}
.session-tip em.held {
  color: var(--orange-300);
}
.session-axis {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  margin-top: 6px;
  padding: 0 6px 0 30px;
  font-size: 11px;
  color: var(--grey-500);
}
.session-axis span:last-child {
  text-align: right;
}
@media (max-width: 640px) {
  .workroom-scrim {
    padding: 0;
  }
  .workroom-dialog {
    height: 100%;
    border-radius: 0;
  }
  .room-summary {
    grid-template-columns: 1fr;
  }
  .room-worker,
  .room-columns {
    grid-template-columns: 10px minmax(0, 1fr) 78px;
    gap: 6px;
  }
  .room-worker > div:first-of-type {
    grid-column: 2 / -1;
  }
  .room-metrics {
    grid-column: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .room-time {
    grid-column: 3;
  }
}
@media (prefers-reduced-motion: reduce) {
  .room-live.online i,
  .room-worker.burning::before {
    animation: none;
  }
}
