:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: #f6f8fb;
  background: #070b12;

  font-synthesis: none;

  --page: #070b12;
  --panel: #0c111b;
  --panel-2: #101724;
  --panel-3: #151e2d;
  --line: #202b3d;
  --line-soft: #182235;

  --text: #f6f8fb;
  --muted: #8f9bae;
  --subtle: #667387;

  --preview: #23b8ff;
  --program: #ff4057;
  --good: #37d493;
  --warning: #ffb547;

  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(
      circle at 55% -20%,
      rgba(47, 82, 130, 0.18),
      transparent 42%
    ),
    var(--page);

  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.topbar {
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 22px;

  border-bottom: 1px solid var(--line);

  background:
    rgba(8, 13, 22, 0.94);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border-radius: 9px;

  background: #f4f7fb;
  color: #08101b;

  font-weight: 900;
  font-size: 12px;
  letter-spacing: -0.04em;
}

.brand-name {
  font-size: 14px;
  font-weight: 760;
}

.brand-product {
  margin-top: 1px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;

  color: var(--muted);

  font-size: 12px;
  font-weight: 650;
}

.status-dot,
.source-status-dot {
  width: 8px;
  height: 8px;

  display: inline-block;

  border-radius: 999px;

  background: var(--good);

  box-shadow:
    0 0 0 3px rgba(55, 212, 147, 0.1);
}

