:root {
  --bg: #050707;
  --bg-2: #101314;
  --panel: rgba(10, 12, 12, 0.84);
  --panel-strong: rgba(18, 22, 21, 0.94);
  --border: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f5ef;
  --muted: #b7bdb9;
  --accent: #6bbd56;
  --accent-strong: #7cd164;
  --accent-deep: #244f27;
  --accent-soft: rgba(107, 189, 86, 0.16);
  --shadow: 0 32px 100px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(107, 189, 86, 0.18), transparent 24%),
    radial-gradient(circle at 85% 14%, rgba(118, 35, 93, 0.18), transparent 22%),
    radial-gradient(circle at bottom right, rgba(16, 97, 48, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.42)),
    linear-gradient(155deg, var(--bg) 0%, var(--bg-2) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0, rgba(255, 255, 255, 0.06) 1px, transparent 1px, transparent 25%),
    linear-gradient(rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 25%);
  background-size: 240px 240px;
  opacity: 0.22;
  mask-image: linear-gradient(180deg, black, rgba(0, 0, 0, 0.25));
}

body::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 14%, transparent 86%, rgba(107, 189, 86, 0.08)),
    radial-gradient(circle at center, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.28));
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.login-shell {
  display: grid;
  place-items: center;
  padding: 32px;
}

.dashboard-shell {
  padding: 0 0 40px;
}

.stage,
.dashboard-stage {
  width: 100%;
  max-width: 720px;
}

.dashboard-stage {
  width: min(calc(100% - 64px), 1400px);
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 6px;
}

.panel,
.dashboard-panel {
  position: relative;
  overflow: hidden;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--panel), var(--panel-strong));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.dashboard-panel {
  padding: 22px 32px 32px;
}

.panel::before,
.dashboard-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.brand-stack {
  display: grid;
  gap: 6px;
  margin-bottom: 36px;
}

.brand-kicker,
.identity-eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-mark {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.75rem, 7vw, 4.8rem);
  line-height: 0.94;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand-mark.compact {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  white-space: nowrap;
}

.copy-block {
  display: grid;
  gap: 12px;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--line);
}

.page-banner {
  position: relative;
  padding: 10px 32px 2px;
  background: linear-gradient(180deg, rgba(5, 7, 7, 0.94) 0%, rgba(5, 7, 7, 0.82) 72%, rgba(5, 7, 7, 0) 100%);
  backdrop-filter: blur(12px);
}

.page-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-width: 0;
}

