:root {
  color-scheme: dark;
  --bg: #0c1018;
  --bg-soft: #131a26;
  --panel: #151d2a;
  --panel-soft: #1a2433;
  --card: #182231;
  --line: #273344;
  --line-soft: #344257;
  --surface: #111925;
  --text: #edf2fa;
  --muted: #a5b0c1;
  --muted-strong: #7f8ca1;
  --lime: #829bff;
  --lime-strong: #a2b3ff;
  --red: #f07883;
  --shadow: rgba(0, 0, 0, .28);
  --sans: "Manrope", "Segoe UI", sans-serif;
  --mono: "DM Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 82% 0%, rgba(75, 100, 175, .16), transparent 35%),
    var(--bg);
  color: var(--text);
}

.shell {
  max-width: 1440px;
  padding: 0 clamp(20px, 5vw, 72px);
}

.topbar {
  height: 76px;
  justify-content: flex-start;
  gap: 22px;
  padding: 0;
  border-bottom: 0;
}

.brand {
  gap: 10px;
  color: #172033;
  font-size: 16px;
  letter-spacing: -.045em;
}

.brand-light {
  color: #7c8799;
}

.brand-mark {
  width: 30px;
  height: 30px;
  gap: 3px;
  border-radius: 9px;
  background: #4568e8;
  box-shadow: 0 5px 12px rgba(69, 104, 232, .22);
}

.brand-mark span {
  width: 3px;
  background: #fff;
}

.top-meta {
  gap: 8px;
  color: #8791a3;
  font-size: 9px;
  letter-spacing: .1em;
}

.local-dot {
  background: #4568e8;
  box-shadow: 0 0 0 4px rgba(69, 104, 232, .1);
}

.logout-button {
  margin-left: auto;
  padding: 9px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.logout-button:hover {
  border-color: #bfcaf5;
  background: #f4f6ff;
  color: #3557d5;
}

.login-screen {
  min-height: calc(100svh - 76px);
  padding: 44px 0 72px;
}

.login-screen::before {
  position: absolute;
  width: min(660px, 95vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(69, 104, 232, .09), transparent 68%);
  content: "";
  pointer-events: none;
}

.login-panel {
  position: relative;
  width: min(100%, 440px);
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid rgba(222, 227, 237, .9);
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(31, 48, 84, .1), 0 2px 8px rgba(31, 48, 84, .035);
}

.login-panel .eyebrow,
.dashboard-intro .eyebrow {
  margin-bottom: 16px;
  color: #4568e8;
  font-size: 9px;
  letter-spacing: .14em;
}

.login-panel h1 {
  font-size: clamp(34px, 8vw, 42px);
  letter-spacing: -.055em;
}

.login-panel h1 span,
.dashboard-intro h1 span {
  color: #4568e8;
}

.login-copy {
  margin: 0 0 24px;
  color: #758096;
  font-size: 13px;
  line-height: 1.7;
}

.field-label {
  margin: 20px 0 8px;
  color: #68748a;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
}

.source-mode-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #101722;
}

.source-mode-button {
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  background: #182231;
  color: #bdc9da;
  font: 600 11px var(--sans);
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.source-mode-button[aria-pressed="true"] {
  border-color: #657fe8;
  background: #657fe8;
  color: #fff;
  box-shadow: 0 2px 8px rgba(69, 104, 232, .24);
}

.source-mode-button:hover:not(:disabled):not([aria-pressed="true"]) {
  background: #202c43;
  color: var(--lime-strong);
}

.source-mode-button:focus-visible {
  outline: 3px solid rgba(69, 104, 232, .2);
  outline-offset: 1px;
}

.source-mode-button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.obs-source-fields {
  display: grid;
  gap: 0;
  margin-top: 4px;
}

.obs-source-fields .field-label {
  margin: 16px 0 8px;
}

.obs-credential-row {
  display: flex;
  gap: 0;
  min-width: 0;
}

.obs-credential-row input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-right: 0;
  border-radius: 9px 0 0 9px;
  background: #101722;
  color: var(--text);
  font: 10px var(--mono);
}