.workspace {
  min-height: calc(100vh - 64px);

  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.sidebar {
  min-width: 0;

  border-right: 1px solid var(--line);

  background:
    rgba(10, 15, 24, 0.92);
}

.sidebar-heading {
  padding: 24px 20px 19px;

  border-bottom: 1px solid var(--line-soft);
}

.eyebrow,
.section-label,
.footer-label {
  color: var(--subtle);

  font-size: 9px;
  font-weight: 800;

  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.sidebar h1 {
  margin: 5px 0 0;

  font-size: 18px;
  letter-spacing: -0.02em;
}

.event-context {
  padding: 16px;

  border-bottom: 1px solid var(--line-soft);
}

.active-event-card {
  margin-top: 9px;

  padding: 13px;

  border: 1px solid #27354b;
  border-radius: 11px;

  background: #111a29;
}

.active-event-card.is-empty {
  opacity: 0.72;
}

.active-event-kind {
  color: var(--preview);

  font-size: 9px;
  font-weight: 850;

  letter-spacing: 0.12em;
}

.active-event-name {
  margin-top: 5px;

  font-size: 14px;
  font-weight: 760;
}

.active-event-venue {
  min-height: 28px;

  margin-top: 5px;

  color: var(--muted);

  font-size: 11px;
  line-height: 1.35;
}

.source-line {
  display: flex;
  align-items: center;
  gap: 7px;

  margin-top: 11px;
  padding-top: 10px;

  border-top: 1px solid var(--line);

  color: var(--muted);

  font-size: 10px;
}

.live-source-panel {
  margin-top: 10px;
  padding-top: 10px;

  border-top: 1px solid var(--line);

  font-size: 10px;
}

.live-source-panel-status {
  display: flex;
  align-items: center;
  gap: 6px;

  color: var(--muted);

  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-source-panel-match {
  margin-top: 6px;

  color: var(--text, #e7ecf5);

  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.live-source-panel-meta {
  margin-top: 2px;

  color: var(--muted);

  font-size: 10px;
}

.live-source-court-list {
  display: flex;
  flex-direction: column;
  gap: 4px;

  margin-top: 9px;
}

.live-source-court {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;

  width: 100%;

  padding: 6px 8px;

  border: 1px solid #263b53;
  border-radius: 7px;
  background: #0e1826;

  color: var(--muted);

  font-size: 10px;
  text-align: left;
  cursor: pointer;
}

.live-source-court:hover {
  border-color: #3a5673;
}

.live-source-court.is-source {
  border-color: var(--good);
  background: #0f2419;
  color: #e7ecf5;
}

.live-source-court-name {
  flex: 0 0 auto;
  min-width: 58px;

  font-weight: 700;
}

.live-source-court-summary {
  flex: 1 1 auto;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-source-court-badge {
  flex: 0 0 auto;

  padding: 2px 6px;

  border-radius: 999px;
  background: var(--good);

  color: #07111d;

  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.live-source-select-list {
  display: flex;
  flex-direction: column;
  gap: 10px;

  margin-top: 9px;
}

.live-source-select-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.live-source-select-label {
  color: var(--muted);

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-source-select {
  width: 100%;

  padding: 6px 8px;

  border: 1px solid #263b53;
  border-radius: 7px;
  background: #0e1826;

  color: #e7ecf5;

  font-size: 10px;
}

.live-source-select:hover {
  border-color: #3a5673;
}

.event-browser {
  padding: 17px 14px 28px;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;

  padding: 0 4px 9px;
}

.section-header h2 {
  margin: 3px 0 0;

  font-size: 13px;
  font-weight: 720;
}

.general-heading {
  margin-top: 20px;
}

.icon-button {
  width: 29px;
  height: 29px;

  display: grid;
  place-items: center;

  border: 1px solid var(--line);
  border-radius: 8px;

  background: var(--panel-2);

  cursor: pointer;
}

.icon-button:hover {
  background: var(--panel-3);
}

.event-list {
  display: grid;
  gap: 7px;
}

.event-button,
.loading-card {
  width: 100%;

  padding: 11px 12px;

  text-align: left;

  border: 1px solid var(--line);
  border-radius: 9px;

  background: var(--panel-2);
}

.event-button {
  cursor: pointer;

  transition:
    border-color 120ms ease,
    background 120ms ease,
    transform 120ms ease;
}

.event-button:hover {
  border-color: #344963;
  background: #152034;

  transform: translateY(-1px);
}

.event-button.is-selected {
  border-color: var(--preview);

  background:
    rgba(35, 184, 255, 0.08);
}

.event-button.is-disconnected {
  opacity: 0.5;
  cursor: not-allowed;
}

.event-button-name {
  font-size: 12px;
  font-weight: 720;
}

.event-button-meta {
  display: flex;
  align-items: center;
  gap: 6px;

  margin-top: 5px;

  color: var(--muted);

  font-size: 9px;
}

.event-button-meta .mini-dot {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: var(--good);
}

.is-disconnected .mini-dot {
  background: var(--program);
}

.loading-card {
  color: var(--muted);

  font-size: 11px;
}

.control-room {
  min-width: 0;

  padding: 23px;
}

.control-room-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  margin-bottom: 18px;
}

.control-room-header h2 {
  margin: 4px 0 0;

  font-size: 23px;
  letter-spacing: -0.03em;
}

.control-room-header p {
  margin: 6px 0 0;

  color: var(--muted);

  font-size: 11px;
}

.revision-chip {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 7px 10px;

  border: 1px solid var(--line);
  border-radius: 8px;

  color: var(--subtle);

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.revision-chip strong {
  color: var(--text);
}

.switcher {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    94px
    minmax(0, 1fr);

  gap: 12px;

  align-items: center;
}

.monitor {
  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: var(--radius);

  background: var(--panel);
}

.preview-monitor {
  box-shadow:
    inset 0 2px 0 var(--preview);
}

.program-monitor {
  box-shadow:
    inset 0 2px 0 var(--program);
}

.monitor-header {
  height: 43px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 13px;

  border-bottom: 1px solid var(--line);
}

.monitor-label {
  font-size: 10px;
  font-weight: 900;

  letter-spacing: 0.14em;
}

.preview-label {
  color: var(--preview);
}

.program-label {
  color: var(--program);
}

.monitor-source {
  color: var(--muted);

  font-size: 9px;
  font-weight: 700;
}

.stage {
  position: relative;

  aspect-ratio: 16 / 9;

  display: grid;
  place-items: center;

  overflow: hidden;

  background:
    linear-gradient(
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px
    ),
    #050810;

  background-size:
    40px 40px,
    40px 40px;
}

.stage::after {
  content: "";

  position: absolute;
  inset: 8%;

  border: 1px dashed rgba(255, 255, 255, 0.05);

  pointer-events: none;
}

.stage-empty {
  z-index: 1;

  display: grid;
  justify-items: center;

  color: var(--muted);

  text-align: center;
}

.stage-empty-icon {
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  margin-bottom: 8px;

  border: 1px solid var(--line);
  border-radius: 9px;

  color: var(--subtle);

  font-size: 11px;
  font-weight: 800;
}

.stage-empty strong {
  color: #b5c0cf;

  font-size: 11px;
}

.stage-empty span {
  margin-top: 4px;

  font-size: 9px;
}

.stage-event {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  padding: 7%;

  background:
    radial-gradient(
      circle at 70% 20%,
      rgba(35, 184, 255, 0.17),
      transparent 32%
    ),
    linear-gradient(
      155deg,
      #0c1422,
      #060910 68%
    );
}

.stage-event::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.025)
    );
}

.stage-event-content {
  position: relative;
  z-index: 1;
}

.stage-event-tag {
  color: var(--preview);

  font-size: clamp(7px, 0.55vw, 10px);
  font-weight: 850;

  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.program-monitor .stage-event-tag {
  color: var(--program);
}

.stage-event-name {
  max-width: 84%;

  margin-top: 6px;

  font-size: clamp(14px, 1.7vw, 28px);
  font-weight: 800;
  line-height: 1.05;

  letter-spacing: -0.035em;
}

.stage-event-venue {
  margin-top: 6px;

  color: #9da9ba;

  font-size: clamp(7px, 0.65vw, 11px);
}

.stage-source-badge {
  position: absolute;
  top: 7%;
  right: 7%;

  z-index: 1;

  padding: 5px 7px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;

  color: #a6b2c3;
  background: rgba(0, 0, 0, 0.25);

  font-size: clamp(6px, 0.5vw, 9px);
  font-weight: 700;
}

.take-column {
  display: grid;
  justify-items: center;
  gap: 9px;
}

.take-flow-label {
  color: var(--subtle);

  font-size: 8px;
  font-weight: 800;

  letter-spacing: 0.12em;
}

.take-button {
  width: 82px;
  min-height: 58px;

  display: grid;
  place-items: center;

  padding: 8px;

  border: 1px solid #d8354c;
  border-radius: 10px;

  background:
    linear-gradient(
      180deg,
      #e03b53,
      #b72139
    );

  box-shadow:
    0 8px 20px rgba(192, 30, 54, 0.18);

  cursor: pointer;
}

.take-button span {
  font-size: 14px;
  font-weight: 900;

  letter-spacing: 0.06em;
}

.take-button small {
  display: block;

  margin-top: 2px;

  color: rgba(255, 255, 255, 0.76);

  font-size: 7px;
  font-weight: 750;
}

.take-button:disabled {
  border-color: var(--line);
  background: #131a26;
  box-shadow: none;

  color: var(--subtle);

  cursor: not-allowed;
}

.production-panel {
  margin-top: 18px;

  border: 1px solid var(--line);
  border-radius: var(--radius);

  background: var(--panel);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 16px;

  border-bottom: 1px solid var(--line);
}

.panel-header h3 {
  margin: 4px 0 0;

  font-size: 14px;
}

.workspace-mode {
  padding: 6px 8px;

  border: 1px solid var(--line);
  border-radius: 6px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 800;

  letter-spacing: 0.1em;
}

.workspace-placeholder {
  min-height: 135px;

  display: flex;
  align-items: center;
  gap: 13px;

  padding: 20px;

  color: var(--muted);
}

.placeholder-icon {
  width: 39px;
  height: 39px;

  display: grid;
  place-items: center;

  flex: 0 0 auto;

  border: 1px solid var(--line);
  border-radius: 9px;

  background: var(--panel-2);
}

.workspace-placeholder strong {
  color: #b9c4d3;

  font-size: 11px;
}

.workspace-placeholder p {
  max-width: 560px;

  margin: 4px 0 0;

  font-size: 10px;
  line-height: 1.45;
}

.production-footer {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 8px;

  margin-top: 14px;
}

.production-footer > div {
  padding: 9px 11px;

  border: 1px solid var(--line-soft);
  border-radius: 8px;

  background: rgba(14, 20, 31, 0.62);
}

.production-footer code {
  display: block;

  margin-top: 4px;

  color: #b3c0d1;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;

  font-size: 9px;
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .switcher {
    grid-template-columns: 1fr;
  }

  .take-column {
    grid-template-columns:
      1fr auto 1fr;

    width: 100%;
  }

  .take-flow-label:first-child {
    justify-self: end;
  }

  .take-flow-label:last-child {
    justify-self: start;
  }
}

@media (max-width: 780px) {
  .workspace {
    display: block;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .production-footer {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

/* CourtCast by Ritratto Studio project identity */

.brand-logo {
  width: 36px;
  height: 36px;

  display: block;

  border-radius: 9px;

  object-fit: cover;

  background: #f4f7fb;
}

/* ---------------------------------------------------------
   CourtCast by Ritratto Studio — final header identity
   The supplied logo is rectangular and must not be cropped.
---------------------------------------------------------- */

.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  width: 76px;
  height: 36px;

  display: block;

  flex: 0 0 76px;

  border-radius: 7px;

  object-fit: contain;
  object-position: center;

  background: #ffffff;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;

  min-width: 0;
}

.brand-name {
  color: #f6f8fb;

  font-size: 14px;
  font-weight: 800;

  line-height: 1.05;

  letter-spacing: -0.015em;
}

.brand-product {
  margin-top: 3px;

  color: #8f9bae;

  font-size: 9px;
  font-weight: 700;

  line-height: 1;

  letter-spacing: 0.08em;

  text-transform: none;
}

/* Graphics Editor — shared TEST renderer preview */

.editor-preview-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  padding: 0;
  background:
    linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.035) 25%,
      transparent 25%
    ),
    linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.035) 25%,
      transparent 25%
    ),
    linear-gradient(
      45deg,
      transparent 75%,
      rgba(255, 255, 255, 0.035) 75%
    ),
    linear-gradient(
      -45deg,
      transparent 75%,
      rgba(255, 255, 255, 0.035) 75%
    ),
    #0a0f18;
  background-size: 32px 32px;
  background-position:
    0 0,
    0 16px,
    16px -16px,
    -16px 0;
}

.editor-preview-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  pointer-events: none;
}

/* Producer top navigation */

.producer-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.producer-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #8f9db0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.producer-nav-link:hover {
  color: #ffffff;
  background:
    rgba(
      255,
      255,
      255,
      0.05
    );
  border-color:
    rgba(
      255,
      255,
      255,
      0.08
    );
}

.producer-nav-link.is-active {
  color: #ffffff;
  background: #162131;
  border-color: #2b405b;
}

.producer-page {
  padding: 42px;
}

.producer-page h1 {
  margin:
    8px 0 8px;
  font-size: 32px;
}

.producer-page > p {
  margin: 0;
  color: #8f9db0;
}

.livecam-placeholder {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
  margin-top: 28px;
  padding: 28px;
  border: 1px solid #233249;
  border-radius: 14px;
  background: #0d1624;
}

.livecam-placeholder strong {
  font-size: 20px;
}

.livecam-placeholder span {
  color: #8f9db0;
  line-height: 1.55;
}

.livecam-placeholder code {
  width: fit-content;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #07101b;
  color: #b6c7db;
}

@media (
  max-width: 760px
) {
  .topbar {
    flex-wrap: wrap;
  }

  .producer-nav {
    width: 100%;
    overflow-x: auto;
    padding-top: 8px;
  }

  .producer-nav-link {
    flex: 0 0 auto;
  }
}

.producer-status-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

/* Task 8 — Theme publishing */

.editor-actions {
  display: grid;
  gap: 9px;
}

.editor-publish-button {
  width: 100%;
  min-height: 42px;
  border:
    1px solid #2297c2;
  border-radius: 8px;
  background:
    #1685ad;
  color:
    #ffffff;
  font-weight: 800;
  letter-spacing:
    0.035em;
  cursor: pointer;
}

.editor-publish-button:hover {
  background:
    #1b96c2;
}

.editor-publish-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.editor-publish-status {
  min-height: 18px;
  padding:
    2px 3px;
  color:
    #788aa3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing:
    0.05em;
  text-transform: uppercase;
}


/* =========================================================
   Task 8.1 — Graphics Editor Sidebar
   ========================================================= */

#graphics-editor .workspace {
  grid-template-columns:
    304px minmax(0, 1fr);
}

