:root {
  --bg: #17191d;
  --bg-deep: #101216;
  --panel: #f5f7fa;
  --panel-2: #e9edf2;
  --panel-dark: #2b3036;
  --line: #aeb7c2;
  --line-dark: #3d444d;
  --text: #14181d;
  --muted: #66717e;
  --white: #ffffff;
  --cyan: #00a8ff;
  --cyan-soft: #9de4ff;
  --green: #19c36b;
  --yellow: #ffd84d;
  --red: #ff3b30;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --ui-scale: 1;
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: calc(14px * var(--ui-scale));
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #24272d 0%, #17191d 42%, #111318 100%);
  transition: filter 180ms ease;
}

.app-shell.license-locked {
  filter: blur(3px) grayscale(0.3);
  pointer-events: none;
  user-select: none;
}

body[data-layout-profile="compact"] {
  --ui-scale: 0.88;
}

body[data-layout-profile="laptop"] {
  --ui-scale: 0.94;
}

body[data-layout-profile="ultrawide"] {
  --ui-scale: 1;
}

body[data-layout-profile="compact"] .topbar,
body[data-layout-profile="laptop"] .topbar {
  gap: 8px;
}

body[data-layout-profile="compact"] .brand {
  min-width: 180px;
}

body[data-layout-profile="laptop"] .brand {
  min-width: 220px;
}

body[data-layout-profile="compact"] .status-strip {
  grid-template-columns: repeat(2, minmax(110px, 1fr));
}

body[data-layout-profile="compact"] .menu {
  gap: 2px;
}

body[data-layout-profile="compact"] .menu button,
body[data-layout-profile="compact"] .menu select,
body[data-layout-profile="compact"] .menu-link {
  padding-inline: 6px;
}

body[data-layout-profile="compact"] .workspace {
  grid-template-columns: 1fr;
  overflow: auto;
}

body[data-layout-profile="compact"] .right-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-layout-profile="compact"] .deck-grid {
  grid-template-columns: 1fr;
}

body[data-layout-profile="laptop"] .workspace {
  grid-template-columns: 260px minmax(0, 1fr) 370px;
}

body[data-layout-profile="laptop"] .deck-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-layout-profile="ultrawide"] .workspace {
  grid-template-columns: 360px minmax(760px, 1fr) 560px;
}

body[data-layout-profile="ultrawide"] .deck-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topbar {
  height: 48px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  color: #f5f8fb;
  background: #11151a;
  border-bottom: 1px solid #39404a;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #061016;
  background: linear-gradient(135deg, #00b7ff, #78ffcf);
  font-weight: 800;
  letter-spacing: 0;
  font-size: 12px;
}

.brand strong,
.brand span {
  display: block;
  line-height: 1.1;
}

.brand strong {
  font-size: 13px;
}

.brand span {
  color: #9aa7b5;
  font-size: 11px;
  margin-top: 3px;
}

.menu {
  display: flex;
  gap: 3px;
}

.menu button,
.menu select,
.menu-link,
.small-btn,
.category-tabs button {
  display: inline-grid;
  place-items: center;
  border: 1px solid #9ba5b0;
  border-radius: 5px;
  background: linear-gradient(#fff, #dfe5eb);
  color: #151a20;
  min-height: 26px;
  padding: 3px 10px;
  font-size: 12px;
  text-decoration: none;
}

.menu select {
  min-width: 94px;
  appearance: none;
}

.menu button:hover,
.menu-link:hover,
.small-btn:hover,
.category-tabs button:hover {
  border-color: var(--cyan);
}

.top-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #dbe5ed;
}

.status-pill,
.mini-status,
.deck-state {
  border-radius: 999px;
  padding: 3px 8px;
  background: #303842;
  color: #dbe5ed;
  font-size: 11px;
  line-height: 1;
}

.status-pill.live {
  background: rgba(255, 59, 48, 0.18);
  color: #ffb1ac;
  border: 1px solid rgba(255, 59, 48, 0.55);
}

#clock {
  color: var(--cyan-soft);
  font-weight: 700;
  font-size: 15px;
  min-width: 74px;
  text-align: right;
}

.workspace {
  display: grid;
  grid-template-rows: 184px 1fr;
  gap: 8px;
  padding: 8px;
  min-height: calc(100vh - 48px);
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 8px;
}

.panel {
  background: var(--panel);
  border: 1px solid #8f99a5;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.panel-title {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  background: linear-gradient(#333940, #15181d);
  color: #f2f6f9;
  border-bottom: 1px solid #060708;
}

.panel-title h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.track-strip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: linear-gradient(180deg, #bfefff, #76cef2);
  border-bottom: 1px solid #7aa7ba;
  color: #083044;
}