.obs-credential-row input:focus {
  border-color: var(--lime);
  background: #151e2b;
  box-shadow: 0 0 0 3px rgba(130, 155, 255, .14);
  outline: none;
}

#backupPassword,
#backupPasswordConfirmation {
  -webkit-text-security: disc;
}

.obs-credential-row .settings-backup-button {
  flex: 0 0 auto;
  min-width: 42px;
  min-height: 40px;
  padding: 0 12px;
  border-color: var(--line-soft);
  border-left: 0;
  border-radius: 0;
  background: #182231;
  color: #8795aa;
  white-space: nowrap;
}

.obs-credential-row .settings-backup-button:last-child {
  border-radius: 0 9px 9px 0;
}

.obs-credential-row .server-address-toggle,
.obs-credential-row .stream-key-toggle {
  border-radius: 0;
}

.obs-credential-row .settings-backup-button:hover {
  border-color: var(--line-soft);
  background: #202c43;
  color: var(--lime-strong);
}

.obs-credential-row .settings-backup-button:focus-visible,
.obs-rotate-key:focus-visible {
  outline: 3px solid rgba(69, 104, 232, .2);
  outline-offset: 2px;
}

.settings-backup-button.obs-rotate-key {
  justify-self: start;
  margin-top: 8px;
  height: 40px;
  padding: 0 15px;
  border-style: dashed;
  border-color: var(--line-soft);
  border-radius: 8px;
  background: #182231;
  color: #bdc9da;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.settings-backup-button.obs-rotate-key:hover {
  border-color: #52658f;
  background: #202c43;
  color: var(--lime-strong);
}

.obs-source-fields .field-note {
  margin: 10px 0 0;
  font-size: 10px;
}

.source-wait-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #758096;
  font-size: 11px;
}

.source-wait-option input {
  flex: 0 0 auto;
  accent-color: #4568e8;
}

.login-panel input,
.destination-field input,
.destination-field select,
.input-wrap,
.platform-fields input {
  border-color: #dfe4ed;
  border-radius: 9px;
  background: #fbfcfe;
  color: #172033;
}

.login-panel input {
  height: 46px;
  font-family: var(--sans);
  font-size: 13px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-panel input:focus,
.destination-field input:focus,
.destination-field select:focus,
.platform-fields input:focus,
.input-wrap:focus-within {
  border-color: #6d88f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(69, 104, 232, .11);
  outline: none;
}

.login-error,
.message {
  color: #c94555;
}

.dashboard-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 48px 0 27px;
}

.dashboard-intro .eyebrow {
  margin-bottom: 12px;
}

.dashboard-intro h1 {
  font-size: clamp(36px, 5vw, 52px);
  letter-spacing: -.06em;
}

.intro-copy {
  margin: 0 2px 4px 0;
  color: #758096;
  font-size: 12px;
  line-height: 1.8;
}

.workspace {
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, .92fr);
  overflow: hidden;
  border: 1px solid #e3e7ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 46px rgba(31, 48, 84, .07);
}

.setup-column,
.monitor-column {
  min-width: 0;
  padding: clamp(22px, 3.2vw, 36px);
}

.setup-column {
  border-right: 1px solid #e9edf3;
}

.monitor-column {
  background: #fafbfe;
}

.section-heading {
  gap: 11px;
}

.step {
  display: inline-grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border: 1px solid #e0e6fb;
  border-radius: 9px;
  background: #f1f4ff;
  color: #4568e8;
  font-size: 9px;
}

h2 {
  color: #202b40;
  font-size: 14px;
  letter-spacing: -.025em;
}

.section-line {
  background: #e8ecf3;
}

.input-wrap {
  height: 48px;
  background: #fbfcfe;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.input-prefix {
  color: #4568e8;
}

.input-wrap input,
.platform-fields input {
  color: #263249;
  font-size: 11px;
}

.input-wrap input::placeholder,
.platform-fields input::placeholder,
.destination-field input::placeholder {
  color: #9aa4b5;
}

