:root {
  --bg: #080909;
  --panel: #17191b;
  --panel-soft: #202327;
  --panel-hard: #0c0d0f;
  --line: #363b42;
  --text: #edf2f7;
  --muted: #8d98a6;
  --blue: #0a84d6;
  --blue-soft: #12395a;
  --green: #4eb033;
  --red: #c8323a;
  --amber: #d39a28;
  --button: #2d3137;
  --button-hi: #3c424a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@font-face {
  font-family: GothamSariegoLogin;
  font-weight: 400;
  src: url("../../layouts/sariego/assets/fonts/Gotham-Book.ttf") format("truetype");
}

@font-face {
  font-family: GothamSariegoLogin;
  font-weight: 700;
  src: url("../../layouts/sariego/assets/fonts/Gotham-Bold.ttf") format("truetype");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

body.is-authenticated .login-screen {
  display: none;
}

body:not(.is-authenticated) {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

body.is-layer-dragging {
  cursor: grabbing;
  user-select: none;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(28, 33, 38, .86), rgba(8, 9, 9, .92) 260px),
    radial-gradient(circle at 18% 8%, rgba(10, 132, 214, .12), transparent 30%),
    #080909;
}

.app-shell.is-locked {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(7, 8, 8, .76), rgba(7, 8, 8, .9)),
    url("../img/program-real-background.png") center / cover no-repeat,
    #070808;
  background-size: 64px 64px, 64px 64px, auto, cover, auto;
}

.login-brand {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  background: rgba(18, 20, 23, .92);
  border-bottom: 1px solid #2b3036;
}

.login-brand strong,
.login-brand small {
  display: block;
}

.login-brand small {
  color: var(--muted);
}

.login-panel {
  width: min(1080px, calc(100vw - 32px));
  align-self: center;
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 520px;
  border: 1px solid #353c44;
  background: #111315;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .55);
}

.login-preview {
  padding: 26px;
  border-right: 1px solid #30363d;
  background: #0b0d0f;
}

.login-monitor {
  position: relative;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, .08), rgba(0, 0, 0, .16)),
    conic-gradient(#3a3f45 25%, #242a30 0 50%, #3a3f45 0 75%, #242a30 0);
  background-size: 100% 100%, 48px 48px;
  background-position: center, 0 0;
  border: 1px solid #505862;
}

.login-monitor::before,
.login-monitor::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .28);
}

.login-monitor::before {
  inset: 5%;
}

.login-monitor::after {
  inset: 12%;
}

.monitor-tag {
  position: absolute;
  top: 16px;
  min-width: 100px;
  padding: 7px 10px;
  text-align: center;
  color: white;
  font-size: 12px;
  border: 1px solid currentColor;
  background: rgba(0, 0, 0, .34);
}

.preview-tag {
  left: 16px;
  color: #9bee87;
}

.program-tag {
  right: 16px;
  color: #ff7b84;
}

.login-vz-title {
  position: absolute;
  left: 50%;
  top: 7%;
  width: min(60%, 430px);
  transform: translateX(-50%);
  z-index: 2;
  color: #f7371f;
  font-family: Inter, sans-serif;
  font-size: clamp(86px, 20vw, 170px);
  font-weight: 900;
  font-style: italic;
  line-height: .78;
  letter-spacing: 0;
  text-align: center;
  opacity: .48;
  text-shadow:
    0 2px 0 #ffd6aa,
    0 8px 0 #85210b,
    0 18px 24px rgba(0, 0, 0, .54),
    0 0 26px rgba(255, 132, 34, .38);
  pointer-events: none;
}

.login-lower-third {
  position: absolute;
  left: 4%;
  bottom: 8%;
  width: min(92%, 760px);
  aspect-ratio: 860 / 122;
  font-family: GothamSariegoLogin, Inter, sans-serif;
}

.sariego-login-starter {
  display: block;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .46));
}

.sariego-login-starter > img,
.sariego-login-starter span,
.sariego-starter-logo {
  position: absolute;
  display: block;
}

.sariego-starter-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sariego-starter-colorbox {
  left: 0;
  top: 0;
  width: 68.65%;
  height: 83.36%;
  z-index: 1;
}

.sariego-starter-whitebox {
  left: 14.2%;
  top: 12.5%;
  width: 68.23%;
  height: 54.6%;
  z-index: 3;
}

.sariego-starter-blackbox {
  left: 12.7%;
  top: 66.4%;
  width: 29.41%;
  height: 16.23%;
  z-index: 4;
}

.sariego-starter-dash {
  top: 0;
  width: 4.82%;
  height: 82.62%;
  z-index: 5;
}

.sariego-starter-dash.dash-a {
  left: .75%;
}

.sariego-starter-dash.dash-b {
  left: 1.07%;
}

.sariego-starter-white-dash {
  top: 12.5%;
  width: 3.56%;
  height: 54.6%;
  z-index: 7;
}

.sariego-starter-white-dash.white-dash-a {
  left: 82.25%;
}

.sariego-starter-white-dash.white-dash-b {
  left: 82.65%;
}

.sariego-starter-logo {
  left: 5.15%;
  top: 8.9%;
  width: 9.2%;
  height: 50%;
  z-index: 9;
  display: grid;
  place-items: center;
}