#graphics-editor .editor-sidebar {
  display: block;
  width: 304px;
  min-width: 304px;
  padding: 18px 16px 24px;
  overflow-y: auto;

  border-right:
    1px solid #223047;

  background:
    #09111d;
}


/* Sections */

#graphics-editor .editor-sidebar
.editor-section {
  display: block;
  margin: 0;
  padding: 0 0 18px;

  border: 0;
}

#graphics-editor .editor-sidebar
.editor-section
+ .editor-section {
  padding-top: 17px;

  border-top:
    1px solid #1c293a;
}

#graphics-editor .editor-sidebar
.section-label {
  display: block;
  margin-bottom: 11px;

  color: #6f8199;

  font-size: 9px;
  font-weight: 800;

  line-height: 1;

  letter-spacing:
    0.16em;
}


/* Fields */

#graphics-editor .editor-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

#graphics-editor .editor-field-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 10px;
}

#graphics-editor .editor-field label {
  display: block;

  margin: 0;

  color: #aab6c7;

  font-size: 11px;
  font-weight: 700;

  line-height: 1.2;
}


/* Inputs */

#graphics-editor .editor-field
input[type="number"] {
  display: block;

  box-sizing: border-box;

  width: 100%;
  min-width: 0;
  height: 38px;

  margin: 0;
  padding: 0 10px;

  border:
    1px solid #2a3a50;

  border-radius: 8px;

  outline: none;

  background:
    #101a28;

  color: #f2f6fb;

  font: inherit;

  font-size: 13px;
  font-weight: 750;

  transition:
    border-color 120ms ease,
    background 120ms ease,
    box-shadow 120ms ease;
}

#graphics-editor .editor-field
input[type="number"]:focus {
  border-color:
    #269ac5;

  background:
    #121e2e;

  box-shadow:
    0 0 0 2px
    rgba(38, 154, 197, 0.12);
}


/* Color control */

#graphics-editor .editor-color-control {
  display: flex;
  align-items: center;

  height: 42px;

  padding: 0 9px;

  gap: 10px;

  box-sizing: border-box;

  border:
    1px solid #2a3a50;

  border-radius: 9px;

  background:
    #101a28;
}

#graphics-editor .editor-color-control
input[type="color"] {
  flex: 0 0 36px;

  width: 36px;
  height: 26px;

  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 6px;

  background: none;

  cursor: pointer;
}