.field-note,
.destination-hint {
  color: #8892a4;
  line-height: 1.65;
}

.destinations-heading {
  margin-top: 34px;
}

.platform-row {
  padding: 16px 0;
  border-bottom-color: #edf0f5;
}

.platform-icon {
  border-radius: 9px;
  box-shadow: 0 2px 5px rgba(20, 35, 66, .1);
}

.platform-info h3 {
  color: #202b40;
  font-size: 13px;
}

.platform-info p {
  color: #8993a5;
}

.switch-track {
  background: #dce2ec;
}

.switch-track:after {
  background: #fff;
  box-shadow: 0 1px 3px rgba(26, 38, 62, .2);
}

.switch input:checked + .switch-track {
  background: #4568e8;
}

.switch input:checked + .switch-track:after {
  background: #fff;
}

.switch input:focus-visible + .switch-track {
  outline-color: #4568e8;
}

.privacy-note {
  gap: 9px;
  color: #8791a3;
  font-size: 10px;
  line-height: 1.65;
}

.lock-icon {
  color: #4568e8;
}

.destination-list {
  gap: 10px;
}

.destination-card {
  gap: 13px;
  padding: 16px;
  border-color: #e6eaf1;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(31, 48, 84, .035);
  transition: border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}

.destination-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.destination-card.dragging {
  opacity: 0.6;
}

.destination-card.drag-over {
  border-color: #3557d5;
  box-shadow: 0 0 0 2px rgba(53, 87, 213, .12);
}

.destination-drag-handle {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(96, 114, 153, 0.55);
  background: rgba(15, 23, 42, 0.05);
  cursor: grab;
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #607293;
}

.destination-drag-handle::before {
  content: "⋮⋮";
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  transform: translateY(-1px);
}

.destination-drag-handle:hover {
  border-color: rgba(96, 114, 153, 0.8);
  background: rgba(15, 23, 42, 0.08);
}

.destination-drag-handle:active {
  cursor: grabbing;
}

.destination-card:focus-within {
  border-color: #c3cef7;
  box-shadow: 0 4px 16px rgba(69, 104, 232, .08);
}

.destination-title {
  color: #202b40;
  font-size: 12px;
  flex: 1;
  text-align: left;
  min-width: 0;
  line-height: 1.3;
  margin-left: 0;
}

.destination-protocol,
.destination-field input,
.destination-field select {
  border-color: #dfe4ed;
  border-radius: 8px;
  background: #fbfcfe;
  color: #263249;
}

