.playback-card .metrics-row,
.playback-card .extra-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 6px 0;
  font-size: 14px;
  color: #bbb;
}
.playback-card .metrics-row div,
.playback-card .extra-row div {
  min-width: 110px;
}
.metrics-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 600;
  color: #e5f3ff;
  white-space: nowrap;
}
.metric-badge .metric-label {
  color: #8ca0b9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 10px;
}
.metric-badge .metric-value {
  color: #fff;
  font-weight: 600;
}
.playback-card .meter {
  flex: 1;
  min-width: 120px;
}
.playback-card + .playback-card {
  margin-top: 16px;
}
.deck-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: stretch;
}
.deck-grid .playback-card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
}
.deck-grid .playback-card + .playback-card {
  margin-top: 0;
}
.deck-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 16px;
  padding: 10px 16px;
  background: rgba(10, 20, 35, 0.92);
  border: 1px solid rgba(69, 118, 185, 0.4);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}
.deck-status-bar .status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #dfe9f5;
  flex: 1 1 170px;
  min-width: 0;
}
.deck-status-bar .status-item--wide {
  flex: 2 1 260px;
  min-width: 220px;
}
.deck-status-bar .status-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 600;
  color: #8ca0b9;
}
.deck-status-bar .status-value {
  font-weight: 600;
  color: #fff;
  position: relative;
  top: -1px;
}
.deck-status-bar .status-meta {
  color: #9fb7d4;
  font-size: 12px;
  position: relative;
  top: -1px;
}
.deck-status-bar .status-item > .status-meta:empty {
  display: none;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #58657a, #3a4454);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.45);
}
.status-dot--on {
  background: linear-gradient(135deg, #6ee7a1, #2fbf71);
  box-shadow: 0 0 8px rgba(111, 231, 161, 0.6);
}
.status-dot--warn {
  background: linear-gradient(135deg, #ffd86f, #ffb347);
  box-shadow: 0 0 8px rgba(255, 216, 111, 0.55);
}
.status-dot--off {
  background: linear-gradient(135deg, #ff7a7a, #d13838);
  box-shadow: 0 0 8px rgba(255, 122, 122, 0.45);
}
@media (max-width: 900px) {
  .deck-status-bar {
    flex-direction: column;
    gap: 10px;
  }
  .deck-status-bar .status-item {
    flex: 1 1 auto;
  }
}
.deck-status-pills .system-chip .chip-label {
  text-align: center;
}
.deck-status-pills .system-chip .chip-value {
  text-align: center;
}
.deck-grid .playback-card .manual-inline-buttons {
  margin-top: auto;
}
.track-history-card {
  margin-top: 24px;
}
.track-history-header {
  background: #1a1a1a !important;
  border-bottom: 1px solid #333 !important;
  border-left: none !important;
  border-radius: 0 !important;
  padding: 12px 16px;
}
.track-history-body {
  padding: 16px;
}
.track-history-table-container {
  overflow-x: auto;
  scrollbar-color: #707070 #101010;
}
.track-history-table-container::-webkit-scrollbar {
  height: 8px;
}
.track-history-table-container::-webkit-scrollbar-track {
  background: #101010;
  border-radius: 6px;
}
.track-history-table-container::-webkit-scrollbar-thumb {
  background: #707070;
  border-radius: 6px;
}
.track-history-table-container::-webkit-scrollbar-thumb:hover {
  background: #8d8d8d;
}
.track-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.track-history-table thead {
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.track-history-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #8ca0b9;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.track-history-th-time {
  width: 60px;
}
.track-history-th-track {
  width: 250px;
  min-width: 200px;
}
.track-history-th-details {
  min-width: 400px;
}
.track-history-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s ease;
}
.track-history-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}
.track-history-table tbody td {
  padding: 8px 12px;
  color: #e5f3ff;
  vertical-align: top;
}
.track-history-time {
  color: #8ca0b9;
  font-size: 11px;
  white-space: nowrap;
}
.track-history-track {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.track-history-bpm,
.track-history-key,
.track-history-dfc {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #fff;
}
.track-history-details {
  font-size: 10px;
  color: #8ca0b9;
  line-height: 1.4;
  font-family: 'Courier New', monospace;
}
.track-history-detail-section {
  display: inline;
  margin-right: 8px;
}
.track-history-detail-code {
  color: #ffd45c;
  font-weight: 600;
}
.track-history-loading {
  text-align: center;
  color: #8ca0b9;
  padding: 24px !important;
  font-size: 13px;
}
.track-history-empty {
  text-align: center;
  color: #8ca0b9;
  padding: 24px !important;
  font-size: 13px;
}
.deck-events-card {
  margin-top: 24px;
}
.deck-events-card .events-panel {
  display: flex;
  flex-direction: column;
}
.deck-events-card .events-log {
  order: 1;
  margin-bottom: 12px;
  scrollbar-color: #707070 #101010;
}
.deck-events-card .events-log::-webkit-scrollbar {
  width: 8px;
}
.deck-events-card .events-log::-webkit-scrollbar-track {
  background: #101010;
  border-radius: 6px;
}
.deck-events-card .events-log::-webkit-scrollbar-thumb {
  background: #707070;
  border-radius: 6px;
}
.deck-events-card .events-log::-webkit-scrollbar-thumb:hover {
  background: #8d8d8d;
}
.deck-events-card .events-toolbar {
  order: 2;
  margin-top: 0;
}
.deck-heading {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.deck-subtitle {
  position: relative;
  font-size: 16px;
  color: #f2fbff;
  font-weight: 600;
  letter-spacing: 0.1px;
  text-transform: none;
  white-space: nowrap;
  overflow: visible;
  text-overflow: ellipsis;
  padding-right: 16px;
}
.deck-edit-icon {
  position: absolute;
  top: 7px;
  right: 0;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  line-height: 1;
  padding: 2px 4px 2px 3px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.2s ease;
  display: inline-block;
  z-index: 1;
}
.deck-heading:hover .deck-edit-icon {
  opacity: 0.9;
}
.deck-edit-icon:hover {
  color: rgba(255, 255, 255, 1);
  opacity: 1;
}
.deck-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 600;
  color: #7aa7ff;
}
.history-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.history-row > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.playback-card .history-row strong {
  font-size: 13px;
  color: #9fa8b3;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.history-value {
  font-size: 14px;
  color: #dfe6f3;
  font-weight: 600;
}
.playback-card .progress {
  margin-top: 14px;
  margin-bottom: 12px;
}
.cue-card .progress {
  margin-top: 14px;
  margin-bottom: 12px;
}
.cue-card .progress .meter > span {
  background-color: #555 !important;
  background-image: none !important;
  box-shadow: inset 0 2px 6px rgba(255,255,255,0.1), inset 0 -2px 4px rgba(0,0,0,0.2) !important;
  transform: scaleX(1) !important;
  opacity: 0.6;
}
.playback-card .manual-inline-buttons {
  margin-top: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.playback-card .line,
.playback-card .metrics-row,
.playback-card .extra-row,
.playback-card .progress {
  font-size: 14px;
}
.playback-card .line strong,
.playback-card .metrics-row strong,
.playback-card .extra-row strong,
.playback-card .progress strong {
  font-size: 13px;
  color: #9fa8b3;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.playback-card .line strong::after,
.playback-card .metrics-row strong::after,
.playback-card .extra-row strong::after,
.playback-card .progress strong::after {
  content: '';
}
/* Nudge Controls UI removed - functionality preserved for programmatic use */
/* 
.nudge-card {
  margin-top: 16px;
}
.nudge-card .nudge-body {
  padding: 18px 20px 20px;
}
.nudge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.nudge-control {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nudge-control .form-label {
  font-size: 12px;
  color: #d7d7d7;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.nudge-control .form-hint {
  margin: 0;
}
.nudge-range {
  height: 24px;
}
.nudge-range::-webkit-slider-runnable-track {
  height: 6px;
}
.nudge-range::-moz-range-track {
  height: 6px;
}
.nudge-range::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -4px;
}
.nudge-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
}
.nudge-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.nudge-actions .btn {
  min-width: 140px;
}
*/
.scoring-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.scoring-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
.scoring-grid--compact,
.scoring-inline-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
.scoring-field--compact {
  width: 100%;
}
.scoring-bottom-row {
  margin-top: 8px;
}
*** End Patch
.scoring-inline-label {
  display: contents;
}
.form-control--tight {
  max-width: 160px;
}
.form-control--wide {
  max-width: 280px;
}
.scoring-checkbox-inline .checkbox-label span {
  font-size: 14px;
}
.scoring-checkbox-inline .checkbox-label {
  margin-right: 0;
}
.scoring-inline-combo {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
}
.scoring-inline-combo .shuffle-percent-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 16px;
}
.scoring-inline-combo select {
  min-width: 90px;
}
.scoring-field,
.scoring-inline-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 1em;
  width: 100%;
}
.scoring-toggle-field {
  flex: 1 1 auto;
  min-width: 220px;
  justify-content: space-between;
}
.scoring-select-field {
  flex: 1 1 100%;
}
.scoring-label {
  display: contents;
}
.scoring-field-label,
.scoring-inline-field .form-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  justify-self: flex-start;
  min-width: 240px;
  flex: 0 0 240px;
}
.scoring-field-hint,
.scoring-label .hint-wrapper,
.scoring-inline-field .hint-wrapper {
  justify-self: flex-start;
  flex: 0 0 auto;
}
.scoring-control,
.scoring-inline-control,
.scoring-slider {
  display: flex;
  align-items: center;
  justify-self: flex-start;
  flex: 0 0 auto;
}
.scoring-select {
  flex: 1 1 52%;
}
.scoring-select select {
  width: 100%;
}
.scoring-toggle .switch {
  margin-left: auto;
}
.short-range {
  width: 100%;
  max-width: 200px;
}
.scoring-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 6px 0;
}
.dbtools-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.crates-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.crate-list-section,
.crate-import-section {
  background: rgba(20,20,20,0.8);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.crate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.crate-table th,
.crate-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.crate-table th {
  text-align: left;
  color: #b0bec5;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 12px;
}
.crate-table td:last-child {
  text-align: right;
}
.crate-action-spacer {
  display: inline-block;
  width: 12px;
}
.idents-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.idents-track-row {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.idents-track-row .form-label {
  min-width: 120px;
  margin: 6px 0 0;
}
.idents-list--compact {
  width: min(50%, 440px);
  min-width: 260px;
}
@media (max-width: 900px) {
  .idents-list--compact {
    width: 100%;
    min-width: 0;
  }
}
.panel-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel-skeleton__line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0.1) 100%);
  animation: skeletonPulse 1.2s ease-in-out infinite;
}
.panel-skeleton__line--wide {
  width: 80%;
}
.panel-skeleton__line--medium {
  width: 60%;
}
.panel-skeleton__line--narrow {
  width: 35%;
}
.panel-skeleton__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.panel-skeleton__grid .panel-skeleton__line {
  width: 100%;
}
@keyframes skeletonPulse {
  0% {
    background-position: -120px 0;
  }
  100% {
    background-position: 120px 0;
  }
}
.track-pool-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.track-pool-crate-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
}
.track-pool-crate-row.combined > .track-pool-crate-list {
  flex: 1 1 50%;
  min-width: 0;
}
.track-pool-crate-list {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.track-pool-range-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
  align-items: flex-start;
}
.track-pool-range {
  flex: 1 1 50%;
  min-width: 0;
}
.track-pool-checkboxes {
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 8px 10px;
  max-height: 180px;
  overflow-y: auto;
  background: rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.track-pool-checkboxes label {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 0.95rem;
  gap: 8px;
}
.track-pool-checkboxes input[type="checkbox"] {
  margin-right: 4px;
}
.track-pool-preview {
  margin: 0;
  font-size: 13px;
  color: #9ccc65;
}
.track-pool-preview.error {
  color: #ef5350;
}
.track-pool-preview-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
#panel-trackpool .track-pool-options-row {
  margin-top: 8px;
  margin-bottom: 4px;
}
.simple-trackpool-order-row {
  margin-top: 8px;
  gap: 8px;
}
.simple-trackpool-order-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#trackPoolPreviewBtn {
  margin-left: auto;
}
.playlist-trackpool-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.toggled-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-title-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-title-toggle h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #f1f5ff;
}
.panel-subtitle {
  margin: 0;
  flex: 1 1 auto;
  font-size: 13px;
  color: #8ea0bb;
  line-height: 1.4;
}
.trackpool-master-switch {
  transform: none;
  margin-right: 10px;
}
.trackpool-header-text h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.4px;
}
.trackpool-header-text p {
  margin: 4px 0 0;
  color: #94b4cf;
  font-size: 13px;
}
.playlist-track-pool-body {
  gap: 14px;
}
.playlist-track-pool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.tiny-crate-list {
  flex: 0 0 auto;
  width: min(20ch, 220px);
}
.tiny-crate-list .track-pool-checkboxes {
  max-height: 120px;
}
.track-pool-range-stack {
  flex: 1 1 240px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.range-double--compact {
  max-width: 220px;
}

.range-double {
  position: relative;
  height: 32px;
  margin-top: 6px;
}
.range-double::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  background: rgba(255,255,255,0.2);
  transform: translateY(-50%);
  border-radius: 2px;
}
.range-double__input {
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  height: 32px;
  margin: 0;
}
.range-double__input::-webkit-slider-thumb {
  pointer-events: auto;
}
.range-double__input::-moz-range-thumb {
  pointer-events: auto;
}
.range-double__input--min {
  z-index: 2;
}
.range-double__input--max {
  z-index: 1;
}
.range-double__input::-webkit-slider-runnable-track,
.range-double__input::-moz-range-track {
  background: transparent;
}
.idents-status {
  margin: 0;
  font-size: 13px;
  color: #9ccc65;
}
.idents-status.pending {
  color: #b2ff59;
}
.idents-status.queued {
  color: #ffca28;
}
.idents-status.cleared {
  color: #4dd0e1;
}
.idents-status.disabled {
  color: #9e9e9e;
}
.idents-body .panel-message {
  margin: 0;
}
#identsTrackMeta {
  margin-top: 6px;
}
.idents-list {
  min-height: 160px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.2);