#graphics-editor .editor-color-control span {
  overflow: hidden;

  color: #8392a7;

  font-size: 11px;
  font-weight: 650;

  white-space: nowrap;
  text-overflow: ellipsis;
}


/* Input units */

#graphics-editor .editor-input-unit {
  position: relative;
}

#graphics-editor .editor-input-unit input {
  padding-right: 32px;
}

#graphics-editor .editor-input-unit span {
  position: absolute;

  top: 50%;
  right: 8px;

  transform:
    translateY(-50%);

  color: #697b91;

  font-size: 9px;
  font-weight: 800;

  pointer-events: none;
}


/* Action area */

#graphics-editor .editor-actions {
  display: grid;

  gap: 8px;

  padding-top: 18px;

  border-top:
    1px solid #1c293a;
}

#graphics-editor .editor-publish-button {
  width: 100%;
  height: 44px;

  border:
    1px solid #259ecb;

  border-radius: 9px;

  background:
    #168ab4;

  color: #ffffff;

  font-size: 12px;
  font-weight: 850;

  letter-spacing:
    0.035em;

  cursor: pointer;

  transition:
    background 120ms ease,
    transform 80ms ease;
}

#graphics-editor .editor-publish-button:hover {
  background:
    #1c9ac7;
}

#graphics-editor .editor-publish-button:active {
  transform:
    translateY(1px);
}


/* Reset */

#graphics-editor .editor-reset-button {
  width: 100%;
  height: 36px;

  border:
    1px solid #26364b;

  border-radius: 8px;

  background:
    #111a27;

  color:
    #91a0b3;

  font-size: 11px;
  font-weight: 700;

  cursor: pointer;
}

#graphics-editor .editor-reset-button:hover {
  color:
    #ffffff;

  border-color:
    #334963;
}


/* Draft / publish state */

#graphics-editor .editor-status-card {
  display: grid;

  grid-template-columns:
    8px minmax(0, 1fr);

  align-items: start;

  gap: 9px;

  margin-top: 5px;
  padding: 11px;

  border:
    1px solid #213047;

  border-radius: 9px;

  background:
    #0d1623;
}

#graphics-editor .editor-status-dot {
  width: 7px;
  height: 7px;

  margin-top: 3px;

  border-radius: 50%;

  background:
    #d79232;

  box-shadow:
    0 0 0 3px
    rgba(215, 146, 50, 0.08);
}

#graphics-editor
.editor-publish-status {
  display: block;

  min-height: 0;
  padding: 0;

  color:
    #c1ccda;

  font-size: 9px;
  font-weight: 800;

  line-height: 1.25;

  letter-spacing:
    0.06em;

  text-transform:
    uppercase;
}

#graphics-editor
.editor-status-card small {
  display: block;

  margin-top: 3px;

  color:
    #64758b;

  font-size: 9px;

  line-height: 1.35;
}


/* Keep preview workspace clean */

#graphics-editor .control-room {
  min-width: 0;
}

#graphics-editor
.editor-preview-stage {
  margin-top: 0;
}


/* Smaller window fallback */

@media (max-width: 900px) {
  #graphics-editor .workspace {
    grid-template-columns:
      270px minmax(0, 1fr);
  }

  #graphics-editor .editor-sidebar {
    width: 270px;
    min-width: 270px;
  }
}


/* =========================================================
   Task 9 — Diagnostics
   ========================================================= */

.diagnostics-workspace {
  display: grid;

  grid-template-columns:
    304px minmax(0, 1fr);

  min-height:
    calc(100vh - 64px);
}

.diagnostics-sidebar {
  box-sizing: border-box;

  width: 304px;
  min-width: 304px;

  padding:
    18px 16px 24px;

  border-right:
    1px solid #223047;

  background:
    #09111d;
}

.diagnostics-side-section {
  padding:
    0 0 18px;
}

.diagnostics-side-section
+ .diagnostics-side-section {
  padding-top:
    17px;

  border-top:
    1px solid #1c293a;
}

.diagnostics-overall-card {
  display: grid;

  grid-template-columns:
    10px minmax(0, 1fr);

  gap: 10px;

  align-items: start;

  padding: 13px;

  border:
    1px solid #26364b;

  border-radius: 10px;

  background:
    #0f1927;
}

.diagnostics-overall-card strong {
  display: block;

  color: #f1f5fa;

  font-size: 12px;
}

.diagnostics-overall-card small {
  display: block;

  margin-top: 4px;

  color: #718298;

  font-size: 9px;
}

.diagnostics-summary-grid {
  display: grid;

  gap: 7px;
}

.diagnostics-summary-item {
  display: grid;

  grid-template-columns:
    9px minmax(0, 1fr);

  gap: 9px;

  align-items: center;

  padding:
    9px 10px;

  border:
    1px solid #213047;

  border-radius: 8px;

  background:
    #0d1623;
}

.diagnostics-summary-item strong {
  display: inline-block;

  min-width: 20px;

  color:
    #e9eef5;

  font-size:
    13px;
}

.diagnostics-summary-item small {
  margin-left: 5px;

  color:
    #7e8da1;

  font-size:
    10px;
}

.diagnostics-key {
  display: grid;

  gap: 10px;
}

.diagnostics-key > div {
  display: flex;

  align-items: center;

  gap: 8px;

  color:
    #91a0b4;

  font-size:
    10px;
}

.health-dot {
  display:
    inline-block;

  flex:
    0 0 auto;

  width:
    8px;

  height:
    8px;

  border-radius:
    50%;

  background:
    #617084;
}

.health-dot.healthy,
[data-level="healthy"]
> .health-dot {
  background:
    #30bd8a;

  box-shadow:
    0 0 0 3px
    rgba(48, 189, 138, 0.09);
}

.health-dot.degraded,
[data-level="degraded"]
> .health-dot {
  background:
    #e4a13a;

  box-shadow:
    0 0 0 3px
    rgba(228, 161, 58, 0.09);
}

.health-dot.unavailable,
[data-level="unavailable"]
> .health-dot {
  background:
    #df5656;

  box-shadow:
    0 0 0 3px
    rgba(223, 86, 86, 0.09);
}

.diagnostics-side-actions {
  display:
    grid;

  gap:
    9px;

  padding-top:
    18px;

  border-top:
    1px solid #1c293a;
}