.destination-toggle,
.destination-remove,
.add-destination,
.destination-start,
.destination-stop,
.clear-errors-button,
.clear-log-button,
.copy-log-button {
  border-radius: 8px;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.destination-toggle,
.destination-remove,
.add-destination {
  border-color: #dfe4ed;
  background: #fff;
  color: #5f6b80;
}

.destination-toggle:hover,
.destination-remove:hover,
.add-destination:hover {
  border-color: #bac7f5;
  background: #f3f5ff;
  color: #3557d5;
}

.add-destination {
  height: 40px;
  padding: 0 15px;
  border-style: dashed;
}

.destination-field input,
.destination-field select {
  height: 40px;
  font-size: 11px;
}

.destination-hint {
  font-size: 10px;
}

.destination-runtime {
  gap: 12px;
  border-top-color: #e9edf3;
}

.destination-runtime-status {
  color: #718096;
}

.destination-runtime-dot.running {
  color: #30ad80;
  background: #30ad80;
}

.destination-runtime-status.running {
  color: #30ad80;
}

.destination-runtime-dot.warning {
  color: #e4a72c;
  background: #e4a72c;
}

.destination-runtime-status.warning {
  color: #e4a72c;
}

.destination-runtime-dot.error {
  color: #dc5360;
  background: #dc5360;
}

.destination-runtime-status.error {
  color: #dc5360;
}

.destination-runtime-dot.idle {
  color: #7f8a9c;
  background: #aab3c2;
}

.destination-runtime-status.idle {
  color: #7f8a9c;
  background: transparent;
}

.destination-runtime-status.running,
.destination-runtime-status.warning,
.destination-runtime-status.error,
.destination-runtime-status.idle {
  background: transparent;
}

.destination-runtime-details {
  gap: 8px;
}

.destination-runtime-details > div {
  padding: 9px;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #fafbfe;
}

.destination-runtime-details span {
  color: #8993a5;
  font-size: 8px;
}

.destination-runtime-details strong {
  color: #354158;
  font-size: 10px;
}

.destination-runtime-details .destination-runtime-error {
  grid-column: 1 / -1;
}

.destination-runtime-details .has-error {
  color: #bf3949;
}

.destination-runtime-actions {
  gap: 8px;
}

.destination-start,
.destination-stop {
  min-height: 35px;
  padding: 0 12px;
  background: #fff;
}

.destination-start {
  border-color: #d5defb;
  background: #f2f5ff;
  color: #3557d5;
}

.destination-start:hover {
  background: #e9eeff;
}

.destination-stop {
  border-color: #f2d8da;
  background: #fff7f7;
  color: #c94555;
}

.destination-stop:hover {
  background: #fff0f0;
}

.destination-start:disabled,
.destination-stop:disabled,
.destination-remove:disabled {
  opacity: .55;
}

.clear-errors-button {
  height: 36px;
  border-color: #f0dfc5;
  background: #fffaf1;
  color: #986d2c;
}

.clear-errors-button:hover {
  border-color: #e6c997;
  background: #fff5e3;
}

.monitor-top {
  min-height: 30px;
}

.status-pill {
  padding: 8px 11px;
  border-color: #e2e6ed;
  border-radius: 999px;
  background: #fff;
  color: #758096;
  font-size: 8px;
  letter-spacing: .05em;
}

.status-dot {
  background: #aab3c2;
}

.status-pill.live {
  border-color: #cce9de;
  background: #f1fbf6;
  color: #24825f;
}

.status-pill.live .status-dot {
  background: #30ad80;
  box-shadow: 0 0 0 3px rgba(48, 173, 128, .13);
}

.signal-card {
  height: 180px;
  margin-top: 22px;
  border-color: #e4e8f0;
  border-radius: 13px;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(92, 121, 231, .1), transparent 54%),
    linear-gradient(145deg, #f5f7ff, #eef2fb);
}

.signal-ring {
  width: 104px;
  height: 104px;
  border-color: rgba(69, 104, 232, .18);
}

.ring-two {
  width: 145px;
  height: 145px;
  border-color: rgba(69, 104, 232, .1);
}

.signal-core {
  width: 56px;
  height: 56px;
  border-color: rgba(69, 104, 232, .28);
  background: rgba(255, 255, 255, .75);
  box-shadow: 0 6px 20px rgba(69, 104, 232, .09);
}

.signal-core i {
  background: #a4b2ea;
}

.signal-card.live .signal-core i {
  background: #4568e8;
}

.signal-caption {
  left: 15px;
  bottom: 14px;
}

.caption-label,
.stat-label {
  color: #8993a5;
  font-size: 8px;
  letter-spacing: .09em;
}

.caption-value {
  color: #354158;
  font-size: 11px;
}

.monitor-stats {
  gap: 10px;
  margin-top: 12px;
  padding: 0;
  border-bottom: 0;
}

.monitor-stats > div {
  padding: 14px 15px;
  border: 1px solid #e7eaf1;
  border-radius: 11px;
  background: #fff;
}

.monitor-stats > div + div {
  padding-left: 15px;
  border-left: 1px solid #e7eaf1;
}

.monitor-stats strong {
  margin-top: 7px;
  color: #202b40;
  font-size: 16px;
}

.action-area {
  margin-top: 18px;
}

.start-button,
.stop-button {
  min-height: 47px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.start-button {
  background: #4568e8;
  color: #fff;
  box-shadow: 0 5px 14px rgba(69, 104, 232, .2);
}

.start-button:hover {
  transform: translateY(-1px);
  background: #3557d5;
  box-shadow: 0 8px 20px rgba(69, 104, 232, .25);
}

.stop-button {
  border-color: #f0d5d8;
  background: #fff5f5;
  color: #c94555;
}

.stop-button:hover {
  background: #ffeded;
}

.log-heading {
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #e9edf3;
}

.log-heading-main {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #59657a;
  font-size: 9px;
  letter-spacing: .07em;
}

.live-mark {
  color: #8a94a6;
}

.log-option {
  color: #758096;
}

.log-option input {
  accent-color: #4568e8;
}

.log-category-control select {
  min-height: 29px;
  padding: 0 24px 0 9px;
  border: 1px solid #3a4760;
  border-radius: 6px;
  background: #101722;
  color: #b3bfd0;
  font: 9px var(--mono);
}

.clear-log-button,
.copy-log-button {
  min-height: 29px;
  padding: 0 9px;
  border-color: #e0e5ed;
  background: #fff;
  color: #5f6b80;
}

.clear-log-button:hover,
.copy-log-button:hover {
  border-color: #bac7f5;
  background: #f4f6ff;
  color: #3557d5;
}

.log-box {
  min-height: 145px;
  max-height: 240px;
  padding: 13px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  background: #f5f7fa;
  color: #59657a;
  line-height: 1.7;
}

.log-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(135, 149, 170, .12);
  overflow-wrap: anywhere;
}

.log-category-badge {
  flex: 0 0 50px;
  padding-top: 1px;
  font: 8px/1.7 var(--mono);
  text-transform: uppercase;
}

.log-category-badge-error {
  color: #ff958d;
}

.log-category-badge-stream {
  color: #69c8d1;
}

.log-category-badge-ffmpeg {
  color: #e4b45c;
}

.log-category-badge-system {
  color: #9eacc1;
}

.log-muted {
  color: #8a94a6;
}

.log-line-error {
  color: #c94555;
}

.footer {
  padding: 18px 0 28px;
  color: #8a94a6;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #4568e8;
  outline-offset: 3px;
}

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

  .setup-column {
    border-right: 0;
    border-bottom: 1px solid #e9edf3;
  }
}

