/* ============================================================
   beanplayer — стили каталога
   Лаконичный светлый дизайн: чёрный текст на белом, скругления,
   акценты — зелёный (основной) и красный (опасные действия).
   ============================================================ */

:root {
  --bg:          #ffffff;
  --surface-2:   #f5f6f7;   /* hover / выбранный пункт */
  --surface-3:   #eef0f1;
  --border:      #ececee;
  --border-2:    #e3e5e7;

  --text:        #16181d;   /* основной текст (почти чёрный) */
  --text-2:      #6b7280;   /* вторичный */
  --text-3:      #9aa0a8;   /* приглушённый */

  --green:       #16c089;   /* основной акцент (как у kinescope) */
  --green-600:   #11a877;
  --green-50:    #e7f8f1;

  --red:         #e5484d;
  --red-50:      #fdecec;

  --radius:      12px;
  --radius-sm:   8px;
  --radius-pill: 999px;

  --shadow-sm:   0 1px 2px rgba(16,24,40,.04);
  --shadow-md:   0 6px 24px rgba(16,24,40,.08);
  --shadow-pop:  0 8px 30px rgba(16,24,40,.12);

  --sidebar-w:   264px;
  --font: "Golos Text", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--green-50); }

/* ---------- Раскладка приложения ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
}
.app.sidebar-collapsed { grid-template-columns: 0 1fr; }

/* ---------- Боковая панель ---------- */
.sidebar {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--bg);
}
.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 14px;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--green);
  display: grid; place-items: center;
  color: #fff; flex: none;
}
.brand-mark svg { width: 16px; height: 16px; }
.sidebar__brand h1 { font-size: 21px; font-weight: 700; margin: 0; letter-spacing: -.01em; }

.sidebar__section {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 8px;
}
.sidebar__section span { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--text-3); text-transform: uppercase; }
.sidebar__section .icon-btns { display: flex; gap: 2px; }

.icon-btn {
  width: 30px; height: 30px; border-radius: 8px;
  border: none; background: transparent; color: var(--text-2);
  display: grid; place-items: center;
  transition: background .12s, color .12s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

.projects { list-style: none; margin: 0; padding: 0 12px; overflow-y: auto; flex: 1; }
.projects li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 15px;
  cursor: pointer; transition: background .12s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.projects li:hover { background: var(--surface-2); }
.projects li.active { background: var(--surface-2); font-weight: 600; }
.projects li .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex: none; }
.projects li.active .dot { background: var(--green); }
.projects li .proj-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projects li .proj-lock { flex: none; display: flex; color: var(--green); }
.projects li .proj-lock svg { width: 13px; height: 13px; }
.proj-menu { flex: none; opacity: 0; border: none; background: none; cursor: pointer; color: var(--text-2); padding: 3px; border-radius: 6px; display: flex; }
.projects li:hover .proj-menu, .projects li.active .proj-menu { opacity: .75; }
.proj-menu:hover { background: var(--surface-3); color: var(--text); opacity: 1; }
.proj-menu svg { width: 16px; height: 16px; }

.sidebar__footer {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none;
}
.sidebar__footer .who { min-width: 0; }
.sidebar__footer .who b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__footer .who small { color: var(--text-3); font-size: 12px; }
.sidebar__footer .logout { margin-left: auto; }

/* ---------- Правая часть ---------- */
.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
}
.page-title { font-size: 21px; font-weight: 700; margin: 0; letter-spacing: -.02em; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; flex: none; }
.section-actions { display: flex; justify-content: flex-end; margin-bottom: 16px; min-height: 1px; }
.search {
  flex: 0 1 440px; min-width: 120px;
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  transition: border-color .12s, background .12s;
}
.search:focus-within { background: #fff; border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.search svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.search input { border: none; outline: none; background: transparent; width: 100%; font: inherit; color: var(--text); }
.search input::placeholder { color: var(--text-3); }
.topbar .spacer { flex: 1; }

/* ---------- Переключатель Видео/Стримы ---------- */
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--radius-pill); padding: 3px; gap: 2px; }
.seg-btn {
  border: none; background: none; font: inherit; font-weight: 600; font-size: 14px;
  color: var(--text-2); padding: 7px 16px; border-radius: var(--radius-pill); cursor: pointer; transition: all .12s;
}
.seg-btn.active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.seg-btn:not(.active):hover { color: var(--text); }