.diagnostics-refresh-button {
  height:
    42px;

  border:
    1px solid #2c435e;

  border-radius:
    9px;

  background:
    #152235;

  color:
    #dce5ef;

  font-size:
    11px;

  font-weight:
    800;

  cursor:
    pointer;
}

.diagnostics-refresh-button:hover {
  background:
    #1a2a40;
}

.diagnostics-refresh-button:disabled {
  opacity:
    0.55;

  cursor:
    wait;
}

.diagnostics-last-check-card {
  padding:
    11px;

  border:
    1px solid #213047;

  border-radius:
    9px;

  background:
    #0d1623;
}

.diagnostics-last-check-card span,
.diagnostics-last-check-card small {
  display:
    block;
}

.diagnostics-last-check-card span {
  color:
    #65778e;

  font-size:
    8px;

  font-weight:
    800;

  letter-spacing:
    0.12em;
}

.diagnostics-last-check-card strong {
  display:
    block;

  margin-top:
    4px;

  color:
    #c6d1df;

  font-size:
    11px;
}

.diagnostics-last-check-card small {
  margin-top:
    4px;

  color:
    #64758b;

  font-size:
    9px;
}

.diagnostics-main {
  min-width:
    0;

  padding:
    30px;
}

.diagnostics-main-header {
  margin-bottom:
    28px;
}

.diagnostics-main-header h1 {
  margin:
    6px 0 7px;

  font-size:
    30px;
}

.diagnostics-main-header p {
  max-width:
    640px;

  margin:
    0;

  color:
    #8291a6;

  font-size:
    12px;

  line-height:
    1.55;
}

.diagnostics-group {
  margin-bottom:
    30px;
}

.diagnostics-group-header {
  display:
    flex;

  align-items:
    flex-end;

  justify-content:
    space-between;

  margin-bottom:
    12px;
}

.diagnostics-group-header h2 {
  margin:
    5px 0 0;

  font-size:
    15px;
}

.diagnostics-card-grid {
  display:
    grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(260px, 1fr)
    );

  gap:
    11px;
}

.diagnostic-card {
  min-width:
    0;

  padding:
    14px;

  border:
    1px solid #233249;

  border-radius:
    11px;

  background:
    #0d1624;
}

.diagnostic-card[data-level="healthy"] {
  border-color:
    #254339;
}

.diagnostic-card[data-level="degraded"] {
  border-color:
    #514027;
}

.diagnostic-card[data-level="unavailable"] {
  border-color:
    #4c2d33;
}

.diagnostic-card-header {
  display:
    flex;

  align-items:
    flex-start;

  justify-content:
    space-between;

  gap:
    12px;
}

.diagnostic-card-title {
  display:
    grid;

  grid-template-columns:
    9px minmax(0, 1fr);

  align-items:
    start;

  gap:
    9px;
}

.diagnostic-card-title
.health-dot {
  margin-top:
    4px;
}

.diagnostic-card-title strong {
  display:
    block;

  color:
    #eff4fa;

  font-size:
    12px;
}

.diagnostic-card-title small {
  display:
    block;

  margin-top:
    3px;

  color:
    #6d7e94;

  font-size:
    9px;

  text-transform:
    uppercase;

  letter-spacing:
    0.06em;
}

.diagnostic-response {
  flex:
    0 0 auto;

  padding:
    4px 6px;

  border:
    1px solid #25364c;

  border-radius:
    6px;

  background:
    #101b2a;

  color:
    #788ba3;

  font-size:
    9px;

  font-weight:
    700;
}

.diagnostic-status {
  margin-top:
    14px;

  color:
    #b9c6d5;

  font-size:
    11px;

  font-weight:
    700;
}

.diagnostic-detail {
  min-height:
    30px;

  margin-top:
    4px;

  color:
    #718197;

  font-size:
    10px;

  line-height:
    1.45;
}

.diagnostic-meta {
  display:
    grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap:
    8px;

  margin-top:
    13px;
}

.diagnostic-meta > div {
  padding:
    8px;

  border:
    1px solid #1d2b3e;

  border-radius:
    7px;

  background:
    #0a1320;
}

.diagnostic-meta span,
.diagnostic-meta strong {
  display:
    block;
}

.diagnostic-meta span {
  color:
    #5e7087;

  font-size:
    7px;

  font-weight:
    800;

  letter-spacing:
    0.1em;
}

.diagnostic-meta strong {
  margin-top:
    3px;

  color:
    #9dacbe;

  font-size:
    9px;
}

.diagnostic-endpoint {
  overflow:
    hidden;

  margin-top:
    8px;

  color:
    #566a83;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;

  font-size:
    8px;

  white-space:
    nowrap;

  text-overflow:
    ellipsis;
}

@media (max-width: 900px) {
  .diagnostics-workspace {
    grid-template-columns:
      270px minmax(0, 1fr);
  }

  .diagnostics-sidebar {
    width:
      270px;

    min-width:
      270px;
  }
}

/* Task 9A */

#diagnostics-services,
#diagnostics-sources {
  display: none;
}

.diagnostics-main
> .diagnostics-group {
  display: none;
}

.health-dot.idle {
  background: #738196;
  box-shadow:
    0 0 0 3px
    rgba(115, 129, 150, 0.09);
}

.diagnostic-field-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 13px;
}

.diagnostic-field {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #1d2b3e;
  border-radius: 7px;
  background: #0a1320;
}

.diagnostic-field span,
.diagnostic-field strong {
  display: block;
}

.diagnostic-field span {
  overflow: hidden;
  color: #5e7087;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diagnostic-field strong {
  overflow-wrap: anywhere;
  margin-top: 4px;
  color: #9dacbe;
  font-size: 9px;
}

.diagnostic-field
strong[data-field-state="ok"] {
  color: #65cca6;
}

.diagnostic-field
strong[data-field-state="warning"] {
  color: #e0a751;
}

.diagnostic-field
strong[data-field-state="error"] {
  color: #e57979;
}

.diagnostic-failure {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #57363b;
  border-radius: 8px;
  background: #1a1118;
}

.diagnostic-failure > strong {
  color: #e57878;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.diagnostic-failure p {
  margin: 6px 0 9px;
  color: #c4a2a7;
  font-size: 10px;
  line-height: 1.45;
}

.diagnostic-failure > div {
  margin-top: 6px;
}