@media (max-width: 600px) {
  .shell {
    padding: 0 17px;
  }

  .topbar {
    height: 66px;
    gap: 13px;
  }

  .top-meta {
    font-size: 7px;
    letter-spacing: .04em;
  }

  .logout-button {
    padding: 8px 10px;
  }

  .login-screen {
    min-height: calc(100svh - 66px);
    padding: 28px 0 46px;
  }

  .dashboard-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 36px 0 21px;
  }

  .dashboard-intro h1 {
    font-size: clamp(34px, 10vw, 45px);
  }

  .intro-copy {
    font-size: 11px;
  }

  .workspace {
    border-radius: 14px;
  }

  .setup-column,
  .monitor-column {
    padding: 21px 17px;
  }

  .destination-card {
    padding: 12px;
  }

  .destination-head-controls {
    gap: 6px;
  }

  .destination-toggle,
  .destination-remove {
    height: 32px;
    padding: 0 8px;
  }

  .destination-protocol {
    width: 78px;
  }

  .destination-runtime-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .log-heading {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  color: var(--text);
}

.brand,
.platform-info h3,
.destination-title,
.monitor-stats strong,
.caption-value,
h2 {
  color: var(--text);
}

.brand-light,
.top-meta,
.intro-copy,
.field-note,
.destination-hint,
.privacy-note,
.log-option,
.log-category-control,
.login-copy {
  color: var(--muted);
}

.brand-mark {
  background: var(--lime);
}

.brand-mark span {
  background: #111827;
}

.login-screen::before {
  background: radial-gradient(circle, rgba(130, 155, 255, .12), transparent 68%);
}

.login-panel,
.workspace,
.monitor-stats > div {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .22);
}