/* ---------- Карточки стримов ---------- */
.stream-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px;
}
.stream-card__top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.stream-card__top h3 { font-size: 17px; font-weight: 600; margin: 0; }
.stream-card__top .meta { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.stream-card__top .spacer { flex: 1; }
.kv { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px 12px; align-items: center; }
.kv .k { color: var(--text-2); font-size: 13px; }
.kv .v {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--text);
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 7px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kv .copy { padding: 7px 10px; font-size: 13px; }
.stream-card__actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.stream-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; margin-right: 6px; vertical-align: middle; }
select.prompt__input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }

/* окно создания стрима */
.stream-modal { max-width: 470px; }
.stream-modal__head { display: flex; gap: 13px; align-items: center; margin-bottom: 20px; }
.stream-modal__icon { width: 42px; height: 42px; border-radius: 11px; background: var(--green-50); color: var(--green-600); display: grid; place-items: center; flex: none; }
.stream-modal__icon svg { width: 22px; height: 22px; }
.stream-modal__title { font-size: 18px; font-weight: 600; }
.stream-modal__sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.stream-modal .field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }

/* строка ключа с глазиком */
.keyrow { display: flex; align-items: center; gap: 6px; }
.keyrow .keytext { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; letter-spacing: 1px; }
.keyrow .eye { border: none; background: none; color: var(--text-3); cursor: pointer; padding: 2px; display: grid; place-items: center; flex: none; }
.keyrow .eye:hover { color: var(--text); }
.keyrow .eye svg { width: 17px; height: 17px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-2); background: #fff; color: var(--text);
  padding: 9px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  transition: background .12s, border-color .12s, transform .04s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-600); border-color: var(--green-600); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--danger { color: var(--red); border-color: transparent; }
.btn--danger:hover { background: var(--red-50); }

/* ---------- Контент проекта ---------- */
.content { flex: 1; overflow-y: auto; padding: 26px 28px 40px; }
.content__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.content__head h2 { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.content__head .spacer { flex: 1; }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.tab {
  padding: 10px 0; font-size: 15px; font-weight: 600; color: var(--text-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; border-top: none; border-left: none; border-right: none;
}
.tab.active { color: var(--text); border-bottom-color: var(--green); }

.meta-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 2px; color: var(--text-2); font-size: 14px;
}
.meta-row .count b { color: var(--text); font-weight: 600; }
.meta-row .spacer { flex: 1; }
.sort {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  padding: 7px 11px; font-size: 14px; font-weight: 500; color: var(--text);
}
.sort:hover { background: var(--surface-2); }
.sort svg { width: 14px; height: 14px; color: var(--text-3); }

/* ---------- Таблица медиа ---------- */
.media { width: 100%; border-collapse: collapse; }
.media thead th {
  text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--text-3); text-transform: uppercase;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.media thead th.num { text-align: right; }
.media tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; cursor: pointer; }
.media tbody tr:hover { background: var(--surface-2); }
.media td { padding: 11px 12px; vertical-align: middle; font-size: 14px; color: var(--text-2); }
.media td.num { text-align: right; }

.cell-name { display: flex; align-items: center; gap: 14px; min-width: 0; }
.thumb {
  width: 72px; height: 41px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, #1f2430, #2c3340);
  position: relative; overflow: hidden; display: block;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.thumb .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 18px; height: 18px; color: rgba(255,255,255,.85); }
.thumb .dur {
  position: absolute; right: 4px; bottom: 4px; z-index: 2;
  background: rgba(0,0,0,.72); color: #fff; font-size: 11px;
  padding: 1px 5px; border-radius: 4px; line-height: 1.4; font-variant-numeric: tabular-nums;
}
.name-text { min-width: 0; }
.name-text .title { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-text .sub { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }

.views { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; color: var(--text-2); font-variant-numeric: tabular-nums; }
.views svg { width: 15px; height: 15px; color: var(--text-3); }

.row-menu { width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; color: var(--text-3); display: grid; place-items: center; }
.media tbody tr:hover .row-menu { color: var(--text); }
.row-menu:hover { background: var(--surface-3); }

/* ---------- Состояния ---------- */
.empty, .loading {
  text-align: center; color: var(--text-3); padding: 70px 20px; font-size: 15px;
}
.empty svg { width: 40px; height: 40px; opacity: .5; margin-bottom: 12px; }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--surface-3); border-top-color: var(--green);
  animation: spin .7s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 11px 18px; border-radius: var(--radius-sm);
  font-size: 14px; box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Меню действий по видео ---------- */