.diagnostic-failure span,
.diagnostic-failure b {
  display: block;
}

.diagnostic-failure span {
  color: #715f69;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diagnostic-failure b {
  margin-top: 2px;
  color: #ba9ca3;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.4;
}

.diagnostic-card[data-level="idle"] {
  border-color: #2c3542;
  opacity: 0.88;
}

@media (min-width: 1350px) {
  .diagnostics-card-grid {
    grid-template-columns:
      repeat(3, minmax(250px, 1fr));
  }
}


/* =========================================================
   Unified Overlay — Live Cam
   ========================================================= */

.livecam-workspace {
  display: grid;
  grid-template-columns:
    304px minmax(0, 1fr);
  min-height:
    calc(100vh - 64px);
}

.livecam-sidebar {
  box-sizing: border-box;
  width: 304px;
  min-width: 304px;
  padding: 18px 16px 24px;
  border-right:
    1px solid #223047;
  background: #09111d;
}

.livecam-side-section {
  padding: 0 0 18px;
}

.livecam-side-section
+ .livecam-side-section {
  padding-top: 17px;
  border-top:
    1px solid #1c293a;
}

.livecam-mode-switch {
  display: grid;
  grid-template-columns:
    1fr 1fr;
  gap: 7px;
}

.livecam-mode-switch button {
  height: 39px;
  border:
    1px solid #29394e;
  border-radius: 8px;
  background: #101a28;
  color: #77889d;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.livecam-mode-switch
button.is-active {
  border-color: #278db3;
  background: #143247;
  color: #ffffff;
}

.livecam-mode-detail {
  margin-top: 7px;
  color: #667991;
  font-size: 9px;
  text-align: center;
}

.livecam-summary-grid {
  display: grid;
  gap: 7px;
}

.livecam-summary-item {
  display: grid;
  grid-template-columns:
    9px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border:
    1px solid #213047;
  border-radius: 8px;
  background: #0d1623;
}

.livecam-summary-item strong {
  color: #e9eef5;
  font-size: 13px;
}

.livecam-summary-item small {
  margin-left: 5px;
  color: #7e8da1;
  font-size: 10px;
}

.livecam-status-key {
  display: grid;
  gap: 10px;
}

.livecam-status-key > div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #91a0b4;
  font-size: 10px;
}

.source-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.source-dot.available {
  background: #30bd8a;
  box-shadow:
    0 0 0 3px
    rgba(48, 189, 138, 0.09);
}

.source-dot.waiting {
  background: #e5a139;
  box-shadow:
    0 0 0 3px
    rgba(229, 161, 57, 0.09);
}

.source-dot.unavailable {
  background: #df5656;
  box-shadow:
    0 0 0 3px
    rgba(223, 86, 86, 0.09);
}

.livecam-side-actions {
  display: grid;
  gap: 9px;
  padding-top: 18px;
  border-top:
    1px solid #1c293a;
}

.livecam-refresh-button {
  height: 42px;
  border:
    1px solid #2c435e;
  border-radius: 9px;
  background: #152235;
  color: #dce5ef;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.livecam-refresh-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.livecam-readonly-card {
  padding: 11px;
  border:
    1px solid #213047;
  border-radius: 9px;
  background: #0d1623;
}

.livecam-readonly-card
strong,
.livecam-readonly-card
span,
.livecam-readonly-card
small {
  display: block;
}

.livecam-readonly-card strong {
  color: #63768e;
  font-size: 8px;
  letter-spacing: 0.11em;
}

.livecam-readonly-card span {
  margin-top: 4px;
  color: #b5c0ce;
  font-size: 11px;
  font-weight: 750;
}

.livecam-readonly-card small {
  margin-top: 4px;
  color: #64758b;
  font-size: 9px;
  line-height: 1.4;
}

.livecam-main {
  min-width: 0;
  padding: 30px;
}

.livecam-main-header {
  margin-bottom: 27px;
}

.livecam-main-header h1 {
  margin: 6px 0 7px;
  font-size: 30px;
}

.livecam-main-header p {
  margin: 0;
  color: #8291a6;
  font-size: 12px;
}

.livecam-preview-section,
.livecam-source-section {
  margin-bottom: 28px;
}

.livecam-section-header {
  display: flex;
  align-items: flex-end;
  justify-content:
    space-between;
  gap: 18px;
  margin-bottom: 11px;
}

.livecam-section-header h2 {
  margin: 5px 0 0;
  font-size: 15px;
}

.livecam-section-status,
.livecam-preview-meta {
  color: #6e8097;
  font-size: 9px;
}

.livecam-preview-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  border:
    1px solid #233249;
  border-radius: 12px;
  background:
    #050a11;
}

.livecam-preview-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000000;
}

.livecam-preview-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #60738c;
}

.livecam-preview-empty strong {
  color: #8b9aaf;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.livecam-preview-empty span {
  font-size: 10px;
}

.livecam-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 9px;
}

.livecam-secondary-button,
.livecam-take-button {
  min-width: 132px;
  height: 38px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.livecam-secondary-button {
  border:
    1px solid #2a3b51;
  background: #111b29;
  color: #98a6b8;
}

.livecam-take-button {
  border:
    1px solid #259ecb;
  background: #178aaf;
  color: #ffffff;
}

.livecam-take-button:disabled,
.livecam-secondary-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.livecam-source-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.livecam-source-card {
  min-width: 0;
  padding: 13px;
  border:
    1px solid #26354a;
  border-radius: 11px;
  background: #0d1624;
}

.livecam-source-card[
  data-status="available"
] {
  border-color: #25483b;
}

.livecam-source-card[
  data-status="waiting"
] {
  border-color: #554125;
}

.livecam-source-card[
  data-status="unavailable"
] {
  border-color: #4c2d33;
}

.livecam-source-card-header {
  display: flex;
  align-items: flex-start;
  justify-content:
    space-between;
  gap: 10px;
}

.livecam-source-card-header
strong {
  display: block;
  color: #eef3f9;
  font-size: 13px;
}

.livecam-source-card-header
small {
  display: block;
  margin-top: 3px;
  color: #65778e;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.livecam-source-status {
  margin-top: 13px;
  color: #b9c6d5;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.055em;
}

.livecam-source-detail {
  min-height: 28px;
  margin-top: 4px;
  color: #718197;
  font-size: 9px;
  line-height: 1.4;
}

.livecam-telemetry {
  margin-top: 9px;
  padding: 8px;
  border:
    1px solid #1d2b3e;
  border-radius: 7px;
  background: #09121e;
  color: #89a1b9;
  font-size: 9px;
  line-height: 1.45;
}

.livecam-source-actions {
  display: grid;
  grid-template-columns:
    1fr 1fr;
  gap: 7px;
  margin-top: 11px;
}

.livecam-source-actions
button {
  height: 34px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
}

.livecam-preview-button {
  border:
    1px solid #2a8eb3;
  background: #14364a;
  color: #bfe8f6;
  cursor: pointer;
}

.livecam-take-card-button {
  border:
    1px solid #2d394a;
  background: #111923;
  color: #66758a;
}

.livecam-source-actions
button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

@media (
  max-width: 1050px
) {
  .livecam-source-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }
}

