:root {
  --bg: #0f1218;
  --bg2: #161b24;
  --bg3: #1e2531;
  --border: #2a3342;
  --text: #e8eaf0;
  --muted: #8b93a7;
  --accent: #3d8bfd;
  --accent2: #2f6fd0;
  --ok: #2fbf71;
  --warn: #e5a83b;
  --err: #e05252;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { font-weight: 600; }
h2 { font-size: 20px; margin: 0 0 16px; }
h3 { font-size: 15px; margin: 0 0 10px; }

/* Layout */
#layout { display: flex; min-height: 100vh; }
#sidebar {
  width: 220px; flex-shrink: 0; background: var(--bg2);
  border-right: 1px solid var(--border); padding: 16px 0;
  display: flex; flex-direction: column; position: sticky; top: 0;
  height: 100vh;
}
#sidebar .brand {
  font-size: 16px; font-weight: 700; padding: 4px 20px 16px;
  border-bottom: 1px solid var(--border); margin-bottom: 10px;
}
#sidebar .brand span { color: var(--accent); }
/* YourSide logo, served from the public site so there is one copy to keep
   current; it simply collapses if the browser cannot reach it */
.brand-logo { display: block; margin-bottom: 10px; }
.brand-logo img { max-width: 130px; width: 100%; height: auto; display: block; }
.login-box .brand-logo { margin: 0 auto 16px; text-align: center; }
.login-box .brand-logo img { max-width: 170px; margin: 0 auto; }
#sidebar nav { flex: 1; }
#sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; color: var(--muted); font-weight: 500;
}
#sidebar nav .nav-head {
  padding: 16px 20px 5px; font-size: 10px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
  opacity: .65;
}
#sidebar nav .nav-head:first-child { padding-top: 2px; }
#sidebar nav a:hover { color: var(--text); background: var(--bg3); }
#sidebar nav a.active {
  color: var(--text); background: var(--bg3);
  border-left: 3px solid var(--accent); padding-left: 17px;
}
#sidebar .foot { padding: 12px 20px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 12px; }
#main { flex: 1; padding: 24px 28px; min-width: 0; }

/* Cards, tables */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px;
}
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 20px; }
.stat { text-align: left; }
.stat .num { font-size: 26px; font-weight: 700; }
.stat .lbl { color: var(--muted); font-size: 12px; text-transform: uppercase;
  letter-spacing: .05em; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase;
  letter-spacing: .04em; font-weight: 600; }
tr:hover td { background: rgba(255,255,255,.02); }

/* Controls */
button, .btn {
  background: var(--bg3); color: var(--text); border: 1px solid var(--border);
  border-radius: 7px; padding: 6px 14px; cursor: pointer; font: inherit;
  font-size: 13px;
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { background: var(--accent2); }
button.danger { color: var(--err); }
button.danger:hover { border-color: var(--err); }
button.small { padding: 3px 10px; font-size: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 7px; padding: 7px 10px; font: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: 12px;
  min-height: 140px; }
label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
label > input, label > select, label > textarea { margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px;
  flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 260px; }
.toolbar .spacer { flex: 1; }

/* Badges / status */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 6px; vertical-align: 1px; }
.dot.on { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.dot.off { background: var(--err); }
.dot.unk { background: var(--muted); }
.badge {
  display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 11px;
  font-weight: 600; border: 1px solid var(--border); color: var(--muted);
}
.badge.ok { color: var(--ok); border-color: var(--ok); }
.badge.warn { color: var(--warn); border-color: var(--warn); }
.badge.err { color: var(--err); border-color: var(--err); }
.badge.acc { color: var(--accent); border-color: var(--accent); }
.tag {
  display: inline-block; background: var(--bg3); border-radius: 20px;
  padding: 1px 10px; font-size: 11px; color: var(--accent); margin: 1px 3px 1px 0;
  cursor: pointer;
}
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.group-title {
  margin: 22px 0 8px; font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Modal */
#modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none;
  align-items: flex-start; justify-content: center; z-index: 50;
  overflow-y: auto; padding: 40px 16px;
}
#modal-backdrop.open { display: flex; }
#modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; width: 100%; max-width: 640px;
}
#modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 10px; }