.sariego-starter-name,
.sariego-starter-horse,
.sariego-starter-sub {
  z-index: 9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

.sariego-starter-name {
  left: 20.4%;
  top: 17.2%;
  width: 60%;
  color: #111;
  font-size: clamp(14px, 1.9vw, 23px);
  line-height: 1;
  font-weight: 700;
}

.sariego-starter-horse {
  left: 20.4%;
  top: 47%;
  width: 68%;
  color: #202326;
  font-size: clamp(8px, 1vw, 13px);
  line-height: 1;
  font-weight: 400;
}

.sariego-starter-sub {
  left: 16.1%;
  top: 69.7%;
  width: 48%;
  color: #fff;
  font-size: clamp(6px, .74vw, 10px);
  line-height: 1;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
}

.login-fields {
  align-self: center;
  margin: 0 18px;
  background: linear-gradient(180deg, #1d2024, #151719 58%, #121416);
  border: 1px solid #333942;
}

.login-error {
  min-height: 20px;
  margin: 0;
  padding: 0 10px 10px;
  color: #ff9aa2;
  font-size: 12px;
}

.login-submit {
  width: calc(100% - 20px);
  margin: 0 10px 12px;
}

.topbar {
  height: 54px;
  display: grid;
  grid-template-columns: 280px 1fr 310px;
  align-items: stretch;
  border-bottom: 1px solid #24282d;
  background: linear-gradient(180deg, #22262b 0%, #151719 72%, #101214 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-right: 1px solid #282c31;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 30px;
  place-items: center;
  background: linear-gradient(160deg, #0c7fd1, #1d313b);
  border: 1px solid #3b9ada;
  font-weight: 900;
}

.brand-mark.logo-mark {
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border-color: transparent;
}

.brand-mark.logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.muted {
  color: var(--muted);
}

.top-actions {
  display: flex;
  overflow-x: auto;
}

.top-action {
  min-width: 132px;
  padding: 0 18px;
  color: #cfd6df;
  background: linear-gradient(180deg, #24282e, #1a1d21);
  border: 0;
  border-right: 1px solid #30343a;
  text-transform: uppercase;
  font-size: 12px;
}

.top-action.is-active {
  color: white;
  background: linear-gradient(180deg, #2e4658, #1d3447);
  box-shadow: inset 0 -3px 0 var(--blue);
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 16px;
  background: #111315;
  color: #c4ccd5;
  font-size: 12px;
}

.current-user {
  max-width: 118px;
  overflow: hidden;
  color: #dfe8f2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  min-height: 28px;
  padding: 0 10px;
  color: #dfe8f2;
  background: #2b3036;
  border: 1px solid #454c55;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 10px rgba(78, 176, 51, .8);
}

main {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.view {
  display: none;
  height: 100%;
  min-height: 0;
  overflow: auto;
}

#view-live {
  overflow: hidden;
}

.view.is-active {
  display: block;
}

.live-grid {
  display: grid;
  grid-template-columns: 280px minmax(640px, 1fr) 320px;
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  height: 100%;
  min-height: 0;
  padding: 8px;
  overflow: hidden;
}

.live-grid.is-left-collapsed {
  grid-template-columns: 42px minmax(640px, 1fr) 320px;
}

.source-bank,
.control-stack,
.monitor-wall,
.panel,
.admin-panel,
.properties,
.canvas-panel {
  background: linear-gradient(180deg, #1d2024, #151719 58%, #121416);
  border: 1px solid #2c3137;
}

.source-bank,
.control-stack {
  min-height: 0;
  overflow: hidden;
}

.panel-title {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #2b3036, #20242a);
  color: #f4f7fb;
  font-size: 12px;
  text-transform: uppercase;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.collapse-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #dfe8f2;
  background: linear-gradient(180deg, #3a4048, #252a30);
  border: 1px solid #4b535e;
  font-size: 12px;
  line-height: 1;
}

.source-bank.is-collapsed .panel-title {
  justify-content: center;
  padding: 8px 0;
}

.source-bank.is-collapsed .panel-title span,
.source-bank.is-collapsed .panel-title .icon-btn,
.source-bank.is-collapsed .source-tabs,
.source-bank.is-collapsed .source-list {
  display: none;
}

.collapsible-panel {
  overflow: hidden;
  max-height: 900px;
  transition: max-height .22s ease;
}

.collapsible-panel.is-collapsed {
  max-height: 37px;
}

.collapsible-panel.is-collapsed .panel-actions,
.collapsible-panel.is-collapsed .table-actions,
.collapsible-panel.is-collapsed .panel-title > .mini-btn,
.collapsible-panel.is-collapsed .panel-title > .icon-btn {
  display: none;
}

.collapsible-panel > :not(.panel-title) {
  transition: opacity .16s ease, transform .16s ease;
}

.collapsible-panel.is-collapsed > :not(.panel-title) {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.source-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 8px 8px 0;
  background: #151719;
}

.source-tab {
  min-width: 0;
  height: 30px;
  color: #aeb8c4;
  background: linear-gradient(180deg, #242931, #191d23);
  border: 1px solid #333a43;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.source-tab.is-active {
  color: #fff;
  border-color: var(--blue);
  box-shadow: inset 0 -2px 0 var(--blue);
}

.source-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  min-height: 0;
  overflow-y: auto;
}

.source-empty {
  margin: 0;
}

.preset {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid #343a42;
  background: linear-gradient(180deg, #171a1e, #0e1012);
  color: white;
  text-align: left;
}

.preset.is-selected {
  border-color: var(--green);
  box-shadow: inset 4px 0 0 #2f861f;
}

.rider-preset {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.rider-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
  line-height: 1.05;
}

.rider-country {
  display: grid;
  justify-items: end;
  gap: 3px;
  flex: 0 0 auto;
}

.rider-name b {
  color: #9bd4ff;
  font-size: 11px;
  font-weight: 800;
}

.flag {
  display: block;
  width: 22px;
  height: 14px;
  border: 1px solid rgba(255, 255, 255, .42);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}

.flag-ger {
  background: linear-gradient(#111 0 33.33%, #dd1d28 33.33% 66.66%, #f6d04d 66.66% 100%);
}

.flag-aut {
  background: linear-gradient(#d71920 0 33.33%, #fff 33.33% 66.66%, #d71920 66.66% 100%);
}

.flag-fra {
  background: linear-gradient(90deg, #183a8f 0 33.33%, #fff 33.33% 66.66%, #d71920 66.66% 100%);
}

.flag-sui {
  background:
    linear-gradient(90deg, transparent 0 36%, #fff 36% 64%, transparent 64% 100%),
    linear-gradient(transparent 0 36%, #fff 36% 64%, transparent 64% 100%),
    #d71920;
}

.flag-ned {
  background: linear-gradient(#ae1c28 0 33.33%, #fff 33.33% 66.66%, #21468b 66.66% 100%);
}

.flag-gbr {
  background:
    linear-gradient(90deg, transparent 0 42%, #fff 42% 58%, transparent 58% 100%),
    linear-gradient(transparent 0 38%, #fff 38% 62%, transparent 62% 100%),
    #1f3f8f;
}

.preset small {
  display: block;
  color: var(--muted);
  line-height: 1.2;
}

.insert-preset .rider-name b {
  color: var(--amber);
}

.monitor-wall {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.monitor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  min-height: 0;
  overflow: hidden;
}

.monitor-wall.is-program-only .monitor-row {
  grid-template-columns: minmax(0, 1fr);
  flex: 1 1 0;
  align-items: stretch;
}

.monitor-wall.is-program-only .monitor-preview,
.monitor-wall.is-program-only .layer-strip {
  display: none;
}

.monitor-wall.is-program-only .shortcut-btn.is-preview {
  background: linear-gradient(180deg, #333940, #272b31);
  border-color: #2f363e;
  box-shadow: none;
}

.monitor-wall.is-program-only .shortcut-btn.is-live.is-preview {
  background: linear-gradient(180deg, #2b6a24, #1a4716);
  border-color: var(--green);
  box-shadow: inset 0 4px 0 var(--green);
}

.monitor-wall.is-program-only .monitor-program {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  height: 100%;
}

.monitor-wall.is-program-only .monitor-program .video-frame {
  margin: auto;
}

.monitor-wall.is-program-only .monitor-program .monitor-label {
  flex: 0 0 auto;
}

.monitor {
  min-width: 0;
  min-height: 0;
}

.monitor-label {
  padding: 6px 8px;
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
  color: #dce5ee;
  background: #0b0d0f;
  border: 1px solid #2c3137;
  border-bottom: 0;
  position: relative;
  min-height: 31px;
}

.monitor-preview .monitor-label,
.monitor-preview .video-frame {
  border-color: var(--red);
}

.monitor-program .monitor-label,
.monitor-program .video-frame {
  border-color: var(--green);
}

.monitor-settings-btn {
  position: absolute;
  top: 3px;
  right: 5px;
  width: 25px;
  height: 23px;
  display: grid;
  place-items: center;
  color: #dfe8f2;
  background: linear-gradient(180deg, #3a4048, #252a30);
  border: 1px solid #4b535e;
  font-size: 14px;
  line-height: 1;
}

.monitor-settings-btn.is-active {
  color: white;
  border-color: var(--blue);
  box-shadow: inset 0 -2px 0 var(--blue);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
  transform: translateZ(0);
  backface-visibility: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 36%, rgba(0,0,0,.22)),
    repeating-conic-gradient(#24282e 0 25%, #16191d 0 50%) 0 / 18px 18px,
    #070808;
  border: 2px solid #30343a;
}

.video-frame.has-real-background {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .06), rgba(0, 0, 0, .16)),
    url("../img/program-real-background.png") center / cover no-repeat,
    #070808;
}

.video-frame.has-background-color-key {
  background: var(--program-key-color, #00ff00);
}

.video-frame.has-background-bars {
  background:
    linear-gradient(to bottom, transparent 0 67%, #111 67% 75%, transparent 75%),
    linear-gradient(to right,
      #c9c9c9 0 14.285%,
      #c9c900 14.285% 28.57%,
      #00c9c9 28.57% 42.855%,
      #00c900 42.855% 57.14%,
      #c900c9 57.14% 71.425%,
      #c90000 71.425% 85.71%,
      #0000c9 85.71% 100%);
  background-position: center center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.monitor-render-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  pointer-events: none;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.monitor-render-frame.is-hidden {
  opacity: 0;
}

.program-settings-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  width: min(238px, calc(100% - 20px));
  padding: 10px;
  color: #e8eef6;
  background: linear-gradient(180deg, rgba(31, 35, 40, .96), rgba(14, 16, 18, .96));
  border: 1px solid #4b535e;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .55);
  z-index: 5;
}

.program-settings-panel[aria-hidden="true"] {
  display: none;
}

.video-frame.has-greenscreen::after {
  content: "COLOR KEY";
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 7px;
  color: #d8ffd3;
  background: rgba(26, 71, 22, .78);
  border: 1px solid rgba(78, 176, 51, .9);
  font-size: 10px;
  font-weight: 800;
  z-index: 4;
}

.live-timer-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 8px;
  color: #d9f0ff;
  background: linear-gradient(180deg, rgba(24, 114, 190, .9), rgba(9, 55, 104, .92));
  border: 1px solid rgba(87, 177, 255, .96);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .18);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
  z-index: 4;
}

.live-timer-badge.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.live-timer-badge.is-exiting {
  opacity: 0;
  visibility: visible;
  transform: translateY(-6px);
}

.live-timer-badge span {
  color: rgba(217, 240, 255, .82);
  font-size: 10px;
}

.live-timer-badge strong {
  min-width: 54px;
  color: white;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  line-height: 1;
  text-align: right;
}

.video-frame.has-center-cross::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.video-frame.has-center-cross::before {
  background:
    linear-gradient(rgba(255, 255, 255, .68), rgba(255, 255, 255, .68)) 50% 50% / 10% 2px no-repeat,
    linear-gradient(rgba(255, 255, 255, .68), rgba(255, 255, 255, .68)) 50% 50% / 2px 10% no-repeat;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, .9));
}

.video-frame.has-safe-area::after {
  content: "";
  position: absolute;
  left: 5%;
  top: 5%;
  width: 90%;
  height: 90%;
  pointer-events: none;
  border: 2px dashed rgba(255, 255, 255, .58);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45);
  box-sizing: border-box;
  z-index: 3;
}

.settings-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #363d45;
  font-size: 12px;
  text-transform: uppercase;
}

.settings-head span {
  color: var(--muted);
  font-size: 11px;
}

.toggle-row,
.settings-field {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  font-size: 12px;
}

.toggle-row span,
.settings-field span {
  color: #c3ccd7;
}

.settings-field input[type="color"] {
  width: 100%;
  height: 24px;
  padding: 0;
  border: 1px solid #4b535e;
  background: #111315;
}

.settings-field select {
  width: 100%;
  min-width: 0;
  height: 28px;
  color: #edf4fb;
  background: #11161c;
  border: 1px solid #3a424c;
}

.toggle-row input {
  justify-self: start;
  accent-color: var(--green);
}

.safe,
.canvas-safe {
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .24);
}

.safe-title,
.canvas-safe.title {
  inset: 10%;
}

.canvas-safe.action {
  inset: 4%;
}

.gfx.lower-third,
.editable.lower-third {
  position: absolute;
  left: 8%;
  bottom: 16%;
  width: min(570px, 68%);
  padding: 10px 18px 12px 22px;
  background:
    linear-gradient(90deg, rgba(6, 116, 204, .95), rgba(24, 151, 237, .8) 62%, rgba(255, 255, 255, .12)),
    linear-gradient(#0b2940, #0b2940);
  border-left: 5px solid #60c0ff;
  box-shadow: 0 0 18px rgba(0, 132, 255, .5), inset 0 -4px 0 rgba(0, 0, 0, .32);
}

.gfx strong,
.gfx small,
.gfx span,
.editable strong,
.editable small,
.editable span {
  display: block;
  text-shadow: 0 1px 1px #000;
}

.gfx strong,
.editable strong {
  font-size: clamp(20px, 2.4vw, 34px);
  line-height: 1;
}

.gfx small,
.editable small {
  color: #dfefff;
  margin-top: 5px;
}

.gfx-kicker {
  color: #bfe4ff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 4px;
}

.gfx.is-hidden {
  opacity: 0;
  transform: translateX(-26px);
}

.gfx {
  transition: opacity .28s ease, transform .28s ease;
}

.shortcut-switcher {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: 158px;
  gap: 1px;
  padding: 8px;
  border-top: 1px solid #252a30;
  background: linear-gradient(180deg, #171a1e, #101214);
  overflow: hidden;
}

.shortcut-label {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #30353c, #24282e);
  color: #d2d9e2;
  font-size: 12px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0;
  text-transform: uppercase;
}

.shortcut-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  grid-template-rows: repeat(3, 52px);
  grid-auto-rows: 52px;
  gap: 1px;
  min-height: 0;
  overflow: hidden;
}

.source-btn {
  height: 52px;
  min-height: 0;
  border: 0;
  background: linear-gradient(180deg, #333940, #272b31);
  color: #e4ebf3;
  font-size: 12px;
  overflow: hidden;
}

.source-btn.is-live {
  background: linear-gradient(180deg, #2b6a24, #1a4716);
  box-shadow: inset 0 -4px 0 var(--green);
}

.source-btn.is-preview {
  background: linear-gradient(180deg, #7a2029, #4c151a);
  box-shadow: inset 0 -4px 0 var(--red);
}

.source-btn.is-live.is-preview {
  background:
    linear-gradient(90deg, rgba(78, 176, 51, .95) 0 50%, rgba(200, 50, 58, .95) 50% 100%),
    linear-gradient(180deg, #30353c, #24282e);
}

.shortcut-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  position: relative;
  min-width: 0;
  padding: 4px 7px;
}

.shortcut-btn span {
  color: #aeb8c5;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.shortcut-btn strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
}

.shortcut-btn.is-drop-target {
  outline: 2px solid #9bd4ff;
  outline-offset: -3px;
  background:
    linear-gradient(180deg, rgba(10, 132, 214, .55), rgba(18, 57, 90, .72)),
    linear-gradient(180deg, #333940, #272b31);
}

.layer-strip {
  flex: 1 1 236px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-content: start;
  grid-auto-rows: auto;
  gap: 8px;
  padding: 8px;
  min-height: 190px;
  height: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, #171a1e, #101214);
  border-top: 1px solid #272c32;
  scrollbar-color: #56616d #111315;
  scrollbar-width: thin;
}

.layer-strip::-webkit-scrollbar {
  width: 10px;
}

.layer-strip::-webkit-scrollbar-track {
  background: #111315;
}

.layer-strip::-webkit-scrollbar-thumb {
  background: #56616d;
  border: 2px solid #111315;
}

.layer-card {
  background: linear-gradient(180deg, #252a30, #1a1d21);
  border: 1px solid #333942;
  cursor: grab;
  min-width: 0;
  user-select: none;
}

.layer-card.is-dragging {
  opacity: .55;
  cursor: grabbing;
  outline: 2px solid #9bd4ff;
  outline-offset: -2px;
}

.layer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  background: #2b3036;
  font-size: 12px;
}

.layer-thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent, rgba(10, 132, 214, .8), transparent),
    repeating-conic-gradient(#24282e 0 25%, #171a1e 0 50%) 0 / 16px 16px;
}

.layer-thumb.has-thumbnail {
  background-color: #0b0d0f;
}

.scene-thumb-frame,
.scene-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  pointer-events: none;
}

.scene-card .layer-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-card .layer-head span {
  color: #9fb0c4;
  font-size: 10px;
  text-transform: uppercase;
}

.scene-thumb:not(.has-thumbnail)::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 18%;
  height: 20%;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(18, 133, 201, .9), rgba(255,255,255,.2));
  box-shadow: 0 0 18px rgba(10, 132, 214, .45);
}

.scene-title::after,
.scene-startlist::after,
.scene-weather::after {
  inset: 16% 12% auto;
  height: 52%;
  background: linear-gradient(135deg, rgba(31, 125, 190, .9), rgba(255,255,255,.18));
}

.scene-time::after,
.scene-trend_2z::after {
  left: auto;
  right: 10%;
  bottom: 14%;
  width: 34%;
  height: 26%;
}

.scene-empty {
  display: grid;
  place-items: center;
  min-height: 90px;
  color: #9aa7b5;
  font-size: 12px;
}

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

.layer-actions button {
  height: 32px;
  color: white;
  background: #30353c;
  border: 1px solid #20242a;
}

.control-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 0;
  background: transparent;
}

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

.take-btn {
  min-height: 64px;
  border: 1px solid #414852;
  background: linear-gradient(180deg, #3a4048, #2b3037);
  color: white;
  font-weight: 800;
}

.take-btn.primary {
  background: linear-gradient(180deg, #1877ba, #0b5d95);
  border-color: #1894e8;
}

.take-btn.danger {
  background: linear-gradient(180deg, #6b2027, #4d171b);
  border-color: #a53038;
}

.field {
  display: block;
  padding: 10px;
}

.field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.field input {
  width: 100%;
  height: 36px;
  color: white;
  background: linear-gradient(180deg, #15181b, #0f1113);
  border: 1px solid #3a4048;
  padding: 0 10px;
}

.field select {
  width: 100%;
  height: 36px;
  color: white;
  background: linear-gradient(180deg, #15181b, #0f1113);
  border: 1px solid #3a4048;
  padding: 0 10px;
}

.channel-control-panel {
  border-color: #38546a;
}

.channel-meta {
  display: grid;
  gap: 6px;
  padding: 8px 10px 10px;
  color: #cfd8e3;
  font-size: 12px;
}

.channel-meta code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #9bd4ff;
  white-space: nowrap;
}

.channel-state-version {
  color: #9fb0c4;
  font-size: 11px;
  text-transform: uppercase;
}

.channel-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.channel-actions .mini-btn {
  min-width: 0;
  padding-inline: 6px;
  white-space: nowrap;
}

.api-doc-panel {
  grid-column: 1 / -1;
}

.api-doc-head {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid #2e3742;
  background: #101315;
}

.api-channel-field {
  justify-content: center;
  padding: 10px 14px;
  border-bottom: 1px solid #2a3037;
  background: #0b0e11;
}

.token-field input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.input-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.api-help-block {
  min-height: 300px;
  max-height: calc(100vh - 330px);
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: #a9d8ff;
  background: #080a0c;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.api-section-grid {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(360px, 1.2fr) minmax(360px, 1.2fr);
  gap: 1px;
  border-bottom: 1px solid #2e3742;
  background: #20262e;
}

.api-connect-panel {
  min-width: 0;
  background: #0b0e11;
}

.api-help-legacy {
  display: none;
}

.streamdeck-panel {
  border-bottom: 1px solid #2e3742;
  background: #0b0e11;
}

.slim-title {
  min-height: 38px;
}

.streamdeck-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  max-height: calc(100vh - 330px);
  min-height: 300px;
  overflow: auto;
  background: #20262e;
}

.streamdeck-url {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #090c0f;
}

.streamdeck-url strong {
  color: #dfe9f3;
  font-size: 12px;
}

.streamdeck-url code {
  overflow: hidden;
  color: #8ecbff;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-scene-meta {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-bottom: 1px solid #272c32;
  background: linear-gradient(180deg, #15181b, #101214);
}

.preview-scene-meta strong {
  color: #f2f7ff;
  font-size: 14px;
}

.preview-scene-meta span,
.empty-editor {
  color: var(--muted);
  font-size: 12px;
}

.preview-fields {
  max-height: 256px;
  overflow-y: auto;
}

.compact-control-field {
  padding: 8px 10px;
}

.compact-control-field input {
  height: 32px;
}

.checkbox-field input {
  width: auto;
  height: auto;
  accent-color: var(--green);
}

.event-log ul,
.event-log li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-log ul {
  padding: 8px 10px 12px;
  max-height: 180px;
  overflow: auto;
}

.event-log li {
  color: #cfd8e3;
  border-bottom: 1px solid #262b31;
  padding: 7px 0;
  font-size: 12px;
}

.pill {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 2px;
  font-size: 11px;
  text-transform: uppercase;
}

.live-pill {
  background: #64191f;
  color: #ffd9dd;
}

.online-pill {
  background: #1c5918;
  color: #d8ffd3;
}

.standby-pill {
  background: #5a431c;
  color: #ffe4ad;
}

.role-pill {
  background: #1e3d5a;
  color: #d9efff;
}

.mini-btn,
.icon-btn,
.link-btn {
  min-height: 28px;
  border: 1px solid #454b55;
  color: #eef4fb;
  background: linear-gradient(180deg, #3a4048, #2e333a);
}

.icon-btn {
  width: 28px;
}

.mini-btn {
  padding: 0 12px;
}

.mini-btn.ghost {
  background: transparent;
}

.link-btn {
  min-height: 26px;
  padding: 0 9px;
  color: #9bd4ff;
  background: transparent;
}

.link-btn.danger-link {
  color: #ff9aa2;
  border-color: #6b2027;
}

.link-btn:disabled,
.logout-btn:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.studio-grid {
  display: grid;
  grid-template-columns: 280px minmax(620px, 1fr) 280px;
  gap: 8px;
  min-height: calc(100vh - 54px);
  padding: 8px;
}

.studio-sidebar,
.studio-inspector {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #343a42, #24282e);
  border: 1px solid #3a414a;
  min-height: 0;
  overflow: hidden;
}

.studio-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-bottom: 1px solid #2b323a;
}

.studio-panel:last-child {
  border-bottom: 0;
}

.studio-layout-panel,
.studio-scene-panel {
  flex: 0 0 auto;
}

.studio-structure-panel,
.studio-inspector-panel {
  flex: 1 1 auto;
}

.studio-motion-panel {
  flex: 0 1 230px;
}

.studio-panel.is-collapsed {
  flex: 0 0 37px;
}

.studio-panel.collapsible-panel {
  max-height: none;
}

.studio-panel.collapsible-panel.is-collapsed {
  max-height: 37px;
}

.studio-panel.is-collapsed .studio-disclosure,
.studio-panel.is-collapsed .studio-toolbar {
  display: none;
}

.studio-field {
  padding: 8px;
}

.studio-scene-title {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  gap: 6px;
}

.studio-disclosure {
  width: 22px;
  height: 22px;
  border: 0;
  color: #cad4df;
  background: transparent;
  font-size: 13px;
  line-height: 1;
}

.studio-scene-list {
  display: grid;
  gap: 4px;
  max-height: 190px;
  overflow: auto;
  padding: 0 8px 8px;
}

.studio-scene-list[hidden] {
  display: none;
}

.studio-scene-btn,
.studio-tree-node {
  width: 100%;
  min-height: 28px;
  border: 1px solid transparent;
  color: #eef4fb;
  background: transparent;
  text-align: left;
}

.studio-scene-btn {
  padding: 0 8px;
}

.studio-scene-btn.is-active,
.studio-tree-node.is-active {
  border-color: #315b78;
  background: rgba(21, 123, 190, .16);
  box-shadow: inset 3px 0 0 var(--blue);
}

.studio-tree-node.is-locked {
  color: #aab4c0;
}

.studio-tree-node.is-locked .studio-tree-name::after {
  content: " LOCK";
  color: #75818d;
  font-size: 9px;
}

.studio-tree {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 6px;
}

.studio-tree-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 1px;
  min-height: 27px;
}

.studio-tree-node {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  font-size: 12px;
}

.studio-tree-node:hover,
.studio-scene-btn:hover {
  border-color: #3c4652;
  background: rgba(255, 255, 255, .035);
}

.studio-tree-toggle {
  width: 22px;
  height: 24px;
  border: 0;
  color: #9fa8b3;
  background: transparent;
  font-size: 12px;
  line-height: 1;
}

.studio-tree-toggle:disabled {
  opacity: .18;
}

.studio-tree-icon {
  width: 10px;
  height: 10px;
  border: 1px solid #657180;
  opacity: .86;
}

.studio-tree-icon.folder {
  border-color: #d0a84f;
  background: linear-gradient(180deg, #9d7832, #5e471e);
}

.studio-tree-icon.file {
  border-color: #607083;
  background: linear-gradient(180deg, #2f3b46, #1b2229);
}

.studio-tree-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-tree-node small {
  color: #8e98a6;
  font-size: 11px;
  text-transform: uppercase;
}

.studio-toolstrip {
  display: grid;
  grid-template-columns: repeat(5, 30px);
  justify-content: start;
  gap: 4px;
  padding: 6px;
  border-top: 1px solid #2b323a;
  background: linear-gradient(180deg, #252a30, #1d2228);
}

.studio-icon-tool {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid #424b55;
  background: linear-gradient(180deg, #2f363e, #20262c);
  color: #dce7f1;
}

.studio-icon-tool:hover:not(:disabled) {
  border-color: #5b6a78;
  background: linear-gradient(180deg, #3a424b, #252c33);
}

.studio-icon-tool:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.studio-icon-tool span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.studio-icon-tool::before,
.studio-icon-tool::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.tool-new::before {
  width: 14px;
  height: 2px;
  background: currentColor;
}

.tool-new::after {
  width: 2px;
  height: 14px;
  background: currentColor;
}

.tool-lock::before {
  width: 13px;
  height: 10px;
  top: 58%;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.tool-lock::after {
  width: 10px;
  height: 8px;
  top: 38%;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.tool-lock.is-unlocked::after {
  left: 54%;
  transform: translate(-50%, -50%) rotate(18deg);
}

.tool-copy::before,
.tool-copy::after {
  width: 11px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 1px;
}

.tool-copy::before {
  left: 45%;
  top: 55%;
  opacity: .65;
}

.tool-copy::after {
  left: 56%;
  top: 45%;
}

.tool-paste::before {
  width: 13px;
  height: 13px;
  top: 56%;
  border: 2px solid currentColor;
  border-radius: 1px;
}

.tool-paste::after {
  width: 9px;
  height: 4px;
  top: 32%;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}

.tool-delete::before,
.tool-delete::after {
  width: 15px;
  height: 2px;
  background: currentColor;
}

.tool-delete::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.tool-delete::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.studio-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.studio-bg-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #aab4c0;
  font-size: 11px;
}

.studio-bg-control select {
  min-height: 28px;
  max-width: 118px;
  font-size: 12px;
}

.studio-preview-wrap {
  position: relative;
  width: min(100%, 1180px);
  aspect-ratio: 16 / 9;
  margin: 28px auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 36%, rgba(0,0,0,.22)),
    repeating-conic-gradient(#24282e 0 25%, #16191d 0 50%) 0 / 18px 18px,
    #030404;
  border: 1px solid #4a515b;
  overflow: hidden;
}

.studio-preview-wrap.has-background-color-key {
  background: #00ff00;
}

.studio-preview-wrap.has-background-bars {
  background:
    linear-gradient(to bottom, transparent 0 67%, #111 67% 75%, transparent 75%),
    linear-gradient(to right,
      #c9c9c9 0 14.285%,
      #c9c900 14.285% 28.57%,
      #00c9c9 28.57% 42.855%,
      #00c900 42.855% 57.14%,
      #c900c9 57.14% 71.425%,
      #c90000 71.425% 85.71%,
      #0000c9 85.71% 100%);
}

.studio-preview-wrap.has-real-background {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .06), rgba(0, 0, 0, .16)),
    url("../img/program-real-background.png") center / cover no-repeat,
    #070808;
}

.studio-preview-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.studio-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9da7b5;
  background: rgba(3, 4, 4, .75);
  pointer-events: none;
}

.studio-empty[hidden] {
  display: none;
}

.studio-status {
  min-height: 28px;
  padding: 0 12px 10px;
  color: #9da7b5;
}

.studio-inspector-body,
.studio-motion-list {
  display: grid;
  gap: 4px;
  padding: 0 6px;
}

.studio-inspector-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-top: 6px;
}

.studio-inspector-group {
  border: 1px solid #2b323a;
  background: rgba(8, 10, 12, .12);
}

.studio-inspector-group h3 {
  margin: 0;
  padding: 4px 6px;
  border-bottom: 1px solid #2b323a;
  color: #aab4c0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.studio-inspector-group .field {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 6px;
  border-bottom: 1px solid rgba(43, 50, 58, .52);
}

.studio-inspector-group .field:last-child {
  border-bottom: 0;
}

.studio-inspector .field span {
  overflow: hidden;
  color: #9fa9b4;
  font-size: 11px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-inspector input,
.studio-inspector select,
.studio-inspector textarea {
  min-height: 24px;
  padding: 2px 6px;
  font-size: 12px;
}

.studio-inspector textarea {
  min-height: 54px;
  resize: vertical;
  line-height: 1.3;
}

.studio-inspector-group .textarea-field {
  align-items: start;
}

.studio-inspector-group .textarea-field span {
  padding-top: 5px;
}

.studio-inspector .checkbox-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 28px;
}

.studio-inspector .checkbox-row input {
  justify-self: start;
  min-height: auto;
}

.studio-motion-list .metric {
  padding: 6px;
  font-size: 12px;
}

.studio-motion-list .metric strong {
  font-size: 12px;
}

.studio-placeholder {
  margin: 10px 0;
  line-height: 1.4;
}

.layers-title {
  margin-top: 10px;
}

.management-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 8px;
  padding: 8px;
}

.backoffice-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 8px;
  padding: 8px;
}

.license-overview {
  min-height: 260px;
}

.user-form {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 150px 170px;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #2a3037;
  background: #111315;
}

.channel-form {
  grid-template-columns: 1.1fr 1.1fr 1fr 170px 150px;
}

.module-settings {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid #2a3037;
  background: #0c0e10;
}

.module-info {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  color: #9fa8b3;
  font-size: 12px;
}

.module-info strong {
  color: #d7dee7;
  font-weight: 600;
}

.module-field {
  background: transparent;
}

.module-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.module-input-row small {
  color: #9fa8b3;
  font-size: 11px;
}

.module-action-row {
  display: flex;
  align-items: end;
  gap: 8px;
  min-height: 55px;
}

.encore-filter-field[hidden] {
  display: none;
}

.user-form[aria-hidden="true"] {
  display: none;
}

.compact-field {
  padding: 0;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-message {
  color: #ffcf8a;
  font-size: 12px;
}

.table-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .62);
  z-index: 20;
}

.modal-backdrop[aria-hidden="true"] {
  display: none;
}

.modal-panel {
  width: min(420px, calc(100vw - 32px));
  background: linear-gradient(180deg, #1d2024, #151719 58%, #121416);
  border: 1px solid #3a414a;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .65);
}

.channel-modal-panel {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.channel-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.channel-form-grid .module-settings {
  grid-column: 1 / -1;
}

.channel-sources-panel {
  grid-column: 1 / -1;
  border: 1px solid #2a3037;
  background: #0c0e10;
}

.channel-sources-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border-bottom: 1px solid #252b32;
}

.channel-sources-head strong {
  display: block;
  color: #d7dee7;
  font-size: 13px;
}

.channel-sources-head span {
  display: block;
  color: #8f9aa6;
  font-size: 11px;
  margin-top: 2px;
}

.channel-sources-list {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.channel-source-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  padding: 8px;
  background: #121519;
  border: 1px solid #252b32;
}

.channel-source-row .token-field {
  grid-column: span 2;
}

.channel-source-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 44px;
  color: #c8d0da;
  font-size: 12px;
}

.modal-actions {
  padding: 0 10px 12px;
}

.admin-panel {
  min-height: 220px;
}

.admin-panel.wide {
  grid-column: span 2;
}

.metric {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #2a3037;
}

.metric span {
  color: var(--muted);
}

.button-row {
  display: flex;
  gap: 8px;
  padding: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid #2a3037;
  font-size: 13px;
}

th {
  color: #aeb8c5;
  background: linear-gradient(180deg, #1a1d21, #111315);
  font-weight: 600;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 220px 1fr;
  }

  .status-strip {
    justify-content: flex-start;
    grid-column: 1 / -1;
    min-height: 42px;
  }

  .live-grid,
  .studio-grid,
  .management-grid,
  .backoffice-layout {
    grid-template-columns: 1fr;
  }

  .source-list,
  .monitor-row,
  .api-section-grid,
  .layer-strip,
  .management-grid,
  .backoffice-layout {
    grid-template-columns: 1fr;
  }

  .admin-panel.wide {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  body:not(.is-authenticated) {
    overflow: auto;
  }

  .login-panel {
    grid-template-columns: 1fr;
    align-self: start;
    margin: 16px 0;
  }

  .login-preview {
    border-right: 0;
    border-bottom: 1px solid #30363d;
  }

  .login-monitor {
    min-height: 320px;
  }

  .login-lower-third {
    left: 4%;
    bottom: 8%;
    width: 92%;
  }

  .topbar {
    height: auto;
    grid-template-columns: 1fr;
  }

  .brand {
    min-height: 54px;
  }

  .top-actions {
    min-height: 46px;
  }

  .view,
  .live-grid,
  .studio-grid {
    min-height: auto;
  }

  .shortcut-row {
    grid-template-columns: repeat(3, minmax(64px, 1fr));
    grid-template-rows: repeat(6, 52px);
  }

  .shortcut-switcher {
    grid-template-rows: 317px;
  }
}