.destination-card {
  border-color: var(--line);
  background: #182231;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}

.monitor-column {
  background: #111925;
}

.setup-column,
.destination-runtime,
.log-heading {
  border-color: var(--line);
}

.login-panel .eyebrow,
.dashboard-intro .eyebrow,
.login-panel h1 span,
.dashboard-intro h1 span,
.step,
.input-prefix,
.lock-icon {
  color: var(--lime-strong);
}

.step {
  border-color: #344257;
  background: #202c43;
}

.section-line,
.switch-track {
  background: #344257;
}

.login-panel input,
.input-wrap,
.platform-fields input,
.destination-field input,
.destination-field select,
.destination-protocol {
  border-color: var(--line-soft);
  background: #101722;
  color: var(--text);
}

.login-panel input::placeholder,
.input-wrap input::placeholder,
.platform-fields input::placeholder,
.destination-field input::placeholder {
  color: #718096;
}

.login-panel input:focus,
.destination-field input:focus,
.destination-field select:focus,
.platform-fields input:focus,
.input-wrap:focus-within {
  border-color: var(--lime);
  background: #151e2b;
  box-shadow: 0 0 0 3px rgba(130, 155, 255, .14);
}

.platform-row {
  border-bottom-color: var(--line);
}

.switch-track:after {
  background: #dce4f2;
}

.switch input:checked + .switch-track {
  background: #657fe8;
}

.destination-toggle,
.destination-remove,
.add-destination,
.destination-start,
.destination-stop,
.clear-log-button,
.copy-log-button,
.logout-button {
  border-color: var(--line-soft);
  background: #182231;
  color: #bdc9da;
}

.destination-toggle:hover,
.destination-remove:hover,
.add-destination:hover,
.clear-log-button:hover,
.copy-log-button:hover,
.logout-button:hover {
  border-color: #52658f;
  background: #202c43;
  color: var(--lime-strong);
}

.destination-runtime-details > div,
.log-box {
  border-color: var(--line);
  background: #101722;
}

.destination-runtime-details span,
.stat-label,
.caption-label {
  color: #8795aa;
}

.destination-runtime-details strong {
  color: #dbe4f2;
}

.destination-runtime-status {
  color: #9eacc1;
  font-size: 11px;
  font-weight: 600;
}

.destination-runtime-dot.idle {
  background: #9eacc1;
}

.destination-runtime-status-wrap {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.destination-start {
  border-color: #435884;
  background: #202c43;
  color: var(--lime-strong);
}

.destination-stop,
.stop-button {
  border-color: #654049;
  background: #2c1d27;
  color: #f08b95;
}

.clear-errors-button {
  border-color: #5a4933;
  background: #292317;
  color: #e1bd7f;
}

.status-pill {
  border-color: var(--line-soft);
  background: #182231;
  color: var(--muted);
}

.signal-card {
  border-color: var(--line);
  background:
    radial-gradient(ellipse at 50% 45%, rgba(100, 126, 225, .14), transparent 54%),
    linear-gradient(145deg, #1c2839, #151e2c);
}

.signal-ring {
  border-color: rgba(130, 155, 255, .2);
}

.ring-two {
  border-color: rgba(130, 155, 255, .12);
}

.signal-core {
  border-color: rgba(130, 155, 255, .35);
  background: rgba(21, 29, 42, .8);
}

.signal-core i {
  background: #8295db;
}

.signal-card.live .signal-core i {
  background: var(--lime-strong);
}

.start-button {
  background: #657fe8;
  color: #fff;
}

.start-button:hover {
  background: #829bff;
}

.log-box {
  color: #b3bfd0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline-color: var(--lime-strong);
}

.destination-toggle {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  font-size: 0;
}

.destination-toggle::before {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}

.destination-toggle[aria-expanded="true"]::before {
  transform: translateY(2px) rotate(225deg);
}

.destination-toggle:hover {
  color: var(--lime-strong);
}

.destination-key-control {
  display: flex;
  min-width: 0;
}

.destination-key-control input {
  min-width: 0;
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.stream-key-toggle,
.server-address-toggle {
  display: grid;
  width: 42px;
  min-width: 42px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-left: 0;
  border-radius: 0 9px 9px 0;
  background: #182231;
  color: #8795aa;
  cursor: pointer;
}

.stream-key-toggle:hover,
.server-address-toggle:hover {
  color: var(--lime-strong);
}

.stream-key-toggle:disabled,
.server-address-toggle:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.settings-backup-actions,
.backup-dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-backup-button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #182231;
  color: #bdc9da;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.settings-backup-button:hover {
  border-color: #52658f;
  background: #202c43;
  color: var(--lime-strong);
}

.settings-backup-button.primary {
  border-color: #657fe8;
  background: #657fe8;
  color: #fff;
}

.settings-backup-button:disabled {
  cursor: wait;
  opacity: .6;
}

.settings-backup-dialog {
  width: min(440px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: #202b40;
  box-shadow: 0 24px 80px rgba(16, 25, 46, .3);
}

.obs-help-dialog {
  width: min(600px, calc(100% - 32px));
  max-height: min(82vh, 760px);
  overflow-y: auto;
}

.obs-help-content {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.obs-help-dialog ol {
  margin: 0;
  padding-left: 22px;
  color: #536078;
  font-size: 12px;
  line-height: 1.65;
}

.obs-help-dialog li + li {
  margin-top: 6px;
}

.obs-help-dialog .obs-help-warning {
  padding-top: 10px;
  border-top: 1px solid #dfe4ed;
  color: #9c573a;
}

.obs-help-trigger {
  width: fit-content;
  max-width: 100%;
}

.settings-backup-dialog .settings-backup-button {
  border-color: #dfe4ed;
  background: #fff;
  color: #758096;
}

.settings-backup-dialog .settings-backup-button:hover {
  border-color: #bac7f5;
  background: #f3f5ff;
  color: #3557d5;
}

.settings-backup-dialog .settings-backup-button.primary {
  border-color: #657fe8;
  background: #657fe8;
  color: #fff;
}

.settings-backup-dialog::backdrop {
  background: rgba(12, 16, 24, .62);
  backdrop-filter: blur(3px);
}

.settings-backup-dialog form {
  display: grid;
  gap: 10px;
  padding: 24px;
}

.settings-backup-dialog h2 {
  color: #202b40;
  font-size: 18px;
}

.settings-backup-dialog p {
  margin: 0;
  color: #758096;
  font-size: 12px;
  line-height: 1.6;
}

.settings-backup-dialog .field-label {
  margin: 6px 0 0;
}

.settings-backup-dialog #backupPassword,
.settings-backup-dialog #backupPasswordConfirmation {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #dfe4ed;
  border-radius: 9px;
  background: #fbfcfe;
  color: #172033;
  font: inherit;
  -webkit-text-security: disc;
}

.settings-backup-dialog #backupPassword:focus,
.settings-backup-dialog #backupPasswordConfirmation:focus {
  border-color: #6d88f1;
  outline: 3px solid rgba(69, 104, 232, .11);
}

.settings-backup-dialog #backupPasswordConfirmationField input {
  display: block;
  margin-top: 8px;
}

.backup-dialog-error {
  min-height: 18px;
  color: #c94555 !important;
}

.backup-dialog-actions {
  justify-content: flex-end;
  margin-top: 6px;
}

@media (max-width: 520px) {
  .destination-toggle {
    width: 32px;
    height: 32px;
  }

  .destination-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-backup-actions {
    flex-wrap: wrap;
  }

  .settings-backup-button {
    flex: 1;
  }

  .settings-backup-dialog form {
    padding: 20px;
  }
}

.destination-audio-transcode {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 10px var(--mono);
}

.destination-audio-transcode input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--lime);
}

.destination-audio-transcode.vod-audio-unavailable .vod-audio-label {
  opacity: 0.55;
  text-decoration: line-through;
}

.destination-audio-transcode.vod-audio-unavailable input {
  cursor: not-allowed;
}

.vod-audio-note {
  color: var(--muted);
  font-size: 9px;
}