/* Toasts */
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast { background: var(--bg3); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 14px;
  font-size: 13px; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.toast.err { border-left-color: var(--err); }
.toast.ok { border-left-color: var(--ok); }

/* Login page */
.login-wrap { min-height: 100vh; display: flex; align-items: center;
  justify-content: center; }
.login-box { width: 100%; max-width: 400px; }
.login-box .card { padding: 28px; }
.login-box h1 { font-size: 20px; margin: 0 0 4px; }
.login-box .sub { color: var(--muted); margin-bottom: 20px; font-size: 13px; }
.qr-holder { background: #fff0; text-align: center; margin: 10px 0; }
.qr-holder svg { max-width: 200px; }
.error-line { color: var(--err); font-size: 13px; min-height: 18px; margin: 6px 0; }

details.enc-detail { margin-top: 6px; }
details.enc-detail summary { cursor: pointer; color: var(--muted); font-size: 12px; }
pre.json { background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; padding: 10px; font-size: 11px; overflow: auto;
  max-height: 340px; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px; }
.enc-row { display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-top: 1px solid var(--border); }
.enc-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.unit-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  flex-wrap: wrap; }
.unit-head .title { font-weight: 600; font-size: 15px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest-row { padding-left: 24px !important; border-top: none !important;
  font-size: 12.5px; }
.dest-row .badge { font-size: 10px; }

/* Generated settings forms */
.sf-wrap { max-height: 420px; overflow: auto; padding-right: 6px; }
.sf-group { border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px 4px; margin: 0 0 10px; }
.sf-group legend { color: var(--accent); font-size: 12px; font-weight: 600;
  text-transform: capitalize; padding: 0 6px; }
.sf-row { display: grid; grid-template-columns: 180px 1fr; gap: 10px;
  align-items: center; margin-bottom: 6px; }
.sf-row label { margin: 0; font-size: 12.5px; color: var(--muted);
  text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; }
.sf-row input[type=checkbox] { width: auto; justify-self: start; }
.sf-note { font-size: 12px; margin-bottom: 6px; }

/* Toggle switches */
.switch { position: relative; display: inline-block; width: 36px; height: 20px;
  flex-shrink: 0; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .slider { position: absolute; cursor: pointer; inset: 0;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 20px;
  transition: background .15s, border-color .15s; }
.switch .slider::before { content: ""; position: absolute; height: 14px;
  width: 14px; left: 2px; top: 2px; background: var(--muted);
  border-radius: 50%; transition: transform .15s, background .15s; }
.switch input:checked + .slider { background: var(--ok); border-color: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 2px var(--accent); }

/* Live encodes on the dashboard */
.live-grid { display: grid; gap: 14px; margin-bottom: 4px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
/* overflow stays visible so the graph-color popover can extend past a
   collapsed card; the thumb clips its own top corners instead. */
.live-card { padding: 0; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--bg);
  border-bottom: 1px solid var(--border); overflow: hidden;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-fallback { position: absolute; inset: 0; align-items: center;
  justify-content: center; color: var(--muted); font-size: 12px;
  letter-spacing: .05em; text-transform: uppercase; }
.thumb-graph { position: absolute; left: 0; right: 0; bottom: 0; width: 100%;
  height: 38%; pointer-events: none; }
/* Card title row: [▸] [dot] title … badges | graph + order/minimize ¦ switch
   The small per-card controls share one icon-button look. */
.card-ctls { display: inline-flex; gap: 4px; }
.card-ctls button, .graph-menu > button, .expand-btn {
  width: 26px; height: 22px; padding: 0; line-height: 20px; text-align: center;
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: var(--muted); font-size: 11px; flex-shrink: 0; }
.card-ctls button:hover, .graph-menu > button:hover, .expand-btn:hover {
  color: var(--text); background: var(--bg3); border-color: var(--border); }
.expand-btn { width: 20px; }
.head-ctls { display: inline-flex; align-items: center; gap: 8px;
  margin-left: auto; flex-shrink: 0; }
.ctl-sep { width: 1px; height: 16px; background: var(--border); }
.thumb-rate { position: absolute; right: 8px; bottom: 8px;
  background: rgba(0,0,0,.65); border-radius: 6px; padding: 2px 8px;
  font-size: 12px; font-weight: 600; color: var(--muted); }
.thumb-rate.ok { color: var(--ok); }
.thumb-sims { position: absolute; top: 8px; right: 8px; display: flex;
  gap: 4px; }
.thumb-sims .sim { display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0,0,0,.65); border-radius: 6px; padding: 3px 6px;
  cursor: default; }
.thumb-sims svg { width: 15px; height: 10px; display: block; }
.thumb-sims rect { fill: rgba(255,255,255,.25); }
.thumb-sims .sim.good rect.on { fill: var(--ok); }
.thumb-sims .sim.mid rect.on { fill: var(--warn); }
.thumb-sims .sim.low rect.on { fill: var(--err); }
.thumb-sims .net { font-size: 9px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }
.live-body { padding: 10px 14px 12px; }
.live-dest { display: flex; align-items: center; gap: 7px; font-size: 12.5px;
  padding: 3px 0; }
.live-issue { font-size: 12px; color: var(--muted); margin-top: 6px;
  display: flex; gap: 6px; align-items: baseline; }
.live-issue.error { color: var(--err); }
.thumb.ok { border: 6px solid var(--ok); }
.thumb.err { border: 6px solid var(--err); }

/* SRT gateway view — relay cards take the place of the video thumbnail
   with a flow panel: input on top, outputs below. */
.gw-flow {
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 5px;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  border: 4px solid transparent;
}
/* green only when bytes are actually moving; a relay that is up and waiting
   for a sender gets a neutral border, not an alarm */
.gw-flow.ok { border-color: var(--ok); }
.gw-flow.idle { border-color: var(--border); }
.gw-flow.err { border-color: var(--err); }
.gw-arrow { color: var(--muted); font-size: 12px; line-height: 1; margin: 1px 0 1px 6px; }
.gw-addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 190px; }
.gw-stats { display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.gw-meter { display: flex; align-items: center; gap: 8px; font-size: 12px;
  margin-top: 3px; }
.gw-meter > div:first-child { width: 30px; }
.gw-meter .mono { width: 38px; text-align: right; }
.gw-bar { flex: 1; height: 6px; background: var(--bg3); border-radius: 3px;
  overflow: hidden; }
.gw-bar span { display: block; height: 100%; background: var(--accent); }
.gw-spark { position: relative; height: 34px; margin-top: 4px;
  background: var(--bg); border-radius: 4px; overflow: hidden; }
.gw-spark .thumb-graph { height: 100%; }
/* Per-endpoint statistics, revealed by the card's ▸ button */
.gw-stats-detail { margin-top: 8px; display: flex; flex-direction: column;
  gap: 10px; }
.gw-stat { border-top: 1px solid var(--border); padding-top: 8px; }
.gw-stat-head { display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; }
.gw-stat-head .lbl { font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); }
.gw-rate { margin-left: auto; }
.gw-rate.ok { color: var(--ok); }
.gw-stat-foot { font-size: 11.5px; margin-top: 3px; word-break: break-word; }
/* passphrase + its Generate button; shown in clear because the far end has
   to be told it anyway */
.pass-row { display: flex; gap: 6px; align-items: center; }
.pass-row input { flex: 1; min-width: 0; font-family: ui-monospace,
  SFMono-Regular, Menlo, Consolas, monospace; }
.pass-row button { flex-shrink: 0; }

/* Inline icons + the e-mail button on the schedule page */
.ico { width: 15px; height: 15px; display: block; }
.ico-wrap { display: inline-flex; color: var(--muted); flex-shrink: 0; }
.ico-wrap.acc { color: var(--accent); }
.name-cell { display: inline-flex; align-items: center; gap: 7px;
  flex-wrap: wrap; }
.mail-btn { display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 1px 7px 1px 5px; font-size: 11px;
  cursor: pointer; }
.mail-btn:hover { color: var(--text); border-color: var(--accent); }
.mail-btn.bad { color: var(--err); border-color: var(--err); }

.mail-list { display: flex; flex-direction: column; gap: 10px;
  max-height: 60vh; overflow-y: auto; }
.mail-item { border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 10px; }
.mail-head { display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; color: var(--text); cursor: pointer;
  text-align: left; padding: 0; font-size: 13px; }
.mail-head:hover .mail-subj { color: var(--accent); }
.mail-when { color: var(--muted); font-size: 11.5px; flex-shrink: 0; }
.mail-subj { flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.mail-meta { font-size: 11.5px; margin-top: 3px; }
.err-text { color: var(--err); }
.mail-frame { width: 100%; height: 320px; border: 1px solid var(--border);
  border-radius: 6px; background: #fff; margin-top: 8px; }
.live-input { display: flex; align-items: center; gap: 7px; font-size: 12.5px;
  padding: 2px 0 5px; }
.enc-mode { cursor: pointer; border-radius: 6px; }
.enc-mode:hover { background: var(--bg); }
.enc-mode .edit-hint { color: var(--muted); font-size: 11px; opacity: 0;
  margin-left: auto; }
.enc-mode:hover .edit-hint { opacity: 1; }
.live-input .lbl { font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); }
.live-input.na b { color: var(--muted); }
.dest-name { max-width: 40%; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }

/* Routing page (patch panel) */
#rt-wrap { position: relative; }
#rt-svg { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.rt-grid { display: grid; gap: 28px 90px;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.rt-unit { margin-bottom: 0; padding: 12px 14px; }
.rt-addr { font-size: 11px; margin: 0 0 10px; }
.rt-cols { display: flex; gap: 14px; }
.rt-col { flex: 1; min-width: 0; }
.rt-col-h { font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px; }
.rt-in, .rt-enc { display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 7px; padding: 5px 8px;
  margin-bottom: 6px; font-size: 12.5px; background: var(--bg3); }
.rt-enc { cursor: grab; }
.rt-enc.dragging { opacity: .45; }
.rt-enc .grip { margin-left: auto; color: var(--muted); font-size: 10px; }
.rt-in.drop { border-color: var(--accent); background: rgba(61,139,253,.18);
  box-shadow: 0 0 0 2px var(--accent); }
.rt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.rt-thumb { width: 56px; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 4px; background: var(--bg); flex-shrink: 0;
  display: block; }
.rt-thumb.none { visibility: hidden; }
.rt-link path { fill: none; stroke-width: 2.5;
  pointer-events: visibleStroke; cursor: pointer; }
.rt-link circle { pointer-events: auto; cursor: pointer; }
.rt-link.up path { stroke: var(--ok); }
.rt-link.up circle { fill: var(--ok); }
.rt-link.down path { stroke: var(--err); }
.rt-link.down circle { fill: var(--err); }
.rt-link.pend path { stroke: var(--warn); stroke-dasharray: 7 5; }
.rt-link.pend circle { fill: var(--warn); }
.rt-link:hover path { stroke-width: 4.5; }
.rt-key { font-weight: 700; }
.rt-key.up { color: var(--ok); }
.rt-key.pend { color: var(--warn); }
.rt-key.down { color: var(--err); }
.rt-pair { margin-bottom: 12px; line-height: 1.7; }
.rt-arrow { color: var(--muted); padding: 0 6px; }

/* per-channel bitrate graph on/off + color menu */
.graph-menu { position: relative; display: inline-flex; }
.graph-menu > button { font-size: 12px; }
.graph-pop { display: none; position: absolute; top: 22px; right: 0;
  z-index: 30; background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; box-shadow: 0 6px 18px rgba(0,0,0,.35);
  min-width: 148px; }
.graph-pop.open { display: block; }
.graph-show { display: flex; align-items: center; gap: 6px; font-size: 12px;
  white-space: nowrap; margin-bottom: 7px; cursor: pointer; }
.swatches { display: grid; grid-template-columns: repeat(5, 22px); gap: 6px; }
.swatch { width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border); cursor: pointer; padding: 0; }
.swatch:hover { transform: scale(1.12); }
.swatch.sel { border-color: var(--text); box-shadow: 0 0 0 2px var(--accent); }

/* Schedule calendar */
.cal-card { padding: 0; overflow: hidden; }
.cal-head { display: grid; grid-template-columns: 46px repeat(7, 1fr);
  border-bottom: 1px solid var(--border); }
.cal-day-head { padding: 8px 6px; font-size: 12px; font-weight: 600;
  color: var(--muted); text-align: center;
  border-left: 1px solid var(--border); }
.cal-day-head.today { color: var(--accent); }
.cal-scroll { max-height: 560px; overflow-y: auto; position: relative; }
.cal-body { display: grid; grid-template-columns: 46px repeat(7, 1fr);
  position: relative; }
.cal-gutter { position: relative; }
.cal-hour { position: absolute; right: 6px; font-size: 10px;
  color: var(--muted); transform: translateY(-6px); }
.cal-col { position: relative; border-left: 1px solid var(--border);
  cursor: cell;
  background-image: repeating-linear-gradient(to bottom,
    transparent 0, transparent 33px, var(--border) 33px, var(--border) 34px);
}
.cal-col.today { background-color: rgba(61, 139, 253, .05); }
.cal-block { position: absolute; left: 3px; right: 3px;
  background: var(--bg3); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 6px;
  padding: 3px 6px; font-size: 11px; line-height: 1.3; overflow: hidden;
  cursor: pointer; z-index: 2; }
.cal-block:hover { border-color: var(--accent); z-index: 3; }

/* --- user management ------------------------------------------------- */
.check-line { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.check-line input { width: auto; margin: 0; }
.scope-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.scope-row select, .scope-row input { flex: 1; min-width: 0; margin: 0; }
.scope-row button { white-space: nowrap; }
.extend-btns { display: inline-flex; gap: 4px; margin-right: 6px; }
.modal-actions .spacer { flex: 1; }

/* --- virtual SRT endpoints in the routing view ------------------------ */
.rt-virtual { border-style: dashed; }
.rt-thumb.vthumb { display: inline-flex; align-items: center;
  justify-content: center; font-size: 10px; font-weight: 700;
  color: var(--accent); letter-spacing: .05em; }
.rt-thumb.none.vthumb { visibility: visible; background: var(--bg3);
  border: 1px dashed var(--border); border-radius: 4px; }

/* --- channel name above the preview (MCR outputs + inputs) ------------ */
/* Sits directly above the green/red health border so an operator can read
   the channel without looking under the picture. */
.live-title {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px; background: var(--bg3);
  border-bottom: 1px solid var(--border);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  font-weight: 600; font-size: 13.5px; color: var(--text);
  white-space: nowrap; overflow: hidden;
}
.live-title:hover { color: var(--accent); }
.live-title .dot { margin: 0; flex-shrink: 0; }
.live-title-unit {
  margin-left: auto; padding-left: 10px;
  font-weight: 500; font-size: 11.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis;
}
/* the title bar now owns the card's rounded top corners */
.live-card .thumb { border-radius: 0; }
.live-title-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