.ctx-menu {
  position: fixed; z-index: 60; min-width: 248px;
  background: #fff; border: 1px solid var(--border-2);
  border-radius: var(--radius); box-shadow: var(--shadow-pop);
  padding: 6px; font-size: 14px;
}
.ctx-menu[hidden] { display: none; }
.ctx-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: none; background: none; text-align: left; color: var(--text);
  padding: 9px 10px; border-radius: var(--radius-sm); font: inherit; cursor: pointer;
}
.ctx-menu button:hover { background: var(--surface-2); }
.ctx-menu button .ic { width: 18px; text-align: center; color: var(--text-3); flex: none; }
.ctx-menu button.primary { color: var(--green-600); font-weight: 600; }
.ctx-menu button.primary .ic { color: var(--green); }
.ctx-menu button.danger { color: var(--red); }
.ctx-menu button.danger:hover { background: var(--red-50); }
.ctx-menu .sep { height: 1px; background: var(--border); margin: 5px 4px; }

.trash-link {
  display: flex; align-items: center; gap: 10px; margin: 4px 12px 8px;
  padding: 9px 12px; border: none; background: none; border-radius: var(--radius-sm);
  color: var(--text-2); font: inherit; font-size: 15px; cursor: pointer; text-align: left;
}
.trash-link:hover { background: var(--surface-2); color: var(--text); }
.trash-link svg { width: 18px; height: 18px; }

/* ---------- Модальный плеер ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__box {
  position: relative; width: 100%; max-width: 1000px;
  background: #0c0d10; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-pop); animation: pop .16s ease;
}
@keyframes pop { from { transform: scale(.98); opacity: .6; } to { transform: scale(1); opacity: 1; } }
.modal__head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #111317; }
.modal__title { color: #f1f1f3; font-weight: 600; font-size: 15px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.modal__actions .btn { background: #1c1f24; border-color: #2a2e35; color: #e8e8ea; padding: 7px 11px; }
.modal__actions .btn:hover { background: #262a31; }
.modal__actions .icon-btn { color: #b9bbc0; }
.modal__actions .icon-btn:hover { background: #262a31; color: #fff; }
.modal__frame { position: relative; width: 100%; padding-top: 56.25%; background: #000; }
.modal__frame iframe, .modal__frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }

/* ---------- Загрузка файлов ---------- */
.uploads { display: flex; flex-direction: column; gap: 8px; }
.uploads:not(:empty) { margin-bottom: 10px; }
.up-item {
  display: flex; align-items: center; gap: 12px; font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 12px;
}
.up-item .up-name { flex: 1; min-width: 60px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.up-meta { flex: none; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12px; }
.up-bar { height: 6px; width: 160px; background: var(--surface-3); border-radius: 3px; overflow: hidden; flex: none; }
.up-fill { height: 100%; width: 0; border-radius: 3px; transition: width .15s linear;
  background-color: var(--green);
  background-image: linear-gradient(45deg, rgba(255,255,255,.28) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.28) 50%, rgba(255,255,255,.28) 75%, transparent 75%);
  background-size: 22px 22px;
}
.up-item.active .up-fill { animation: up-stripes 0.7s linear infinite; }   /* видимое движение полос */
@keyframes up-stripes { from { background-position: 0 0; } to { background-position: 22px 0; } }
.up-item.queued { opacity: .7; }
.up-item.queued .up-bar { opacity: .5; }
.up-item.done { border-color: #bfe8d6; background: var(--green-50); }
.up-item.done .up-fill { background-image: none; background-color: var(--green-600); }
.up-item.done .up-pct { color: var(--green-600); }
.up-pct { color: var(--text-2); font-variant-numeric: tabular-nums; flex: none; min-width: 38px; text-align: right; }
.up-cancel {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--surface-3); color: var(--text-2); font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.up-cancel:hover { background: var(--red-50); color: var(--red); }
.up-item.error { border-color: #f3c0c1; background: var(--red-50); }
.up-item.error .up-name { color: var(--red); }

/* ---------- Диалог ввода (папка/переименование) ---------- */
.prompt .prompt__box {
  position: relative; width: 100%; max-width: 420px;
  background: #fff; border-radius: 14px; padding: 22px; box-shadow: var(--shadow-pop);
  animation: pop .16s ease;
}
.prompt__title { font-weight: 600; font-size: 16px; margin-bottom: 12px; }
.prompt__input {
  width: 100%; padding: 11px 13px; font: inherit; color: var(--text);
  border: 1px solid var(--border-2); border-radius: var(--radius-sm); outline: none;
}
.prompt__input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-50); }
.prompt__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
@media (max-width: 760px) {
  .modal__actions .btn span { display: none; }
}