@media (
  max-width: 760px
) {
  .livecam-workspace {
    display: block;
  }

  .livecam-sidebar {
    width: 100%;
    min-width: 0;
    border-right: 0;
    border-bottom:
      1px solid #223047;
  }

  .livecam-main {
    padding: 18px 12px 28px;
  }

  /*
    Locked compact mobile layout:
    CH1 CH2
    CH3 CH4
    CH5
  */
  .livecam-source-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .livecam-source-card {
    padding: 10px;
  }

  .livecam-source-actions {
    grid-template-columns:
      1fr;
  }

  .livecam-preview-actions {
    display: grid;
    grid-template-columns:
      1fr 1fr;
  }
}


/* =========================================================
   Live Cam — Source Navigation + Header Status
   ========================================================= */

.livecam-source-navigation {
  display: grid;
  gap: 8px;
}

.livecam-source-nav-button {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) 9px;

  align-items: center;
  gap: 9px;

  width: 100%;

  padding: 11px;

  border:
    1px solid #213047;

  border-radius: 9px;

  background:
    #0d1623;

  text-align: left;

  cursor: pointer;

  transition:
    border-color 120ms ease,
    background 120ms ease;
}

.livecam-source-nav-button:hover {
  border-color:
    #30445f;

  background:
    #101b2a;
}

.livecam-source-nav-button.is-active {
  border-color:
    #2a5871;

  background:
    #102334;
}

.livecam-source-nav-button
strong {
  display: block;

  color:
    #dbe4ef;

  font-size:
    11px;

  font-weight:
    800;
}

.livecam-source-nav-button
small {
  display: block;

  margin-top:
    3px;

  color:
    #697b92;

  font-size:
    8px;

  font-weight:
    650;
}


/* Main heading + source status */

.livecam-main-header {
  display: flex;

  align-items:
    flex-end;

  justify-content:
    space-between;

  gap:
    28px;
}

.livecam-main-heading {
  min-width: 0;
}

.livecam-header-status {
  flex:
    0 0 auto;

  min-width:
    315px;
}

.livecam-header-status
.section-label {
  margin-bottom:
    8px;

  text-align:
    right;
}

.livecam-header-status-grid {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(90px, 1fr)
    );

  gap:
    7px;
}

.livecam-header-status-item {
  display: grid;

  grid-template-columns:
    8px auto;

  grid-template-areas:
    "dot count"
    "dot label";

  column-gap:
    7px;

  align-items:
    center;

  padding:
    8px 10px;

  border:
    1px solid #213047;

  border-radius:
    8px;

  background:
    #0d1623;
}

.livecam-header-status-item
.source-dot {
  grid-area:
    dot;
}

.livecam-header-status-item
strong {
  grid-area:
    count;

  color:
    #e9eef5;

  font-size:
    13px;

  line-height:
    1;
}

.livecam-header-status-item
small {
  grid-area:
    label;

  margin-top:
    2px;

  color:
    #718298;

  font-size:
    8px;

  line-height:
    1;
}


/* Section navigation target spacing */

#livecam-browser-section,
#livecam-mediamtx-section {
  scroll-margin-top:
    84px;
}


@media (
  max-width: 1050px
) {
  .livecam-main-header {
    align-items:
      flex-start;

    flex-direction:
      column;
  }

  .livecam-header-status {
    width: 100%;
    min-width: 0;
  }

  .livecam-header-status
  .section-label {
    text-align:
      left;
  }
}


@media (
  max-width: 760px
) {
  .livecam-header-status-grid {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

  .livecam-header-status-item {
    padding:
      8px 6px;
  }
}


/* =========================================================
   Official CourtCast header identity
   Transparent lockup directly on dark producer top bar
   ========================================================= */

.topbar .brand-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  width: auto;
  min-width: 0;

  padding: 0;
  margin: 0;

  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.topbar .brand-logo {
  display: block;

  width: auto;
  height: 44px;
  max-width: 270px;

  padding: 0;
  margin: 0;

  object-fit: contain;
  object-position: left center;

  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}


/* =========================================================
   CourtCast producer header — transparent logo treatment
   ========================================================= */

.topbar .brand-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  width: auto;
  min-width: 0;

  padding: 0 !important;
  margin: 0;

  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

.topbar .brand-logo {
  display: block;

  width: auto;
  height: 48px;
  max-width: 285px;

  padding: 0 !important;
  margin: 0;

  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;

  object-fit: contain;
  object-position: left center;
}

/* Stage 2 — server-backed Published Graphics package */
.graphics-package {
  width: 100%;
  box-sizing: border-box;
  padding: 22px;
  border: 1px solid rgba(0, 180, 255, .28);
  border-radius: 12px;
  background: rgba(10, 26, 47, .58);
}

.graphics-package__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.graphics-package__header > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.graphics-package__eyebrow,
.graphics-package__grid span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--muted);
}

.graphics-package__header strong {
  font-size: 17px;
}

.graphics-package__status {
  padding: 7px 11px;
  border: 1px solid rgba(138, 169, 199, .35);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.graphics-package__status--ready {
  border-color: rgba(0, 229, 255, .55);
  color: #00E5FF;
}

.graphics-package__grid {
  display: grid;
  grid-template-columns: 110px 110px 110px minmax(220px, 1fr);
  gap: 12px;
}

.graphics-package__grid > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(138, 169, 199, .16);
  border-radius: 9px;
  background: rgba(17, 42, 69, .48);
}

.graphics-package__grid strong,
.graphics-package__grid code {
  display: block;
  margin-top: 7px;
  color: #fff;
}