.track-strip span {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-strip strong {
  font-size: 21px;
  line-height: 1;
  color: #0b4362;
}

.deck-body {
  display: grid;
  grid-template-columns: 94px 1fr 58px;
  gap: 8px;
  padding: 8px;
  height: 132px;
}

.album-art {
  background: #d8dde4;
  border: 1px solid #a5adb7;
  display: grid;
  place-items: center;
}

.disc {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: #15171b;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.album-art.alt .disc {
  background: radial-gradient(circle at 35% 35%, #343a42, #090a0c 65%);
}

.album-art.compact .disc {
  width: 58px;
  height: 58px;
}

.transport {
  min-width: 0;
}

.transport p {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
}

.transport small {
  display: block;
  min-height: 16px;
  color: #546170;
  font-size: 11px;
}

.buttons {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 8px 0;
}

.icon-btn {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid #9aa3ae;
  background: linear-gradient(#fff, #d7dde5);
  color: #11171d;
  font-size: 11px;
  font-weight: 800;
}

.icon-btn.primary {
  color: #052337;
  border-color: #57b8e4;
  background: linear-gradient(#c9f5ff, #78d6ff);
}

.wave {
  height: 15px;
  background: repeating-linear-gradient(90deg, #21252a 0 2px, #59636f 2px 4px);
  border: 1px solid #181c20;
  overflow: hidden;
}

.wave span {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(90deg, #79dcff 0 2px, #087cb4 2px 4px);
}

.mixer {
  display: grid;
  grid-template-columns: 22px 22px;
  justify-content: end;
  gap: 8px;
}

.slider,
.fader {
  position: relative;
  height: 100%;
  background: repeating-linear-gradient(180deg, transparent 0 8px, #8f98a2 8px 9px);
  border-left: 2px solid #c6ccd3;
  border-right: 2px solid #c6ccd3;
}

.slider span,
.fader i {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 22px;
  height: 12px;
  transform: translateX(-50%);
  border: 1px solid #747d87;
  background: linear-gradient(#fdfdfd, #bfc6cf);
}

.meter {
  display: grid;
  align-content: end;
  gap: 2px;
  background: #050607;
  border: 1px solid #20252a;
  padding: 3px;
}

.meter span {
  display: block;
  width: 100%;
}

.meter .green {
  height: 58px;
  background: linear-gradient(#35ff62, #0bb34a);
}

.meter .yellow {
  height: 18px;
  background: linear-gradient(#fff36d, #e6c200);
}

.meter .red {
  height: 12px;
  background: linear-gradient(#ff746e, #ff2018);
}

.main-grid {
  display: grid;
  grid-template-columns: 318px minmax(420px, 1fr) 420px;
  gap: 8px;
  min-height: 0;
}

.library,
.center-stack,
.right-stack {
  min-height: 0;
}

.library {
  display: flex;
  flex-direction: column;
}

.search-row {
  padding: 8px;
  border-bottom: 1px solid #cbd2da;
}

.search-row input,
.license-card input {
  width: 100%;
  border: 1px solid #9ca7b3;
  border-radius: 5px;
  padding: 8px 10px;
  color: #12171d;
  background: #fff;
  outline-color: var(--cyan);
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 0 8px 8px;
}

.category-tabs button.selected {
  border-color: var(--cyan);
  background: linear-gradient(#d9f8ff, #9de4ff);
}

.library-tools {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 0 8px 8px;
  border-bottom: 1px solid #cbd2da;
}

.library-tools span {
  color: #607080;
  font-size: 11px;
  white-space: nowrap;
}

.library-tools input {
  min-width: 0;
  min-height: 28px;
  padding: 5px 7px;
  color: #12171d;
  border: 1px solid #9ca7b3;
  border-radius: 5px;
  background: #fff;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #cbd2da;
  border-bottom: 1px solid #cbd2da;
}

.folder {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  color: #24303b;
  font-size: 11px;
}

.folder::before {
  content: "";
  width: 20px;
  height: 16px;
  display: inline-block;
  background: linear-gradient(#ffe184, #ffc13b);
  border: 1px solid #d59a13;
  border-radius: 2px;
}

.track-list {
  overflow: auto;
  flex: 1;
}

.track-row {
  display: grid;
  grid-template-columns: 18px 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid #d5dbe2;
  font-size: 12px;
}

.track-select {
  display: grid;
  place-items: center;
}

.track-select input {
  width: 14px;
  height: 14px;
}

.track-art {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border: 1px solid rgba(109, 147, 169, 0.5);
  border-radius: 4px;
  background: #0b151c;
}

.track-art.placeholder {
  display: grid;
  place-items: center;
  color: #96bad0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.track-row strong,
.track-row span,
.track-row small {
  display: block;
}

.track-row small {
  color: var(--muted);
  margin-top: 2px;
}

.track-actions {
  display: grid;
  grid-template-columns: auto auto auto auto auto;
  align-items: center;
  gap: 4px;
}

.track-actions .small-btn {
  min-height: 24px;
  padding: 2px 7px;
}

.center-stack,
.right-stack {
  display: grid;
  gap: 8px;
}

.center-stack {
  grid-template-rows: minmax(210px, 0.8fr) minmax(320px, 1.2fr);
}

.right-stack {
  grid-template-rows: 118px 120px minmax(120px, 0.7fr) 102px 150px;
}

.table-panel {
  min-height: 0;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

thead {
  position: sticky;
  top: 0;
  background: #eef2f6;
  color: #303842;
  z-index: 1;
}

th,
td {
  padding: 6px 8px;
  border-bottom: 1px solid #d3d9df;
  text-align: left;
  white-space: nowrap;
}

th:last-child,
td:last-child {
  text-align: right;
}

tbody tr:hover {
  background: #e9f7ff;
}

.history,
.request-panel {
  overflow: auto;
}

.encoder-panel {
  min-height: 0;
}

.encoder-row,
.automation-rule-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid #d4dae1;
  font-size: 12px;
}

.automation-engine-panel {
  min-height: 0;
}

.automation-rule-row {
  grid-template-columns: 44px minmax(0, 1fr);
}

.automation-rule-row strong,
.automation-rule-row span,
.automation-rule-row small {
  display: block;
}

.automation-rule-row span,
.automation-rule-row small {
  color: #95aab8;
  margin-top: 2px;
}

.automation-rule-row.selected {
  background: #164f80;
  color: #ffffff;
}

.automation-rule-row.selected span,
.automation-rule-row.selected small {
  color: #d9efff;
}

.rule-toggle {
  min-height: 24px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 900;
}

.automation-empty-state {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: #d8e5ed;
  border-bottom: 1px solid #30404a;
  font-size: 12px;
}

.automation-empty-state span {
  color: #95aab8;
}

.automation-activity {
  border-top: 1px solid #30404a;
  background: rgba(6, 14, 19, 0.35);
}

.activity-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  color: #dce9f1;
  border-bottom: 1px solid #24343e;
  font-size: 11px;
  text-transform: uppercase;
}

.activity-title span,
.activity-empty {
  color: #8fa3b1;
}

.activity-empty {
  padding: 10px;
  font-size: 12px;
}

.activity-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #24343e;
  font-size: 11px;
}

.activity-row > span {
  color: #39a9ff;
  font-variant-numeric: tabular-nums;
}

.activity-row strong,
.activity-row small {
  display: block;
}

.activity-row strong {
  color: #ecf6fb;
}

.activity-row small {
  color: #8fa3b1;
  margin-top: 2px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(25, 195, 107, 0.14);
}

.status-dot.standby {
  background: var(--yellow);
}

.engine-status-panel {
  min-height: 0;
}

.engine-service-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid #30404a;
  font-size: 12px;
}

.engine-service-row strong,
.engine-service-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.engine-service-row strong {
  color: #e9f4fb;
}

.engine-service-row small {
  color: #95aab8;
  margin-top: 2px;
}

.engine-state {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid #30495a;
  border-radius: 4px;
  color: #dce9f1;
  background: #13222c;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.engine-state.active {
  color: #05150c;
  border-color: #1fd272;
  background: #46df85;
}

.engine-state.partial {
  color: #06131d;
  border-color: #39a9ff;
  background: #5abfff;
}

.engine-state.pending {
  color: #10140a;
  border-color: #d5ab30;
  background: #f2cf58;
}

.engine-state.blocked,
.engine-state.warning {
  color: #ffffff;
  border-color: #ff575d;
  background: #ba1b2b;
}

.danger-btn {
  border-color: rgba(255, 59, 48, 0.65);
  background: linear-gradient(#fff2f1, #ffd0cd);
  color: #7d120d;
}

.run-btn {
  border-color: #249159 !important;
  background: linear-gradient(180deg, #23a966, #12643c) !important;
  color: #ffffff !important;
}

.studio-remote-panel {
  min-height: 0;
}

.studio-remote-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  font-size: 12px;
}

.studio-remote-body div {
  padding: 10px;
  border: 1px solid #d4dbe3;
  border-radius: 5px;
  background: #fff;
}

.studio-remote-body span,
.studio-remote-body small {
  display: block;
  color: #5f6c79;
}

.studio-remote-body strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  color: #121820;
}

.studio-remote-body small {
  grid-column: 1 / -1;
}

.remote-admin-panel {
  min-height: 0;
}

.remote-admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
  padding: 8px;
}

.remote-admin-form input {
  min-width: 0;
  height: 28px;
  border: 1px solid #9ca7b3;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 12px;
}

.remote-admin-form button {
  grid-column: 1 / -1;
}

.remote-dj-list {
  max-height: 62px;
  overflow: auto;
  border-top: 1px solid #d4dae1;
}

.remote-dj-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #d4dae1;
  font-size: 12px;
}

.remote-dj-row strong,
.remote-dj-row span,
.remote-dj-row small {
  display: block;
}

.remote-dj-row small {
  color: #5f6c79;
}

.bottom-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px 128px;
  gap: 8px;
  min-height: 0;
}

.automation-strip {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.automation-strip span {
  color: #95aab8;
  font-size: 11px;
  white-space: nowrap;
}

.automation-strip label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #d8e5ed;
  font-size: 12px;
}

.automation-strip input {
  width: 52px;
  height: 28px;
  color: #dce9f1;
  border: 1px solid #30424d;
  border-radius: 4px;
  background: #111a21;
  padding: 3px 6px;
}

.toggle-on {
  border-color: #2fa853 !important;
  background: linear-gradient(180deg, #2fa853, #176b32) !important;
  color: #ffffff !important;
}

.toggle-off {
  border-color: #6c3030 !important;
  background: linear-gradient(180deg, #4a2527, #1a1012) !important;
  color: #ffb4b4 !important;
}

.voice-console {
  display: grid;
  grid-template-columns: 1.05fr 0.82fr 1.2fr;
  gap: 8px;
  padding: 8px;
  height: 120px;
  font-size: 11px;
}

.mic-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.mic-tabs button,
.voice-console .small-btn {
  min-height: 22px;
  padding: 2px 6px;
  color: #d8e6ef;
  border: 1px solid #334852;
  border-radius: 3px;
  background: linear-gradient(180deg, #25343f, #121b22);
  font-size: 10px;
}

.mic-tabs .selected {
  border-color: #1f8fe8;
  background: linear-gradient(180deg, #268bd9, #145f9f);
}

.mic-body {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 7px;
  align-items: center;
  margin-top: 8px;
}

.mic-symbol {
  height: 60px;
  display: grid;
  place-items: center;
  color: #cfdbe4;
  border: 1px solid #344652;
  border-radius: 4px;
  background: radial-gradient(circle at 50% 35%, #44535e, #111a21 70%);
  font-weight: 800;
}

.mic-actions,
.monitor-bank,
.eq-bank {
  display: grid;
  gap: 5px;
}

.monitor-bank label,
.eq-bank label {
  display: grid;
  gap: 2px;
  color: #d8e5ed;
  font-size: 10px;
}

.monitor-bank input,
.monitor-bank select,
.eq-bank input {
  min-width: 0;
  width: 100%;
  height: 20px;
  color: #dce9f1;
  border: 1px solid #30424d;
  border-radius: 4px;
  background: #111a21;
  accent-color: #1f8fe8;
}

.eq-bank {
  grid-template-columns: repeat(3, 1fr);
  align-content: start;
}

.eq-bank button {
  grid-column: auto;
}

.meter.tall {
  height: 110px;
}

.onair-panel {
  display: grid;
  place-items: center;
  background: #30343a;
  color: #fff;
}

.master-panel {
  min-height: 0;
}

.master-body {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 46px 24px 24px;
  gap: 8px;
  align-items: end;
  height: 110px;
  padding: 8px;
}

.master-volume {
  display: grid;
  align-content: end;
  gap: 5px;
  color: #d8e5ed;
  font-size: 11px;
}

.master-volume input {
  width: 100%;
  accent-color: #238ee8;
}

.master-volume span {
  color: #58bdff;
  font-size: 12px;
}

.master-level {
  align-self: end;
  color: #58bdff;
  font-size: 12px;
}

.master-meter {
  display: grid;
  align-content: end;
  gap: 2px;
  height: 88px;
  padding: 3px;
  border: 1px solid #20252a;
  background: #050607;
}

.master-meter span {
  display: block;
  width: 100%;
}

.master-meter .green {
  height: 54px;
  background: linear-gradient(#35ff62, #0bb34a);
}

.master-meter .yellow {
  height: 18px;
  background: linear-gradient(#fff36d, #e6c200);
}

.master-meter .red {
  height: 10px;
  background: linear-gradient(#ff746e, #ff2018);
}

.onair-light {
  width: 92px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 0 26px rgba(255, 59, 48, 0.65);
  font-weight: 900;
  font-size: 15px;
}

.mic-icon {
  color: #98a1ac;
  font-size: 64px;
  transform: rotate(-20deg);
  line-height: 1;
}

.license-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 12, 0.72);
  padding: 20px;
  z-index: 10;
}

.license-modal.hidden {
  display: none;
}

.license-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid #3f4a56;
  border-radius: 8px;
  background: #f7f9fb;
  box-shadow: var(--shadow);
}

.license-card h1 {
  margin: 16px 0 8px;
  font-size: 28px;
  line-height: 1.1;
  color: #11171d;
}

.license-card p {
  margin: 0 0 20px;
  color: #5c6875;
  line-height: 1.45;
}

.license-card label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #303842;
}

.license-card button {
  width: 100%;
  margin-top: 12px;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  color: #04131d;
  background: linear-gradient(135deg, #00b7ff, #78ffcf);
  font-weight: 900;
}

.license-card small {
  display: block;
  min-height: 18px;
  margin-top: 12px;
  color: #5c6875;
}

.config-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 10, 12, 0.42);
  z-index: 20;
}

.config-modal.hidden {
  display: none;
}

.config-window {
  position: relative;
  width: min(860px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 28px));
  display: grid;
  grid-template-rows: 28px 1fr 45px;
  color: #000;
  background: #dcdcdc;
  border: 1px solid #9b9b9b;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.config-frame-title,
.config-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.config-frame-title {
  padding-left: 8px;
  background: #f7f0ee;
  color: #111;
  font-size: 12px;
}

.config-frame-title button {
  width: 24px;
  height: 24px;
  margin-right: 4px;
  border: 0;
  background: #c64b4b;
  color: #fff;
  font-weight: 800;
}

.config-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 170px 1fr;
  border-top: 1px solid #b5b5b5;
  border-bottom: 1px solid #b5b5b5;
}

.config-sidebar {
  padding: 8px 5px;
  background: #f5f5f5;
  border-right: 1px solid #8d8d8d;
  overflow-y: auto;
}

.config-nav {
  width: 100%;
  position: relative;
  display: block;
  min-height: 19px;
  padding: 1px 3px 1px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000;
  text-align: left;
  font-size: 12px;
  line-height: 1.2;
}

.config-nav::before {
  content: "";
  position: absolute;
  left: 7px;
  top: -7px;
  width: 10px;
  height: 18px;
  border-left: 1px dotted #888;
  border-bottom: 1px dotted #888;
}

.config-nav.root {
  padding-left: 14px;
  font-weight: 500;
}

.config-nav.root::before {
  left: 4px;
  width: 7px;
}

.config-nav.active {
  color: #fff;
  background: #0064c8;
  outline: 1px dotted #111;
}

.config-main {
  min-width: 0;
  overflow-y: auto;
  background: #e7e7e7;
}

.config-main h2 {
  margin: 0 0 18px;
  padding: 10px 14px;
  color: #fff;
  background: #292929;
  font-size: 24px;
  font-weight: 400;
}

.config-main h3 {
  margin: 14px 0 8px;
  font-size: 13px;
}

.config-pane {
  display: none;
  padding: 0 16px 18px;
  font-size: 12px;
}

.config-pane.active {
  display: block;
}

.config-pane label {
  display: block;
  margin: 6px 0;
}

.config-pane input,
.config-pane select,
.config-pane textarea {
  height: 22px;
  margin-left: 6px;
  border: 1px solid #8a8a8a;
  border-radius: 0;
  background: #fff;
  color: #000;
  font-size: 12px;
}

.config-pane input[type="checkbox"],
.config-pane input[type="radio"] {
  width: auto;
  height: auto;
  margin: 0 5px 0 0;
}

.config-pane input[type="range"] {
  accent-color: #777;
}

.config-pane textarea {
  display: block;
  width: 260px;
  height: 74px;
  margin: 6px 0 0;
  resize: none;
}

.form-grid {
  display: grid;
  gap: 7px 10px;
  align-items: end;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(170px, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.form-grid.station-details {
  grid-template-columns: 1fr;
  width: min(420px, 100%);
}

.form-grid label {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  margin: 0;
}

.form-grid.three label {
  grid-template-columns: 62px minmax(0, 1fr);
}

.form-grid label.wide {
  grid-column: 1 / -1;
}

.form-grid input,
.form-grid select {
  width: 100%;
}

.compact-fields input {
  width: 68px;
}

.checkbox-stack {
  margin-top: 10px;
}

.checkbox-stack label {
  margin: 8px 0;
}

.config-toolbar {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: #eeeeee;
  border: 1px solid #9b9b9b;
  border-bottom: 0;
}

.config-toolbar button,
.classic-button,
.config-actions button,
.wide-select button {
  min-width: 70px;
  min-height: 24px;
  border: 1px solid #8f8f8f;
  border-radius: 4px;
  background: linear-gradient(#fff, #d9d9d9);
  color: #000;
  font-size: 12px;
}

.config-toolbar button {
  min-width: 28px;
}

.config-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 12px;
}

.config-table th,
.config-table td {
  padding: 4px 6px;
  border: 1px solid #9b9b9b;
  color: #000;
  text-align: left;
}

.config-table th {
  background: #e6e6e6;
}

.pipeline-grid {
  position: relative;
  width: min(620px, 100%);
  padding: 10px 0 18px;
}

.pipeline-row,
.pipeline-output {
  display: grid;
  grid-template-columns: 88px repeat(3, 82px) 18px;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.pipeline-row span,
.pipeline-output span,
.pipeline-output strong,
.pipeline-output em {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid #909090;
  border-radius: 3px;
  background: #fff;
  color: #000;
  font-style: normal;
  font-weight: 700;
}

.pipeline-row b,
.pipeline-output b {
  display: grid;
  place-items: center;
  min-height: 31px;
  border: 1px solid #4b8ed7;
  border-radius: 3px;
  background: linear-gradient(#fff, #9edaff);
  color: #000;
}

.pipeline-row i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #9be45a, #398a16);
  border: 1px solid #376d11;
}

.pipeline-output {
  grid-template-columns: 88px repeat(3, 82px) 82px 92px 82px;
  margin-top: 34px;
}

.pipeline-output strong {
  background: #dff7f3;
}

.pipeline-output em {
  background: #d8f5ff;
}

.inline-field,
.priority-slider,
.wide-select {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crossfade-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 22px;
}

.config-pane fieldset {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #b6b6b6;
}

.config-pane legend {
  font-weight: 700;
}

.fade-graph {
  height: 175px;
  margin-top: 12px;
  border: 1px solid #8d8d8d;
  background:
    linear-gradient(90deg, rgba(0, 190, 0, 0.9) 0 48%, rgba(0, 0, 220, 0.9) 52% 100%),
    linear-gradient(#0f0 1px, transparent 1px),
    linear-gradient(90deg, #0f0 1px, transparent 1px);
  background-size: auto, 16px 16px, 16px 16px;
}

.fade-graph span {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 48% 46%, transparent 0 28%, rgba(231, 231, 231, 0.9) 29% 32%, transparent 33%);
}

.registration-list {
  display: grid;
  grid-template-columns: 120px 160px;
  gap: 6px 8px;
  width: 300px;
  margin: 12px 0;
  text-align: right;
}

.registration-list dd {
  margin: 0;
  text-align: left;
}

.config-copyright {
  position: absolute;
  right: 24px;
  bottom: 52px;
  color: #777;
  font-style: italic;
}

.config-actions {
  justify-content: flex-end;
  gap: 10px;
  padding: 8px 10px;
  background: #d7d7d7;
}

/* AirDeck settings redesign */
.config-modal {
  padding: 24px;
  background:
    radial-gradient(circle at 24% 18%, rgba(28, 139, 226, 0.16), transparent 34%),
    rgba(3, 7, 10, 0.78);
  backdrop-filter: blur(3px);
}

.config-window {
  width: min(1040px, calc(100vw - 36px));
  height: min(690px, calc(100vh - 36px));
  grid-template-rows: 58px 1fr 58px;
  color: #dce9f1;
  background: #0c141b;
  border: 1px solid #2a4658;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(91, 169, 223, 0.08) inset;
}

.config-frame-title {
  padding: 0 12px 0 18px;
  background: linear-gradient(180deg, #172632, #0d161d);
  color: #e9f5fb;
  border-bottom: 1px solid #2c4250;
}

.config-brand {
  display: grid;
  gap: 3px;
}

.config-brand strong {
  font-size: 15px;
  letter-spacing: 0;
}

.config-brand span {
  color: #8fa6b6;
  font-size: 11px;
}

.config-frame-title button {
  width: 34px;
  height: 30px;
  margin: 0;
  border: 1px solid #4b2630;
  border-radius: 5px;
  background: linear-gradient(180deg, #9f2330, #64151f);
  color: #ffe4e4;
  font-size: 12px;
}

.config-body {
  grid-template-columns: 230px minmax(0, 1fr);
  border: 0;
  background: #0b1218;
}

.config-sidebar {
  padding: 12px;
  background: linear-gradient(180deg, #0f1a22, #0a1117);
  border-right: 1px solid #263946;
}

.config-nav {
  min-height: 36px;
  margin: 0 0 6px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #aac1d0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.config-nav::before,
.config-nav.root::before {
  display: none;
}

.config-nav:hover {
  color: #f4fbff;
  border-color: #2d4758;
  background: #13232d;
}

.config-nav.active {
  color: #fff;
  outline: 0;
  border-color: #207ec9;
  background: linear-gradient(180deg, #1f75ba, #14517e);
  box-shadow: 0 0 0 1px rgba(89, 181, 255, 0.16) inset;
}

.config-main {
  background:
    linear-gradient(180deg, rgba(31, 49, 61, 0.84), rgba(15, 25, 32, 0.94)),
    #101a22;
}

.config-main h2 {
  min-height: 58px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 18px;
  color: #f3fbff;
  background: linear-gradient(180deg, #1d303c, #14232d);
  border-bottom: 1px solid #2f4655;
  font-size: 22px;
  font-weight: 800;
}

.config-main h3 {
  margin: 16px 0 10px;
  color: #e9f4fb;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.config-pane {
  padding: 18px;
  color: #d5e4ed;
  font-size: 12px;
}

.config-pane.active {
  display: grid;
  gap: 14px;
}

.config-pane label {
  color: #a9bdca;
}

.config-pane input,
.config-pane select,
.config-pane textarea {
  height: 32px;
  margin-left: 8px;
  border: 1px solid #345061;
  border-radius: 5px;
  background: #0a131a;
  color: #eaf6fc;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.config-pane input:focus,
.config-pane select:focus,
.config-pane textarea:focus {
  outline: 2px solid rgba(35, 142, 232, 0.35);
  border-color: #238ee8;
}

.config-pane input[type="checkbox"],
.config-pane input[type="radio"] {
  accent-color: #238ee8;
}

.config-pane input[type="range"] {
  accent-color: #238ee8;
}

.config-pane textarea {
  width: min(420px, 100%);
  height: 96px;
  padding: 8px;
}

.form-grid {
  gap: 12px;
}

.form-grid label,
.form-grid.three label {
  grid-template-columns: 112px minmax(0, 1fr);
}

.form-grid.station-details {
  width: min(560px, 100%);
}

.checkbox-stack {
  display: grid;
  gap: 9px;
  margin-top: 0;
  padding: 14px;
  border: 1px solid #263f4f;
  border-radius: 6px;
  background: #0f1b23;
}

.checkbox-stack label {
  margin: 0;
}

.config-toolbar {
  height: auto;
  min-height: 40px;
  padding: 8px;
  gap: 8px;
  color: #b9ccd7;
  background: #0f1b23;
  border: 1px solid #263f4f;
  border-radius: 6px;
}

.config-toolbar button,
.classic-button,
.config-actions button,
.wide-select button {
  min-height: 32px;
  border: 1px solid #36566a;
  border-radius: 5px;
  background: linear-gradient(180deg, #223644, #101d26);
  color: #e8f5fb;
  font-weight: 800;
}

.config-toolbar button:hover,
.classic-button:hover,
.config-actions button:hover,
.wide-select button:hover {
  border-color: #238ee8;
}

.config-table {
  background: #0d171e;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #263f4f;
  border-radius: 6px;
  overflow: hidden;
  color: #dbeaf2;
}

.config-table th,
.config-table td {
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #263744;
  color: #dbeaf2;
}

.config-table th {
  background: #152531;
  color: #9fb7c6;
}

.pipeline-grid {
  width: min(700px, 100%);
  padding: 4px;
  border: 1px solid #263f4f;
  border-radius: 6px;
  background: #0f1b23;
}

.pipeline-row,
.pipeline-output {
  grid-template-columns: 100px repeat(3, minmax(64px, 1fr)) 18px;
  margin: 8px;
}

.pipeline-row span,
.pipeline-output span,
.pipeline-output strong,
.pipeline-output em {
  min-height: 34px;
  border-color: #36566a;
  border-radius: 5px;
  background: linear-gradient(180deg, #182b37, #0c161d);
  color: #e8f5fb;
}

.pipeline-row b,
.pipeline-output b {
  min-height: 32px;
  border-color: #2479bf;
  border-radius: 5px;
  background: linear-gradient(180deg, #238ee8, #14598d);
  color: #fff;
}

.pipeline-output strong {
  background: linear-gradient(180deg, #1ba964, #0f5f39);
}

.pipeline-output em {
  background: linear-gradient(180deg, #37556a, #182935);
}

.crossfade-layout {
  gap: 16px;
}

.config-pane fieldset {
  margin: 0;
  padding: 14px;
  border: 1px solid #263f4f;
  border-radius: 6px;
  background: #0f1b23;
}

.config-pane legend {
  padding: 0 6px;
  color: #e9f4fb;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.fade-graph {
  height: 180px;
  border: 1px solid #29485d;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(31, 195, 107, 0.72) 0 48%, rgba(35, 142, 232, 0.72) 52% 100%),
    linear-gradient(rgba(181, 218, 238, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181, 218, 238, 0.14) 1px, transparent 1px),
    #0b141b;
  background-size: auto, 18px 18px, 18px 18px;
}

.fade-graph span {
  background:
    radial-gradient(ellipse at 50% 50%, transparent 0 26%, rgba(15, 25, 32, 0.88) 27% 31%, transparent 32%);
}

.registration-list {
  grid-template-columns: 160px 1fr;
  width: min(460px, 100%);
  padding: 16px;
  border: 1px solid #263f4f;
  border-radius: 6px;
  background: #0f1b23;
  text-align: right;
}

.registration-list dt {
  color: #8fa6b6;
}

.registration-list dd {
  color: #eaf6fc;
}

.config-copyright {
  color: #7f96a6;
}

.config-actions {
  padding: 12px 14px;
  border-top: 1px solid #2c4250;
  background: linear-gradient(180deg, #101b23, #0a1117);
}

.config-save-status {
  margin-right: auto;
  color: #8fa6b6;
  font-size: 12px;
}

.config-save-status[data-state="saving"] {
  color: #ffd84d;
}

.config-save-status[data-state="saved"] {
  color: #7ff0ad;
}

.config-save-status[data-state="error"] {
  color: #ff9a9a;
}

.config-actions button:first-child {
  border-color: #249159;
  background: linear-gradient(180deg, #23a966, #12643c);
}

.module-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 10, 0.58);
  backdrop-filter: blur(2px);
}

.module-modal.hidden {
  display: none;
}

.module-window {
  width: min(760px, calc(100vw - 36px));
  max-height: min(620px, calc(100vh - 36px));
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) 56px;
  color: #dce9f1;
  background: #0c141b;
  border: 1px solid #2a4658;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
}

.module-titlebar,
.module-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: linear-gradient(180deg, #172632, #0d161d);
  border-bottom: 1px solid #2c4250;
}

.module-titlebar {
  justify-content: space-between;
}

.module-titlebar div {
  display: grid;
  gap: 3px;
}

.module-titlebar strong {
  color: #f3fbff;
  font-size: 15px;
}

.module-titlebar span,
.module-actions span {
  color: #8fa6b6;
  font-size: 11px;
}

.module-titlebar button,
.module-actions button,
.editor-actions button {
  min-height: 30px;
  border: 1px solid #36566a;
  border-radius: 5px;
  background: linear-gradient(180deg, #223644, #101d26);
  color: #e8f5fb;
  font-size: 12px;
  font-weight: 800;
}

.module-titlebar button {
  width: 34px;
  border-color: #4b2630;
  background: linear-gradient(180deg, #9f2330, #64151f);
  color: #ffe4e4;
}

.module-pane {
  display: none;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(31, 49, 61, 0.84), rgba(15, 25, 32, 0.96)),
    #101a22;
}

.module-pane.active {
  display: grid;
  gap: 14px;
}

.module-pane h3 {
  margin: 2px 0 0;
  color: #e9f4fb;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.module-grid {
  display: grid;
  gap: 10px;
}

.module-grid.two {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.module-grid label,
.module-check {
  display: grid;
  grid-template-columns: minmax(150px, 0.62fr) minmax(90px, 1fr);
  align-items: center;
  gap: 10px;
  color: #a9bdca;
  font-size: 12px;
}

.module-check {
  display: flex;
}

.module-pane input,
.module-pane select,
.module-pane textarea {
  min-height: 32px;
  border: 1px solid #345061;
  border-radius: 5px;
  background: #0a131a;
  color: #eaf6fc;
  font: inherit;
}

.module-pane input[type="checkbox"] {
  min-height: auto;
  accent-color: #238ee8;
}

.script-grid label {
  grid-template-columns: 150px minmax(260px, 1fr);
}

.script-grid label input[type="checkbox"] {
  justify-self: start;
}

.script-grid label:has(input[type="checkbox"]) {
  grid-template-columns: auto 120px minmax(260px, 1fr);
}

.clockwheel-editor {
  min-height: 270px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
}

.clockwheel-editor textarea {
  width: 100%;
  min-height: 270px;
  padding: 12px;
  resize: vertical;
  color: #d8f5ff;
  background:
    linear-gradient(90deg, rgba(35, 142, 232, 0.08) 0 1px, transparent 1px),
    #071017;
  background-size: 28px 100%;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.45;
}

.editor-actions {
  display: grid;
  gap: 8px;
  align-content: start;
}

.module-actions {
  justify-content: flex-end;
  border-top: 1px solid #2c4250;
  border-bottom: 0;
}

.module-actions span {
  margin-right: auto;
}

.module-actions button:first-of-type {
  border-color: #249159;
  background: linear-gradient(180deg, #23a966, #12643c);
}

.picker-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 10, 0.48);
  backdrop-filter: blur(2px);
}

.picker-modal.hidden {
  display: none;
}

.picker-window {
  width: min(620px, calc(100vw - 36px));
  max-height: min(560px, calc(100vh - 36px));
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) 56px;
  color: #dce9f1;
  background: #0c141b;
  border: 1px solid #2a4658;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
}

.picker-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 240px;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #172632, #101a22);
}

.picker-browser,
.picker-options {
  min-height: 0;
  border: 1px solid #263f4f;
  border-radius: 6px;
  background: #0f1b23;
}

.picker-browser {
  overflow: auto;
}

.picker-tree {
  display: grid;
  gap: 3px;
  padding: 8px;
}

.picker-tree button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #dce9f1;
  text-align: left;
  font-size: 12px;
}

.picker-tree button:hover,
.picker-tree button.selected {
  border-color: #2479bf;
  background: #132c3e;
}

.picker-options {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
}

.picker-options fieldset {
  margin: 0;
  padding: 10px;
  border: 1px solid #30495a;
  border-radius: 6px;
}

.picker-options legend {
  color: #e9f4fb;
  font-size: 12px;
  font-weight: 800;
}

.picker-options label {
  display: block;
  margin: 7px 0;
  color: #a9bdca;
  font-size: 12px;
}

.directory-options.hidden {
  display: none;
}

.compact-module {
  width: min(430px, calc(100vw - 36px));
  grid-template-rows: 58px minmax(280px, 1fr) 56px;
}

.relay-detail-window {
  width: min(520px, calc(100vw - 36px));
}

.encoder-detail-window {
  width: min(760px, calc(100vw - 36px));
}

.automation-rule-window {
  width: min(680px, calc(100vw - 36px));
}

.program-scheduler-window {
  width: min(1180px, calc(100vw - 36px));
  height: min(760px, calc(100vh - 36px));
}

.program-scheduler-pane {
  min-height: 0;
  padding: 14px;
  overflow: hidden;
}

.program-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2d4657;
}

.program-calendar-toolbar strong,
.program-editor h3 {
  color: #f2f8fc;
  font-size: 13px;
  text-transform: uppercase;
}

.program-calendar-toolbar span {
  display: block;
  margin-top: 3px;
  color: #8fa3b1;
  font-size: 12px;
}

.program-scheduler-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 12px;
  height: calc(100% - 52px);
  min-height: 0;
}

.program-calendar-grid {
  display: grid;
  grid-template-columns: 58px repeat(7, minmax(92px, 1fr));
  grid-auto-rows: minmax(42px, auto);
  min-height: 0;
  overflow: auto;
  border: 1px solid #30495a;
  border-radius: 6px;
  background: #09131a;
}

.program-time-rail,
.program-day-heading,
.program-hour,
.program-day-cell {
  border-right: 1px solid #243946;
  border-bottom: 1px solid #243946;
}

.program-day-heading,
.program-hour {
  display: grid;
  place-items: center;
  color: #b9cbd6;
  background: #111f29;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.program-hour {
  color: #39a9ff;
  font-variant-numeric: tabular-nums;
}

.program-day-cell {
  min-height: 52px;
  padding: 3px;
}

.program-block {
  display: grid;
  width: 100%;
  gap: 1px;
  margin-bottom: 3px;
  padding: 6px;
  text-align: left;
  color: #eaf6fc;
  border: 1px solid #1e77b8;
  border-radius: 5px;
  background: linear-gradient(180deg, #1a72b8, #124f82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.program-block.selected {
  border-color: #72d4ff;
  box-shadow: 0 0 0 2px rgba(57, 169, 255, 0.24);
}

.program-block.conflict {
  border-color: #ff575d;
  background: linear-gradient(180deg, #8f2530, #571822);
}

.program-block.conflict.selected {
  border-color: #ff9aa0;
  box-shadow: 0 0 0 2px rgba(255, 87, 93, 0.28);
}

.program-block.disabled {
  opacity: 0.48;
}

.program-block strong,
.program-block span,
.program-block small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-block strong {
  font-size: 11px;
}

.program-block span,
.program-block small {
  color: #d4ecfb;
  font-size: 10px;
}

.program-editor {
  min-height: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid #30495a;
  border-radius: 6px;
  background: #0e1a22;
}

.program-editor h3 {
  margin: 0 0 12px;
}

.program-days {
  margin-top: 12px;
  padding: 10px;
  color: #a9bdca;
  border: 1px solid #30495a;
  border-radius: 6px;
}

.program-days legend {
  color: #eef7fc;
  font-weight: 900;
}

.program-days label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 4px 8px 4px 0;
  font-size: 12px;
}

.program-rotation {
  display: grid;
  gap: 10px;
}

.program-rotation .program-rotation-toggle {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  color: #dff4ff;
  font-weight: 800;
}

.program-rotation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.program-rotation-grid label {
  display: grid;
  grid-template-columns: 1fr 66px;
  gap: 5px 7px;
  align-items: center;
  margin: 0;
  padding: 8px;
  border: 1px solid #203744;
  border-radius: 5px;
  background: #091720;
}

.program-rotation-grid input {
  min-width: 0;
  height: 28px;
  padding: 4px 6px;
  color: #eef7fc;
  border: 1px solid #365161;
  border-radius: 4px;
  background: #061119;
}

.program-rotation-grid span {
  grid-column: 1 / -1;
  color: #7f98a6;
  font-size: 10px;
}

.program-exceptions {
  display: grid;
  gap: 10px;
}

.program-exception-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.program-exception-grid label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.program-exception-grid .wide {
  grid-column: 1 / -1;
}

.program-exception-grid input,
.program-exception-grid select {
  width: 100%;
  min-height: 30px;
  padding: 5px 7px;
  color: #eef7fc;
  border: 1px solid #365161;
  border-radius: 4px;
  background: #061119;
}

.program-exception-list {
  display: grid;
  gap: 6px;
}

.program-exception-row,
.empty-exception {
  padding: 8px;
  border: 1px solid #203744;
  border-radius: 5px;
  background: #091720;
}

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

.program-exception-row strong,
.program-exception-row small {
  display: block;
}

.program-exception-row small,
.empty-exception {
  color: #8ca7b6;
  font-size: 11px;
}

.display-control-window {
  grid-template-rows: 58px minmax(280px, 1fr) 56px;
}

.display-control-pane {
  align-content: start;
  padding: 14px;
}

.display-control-pane label {
  display: grid;
  gap: 6px;
  color: #a9bdca;
  font-size: 12px;
}

.display-control-pane input {
  width: 100%;
  min-height: 32px;
  padding: 7px 9px;
  color: #edf8ff;
  border: 1px solid #30495a;
  border-radius: 5px;
  background: #08131a;
}

.display-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.display-mode-grid button {
  min-height: 42px;
  color: #eaf6fc;
  border: 1px solid #2d5974;
  border-radius: 6px;
  background: linear-gradient(180deg, #1a3c52, #102532);
  font-weight: 900;
}

.display-mode-grid button:hover {
  border-color: #39a9ff;
  background: linear-gradient(180deg, #1f6fa5, #144868);
}

.display-profile-card {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px;
  color: #b9cfdb;
  border: 1px solid #30495a;
  border-radius: 6px;
  background: #0b171f;
}

.display-profile-card strong {
  color: #f1f8fc;
}

.second-screen-page {
  min-height: 100vh;
  overflow: hidden;
  color: #edf8ff;
  background: radial-gradient(circle at top left, #17344b, #071016 42%, #04090d 100%);
}

.screen-wall {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 112px 1fr;
  gap: 16px;
  padding: 18px;
}

.screen-hero {
  display: grid;
  grid-template-columns: 1fr 300px 280px;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border: 1px solid #29475a;
  border-radius: 8px;
  background: rgba(8, 18, 25, 0.82);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

.screen-hero span,
.screen-panel h2 {
  color: #7fb9da;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.screen-hero strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(24px, 3vw, 42px);
}

.screen-onair {
  display: grid;
  place-items: center;
  min-height: 66px;
  color: #ffffff;
  border-radius: 7px;
  background: linear-gradient(180deg, #ff4248, #b70818);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 950;
  letter-spacing: 0;
}

#screenClock {
  color: #39a9ff;
  text-align: right;
  font-size: clamp(30px, 4.4vw, 58px);
  font-variant-numeric: tabular-nums;
}

.screen-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) minmax(260px, 0.8fr) minmax(420px, 1.1fr);
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}

.screen-panel {
  min-height: 0;
  overflow: hidden;
  padding: 20px;
  border: 1px solid #29475a;
  border-radius: 8px;
  background: rgba(9, 20, 27, 0.88);
}

.screen-panel h2 {
  margin: 0 0 14px;
}

.now-playing {
  grid-row: span 2;
}

.now-playing > strong {
  display: block;
  margin-top: 30px;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1;
}

.now-playing > span {
  display: block;
  margin-top: 14px;
  color: #bad4e5;
  font-size: clamp(22px, 2.8vw, 36px);
}

.now-playing > small {
  display: block;
  margin-top: 18px;
  color: #80a6bd;
  font-size: 17px;
}

.screen-wave {
  height: 58px;
  margin-top: 32px;
  overflow: hidden;
  border: 1px solid #31556b;
  background: repeating-linear-gradient(90deg, #2b3b47 0 4px, #172630 4px 7px);
}

.screen-wave span {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(90deg, #1597ef 0 4px, #2fc2ff 4px 7px);
}

.screen-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #203846;
}

.screen-metric span {
  color: #8eb0c4;
  font-size: 17px;
}

.screen-metric strong {
  color: #6ee680;
  font-size: clamp(26px, 3.5vw, 44px);
}

.screen-list-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 72px;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #203846;
}

.screen-list-row span,
.screen-list-row small {
  color: #7fb9da;
  font-variant-numeric: tabular-nums;
}

.screen-list-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-empty {
  color: #7f9bad;
  padding: 16px 0;
}

.screen-remote strong {
  display: block;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 54px);
}

.screen-remote span {
  color: #8eb0c4;
  font-size: 20px;
}

.screen-director {
  display: none;
}

.screen-director-row {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 14px;
  padding: 13px 0;
  border-bottom: 1px solid #203846;
}

.screen-director-row span {
  grid-row: 1 / span 2;
  color: #39a9ff;
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.screen-director-row strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
}

.screen-director-row small {
  color: #8eb0c4;
  font-size: 14px;
}

body[data-screen-mode="clock"] .screen-grid {
  grid-template-columns: 1fr;
}

body[data-screen-mode="clock"] .screen-panel:not(.now-playing) {
  display: none;
}

body[data-screen-mode="queue"] .screen-grid {
  grid-template-columns: 1fr 1fr;
}

body[data-screen-mode="queue"] .screen-panel:not(.screen-queue):not(.screen-programs) {
  display: none;
}

body[data-screen-mode="director"] .screen-grid {
  grid-template-columns: minmax(440px, 0.9fr) minmax(580px, 1.2fr);
}

body[data-screen-mode="director"] .screen-panel:not(.now-playing):not(.screen-director) {
  display: none;
}

body[data-screen-mode="director"] .screen-director {
  display: block;
}

.plugin-select-pane {
  padding: 14px;
  align-content: start;
}

.plugin-option-list {
  display: grid;
  gap: 6px;
}

.plugin-option {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  color: #dce9f1;
  border: 1px solid #263f4f;
  border-radius: 6px;
  background: #0f1b23;
  font-size: 12px;
}

.plugin-option:hover,
.plugin-option.selected {
  border-color: #238ee8;
  background: #132c3e;
}

.plugin-option input {
  accent-color: #238ee8;
}

.plugin-detail {
  min-height: 78px;
  margin-top: 12px;
  padding: 12px;
  color: #93a8b7;
  border: 1px solid #263f4f;
  border-radius: 6px;
  background: #0a131a;
  font-size: 12px;
}

.relay-detail-pane,
.encoder-detail-pane,
.automation-rule-pane {
  align-content: start;
}

.module-help {
  margin: 0;
  color: #93a8b7;
  font-size: 12px;
}

.module-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2d4657;
}

.module-tabs button {
  min-height: 30px;
  padding: 0 12px;
  color: #b7cad6;
  border: 1px solid #36566a;
  border-radius: 5px;
  background: linear-gradient(180deg, #223644, #101d26);
  font-size: 12px;
  font-weight: 800;
}

.module-tabs button.active {
  color: #ffffff;
  border-color: #238ee8;
  background: linear-gradient(180deg, #268bd9, #145f9f);
}

.encoder-tab-pane,
.server-detail-pane {
  display: none;
}

.encoder-tab-pane.active,
.server-detail-pane.active {
  display: grid;
  gap: 14px;
}

.module-radio-band {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  padding: 10px 12px;
  color: #a9bdca;
  border: 1px solid #30495a;
  border-radius: 6px;
  background: #0f1b23;
  font-size: 12px;
}

.module-radio-band legend {
  color: #e9f4fb;
  font-weight: 800;
}

.station-stream-details {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #2d4657;
}

.module-grid .wide {
  grid-column: 1 / -1;
}

.archive-fields {
  margin-top: 12px;
}

.no-server-copy {
  padding: 16px;
  color: #a9bdca;
  border: 1px solid #30495a;
  border-radius: 6px;
  background: #0f1b23;
}

.no-server-copy strong {
  color: #f1f8fc;
}

.no-server-copy p {
  max-width: 520px;
  margin: 8px 0 0;
  line-height: 1.5;
}

.automation-rule-notes {
  display: grid;
  gap: 6px;
  color: #a9bdca;
  font-size: 12px;
}

.automation-rule-notes textarea {
  width: 100%;
  min-height: 86px;
  margin: 0;
  padding: 10px;
  resize: vertical;
}

.icecast-extra.hidden {
  display: none;
}

.shoutcast-v2-field.hidden {
  display: none;
}

.config-table tr.selected td,
.encoder-row.selected {
  background: #164f80 !important;
  color: #ffffff;
}

.encoder-row.selected small {
  color: #d9efff;
}

@media (max-width: 760px) {
  .module-window {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .module-grid.two,
  .clockwheel-editor {
    grid-template-columns: 1fr;
  }

  .module-grid label,
  .script-grid label,
  .script-grid label:has(input[type="checkbox"]) {
    grid-template-columns: 1fr;
  }

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

  .picker-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .config-modal {
    padding: 10px;
  }

  .config-window {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    grid-template-rows: 64px 1fr 58px;
  }

  .config-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .config-sidebar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #263946;
  }

  .config-nav {
    flex: 0 0 auto;
    width: auto;
    min-height: 34px;
    margin: 0;
    white-space: nowrap;
  }

  .config-pane.active {
    padding: 14px;
  }

  .form-grid.two,
  .form-grid.three,
  .crossfade-layout {
    grid-template-columns: 1fr;
  }

  .form-grid label,
  .form-grid.three label {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .config-pane input,
  .config-pane select,
  .config-pane textarea {
    margin-left: 0;
  }
}

.remote-body {
  background: #101216;
}

.remote-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #20252b 0%, #111419 100%);
}

.remote-topbar {
  min-height: 56px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  color: #f5f8fb;
  background: #0e1217;
  border-bottom: 1px solid #39404a;
}

.remote-status {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #dbe5ed;
}

.remote-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 360px;
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "hero side"
    "decks side"
    "queue side"
    "requests side";
  gap: 10px;
  padding: 10px;
  min-height: calc(100vh - 56px);
}

.remote-hero {
  grid-area: hero;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(135deg, #f7fbff, #dff5ff);
}

.remote-show span {
  display: block;
  color: #536170;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.remote-show h1 {
  margin: 6px 0;
  color: #101820;
  font-size: 30px;
  line-height: 1.05;
}

.remote-show p {
  margin: 0;
  color: #4d5966;
}

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

.remote-primary,
.remote-secondary {
  min-height: 38px;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 900;
}

.remote-primary {
  border: 0;
  color: #03131d;
  background: linear-gradient(135deg, #00b7ff, #78ffcf);
}

.remote-secondary {
  border: 1px solid #9ba5b0;
  color: #121820;
  background: linear-gradient(#fff, #dfe5eb);
}

.remote-primary:disabled,
.remote-secondary:disabled,
.small-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.remote-decks {
  grid-area: decks;
}

.remote-deck-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
}

.remote-deck-row article {
  min-height: 92px;
  padding: 12px;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  background: #ffffff;
}

.remote-deck-row span,
.remote-deck-row small {
  display: block;
  color: #64717f;
  font-size: 12px;
}

.remote-deck-row strong {
  display: block;
  margin: 6px 0;
  color: #101820;
  font-size: 16px;
  line-height: 1.15;
}

.remote-queue {
  grid-area: queue;
  min-height: 0;
  overflow: auto;
}

.remote-requests {
  grid-area: requests;
  min-height: 140px;
  overflow: auto;
}

.remote-side {
  grid-area: side;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px;
  min-height: 0;
}

.remote-form {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.remote-form label {
  color: #303842;
  font-size: 12px;
  font-weight: 800;
}

.remote-form input {
  border: 1px solid #9ca7b3;
  border-radius: 5px;
  padding: 9px 10px;
  outline-color: var(--cyan);
}

.remote-form small {
  color: #5c6875;
}

.permission-list,
.connection-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  font-size: 12px;
}

.permission-list span,
.connection-list span {
  padding: 8px;
  border: 1px solid #d4dbe3;
  border-radius: 5px;
  background: #fff;
}

.remote-audit {
  min-height: 0;
  overflow: auto;
}

.audit-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 4px 8px;
  padding: 8px;
  border-bottom: 1px solid #d4dae1;
  font-size: 12px;
}

.audit-row small {
  grid-column: 2;
  color: #5d6874;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-rows: auto 1fr;
  }

  .deck-grid,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .deck-body {
    grid-template-columns: 92px 1fr 58px;
  }

  .right-stack,
  .center-stack {
    grid-template-rows: auto;
  }
}

@media (max-width: 980px) {
  .remote-topbar,
  .remote-grid {
    grid-template-columns: 1fr;
  }

  .remote-status,
  .remote-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .remote-status {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .remote-grid {
    grid-template-areas:
      "hero"
      "decks"
      "queue"
      "requests"
      "side";
  }
}

/* Server admin lives outside the studio automation console. */
.admin-body {
  background: #101820;
}

.admin-shell {
  min-height: 100vh;
  color: #d8e5ed;
  background: #101820;
}

.admin-topbar {
  min-height: 54px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  align-items: center;
  background: linear-gradient(180deg, #141c23, #0b1015);
  border-bottom: 1px solid #2f3b45;
}

.admin-menu {
  justify-content: flex-end;
  padding: 0 12px;
}

.admin-menu .menu-link {
  color: #d8e4ec;
  border-color: #334852;
  background: linear-gradient(180deg, #25343f, #121b22);
}

.admin-grid {
  display: grid;
  grid-template-columns: 380px minmax(520px, 1fr) 330px;
  gap: 8px;
  padding: 8px;
}

.admin-grid .panel {
  color: #d8e5ed;
  background: linear-gradient(180deg, #1d2a33, #17232b);
  border-color: #344652;
  border-radius: 4px;
}

.admin-grid .panel-title {
  color: #e8f4fb;
  background: linear-gradient(180deg, #1a252d, #111920);
  border-bottom-color: #31414d;
}

.admin-form {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.admin-form label {
  display: grid;
  gap: 5px;
  color: #95aab8;
  font-size: 12px;
  font-weight: 700;
}

.admin-form input {
  min-height: 34px;
  color: #dce9f1;
  border: 1px solid #30424d;
  border-radius: 4px;
  background: #111a21;
  padding: 6px 8px;
}

.admin-check {
  grid-template-columns: auto 1fr !important;
  align-items: center;
}

.admin-check input {
  min-height: auto;
}

.admin-form small {
  color: #95aab8;
}

.admin-list-card {
  min-height: 520px;
  overflow: auto;
}

.admin-grid table {
  color: #d9e6ee;
}

.admin-grid thead {
  background: #111920;
  color: #bcd0dc;
}

.admin-grid th,
.admin-grid td {
  border-color: #30404a;
}

.admin-side {
  display: grid;
  align-content: start;
  gap: 8px;
}

@media (max-width: 1100px) {
  .admin-topbar,
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .menu {
    overflow-x: auto;
  }

  .top-status {
    flex-wrap: wrap;
  }

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

  .album-art {
    min-height: 96px;
  }

  .mixer {
    grid-template-columns: 1fr 28px;
    height: 88px;
  }

  .bottom-tools {
    grid-template-columns: 1fr;
  }

  .remote-deck-row {
    grid-template-columns: 1fr;
  }

  .remote-actions {
    width: 100%;
    flex-direction: column;
  }
}

/* Main cockpit visual target: modern AirDeck broadcast console. */
.app-shell {
  background: #0f171d;
}

.app-shell .topbar {
  height: 54px;
  grid-template-columns: 260px minmax(460px, 1fr) auto 86px;
  gap: 0;
  padding: 0;
  background: linear-gradient(180deg, #141c23, #0b1015);
  border-bottom: 1px solid #2f3b45;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.app-shell .brand {
  height: 54px;
  min-width: 0;
  padding: 0 14px;
  border-right: 1px solid #2f3b45;
}

.hamburger {
  width: 28px;
  height: 28px;
  border: 0;
  color: #cfe4f2;
  background: transparent;
  font-size: 22px;
  line-height: 1;
}

.brand-logo {
  color: #22a9ff;
  font-weight: 900;
  font-size: 25px;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(34, 169, 255, 0.32);
}

.brand-logo-image {
  width: 116px;
  height: 38px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 8px rgba(34, 169, 255, 0.28));
}

.remote-brand .brand-logo-image {
  width: 122px;
}

.app-shell .brand strong {
  color: #eef7ff;
  font-size: 14px;
}

.app-shell .brand span {
  color: #b4c0ca;
  font-size: 11px;
}

.status-strip {
  height: 54px;
  display: grid;
  grid-template-columns: repeat(4, minmax(128px, 1fr));
}

.status-strip div {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 0 14px;
  color: #d7e6ef;
  border-right: 1px solid #2f3b45;
}

.status-strip span,
.status-strip small {
  color: #a3b1bd;
  font-size: 11px;
}

.status-strip strong {
  color: #eef7ff;
  font-size: 13px;
}

.green-text,
.green-dot-text {
  color: #7be052 !important;
}

.app-shell .menu {
  height: 54px;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid #2f3b45;
}

.app-shell .menu button,
.app-shell .menu-link {
  min-height: 30px;
  color: #d8e4ec;
  border-color: transparent;
  background: transparent;
}

.app-shell .menu button:hover,
.app-shell .menu-link:hover {
  background: #17232c;
  border-color: #2f4758;
}

.app-shell #clock {
  align-self: stretch;
  display: grid;
  place-items: center;
  color: #eef7ff;
  background: #101820;
  font-size: 15px;
  border-left: 1px solid #2f3b45;
}

.app-shell .workspace {
  grid-template-rows: 236px minmax(0, 1fr) 58px;
  gap: 7px;
  padding: 7px;
  min-height: calc(100vh - 54px);
  background: #101820;
}

.app-shell .deck-grid {
  grid-template-columns: repeat(3, minmax(280px, 1fr)) 250px;
  gap: 7px;
}

.app-shell .panel {
  color: #d8e5ed;
  background: linear-gradient(180deg, #1d2a33, #17232b);
  border-color: #344652;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 12px 22px rgba(0, 0, 0, 0.16);
}

.app-shell .panel-title {
  min-height: 28px;
  padding: 5px 9px;
  color: #e8f4fb;
  background: linear-gradient(180deg, #1a252d, #111920);
  border-bottom-color: #31414d;
}

.app-shell .panel-title h2 {
  font-size: 12px;
  text-transform: uppercase;
}

.app-shell .deck .panel-title h2::first-letter {
  color: #ffffff;
}

.app-shell .deck .panel-title::before {
  content: attr(data-badge);
}

.app-shell .deck {
  min-width: 0;
  display: grid;
  grid-template-rows: 28px 72px minmax(0, 1fr);
}

.app-shell .deck .panel-title {
  justify-content: flex-start;
}

.app-shell .deck .panel-title h2 {
  margin-right: auto;
}

.app-shell .deck .panel-title::before {
  width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  margin-right: 8px;
  border-radius: 3px;
  background: #1f8fe8;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.app-shell .deck[data-deck="deckA"] .panel-title::before {
  content: "A";
}

.app-shell .deck[data-deck="deckB"] .panel-title::before {
  content: "B";
}

.app-shell .deck.aux .panel-title::before {
  content: "M";
  background: #8b5cf6;
}

.app-shell .track-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
  padding: 11px 12px 6px 132px;
  color: #d8e7f0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0)),
    #1b2a34;
  border: 0;
}

.app-shell .deck-body {
  position: relative;
  grid-template-columns: 108px minmax(210px, 1fr) 82px;
  grid-template-rows: minmax(0, 1fr);
  height: 136px;
  padding: 0 10px 10px;
  gap: 10px;
}

.app-shell .album-art {
  position: absolute;
  left: 10px;
  top: -62px;
  width: 108px;
  height: 108px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 35% 30%, #5f6f79, #0d141a 68%);
  border-color: #3a4d59;
  padding: 8px;
}

.app-shell .disc {
  width: 88px;
  height: 88px;
  border-radius: 1px;
  color: #dcecf5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
    linear-gradient(160deg, #111820, #33424d);
  font-size: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.app-shell .deck[data-deck="deckA"] .disc {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(160deg, #28333a, #0a1117 55%, #2a485d);
}

.app-shell .deck[data-deck="deckB"] .disc {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(160deg, #86633b, #1a252c 56%, #4a7c95);
}

.app-shell .deck.aux .disc {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent),
    linear-gradient(160deg, #3c334e, #111820 62%, #7161aa);
}

.app-shell .transport {
  grid-column: 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 42px 31px;
  min-height: 0;
}

.app-shell .track-strip span {
  align-self: start;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.app-shell .track-strip strong {
  justify-self: end;
  color: #eef7ff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.app-shell .track-strip strong::before {
  content: "REMAINING";
  display: block;
  margin-bottom: 2px;
  color: #93a9b8;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 9px;
  font-weight: 800;
  text-align: right;
}

.app-shell .transport p {
  color: #ffffff;
  margin: 0;
  color: #c8d8e3;
  font-size: 13px;
  font-weight: 700;
}

.app-shell .transport small {
  margin-top: 2px;
  color: #a9bbc8;
  font-size: 11px;
  line-height: 1.45;
}

.app-shell .wave {
  grid-row: 2;
  align-self: stretch;
  height: 40px;
  margin: 0;
  position: relative;
  border-color: #334957;
  background: repeating-linear-gradient(90deg, #2f3b43 0 2px, #51616a 2px 4px);
}

.app-shell .wave::after {
  content: "";
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 58%;
  width: 2px;
  background: #dfe9ef;
  box-shadow: 0 0 0 4px rgba(223, 233, 239, 0.08);
}

.app-shell .wave::before {
  content: "01:21.0";
  position: absolute;
  left: 0;
  bottom: -15px;
  color: #9db3c1;
  font-size: 10px;
}

.app-shell .wave span {
  background: repeating-linear-gradient(90deg, #2ea8ff 0 2px, #147aca 2px 4px);
}

.app-shell .aux .wave span {
  background: repeating-linear-gradient(90deg, #a77cff 0 2px, #764bdd 2px 4px);
}

.app-shell .buttons {
  grid-row: 3;
  gap: 6px;
  margin: 0;
  align-self: end;
}

.app-shell .icon-btn {
  height: 30px;
  min-width: 38px;
  color: #e6f2f9;
  border-color: #2e4350;
  border-radius: 3px;
  background: linear-gradient(180deg, #263642, #111920);
}

.app-shell .icon-btn.primary {
  color: white;
  border-color: #1f8fe8;
  background: linear-gradient(180deg, #2aa4ff, #116bb4);
}

.app-shell .aux .icon-btn.primary {
  border-color: #8b5cf6;
  background: linear-gradient(180deg, #a879ff, #7042d9);
}

.app-shell .mixer {
  grid-column: 3;
  grid-template-columns: 38px 30px;
  height: 126px;
  color: #b8c6d0;
}

.app-shell .gain-control {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 4px;
  color: #bcd0dc;
  font-size: 11px;
}

.app-shell .gain-control span {
  color: #9fd3ff;
  font-size: 11px;
  line-height: 1.15;
}

.app-shell .gain-slider {
  width: 120px;
  height: 20px;
  transform: rotate(-90deg);
  transform-origin: center;
  align-self: center;
  accent-color: #238ee8;
}

.app-shell .slider,
.app-shell .fader {
  border-color: #536879;
  background: repeating-linear-gradient(180deg, transparent 0 8px, #526573 8px 9px);
}

.app-shell .slider span,
.app-shell .fader i {
  background: linear-gradient(#cfd8df, #798896);
}

.app-shell .meter {
  min-height: 126px;
  border-color: #384b57;
  background: #05090c;
}

.broadcast-tower {
  display: grid;
  grid-template-rows: 60px 52px 1fr;
  gap: 7px;
}

.tower-onair,
.tower-elapsed,
.tower-clock {
  border: 1px solid #344652;
  border-radius: 4px;
  background: #0b1116;
}

.tower-onair {
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(180deg, #ff4245, #e71420);
  box-shadow: 0 0 28px rgba(255, 39, 45, 0.28);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.tower-elapsed {
  display: grid;
  place-items: center;
  color: #ff2b2f;
  font-size: 27px;
  font-family: Consolas, "Courier New", monospace;
}

.tower-clock {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: #58bdff;
}

.tower-clock strong {
  font-size: 25px;
  font-weight: 500;
}

.clock-face {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid #2c9ce5;
  background: radial-gradient(circle at center, #1c2a33, #071017);
  box-shadow: 0 0 0 4px rgba(44, 156, 229, 0.12);
}

.clock-face::before {
  content: "";
  position: absolute;
  inset: 39px;
  border-radius: 50%;
  background: white;
}

.hand {
  position: absolute;
  left: 42px;
  bottom: 42px;
  width: 2px;
  transform-origin: bottom;
  background: white;
}

.hour-hand {
  height: 24px;
  transform: rotate(42deg);
}

.minute-hand {
  height: 34px;
  transform: rotate(72deg);
}

.second-hand {
  height: 36px;
  background: #ff3338;
  transform: rotate(250deg);
}

.app-shell .main-grid {
  grid-template-columns: 300px minmax(520px, 1fr) 740px;
  gap: 7px;
  min-height: 0;
}

.app-shell .library {
  background: linear-gradient(180deg, #17242c, #121b22);
}

.app-shell .search-row,
.app-shell .library-tools,
.app-shell .folder-grid {
  border-color: #30424d;
}

.app-shell .search-row input,
.app-shell .library-tools input {
  color: #dce9f1;
  border-color: #334852;
  background: #101820;
}

.app-shell .library-tools span {
  color: #97adbc;
}

.app-shell .category-tabs button,
.app-shell .small-btn {
  color: #d8e6ef;
  border-color: #334852;
  background: linear-gradient(180deg, #25343f, #121b22);
}

.app-shell .category-tabs button.selected {
  color: white;
  border-color: #1f8fe8;
  background: linear-gradient(180deg, #268bd9, #145f9f);
}

.app-shell .folder,
.app-shell .track-row {
  color: #d8e5ed;
  border-color: #293a44;
}

.app-shell .folder {
  min-height: 22px;
  font-size: 11px;
}

.app-shell .track-row {
  grid-template-columns: 18px 34px minmax(0, 1fr) auto;
  padding: 6px 8px;
  font-size: 11px;
}

.app-shell .track-art {
  width: 34px;
  height: 34px;
}

.app-shell .folder::before {
  width: 14px;
  height: 14px;
  background: #263c4b;
  border-color: #4d6a7c;
}

.app-shell .track-row small,
.app-shell .transport small {
  color: #95aab8;
}

.app-shell table {
  color: #d9e6ee;
  font-size: 11px;
}

.app-shell thead {
  background: #111920;
  color: #bcd0dc;
}

.app-shell th,
.app-shell td {
  border-color: #30404a;
  padding: 5px 7px;
}

.app-shell tbody tr {
  background: rgba(255, 255, 255, 0.01);
}

.app-shell tbody tr:hover {
  background: #213545;
}

.app-shell tbody tr:first-child {
  background: #1c6eb5;
  color: white;
}

.app-shell .encoder-row,
.app-shell .remote-dj-row,
.app-shell .remote-dj-list {
  border-color: #30404a;
}

.app-shell .studio-remote-body div,
.app-shell .remote-admin-form input,
.app-shell .permission-list span,
.app-shell .connection-list span {
  color: #dce9f1;
  border-color: #30424d;
  background: #111a21;
}

.app-shell .studio-remote-body span,
.app-shell .studio-remote-body small,
.app-shell .studio-remote-body strong {
  color: #dce9f1;
}

.app-shell .onair-panel {
  background: #101820;
}

.app-shell .onair-light {
  height: 58px;
  width: 126px;
  color: #ffb4b4;
  background: radial-gradient(circle, #d40e13, #6d070a);
  border: 1px solid #ff2b2f;
}

.studio-footer {
  display: grid;
  grid-template-columns: auto minmax(190px, 0.28fr) minmax(420px, 1fr) auto minmax(180px, 0.42fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  border: 1px solid #273944;
  border-radius: 4px;
  background: linear-gradient(180deg, #131f27, #0e151b);
  color: #d8e5ed;
}

.footer-transport,
.footer-toggles,
.footer-volume {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-btn,
.footer-toggle {
  min-height: 34px;
  padding: 0 16px;
  color: #d8e6ef;
  border: 1px solid #334852;
  border-radius: 4px;
  background: linear-gradient(180deg, #25343f, #121b22);
  font-size: 12px;
  font-weight: 700;
}

.footer-btn.primary {
  border-color: #1f8fe8;
  background: linear-gradient(180deg, #268bd9, #145f9f);
  color: #fff;
}

.footer-volume {
  min-width: 260px;
}

.footer-volume span {
  color: #d8e5ed;
  font-size: 12px;
}

.footer-volume input {
  width: 190px;
  accent-color: #238ee8;
}

.footer-toggles {
  justify-content: flex-end;
}

.footer-toggle {
  min-width: 126px;
}

.footer-crossfade {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #d8e5ed;
  font-size: 12px;
}

.footer-crossfade input {
  width: 48px;
  height: 30px;
  color: #dce9f1;
  border: 1px solid #30424d;
  border-radius: 4px;
  background: #111a21;
}

.footer-status {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  max-width: 300px;
  padding: 0 10px;
  color: #9fb7c6;
  border: 1px solid #30424d;
  border-radius: 4px;
  background: #111a21;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-shell .mic-icon {
  color: #ff3d42;
  font-size: 24px;
  transform: none;
  font-weight: 900;
}

.app-shell.license-locked {
  filter: blur(2px) grayscale(0.2);
}

@media (max-width: 1450px) {
  .app-shell .main-grid {
    grid-template-columns: 280px minmax(440px, 1fr) 520px;
  }

  .app-shell .deck-grid {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }

  .broadcast-tower {
    display: none;
  }
}

/* Remote Studio cockpit: matches the installed console visual language. */
.remote-shell {
  color: #d8e5ed;
  background: #101820;
}

.cockpit-remote-topbar {
  min-height: 54px;
  grid-template-columns: 300px minmax(560px, 1fr) auto;
  gap: 0;
  padding: 0;
  background: linear-gradient(180deg, #141c23, #0b1015);
  border-bottom: 1px solid #2f3b45;
}

.remote-brand {
  height: 54px;
  min-width: 0;
  padding: 0 14px;
  border-right: 1px solid #2f3b45;
}

.remote-status-strip {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.remote-status-strip div {
  min-width: 0;
}

.remote-status-strip strong,
.remote-status-strip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-menu {
  height: 54px;
  align-items: center;
  padding: 0 10px;
  border-left: 1px solid #2f3b45;
}

.remote-menu button,
.remote-menu .menu-link {
  min-height: 30px;
  color: #d8e4ec;
  border-color: transparent;
  background: transparent;
}

.remote-cockpit {
  display: grid;
  grid-template-columns: 330px minmax(520px, 1fr) 420px;
  gap: 7px;
  padding: 7px;
  min-height: calc(100vh - 54px);
  background: #101820;
}

.remote-cockpit .panel {
  color: #d8e5ed;
  background: linear-gradient(180deg, #1d2a33, #17232b);
  border-color: #344652;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 12px 22px rgba(0, 0, 0, 0.16);
}

.remote-cockpit .panel-title {
  min-height: 28px;
  padding: 5px 9px;
  color: #e8f4fb;
  background: linear-gradient(180deg, #1a252d, #111920);
  border-bottom-color: #31414d;
}

.remote-cockpit .panel-title h2 {
  font-size: 12px;
  text-transform: uppercase;
}

.remote-library,
.remote-center,
.remote-right {
  min-height: 0;
}

.remote-library {
  display: flex;
  flex-direction: column;
}

.remote-track-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.remote-upload-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #293a44;
  background: rgba(8, 18, 24, 0.65);
}

.remote-upload-box input {
  min-width: 0;
}

.remote-upload-box small {
  grid-column: 1 / -1;
  color: #8fa8b8;
  font-size: 10px;
}

.remote-track-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid #293a44;
  color: #d8e5ed;
  font-size: 12px;
}

.remote-track-row strong,
.remote-track-row span,
.remote-track-row small {
  display: block;
}

.remote-track-row small {
  color: #95aab8;
  margin-top: 2px;
}

.remote-center {
  display: grid;
  grid-template-rows: minmax(280px, 0.9fr) minmax(300px, 1.1fr);
  gap: 7px;
}

.remote-right {
  display: grid;
  grid-template-rows: auto 198px auto 150px auto minmax(150px, 1fr);
  gap: 7px;
}

.remote-prep-panel,
.remote-live-queue,
.remote-requests,
.remote-audit {
  min-height: 0;
  overflow: auto;
}

.remote-cockpit .search-row,
.remote-cockpit .folder-grid {
  border-color: #30424d;
}

.remote-cockpit input {
  color: #dce9f1;
  border-color: #334852;
  background: #101820;
}

.remote-cockpit .category-tabs button,
.remote-cockpit .small-btn,
.remote-cockpit .remote-secondary {
  color: #d8e6ef;
  border-color: #334852;
  background: linear-gradient(180deg, #25343f, #121b22);
}

.remote-cockpit .category-tabs button.selected,
.remote-cockpit .remote-primary,
.remote-cockpit #takeControlButton {
  color: white;
  border: 1px solid #1f8fe8;
  background: linear-gradient(180deg, #268bd9, #145f9f);
}

.remote-cockpit .danger-btn,
.remote-cockpit #releaseControlButton {
  border-color: rgba(255, 59, 48, 0.68);
  background: linear-gradient(180deg, #3a1c1f, #1a1012);
  color: #ffb4b4;
}

.remote-cockpit table {
  color: #d9e6ee;
  font-size: 12px;
}

.remote-cockpit thead {
  background: #111920;
  color: #bcd0dc;
}

.remote-cockpit th,
.remote-cockpit td {
  border-color: #30404a;
}

.remote-cockpit tbody tr:hover {
  background: #213545;
}

.remote-cockpit tbody tr:first-child {
  background: #1c6eb5;
  color: white;
}

.table-footer {
  padding: 6px 9px;
  color: #95aab8;
  border-top: 1px solid #30404a;
  background: #111920;
  font-size: 12px;
}

.remote-deck-stack {
  display: grid;
  gap: 7px;
  padding: 8px;
}

.remote-deck-stack article {
  min-height: 50px;
  padding: 8px;
  border: 1px solid #344652;
  border-radius: 4px;
  background: #111a21;
}

.remote-deck-stack span,
.remote-deck-stack small {
  display: block;
  color: #95aab8;
  font-size: 11px;
}

.remote-deck-stack strong {
  display: block;
  margin: 2px 0;
  color: #ffffff;
  font-size: 13px;
}

.remote-voice-panel {
  min-height: 0;
}

.voice-track-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.voice-track-controls small {
  grid-column: 1 / -1;
  color: #95aab8;
  font-size: 11px;
}

.remote-cockpit .permission-list span,
.remote-cockpit .connection-list span,
.remote-cockpit .remote-form input {
  color: #dce9f1;
  border-color: #30424d;
  background: #111a21;
}

.remote-cockpit .remote-form label,
.remote-cockpit .remote-form small {
  color: #95aab8;
}

.remote-cockpit .audit-row {
  border-color: #30404a;
}

.remote-cockpit .audit-row small {
  color: #95aab8;
}

@media (max-width: 1300px) {
  .remote-cockpit {
    grid-template-columns: 300px minmax(460px, 1fr) 340px;
  }
}

@media (max-width: 980px) {
  .cockpit-remote-topbar,
  .remote-cockpit {
    grid-template-columns: 1fr;
  }

  .remote-status-strip {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .remote-menu {
    border-left: 0;
    border-top: 1px solid #2f3b45;
  }

  .remote-center,
  .remote-right {
    grid-template-rows: auto;
  }
}
