/* RDS Pro — console touch-first */

@font-face {
  font-family: "RDS Display";
  src: url("../fonts/display.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RDS Icons";
  src: url("../fonts/icons.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

:root {
  --bg: #0b0d10;
  --bg-panel: #14181e;
  --bg-elev: #1b2129;
  --bg-row: #10141a;
  --bg-row-alt: #151b23;
  --bg-pad: #f4f6f8;
  --line: #2a3340;
  --line-strong: #3d4a5c;
  --text: #f2f4f7;
  --text-dim: #9aa5b5;
  --text-mute: #6b7788;
  --accent-blue: #1e6fff;
  --accent-blue-deep: #0d4ecc;
  --accent-yellow: #f0c000;
  --accent-green: #1fad5a;
  --accent-cyan: #3db8e8;
  --accent-red: #e03131;
  --accent-orange: #f59f00;
  --accent-white: #eef1f5;
  --touch-min: 2.85rem; /* ~46px — touchable e cabe em 1080 */
  --touch-transport: 3.35rem;
  --radius: 0.45rem;
  --gap: 0.4rem;
  --pad: 0.4rem;
  --font-ui: "Barlow", "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;
  --font-onair: "RDS Display", "JetBrains Mono", "Consolas", monospace;
  --font-icons: "RDS Icons", sans-serif;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  --display-h: 7.4rem;
  --transport-h: 5.2rem;
  --topbar-h: 3.35rem;

  /* Pads: largura pela altura útil; altura da grade preenche o contêiner (pode ser retangular) */
  --pad-gap: 0.2rem;
  --pad-inset: 0.22rem;
  /* chrome interno da coluna: Breaking News + nav de páginas */
  --pads-chrome-h: 6.4rem;
  --pads-avail-h: calc(
    100dvh
    - var(--topbar-h)
    - var(--transport-h)
    - (2 * var(--gap))
    - (2 * var(--pad))
    - var(--pads-chrome-h)
  );
  --pad-size: clamp(
    3.1rem,
    calc((var(--pads-avail-h) - 6 * var(--pad-gap) - 2 * var(--pad-inset)) / 7),
    7rem
  );
  --pads-grid-w: calc(7 * var(--pad-size) + 6 * var(--pad-gap) + 2 * var(--pad-inset));
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050608;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

button, a, input {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  appearance: none;
  -webkit-appearance: none;
}

/* Console preenche a janela — sem canvas fixo, sem letterbox */
.rds-app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--gap);
  padding: var(--pad);
  overflow: hidden;
  background: var(--bg);
  z-index: 1;
}

/* ── Barra superior (título + ações) — largura total ── */
.rds-topbar {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  min-height: 0;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0.35rem 0.45rem;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.rds-topbar-project {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.1rem 0.35rem;
}

.rds-topbar-clock {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 0.08rem;
  padding: 0.1rem 0.55rem;
  min-width: 7.5rem;
  text-align: right;
}

.rds-topbar-clock-time {
  font-family: var(--font-onair);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  letter-spacing: 0.02em;
  line-height: 1;
  color: #9ad7ff;
  white-space: nowrap;
}

.rds-topbar-clock-date {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: clamp(0.72rem, 0.95vw, 0.88rem);
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--text-dim);
  text-transform: capitalize;
  white-space: nowrap;
}

.rds-topbar-weather {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(28rem, 42vw);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.25rem 0.85rem;
  align-content: center;
  margin-left: auto;
  padding: 0.1rem 0.45rem 0.1rem 0.35rem;
}

.rds-topbar-weather-col {
  min-width: 0;
  font-family: var(--font-ui);
  font-size: clamp(0.78rem, 1.05vw, 0.98rem);
  font-weight: 600;
  color: #99e9f2;
  line-height: 1.25;
  white-space: pre-line;
  overflow: hidden;
}

.rds-topbar-weather-col:empty {
  display: none;
}

.rds-topbar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.22rem;
  flex: 0 1 auto;
  max-width: 100%;
  overflow-x: auto;
}

.rds-topbar-actions .rds-btn {
  flex: 0 0 auto;
  min-width: 0;
  min-height: var(--touch-min);
  height: var(--touch-min);
  padding: 0.3rem 0.55rem;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  gap: 0.3rem;
  white-space: nowrap;
}

.rds-topbar-actions .rds-btn i {
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* ── Display on-air (largura = coluna da playlist) ── */
.rds-playlist-col > .rds-display {
  flex-shrink: 0;
  width: 100%;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid #3a3a3a;
}

.rds-display {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
  max-height: none;
  padding: 0.45rem 0.55rem 0.5rem;
  background: #000;
  overflow: hidden;
}

.rds-display-title {
  font-family: var(--font-ui);
  font-size: clamp(1.15rem, 1.6vw, 1.55rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rds-display-artist {
  margin-top: 0.12rem;
  font-family: var(--font-ui);
  font-size: clamp(0.85rem, 1.1vw, 1.05rem);
  font-weight: 500;
  color: #e8e8e8;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rds-display-meters {
  flex: 0 0 auto;
  min-height: 5.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) repeat(4, minmax(5.2rem, 0.34fr));
  gap: 0.35rem;
}

.rds-display-queue,
.rds-display-timer {
  min-width: 0;
  min-height: 0;
  background: #000;
  border: 1px solid #d0d0d0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.45rem;
  text-align: center;
}

.rds-display-timer {
  container-type: size;
  justify-content: flex-start;
  gap: 0.08rem;
  padding: 0.2rem 0.25rem 0.12rem;
}

.rds-display-timer .rds-display-label {
  flex-shrink: 0;
}

.rds-display-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
}

.rds-display-label.is-cyan { color: #9ad7ff; }
.rds-display-label.is-yellow { color: #ffe066; }
.rds-display-label.is-green { color: #8ce99a; }
.rds-display-label.is-orange { color: #ffb86b; }

.rds-display-track {
  margin: 0.08rem 0 0.22rem;
  max-width: 100%;
  font-family: var(--font-ui);
  font-size: clamp(0.95rem, 1.25vw, 1.2rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rds-display-queue .rds-display-track:last-child {
  margin-bottom: 0;
}

.rds-display-clock {
  position: relative;
  flex: 1 1 auto;
  margin: 0;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-onair);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.92;
  font-size: clamp(1.45rem, min(42cqh, 22cqw), 2.35rem);
  overflow: hidden;
  white-space: nowrap;
  padding: 0 0.15rem;
  box-sizing: border-box;
}

.rds-display-clock-ghost,
.rds-display-clock-face {
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  white-space: nowrap;
}

.rds-display-clock-ghost {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2a2a2a;
  transform: translate(0.08em, 0.08em);
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.rds-display-clock-face {
  position: relative;
  z-index: 1;
}

.rds-display-timer.is-play .rds-display-clock-face { color: #9ad7ff; }
.rds-display-timer.is-auto .rds-display-clock-face { color: #ffe066; }
.rds-display-timer.is-start .rds-display-clock-face { color: #8ce99a; }
.rds-display-timer.is-break .rds-display-clock-face { color: #ffb86b; }

.rds-display-timer.is-auto.is-ending .rds-display-clock-face {
  animation: rds-ending-blink 0.7s steps(1, end) infinite;
}

@keyframes rds-ending-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.12; }
}

/* ── Shared large buttons ── */
.rds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: var(--touch-min);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #111;
  background: var(--accent-white);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.08s ease, filter 0.12s ease, background 0.12s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.rds-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.2);
}

.rds-btn:disabled,
.rds-btn[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.25);
}

.rds-btn:disabled:active,
.rds-btn[disabled]:active {
  transform: none;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

/* Sem projeto aberto: bloqueia área de trabalho (exceto Novo/Abrir/Biblioteca/Config) */
#rdsApp.is-no-project .rds-playlist-body,
#rdsApp.is-no-project .rds-progress,
#rdsApp.is-no-project .rds-display,
#rdsApp.is-no-project .rds-pads-col,
#rdsApp.is-no-project .rds-transport,
#rdsApp.is-no-project .rds-toolbar {
  opacity: 0.48;
  filter: grayscale(0.15);
}

#rdsApp.is-no-project .rds-playlist,
#rdsApp.is-no-project .rds-mixer,
#rdsApp.is-no-project .rds-progress,
#rdsApp.is-no-project .rds-pads-grid,
#rdsApp.is-no-project .rds-pads-news,
#rdsApp.is-no-project .rds-loop-mode {
  pointer-events: none;
}

#rdsApp.is-no-project .rds-pads-nav-btn:disabled,
#rdsApp.is-no-project .rds-pad:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.rds-btn.is-active,
.rds-btn[aria-pressed="true"] {
  outline: 2px solid var(--accent-blue);
  outline-offset: 1px;
}

.rds-btn-icon {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0.25rem 0.35rem;
  flex-direction: column;
  gap: 0.08rem;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.rds-btn-icon i {
  font-size: 1.05rem;
  line-height: 1;
}

.rds-btn-blue { background: var(--accent-blue); color: #fff; }
.rds-btn-blue-deep { background: var(--accent-blue-deep); color: #fff; }
.rds-btn-yellow { background: #ffd43b; color: #111; }
.rds-btn-green { background: var(--accent-green); color: #fff; }
.rds-btn-cyan { background: var(--accent-cyan); color: #072033; }
.rds-btn-passagem { background: #e8912d; color: #1a1006; }
.rds-btn-boletim { background: #7c3aed; color: #fff; }

.rds-btn-stream {
  background: #2b2f36;
  color: #d7dde8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.rds-btn-stream.is-on-air {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
  animation: rds-play-btn-blink 0.85s steps(1, end) infinite;
}
.rds-btn-stream.is-connecting {
  background: #b45309;
  color: #fff;
  border-color: #b45309;
}

.rds-btn-robot {
  background: #1a3d32;
  color: #c8efe2;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.rds-btn-robot.is-on-air {
  background: #0d9488;
  color: #fff;
  border-color: #0d9488;
  animation: rds-play-btn-blink 0.85s steps(1, end) infinite;
}

.rds-btn-listen {
  background: #2a2540;
  color: #ddd6fe;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rds-btn-monitor {
  background: #1e3a5f;
  color: #dce9f8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.rds-btn-monitor.is-muted {
  background: #3a3a3a;
  color: #9aa3b2;
  opacity: 0.85;
}
.rds-btn-red { background: var(--accent-red); color: #fff; }
.rds-btn-orange { background: var(--accent-orange); color: #111; }
.rds-btn-dark { background: #1f2630; color: #fff; border-color: var(--line-strong); }
.rds-btn-stop { background: #8e97a3; color: #fff; }
.rds-btn-ghost {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--line);
  box-shadow: none;
}

/* ── Main workspace ── */
.rds-main {
  display: grid;
  /* Playlist ocupa o restante; pads têm largura = grade 8×botões quadrados */
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: var(--gap);
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}

.rds-playlist-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.rds-playlist-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
}

.rds-playlist {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.rds-playlist.is-drop-target {
  outline: 2px dashed var(--accent-blue);
  outline-offset: -4px;
  background: rgba(30, 111, 255, 0.08);
}

.rds-pads-grid.is-drop-target {
  outline: 2px dashed var(--accent-cyan);
  outline-offset: -2px;
  background: rgba(61, 184, 232, 0.08);
}

.rds-pad.is-drop-target {
  outline: 2px solid var(--accent-cyan);
  outline-offset: -2px;
  filter: brightness(1.08);
}
.rds-pad.is-dragging {
  opacity: 0.35;
  cursor: grabbing;
  transform: none;
  z-index: 1;
  outline: 2px dashed rgba(61, 184, 232, 0.55);
  outline-offset: -2px;
}
/* position:fixed via inline + !important — .rds-pad { position:relative } vinha por cima */
button.rds-pad.rds-pad-ghost,
.rds-pad.rds-pad-ghost {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  z-index: 2147483000 !important;
  margin: 0 !important;
  opacity: 0.88 !important;
  pointer-events: none !important;
  filter: none !important;
  outline: none !important;
  animation: none !important;
  cursor: grabbing !important;
}
.rds-pad.rds-pad-ghost,
.rds-pad.rds-pad-ghost * {
  pointer-events: none !important;
  animation: none !important;
}
.rds-pads-grid.is-pad-reordering {
  cursor: grabbing;
}
.rds-pads-grid.is-pad-reordering .rds-pad {
  cursor: grabbing;
}

/* ── Mixer / Channel strips ── */
.rds-mixer {
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  gap: 0.18rem;
  padding: 0.22rem;
  border-left: 1px solid var(--line);
  background: #0d0f14;
  overflow: hidden;
}

.rds-mixer.is-cs-reordering {
  user-select: none;
  cursor: grabbing;
}

.rds-mixer.is-cs-reordering .rds-cs-head,
.rds-mixer.is-cs-reordering .rds-cs-title {
  cursor: grabbing;
}

.rds-cs {
  --cs-bg: #1a1d23;
  --cs-line: #2a2f38;
  --cs-muted: #9aa3ad;
  --cs-text: #f3f5f7;
  --cs-accent: #4ea1ff;
  --cs-warn: #f0c000;
  --cs-peak: #3ddc84;
  --cs-tint: transparent;
  width: 5.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.32rem 0.22rem 0.32rem;
  background: var(--cs-bg);
  border: 1px solid var(--cs-line);
  border-radius: 0.35rem;
  color: var(--cs-text);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.rds-cs.has-tint {
  background: color-mix(in srgb, var(--cs-tint) 38%, var(--cs-bg));
  border-color: color-mix(in srgb, var(--cs-tint) 52%, var(--cs-line));
  box-shadow: inset 0 3px 0 0 var(--cs-tint);
}

.rds-cs-head,
.rds-cs-pan-block,
.rds-cs > .rds-cs-block:last-child {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.rds-cs.is-disabled {
  opacity: 0.72;
}

.rds-cs.is-disabled .rds-cs-head,
.rds-cs.is-disabled .rds-cs-title,
.rds-cs.is-disabled .rds-cs-title-edit {
  pointer-events: auto !important;
}

.rds-cs-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.22rem;
  padding-bottom: 0.15rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.rds-cs-head::before {
  content: "";
  width: 0.42rem;
  height: 0.82rem;
  flex-shrink: 0;
  border-radius: 1px;
  background: repeating-linear-gradient(
    to bottom,
    #6b7380 0 1.5px,
    transparent 1.5px 3.4px
  );
  opacity: 0.85;
}

.rds-cs.is-cs-dragging {
  opacity: 0.35;
  outline: 2px dashed rgba(78, 161, 255, 0.55);
  outline-offset: -2px;
  z-index: 1;
}

article.rds-cs.rds-cs-ghost,
.rds-cs.rds-cs-ghost {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  z-index: 2147483000 !important;
  margin: 0 !important;
  opacity: 0.88 !important;
  pointer-events: none !important;
  filter: none !important;
  outline: none !important;
  cursor: grabbing !important;
  overflow: hidden !important;
}

.rds-cs.rds-cs-ghost,
.rds-cs.rds-cs-ghost * {
  pointer-events: none !important;
}

.rds-cs-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
  cursor: grab;
}

.rds-cs.is-renaming .rds-cs-head,
.rds-cs.is-renaming .rds-cs-title {
  cursor: text;
}

.rds-cs-title-edit {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 0.08rem;
  border: 0;
  border-radius: 0.12rem;
  font: inherit;
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0;
  line-height: 1.15;
  color: #111;
  pointer-events: auto !important;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 1px rgba(78, 161, 255, 0.65);
}

.rds-cs-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.rds-cs-label {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cs-muted);
}

.rds-cs-select {
  width: 100%;
  appearance: none;
  background: #12151a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239aa3ad' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 0.3rem center;
  background-size: 0.45rem;
  color: var(--cs-text);
  border: 1px solid #3a424e;
  border-radius: 0.22rem;
  padding: 0.28rem 1.1rem 0.28rem 0.3rem;
  font-size: 0.62rem;
  font-weight: 600;
}

.rds-cs-select.is-accent {
  border-color: var(--cs-accent);
}

.rds-cs-select:focus {
  outline: none;
  border-color: var(--cs-accent);
  box-shadow: 0 0 0 1px rgba(78, 161, 255, 0.35);
}

.rds-cs-hint {
  margin: 0;
  font-size: 0.58rem;
  line-height: 1.35;
  color: #7f8792;
}

.rds-cs-hint.is-warn {
  color: var(--cs-warn);
}

.rds-cs-pan-block {
  align-items: center;
}

.rds-cs-pan-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  width: 100%;
}

.rds-cs-pan-lr {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.9rem;
  padding: 0.1rem 0.08rem;
  border: none;
  border-radius: 0.12rem;
  background: transparent;
  font-family: inherit;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--cs-muted);
  cursor: pointer;
  line-height: 1;
  user-select: none;
}

.rds-cs-pan-lr:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.rds-cs-pan-lr:active {
  color: #ffe066;
}

.rds-cs-pan-row:has(.rds-cs-pan.is-disabled) .rds-cs-pan-lr,
.rds-cs-pan-row:has(.rds-cs-pan[aria-disabled="true"]) .rds-cs-pan-lr {
  pointer-events: none;
  opacity: 0.55;
  cursor: default;
}

.rds-cs-pan {
  position: relative;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  border: 1px solid #3a424e;
  background:
    radial-gradient(circle at 50% 50%, #2a3038 0 58%, transparent 59%),
    repeating-conic-gradient(from -135deg, #4a5562 0 2deg, transparent 2deg 15deg);
  background-color: #15181e;
  cursor: grab;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  transition: none;
  filter: none;
  transform: none;
}

.rds-cs-pan:hover,
.rds-cs-pan:focus,
.rds-cs-pan:focus-visible,
.rds-cs-pan:active {
  filter: none;
  outline: none;
  background-color: #15181e;
  background-image:
    radial-gradient(circle at 50% 50%, #2a3038 0 58%, transparent 59%),
    repeating-conic-gradient(from -135deg, #4a5562 0 2deg, transparent 2deg 15deg);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  transform: none;
}

.rds-cs-pan.is-dragging {
  cursor: grabbing;
}

.rds-cs-pan.is-disabled,
.rds-cs-pan[aria-disabled="true"] {
  cursor: default;
  pointer-events: none;
  opacity: 0.55;
}

.rds-cs-pan-knob {
  position: absolute;
  inset: 0.32rem;
  border-radius: 50%;
  background: linear-gradient(160deg, #2c323c, #12151a);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  transform: rotate(var(--pan, 0deg));
  transform-origin: 50% 50%;
  transition: none;
}

.rds-cs-pan-knob::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.15rem;
  width: 2px;
  height: 38%;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--cs-accent);
  transform: none;
}

.rds-cs-ms {
  display: flex;
  gap: 0.2rem;
  justify-content: center;
  margin-top: 0.1rem;
  min-height: 1.45rem;
}

.rds-cs-ms-spacer .rds-cs-ms-btn {
  visibility: hidden;
  pointer-events: none;
}

.rds-cs-ms-btn {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.18rem;
  border: 1px solid #3a424e;
  background: #12151a;
  color: var(--cs-muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0;
}

.rds-cs-ms-btn[aria-pressed="true"][data-cs-field="mute"] {
  background: #c62828;
  border-color: #e57373;
  color: #fff;
}

.rds-cs-ms-btn[aria-pressed="true"][data-cs-field="solo"] {
  background: #f0c000;
  border-color: #ffe066;
  color: #111;
}

.rds-cs-faders {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0.15rem;
  margin-bottom: 0;
}

.rds-cs-lane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.18rem;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
}

.rds-cs-readouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.1rem;
  width: 100%;
  flex-shrink: 0;
}

.rds-cs-gain,
.rds-cs-peak {
  display: block;
  text-align: center;
  font-family: var(--font-onair);
  font-size: 0.52rem;
  line-height: 1.15;
  padding: 0.12rem 0.05rem;
  background: #050607;
  border: 1px solid #2a2f38;
  border-radius: 0.12rem;
  color: #e8eaed;
}

.rds-cs-peak {
  color: var(--cs-peak);
}

.rds-cs-lane-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1rem auto 0.7rem;
  gap: 0.12rem;
  align-items: stretch;
  width: 100%;
  min-height: 12.5rem;
  height: auto;
  max-height: none;
  justify-content: center;
}

.rds-cs:has(.rds-cs-dim-btn) .rds-cs-lane-body {
  min-height: 7rem;
  margin-bottom: 0.55rem;
}

.rds-cs:has(.rds-cs-dim-btn) .rds-cs-faders {
  margin-bottom: 0.2rem;
}

.rds-cs:has(.rds-cs-dim-btn) > .rds-cs-block:last-child {
  margin-top: 0.55rem;
}

.rds-cs-dim-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 2.45rem;
  height: 2.45rem;
  min-width: 2.45rem;
  min-height: 2.45rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
  margin-bottom: 0.35rem;
  border-radius: 0.28rem;
  border: 1px solid transparent;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.rds-cs-dim-key {
  display: block;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.06em;
  font-family: inherit;
  pointer-events: none;
}

.rds-cs-dim-btn:hover:not([aria-pressed="true"]) {
  filter: brightness(1.08);
}

.rds-cs-dim-btn[aria-pressed="true"] {
  animation: rds-play-btn-blink 0.85s steps(1, end) infinite;
}

.rds-cs[data-cs="playlist"] .rds-cs-dim-btn {
  background: #c62828;
  border-color: #ef9a9a;
}

.rds-cs[data-cs="pads"] .rds-cs-dim-btn {
  background: #e6a100;
  border-color: #ffe082;
  color: #1a1400;
}

.rds-cs[data-cs="input"] .rds-cs-dim-btn {
  background: #12b886;
  border-color: #7dffa8;
}

.rds-cs[data-cs="input"] .rds-cs-dim-btn[aria-pressed="true"] {
  animation: rds-input-cut-blink 0.85s steps(1, end) infinite;
}

@keyframes rds-input-cut-blink {
  0%,
  49% {
    background: #12b886;
    border-color: #7dffa8;
    color: #fff;
  }
  50%,
  100% {
    background: #e8590c;
    border-color: #ffc078;
    color: #fff;
  }
}

.rds-cs[data-cs="tts"] .rds-cs-dim-btn {
  background: #6d28d9;
  border-color: #c4b5fd;
}

.rds-cs[data-cs="master"] .rds-cs-dim-btn,
.rds-cs[data-cs="monitor"] .rds-cs-dim-btn {
  font-size: 1.4rem;
}

.rds-cs[data-cs="master"] .rds-cs-dim-btn {
  background: #1e6fff;
  border-color: #90caf9;
}

.rds-cs[data-cs="monitor"] .rds-cs-dim-btn {
  background: #546e7a;
  border-color: #b0bec5;
}

.rds-cs-fader {
  writing-mode: vertical-lr;
  direction: rtl;
  appearance: slider-vertical;
  -webkit-appearance: slider-vertical;
  width: 1.1rem;
  height: 100%;
  min-height: 0;
  margin: 0;
  background: transparent;
  cursor: ns-resize;
  touch-action: none;
  position: relative;
  z-index: 2;
}

.rds-cs-fader::-webkit-slider-runnable-track {
  width: 0.28rem;
  background: #0a0c10;
  border: 1px solid #3a424e;
  border-radius: 0.1rem;
}

.rds-cs-fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1rem;
  height: 1.45rem;
  margin-left: -0.36rem;
  border-radius: 0.12rem;
  border: 1px solid #8b949e;
  background:
    repeating-linear-gradient(
      to bottom,
      #d7dde3 0 1px,
      #b7bec6 1px 3px
    );
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.rds-cs-fader::-moz-range-track {
  width: 0.28rem;
  background: #0a0c10;
  border: 1px solid #3a424e;
  border-radius: 0.1rem;
}

.rds-cs-fader::-moz-range-thumb {
  width: 1rem;
  height: 1.45rem;
  border-radius: 0.12rem;
  border: 1px solid #8b949e;
  background: #c5ccd4;
}

.rds-cs-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  font-size: 0.48rem;
  font-weight: 700;
  color: #6d7682;
  padding: 0.15rem 0;
  user-select: none;
}

.rds-cs-meter {
  width: 0.55rem;
  height: 100%;
  background: #050607;
  border: 1px solid #2a2f38;
  border-radius: 0.1rem;
  overflow: hidden;
  position: relative;
}

.rds-cs-meter-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(to top, #2ecc71 0%, #2ecc71 55%, #f0c000 78%, #e03131 100%);
  transition: height 0.08s linear;
}

.rds-cs-lane-name {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cs-muted);
  text-align: center;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 0.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Layout em monitores um pouco mais estreitos que Full HD */
@media (max-width: 1400px) {
  /* reservado — console fluido preenche a janela */
}

@media (max-width: 1180px) {
  /* reservado — console fluido preenche a janela */
}

.rds-pads-col {
  display: flex;
  flex-direction: column;
  width: var(--pads-grid-w);
  max-width: 100%;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  justify-self: end;
}

.rds-pads-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.28rem 0.35rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
  flex-shrink: 0;
}

.rds-pads-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
}

.rds-pads-nav .rds-btn-icon {
  flex-direction: row;
  min-height: 2.2rem;
  height: 2.2rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
  gap: 0.28rem;
}

.rds-pads-page {
  min-width: 3.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.rds-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.22rem;
  padding: 0.28rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}

.rds-toolbar .rds-btn-icon {
  flex: 1 1 0;
  width: auto;
  min-width: max-content;
  min-height: 2.35rem;
  height: 2.35rem;
  padding: 0.22rem 0.42rem;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.rds-toolbar .rds-btn-icon i {
  font-size: 0.92rem;
  flex-shrink: 0;
}

.rds-toolbar .rds-btn-icon span {
  flex-shrink: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.rds-progress {
  flex-shrink: 0;
  margin: 0;
  padding: 0.15rem 0.35rem 0.2rem;
  background: #0a0a0a;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
  user-select: none;
}

.rds-progress-track {
  position: relative;
  height: 1.35rem;
  border-radius: 0.15rem;
  overflow: hidden;
  background: #000;
}

.rds-progress.is-seekable .rds-progress-track {
  cursor: pointer;
}

.rds-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--progress-play-fill, #4169e1);
  transform-origin: left center;
  transition: background-color 0.15s ease;
  pointer-events: none;
  z-index: 1;
}

.rds-progress-marks {
  display: none;
}

.rds-progress-seek {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.rds-progress-seek:disabled {
  cursor: default;
}

.rds-progress-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1px;
  height: 1px;
  background: transparent;
  border: 0;
}

.rds-progress-seek::-moz-range-thumb {
  width: 1px;
  height: 1px;
  background: transparent;
  border: 0;
}

.rds-progress-labels {
  position: relative;
  height: 0.95rem;
  margin-top: 0.12rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #9aa5b5;
  letter-spacing: 0.02em;
}

.rds-progress-label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  line-height: 1;
}

.rds-progress-label.is-start {
  transform: translateX(0);
}

.rds-progress-label.is-end {
  transform: translateX(-100%);
}

.rds-progress[data-mode="idle"] .rds-progress-track {
  background: #000;
}

.rds-progress[data-mode="idle"] .rds-progress-fill {
  width: 0% !important;
  background: transparent;
}

.rds-progress[data-mode="idle"] .rds-progress-marks,
.rds-progress[data-mode="idle"] .rds-progress-labels {
  opacity: 0.35;
}

.rds-progress[data-mode="play"] .rds-progress-track {
  background: var(--progress-play-bg, #ffe066);
}

.rds-progress[data-mode="play"] .rds-progress-fill {
  background: var(--progress-play-fill, #4169e1);
}

.rds-progress[data-mode="ending"] .rds-progress-track {
  background: var(--progress-ending-bg, #ffe066);
}

.rds-progress[data-mode="ending"] .rds-progress-fill {
  background: var(--progress-ending-fill, #c62828);
}

.rds-playlist-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.32rem;
}

.rds-playlist-table tr {
  background: transparent;
}

.rds-playlist-table tr:nth-child(even) {
  background: transparent;
}

.rds-playlist-table tr[data-index] td {
  background: var(--bg-row);
  border-top: 1px solid #c5cad3;
  border-bottom: 1px solid #c5cad3;
  padding: 0.42rem 0.45rem;
  vertical-align: middle;
}

.rds-playlist-table tr[data-index] td:first-child {
  border-left: 1px solid #c5cad3;
  padding-left: 0.55rem;
}

.rds-playlist-table tr[data-index] td:last-child {
  border-right: 1px solid #c5cad3;
  padding-right: 0.65rem;
}

.rds-playlist-table tr[data-index]:nth-child(even) td {
  background: var(--bg-row-alt);
}

/* Cores por tipo (Config → Cores das trilhas) */
.rds-playlist-table tr[data-pl-color] td {
  background: var(--pl-row-track) !important;
  color: var(--pl-row-text);
  border-color: rgba(0, 0, 0, 0.18);
}

.rds-playlist-table tr[data-pl-color] .rds-pl-track-title,
.rds-playlist-table tr[data-pl-color] .rds-pl-track-artist,
.rds-playlist-table tr[data-pl-color] .rds-pl-dur,
.rds-playlist-table tr[data-pl-color] .rds-pl-info-line,
.rds-playlist-table tr[data-pl-color] .rds-ico,
.rds-playlist-table tr[data-pl-color] .rds-ico.is-news,
.rds-playlist-table tr[data-pl-color] .rds-ico.is-boletim,
.rds-playlist-table tr[data-pl-color] .rds-ico.is-time,
.rds-playlist-table tr[data-pl-color] .rds-ico.is-weather,
.rds-playlist-table tr[data-pl-color] .rds-ico.is-stop,
.rds-playlist-table tr[data-pl-color] .rds-ico.is-spot,
.rds-playlist-table tr[data-pl-color] .rds-pl-sonora {
  color: var(--pl-row-text);
}

.rds-playlist-table tr.is-playing td {
  background: #ffffff !important;
  color: #111;
}

.rds-playlist-table tr.is-playing td:first-child {
  box-shadow: inset 4px 0 0 #111;
}

.rds-playlist-table tr.is-playing .rds-pl-track-title,
.rds-playlist-table tr.is-playing .rds-pl-track-artist,
.rds-playlist-table tr.is-playing .rds-pl-dur,
.rds-playlist-table tr.is-playing .rds-pl-info-line {
  color: #111;
}

.rds-playlist-table tr.is-playing .rds-ico,
.rds-playlist-table tr.is-playing .rds-ico.is-news,
.rds-playlist-table tr.is-playing .rds-ico.is-boletim,
.rds-playlist-table tr.is-playing .rds-ico.is-time,
.rds-playlist-table tr.is-playing .rds-ico.is-weather,
.rds-playlist-table tr.is-playing .rds-ico.is-stop,
.rds-playlist-table tr.is-playing .rds-ico.is-spot,
.rds-playlist-table tr.is-playing .rds-pl-sonora {
  color: #111;
}

.rds-playlist-table tr.is-playing .rds-pl-point-label {
  color: #111;
}

.rds-playlist-table tr.is-cued:not(.is-playing) td:first-child {
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--pl-row-text) 55%, transparent);
}

.rds-playlist-table tr.is-selected:not(.is-playing) td:first-child {
  box-shadow: inset 4px 0 0 #ffd43b;
}

.rds-playlist-table tr.is-cued.is-selected:not(.is-playing) td:first-child {
  box-shadow: inset 4px 0 0 #ffd43b;
}

.rds-playlist-table tr.is-playing.is-selected td:first-child {
  box-shadow: inset 4px 0 0 #111;
}

.rds-pl-point {
  text-align: center;
  vertical-align: middle !important;
  padding: 0.55rem 0.75rem !important;
  border-left: 1px solid rgba(0, 0, 0, 0.18) !important;
  border-right: 1px solid rgba(0, 0, 0, 0.18) !important;
}

.rds-pl-point-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.4rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pl-row-text, #fff);
  line-height: 1.2;
}

.rds-pl-ico {
  width: 3rem;
  text-align: center;
}

.rds-pl-time {
  width: 5.5rem;
  white-space: nowrap;
}

.rds-pl-info {
  min-width: 0;
}

.rds-pl-fileinfo {
  width: 11rem;
  max-width: 14rem;
  padding-left: 0.35rem !important;
  vertical-align: middle;
}

.rds-pl-info-line {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rds-pl-track-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rds-pl-track-artist {
  margin-top: 0.1rem;
  min-height: 1.35em;
  font-family: var(--font-ui);
  font-size: 1.12rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #d5dde8;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rds-ico {
  font-family: var(--font-icons);
  font-style: normal;
  font-weight: normal;
  font-size: 1.85rem;
  line-height: 1;
  color: #3ddc84;
  speak: never;
  -webkit-font-smoothing: antialiased;
}

.rds-ico.is-news { color: #74c0fc; }
.rds-ico.is-boletim { color: #c4b5fd; }
.rds-ico.is-time { color: #ffe066; }
.rds-ico.is-weather { color: #99e9f2; }
.rds-ico.is-stop { color: #ffa8a8; }
.rds-ico.is-spot { color: #8ce99a; }
.rds-ico.is-sonora { color: #63e6be; }

.rds-pl-sonora {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #63e6be;
  font-size: 1.35rem;
  line-height: 1;
}

.rds-pl-dur {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 500;
  color: #e8eef6;
  letter-spacing: 0.02em;
}

.rds-pl-empty {
  padding: 1.4rem 1rem !important;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  border: 1px solid #c5cad3;
  background: var(--bg-row);
}

.rds-playlist-table tr.is-empty-row {
  background: transparent;
  box-shadow: none;
}

.rds-playlist-table tr.is-empty-row td {
  border: 1px solid #c5cad3;
}

.rds-pl-track-title .tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.tag-news { background: rgba(30, 111, 255, 0.25); color: #74c0fc; }
.tag-boletim { background: rgba(124, 58, 237, 0.28); color: #ddd6fe; }
.tag-time { background: rgba(255, 212, 59, 0.2); color: #ffe066; }
.tag-weather { background: rgba(61, 184, 232, 0.2); color: #99e9f2; }
.tag-spot { background: rgba(31, 173, 90, 0.2); color: #8ce99a; }
.tag-sonora { background: rgba(12, 166, 120, 0.22); color: #63e6be; }
.tag-stop { background: rgba(224, 49, 49, 0.22); color: #ffa8a8; }

.rds-pads-news {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  min-height: 2.6rem;
  max-height: 3.4rem;
  padding: 0.28rem 0.4rem;
  background: #000;
  border-bottom: 2px solid #fff;
}

.rds-pads-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: none;
  border-radius: 0.2rem;
  background: #fff;
  color: #111;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: none;
}

.rds-pads-nav-btn:active {
  transform: scale(0.96);
}

.rds-pads-news-display {
  min-width: 0;
  text-align: center;
  padding: 0.1rem 0.35rem;
}

.rds-pads-news-text {
  font-family: var(--font-ui);
  font-size: clamp(0.92rem, 1.2vw, 1.12rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  cursor: help;
}
.rds-pads-news-text.is-carousel-tick {
  animation: rds-news-carousel-in 0.35s ease;
}
@keyframes rds-news-carousel-in {
  from { opacity: 0.25; transform: translateY(0.2rem); }
  to { opacity: 1; transform: translateY(0); }
}

.rds-news-tooltip {
  position: fixed;
  z-index: 12000;
  max-width: min(28rem, calc(100vw - 1.5rem));
  padding: 0.65rem 0.8rem;
  border-radius: 0.45rem;
  background: #12151a;
  color: #f2f5f8;
  border: 1px solid #3a4452;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  pointer-events: none;
  white-space: normal;
  word-break: break-word;
}
.rds-news-tooltip[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 7×7 = 49 pads — largura fixa da coluna; altura preenche o contêiner */
.rds-pads-grid {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(7, minmax(0, 1fr));
  gap: var(--pad-gap);
  padding: var(--pad-inset);
  width: 100%;
  height: auto;
  max-height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0;
}

.rds-pad {
  --pad-radius: 0.28rem;
  --pad-bevel: inset 1px 0 0 rgba(255, 255, 255, 0.92),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  border-radius: var(--pad-radius);
  background: var(--bg-pad);
  color: #1a1f27;
  border: 1px solid rgba(0, 0, 0, 0.55);
  /* 3D simples: só filete claro no topo e à esquerda (sem véu sobre a cor) */
  box-shadow: var(--pad-bevel);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0.28rem 0.16rem 0.22rem;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  cursor: pointer;
}

.rds-pad:not(.is-empty).is-move-zone {
  cursor: grab;
}

.rds-pad > * {
  position: relative;
  z-index: 1;
}

.rds-pad:active,
.rds-pad.is-firing {
  filter: brightness(0.92);
  border-color: rgba(0, 0, 0, 0.7);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.55);
  transform: translateY(1px);
}

.rds-pad-label {
  font-family: Verdana, Tahoma, Geneva, sans-serif;
  font-size: clamp(0.46rem, 0.55vw, 0.64rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.01em;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  text-align: center;
  text-transform: uppercase;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 3.4em;
  padding: 0;
  margin: 0;
  align-self: center;
  width: 100%;
}

.rds-pad-slot {
  display: none;
}

.rds-pad.is-empty {
  background: #e7ebf0;
  color: #8b95a3;
}

.rds-pad.is-empty .rds-pad-label {
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  max-height: none;
  font-size: 1rem;
  opacity: 0.7;
}

.rds-pad-time {
  display: none;
  margin-top: auto;
  align-self: center;
  font-family: Verdana, Tahoma, Geneva, sans-serif;
  font-size: clamp(0.5rem, 0.62vw, 0.68rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: none;
  color: inherit;
  padding: 0.06rem 0 0;
  min-height: 0.85em;
}

.rds-pad:not(.is-empty) .rds-pad-time {
  display: block;
}

.rds-pad.is-playing {
  animation: rds-pad-blink 0.45s ease-in-out infinite;
  z-index: 1;
}

.rds-pad.is-playing.is-firing {
  animation: none;
}

@keyframes rds-pad-blink {
  0%, 100% {
    background-color: var(--pad-bg, #f4f6f8);
    color: var(--pad-fg, #111);
    filter: none;
    box-shadow: var(--pad-bevel);
  }
  50% {
    background-color: #ffffff;
    color: #111;
    filter: none;
    box-shadow:
      var(--pad-bevel),
      0 0 0 1px rgba(0, 0, 0, 0.35);
  }
}

/* ── Transport — mesmas colunas que .rds-main (playlist | pads) ── */
.rds-transport {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: var(--gap);
  align-items: stretch;
  min-height: 0;
  max-height: var(--transport-h);
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.rds-transport-playlist {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr)) max-content max-content;
  align-items: stretch;
  gap: 0.22rem;
  min-width: 0;
  margin: 0.15rem 0;
  padding: 0.3rem;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.rds-transport-left {
  display: contents;
}

.rds-transport-right {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.18rem;
  align-items: stretch;
  width: var(--pads-grid-w);
  max-width: 100%;
  min-width: 0;
  justify-self: end;
  margin: 0.15rem 0;
  padding: 0.24rem;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.rds-transport-right .rds-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  width: 100%;
  min-width: 0;
  min-height: 2.85rem;
  height: 100%;
  margin: 0;
  padding: 0.28rem 0.12rem;
  border-radius: 0.3rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.05;
  white-space: nowrap;
  box-sizing: border-box;
}

.rds-transport-right .rds-btn i {
  flex: 0 0 auto;
  width: auto;
  font-size: 0.95rem;
  line-height: 1;
  text-align: center;
}

.rds-transport-right .rds-btn span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rds-transport-right .rds-btn[data-transport="time"].is-firing,
.rds-transport-right .rds-btn[data-transport="news"].is-firing,
.rds-transport-right .rds-btn[data-transport="weather"].is-firing,
.rds-transport-right .rds-btn[data-transport="passagem"].is-firing {
  animation: rds-play-btn-blink 0.85s steps(1, end) infinite;
}

.rds-transport-playlist .rds-btn {
  min-width: 0;
  min-height: 3.1rem;
  height: 100%;
  padding: 0.22rem 0.2rem;
  border-radius: 0;
  border: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow: none;
  font-size: clamp(0.62rem, 0.78vw, 0.88rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  gap: 0.22rem;
}

.rds-transport-playlist .rds-btn i {
  font-size: 0.9em;
  flex: 0 0 auto;
}

.rds-transport-playlist .rds-btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rds-toolbar .rds-btn[data-pl="loop-item"].is-loop-on {
  background: var(--accent-blue);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.18);
  animation: rds-play-btn-blink 0.85s steps(1, end) infinite;
}

.rds-transport-playlist .rds-btn[data-transport="play"].is-playing {
  background: var(--accent-blue);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.18);
  animation: rds-play-btn-blink 0.85s steps(1, end) infinite;
}

.rds-transport-playlist .rds-btn[data-transport="play"].is-playing i {
  width: 0.9em;
  text-align: center;
}

@keyframes rds-play-btn-blink {
  0%,
  49% {
    background: var(--accent-blue);
    color: #fff;
    filter: none;
    opacity: 1;
  }
  50%,
  100% {
    background: #ffd43b;
    color: #111;
    filter: none;
    opacity: 1;
  }
}

.rds-transport-playlist .rds-btn-blue,
.rds-transport-playlist .rds-btn-red,
.rds-transport-playlist .rds-btn-stop,
.rds-transport-playlist .rds-btn-stream,
.rds-transport-playlist .rds-btn-robot,
.rds-transport-playlist .rds-btn-monitor,
.rds-transport-playlist .rds-btn-listen {
  border-color: rgba(0, 0, 0, 0.18);
}

.rds-transport-playlist .rds-btn:not(.rds-btn-blue):not(.rds-btn-red):not(.rds-btn-stop):not(.rds-btn-stream):not(.rds-btn-robot):not(.rds-btn-monitor):not(.rds-btn-listen) {
  background: #fff;
  color: #111;
  border-color: #4a5562;
}

.rds-transport-playlist .rds-btn-stream.is-on-air,
.rds-transport-playlist .rds-btn-robot.is-on-air {
  border-color: rgba(0, 0, 0, 0.18);
}

.rds-transport-playlist .rds-btn-monitor.is-muted {
  border-color: rgba(0, 0, 0, 0.28);
}

.rds-transport .rds-btn {
  min-height: var(--touch-transport);
}

.rds-loop-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 7.25rem;
  width: max-content;
  max-width: 11rem;
  min-height: 3.25rem;
  padding: 0.2rem 0.7rem;
  background: #000;
  border: none;
  border-radius: 0;
  text-align: center;
}

.rds-loop-mode-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
}

.rds-loop-mode-value {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffe066;
  line-height: 1.1;
  text-transform: uppercase;
}

/* ── Desktop FHD+ : garante tela cheia sem scroll ── */
@media (min-width: 1280px) and (min-height: 700px) {
  html, body {
    overflow: hidden;
  }

  .rds-app {
    overflow: hidden;
  }

  .rds-pads-grid {
    overflow: hidden;
  }
}

/* ── Telas mais baixas que 1080: aperta um pouco mais ── */
@media (max-height: 900px) {
  :root {
    --display-h: 6.4rem;
    --transport-h: 4.2rem;
    --touch-min: 2.6rem;
    --touch-transport: 3rem;
    --gap: 0.3rem;
    --pad: 0.3rem;
  }

  .rds-playlist-table td {
    padding: 0.35rem 0.45rem;
  }
}

/* ── Responsive estreito (não é o alvo de estúdio) ── */
@media (max-width: 1100px) {
  html, body {
    overflow: auto;
    height: auto;
  }

  .rds-app {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: visible;
  }

  .rds-transport {
    max-height: none;
  }

  .rds-main {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(16rem, 42vh) auto;
  }

  .rds-transport {
    grid-template-columns: 1fr;
  }

  .rds-transport-right {
    width: 100%;
  }

  .rds-pads-col {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }

  .rds-pads-grid {
    width: min(100%, var(--pads-grid-w));
    margin-inline: auto;
  }

  .rds-toolbar {
    flex-wrap: wrap;
  }

  .rds-toolbar .rds-btn-icon {
    flex: 1 1 calc(16.66% - 0.28rem);
    min-width: max-content;
  }
}

@media (max-width: 820px) {
  .rds-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .rds-topbar-project {
    flex: 1 1 auto;
    max-width: none;
  }

  .rds-topbar-clock {
    align-items: flex-start;
    text-align: left;
    padding: 0.25rem 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .rds-topbar-weather {
    max-width: none;
    margin-left: 0;
    grid-template-columns: 1fr;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.35rem 0.35rem;
  }

  .rds-topbar-actions {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .rds-topbar-actions .rds-btn {
    flex: 1 1 auto;
  }

  .rds-display-meters {
    grid-template-columns: 1fr 1fr;
  }

  .rds-display-queue {
    grid-column: 1 / -1;
  }

  .rds-transport {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .rds-transport-playlist {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rds-loop-mode {
    grid-column: 1 / 3;
  }

  .rds-footer-user {
    grid-column: 3;
    align-items: flex-end;
    max-width: none;
  }

  .rds-transport-right {
    width: 100%;
    justify-self: stretch;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.16rem;
    padding: 0.22rem;
  }

  .rds-transport-right .rds-btn {
    min-height: 2.55rem;
    padding: 0.2rem 0.1rem;
    font-size: 0.6rem;
    gap: 0.1rem;
  }

  .rds-transport-right .rds-btn i {
    font-size: 0.88rem;
  }

  .rds-transport-right .rds-btn i {
    flex-basis: 0.85rem;
    width: 0.85rem;
    font-size: 0.82rem;
  }

  .rds-pads-col {
    --pads-chrome-h: 5.9rem;
    --pad-size: clamp(2.9rem, 8.5vw, 4.2rem);
  }
}

@media (max-width: 520px) {
  .rds-topbar-actions .rds-btn {
    font-size: 0.78rem;
    padding: 0.22rem 0.35rem;
    gap: 0.2rem;
  }

  .rds-topbar-actions .rds-btn i {
    font-size: 0.82rem;
  }

  .rds-toolbar {
    flex-wrap: wrap;
  }

  .rds-toolbar .rds-btn-icon {
    flex: 1 1 calc(25% - 0.22rem);
    font-size: 0.78rem;
    height: 2.25rem;
    min-height: 2.25rem;
    gap: 0.24rem;
    padding: 0.2rem 0.35rem;
  }
}

/* ── Context menu (pads) ── */
.rds-ctx {
  position: fixed;
  z-index: 3000;
  min-width: 13.5rem;
  padding: 0.35rem 0;
  margin: 0;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
}
.rds-ctx.is-open {
  display: flex;
}
.rds-ctx-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.42rem 0.95rem;
  font-family: var(--font-ui, system-ui, -apple-system, sans-serif);
  font-size: 0.92rem;
  font-weight: 500;
  color: #1a1f27;
  line-height: 1.25;
  border-radius: 0;
  cursor: pointer;
}
.rds-ctx-item:hover:not(:disabled),
.rds-ctx-item:focus-visible:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
  outline: none;
}
.rds-ctx-item:disabled {
  color: #a8b0bc;
  cursor: default;
}
.rds-ctx-sep {
  height: 1px;
  margin: 0.3rem 0.7rem;
  background: rgba(0, 0, 0, 0.12);
}

.rds-ctx-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  cursor: pointer;
}

.rds-ctx-swatch {
  width: 2.15rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 0.28rem;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.rds-ctx-swatch::-webkit-color-swatch-wrapper {
  padding: 1px;
}

.rds-ctx-swatch::-webkit-color-swatch {
  border: none;
  border-radius: 0.2rem;
}

.rds-ctx-subwrap {
  position: relative;
}

.rds-ctx-has-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.rds-ctx-has-sub::after {
  content: "›";
  font-size: 1.15rem;
  line-height: 1;
  color: #5c6570;
}

.rds-ctx-submenu {
  position: absolute;
  left: calc(100% - 4px);
  top: -0.35rem;
  z-index: 2;
  min-width: 8.8rem;
  padding: 0.35rem 0;
  margin: 0;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
}

.rds-ctx-subwrap:hover > .rds-ctx-submenu,
.rds-ctx-subwrap:focus-within > .rds-ctx-submenu,
.rds-ctx-subwrap.is-open > .rds-ctx-submenu {
  display: flex;
}

.rds-ctx-submenu.is-flip {
  left: auto;
  right: calc(100% - 4px);
}

/* ── Modal projeto ── */
.rds-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.rds-modal.is-open {
  display: flex;
}
.rds-modal-pad {
  z-index: 2100;
}
.rds-modal-playlist {
  z-index: 2150;
}
.rds-modal-playlist.is-edit .rds-pl-filtro-row,
.rds-modal-playlist.is-edit .rds-pl-insert-row {
  display: none !important;
}
.rds-modal-playlist.is-edit .rds-pl-source .rds-choice-row {
  display: none !important;
}
.rds-modal-playlist.is-edit-marker .rds-pl-source-row,
.rds-modal-playlist.is-edit-marker .rds-pl-artista-row,
.rds-modal-playlist.is-edit-marker .rds-pl-sonora-bed-row,
.rds-modal-playlist.is-edit-marker .rds-pl-filtro-row {
  display: none !important;
}
.rds-modal-playlist.is-edit-marker .rds-pl-tipo-row {
  display: flex;
}
.rds-modal-place {
  z-index: 2250;
}
.rds-modal-dialog-place {
  width: min(22rem, 100%);
}
.rds-modal-dialog-place .rds-modal-title {
  word-spacing: 0.18em;
}
.rds-place-lead {
  margin: 0 0 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  word-spacing: normal;
}
.rds-modal-passagem {
  z-index: 2300;
}
.rds-modal-dialog-passagem {
  width: min(26rem, 100%);
}
.rds-passagem-lead {
  margin: 0 0 1.1rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.45;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  white-space: pre-line;
}
.rds-modal-find {
  z-index: 2250;
}
.rds-modal-dialog-find {
  width: min(26rem, 100%);
}
.rds-find-lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}
.rds-find-hint {
  margin: 0;
  min-height: 1.2em;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 600;
}
.rds-find-hint.is-miss {
  color: #ff8e8e;
}
.rds-find-hint.is-hit {
  color: #8fd49a;
}
.rds-modal-autodj {
  z-index: 2250;
}
.rds-modal-dialog-loop {
  width: min(32rem, 100%);
}
.rds-modal-dialog-loop .rds-modal-title {
  word-spacing: 0.18em;
}
.rds-modal-dialog-autodj {
  width: min(28rem, 100%);
}
.rds-loop-lead {
  margin: 0 0 0.85rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  word-spacing: normal;
}
.rds-form-loop .rds-autodj-choice span {
  font-family: var(--font-ui);
  white-space: normal;
  line-height: 1.35;
  letter-spacing: 0;
  word-spacing: normal;
  text-transform: none;
}
.rds-form-loop .rds-autodj-choice strong {
  font-weight: 700;
}
/* Painel Ouvir: estilos definitivos após .rds-modal-dialog (mais abaixo) */

/* (estilos .rds-rack ficam após .rds-modal-dialog) */
.rds-settings-logo-preview {
  margin: 0.35rem 0 0.75rem;
}
.rds-settings-logo-preview img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 16rem);
  max-height: 5.5rem;
  object-fit: contain;
  object-position: left center;
  border-radius: 0;
  border: 1px solid var(--line-strong);
  background: #0b0d10;
  padding: 0.35rem;
}
.rds-autodj-lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}
.rds-autodj-blocksize {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b0d10;
}
.rds-autodj-blocksize span {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.88rem;
  font-weight: 600;
}
.rds-autodj-blocksize input[type="number"] {
  width: 4.4rem;
  min-height: 2rem;
  padding: 0.2rem 0.35rem;
  text-align: center;
  font-weight: 700;
  background: #12151a;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.rds-autodj-options {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}
.rds-form .rds-autodj-choice,
.rds-autodj-choice {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  min-height: 0;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b0d10;
  white-space: normal;
}
.rds-autodj-choice span {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.88rem;
  font-weight: 600;
}
.rds-place-options {
  display: flex;
  justify-content: flex-start;
  gap: 0.85rem 1.15rem;
  flex-wrap: wrap;
  margin: 0 0 0.85rem;
}
.rds-place-choice {
  min-width: 0;
  justify-content: flex-start;
}
.rds-modal-upload {
  z-index: 2300;
}
.rds-modal-project {
  z-index: 2200;
}
.rds-modal-open {
  z-index: 2200;
}
.rds-modal-dialog-open {
  width: min(32rem, 100%);
  max-height: min(36rem, 88vh);
  display: flex;
  flex-direction: column;
}
.rds-open-toolbar {
  margin: 0 0 0.65rem;
}
.rds-open-filter {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid #3a424e;
  border-radius: var(--radius);
  background: #0a0c10;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.95rem;
}
.rds-open-filter:focus {
  outline: none;
  border-color: var(--accent-blue);
}
.rds-open-list {
  flex: 1 1 auto;
  min-height: 10rem;
  max-height: 22rem;
  overflow: auto;
  border: 1px solid #3a424e;
  border-radius: var(--radius);
  background: #0a0c10;
  margin: 0 0 1rem;
}
.rds-open-empty {
  margin: 1.25rem 1rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
}
.rds-open-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.75rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-bottom: 1px solid #2a3340;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-ui);
}
.rds-open-item:last-child {
  border-bottom: 0;
}
.rds-open-item:hover,
.rds-open-item:focus-visible {
  background: rgba(30, 111, 255, 0.16);
  outline: none;
}
.rds-open-item.is-selected {
  background: rgba(30, 111, 255, 0.28);
}
.rds-open-item.is-current {
  box-shadow: inset 3px 0 0 var(--accent-cyan);
}
.rds-open-item-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.rds-open-item-artist {
  grid-column: 1;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.rds-open-item-meta {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-mute);
  line-height: 1.35;
  white-space: nowrap;
}
.rds-modal-dialog-upload {
  width: min(26rem, 100%);
}
.rds-upload-file {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rds-upload-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}
.rds-upload-bar {
  height: 0.85rem;
  background: #0a0c10;
  border: 1px solid #3a424e;
  border-radius: 0.2rem;
  overflow: hidden;
}
.rds-upload-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4169e1, #5b8cff);
  transition: width 0.15s linear;
}
.rds-upload-hint {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.rds-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}
.rds-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  background: var(--bg-panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.85rem 1rem 0.95rem;
  box-shadow: var(--shadow);
}

/* Ouvir: painel flutuante stay-on-top (depois de .rds-modal-dialog para não perder position:fixed) */
.rds-modal-listen {
  inset: auto;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: visible;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  pointer-events: none;
  z-index: 3600;
}
.rds-modal-listen.is-open {
  display: block;
}
.rds-modal-listen .rds-modal-dialog-listen {
  pointer-events: auto;
  position: fixed;
  z-index: 3601;
  width: min(36rem, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(165deg, #1c222c 0%, #12161d 55%, #0d1016 100%);
  border: 1px solid #3a4452;
  border-radius: 0.65rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 40px rgba(0, 0, 0, 0.55);
  left: auto;
  top: auto;
  right: 0.75rem;
  bottom: 0.75rem;
  margin: 0;
  user-select: none;
  box-sizing: border-box;
}
.rds-modal-listen .rds-modal-dialog-listen.is-dragging {
  opacity: 0.97;
  cursor: grabbing;
}
.rds-listen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.5rem 0.65rem;
  background: #252b36;
  border-bottom: 1px solid #3a4452;
  cursor: grab;
  touch-action: none;
  flex: 0 0 auto;
}
.rds-listen-head:active {
  cursor: grabbing;
}
.rds-listen-head .rds-modal-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0.03em;
}
.rds-listen-grip {
  color: #6b7584;
  font-size: 0.9rem;
}
.rds-listen-close {
  min-height: 2.15rem;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  font-size: 0.82rem;
}
.rds-modal-listen .rds-rack {
  margin: 0.55rem 0.55rem 0.35rem;
}
.rds-listen-hint {
  margin: 0;
  padding: 0 0.65rem 0.55rem;
  font-size: 0.7rem;
  line-height: 1.35;
  color: #7d8796;
  text-align: center;
}

/* News Reader: painel flutuante stay-on-top (mesmo padrão do Ouvir) */
.rds-modal-news-reader {
  inset: auto;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: visible;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  pointer-events: none;
  z-index: 3610;
}
.rds-modal-news-reader.is-open {
  display: block;
}
.rds-modal-news-reader .rds-modal-dialog-news-reader {
  pointer-events: auto;
  position: fixed;
  z-index: 3611;
  width: min(38rem, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
  max-height: min(52rem, calc(100vh - 1rem));
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(165deg, #1c222c 0%, #12161d 55%, #0d1016 100%);
  border: 1px solid #3a4452;
  border-radius: 0.65rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 40px rgba(0, 0, 0, 0.55);
  left: auto;
  top: auto;
  right: 0.75rem;
  bottom: 5.5rem;
  margin: 0;
  user-select: none;
  box-sizing: border-box;
}
.rds-modal-news-reader .rds-modal-dialog-news-reader.is-dragging {
  opacity: 0.97;
  cursor: grabbing;
}
.rds-nr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  padding: 0.5rem 0.65rem;
  background: #252b36;
  border-bottom: 1px solid #3a4452;
  cursor: grab;
  touch-action: none;
  flex: 0 0 auto;
}
.rds-nr-head:active {
  cursor: grabbing;
}
.rds-nr-head .rds-modal-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0.03em;
}
.rds-nr-grip {
  color: #6b7584;
  font-size: 0.9rem;
}
.rds-nr-head-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}
.rds-nr-close,
.rds-nr-refresh {
  min-height: 2.15rem;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  font-size: 0.82rem;
}
.rds-nr-refresh {
  min-width: 2.15rem;
  padding-inline: 0.5rem;
}
.rds-nr-lead {
  margin: 0;
  padding: 0.55rem 0.65rem 0.45rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #9aa3b2;
  flex: 0 0 auto;
}
.rds-nr-list {
  flex: 1 1 auto;
  min-height: 9rem;
  max-height: 16rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  margin: 0;
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.rds-nr-empty {
  margin: 1.2rem 0.5rem;
  text-align: center;
  font-size: 1.05rem;
  color: #8b95a5;
}
.rds-nr-item {
  display: block;
  width: 100%;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-align: left;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  box-sizing: border-box;
}
.rds-nr-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.rds-nr-item.is-selected {
  border-color: rgba(80, 160, 255, 0.5);
  background: rgba(50, 110, 200, 0.16);
}
.rds-nr-item.is-ready {
  box-shadow: inset 3px 0 0 rgba(60, 180, 100, 0.75);
}
.rds-nr-item.is-playing {
  border-color: rgba(124, 255, 46, 0.45);
}
.rds-nr-item-title {
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.35;
  color: #e8ecf2;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: calc(1.35em * 3);
  pointer-events: none;
}
.rds-nr-item-meta {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #8b95a5;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.rds-nr-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.5rem 0.55rem 0;
  flex: 0 0 auto;
}
.rds-nr-actions .rds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.45rem 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
}
.rds-nr-actions .rds-btn.is-playing {
  background: var(--accent-blue, #3b82f6);
  color: #fff;
}
#rdsNewsReaderListen.is-listening,
#rdsBoletimListen.is-listening {
  background: #0e7490;
  color: #fff;
}
#rdsNewsReaderAddBoletim {
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
#rdsNewsReaderAddBoletim.is-just-added {
  background: #16a34a !important;
  color: #fff;
  transform: scale(1.04);
  animation: rds-boletim-added-pulse 1.1s ease;
}
@keyframes rds-boletim-added-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  35% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.rds-nr-prefs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  margin: 0.5rem 0.55rem 0;
  padding: 0.4rem 0.55rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
}
.rds-nr-pref {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.2;
  color: #c5cdd8;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.rds-nr-pref input {
  margin: 0;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  accent-color: var(--accent-green, #2f9e44);
  cursor: pointer;
}
.rds-nr-countdown-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.55rem 0.55rem 0;
  padding: 0.55rem 0.75rem;
  border-radius: 0.45rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}
.rds-nr-countdown-wrap[hidden] {
  display: none;
}
.rds-nr-countdown-label {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9aa3b2;
}
.rds-nr-countdown {
  font-family: var(--font-display, ui-monospace, monospace);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  color: #7CFF2E;
  font-variant-numeric: tabular-nums;
  min-width: 4.5rem;
  text-align: right;
}
.rds-nr-countdown.is-ending {
  color: #ff6b6b;
  animation: rds-ending-blink 0.7s steps(1, end) infinite;
}
.rds-nr-progress-wrap {
  margin-top: 0.45rem;
  flex: 0 0 auto;
}
.rds-nr-progress-label {
  margin-bottom: 0.25rem;
  font-size: 0.88rem;
  color: #9aa3b2;
}
.rds-nr-progress {
  height: 0.38rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.rds-nr-progress-wrap[hidden] {
  display: none;
}
.rds-nr-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3d8f1c, #7CFF2E);
  transition: width 0.2s ease;
}
.rds-nr-progress-wrap.is-error .rds-nr-progress-fill {
  background: linear-gradient(90deg, #8a2020, #e25555);
}
.rds-nr-script-label {
  display: block;
  margin: 0.55rem 0 0.35rem;
  padding: 0 0.1rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #b4bcc8;
  flex: 0 0 auto;
}
.rds-nr-script {
  display: block;
  width: 100%;
  min-height: 10rem;
  max-height: 18rem;
  resize: vertical;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 0.4rem;
  border: 1px solid #3a4452;
  background: #0a0d12;
  color: #e8ecf2;
  font-size: 1.2rem;
  line-height: 1.5;
  font-family: inherit;
  box-sizing: border-box;
  flex: 0 0 auto;
  user-select: text;
}
.rds-nr-script:focus {
  outline: none;
  border-color: rgba(80, 160, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(80, 160, 255, 0.15);
}
.rds-nr-hint {
  margin: 0.45rem 0 0;
  padding: 0 0.65rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #7d8796;
  text-align: center;
  flex: 0 0 auto;
}

.rds-transport-right .rds-btn[data-transport="boletim"] {
  position: relative;
}
.rds-bl-badge {
  position: absolute;
  top: 0.08rem;
  right: 0.18rem;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
}
.rds-bl-badge[hidden] {
  display: none;
}
.rds-bl-badge.is-pop {
  animation: rds-bl-badge-pop 0.55s ease;
}
@keyframes rds-bl-badge-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.rds-modal-boletim {
  z-index: 3620;
}
.rds-modal-boletim .rds-modal-dialog-news-reader {
  z-index: 3621;
  left: 0.75rem;
  right: auto;
}
.rds-bl-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.rds-nr-head-actions .rds-nr-refresh span {
  margin-left: 0.3rem;
  font-weight: 700;
}
.rds-bl-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
  cursor: default;
}
.rds-bl-item-main {
  min-width: 0;
  flex: 1 1 auto;
}
.rds-bl-item-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex: 0 0 auto;
}
.rds-bl-item-tools .rds-btn {
  min-height: 1.85rem;
  min-width: 1.85rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.72rem;
}
.rds-bl-item.is-current {
  border-color: rgba(167, 139, 250, 0.7);
  background: rgba(124, 58, 237, 0.2);
}
.rds-nr-item.is-in-boletim {
  box-shadow: inset 3px 0 0 rgba(167, 139, 250, 0.85);
}
@media (max-width: 420px) {
  .rds-nr-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Player rack — guia visual (metal + LCD verde) */
.rds-rack {
  --rack-lime: #7CFF2E;
  --rack-lime-dim: #3d8f1c;
  --rack-metal: #1a1c1f;
  position: relative;
  border-radius: 0.85rem;
  padding: 0.95rem 1rem 1rem;
  color: #e8ecf1;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.05), transparent 28%),
    linear-gradient(160deg, #2a2d32 0%, #15171a 42%, #0e1012 100%);
  border: 1px solid #3a3f46;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 6px rgba(0, 0, 0, 0.55),
    0 14px 36px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.rds-rack::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.rds-rack-screw {
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9aa0a8, #4a4f57 70%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
  z-index: 2;
}
.rds-rack-screw-tl { top: 0.45rem; left: 0.45rem; }
.rds-rack-screw-tr { top: 0.45rem; right: 0.45rem; }
.rds-rack-screw-bl { bottom: 0.45rem; left: 0.45rem; }
.rds-rack-screw-br { bottom: 0.45rem; right: 0.45rem; }

.rds-rack-brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.15rem 0 1rem;
  text-align: center;
}
.rds-rack-brand-built {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.rds-rack-brand.has-logo .rds-rack-brand-built {
  display: none;
}
.rds-rack-brand-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 14rem);
  max-height: 4.25rem;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.rds-rack-brand-logo[hidden] {
  display: none !important;
}
.rds-rack-brand-ico {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--rack-lime);
  background:
    radial-gradient(circle, rgba(124, 255, 46, 0.18) 0%, transparent 62%),
    #121417;
  box-shadow:
    0 0 0 2px rgba(124, 255, 46, 0.35),
    0 0 0 5px rgba(124, 255, 46, 0.12);
  font-size: 1.05rem;
}
.rds-rack-brand-text { min-width: 0; }
.rds-rack-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.55rem, 4vw, 1.9rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.rds-rack-brand-a { color: #fff; }
.rds-rack-brand-b { color: var(--rack-lime); margin-left: 0.22rem; }
.rds-rack-brand-tag {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cfd5de;
}
.rds-rack-brand-tag span {
  display: block;
  width: 1.6rem;
  height: 1px;
  background: var(--rack-lime);
  opacity: 0.85;
}
.rds-rack-live {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7d8796;
  margin-top: 0.28rem;
}
.rds-rack-live.is-live { color: var(--rack-lime); text-shadow: 0 0 8px rgba(124, 255, 46, 0.45); }
.rds-rack-live.is-offline { color: #f87171; }

.rds-rack-lcd {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  min-height: 8.2rem;
  padding: 0.95rem 1rem 0.85rem;
  border-radius: 0.4rem;
  background: linear-gradient(180deg, #a8ff55 0%, var(--rack-lime) 42%, #5ad018 100%);
  color: #0b1a05;
  box-shadow:
    inset 0 0 0 2px #1a220f,
    inset 0 2px 10px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(124, 255, 46, 0.2);
  margin-bottom: 0.95rem;
  overflow: hidden;
}
.rds-rack-lcd::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  background-image: radial-gradient(rgba(10, 30, 5, 0.55) 1px, transparent 1.2px);
  background-size: 4px 4px;
  background-position: 0 0;
}
.rds-rack-lcd.is-onair-live .rds-rack-lcd-label,
.rds-rack-lcd.is-onair-live .rds-rack-lcd-progress {
  display: none;
}
.rds-rack-lcd.is-onair-live {
  justify-content: center;
  align-items: center;
  text-align: center;
}
.rds-rack-lcd.is-onair-live .rds-rack-lcd-body {
  width: 100%;
}
.rds-rack-lcd.is-onair-live .rds-rack-lcd-title {
  min-height: auto;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  -webkit-line-clamp: 1;
  text-align: center;
}
.rds-rack-lcd-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
  opacity: 0.78;
}
.rds-rack-lcd-title {
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 3.2vw, 1.28rem);
  font-weight: 700;
  line-height: 1.3;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.rds-rack-lcd-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
}
.rds-rack-lcd-bar {
  height: 0.55rem;
  border-radius: 0.18rem;
  background: rgba(10, 30, 5, 0.28);
  overflow: hidden;
}
.rds-rack-lcd-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: rgba(10, 30, 5, 0.72);
  border-radius: inherit;
  transition: width 0.2s linear;
}

.rds-rack-controls {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: stretch;
}
.rds-rack-keys {
  display: flex;
  gap: 0.45rem;
  padding: 0.4rem;
  border-radius: 0.45rem;
  background: #0c0e11;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65);
}
.rds-rack-key {
  width: 3.6rem;
  min-height: 3.9rem;
  border: 0;
  border-radius: 0.35rem;
  background: linear-gradient(180deg, #3a3f46 0%, #1d2126 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 2px 0 #0a0b0d,
    0 4px 10px rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.35rem 0.2rem;
  transition: transform 0.08s ease, filter 0.12s ease;
}
.rds-rack-key i { font-size: 1.05rem; line-height: 1; color: #dfe4ea; }
.rds-rack-key span {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c5ccd6;
}
.rds-rack-key:hover { filter: brightness(1.08); }
.rds-rack-key:active { transform: translateY(1px); }
.rds-rack-key.is-playing i,
.rds-rack-key.is-active i { color: var(--rack-lime); text-shadow: 0 0 10px rgba(124, 255, 46, 0.55); }
.rds-rack-key.is-playing,
.rds-rack-key.is-active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(124, 255, 46, 0.45),
    0 0 14px rgba(124, 255, 46, 0.28);
  animation: rds-rack-onair 1.4s ease-in-out infinite;
}
.rds-rack-key.is-loading { animation: rds-rack-pulse 0.7s ease-in-out infinite; }
.rds-rack-key.is-muted i { color: #f0c000; }
.rds-rack-key:disabled { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.15); }
@keyframes rds-rack-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(120, 180, 255, 0.25); }
  50% { box-shadow: 0 0 16px rgba(120, 180, 255, 0.7); }
}
@keyframes rds-rack-onair {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      0 0 0 1px rgba(124, 255, 46, 0.35),
      0 0 10px rgba(124, 255, 46, 0.2);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      0 0 0 2px rgba(124, 255, 46, 0.65),
      0 0 22px rgba(124, 255, 46, 0.45);
  }
}

.rds-rack-vol {
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  gap: 0.55rem;
  align-items: center;
  padding: 0.4rem 0.5rem 0.25rem;
  border-radius: 0.45rem;
  background: #0c0e11;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65);
}
.rds-rack-vol-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c5ccd6;
  text-align: center;
}
.rds-rack-vol-wrap { min-width: 0; }
.rds-rack-vol-fader {
  width: 100%;
  height: 1.35rem;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.rds-rack-vol-fader::-webkit-slider-runnable-track {
  height: 0.42rem;
  border-radius: 0.2rem;
  background: linear-gradient(180deg, #050607, #1a1e24);
  border: 1px solid #2a3038;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
}
.rds-rack-vol-fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.35rem;
  height: 1.05rem;
  margin-top: -0.35rem;
  border-radius: 0.18rem;
  border: 1px solid #6a7078;
  background:
    linear-gradient(90deg, transparent 28%, #1a1c1f 28%, #1a1c1f 36%, transparent 36%, transparent 46%, #1a1c1f 46%, #1a1c1f 54%, transparent 54%, transparent 64%, #1a1c1f 64%, #1a1c1f 72%, transparent 72%),
    linear-gradient(180deg, #4a5058 0%, #2a2e34 45%, #15181c 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
}
.rds-rack-vol-fader::-moz-range-track {
  height: 0.42rem;
  border-radius: 0.2rem;
  background: #0a0c0f;
  border: 1px solid #2a3038;
}
.rds-rack-vol-fader::-moz-range-thumb {
  width: 1.35rem;
  height: 1.05rem;
  border-radius: 0.18rem;
  border: 1px solid #6a7078;
  background: linear-gradient(180deg, #4a5058 0%, #2a2e34 45%, #15181c 100%);
}
.rds-rack-vol-minmax {
  display: flex;
  justify-content: space-between;
  margin-top: 0.15rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7d8796;
}
.rds-rack-vol-minmax span:nth-child(2) {
  font-family: var(--font-mono);
  color: #c5ccd6;
  text-transform: none;
}

@media (max-width: 560px) {
  .rds-rack-controls { grid-template-columns: 1fr; }
  .rds-rack-keys { justify-content: center; }
  .rds-rack-lcd { min-height: 7.4rem; }
}

.rds-modal-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rds-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.rds-form label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.rds-form label[hidden],
.rds-form [hidden] {
  display: none !important;
}
/* Campos de texto/número — não inflar radio/checkbox (back-office) */
.rds-form input:not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="hidden"]) {
  min-height: 2.15rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b0d10;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.rds-form input:not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="hidden"]):focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 1px;
}

/* Controles compactos de produtor / back-office
   (especificidade > .rds-form label para não empilhar radio/checkbox) */
.rds-form .rds-choice,
.rds-form .rds-choice-check,
.rds-form .rds-radio,
.rds-form .rds-autodj-choice,
.rds-choice,
.rds-choice-check,
.rds-radio {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.rds-form .rds-choice input,
.rds-form .rds-choice-check input,
.rds-form .rds-radio input,
.rds-form .rds-autodj-choice input,
.rds-choice input,
.rds-choice-check input,
.rds-radio input {
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  min-height: 0 !important;
  margin: 0;
  padding: 0 !important;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  flex-shrink: 0;
  accent-color: var(--accent-blue);
  box-shadow: none;
}
.rds-form .rds-choice span,
.rds-form .rds-choice-check span,
.rds-form .rds-radio span,
.rds-choice span,
.rds-choice-check span,
.rds-radio span {
  line-height: 1.25;
  white-space: normal;
}
.rds-choice-row,
.rds-radio-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.rds-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

/* ── Modal editar pad ── */
.rds-modal-dialog-pad {
  width: min(32rem, 100%);
}

.rds-modal-dialog-playlist {
  width: min(42rem, 100%);
}

.rds-form-pad {
  gap: 0.5rem;
}

.rds-form-pad .rds-choice-check {
  margin: 0.15rem 0 0.25rem;
  align-items: flex-start;
  white-space: normal;
}

.rds-form-pad .rds-choice-check span {
  font-size: 0.86rem;
  line-height: 1.3;
}

.rds-form-pad .rds-form-row {
  gap: 0.5rem;
}

.rds-form-pad .rds-form-row input[type="text"] {
  width: 100%;
  min-height: 2.15rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b0d10;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.rds-form-pad .rds-radio-row {
  gap: 0.85rem;
}

.rds-form-pad .rds-btn-browse {
  min-width: 2.15rem;
  min-height: 2.15rem;
}

.rds-form-playlist {
  gap: 0.55rem;
}

.rds-form-playlist select {
  min-height: 2.2rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b0d10;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  width: 100%;
}

.rds-form-playlist select:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 1px;
}

.rds-pl-source {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.rds-pl-type-lang {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 0.55rem;
  align-items: end;
}

.rds-pl-inline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

.rds-pl-inline-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.rds-pl-insert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.15rem;
  min-width: 0;
}

.rds-pl-insert .rds-choice-row {
  margin-right: 0.25rem;
}

.rds-form-playlist .rds-choice-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  margin: 0;
}

.rds-form-playlist .rds-choice {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.rds-form-playlist .rds-choice input {
  width: 1.05rem;
  height: 1.05rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--accent-blue);
}

.rds-form-playlist .rds-choice span {
  line-height: 1.1;
}

.rds-form-playlist input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rds-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
}

.rds-check input {
  width: 1.05rem;
  height: 1.05rem;
  min-height: 0;
  padding: 0;
  accent-color: var(--accent-blue);
}

.rds-form-playlist label.rds-pl-num {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.rds-form-playlist label.rds-pl-num input[type="number"] {
  width: 4.2rem;
  min-height: 2.35rem;
  padding: 0.3rem 0.4rem;
  text-align: center;
}

.rds-form-playlist label.rds-pl-inline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rds-form-playlist .rds-form-file {
  width: 100%;
}

.rds-form-playlist .rds-radio-row {
  flex-wrap: wrap;
}

.rds-form-row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
}
.rds-form-row > label,
.rds-form-row-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.rds-form-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
}
.rds-form-file-select select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.35rem 0.55rem;
  background: var(--bg-elev, #12151a);
  color: var(--text, #e8eaed);
  border: 1px solid var(--line-strong, #3a424e);
  border-radius: 0.3rem;
}
.rds-form-file-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
}
#cfgPollyVoicePreview {
  white-space: nowrap;
}
.rds-settings-row .rds-settings-hint {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
}
.rds-btn-browse {
  min-width: 2.15rem;
  min-height: 2.15rem;
  padding: 0.3rem;
}
.rds-color-swatch {
  width: 3.25rem;
  height: 1.85rem;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 0.3rem;
  background: transparent;
  cursor: pointer;
}
.rds-color-swatch::-webkit-color-swatch-wrapper {
  padding: 2px;
}
.rds-color-swatch::-webkit-color-swatch {
  border: none;
  border-radius: 0.2rem;
}
.rds-pad-label-line {
  display: inline;
  font-weight: 400;
}
.rds-pad.has-custom-color .rds-pad-slot {
  display: none;
}

@media (max-width: 520px) {
  .rds-form-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

/* ── Modal configurações ── */
.rds-modal-settings {
  z-index: 2300;
}

.rds-modal-dialog-settings {
  width: min(68rem, 100%);
  max-height: min(92dvh, 52rem);
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1rem 1rem;
  overflow: hidden;
}

.rds-modal-dialog-prog-settings {
  width: min(44rem, 100%);
}
.rds-form-prog-settings {
  overflow: hidden;
}
.rds-modal-dialog-prog-settings .rds-settings-audio-box {
  max-width: none;
}

.rds-settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.rds-settings-tab {
  min-height: 2.2rem;
  padding: 0.35rem 1rem;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 0.4rem 0.4rem 0 0;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rds-settings-tab.is-active {
  background: var(--bg-elev);
  color: #fff;
  border-color: var(--line);
  box-shadow: inset 0 -2px 0 var(--accent-blue);
}

.rds-form-settings {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow: hidden;
}

.rds-settings-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: none;
  flex-direction: column;
  gap: 0.65rem;
  padding-right: 0.15rem;
}

.rds-settings-panel.is-active {
  display: flex;
}

.rds-settings-panel[data-settings-panel="whatsapp"] {
  max-width: 960px;
}

.rds-settings-box {
  margin: 0;
  padding: 0.75rem 0.85rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
  min-width: 0;
}

.rds-settings-box legend {
  padding: 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rds-settings-hint {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: var(--text-mute);
}

.rds-settings-hint code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #c5d0de;
}

.rds-wa-status-row {
  align-items: center;
}

.rds-wa-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.12rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #2a3038;
  color: #c5d0de;
}

.rds-wa-pill.is-open {
  background: #1b4d2e;
  color: #9eebc0;
}

.rds-wa-pill.is-close,
.rds-wa-pill.is-closed {
  background: #4a2222;
  color: #f0b4b4;
}

.rds-wa-pill.is-connecting {
  background: #3d3514;
  color: #f0e09a;
}

.rds-settings-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.15rem 0 0.35rem;
}

.rds-wa-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  align-items: flex-start;
}

.rds-wa-title {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.rds-wa-person {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin: 0.45rem 0 0.35rem;
}

.rds-wa-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a3038;
}

.rds-wa-banner {
  margin: 0;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  background: #2a3038;
  color: #c5d0de;
  font-size: 0.82rem;
  font-weight: 600;
}

.rds-wa-banner.is-open {
  background: #1b4d2e;
  color: #9eebc0;
}

.rds-wa-banner.is-close {
  background: #4a2222;
  color: #f0b4b4;
}

.rds-wa-banner.is-connecting {
  background: #3d3514;
  color: #f0e09a;
}

.rds-wa-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 16rem);
  gap: 0.85rem;
  align-items: start;
}

.rds-wa-profile {
  margin: 0.55rem 0 0.1rem;
  font-weight: 700;
  color: #fff;
}

.rds-wa-jid {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-mute);
  word-break: break-all;
}

.rds-wa-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0;
}

.rds-wa-dl div {
  min-width: 0;
}

.rds-wa-dl dt {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rds-wa-dl dd {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  color: #e8eaed;
  word-break: break-all;
}

.rds-wa-qr {
  min-height: 280px;
  padding: 0.7rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.rds-wa-qr img {
  max-width: 100%;
  height: auto;
  background: #fff;
  border-radius: 0.3rem;
}

.rds-wa-qr-msg {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-mute);
}

.rds-wa-emoji-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.rds-wa-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.rds-wa-count {
  display: inline-flex;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #2a3038;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.rds-wa-count.is-fail {
  background: #4a2222;
  color: #f0b4b4;
}

.rds-wa-table-wrap {
  overflow: auto;
  max-height: 14rem;
  margin: 0.2rem 0 0.4rem;
}

.rds-wa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.rds-wa-table th,
.rds-wa-table td {
  padding: 0.28rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.rds-wa-table th {
  position: sticky;
  top: 0;
  background: #161a20;
  color: var(--text-dim);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rds-wa-table td.is-fail {
  color: #f0b4b4;
  font-weight: 700;
}

.rds-wa-legend {
  margin: 0.35rem 0 0.55rem;
  padding-left: 1.1rem;
  color: var(--text-mute);
  font-size: 0.74rem;
}

.rds-wa-legend li {
  margin: 0.15rem 0;
}

.rds-btn-tiny {
  min-height: 1.6rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
}

@media (max-width: 720px) {
  .rds-wa-split,
  .rds-wa-dl,
  .rds-wa-emoji-row {
    grid-template-columns: 1fr;
  }
}

.rds-settings-row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.5rem 0.65rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.rds-settings-row:last-child {
  margin-bottom: 0;
}

.rds-settings-row > label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rds-settings-row-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  grid-template-columns: none;
}

.rds-settings-row-inline > label:first-child {
  min-width: 7rem;
}

.rds-settings-row-2 {
  grid-template-columns: 1fr 1fr;
}

.rds-settings-row-2 > label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.rds-settings-suffix {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.rds-settings-latlon {
  display: flex;
  gap: 0.4rem;
}

.rds-settings-latlon input {
  width: 100%;
}

.rds-form-settings input[type="text"],
.rds-form-settings input[type="url"],
.rds-form-settings input[type="password"],
.rds-form-settings input[type="number"],
.rds-form-settings select {
  min-height: 2.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b0d10;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  width: 100%;
}

.rds-form-settings input[type="number"] {
  width: 4.5rem;
  flex: 0 0 auto;
}

.rds-form-settings .rds-choice,
.rds-form-settings .rds-choice-check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  margin: 0.2rem 0.55rem 0.2rem 0;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  white-space: nowrap;
}

.rds-form-settings .rds-choice input,
.rds-form-settings .rds-choice-check input {
  width: 1.05rem;
  height: 1.05rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--accent-blue);
}

.rds-settings-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(14rem, 0.8fr);
  gap: 0.65rem;
  align-items: start;
}

.rds-settings-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rds-settings-colors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.rds-settings-color-card {
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.rds-settings-color-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rds-settings-color-card label {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-mute);
}

.rds-settings-color-card input[type="color"] {
  width: 2.2rem;
  height: 1.5rem;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 0.25rem;
  background: transparent;
  cursor: pointer;
}

.rds-settings-icons {
  width: 100%;
  max-width: 22rem;
  border-collapse: collapse;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  overflow: hidden;
  color: var(--text);
}

.rds-settings-icons th {
  padding: 0.55rem 0.65rem 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  vertical-align: bottom;
  border: 0;
}

.rds-settings-icons td {
  padding: 0.12rem 0.65rem 0.28rem;
  text-align: center;
  vertical-align: middle;
  border: 0;
}

.rds-form .rds-ico-pick,
.rds-form-settings .rds-ico-pick,
.rds-ico-pick {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  margin: 0;
  min-width: 3.6rem;
  padding: 0.12rem 0.15rem;
  border-radius: 0.25rem;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.rds-ico-pick:has(input:checked) {
  background: rgba(30, 111, 255, 0.22);
  outline: 1px solid var(--accent-blue);
}

.rds-ico-pick input {
  width: 0.85rem;
  height: 0.85rem;
  min-height: 0;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent-blue);
}

.rds-settings-icons .rds-ico,
.rds-ico-pick .rds-ico {
  font-size: 1.35rem;
  color: #3ddc84;
}

.rds-settings-icons .rds-ico.is-spot,
.rds-ico-pick .rds-ico.is-spot {
  color: #8ce99a;
}

.rds-settings-icons .rds-ico.is-sonora,
.rds-ico-pick .rds-ico.is-sonora,
.rds-settings-icons .rds-pl-sonora {
  font-size: 1.35rem;
  color: #63e6be;
}

.rds-settings-keywords {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.rds-settings-kw-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.rds-settings-kw-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  min-height: 8rem;
  max-height: 10rem;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b0d10;
}

.rds-settings-kw-list li {
  padding: 0.35rem 0.45rem;
  font-size: 0.88rem;
  cursor: pointer;
  border-radius: 0.25rem;
}

.rds-settings-kw-list li.is-selected {
  background: rgba(30, 111, 255, 0.35);
}

.rds-settings-kw-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.rds-settings-kw-actions .rds-btn-icon {
  min-width: 2.2rem;
  min-height: 2.2rem;
  height: 2.2rem;
  font-size: 1.1rem;
}

.rds-settings-voices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
  grid-template-columns: none;
}

.rds-settings-voices > label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  min-width: 7rem;
}

.rds-settings-voices #cfgTtsVoicePreview {
  align-self: end;
  white-space: nowrap;
}

.rds-settings-voices-news {
  align-items: start;
}
.rds-settings-voices-news .rds-form-row-label {
  flex-basis: 100%;
}
.rds-settings-voices-news .rds-settings-hint {
  flex-basis: 100%;
  margin: 0 0 0.15rem;
}
.rds-settings-tts-fn {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
  padding: 0.4rem 0 0.1rem;
  border-top: 1px solid color-mix(in srgb, var(--text-dim) 28%, transparent);
}
.rds-settings-tts-fn-name {
  min-width: 7rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
  align-self: end;
  padding-bottom: 0.42rem;
}
.rds-settings-tts-fn [data-tts-voice-for][hidden] {
  display: none !important;
}
.rds-settings-tts-fn .rds-btn {
  align-self: end;
  white-space: nowrap;
}
.rds-settings-tts-fn-voices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
}
.rds-settings-tts-fn-voices > label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  min-width: 7rem;
}
.rds-settings-tts-infra {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid color-mix(in srgb, var(--text-dim) 28%, transparent);
}
.rds-settings-tts-infra > .rds-form-row-label {
  display: block;
  margin-bottom: 0.35rem;
}

.rds-form-settings .rds-modal-actions {
  flex-shrink: 0;
  margin-top: 0.25rem;
}

@media (max-width: 900px) {
  .rds-settings-grid-2,
  .rds-settings-colors,
  .rds-settings-keywords {
    grid-template-columns: 1fr 1fr;
  }

  .rds-settings-icons {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .rds-settings-row,
  .rds-settings-row-2 {
    grid-template-columns: 1fr;
  }

  .rds-settings-grid-2,
  .rds-settings-colors,
  .rds-settings-keywords {
    grid-template-columns: 1fr;
  }
}

/* ── Settings: aba Áudio ── */
.rds-settings-audio-box {
  max-width: 28rem;
}

.rds-settings-audio-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.rds-settings-audio-field > label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rds-settings-audio-field select {
  width: 100%;
  min-height: 2.6rem;
}

.rds-settings-audio-meta {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.rds-settings-audio-actions {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.rds-settings-audio-status {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.88rem;
  color: var(--text-dim);
  text-align: center;
}

/* ── Biblioteca de áudio ── */
.rds-modal-library { z-index: 2250; }
.rds-modal-lib-danger { z-index: 2360; }
.rds-modal-dialog-lib-danger {
  width: min(32rem, 96vw);
  border: 2px solid #e03131;
  box-shadow: 0 0 0 4px rgba(224, 49, 49, 0.35), 0 18px 48px rgba(0, 0, 0, 0.55);
  background: #1a0d0d;
}
.rds-lib-danger-title {
  color: #ff6b6b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 1.15rem;
}
.rds-lib-danger-lead {
  margin: 0 0 0.75rem;
  color: #f8d7da;
  font-size: 0.92rem;
  line-height: 1.4;
  font-weight: 600;
}
.rds-lib-danger-open {
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.6rem;
  background: #e03131;
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  border-radius: var(--radius);
}
.rds-lib-danger-list {
  margin: 0 0 0.85rem;
  padding: 0.4rem 0.6rem 0.4rem 1.3rem;
  max-height: 12rem;
  overflow: auto;
  background: #2a1212;
  border: 1px solid #7a1f1f;
  border-radius: var(--radius);
  color: #ffe3e3;
  font-size: 0.86rem;
  line-height: 1.45;
}
.rds-lib-danger-list li.is-open {
  color: #fff;
  font-weight: 800;
}
.rds-lib-danger-type {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 0.9rem;
  color: #f8d7da;
  font-size: 0.84rem;
  font-weight: 600;
}
.rds-lib-danger-type strong {
  color: #fff;
  font-family: var(--font-ui);
  word-break: break-all;
}
.rds-lib-danger-type input {
  min-height: 2.5rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid #e03131;
  border-radius: var(--radius);
  background: #0a0c10;
  color: var(--text);
}
.rds-modal-dialog-library {
  width: min(98vw, 92rem);
  height: min(96vh, 100%);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.rds-lib-toast {
  flex-shrink: 0;
  margin: 0 0 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-align: center;
  line-height: 1.25;
}
.rds-lib-toast[hidden] { display: none !important; }
.rds-lib-toast.is-ok {
  background: #1fad5a;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(31, 173, 90, 0.45);
}
.rds-lib-toast.is-dup {
  background: #f59f00;
  color: #1a1200;
  box-shadow: 0 0 0 2px rgba(245, 159, 0, 0.45);
}
.rds-modal-dialog-library.is-editing {
  height: auto;
  max-height: min(94vh, 100%);
}
.rds-lib-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  flex-shrink: 0;
}
.rds-lib-head .rds-modal-title {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rds-lib-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  flex-shrink: 0;
  align-items: center;
}
.rds-lib-scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  width: 100%;
}
.rds-lib-scope {
  flex: 1 1 auto;
  min-height: 2.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #3a424e;
  border-radius: var(--radius);
  background: #0a0c10;
  color: #9aa3b2;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.rds-lib-scope:hover {
  color: #e8ecf1;
  border-color: #5a6574;
}
.rds-lib-scope.is-active {
  background: #1a2330;
  color: #fff;
  border-color: #4dabf7;
  box-shadow: inset 0 0 0 1px rgba(77, 171, 247, 0.35);
}
.rds-lib-scope:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.rds-modal-dialog-library.is-editing .rds-lib-toolbar,
.rds-modal-dialog-library.is-editing .rds-lib-clean-bar,
.rds-modal-dialog-library.is-editing .rds-lib-toast,
.rds-modal-dialog-library.is-editing .rds-lib-list {
  display: none !important;
}
.rds-lib-clean-bar {
  flex-shrink: 0;
  margin: -0.15rem 0 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #3a424e;
  border-radius: var(--radius);
  background: #0d1118;
}
.rds-lib-clean-lead {
  margin: 0 0 0.45rem;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.35;
}
.rds-lib-clean-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.rds-lib-clean-checkall {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #c5cdd8;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.rds-lib-clean-checkall input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #4dabf7;
  cursor: pointer;
}
.rds-lib-clean-checkall:has(input:disabled) {
  opacity: 0.5;
  cursor: default;
}
.rds-lib-clean-summary {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 0.8rem;
}
.rds-lib-orphan-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  min-height: 2.2rem;
  margin: 0;
  cursor: pointer;
}
.rds-lib-orphan-check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #4dabf7;
  cursor: pointer;
}
.rds-modal-dialog-library.is-editing .rds-lib-close-btn {
  display: none !important;
}
.rds-lib-filter {
  flex: 1 1 12rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid #3a424e;
  border-radius: var(--radius);
  background: #0a0c10;
  color: var(--text);
}
.rds-lib-select {
  min-height: 2.5rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid #3a424e;
  border-radius: var(--radius);
  background: #0a0c10;
  color: var(--text);
}
.rds-lib-list {
  flex: 1 1 auto;
  min-height: 10rem;
  max-height: none;
  overflow: auto;
  border: 1px solid #3a424e;
  border-radius: var(--radius);
  background: #0a0c10;
  margin-bottom: 0.55rem;
  position: relative;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.rds-lib-list.is-drop-target {
  border-color: #3d8bfd;
  box-shadow: inset 0 0 0 2px rgba(61, 139, 253, 0.45);
  background: rgba(30, 111, 255, 0.1);
}
.rds-lib-list.is-drop-target::after {
  content: 'Solte para importar na biblioteca';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cfe6ff;
  background: rgba(8, 12, 20, 0.72);
  text-align: center;
  padding: 1rem;
}
.rds-lib-empty {
  margin: 1.2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.rds-lib-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #2a3340;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.rds-lib-card:last-child { border-bottom: 0; }
.rds-lib-card:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rds-lib-card.is-selected {
  background: rgba(30, 111, 255, 0.18);
  box-shadow: inset 3px 0 0 #3d8bfd;
}
.rds-lib-card.is-selected .rds-lib-card-name {
  color: #cfe6ff;
}
.rds-lib-card-main { flex: 1 1 auto; min-width: 0; }
.rds-lib-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rds-lib-rename-input {
  display: block;
  width: 100%;
  min-height: 2.2rem;
  margin: 0 0 0.1rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #4dabf7;
  border-radius: var(--radius);
  background: #0a0c10;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.rds-lib-card.is-just-added {
  background: rgba(31, 173, 90, 0.22);
  box-shadow: inset 4px 0 0 #1fad5a;
  animation: rds-lib-just-added 1.1s ease;
}
@keyframes rds-lib-just-added {
  0% { background: rgba(31, 173, 90, 0.55); }
  100% { background: rgba(31, 173, 90, 0.22); }
}
.rds-lib-card.is-already-there {
  background: rgba(245, 159, 0, 0.22);
  box-shadow: inset 4px 0 0 #f59f00;
  animation: rds-lib-already-there 1.1s ease;
}
@keyframes rds-lib-already-there {
  0% { background: rgba(245, 159, 0, 0.5); }
  100% { background: rgba(245, 159, 0, 0.22); }
}
.rds-lib-badge-in {
  background: rgba(31, 173, 90, 0.28);
  color: #8ee0b0;
}
.rds-lib-card-meta {
  margin-top: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-mute);
}
.rds-lib-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.3rem;
}
.rds-lib-badge {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(30, 111, 255, 0.25);
  color: #74c0fc;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rds-lib-badge-proj {
  background: rgba(255, 170, 50, 0.22);
  color: #ffc078;
}
.rds-lib-badge-pads {
  background: rgba(255, 212, 59, 0.18);
  color: #ffe066;
}
.rds-lib-badge-sfx {
  background: rgba(124, 58, 237, 0.22);
  color: #c4b5fd;
}
.rds-lib-badge-wa {
  background: rgba(37, 211, 102, 0.2);
  color: #7dffa8;
}
.rds-lib-badge-sonora {
  background: rgba(12, 166, 120, 0.22);
  color: #63e6be;
}
.rds-lib-badge-lib {
  background: rgba(64, 192, 140, 0.22);
  color: #8ce0b8;
}
.rds-lib-badge-robot {
  background: rgba(90, 160, 255, 0.22);
  color: #9ec5ff;
}
.rds-lib-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  flex-shrink: 0;
}
.rds-lib-card-actions .rds-btn-icon.is-added,
.rds-lib-card-actions .rds-btn-boletim.is-added {
  background: #1fad5a;
  color: #fff;
}
.rds-lib-card-actions .rds-btn-icon.is-just-hit,
.rds-lib-card-actions .rds-btn-boletim.is-just-hit {
  animation: rds-lib-btn-hit 0.7s ease;
  box-shadow: 0 0 0 3px rgba(31, 173, 90, 0.55);
}
.rds-lib-card.is-already-there .rds-btn-icon.is-just-hit,
.rds-lib-card.is-already-there .rds-btn-boletim.is-just-hit {
  box-shadow: 0 0 0 3px rgba(245, 159, 0, 0.55);
}
@keyframes rds-lib-btn-hit {
  0% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.rds-lib-editor {
  border-top: 0;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.rds-lib-editor[hidden] {
  display: none !important;
}
.rds-modal-dialog-library.is-editing .rds-lib-editor {
  border-top: 0;
  padding-top: 0;
  flex: 0 1 auto;
  overflow: visible;
}
.rds-lib-editor-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  flex-shrink: 0;
}
.rds-modal-dialog-library.is-editing .rds-lib-editor-title {
  display: none;
}
.rds-lib-editor-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.rds-lib-editor-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.rds-modal-dialog-library.is-editing .rds-lib-editor-meta {
  width: 100%;
}
.rds-lib-wave {
  position: relative;
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  border: 1px solid #3a424e;
  border-radius: var(--radius);
  background: #05070a;
  overflow: hidden;
}
.rds-modal-dialog-library.is-editing .rds-lib-wave,
.rds-modal-dialog-library.is-editing .rds-lib-wave.is-stereo {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
}
/* Régua de tempo (Timeline plugin) */
.rds-lib-wave [part="timeline"],
.rds-lib-wave > div:has([part^="timeline-notch"]) {
  flex-shrink: 0;
  background: #0a0e14;
  border-bottom: 1px solid #2a3340;
}
.rds-lib-wave [part^="timeline-notch"] {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #8b97a8;
}
.rds-lib-wave [part*="timeline-notch-primary"] {
  color: #c5d0de;
  font-weight: 600;
}
.rds-lib-wave.is-stereo::before,
.rds-lib-wave.is-stereo::after {
  position: absolute;
  left: 0.35rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  line-height: 1;
}
.rds-lib-wave.is-stereo::before {
  content: 'L';
  top: 2rem;
}
.rds-lib-wave.is-stereo::after {
  content: 'R';
  top: auto;
  bottom: 0.4rem;
}
.rds-lib-transport,
.rds-lib-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  flex-shrink: 0;
}
.rds-lib-transport [data-lib-tr="loop"].is-active {
  background: rgba(255, 224, 102, 0.22);
  border-color: #ffe066;
  color: #ffe066;
}
.rds-lib-time {
  font-family: var(--font-onair);
  color: #ffe066;
  font-size: 1.05rem;
  min-width: 5.5rem;
  margin: 0 0.35rem;
}
.rds-lib-tools .rds-btn-icon {
  min-height: 2.15rem;
  height: auto;
  padding: 0.28rem 0.45rem;
  font-size: 0.68rem;
  flex-direction: column;
  gap: 0.12rem;
}
.rds-lib-gain {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.rds-lib-gain input {
  width: 4.2rem;
  min-height: 2.15rem;
  padding: 0.25rem 0.35rem;
  border: 1px solid #3a424e;
  border-radius: var(--radius);
  background: #0a0c10;
  color: var(--text);
  font-family: var(--font-mono);
}
.rds-lib-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 0.45rem;
  border-top: 1px solid #2a3340;
  background: rgba(12, 14, 18, 0.96);
}
.rds-lib-hint {
  flex: 1 1 12rem;
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-mute);
  line-height: 1.35;
}

body.rds-login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}
.rds-modal-login {
  z-index: 12000;
}
.rds-modal-login .rds-modal-backdrop {
  background: rgba(6, 8, 12, 0.88);
}
.rds-modal-login .rds-login-card {
  position: relative;
  z-index: 1;
  margin: 0;
}
body.is-login-overlay .rds-app {
  pointer-events: none;
  user-select: none;
}
.rds-login-card {
  width: min(22rem, calc(100% - 2rem));
  padding: 1.4rem 1.25rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.7rem;
  background: var(--bg-panel);
  box-shadow: var(--shadow);
}
.rds-login-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rds-login-lead {
  margin: 0 0 1rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.4;
}
.rds-form-login label {
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}
.rds-login-error {
  margin: 0;
  color: #ff8e8e;
  font-size: 0.88rem;
  font-weight: 600;
}
.rds-form-login .rds-btn {
  width: 100%;
  margin-top: 0.35rem;
  min-height: 2.6rem;
}
.rds-form-login .rds-modal-actions .rds-btn,
.rds-form-password .rds-modal-actions .rds-btn {
  width: auto;
  min-width: 7rem;
  margin-top: 0;
}
.rds-modal-dialog-password {
  width: min(26rem, 100%);
}
.rds-form-password .rds-modal-actions {
  margin-top: 0.55rem;
}
.rds-login-alt {
  margin: 0.85rem 0 0;
  text-align: center;
}
.rds-login-link {
  background: none;
  border: none;
  padding: 0;
  color: #7eb6ff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}
.rds-login-link:hover {
  color: #a8ceff;
}
.rds-userbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
.rds-userbar-name {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
}
.rds-footer-user {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  min-width: 7.5rem;
  max-width: 12.5rem;
  padding: 0.15rem 0.7rem 0.15rem 0.85rem;
  text-align: right;
}
.rds-footer-user-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 1vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
}
.rds-footer-user-role {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8fd3ff;
  line-height: 1.2;
}
.rds-modal-boot {
  z-index: 5000;
}
body.is-booting {
  overflow: hidden;
}
.rds-modal-dialog-users {
  width: min(42rem, 100%);
}
.rds-users-roles {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}
.rds-users-roles-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.rds-users-roles select,
.rds-form-users #rdsUserPapel {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b0d10;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
}
.rds-users-roles select:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 1px;
}
.rds-users-list {
  max-height: 12rem;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b0d10;
  margin: 0 0 0.75rem;
}
.rds-user-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-bottom: 1px solid #2a3340;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-ui);
}
.rds-user-item:last-child { border-bottom: 0; }
.rds-user-item:hover,
.rds-user-item.is-selected {
  background: rgba(30, 111, 255, 0.22);
}
.rds-user-item-name { font-weight: 700; }
.rds-user-item-meta {
  color: var(--text-dim);
  font-size: 0.78rem;
}
.rds-form-users {
  display: grid;
  gap: 0.55rem;
}
.rds-form-users label {
  text-transform: none;
  letter-spacing: 0;
}
.rds-users-list:empty,
.rds-users-list .rds-user-item-meta {
  padding: 0.7rem;
}

.rds-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Manual operacional (Ajuda) ── */
.rds-modal-help {
  z-index: 2800;
  padding: 0.7rem;
}
.rds-modal-dialog-help {
  width: min(72rem, 100%);
  height: min(92dvh, 56rem);
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--bg-panel);
}
.rds-help-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 1px solid var(--line);
}
.rds-help-header .rds-modal-title {
  margin: 0;
  color: var(--accent-cyan);
}
.rds-help-lead {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
  font-weight: 500;
  max-width: 46rem;
}
.rds-help-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(13.5rem, 17.5rem) 1fr;
  overflow: hidden;
}
.rds-help-aside {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #10151c;
}
.rds-help-search-label {
  display: block;
  flex-shrink: 0;
  padding: 0.65rem 0.65rem 0.35rem;
}
.rds-help-search {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b0d10;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
}
.rds-help-search:focus {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 1px;
}
.rds-help-nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.25rem 0.45rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.rds-help-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.48rem 0.6rem;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  line-height: 1.25;
}
.rds-help-nav-item:hover {
  background: rgba(61, 184, 232, 0.12);
  color: #fff;
}
.rds-help-nav-item.is-active {
  background: rgba(61, 184, 232, 0.22);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent-cyan);
}
.rds-help-nav-empty {
  margin: 0.5rem 0.4rem;
  color: var(--text-mute);
  font-size: 0.85rem;
}
.rds-help-body {
  min-height: 0;
  overflow: auto;
  padding: 0.9rem 1.15rem 1.4rem;
  user-select: text;
  cursor: text;
  line-height: 1.45;
  font-size: 0.95rem;
  color: var(--text);
}
.rds-help-body:focus {
  outline: none;
}
.rds-help-body h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
}
.rds-help-body h3 {
  margin: 1.05rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}
.rds-help-body p,
.rds-help-body li {
  color: var(--text);
}
.rds-help-body ul,
.rds-help-body ol {
  margin: 0.25rem 0 0.6rem;
  padding-left: 1.25rem;
}
.rds-help-body li + li {
  margin-top: 0.22rem;
}
.rds-help-body code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: #d4e8ff;
  background: #0b0d10;
  padding: 0.05rem 0.3rem;
  border-radius: 0.2rem;
}
.rds-help-note {
  margin: 0.85rem 0 0;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid var(--accent-yellow);
  background: rgba(240, 192, 0, 0.08);
  color: var(--text);
  font-size: 0.9rem;
}
.rds-help-table-wrap {
  overflow: auto;
  margin: 0.35rem 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.rds-help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.rds-help-table th,
.rds-help-table td {
  padding: 0.42rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.rds-help-table th {
  background: #10151c;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rds-help-table tr:last-child td {
  border-bottom: 0;
}
.rds-help-table td:first-child {
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
}

@media (max-width: 820px) {
  .rds-help-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(10rem, 32%) 1fr;
  }
  .rds-help-aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .rds-help-table td:first-child {
    white-space: normal;
  }
}