.graphics-package__grid strong {
  font-size: 20px;
}

.graphics-package__program code {
  overflow-wrap: anywhere;
  color: #00E5FF;
}

.graphics-package__footer {
  margin-top: 15px;
  font-size: 11px;
  color: var(--muted);
}

.graphics-package--error {
  border-color: rgba(255, 83, 83, .45);
}

@media (max-width: 980px) {
  .graphics-package__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .graphics-package__program {
    grid-column: 1 / -1;
  }
}

/* Event Workspace published-graphics status */
.workspace-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.workspace-graphics-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.workspace-status-item,
.workspace-status-program,
.workspace-status-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
  color: var(--muted);
}

.workspace-status-item--ready {
  color: #FFFFFF;
}

.workspace-status-program {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #00E5FF;
  letter-spacing: .02em;
}

.workspace-status-time {
  opacity: .8;
}

.workspace-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
}

.workspace-status-dot--ready {
  background: var(--good);
  box-shadow: 0 0 7px var(--good);
}

.workspace-status-dot--waiting {
  background: #F5A623;
  box-shadow: 0 0 6px rgba(245,166,35,.45);
}

.workspace-status-dot--unavailable {
  background: var(--program);
}

.workspace-rundown-placeholder {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 110px;
  text-align: left;
}

@media (max-width: 1180px) {
  .workspace-header-right {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 7px;
  }

  .workspace-graphics-status {
    flex-wrap: wrap;
  }
}

/* Control Room graphics rundown */
.graphics-rundown {
  width: 100%;
  padding: 18px 20px 20px;
  box-sizing: border-box;
}

.graphics-rundown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.graphics-rundown-header > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.graphics-rundown-header strong {
  font-size: 14px;
}

.graphics-rundown-count {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--muted);
}

.graphics-rundown-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.graphics-rundown-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 13px;
  border: 1px solid rgba(138,169,199,.16);
  border-radius: 9px;
  background: rgba(17,42,69,.34);
}

.graphics-rundown-row--disabled {
  opacity: .48;
}

.graphics-rundown-order {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted);
}

.graphics-rundown-main {
  min-width: 0;
}

.graphics-rundown-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.graphics-rundown-meta {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--muted);
}

.graphics-rundown-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .10em;
  color: var(--muted);
}

.graphics-rundown-state--ready {
  color: #FFFFFF;
}

/* Compact Control Room production layout */
.graphics-workspace-header {
  display: none !important;
}

#control-room-subtitle + .workspace-graphics-status {
  margin-top: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 11px;
}

.production-panel:has(#workspace-content) {
  overflow: hidden;
}

#workspace-content {
  padding: 0;
}

.graphics-rundown {
  width: 100%;
  padding: 18px 20px 20px;
  box-sizing: border-box;
}

.graphics-rundown-header {
  margin-bottom: 12px;
}

.graphics-rundown-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(76px, auto);
  gap: 10px;
}

.graphics-rundown-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 2px 10px;
  min-width: 0;
  min-height: 76px;
  padding: 11px 12px;
  box-sizing: border-box;
}

.graphics-rundown-order {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
}

.graphics-rundown-main {
  grid-column: 2;
  grid-row: 1;
}

.graphics-rundown-state {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  margin-top: 5px;
}

.graphics-rundown-meta {
  flex-wrap: wrap;
  gap: 4px 8px;
}

@media (max-width: 1050px) {
  .graphics-rundown-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .graphics-rundown-list {
    grid-template-columns: 1fr;
  }
}

/* Top-right Production Package Status */
.production-package-status {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 230px;
}

.production-package-status .workspace-graphics-status {
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 5px;
}

.package-program-id {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .025em;
  color: #00E5FF;
}

.package-ready-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
}

.package-count-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .10em;
  color: var(--muted);
}

.production-package-status .workspace-status-program,
.production-package-status .workspace-status-time {
  display: none;
}

@media (max-width: 900px) {
  .production-package-status {
    min-width: 0;
  }

  .package-program-id {
    max-width: 190px;
  }
}

/* Graphics playout controls */
.graphics-playout-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(138,169,199,.16);
  border-radius: 9px;
  background: rgba(10,26,47,.42);
}

.graphics-playout-selection {
  min-width: 0;
}

.graphics-playout-selection strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graphics-playout-actions {
  display: flex;
  gap: 8px;
}

.graphics-playout-button {
  min-width: 72px;
  padding: 8px 12px;
  border: 1px solid rgba(138,169,199,.28);
  border-radius: 7px;
  background: rgba(17,42,69,.7);
  color: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
}

.graphics-playout-button--take {
  border-color: rgba(0,180,255,.55);
}

.graphics-playout-button:disabled {
  opacity: .35;
  cursor: default;
}

.graphics-rundown-row[data-graphics-enabled="true"] {
  cursor: pointer;
}

.graphics-rundown-row[data-graphics-enabled="true"]:hover {
  border-color: rgba(0,180,255,.46);
}

.graphics-rundown-row.is-cued {
  border-color: #00B4FF;
  box-shadow: inset 0 0 0 1px rgba(0,180,255,.18);
}

.graphics-rundown-row.is-on-air {
  border-color: #ff315b;
  box-shadow: inset 0 0 0 1px rgba(255,49,91,.22);
}

/* OBS-style Control Room output monitors */
.stage-output-monitor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: transparent;
}

.stage-output-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.emergency-clear-button {
  border-color: rgba(255,49,91,.48) !important;
  color: #ff5574 !important;
  background: rgba(255,49,91,.08) !important;
  cursor: pointer;
}

.emergency-clear-button:hover {
  border-color: #ff315b !important;
  background: rgba(255,49,91,.16) !important;
}

.emergency-clear-button:disabled {
  opacity: .45;
  cursor: default;
}

/* Editor-matched transparency simulation for Control Room monitors only */
.stage-output-monitor--preview,
.stage-output-monitor--program {
  background-color: #0e1218;
  background-image:
    linear-gradient(45deg, #171d25 25%, transparent 25%, transparent 75%, #171d25 75%),
    linear-gradient(45deg, #171d25 25%, transparent 25%, transparent 75%, #171d25 75%);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}

.stage-output-monitor--preview .stage-output-frame,
.stage-output-monitor--program .stage-output-frame {
  background: transparent !important;
}