.page-banner-brand {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.page-banner .brand-mark.compact {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.page-banner-account-cluster {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-banner-shortcuts {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-banner .banner-shortcut-link {
  min-height: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.page-banner .page-banner-shortcuts .banner-icon-link {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.page-banner .page-banner-shortcuts .banner-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.page-banner .banner-shortcut-link.is-active {
  background: linear-gradient(180deg, rgba(107, 189, 86, 0.28), rgba(54, 104, 44, 0.34));
  border-color: rgba(124, 209, 100, 0.62);
  color: #f4f8ef;
  box-shadow: 0 0 0 1px rgba(124, 209, 100, 0.18), 0 10px 24px rgba(15, 28, 14, 0.32);
}

.page-banner .banner-shortcut-link.is-active:hover {
  background: linear-gradient(180deg, rgba(116, 201, 95, 0.34), rgba(60, 117, 49, 0.38));
}

.page-banner .account-pill {
  padding: 9px 12px;
  border-radius: 20px;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(28, 31, 31, 0.88), rgba(19, 21, 21, 0.82));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.page-banner .account-actions {
  gap: 10px;
}

.page-banner .account-actions form {
  display: flex;
  margin: 0;
}

.page-banner .account-actions .ghost-link,
.page-banner .account-actions .ghost-button {
  min-height: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.page-banner .account-actions .banner-icon-link {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.page-banner .account-actions .banner-icon-form {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
}

.page-banner .account-actions .banner-icon-button {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.page-banner .account-actions .banner-icon {
  width: 20px;
  height: 20px;
  display: block;
}

@media (max-width: 720px) {
  .page-banner-account-cluster {
    width: 100%;
    justify-content: flex-end;
  }
}

.panel-title,
.identity-name {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.panel-copy,
.support-copy,
.identity-meta,
.action-copy,
.config-notice {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.auth-zone {
  display: grid;
  gap: 14px;
  padding: 28px 0 24px;
}

.google-slot {
  min-height: 44px;
}

.auth-message {
  min-height: 24px;
  color: #ffd8a3;
}

.config-notice {
  padding: 16px 18px;
  border: 1px dashed rgba(107, 189, 86, 0.4);
  border-radius: 14px;
  background: rgba(107, 189, 86, 0.08);
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-title-block {
  min-width: 0;
}

.dashboard-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.account-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 6px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-left: auto;
}

.account-actions > * {
  flex: 0 0 164px;
}

.account-actions form {
  display: flex;
  margin: 0;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.ghost-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
  text-decoration: none;
}

.account-actions .ghost-link,
.account-actions .ghost-button {
  width: 100%;
  min-height: 38px;
  height: 38px;
  padding: 0 16px;
}

.identity-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #4e9241, #77c960);
  color: #081007;
  font-weight: 700;
  font-size: 1.5rem;
}

.avatar-compact {
  width: 36px;
  height: 36px;
  font-size: 0.92rem;
}

.identity-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.identity-inline-name,
.identity-inline-meta {
  margin: 0;
}

.identity-inline-name {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.05;
}

.identity-inline-meta {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.05;
}

.player-panel {
  display: grid;
  gap: 10px;
}

.channel-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.channel-switch-button {
  min-width: 0;
  justify-content: flex-start;
  align-items: center;
  flex-direction: row;
  text-align: left;
  white-space: nowrap;
  padding: 12px 22px;
}

.channel-switch-button.is-active {
  background: var(--accent-soft);
  border-color: rgba(107, 189, 86, 0.52);
}

.channel-switch-button-test {
  border-style: dashed;
  border-color: rgba(107, 189, 86, 0.34);
}

.channel-switch-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.player-shell.is-unavailable {
  aspect-ratio: auto;
  min-height: 0;
  padding: 28px 24px;
  background:
    radial-gradient(circle at top, rgba(107, 189, 86, 0.12), transparent 35%),
    linear-gradient(180deg, rgba(17, 20, 20, 0.96), rgba(8, 10, 10, 0.98));
}

.player-shell.is-unavailable .stream-player {
  display: none;
}

.stream-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-unavailable {
  width: min(100%, 540px);
  padding: 0;
  text-align: center;
}

.player-unavailable-message {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  line-height: 1.4;
}

.stream-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
}

.uptime-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.uptime-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.uptime-label,
.uptime-value {
  margin: 0;
}

.uptime-label {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.uptime-value {
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.uptime-value-status {
  font-size: 0.96rem;
  line-height: 1.35;
}

.settings-panel {
  display: grid;
  gap: 24px;
}

.settings-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-grid {
  display: grid;
  gap: 14px;
}

.channel-stack {
  display: grid;
  gap: 16px;
}

.channel-config {
  display: grid;
  gap: 14px;
  padding: 14px 18px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.channel-config-summary {
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(360px, 1fr) 34px;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.channel-config-summary-main {
  display: grid;
  grid-template-columns: 72px minmax(180px, 1fr) 112px 132px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.channel-config-summary-main:hover,
.channel-config-summary-toggle:hover {
  background: transparent;
}

.channel-config-summary-main:focus-visible,
.channel-config-summary-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.78);
  outline-offset: 4px;
}

.channel-summary-key,
.channel-summary-name,
.channel-summary-url,
.channel-summary-url-wrap {
  min-width: 0;
}

.channel-summary-url-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.channel-summary-url-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.channel-summary-key {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.channel-summary-name {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.channel-summary-url {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(3, 5, 5, 0.42);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: text;
  cursor: text;
}

.channel-copy-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
}

.channel-copy-button[data-copied="true"] {
  border-color: rgba(107, 189, 86, 0.45);
  background: rgba(107, 189, 86, 0.18);
  color: #d8f0c9;
}

.channel-copy-button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.channel-copy-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.channel-config-summary-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
}

.channel-summary-chevron {
  position: relative;
  width: 12px;
  height: 12px;
}

.channel-summary-chevron::before,
.channel-summary-chevron::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  transition: transform 180ms ease;
}

.channel-summary-chevron::before {
  left: 0;
  transform: rotate(45deg);
}

.channel-summary-chevron::after {
  right: 0;
  transform: rotate(-45deg);
}

.channel-config.is-expanded .channel-summary-chevron::before {
  transform: rotate(-45deg);
}

.channel-config.is-expanded .channel-summary-chevron::after {
  transform: rotate(45deg);
}

.channel-config-details {
  display: grid;
  gap: 14px;
  padding-top: 6px;
}

.channel-config-details[hidden] {
  display: none !important;
}

.channel-mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(119, 197, 160, 0.34);
  background: rgba(119, 197, 160, 0.16);
  color: #b9f1dd;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.channel-mode-pill[data-mode="srt"] {
  border-color: rgba(110, 181, 232, 0.34);
  background: rgba(110, 181, 232, 0.16);
  color: #c4e7ff;
}

.channel-mode-pill[data-mode="disabled"] {
  border-color: rgba(160, 167, 178, 0.28);
  background: rgba(160, 167, 178, 0.14);
  color: #d3d8e1;
}

.channel-config-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.channel-title,
.channel-meta {
  margin: 0;
}

.channel-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.channel-meta {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.channel-config-grid {
  display: grid;
  gap: 12px;
}

.channel-notification-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.channel-url-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: start;
  gap: 10px;
}

.channel-detail-url {
  user-select: text;
  cursor: text;
}

.clips-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.clips-list {
  display: grid;
  gap: 10px;
}

.clip-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 100px 140px 84px 84px 112px auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.clip-name,
.clip-meta,
.clip-status,
.clip-upload-status {
  min-width: 0;
}

.clip-name {
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clip-meta {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
}

.clip-status {
  justify-self: start;
  padding: 5px 9px;
  border: 1px solid rgba(119, 197, 160, 0.34);
  border-radius: 999px;
  background: rgba(119, 197, 160, 0.14);
  color: #b9f1dd;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.clip-status[data-status="recording"] {
  border-color: rgba(232, 187, 110, 0.38);
  background: rgba(232, 187, 110, 0.16);
  color: #ffe0a8;
}

.clip-status[data-status="cloud"] {
  border-color: rgba(110, 181, 232, 0.34);
  background: rgba(110, 181, 232, 0.16);
  color: #c4e7ff;
}

.clip-upload-status {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.clip-upload-status[data-status="uploaded"] {
  color: #b9f1dd;
}

.clip-upload-status[data-status="failed"] {
  color: #ffd0d0;
}

.clip-upload-status[data-status="uploading"] {
  color: #ffe0a8;
}

.clip-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.clip-action-button {
  justify-self: end;
  min-height: 34px;
  padding: 7px 12px;
  text-decoration: none;
}

.clip-delete-button {
  border-color: rgba(235, 117, 117, 0.34);
  color: #ffd0d0;
}

.log-viewer-head,
.log-viewer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.log-viewer-controls {
  justify-content: flex-end;
}

.log-source-select {
  width: min(240px, 42vw);
}

.log-viewer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.log-viewer-output {
  min-height: 280px;
  max-height: 520px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(3, 5, 5, 0.58);
  color: #dfe8e4;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.npm-card-head,
.npm-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.npm-host-list {
  display: grid;
  gap: 10px;
}

.npm-host-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) 96px minmax(120px, 0.8fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.npm-host-domains,
.npm-host-meta,
.npm-host-state {
  min-width: 0;
}

.npm-host-domains {
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.npm-host-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.npm-host-state {
  justify-self: start;
  padding: 5px 9px;
  border: 1px solid rgba(119, 197, 160, 0.34);
  border-radius: 999px;
  background: rgba(119, 197, 160, 0.14);
  color: #b9f1dd;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.npm-host-state[data-enabled="false"] {
  border-color: rgba(160, 167, 178, 0.28);
  background: rgba(160, 167, 178, 0.14);
  color: #d3d8e1;
}

.npm-host-toggle {
  justify-self: end;
  min-height: 34px;
  padding: 7px 12px;
}

.core-settings-stack {
  display: grid;
  gap: 16px;
}

.core-config-card {
  gap: 18px;
}

.core-config-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.core-config-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.core-settings-section {
  display: grid;
  gap: 12px;
}

.core-settings-section-title {
  margin: 0;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.core-settings-checkboxes {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.settings-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(3, 5, 5, 0.48);
  color: var(--text);
  font-weight: 600;
}

.settings-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.settings-preview {
  display: block;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(3, 5, 5, 0.48);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-all;
}

.channel-ingest-status-wrap {
  display: grid;
  gap: 8px;
}

.channel-ingest-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.channel-config-summary-main .channel-ingest-status {
  width: 100%;
}

.settings-copy-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  min-width: 180px;
  max-width: min(calc(100vw - 32px), 320px);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(107, 189, 86, 0.35);
  background: rgba(18, 28, 20, 0.94);
  color: #e6f7dd;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.settings-copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.settings-copy-toast[data-state="error"] {
  border-color: rgba(214, 102, 102, 0.4);
  background: rgba(42, 19, 19, 0.94);
  color: #ffd1d1;
}

.channel-ingest-status[data-state="active"] {
  border-color: rgba(107, 189, 86, 0.45);
  background: rgba(107, 189, 86, 0.18);
  color: #d8f0c9;
}

.channel-ingest-status[data-state="waiting"],
.channel-ingest-status[data-state="starting"] {
  border-color: rgba(210, 190, 120, 0.4);
  background: rgba(210, 190, 120, 0.14);
  color: #efe1ad;
}

.channel-ingest-status[data-state="failed"],
.channel-ingest-status[data-state="error"] {
  border-color: rgba(214, 102, 102, 0.42);
  background: rgba(214, 102, 102, 0.14);
  color: #f2b3b3;
}

.channel-ingest-status[data-state="stopped"],
.channel-ingest-status[data-state="missing"] {
  border-color: rgba(160, 167, 178, 0.26);
  background: rgba(160, 167, 178, 0.12);
  color: #cbd1da;
}

.settings-label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.settings-help,
.settings-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.settings-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(3, 5, 5, 0.78);
  color: var(--text);
  font: inherit;
}

.settings-select {
  appearance: none;
}

.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;
}

.settings-textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

.user-list {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(255, 255, 255, 0.025);
}

.user-list-header,
.user-row {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 92px 20px 48px 48px 48px 20px 40px;
  column-gap: 8px;
  row-gap: 0;
  align-items: center;
  min-width: 592px;
}

.user-list-header {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
}

.user-row {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
}

.user-row:last-child {
  border-bottom: 0;
}

.user-list-header > span,
.user-list-header > button {
  display: grid;
  place-items: center;
}

.user-col-email {
  grid-column: 1;
}

.user-col-role {
  grid-column: 2;
}

.user-col-ch1 {
  grid-column: 4;
}

.user-col-ch2 {
  grid-column: 5;
}

.user-col-ch3 {
  grid-column: 6;
}

.user-col-action {
  grid-column: 8;
  justify-self: end;
  margin-left: auto;
}

.user-list-header .user-col-email {
  justify-items: start;
}

.user-header-add-button {
  justify-self: end;
}

.user-email-cell {
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-toggle-cell {
  display: grid;
  place-items: center;
}

.user-role-cell {
  display: flex;
  justify-content: center;
}

.user-toggle-cell input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.user-role-pill {
  min-width: 76px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.user-role-pill[data-role="disabled"] {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.34);
  color: #e2e8f0;
}

.user-role-pill[data-role="view"] {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.36);
  color: #93c5fd;
}

.user-role-pill[data-role="admin"] {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.34);
  color: #86efac;
}

.user-role-pill:hover {
  filter: brightness(1.06);
}

.user-role-pill:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.user-icon-button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}

.user-icon {
  width: 14px;
  height: 14px;
  display: block;
}

body.modal-open {
  overflow: hidden;
}

.user-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 5, 5, 0.72);
  backdrop-filter: blur(10px);
}

.user-modal-backdrop[hidden] {
  display: none;
}

.user-modal {
  width: min(100%, 440px);
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(18, 21, 21, 0.98), rgba(10, 12, 12, 0.96));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.user-modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.user-modal-title {
  margin: 6px 0 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.user-modal-actions {
  justify-content: flex-end;
}

.settings-input:focus {
  outline: 2px solid rgba(107, 189, 86, 0.35);
  outline-offset: 2px;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.user-actions {
  gap: 10px;
  justify-content: space-between;
}

.settings-live-status {
  margin-left: auto;
  text-align: right;
}

.settings-live-status[data-state="saving"],
.settings-live-status[data-state="pending"] {
  color: var(--accent);
}

.settings-live-status[data-state="error"] {
  color: #f0a7a7;
}

.primary-button {
  border: 1px solid rgba(107, 189, 86, 0.5);
  background: linear-gradient(180deg, #72c25a, #58a947);
  color: #f5f8f1;
  padding: 12px 18px;
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: filter 160ms ease, transform 160ms ease;
}

.primary-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.settings-message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-message.success {
  background: rgba(107, 189, 86, 0.12);
  border-color: rgba(107, 189, 86, 0.3);
}

.settings-message.error {
  background: rgba(167, 86, 86, 0.12);
  border-color: rgba(167, 86, 86, 0.26);
}

.action-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.action-card {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 180ms ease, border-color 180ms ease;
}

.action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(107, 189, 86, 0.38);
  text-decoration: none;
}

.action-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 720px) {
  .login-shell,
  .dashboard-shell {
    padding: 16px;
  }

  .dashboard-shell {
    padding: 0 0 24px;
  }

  .page-banner {
    padding: 14px 16px 6px;
  }

  .page-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .page-banner-brand {
    width: 100%;
  }

  .page-banner .brand-mark.compact {
    white-space: normal;
    font-size: clamp(2.2rem, 9vw, 3.4rem);
  }

  .dashboard-stage {
    width: min(calc(100% - 32px), 1400px);
    padding-top: 6px;
  }

  .panel,
  .dashboard-panel {
    padding: 18px 22px 22px;
    border-radius: 24px;
  }

  .dashboard-head,
  .dashboard-controls,
  .player-meta,
  .identity-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-pill,
  .account-actions {
    width: 100%;
  }

  .account-actions {
    margin-left: 0;
  }

  .identity-inline {
    width: 100%;
  }

  .channel-config-summary {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .channel-config-summary-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
  }

  .channel-config-summary-main .channel-mode-pill,
  .channel-config-summary-main .channel-ingest-status {
    width: fit-content;
  }

  .settings-copy-toast {
    right: 16px;
    bottom: 16px;
  }

  .channel-summary-url-wrap {
    grid-column: 1 / -1;
  }

  .channel-config-summary-toggle {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
  }

  .channel-mode-pill,
  .channel-ingest-status {
    width: fit-content;
  }

  .clips-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .clip-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .clip-actions {
    justify-content: flex-start;
  }

  .clip-action-button {
    justify-self: start;
  }

  .log-viewer-head,
  .log-viewer-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .log-source-select {
    width: 100%;
  }

  .npm-card-head,
  .npm-status-line {
    align-items: stretch;
    flex-direction: column;
  }

  .npm-host-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .npm-host-toggle {
    justify-self: start;
  }

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

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

  .user-list-header {
    display: none;
  }
}