.idents-list.disabled {
  opacity: 0.5;
  pointer-events: none;
}
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.idents-list .panel-message {
  margin: 0;
  color: #cfd8dc;
}
.idents-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  line-height: 1.3;
}
.idents-item.disabled {
  opacity: 0.5;
}
.idents-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.idents-item span {
  flex: 1;
}
.crate-list-container {
  min-height: 120px;
}
.crate-import-section form .form-row {
  margin-bottom: 12px;
}
.hint-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.hint-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  color: #fff;
  font-size: 11px;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.hint-icon:hover,
.hint-icon:focus-visible {
  background: rgba(255,255,255,0.15);
}
.hint-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 220px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 12px;
  line-height: 1.4;
  color: #e0e0e0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 40;
}
.hint-wrapper:hover .hint-popover,
.hint-wrapper:focus-within .hint-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.compact-range {
  height: 26px;
}
.compact-range::-webkit-slider-runnable-track {
  height: 6px;
}
.compact-range::-moz-range-track {
  height: 6px;
}
.compact-range::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -5px;
}
.compact-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
}
.scoring-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}
.scoring-actions.scoring-actions-left {
  justify-content: flex-start;
}
.scoring-actions .btn {
  min-width: 140px;
}
.playback-card .line-now strong,
.playback-card .line-queued strong,
.playback-card .progress strong {
  width: auto;
}
.toggle-badge { font-size: 11px; margin-left: 8px; padding: 1px 8px; border-radius: 10px; border: 1px solid #666; color:#ddd; background: transparent; cursor: pointer; }
.card.expandable .detail-body { max-height: 1200px; overflow: hidden; transition: max-height .25s ease, padding .25s ease; padding-top: 6px; }
.card.expandable.collapsed .detail-body { max-height: 0; padding-top: 0; }
/* Original font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif */
body { font-family: 'Roboto', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; margin: 10px; background:#000; color:#fff; font-size:12px; }
body {
  background: #000;
  overflow-x: hidden; /* Prevent horizontal scrollbar */
}
body.vanta-active {
  background: #000;
  background-image: none;
}
#vanta-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.top-nav {
  background: rgba(14, 28, 46, 0.95);
  border-bottom: 1px solid rgba(80, 140, 210, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  margin: -10px -10px 24px -10px;
  min-height: 38px;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #eee;
  font-size: 24px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
}
.nav-left {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.nav-logo-link {
  display: inline-flex;
  align-items: center;
}
.nav-logo {
  height: 48px;
  width: auto;
  display: inline-block;
}
.nav-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.3px;
}
.nav-icons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-station-display {
  display: inline-flex;
  flex-direction: column;
  margin-left: 10px;
  min-width: 0;
  gap: 0;
  padding: 4px 0;
}
.nav-station-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #fff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-station-name--empty {
  color: #8a8a8a;
  font-style: italic;
}
.sidebar-heading {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  padding: 12px 12px 4px;
  position: relative;
  user-select: none;
}
.sidebar-heading[data-section="playlist-engine"] {
  color: #d0d0d0;
  letter-spacing: 1.2px;
}
.playlist-engine-group {
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  box-shadow: none;
}
.sidebar-item.playback {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-item.playback .sidebar-icon {
  width: 20px;
  height: 20px;
}
.sidebar-item.playback .deck-status-mini {
  visibility: hidden;
  opacity: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-width: 132px; /* Reserve space: 60px timer + 6px gap + 60px badge + 6px gap */
  transition: visibility 0.2s ease, opacity 0.2s ease;
}
.sidebar-item.playback.show-mini .deck-status-mini {
  visibility: visible;
  opacity: 1;
}
.sidebar-item.playback .remain-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(135, 206, 250, 0.5);
  background: rgba(135, 206, 250, 0.2);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 60px;
  width: 60px;
  height: 24px;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.sidebar-item.playback .mini-live {
  width: 12px;
  height: 12px;
}
.sidebar-item.playback .status-badge.mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  min-width: 60px;
  width: 60px;
  height: 24px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.sidebar-item.playback .status-badge.mini.live {
  background: rgba(255, 77, 77, 0.2);
  border-color: rgba(255, 77, 77, 0.5);
  color: #ff4d4d;
}
.sidebar-item.playback .status-badge.mini.wait {
  background: rgba(255, 165, 0, 0.2);
  border-color: rgba(255, 165, 0, 0.5);
  color: #ffa500;
}
.sidebar-item.nested {
  padding-left: 24px;
}
.nav-icon {
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  width: 44px;
  height: 44px;
  font-size: 20px;
  color: #eee;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.nav-icon:hover {
  background: rgba(23, 44, 70, 0.95);
  color: #fff;
}
.nav-account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-account form {
  margin: 0;
}
.nav-account-name {
  font-size: 14px;
  color: #f0f0f0;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.nav-account .nav-icon {
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 18px;
}
.station-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: margin-top 0.12s ease;
}
.station-sidebar {
  background: rgba(14, 28, 46, 0.95);
  border: 1px solid rgba(80, 140, 210, 0.35);
  border-radius: 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  width: 320px;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}
.sidebar-subsection {
  padding-bottom: 8px;
}
.sidebar-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  color: #8c8c8c;
  letter-spacing: 0.08em;
  padding: 12px 14px 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
.sidebar-master-switch {
  margin-left: auto;
  transform: scale(0.9);
  display: inline-flex;
  align-items: center;
  margin-right: -2px;
}
.sidebar-item .sidebar-master-switch {
  margin-left: auto;
}
.sidebar-sublist {
  display: flex;
  flex-direction: column;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  margin-left: 14px;
  margin-top: 4px;
}
.sidebar-sublist .sidebar-item {
  padding-left: 28px;
  padding-right: 8px;
}
.sidebar-subsection.disabled .sidebar-subtitle,
.sidebar-subsection.disabled .sidebar-item {
  opacity: 0.45;
  pointer-events: none;
}

.autodj-subtitle {
  background: linear-gradient(90deg, rgba(191,146,12,0.18), rgba(191,146,12,0.05));
  border-left: 3px solid #bf920c;
  border-radius: 6px;
  padding: 12px 14px;
  color: #f1d28a;
}
.autodj-subtitle .sidebar-label {
  color: inherit;
}
.autodj-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: #bf920c;
  color: #140d00;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  margin-left: 6px;
}
.autodj-switch .switch-slider {
  background: #3a3a3a;
  overflow: hidden;
}
.autodj-switch .switch-slider::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -150%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 60%);
  opacity: 0;
  transform: rotate(25deg);
  transition: opacity 0.2s ease;
}
.autodj-switch input:checked + .switch-slider {
  background: linear-gradient(90deg, #ffd45c, #ffb800);
  box-shadow: 0 0 20px rgba(255, 196, 77, 0.6);
}
.autodj-switch input:checked + .switch-slider:before {
  background: #2b1500;
}
.autodj-switch input:checked + .switch-slider::after {
  animation: autodjShimmer 1.6s linear infinite;
  opacity: 1;
}

@keyframes autodjShimmer {
  0% {
    transform: translateX(-100%) rotate(25deg);
    opacity: 0;
  }
  30% {
    opacity: 0.6;
  }
  60% {
    opacity: 0.3;
  }
  100% {
    transform: translateX(100%) rotate(25deg);
    opacity: 0;
  }
}
#autodjSection .sidebar-sublist {
  border-left: 2px solid rgba(191,146,12,0.45);
  background: linear-gradient(90deg, rgba(191,146,12,0.12), rgba(191,146,12,0.02));
  border-radius: 6px;
  margin-left: 8px;
  padding: 6px 6px 10px;
}
#autodjSection .sidebar-sublist .sidebar-item {
  background: transparent;
  color: #f7e2a5;
  border-bottom-color: rgba(191,146,12,0.2);
}
#autodjSection .sidebar-sublist .sidebar-item:hover,
#autodjSection .sidebar-sublist .sidebar-item.active {
  background: rgba(191,146,12,0.22);
  color: #fff8d0;
  border-left: 3px solid #bf920c;
}
.simple-status {
  font-size: 13px;
  color: #f39c12;
  margin: 0;
}
.simple-body.disabled .simple-status {
  color: #9e9e9e;
}
.simple-note {
  font-size: 12px;
  color: #9e9e9e;
  margin: 0;
}
.sidebar-item {
  background: transparent;
  border: none;
  border-bottom: none;
  color: #dfe9f5;
  padding: 12px 14px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: transparent;
  filter: brightness(0) invert(1); /* Converts any color to white */
  display: block;
}
.sidebar-item:hover .sidebar-icon,
.sidebar-item.active .sidebar-icon {
  filter: brightness(0) invert(1); /* Keep white on hover/active */
}
.sidebar-item:hover {
  background: rgba(23, 44, 70, 0.95);
  color: #fff;
}
.sidebar-item.active {
  background: rgba(23, 44, 70, 0.95);
  color: #fff;
  font-weight: 600;
}
.sidebar-item.has-switch {
  padding-right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-item.has-switch .sidebar-text {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.sidebar-item.has-switch .sidebar-text .sidebar-label {
  flex: 1 1 auto;
}
.sidebar-item.has-switch .sidebar-label.disabled {
  color: inherit;
}
.sidebar-item.has-switch .set-prog-indicator {
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.sidebar-item.has-switch .sidebar-master-switch {
  margin-left: auto;
  margin-right: 0;
  transform: none;
  display: inline-flex;
  align-items: center;
}
.sidebar-item:last-child {
  border-bottom: none;
}
.sidebar-item.setprog-item .sidebar-label {
  flex: 1;
}
.sidebar-item.setprog-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 14px;
}
.sidebar-item .sidebar-label.disabled {
  color: #777;
}
.sidebar-item .switch-inline {
  margin-right: 2px;
  transform: scale(0.8);
  display: inline-flex;
  align-items: center;
}
.sidebar-item .switch-inline input {
  display: none;
}
.sidebar-item .switch-inline.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.set-prog-indicator {
  display: none;
  color: #0fa968;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
}
.set-prog-indicator.active {
  display: inline-flex;
}
.set-prog-indicator.hidden {
  display: none;
}
.set-prog-indicator.due {
  color: #f39c12;
}
#identsIndicator.pending {
  color: #b2ff59;
}
#identsIndicator.queued {
  color: #ffca28;
}
#identsIndicator.cleared {
  color: #4dd0e1;
}
.station-main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin-left: 0;
  margin-right: auto;
}
.station-main .deck-grid {
  width: 100%;
}
.form-row.inline .form-group {
  align-items: flex-start;
}
.mix-toggle-header {
  margin-bottom: 12px;
}
.mix-toggle-header .panel-title-toggle {
  gap: 10px;
}
.mix-toggle-header .panel-title-toggle h3 {
  color: #f1d28a;
  margin: 0;
}
.panel {
  display: none;
}
.panel.active {
  display: block;
}
.panel-message {
  padding: 12px;
  color: #bbb;
  font-size: 13px;
}
.panel-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.playlist-master-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.playlist-mode-toggle {
  position: relative;
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(80,140,210,0.35);
  padding: 4px;
  background: rgba(14,28,46,0.95);
  cursor: pointer;
  min-width: 260px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
.playlist-mode-toggle .toggle-display {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}
.playlist-mode-toggle .toggle-highlight {
  position: absolute;
  inset: 2px;
  width: 33.3333%;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  transition: transform 0.25s ease, background 0.25s ease;
  z-index: 0;
}
/* Three-way playlist mode toggle */
.playlist-mode-toggle .toggle-option {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #9fb3cc;
  padding: 6px 10px;
  cursor: pointer;
  user-select: none;
  border: none;
  background: transparent;
}
.toggle-option--crate {
  color: #ff6b6b;
}
.playlist-mode-toggle[data-mode="autodj"] .toggle-highlight {
  transform: translateX(0%);
  background: linear-gradient(135deg, #ffd45c, #f0a500);
  box-shadow: 0 10px 28px rgba(255,210,92,0.55);
}
.playlist-mode-toggle[data-mode="simple"] .toggle-highlight {
  transform: translateX(100%);
  background: linear-gradient(135deg, #25c175, #1a8f54);
  box-shadow: 0 10px 25px rgba(24,196,123,0.45);
}
.playlist-mode-toggle[data-mode="crate"] .toggle-highlight {
  transform: translateX(200%);
  background: linear-gradient(135deg, #ff6b6b, #c62828);
  box-shadow: 0 10px 28px rgba(255,107,107,0.55);
}
.playlist-mode-toggle[data-mode="autodj"] .toggle-option--autodj {
  color: #040404;
}
.playlist-mode-toggle[data-mode="simple"] .toggle-option--simple {
  color: #040404;
}
.playlist-mode-toggle[data-mode="crate"] .toggle-option--crate {
  color: #040404;
}
.status-badge-playlist-mode {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: opacity 0.2s ease;
  min-width: 0;
}
.status-badge-playlist-mode:not(:empty) {
  opacity: 1;
}
/* Ensure badge is visible when it has text content */
.status-badge-playlist-mode[style*="opacity: 1"],
.status-badge-playlist-mode:not(:empty) {
  opacity: 1 !important;
}
.status-badge-playlist-mode--autodj {
  background: linear-gradient(135deg, #ffd45c, #f0a500);
  color: #040404;
  box-shadow: 0 2px 8px rgba(255,210,92,0.4);
}
.status-badge-playlist-mode--simple {
  background: linear-gradient(135deg, #25c175, #1a8f54);
  color: #040404;
  box-shadow: 0 2px 8px rgba(24,196,123,0.4);
}
.status-badge-playlist-mode--crate {
  background: linear-gradient(135deg, #ff6b6b, #c62828);
  color: #040404;
  box-shadow: 0 2px 8px rgba(255,107,107,0.4);
}
/* Badge in card headers */
h2.card-header .status-badge-playlist-mode {
  margin-left: auto;
  margin-right: 0;
  flex-shrink: 0;
}
.playlist-system-status {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.system-chip {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  min-width: 140px;
  gap: 2px;
  color: #dbe3f3;
}
.system-chip .chip-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8ca0b9;
}
.system-chip .chip-value {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.system-chip .chip-energy-mode,
.system-chip .chip-dfc-mirror,
.system-chip .chip-ident-title,
.system-chip .chip-profile-name,
.system-chip .chip-scheduler-status {
  font-size: 11px;
  color: #8ca0b9;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
}
.system-chip[data-system="engine"] .chip-profile-name {
  color: #0fdf88;
}
.system-chip .chip-dfc-mirror {
  color: #9fb3cc;
}
.system-chip .chip-ident-title.chip-marquee {
  animation: chip-marquee 15s linear infinite;
}
@keyframes chip-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(110px - 100%));
  }
}
.system-chip .chip-ident-title.chip-marquee:hover {
  animation-play-state: paused;
}
.system-chip.live .chip-value {
  color: #0fdf88;
}
.system-chip.warn .chip-value {
  color: #ffb347;
}
.system-chip.idle .chip-value {
  color: #9fb3cc;
}
.system-chip.playing .chip-value {
  color: #7ecbff;
}
.system-chip.chip-hidden {
  display: none;
}
.playlist-tabs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.playlist-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 8px;
}
.playlist-tab {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 0;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  color: #9fb3cc;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}
.playlist-tab:hover {
  color: #ccc;
}
.playlist-tab.active {
  background: transparent;
  color: #fff;
  border: none;
  box-shadow: none;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
#playlistTabs[data-mode="autodj"] .playlist-tab[data-modes~="autodj"] {
  color: #f1d28a;
}
#playlistTabs[data-mode="autodj"] .playlist-tab[data-modes~="autodj"].active,
#playlistTabs[data-mode="autodj"] .playlist-tab[data-modes~="autodj"]:hover {
  color: #ffd45c;
}
#playlistTabs[data-mode="simple"] .playlist-tab[data-tab="simple-settings"] {
  color: #0fdf88;
}
#playlistTabs[data-mode="simple"] .playlist-tab[data-tab="simple-settings"].active,
#playlistTabs[data-mode="simple"] .playlist-tab[data-tab="simple-settings"]:hover {
  color: #5affc0;
}
.playlist-tab.playlist-tab--hidden {
  display: none;
}
.playlist-tab:disabled,
.playlist-tab.disabled {
  opacity: 0.4;
  cursor: default;
}
.playlist-tab-panels {
  position: relative;
}
.playlist-tab-panel {
  display: none;
}
.playlist-tab-panel.active {
  display: block;
  animation: tabFade 0.25s ease;
}
.playlist-tab-panel.playlist-tab-panel--hidden {
  display: none !important;
}
.playlist-tab-panel.playlist-tab-panel--flash {
  box-shadow: 0 0 0 2px rgba(64,133,224,0.55);
  border-radius: 12px;
}
@keyframes tabFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.playlist-mode-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(12,16,24,0.85);
  box-shadow: 0 10px 26px rgba(0,0,0,0.45);
}
.playlist-mode-card .panel-body {
  gap: 12px;
}
.form-row.inline .form-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.form-row.inline .form-group .switch {
  margin-left: auto;
}
.mix-toggle-header {
  margin-bottom: 8px;
}
.mix-toggle-header .panel-title-toggle h3 {
  color: #f1d28a;
}
.playlist-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0;
  gap: 16px;
}
.playlist-section-header h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.scoring-warning {
  margin: 0 0 8px;
}
.scoring-warning h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #ff6b6b;
}
.playlist-section-chip {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.4);
}
.playlist-section-chip.live {
  color: #0fdf88;
  border-color: rgba(15,223,136,0.65);
}
.playlist-section-chip.warn {
  color: #ffb347;
  border-color: rgba(255,179,71,0.65);
}
.simple-mode-select {
  max-width: 180px;
  min-width: 150px;
  font-size: 14px;
  padding: 6px 10px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row.row-layout {
  flex-direction: row;
  align-items: flex-start;
}
.form-row.toggle-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.form-row.toggle-row .form-label {
  margin: 0;
}
.form-row.toggle-row.toggle-row-inline {
  margin-top: 4px;
}
.set-programming-body.disabled .form-row:not(.toggle-row),
.set-programming-body.disabled .form-hint {
  opacity: 0.45;
  pointer-events: none;
}
.set-programming-body .form-hint.full {
  margin-top: 4px;
}
.form-row.inline {
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.form-row.inline .form-group {
  flex: 0 0 260px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row.inline .form-group .form-hint {
  margin-top: 2px;
}
.switch {
  position: relative;
  display: inline-flex;
  width: 50px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  inset: 0;
  background: #3a3a3a;
  border-radius: 24px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.switch-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #0b0b0b;
  transition: transform 0.2s ease, background 0.2s ease;
}
.switch input:checked + .switch-slider {
  background: linear-gradient(90deg, #ff9b0f, #ff6f00);
  box-shadow: 0 0 12px rgba(255, 130, 0, 0.45);
}
.switch input:checked + .switch-slider:before {
  transform: translateX(24px);
  background: #fff4e6;
}
.switch input:disabled + .switch-slider {
  opacity: 0.4;
  cursor: not-allowed;
}
.form-label .current {
  font-weight: 400;
  margin-left: 6px;
  color: #8bc34a;
}
.panel-group {
  margin-top: 0;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  font-size: 13px;
  color: #eee;
}
.history-table thead th {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid #333;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #aaa;
}
.history-table tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid #262626;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-table tbody tr:last-child td {
  border-bottom: none;
}
.history-table tbody tr:hover {
  background: #1f1f1f;
}
.history-table th:nth-child(1),
.history-table td:nth-child(1) {
  width: 90px;
}
.history-table th:nth-child(4),
.history-table td:nth-child(4),
.history-table th:nth-child(6),
.history-table td:nth-child(6) {
  text-align: right;
}
.history-table th:nth-child(2),
.history-table td:nth-child(2),
.history-table th:nth-child(3),
.history-table td:nth-child(3) {
  max-width: 220px;
}
.history-table .truncate-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.analytics-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.analytics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.analytics-block {
  background: #1f1f1f;
  border: 1px solid #303030;
  border-radius: 10px;
  padding: 12px;
}
.analytics-heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #999;
  margin-bottom: 8px;
}
.analytics-canvas {
  width: 100%;
  height: 200px;
  display: block;
  background: #0e0e0e;
  border-radius: 6px;
}
.analytics-canvas.small {
  height: 200px;
}
.analytics-canvas.wheel {
  height: 240px;
}
.analytics-split {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.analytics-split .analytics-block {
  min-height: 260px;
}
.analytics-placeholder-body {
  font-size: 13px;
  color: #bdbdbd;
  padding: 12px;
  border: 1px dashed #444;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
}
.chart-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: rgba(15,15,15,0.92);
  color: #f5f5f5;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  max-width: 220px;
  word-break: break-word;
}
.analytics-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 11px;
  color: #b0b0b0;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.analytics-legend span::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
}
.analytics-legend span[data-key="key"]::before { background: #4fc3f7; }
.analytics-legend span[data-key="dance"]::before { background: #81c784; }
.analytics-legend span[data-key="trans"]::before { background: #ffb74d; }
.analytics-legend span[data-key="fresh"]::before { background: #ba68c8; }

.analytics-legend--harmonic {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  color: #dfe9f5;
  gap: 10px;
}
.analytics-legend--harmonic span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.analytics-legend--harmonic span::before {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--legend-color, #ffffff);
}

/* Scheduler panel */
.scheduler-card{position:relative;display:flex;flex-direction:column;gap:12px}
.scheduler-help-link{font-size:.85rem;color:#76c2ff;text-decoration:none}
.scheduler-help-link:hover{text-decoration:underline}
.scheduler-header-controls{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.scheduler-segment-summary{font-size:24px;font-weight:600;color:#e5f3ff;margin-top:4px}
.scheduler-inspector-header h3{display:none}
.scheduler-toggle{display:flex;align-items:center;gap:8px}
.scheduler-toggle .switch-slider{margin-right:4px}
.scheduler-type-toggle{display:inline-flex;border:1px solid rgba(255,255,255,.15);border-radius:999px;overflow:hidden}
.scheduler-type-btn{border:0;background:transparent;color:#fff;padding:6px 16px;font-size:.9rem;cursor:pointer}
.scheduler-type-btn.active{background:#00bcd4;color:#050505;font-weight:600}
.scheduler-type-btn:disabled{opacity:.6;cursor:not-allowed}
.scheduler-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;justify-content:space-between;margin-bottom:16px}
.scheduler-template-select{flex:1;min-width:220px}
.scheduler-template-select-row{display:flex;gap:10px;align-items:flex-end}
.scheduler-template-select-row select{flex:1}
.scheduler-template-select-row .btn{white-space:nowrap}
.scheduler-validation-inline{display:none;font-size:.85rem;color:#ffab40;font-weight:600}
.scheduler-toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}
.scheduler-toolbar-actions .btn{font-weight:600}
.scheduler-status-text{font-size:.85rem;color:rgba(255,255,255,.7)}
.scheduler-body{display:flex;gap:16px;flex-wrap:wrap}
.scheduler-grid-wrapper{position:relative;flex:2;min-width:320px;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:12px;background:rgba(0,0,0,.35);overflow-y:auto;max-height:600px;scrollbar-color:#707070 #101010}
.scheduler-grid-wrapper::-webkit-scrollbar{width:8px}
.scheduler-grid-wrapper::-webkit-scrollbar-track{background:#101010;border-radius:6px}
.scheduler-grid-wrapper::-webkit-scrollbar-thumb{background:#707070;border-radius:6px}
.scheduler-grid-wrapper::-webkit-scrollbar-thumb:hover{background:#8d8d8d}
.scheduler-grid{position:relative;height:992px;display:grid;gap:4px;padding-left:48px;padding-top:32px}
.scheduler-grid.scheduler-grid--day{grid-template-columns:1fr}
.scheduler-grid.scheduler-grid--week{grid-template-columns:repeat(7,1fr)}
.scheduler-day-header-row{position:absolute;top:0;left:48px;right:0;display:grid;gap:4px;grid-template-columns:inherit;z-index:3;pointer-events:auto;height:32px}
.scheduler-day-header{display:flex;align-items:center;justify-content:center;font-size:.85rem;font-weight:600;color:rgba(255,255,255,.5);padding:6px 8px;text-transform:uppercase;letter-spacing:.05em}
.scheduler-day-header span{display:inline-flex;align-items:center;gap:4px}
.scheduler-day-header--selected{color:rgba(255,255,255,1)}
.scheduler-column-controls{position:absolute;top:6px;right:6px;display:flex;gap:4px;z-index:4}
.scheduler-column-control-btn{border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.04);color:#fff;border-radius:50%;width:18px;height:18px;font-size:10px;line-height:1;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .2s ease,border-color .2s ease,color .2s ease,transform .1s ease;padding:0}
.scheduler-column-control-btn svg{width:10px;height:10px}
.scheduler-column-control-btn:hover{background:#00c853;border-color:#00c853;color:#050505}
.scheduler-column-control-btn:focus-visible{outline:2px solid #00c853;outline-offset:2px}
.scheduler-column-control-btn:active{transform:scale(.9)}
.scheduler-column-control-btn--delete{color:#fff;border-color:rgba(255,255,255,.4)}
.scheduler-column-control-btn--delete:hover{background:#ff1744;border-color:#ff1744;color:#050505}
.scheduler-grid-column{position:relative;border:1px solid rgba(255,255,255,.08);border-radius:8px;background:rgba(255,255,255,.015);height:992px}
.scheduler-grid-column--selected{background:rgba(255,255,255,.08)}
.scheduler-hour-lines-container{position:absolute;top:32px;left:48px;right:0;height:960px;pointer-events:none;z-index:1}
.scheduler-hour-line{position:absolute;left:0;right:0;height:1px;background:rgba(255,255,255,.04)}
.scheduler-hour-label{position:absolute;left:-48px;top:-8px;font-size:.7rem;color:rgba(255,255,255,.4);text-align:right;width:44px;pointer-events:none;padding-right:4px}
.scheduler-segment{position:absolute;left:6px;right:6px;padding:6px 10px;font-size:.75rem;line-height:1.2;border:2px solid transparent;border-radius:10px;box-shadow:0 4px 12px rgba(0,0,0,.45);color:#f5f5f5;font-weight:600;cursor:pointer;overflow:visible;transition:transform .15s ease,background-color .2s ease;z-index:2}
.scheduler-segment strong{display:block;font-weight:700;margin-bottom:2px}
.scheduler-segment small{display:none}
.scheduler-segment[data-selected="true"]{outline:2px solid #fff;border-color:#fff;box-shadow:0 6px 18px rgba(0,0,0,.55)}
.scheduler-segment[data-error="true"]{border-color:#ff6f6f!important;box-shadow:0 6px 18px rgba(255,111,111,.35)}
.scheduler-segment-warning{position:absolute;top:4px;right:24px;padding:2px 6px;border-radius:999px;background:#ff5252;color:#fff;font-size:.58rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.scheduler-segment-handle{position:absolute;left:0;right:0;height:8px;cursor:ns-resize;z-index:10;background:transparent}
.scheduler-segment-handle:hover{background:rgba(255,255,255,.2)}
.scheduler-segment-handle--top{top:-4px}
.scheduler-segment-handle--bottom{bottom:-4px}
.scheduler-segment-delete{position:absolute;top:4px;right:4px;width:8px;height:8px;border:1px solid #ff4444;background:transparent;color:#ff4444;border-radius:50%;font-size:8px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:20;opacity:0.7;transition:opacity .2s ease,transform .15s ease,background .2s ease,width .15s ease,height .15s ease,border-width .15s ease,font-size .15s ease;font-weight:700;padding:0}
.scheduler-segment-delete-cross{opacity:0;transition:opacity .2s ease;position:relative;top:0}
.scheduler-segment-delete:hover{opacity:1;width:14px;height:14px;border-width:2px;font-size:12px;background:#ff4444;color:#fff;transform:scale(1.1)}
.scheduler-segment-delete:hover .scheduler-segment-delete-cross{opacity:1;top:1px}
.scheduler-segment-delete:active{transform:scale(0.9)}
.scheduler-grid-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;padding:20px;border-radius:12px}
.scheduler-grid-empty{display:none}
.scheduler-grid-empty.active{display:flex}
.scheduler-inspector{flex:1;min-width:260px;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;background:rgba(0,0,0,.4);display:flex;flex-direction:column;gap:12px}
.scheduler-inspector-header{display:flex;justify-content:space-between;align-items:center}
.scheduler-inspector-field{display:flex;flex-direction:column;gap:6px}
.scheduler-time-row{display:flex;gap:12px}
.scheduler-time-row .form-field{flex:1}
.scheduler-time-inputs{display:flex;gap:8px;align-items:center}
.scheduler-time-inputs select{flex:1}
.scheduler-time-inputs span{color:rgba(255,255,255,.6);font-weight:600}
.scheduler-color-picker{width:80px;height:32px;border:none;border-radius:6px;padding:0;background:transparent}
.scheduler-inspector-actions{display:flex;gap:8px;flex-wrap:wrap}
.scheduler-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:8px}
.scheduler-footer-left,.scheduler-footer-right{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.scheduler-validation-message{min-height:22px;font-size:.85rem;color:#ffab40}


.station-control-group{padding:8px 12px}
.station-control-row{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.station-control-row:last-child{margin-bottom:0}
.station-control-label{font-size:14px;color:var(--text-secondary);white-space:nowrap;min-width:100px;flex-shrink:0;transition:color 0.2s}
.station-control-label.disabled{color:#666;opacity:0.6}
.station-control-row select{flex:1;min-width:0}
.scheduler-menu-toggle{display:inline-flex;align-items:center;margin-left:auto}
.playlist-header-row{display:flex;align-items:center;justify-content:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:8px}
.playlist-profile-selector{display:flex;align-items:center;gap:10px;margin-bottom:8px;padding-bottom:0;margin-top:0;justify-content:flex-start}
.playlist-profile-label{padding-left:0;font-size:14px;color:var(--text-secondary);white-space:nowrap;font-weight:500}
.playlist-profile-selector select{flex:0 0 auto;min-width:150px}
.playlist-profile-selector .nav-icon{
  margin-left:0;
  border:1px solid rgba(80,140,210,0.35);
  background:rgba(14,28,46,0.95);
  color:#e5f3ff;
  border-radius:6px;
  padding:6px 10px;
  box-shadow:0 6px 14px rgba(0,0,0,0.35);
  transition:background 0.2s ease,border-color 0.2s ease;
}
.playlist-profile-selector .nav-icon:hover{
  background:rgba(23,44,70,0.95);
  border-color:rgba(115,165,225,0.55);
}
.playlists-body select,
.playlists-body .form-control,
.playlists-body .form-control--compact {
  background:rgba(14,28,46,0.95);
  border:1px solid rgba(80,140,210,0.35);
  color:#e5f3ff;
  box-shadow:inset 0 0 0 1px rgba(41,96,180,0.1);
}
.playlists-body select:focus,
.playlists-body .form-control:focus,
.playlists-body .form-control--compact:focus {
  border-color:rgba(130,190,255,0.8);
  box-shadow:0 0 0 2px rgba(66,133,244,0.25);
  outline:none;
}
h2.card-header .playlist-mode-toggle{margin-left:0}
.playlists-body h2.card-header{justify-content:flex-start}
#panel-playlists h2.card-header{justify-content:flex-start;gap:16px}
.scheduler-menu-row{display:flex;align-items:center;gap:10px;margin-top:6px}
.scheduler-menu-row .sidebar-item{flex:1;margin:0}
@media (max-width:900px){
  .scheduler-body{flex-direction:column}
  .scheduler-grid-wrapper,.scheduler-inspector{width:100%}
  .scheduler-grid.scheduler-grid--week{grid-template-columns:repeat(2,1fr)}
}

.panel-message.error {
  color: #ff6b6b;
}
.form-label {
  font-weight: 600;
  font-size: 16px;
  color: #f0f0f0;
}
.form-row--split {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.form-row--split .form-field {
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-control--compact {
  max-width: 220px;
}
.repeat-range-row .form-field {
  max-width: 280px;
}
.repeat-range-row .range-control--mini {
  width: 160px;
}
.progression-select-row .form-field {
  flex: 1 1 200px;
}

/* Progression controls container */
.progression-controls-container {
  margin-bottom: 0.75rem;
}

/* Progression graph container */
.progression-graph-container {
  width: 100%;
  margin-top: 0.75rem;
}

.progression-graph-wrapper {
  position: relative;
  background: rgba(20, 30, 45, 0.6);
  border: 1px solid rgba(80, 140, 210, 0.3);
  border-radius: 4px;
  padding: 8px;
  min-height: 320px;
  width: 100%;
}

#progressionGraphCanvas {
  display: block;
  width: 100% !important;
  height: 300px !important;
  min-height: 300px;
  cursor: crosshair;
  background: rgba(15, 25, 40, 0.8);
  border-radius: 2px;
  box-sizing: border-box;
}

.progression-controls-left {
  flex: 0 0 auto;
  min-width: 300px;
}

@media (max-width: 1200px) {
  .progression-select-row {
    flex-direction: column;
  }
  
  .progression-graph-container {
    margin-left: 0;
    margin-top: 1.5rem;
    max-width: 100%;
  }
}
/* Flow Forge Styles */
.flowforge-controls {
  margin-bottom: 1.5rem;
}

.flowforge-playlist-container {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(80, 140, 210, 0.3);
}

.flowforge-playlist-header {
  font-size: 16px;
  font-weight: 600;
  color: #e5f3ff;
  margin-bottom: 1rem;
}

.flowforge-playlist-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(20, 30, 45, 0.6);
  border-radius: 4px;
  border: 1px solid rgba(80, 140, 210, 0.2);
}

.flowforge-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.flowforge-stat--checkbox {
  flex-direction: row;
  align-items: center;
  margin-top: 0.5rem;
}

.flowforge-stat-label {
  font-size: 11px;
  color: #8ca0b9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flowforge-stat-value {
  font-size: 14px;
  font-weight: 600;
  color: #e5f3ff;
}

.flowforge-playlist-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 12px;
}

.flowforge-playlist-table thead {
  background: rgba(20, 30, 45, 0.8);
}

.flowforge-playlist-table th {
  padding: 0.5rem 0.4rem;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: #8ca0b9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(80, 140, 210, 0.2);
}

.flowforge-playlist-table td {
  padding: 0.5rem 0.4rem;
  font-size: 12px;
  color: #dfe9f5;
  border-bottom: 1px solid rgba(80, 140, 210, 0.1);
}

.flowforge-playlist-table tbody tr:hover {
  background: rgba(80, 140, 210, 0.1);
}

.flowforge-substitute-list {
  max-height: 400px;
  overflow-y: auto;
  margin: 16px 0;
}
.flowforge-substitute-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.flowforge-substitute-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.flowforge-substitute-item-info {
  flex: 1;
}
.flowforge-substitute-item-info strong {
  display: block;
  color: #f0f0f0;
  margin-bottom: 4px;
  font-size: 14px;
}
.flowforge-substitute-item-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #8ca0b9;
}
.flowforge-substitute-item-meta span {
  white-space: nowrap;
}
.flowforge-substitute-sql {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.flowforge-substitute-sql textarea {
  width: 100%;
  resize: vertical;
}
.flowforge-playlist-row {
  transition: background-color 0.2s ease;
}
.flowforge-playlist-row:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}
.flowforge-playlist-row.processing {
  opacity: 0.6;
  pointer-events: none;
}
#flowforgeSubstituteTitle {
  font-size: 18px;
  font-weight: 600;
  color: #e5f3ff;
  margin: 0 0 16px 0;
}

.flowforge-mix-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toggle-row .toggle-hint {
  margin: 0;
  flex: 1 1 320px;
  color: #aaa;
  font-size: 14px;
}
.form-control {
  background: #1f1f1f;
  border: 1px solid #444;
  color: #eee;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 16px;
}
.form-control:focus {
  outline: none;
  border-color: #2979ff;
  box-shadow: 0 0 0 2px rgba(41,121,255,0.25);
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.checkbox-row {
  gap: 4px;
}
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #f0f0f0;
}
.checkbox-label input[type="checkbox"],
.track-pool-checkboxes input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid #2cc36b;
  background-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, opacity 0.15s ease;
  position: relative;
  margin-right: 6px;
}

.checkbox-label input[type="checkbox"]::after,
.track-pool-checkboxes input[type="checkbox"]::after {
  content: '✔';
  font-size: 14px;
  color: #3bff88;
  position: absolute;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.checkbox-label input[type="checkbox"]:checked,
.track-pool-checkboxes input[type="checkbox"]:checked {
  border-color: #3bff88;
  background-color: transparent;
}

.checkbox-label input[type="checkbox"]:checked::after,
.track-pool-checkboxes input[type="checkbox"]:checked::after {
  opacity: 1;
}

.checkbox-label input[type="checkbox"]:hover,
.track-pool-checkboxes input[type="checkbox"]:hover {
  opacity: 0.9;
}

.checkbox-label input[type="checkbox"]:focus-visible,
.track-pool-checkboxes input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(59, 255, 136, 0.45);
  outline-offset: 2px;
}
.range-control {
  width: 140px;
  max-width: 100%;
  accent-color: #2979ff;
}

.range-control--mini {
  width: 120px;
  max-width: 120px;
}
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 16px;
  font-size: 13px;
  color: #ccc;
}
.value-grid strong {
  color: #fff;
  margin-right: 4px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  font-size: 15px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: #2979ff;
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: #1c5dd8;
}
.btn-alert {
  background: #7f1d1d;
  color: #fff;
  border: 1px solid #a52727;
}
.btn-alert:hover:not(:disabled) {
  background: #a52727;
}
.btn-secondary {
  background: #2b2b2b;
  color: #f0f0f0;
  border: 1px solid #3c3c3c;
  font-size: 13px;
  padding: 8px 16px;
}
.btn-secondary:hover:not(:disabled) {
  background: #343434;
}
.btn-secondary.active {
  background: #d32f2f;
  border-color: #b71c1c;
  color: #fff;
}
.btn-secondary.active:hover:not(:disabled) {
  background: #c62828;
}
.btn-success {
  background: #2e7d32;
  color: #e8f5e9;
  border: 1px solid rgba(76,175,80,0.6);
}
.btn-success:hover:not(:disabled) {
  background: #1b5e20;
}
.save-status {
  font-size: 14px;
  color: #8bc34a;
}
.save-status.error {
  color: #ff6b6b;
}
.form-hint {
  font-size: 14px;
  color: #aaa;
  margin-top: 4px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
/* Stack stations vertically on the overview page */
#grid.grid { grid-template-columns: 1fr; }
.card {
  border: 1px solid rgba(69, 118, 185, 0.4);
  border-radius: 8px;
  padding: 12px;
  background: rgba(10, 20, 35, 0.92);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  color: #fff;
}
h2.card-header {
  margin: -12px -12px 12px;
  padding: 12px 16px;
  background: rgba(14, 28, 46, 0.95);
  border-bottom: 1px solid rgba(80, 140, 210, 0.35);
  border-left: 0;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: inset 0 0 0 1px rgba(41, 96, 180, 0.12);
  color: #e5f3ff;
  font-size: 18px;
  font-weight: 600;
}
.header-controls { display: inline-flex; align-items: center; gap: 10px; }
.playback-card .header-controls {
  margin-left: auto;
  justify-content: flex-end;
}
h1 { margin-bottom: 16px; color:#fff; font-size:12px; }
h2 { margin: 0 0 8px 0; font-size:12px; color:#fff; }
.card h2 { font-size: 18px; font-weight: 600; }
.card h2 a { text-decoration: none; color: inherit; }
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  min-width: 60px;
  width: 60px;
  height: 24px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.status-badge.live {
  background: rgba(255, 77, 77, 0.2);
  border-color: rgba(255, 77, 77, 0.5);
  color: #ff4d4d;
}
.status-badge.wait {
  background: rgba(255, 165, 0, 0.2);
  border-color: rgba(255, 165, 0, 0.5);
  color: #ffa500;
}
.status-badge.cue {
  background: rgba(139, 195, 74, 0.2);
  border-color: rgba(139, 195, 74, 0.5);
  color: #8bc34a;
}
.status-badge.empty {
  background: rgba(136, 136, 136, 0.2);
  border-color: rgba(136, 136, 136, 0.5);
  color: #888;
}
.live-icon { width: 18px; height: 18px; display: none; }
.remain-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(135, 206, 250, 0.5);
  background: rgba(135, 206, 250, 0.2);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 60px;
  width: 60px;
  height: 24px;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.remain-badge.remain-header { margin-right: 6px; }
.err { color: #ff6b6b; }
a { color: inherit; text-decoration: none; }
.card strong { color:#fff; font-weight:600; }
.card .value, .card .bpm, .card .key, .card .len, .card .last-prev, .card .artist-prev, .card .beats, .card .played-at, .card .now-text, .card .next-text {
  font-size: 12px;
  color: #bbb;
  font-weight: normal;
}
.playback-card .value,
.playback-card .bpm,
.playback-card .key,
.playback-card .len,
.playback-card .dfc,
.playback-card .last-prev,
.playback-card .artist-prev {
  font-size: 14px;
  color: #f0f0f0;
  font-weight: 600;
}
.playback-card .line-text,
.playback-card .queued-text,
.playback-card .meter,
.playback-card .deck2-bpm,
.playback-card .deck2-key,
.playback-card .deck2-len,
.playback-card .deck2-last-prev,
.playback-card .deck2-artist-prev {
  font-weight: 600;
  color: #f5f5f5;
}
.playback-card .now-text,
.playback-card .queued-text {
  font-size: 16px;
  font-weight: 600;
  color: #f0f0f0;
}

/* Even vertical rhythm inside station cards */
.card .line,
.card .metrics,
.card .extra > div,
.card .progress,
.card .next {
  padding: 6px 0;
}

.card .line {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 6px;
}

.card .line-now strong,
.card .line-next strong {
  display: inline-block;
  width: 110px;
}

.card .line-next .line-text { font-weight: normal; }

.card .metrics, .card .progress { align-items: center; }
.row { display: flex; gap: 16px; align-items: stretch; }
.col-flex { flex: 1 1 auto; }
.col-fixed { flex: 0 0 360px; width: 360px; }
.legend { margin-top: 8px; font-size: 12px; color: #444; display: flex; flex-wrap: wrap; gap: 12px; }
.legend .item { display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch { width: 12px; height: 12px; display: inline-block; border-radius: 2px; }

/* Progress meter inspired by CSS-Tricks */
.meter { height: 14px; position: relative; background: #555; border-radius: 12px; padding: 5px 8px; box-shadow: inset 0 -1px 1px rgba(255,255,255,0.15); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 12px; background-color: #2bc253; background-image: linear-gradient(to bottom, #2bc253, #54f054); box-shadow: inset 0 2px 6px rgba(255,255,255,0.25), inset 0 -2px 4px rgba(0,0,0,0.35); width: 100%; transform-origin: left center; transform: scaleX(0); transition: transform .12s linear; }
.meter.orange > span { background-color: #f1a165; background-image: linear-gradient(to bottom, #f1a165, #f36d0a); }
.meter.red > span { background-color: #f0a3a3; background-image: linear-gradient(to bottom, #f0a3a3, #f42323); }
.meter-mini { height: 8px; padding: 0; background: transparent; box-shadow: none; border: none; }
.meter-mini > span { height: 8px; border-radius: 6px; background-image: none; }

/* Progress bar on same line, fills remaining space */
.progress { display: flex; align-items: center; gap: 8px; }
.progress strong { flex: 0 0 auto; }
.progress .meter { height: 8px; flex: 1 1 auto; padding: 0; background: #555; border: none; box-shadow: none; border-radius: 6px; }
.progress .meter > span { height: 8px; border-radius: 6px; }

table.history { width: 100%; border-collapse: collapse; }
table.history th, table.history td { padding: 6px 8px; border-bottom: 1px solid #333; }
table.history th { text-align: left; color:#ccc; }

.tooltip { position: fixed; pointer-events: none; background: rgba(30,30,30,0.95); color:#fff; border: 1px solid #444; padding: 4px 6px; border-radius: 4px; font-size: 12px; z-index: 9999; }

/* Form controls */
input[type="range"] { width: 100%; cursor: pointer; }
input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
select { font-size: 12px; }

@media (min-width: 900px) {
  .station-layout {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
  }
  .station-sidebar {
    flex: 0 0 320px;
    width: 320px;
    position: sticky;
    top: 0;
    margin: -24px 28px 0 -10px;
    padding: 0;
    border-radius: 0;
    border: none;
    border-right: 1px solid rgba(80, 140, 210, 0.35);
    background: rgba(14, 28, 46, 0.95);
    min-height: calc(100vh - 40px);
    box-shadow: inset -1px 0 0 rgba(80,140,210,0.15), 8px 0 24px rgba(0,0,0,0.35);
  }
  .station-main {
    flex: 1 1 auto;
    padding-left: 8px;
  }
}

@media (max-width: 900px) {
  .top-nav {
    flex-wrap: nowrap;
    gap: 12px;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
  }
  .nav-left {
    flex: 1 1 auto;
    align-items: center;
    gap: 10px;
  }
  .nav-station-display {
    max-width: 60vw;
    padding: 2px 0 4px;
  }
  .nav-station-name {
    font-size: 20px;
  }
  .nav-icons {
    margin-left: auto;
    flex: 0 0 auto;
  }
  .station-layout {
    position: relative;
    gap: 12px;
    padding-top: 0;
  }
  .station-sidebar {
    position: fixed;
    top: 68px;
    left: 16px;
    right: 16px;
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.15s ease;
    z-index: 200;
    border: 1px solid #333;
  }
  .station-sidebar .sidebar-item {
    border-right: none;
    font-size: 16px;
  }
  .station-layout.menu-open .station-sidebar {
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .station-layout.menu-open {
    padding-top: 180px;
  }
  .station-layout.menu-open .station-main {
    display: none;
  }
}

.events-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.events-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.events-log {
  border: 1px solid #333;
  border-radius: 10px;
  background: #111;
  max-height: 340px;
  overflow-y: auto;
  font-size: 12px;
}
.events-entry {
  padding: 10px 12px;
  border-bottom: 1px solid #242424;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.events-entry .event-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.events-entry .event-badge {
  align-self: flex-start;
}
.events-entry:last-child {
  border-bottom: none;
}
.events-entry .event-meta {
  font-size: 11px;
  color: #999;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.events-entry .event-kind {
  color: #ffb74d;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.events-entry .event-time {
  color: #93c5ff;
  font-size: 11px;
  min-width: 60px;
  flex-shrink: 0;
  align-self: center;
  position: relative;
  top: 2px;
}
.events-entry .event-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.event-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
  align-self: center;
  line-height: 1.2;
  white-space: nowrap;
  color: #e5f3ff;
  min-width: 80px;
  width: 80px;
}
.event-badge--green {
  background: rgba(111, 231, 161, 0.15);
  border: 1px solid rgba(111, 231, 161, 0.4);
  color: #6ee7a1;
}
.event-badge--red {
  background: rgba(255, 122, 122, 0.15);
  border: 1px solid rgba(255, 122, 122, 0.4);
  color: #ff7a7a;
}
.event-badge--neutral {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e5f3ff;
}
/* Playlist mode badge in events */
.event-badge-playlist-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
  align-self: center;
  line-height: 1.2;
  white-space: nowrap;
  min-width: 80px;
  width: 80px;
  border: none;
}
.event-badge-playlist-mode--autodj {
  background: linear-gradient(135deg, #ffd45c, #f0a500);
  color: #040404;
  box-shadow: 0 2px 8px rgba(255,210,92,0.4);
}
.event-badge-playlist-mode--simple {
  background: linear-gradient(135deg, #25c175, #1a8f54);
  color: #040404;
  box-shadow: 0 2px 8px rgba(24,196,123,0.4);
}
.event-badge-playlist-mode--crate {
  background: linear-gradient(135deg, #ff6b6b, #c62828);
  color: #040404;
  box-shadow: 0 2px 8px rgba(255,107,107,0.4);
}
.event-text {
  color: #dfe9f5;
  font-size: 12px;
  flex: 1;
  position: relative;
  top: 2px;
  align-self: center;
}
.events-empty {
  padding: 20px;
  text-align: center;
  color: #909090;
}
.event-section {
  font-size: 11px;
  color: #cfd8dc;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}
.event-section-label {
  color: #8bc34a;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-right: 6px;
}
.event-section .event-text {
  flex: 1;
  position: static;
  top: auto;
  align-self: auto;
}
.event-fallback-warning {
  display: inline-block;
  color: #ff7a7a;
  font-weight: 700;
  font-size: 12px;
  margin-left: 4px;
  vertical-align: middle;
}
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.confirm-dialog {
  width: min(420px, 90vw);
  background: #111;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.confirm-dialog h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}
.confirm-dialog p {
  margin: 0;
  font-size: 14px;
  color: #cfd8dc;
  line-height: 1.5;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.confirm-overlay[hidden] {
  display: none;
}
.manual-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.manual-buttons .btn {
  font-size: 13px;
  padding: 8px 16px;
}
.manual-inline-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.manual-inline-buttons .btn {
  font-size: 13px;
  padding: 8px 16px;
}
.badge-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px !important;
  font-weight: 600;
  white-space: nowrap;
  min-width: 120px;
  width: 120px;
  height: 24px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.badge-button--success {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
}
.badge-button--success:hover,
.badge-button--success:focus-visible {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}
.badge-button--alert {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
}
.badge-button--alert:hover,
.badge-button--alert:focus-visible {
  background: #a52a2a;
  border-color: #a52a2a;
  color: #fff;
}
.badge-button[data-manual-action="reseed"]:hover,
.badge-button[data-manual-action="reseed"]:focus-visible,
.badge-button[data-manual-action="seed-rare"]:hover,
.badge-button[data-manual-action="seed-rare"]:focus-visible {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}
.badge-button#blockCurrentBtn,
.badge-button#blockQueuedBtn {
  margin-left: auto;
}
.badge-button.success {
  background: rgba(129,199,132,0.85);
  border-color: rgba(129,199,132,0.7);
  color: #1b5e20;
}
.badge-button.error {
  background: rgba(229,57,53,0.85);
  border-color: rgba(229,57,53,0.7);
  color: #fff;
}
.badge-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.login-wrapper {
  width: min(420px, 92vw);
  padding: 24px;
}

.login-card {
  background: rgba(17,17,17,0.88);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 36px 38px 42px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 18px 46px rgba(0,0,0,0.55);
}

.login-logo {
  height: 90px;
  display: block;
  margin: 0 auto 4px;
}

.login-title {
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  color: #f5f5f5;
  letter-spacing: 0.6px;
  margin: 0;
}
.login-subtitle {
  text-align: center;
  font-size: 18px;
  color: #cfd8dc;
  margin: 0;
  letter-spacing: 0.4px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-alert,
.login-error {
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 8px;
  margin: -4px 0 6px;
}
.login-alert {
  background: rgba(41,121,255,0.15);
  border: 1px solid rgba(41,121,255,0.35);
  color: #c4ddff;
}
.login-error {
  background: rgba(244,67,54,0.18);
  border: 1px solid rgba(244,67,54,0.45);
  color: #ffab91;
}
.login-form .remember-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #e0e0e0;
  margin-top: -6px;
}
.login-form .remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.login-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  color: #cfd8dc;
  letter-spacing: 0.2px;
}

.login-input {
  background: #111;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 14px 16px;
  color: #fff;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input:focus {
  outline: none;
  border-color: #2979ff;
  box-shadow: 0 0 0 2px rgba(41,121,255,0.35);
}

.login-submit {
  margin-top: 8px;
  width: 100%;
  font-size: 16px;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
}

.login-footer-text {
  font-size: 12px;
  color: rgba(229, 243, 255, 0.7);
}

.login-footer-separator {
  margin: 0 6px;
}

.login-footer-link {
  color: #e5f3ff;
  text-decoration: none;
  border-bottom: 1px dotted rgba(229, 243, 255, 0.5);
}

.login-footer-link:hover {
  color: #ffffff;
  border-bottom-style: solid;
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  padding: 12px 16px;
  background: rgba(8, 14, 26, 0.98);
  border-top: 1px solid rgba(72, 119, 186, 0.7);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.7);
  font-size: 13px;
  color: #dfe9f5;
}

.cookie-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cookie-banner-text strong {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e5f3ff;
}

.cookie-banner-text span {
  font-size: 12px;
  color: #9fb7d4;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-btn-reject,
.cookie-btn-accept {
  font-size: 12px;
  padding: 6px 12px;
}

@media (max-width: 700px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner-actions {
    justify-content: flex-end;
  }
}

.privacy-page {
  background: radial-gradient(circle at top, #324a70 0, #050811 45%, #020309 100%);
  color: #e5f3ff;
}

.privacy-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.privacy-card {
  max-width: 800px;
  width: 100%;
  background: rgba(10, 18, 32, 0.96);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(89, 140, 205, 0.7);
  padding: 32px 28px;
}

.privacy-title {
  margin: 0 0 12px 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e5f3ff;
}

.privacy-intro {
  margin: 0 0 20px 0;
  color: #c1d5f0;
}

.privacy-card h2 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
  color: #e5f3ff;
}

.privacy-card p {
  margin: 0 0 12px 0;
  color: #c1d5f0;
  font-size: 14px;
  line-height: 1.6;
}

.privacy-card ul {
  margin: 0 0 14px 20px;
  padding: 0;
  color: #c1d5f0;
  font-size: 14px;
}

.privacy-card li + li {
  margin-top: 4px;
}

.privacy-card code {
  background: rgba(3, 11, 25, 0.9);
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 13px;
}

.privacy-back-link {
  margin-top: 20px;
}

.privacy-back-link a {
  color: #e5f3ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(229, 243, 255, 0.6);
}

.privacy-back-link a:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.control-shell {
  max-width: 520px;
  margin: 24px auto 40px;
  padding: 0 12px;
}
.control-page {
  margin: 0;
}
.control-page .top-nav {
  margin: 0 0 24px 0;
  border-radius: 0;
}
.control-card {
  margin: 0;
}
.control-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.control-events {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(18,18,18,0.85);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.numeric-stepper {
  display: inline-flex;
  align-items: stretch;
  align-self: flex-start;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.35);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 4px 10px rgba(0,0,0,0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: auto;
  max-width: max-content;
}
.numeric-stepper--mini {
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 3px 8px rgba(0,0,0,0.3);
}
.numeric-stepper--mini .stepper-button {
  width: 30px;
  font-size: 14px;
}
.numeric-stepper--mini .stepper-input {
  width: 44px;
  font-size: 15px;
}
.numeric-stepper.scoring-stepper .stepper-input {
  width: 56px;
  font-size: 16px;
  font-weight: 600;
}
.numeric-stepper.scoring-stepper .stepper-button {
  width: 32px;
  font-size: 16px;
}
.numeric-stepper--disabled {
  opacity: 0.5;
  pointer-events: none;
}
.numeric-stepper:focus-within {
  border-color: rgba(129, 212, 250, 0.6);
  box-shadow: 0 0 0 1px rgba(129, 212, 250, 0.4), 0 10px 26px rgba(0,0,0,0.5);
}
.stepper-button {
  border: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  color: #fff;
  font-size: 16px;
  width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.stepper-button:hover {
  background: rgba(255,255,255,0.12);
}
.stepper-button:focus-visible {
  outline: 2px solid rgba(129,212,250,0.6);
  outline-offset: -2px;
}
.stepper-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.stepper-input {
  width: 48px;
  text-align: center;
  border: none;
  background: transparent;
  color: #e0f7fa;
  font-size: 18px;
  font-weight: 500;
  appearance: none;
  -moz-appearance: textfield;
  user-select: none;
  caret-color: transparent;
}
.stepper-input:focus {
  outline: none;
}
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stepper-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}
.stepper-value-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #90a4ae;
}
.stepper-value {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: #e3f2fd;
  margin-top: 6px;
}
.stepper-hint {
  margin: 0;
  font-size: 11px;
  color: #9fb4c0;
  max-width: 100%;
}
.setting-stepper-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.setting-stepper-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scoring-slider--stepper {
  width: auto;
}
.scoring-slider--stepper .numeric-stepper {
  width: auto;
  margin-top: 0;
}

@media (max-width: 640px) {
  .scoring-grid--compact,
  .scoring-inline-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .scoring-field-label,
  .scoring-inline-field .form-label,
  .scoring-field-hint,
  .scoring-inline-field .hint-wrapper,
  .scoring-control,
  .scoring-inline-control {
    justify-self: flex-start;
  }
}
.scoring-stepper {
  min-width: 100px;
  justify-content: center;
}

.control-events h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #b0bec5;
}
.control-events-list {
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-color: #707070 #101010;
}
.control-events-list::-webkit-scrollbar {
  width: 8px;
}
.control-events-list::-webkit-scrollbar-track {
  background: #101010;
  border-radius: 6px;
}
.control-events-list::-webkit-scrollbar-thumb {
  background: #707070;
  border-radius: 6px;
}
.control-events-list::-webkit-scrollbar-thumb:hover {
  background: #8d8d8d;
}
.control-event-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #d1d9df;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 6px;
}
.control-event-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.control-event-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #90a4ae;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.control-event-kind {
  color: #ffb74d;
}
.control-event-time {
  color: #81d4fa;
}
.control-event-body {
  color: #eceff1;
}
.station-control-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.station-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  background: rgba(18,18,18,0.85);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  gap: 12px;
  flex-wrap: wrap;
}
.station-control-row.processing {
  opacity: 0.7;
}
.station-control-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 200px;
}
.station-control-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}
.station-status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0,0,0,0.45);
}
.station-status-dot.running {
  background: #4caf50;
}
.station-status-dot.stopped {
  background: #f44336;
}
.station-status-text {
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #cfd8dc;
}
.station-status-text.status-running {
  color: #8bc34a;
}
.station-status-text.status-stopped {
  color: #ef9a9a;
}
.station-status-text.status-success {
  color: #8bc34a;
}
.station-status-text.status-error {
  color: #ff6b6b;
}
.station-status-text.status-info {
  color: #90caf9;
}
.station-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  padding-right: 6px;
}
.station-slider {
  -webkit-appearance: none;
  appearance: none;
  width: min(180px, 100vw - 140px);
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(160,160,160,0.55) 0%, rgba(160,160,160,0.55) 100%);
  outline: none;
  transition: background 0.2s ease;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
}
.station-slider.processing {
  cursor: wait;
}
.station-slider:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.station-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0,0,0,0.3);
  margin-top: 1px;
  transition: transform 0.15s ease, background 0.2s ease;
}
.station-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0,0,0,0.3);
  margin-top: 1px;
  transition: transform 0.15s ease, background 0.2s ease;
}
.station-slider.processing::-webkit-slider-thumb,
.station-slider.processing::-moz-range-thumb {
  background: #ccc;
}
@media (max-width: 520px) {
  .station-control-row {
    flex-direction: column;
    align-items: stretch;
  }
  .station-control-meta {
    flex: 1 1 auto;
    min-width: 0;
  }
  .station-toggle {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-right: 0;
  }
  .station-slider {
    width: 100%;
  }
}

.station-gear-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #cfd8dc;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.station-gear-link:hover {
  background: rgba(139,195,74,0.2);
  border-color: rgba(139,195,74,0.5);
  color: #e8f5e9;
}
.station-gear-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.station-gear-link:focus-visible {
  outline: 2px solid #8bc34a;
  outline-offset: 2px;
}

.track-search-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.track-search-controls {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}
.track-search-controls .form-control {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}
.track-search-controls .btn {
  white-space: nowrap;
  flex-shrink: 0;
}
.track-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(17,17,17,0.75);
  max-height: 320px;
  overflow-y: auto;
  scrollbar-color: #707070 #101010;
}
.track-search-results::-webkit-scrollbar {
  width: 8px;
}
.track-search-results::-webkit-scrollbar-track {
  background: #101010;
  border-radius: 6px;
}
.track-search-results::-webkit-scrollbar-thumb {
  background: #707070;
  border-radius: 6px;
}
.track-search-results::-webkit-scrollbar-thumb:hover {
  background: #8d8d8d;
}
.track-search-results.empty {
  display: none;
}
.track-search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  gap: 16px;
}
.track-search-item.selected {
  background: rgba(139,195,74,0.2);
}
.track-search-item:last-child {
  border-bottom: none;
}
.track-search-item:hover {
  background: rgba(255,255,255,0.05);
}
.track-search-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
}
.track-search-line {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 14px;
}
.track-search-artist {
  font-weight: 700;
  color: #fff;
}
.track-search-title {
  color: #e0e0e0;
}
.track-blocked-badge {
  display: inline-block;
  width: 18px;
  height: 18px;
  padding: 0;
  background: #8c1d1d;
  color: #fff;
  border: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
  text-align: center;
  line-height: 18px;
}
.track-search-details {
  font-size: 12px;
  color: #90a4ae;
}

.track-search-actions {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 6px;
}
.track-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.track-search-btn.block {
  background: #8c1d1d;
  border-color: #8c1d1d;
}
.track-search-btn.block:hover,
.track-search-btn.block:focus-visible {
  background: #a52a2a;
  border-color: #a52a2a;
}
.track-search-btn.unblock {
  background: #2e7d32;
  border-color: #2e7d32;
}
.track-search-btn.unblock:hover,
.track-search-btn.unblock:focus-visible {
  background: #388e3c;
  border-color: #388e3c;
}
.track-search-btn.edit {
  background: #455a64;
  border-color: #455a64;
}
.track-search-btn.edit:hover,
.track-search-btn.edit:focus-visible {
  background: #546e7a;
  border-color: #546e7a;
}
.track-search-btn.queue {
  background: #1b5e20;
  border-color: #1b5e20;
}
.track-search-btn.queue:hover,
.track-search-btn.queue:focus-visible {
  background: #2e7d32;
  border-color: #2e7d32;
}
.track-search-btn.success {
  background: rgba(129,199,132,0.85);
  border-color: rgba(129,199,132,0.7);
  color: #1b5e20;
}
.track-search-btn.error {
  background: rgba(229,57,53,0.9);
  border-color: rgba(211,47,47,0.8);
  color: #ffebee;
}
/* Track Search Pagination */
.track-search-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.pagination-btn {
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.9em;
  transition: background 0.2s, border-color 0.2s;
}
.pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}
.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pagination-btn.active {
  background: rgba(3, 218, 198, 0.3);
  border-color: #03dac6;
  font-weight: bold;
}
.pagination-info {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9em;
  margin: 0 0.5rem;
}
.pagination-numbers {
  display: flex;
  gap: 0.25rem;
}

.track-search-btn:focus-visible {
  outline: 2px solid rgba(139,195,74,0.8);
  outline-offset: 2px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}
.modal-overlay[hidden] {
  display: none;
}
.modal-dialog {
  width: min(420px, 92vw);
  background: #111;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-dialog h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-buttons {
  display: inline-flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-error {
  color: #ff6b6b;
  font-size: 13px;
}
.modal-error[hidden] {
  display: none;
}

.image-carousel {
  position: relative;
  width: 100%;
  margin: 36px auto 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  overflow-x: hidden; /* Hide horizontal scrollbar */
}
.image-carousel--control {
  padding: 0 24px 24px;
  /* Full width - no max-width */
}
/* Gradients removed - images appear from right and disappear to left */
.image-carousel__track {
  display: flex;
  align-items: center;
  gap: 0; /* No gaps between images */
  transform: translateX(0);
  will-change: transform;
}
.image-carousel__item {
  flex: 0 0 auto;
  border-radius: 0; /* No curved borders */
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  background: rgba(18, 30, 50, 0.9);
  margin-right: 0; /* No gaps */
  opacity: 0; /* Hidden until loaded */
  transition: opacity 0.3s ease;
}
.image-carousel__item.loaded {
  opacity: 1;
}
.image-carousel__item img {
  display: block;
  height: 70px;
  width: auto;
}
@media (max-width: 600px) {
  .image-carousel {
    margin-top: 28px;
  }
  .image-carousel__item img {
    height: 56px;
  }
}