/* ---------- Страница входа ---------- */
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 500px at 50% -10%, var(--green-50), transparent 60%),
    var(--bg);
}
.auth__card {
  width: 100%; max-width: 380px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 18px; padding: 34px 30px;
  box-shadow: var(--shadow-md);
}
.auth__brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.auth__brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.auth__brand .brand-mark svg { width: 19px; height: 19px; }
.auth__brand b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.auth h2 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
.auth p.sub { margin: 0 0 22px; color: var(--text-2); font-size: 14px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 13px; font: inherit;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm); background: #fff; color: var(--text);
  outline: none; transition: border-color .12s, box-shadow .12s;
}
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-50); }
.auth .btn--primary { width: 100%; justify-content: center; padding: 12px; font-size: 15px; margin-top: 4px; }

.alert {
  background: var(--red-50); color: var(--red); border: 1px solid #f6cccd;
  padding: 10px 13px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px;
}
.auth__foot { margin-top: 18px; text-align: center; color: var(--text-3); font-size: 12.5px; }

@media (max-width: 760px) {
  :root { --sidebar-w: 0px; }
  .app { grid-template-columns: 0 1fr; }
  .sidebar { position: fixed; z-index: 40; width: 264px; height: 100%; box-shadow: var(--shadow-pop); transform: translateX(-100%); transition: transform .2s; }
  .app.sidebar-open .sidebar { transform: translateX(0); }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .media .col-author, .media .col-views { display: none; }
}

.prompt__box, .modal__box { background: #fff; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal .prompt__box { position: relative; z-index: 1; width: 100%; border-radius: 14px; padding: 22px; box-shadow: var(--shadow-pop); animation: pop .16s ease; }
/* окно «Новый стрим» — без затемнения фона */
#streamModal .modal__backdrop { background: transparent; }
#streamModal .prompt__box { box-shadow: 0 18px 50px rgba(0,0,0,.22); border: 1px solid var(--border); }

/* кнопки управления эфиром */
.btn--live { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.btn--live:hover { background: var(--green-600); }
.btn--stop { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn--stop:hover { filter: brightness(.94); }
.lvb { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: var(--radius-pill); }
.lvb.on { background: rgba(255,59,48,.12); color: #e0352b; }
.lvb.on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 0 rgba(255,59,48,.6); animation: lvp 1.6s infinite; }
@keyframes lvp { 0%{box-shadow:0 0 0 0 rgba(255,59,48,.5)} 70%{box-shadow:0 0 0 6px rgba(255,59,48,0)} 100%{box-shadow:0 0 0 0 rgba(255,59,48,0)} }
.lvb.wait { background: var(--surface-2); color: var(--text-2); }
.lvb.done { background: var(--green-50); color: var(--green-600); }
.stream-done { color: var(--text-3); font-size: 13px; align-self: center; }
.stream-group__h {
  width: 100%; text-align: left; border: none; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--text-2); padding: 14px 2px 10px; margin-top: 6px;
  border-top: 1px solid var(--border);
}
.stream-group__h:hover { color: var(--text); }
.stream-done-list .stream-card { opacity: .82; }

/* зона перетаскивания (drag & drop) */
.dropzone { display: none; position: fixed; inset: 0; z-index: 80;
  background: rgba(22,192,137,.10); backdrop-filter: none; padding: 24px; }
.dropzone.on { display: flex; align-items: center; justify-content: center; }
.dropzone__in { border: 2.5px dashed var(--green); border-radius: 18px; background: #fff;
  padding: 40px 56px; font-size: 18px; font-weight: 600; color: var(--green-600);
  box-shadow: var(--shadow-pop); pointer-events: none; text-align: center; }

/* Метка наличия лёгкой версии 540p в каталоге */
.q-badge {
  display: inline-block; vertical-align: middle;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  color: var(--green-600); background: var(--green-50);
  border: 1px solid #bfe8d6; border-radius: 5px;
  padding: 1px 5px; margin-left: 6px;
}
