/* Compact workspace overrides, loaded after the current technician theme. */
.dashboard-main {
  gap: 8px;
  padding: 10px 12px;
  min-width: 0;
}

.dashboard-top { gap: 12px; min-width: 0; }
.dashboard-top > div:first-child { min-width: 0; }
.dashboard-top h1 { margin: 0; font-size: 20px; line-height: 1.2; }
.dashboard-top .eyebrow { display: none; }
.dashboard-user { min-width: 0; max-width: 320px; padding: 5px 8px; gap: 8px; border-radius: 6px; }
.dashboard-user > span { width: 28px; height: 28px; flex-shrink: 0; font-size: 11px; }
.dashboard-user > div { min-width: 0; overflow-wrap: anywhere; }
.dashboard-user strong { font-size: 12px; }
.dashboard-user small { font-size: 11px; }

.dashboard-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.dashboard-cards article {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.dashboard-cards span { font-size: 12px; }
.dashboard-cards strong { display: inline; margin: 0; font-size: 13px; }

.workspace-card { border-radius: 0; background: transparent; box-shadow: none; }
.workspace-heading { padding: 7px 12px; align-items: center; gap: 10px; }
.workspace-heading .eyebrow,
.workspace-heading p { display: none; }
.workspace-heading h2 { margin: 0; font-size: 14px; }

.shell { grid-template-columns: 300px minmax(0, 1fr); min-height: calc(100dvh - 130px); }
.side { gap: 8px; padding: 10px; min-width: 0; }
.side .brand { display: flex; justify-content: center; align-items: center; gap: 8px; }
.side .brand-logo { width: 88px; }
.side .brand p { display: none; }
.status-card, .tech-profile { padding: 8px; border-radius: 8px; box-shadow: none; }
.status-card p { font-size: 12px; }
.code-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.tech-profile-fields { min-width: 0; }
.chat-form { grid-template-columns: minmax(0, 1fr) auto; }
.drop-zone { min-height: 88px; padding: 8px; border-radius: 8px; }

.viewer { min-width: 0; padding: 10px; grid-template-rows: auto minmax(0, 1fr); }
.viewer-top { align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 8px; }
.viewer-top > div { min-width: 0; }
.viewer-top .eyebrow { display: none; }
.viewer h2 { margin: 0; font-size: 16px; }
.viewer-actions { flex-wrap: wrap; gap: 6px; }
.viewer-top button:not(.screen-choice), .viewer-top select { min-height: 30px; height: 30px; font-size: 12px; }
.viewer-top p { margin: 2px 0; font-size: 11px; }
.badge { padding: 5px 8px; font-size: 11px; }
.screen-wrap { min-height: 420px; border-radius: 8px; box-shadow: none; }

@media (max-width: 1100px) and (min-width: 821px) {
  .dashboard { grid-template-columns: 160px minmax(0, 1fr); }
  .dashboard-nav { padding: 14px 10px; }
  .dashboard-brand img { max-width: 100%; }
  .shell { grid-template-columns: 260px minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .dashboard-main { padding: 8px; }
  .dashboard-top { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .dashboard-top h1 { font-size: 18px; }
  .dashboard-nav { gap: 8px; padding: 8px 12px; }
  .dashboard-brand img { width: 88px; }
  .dashboard-links { display: flex; flex-wrap: wrap; gap: 4px; }
  .dashboard-links a { min-height: 32px; padding: 0 8px; font-size: 12px; }
  .logout-button { width: auto; margin: 0; min-height: 30px; height: 30px; align-self: flex-start; }
  .shell { grid-template-columns: 1fr; min-height: 0; }
  .viewer { padding: 8px; }
  .screen-wrap { min-height: 320px; height: 60dvh; }
}

/* Keep the original elements available to session scripts without displaying them. */
.dashboard-cards,
.dashboard-user,
.side .brand { display: none; }

.shell { min-height: calc(100dvh - 90px); }
.viewer-top { display: flex; }
.viewer-top > div:first-child { margin-bottom: 0; }
.viewer-actions { flex: 1 1 auto; justify-content: flex-start; }
.connection-quality { width: auto; margin-left: auto; font-size: 11px; }

/* The current viewer has a notice between its toolbar and screen. */
.viewer:has(> .screen-tools-notice) {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.screen-tools-notice { margin: 0 0 6px; font-size: 11px; }

@media (max-width: 820px) {
  .shell { min-height: 0; }
}

/* Give the live workspace the width previously used by global navigation. */
.dashboard { grid-template-columns: minmax(0, 1fr); }
.dashboard-nav { display: none; }

.side .actions { margin-top: 0; gap: 6px; }
.side .file-tools { margin-bottom: 0; }
#pauseControlButton,
#fullscreenPauseButton,
#fullscreenEndButton { display: none !important; }
.viewer-actions #endButton {
  flex: 0 0 auto;
  width: auto;
  min-height: 30px;
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: none;
}

/* Monitor previews are full-height cards rather than compact toolbar buttons. */
.screen-choices {
  width: min(520px, calc(100vw - 32px));
  max-height: min(65dvh, 520px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  overflow-y: auto;
}
.viewer-top .screen-choice {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 8px;
  border-radius: 6px;
  text-align: left;
  box-shadow: none;
}
.screen-choice img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 4px;
}
.screen-choice span {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.4;
}
.viewer-top .screen-choice:disabled { opacity: 1; background: #26344b; }

@media (max-width: 600px) {
  .screen-choices {
    width: min(280px, calc(100vw - 32px));
    grid-template-columns: minmax(0, 1fr);
  }
}
