*, *::before, *::after { box-sizing: border-box; margin: 0; }

/* ── Константы (не зависят от темы) ─────────────────────────────────────── */
:root {
  --radius-sm: 7px;
  --radius-md: 11px;
  --radius-lg: 15px;
  --transition: 160ms ease;

  --brand:       #5c63c9;
  --brand-hover: #4c53b5;
  --brand-grad:  linear-gradient(135deg, #5c63c9 0%, #7a6fc4 100%);
  --good:        #3aa06c;
  --mid:         #cf9633;
  --bad:         #cf6060;
  --info:        #5b9ec9;
}

/* ── Тёмная тема (по умолчанию) ─────────────────────────────────────────── */
:root, html.dark {
  --bg-base:    #0c0e13;
  --bg-surface: #13161f;
  --bg-elevated:#191d29;
  --bg-hover:   #1e2331;
  --bg-input:   #161a25;

  --border-subtle:  #1e2434;
  --border-default: #262d40;
  --border-strong:  #303a55;

  --ink:            #e9ebf2;
  --text-secondary: #8d95ab;
  --muted:          #757d94;
  --link:           #8e95d6;

  --brand-dim:  #23264a;
  --brand-soft: rgba(92,99,201,.13);
  --good-bg: #0d2e1e;
  --mid-bg:  #2a1f08;
  --bad-bg:  #2e1111;
  --info-bg: #0d1f40;

  --sidebar-bg: var(--bg-surface);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 14px rgba(0,0,0,.45);
  --shadow-lg: 0 10px 36px rgba(0,0,0,.6);
}

/* ── Светлая тема ───────────────────────────────────────────────────────── */
html.light {
  --bg-base:    #eef0f6;
  --bg-surface: #ffffff;
  --bg-elevated:#f7f8fc;
  --bg-hover:   #edeff7;
  --bg-input:   #f4f5fa;

  --border-subtle:  #e3e6f0;
  --border-default: #d2d6e6;
  --border-strong:  #b9bfd6;

  --ink:            #12141f;
  --text-secondary: #4c5470;
  --muted:          #8a92ab;
  --link:           #4c53b5;

  --brand-dim:  #e8e9f7;
  --brand-soft: rgba(92,99,201,.09);
  --good-bg: #dcfce7;
  --mid-bg:  #fef3c7;
  --bad-bg:  #fee2e2;
  --info-bg: #dbeafe;

  --sidebar-bg: var(--bg-surface);
  --shadow-sm: 0 1px 3px rgba(20,24,60,.08);
  --shadow-md: 0 4px 14px rgba(20,24,60,.09);
  --shadow-lg: 0 10px 36px rgba(20,24,60,.13);
}

html { transition: background-color .2s, color .2s; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-base); color: var(--ink);
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 5px; height: 5px; }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* ── Каркас ─────────────────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px; flex-shrink: 0; background: var(--sidebar-bg); color: var(--text-secondary);
  padding: 16px 10px 14px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--border-subtle);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 800; color: var(--ink);
  padding: 4px 10px 16px; letter-spacing: -.01em;
}
.logo .logo-ico {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand-grad); display: inline-flex;
  align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0;
}
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  color: var(--text-secondary); padding: 8.5px 12px; border-radius: var(--radius-md);
  font-weight: 500; font-size: 13px; transition: all var(--transition);
}
.sidebar nav a:hover { background: var(--bg-hover); color: var(--ink); text-decoration: none; }
.sidebar nav a.on { background: var(--brand-soft); color: var(--link); font-weight: 600; }
.sidebar-user {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px; background: var(--bg-elevated);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.sidebar-user .su-name {
  font-size: 12.5px; font-weight: 600; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-user .su-logout {
  background: none; border: 1px solid var(--border-default); color: var(--muted);
  border-radius: var(--radius-sm); padding: 3px 9px; font-size: 11.5px;
  cursor: pointer; font-family: inherit; transition: all var(--transition);
}
.sidebar-user .su-logout:hover { color: var(--bad); border-color: var(--bad); }
.sidebar-user + .sidebar-foot { margin-top: 10px; }
.impersonation-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--brand-soft); border: 1px solid var(--brand);
  color: var(--ink); border-radius: var(--radius-md);
  padding: 8px 14px; margin-bottom: 16px; font-size: 13px;
}
.badge-on  { background: var(--good-bg); color: var(--good); }
.badge-off { background: var(--bad-bg);  color: var(--bad); }
.sidebar-foot { margin-top: auto; padding: 12px 10px 0; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border-subtle); }

.theme-toggle {
  margin: 14px 0 0; padding: 8px 12px; border-radius: var(--radius-md);
  background: transparent; color: var(--text-secondary); border: 1px solid var(--border-default);
  font-size: 12.5px; cursor: pointer; text-align: left; width: 100%;
  transition: all var(--transition);
}
.theme-toggle:hover { background: var(--bg-hover); color: var(--ink); }

.content { flex: 1; padding: 26px 32px 96px; max-width: 1280px; min-width: 0; }
h1 { font-size: 20px; margin-bottom: 16px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 15px; margin: 20px 0 10px; font-weight: 650; }
.sub { color: var(--muted); font-size: 12.5px; }

/* ── Карточки метрик ────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 14px 16px;
  transition: all var(--transition);
}
a.card { display: block; color: inherit; }
a.card:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.card-active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.card .num { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.card .lbl { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ── Панели ─────────────────────────────────────────────────────────────── */
.panel {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 16px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── Таблицы ────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; color: var(--muted); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 8px 10px; border-bottom: 1px solid var(--border-subtle);
}
td { padding: 9px 10px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }
tr.row-playing td { background: var(--brand-dim); }

/* ── Бейджи ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2.5px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.score-good { background: var(--good-bg); color: var(--good); }
.score-mid  { background: var(--mid-bg);  color: var(--mid); }
.score-bad  { background: var(--bad-bg);  color: var(--bad); }
.badge-dir    { background: var(--brand-dim); color: var(--link); }
.dir-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  white-space: nowrap;
}
.dir-in  { background: var(--info-bg); color: var(--info); }
.dir-out { background: var(--good-bg); color: var(--good); }
.badge-status { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.badge-flag   { background: var(--bad-bg);  color: var(--bad); }
.badge-thx    { background: var(--good-bg); color: var(--good); }
.badge-tag    { background: var(--bg-elevated); color: var(--text-secondary); margin: 2px 3px 2px 0; border: 1px solid var(--border-subtle); }

/* ── Кнопки ─────────────────────────────────────────────────────────────── */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--brand); color: #fff; border: 0; border-radius: var(--radius-md);
  padding: 8px 15px; font-size: 13.5px; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: background var(--transition), transform 60ms;
  white-space: nowrap;
}
button:hover, .btn:hover { background: var(--brand-hover); }
button:active, .btn:active { transform: scale(.97); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-default); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--ink); border-color: var(--border-strong); }
.btn-grad { background: var(--brand-grad); color: #fff; border: 0; }
.btn-grad:hover { filter: brightness(1.1); background: var(--brand-grad); }
.btn-danger { background: var(--bad-bg); color: var(--bad); border: 1px solid rgba(239,68,68,.25); }
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-sm { padding: 4px 11px; font-size: 12.5px; border-radius: var(--radius-sm); }

.play-btn {
  width: 30px; height: 30px; padding: 0; border-radius: 50%;
  background: var(--brand-dim); color: var(--link); font-size: 12px;
  border: 1px solid var(--border-default); flex-shrink: 0;
}
.play-btn:hover { background: var(--brand); color: #fff; }
.play-btn.playing { background: var(--brand); color: #fff; }

/* ── Формы ──────────────────────────────────────────────────────────────── */
input, select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border-default);
  border-radius: var(--radius-md); font-size: 13.5px; font-family: inherit;
  background: var(--bg-input); color: var(--ink); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(92,99,201,.12);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 140px; resize: vertical; }
label { display: block; font-size: 12px; color: var(--text-secondary); margin: 12px 0 5px; font-weight: 600; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 14px; }

/* ── Фильтры-кнопочки (chips) ───────────────────────────────────────────── */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 13px; border-radius: 20px; font-size: 12.5px; font-weight: 500;
  background: var(--bg-surface); color: var(--text-secondary);
  border: 1px solid var(--border-default); cursor: pointer;
  transition: all var(--transition);
}
.chip:hover { border-color: var(--brand); color: var(--ink); text-decoration: none; background: var(--bg-hover); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.chip-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }

.row-actions { display: flex; gap: 5px; align-items: center; white-space: nowrap; }

/* ── Резюме звонка ──────────────────────────────────────────────────────── */
.summary-box {
  background: linear-gradient(135deg, var(--brand-dim), transparent 220%);
  border: 1px solid rgba(92,99,201,.28); border-left: 4px solid var(--brand);
  border-radius: var(--radius-md); padding: 16px 20px;
  font-size: 16px; line-height: 1.65; font-weight: 500; color: var(--ink);
  box-shadow: 0 2px 10px rgba(92,99,201,.06);
}
.summary-box .summary-label {
  display: block; font-size: 11.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .09em; color: var(--brand); margin-bottom: 8px;
}

/* ── Мета-шапка карточки звонка ─────────────────────────────────────────── */
.call-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: -6px 0 18px; }
.meta-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 500;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-secondary);
}
.meta-item a { font-weight: 600; }
.meta-item.badge-dir-style { background: var(--brand-dim); color: var(--link); border-color: transparent; font-weight: 600; }
.meta-item.meta-dim { opacity: .75; font-size: 12px; }

.flash { padding: 11px 15px; border-radius: var(--radius-md); margin-bottom: 14px; font-size: 13.5px; }
.flash-ok  { background: var(--good-bg); color: var(--good); border: 1px solid rgba(34,197,94,.2); }
.flash-err { background: var(--bad-bg);  color: var(--bad);  border: 1px solid rgba(239,68,68,.2); }

/* ── Деловые блоки контроля (пропущенные, перезвоны) ────────────────────── */
.panel-alert { border-left: 3px solid var(--bad); padding: 0; overflow: hidden; }
.panel-alert.is-warn { border-left-color: var(--mid); }
.alert-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-elevated);
}
.alert-title {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink);
}
.alert-count {
  background: var(--bad); color: #fff; border-radius: 4px;
  padding: 1px 8px; font-size: 12px; font-weight: 700; line-height: 18px;
}
.is-warn .alert-count { background: var(--mid); }
.alert-src { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.panel-alert th { padding: 8px 18px 6px; }
.panel-alert td { padding: 8px 18px; }
.tel { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .2px; white-space: nowrap; }
.dt-time { font-variant-numeric: tabular-nums; font-weight: 650; }
.dt-day { color: var(--muted); font-size: 11.5px; }

.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }
.status-dot.is-sent { color: var(--good); } .status-dot.is-sent::before { background: var(--good); }
.status-dot.is-overdue { color: var(--bad); font-weight: 600; } .status-dot.is-overdue::before { background: var(--bad); animation: pulseBad 2.2s ease-in-out infinite; }
.status-dot.is-wait { color: var(--mid); } .status-dot.is-wait::before { background: var(--mid); }
@keyframes pulseBad {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
  55%     { box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}

/* ── Диалог ─────────────────────────────────────────────────────────────── */
.dialog { display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; }
.bubble .who { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; opacity: .65; }
.bubble-manager { background: var(--brand-dim); align-self: flex-start; border-bottom-left-radius: 3px; }
.bubble-client  { background: var(--bg-elevated); align-self: flex-end; border-bottom-right-radius: 3px; border: 1px solid var(--border-subtle); }

/* ── Критерии ───────────────────────────────────────────────────────────── */
.crit-row { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-subtle); }
.crit-row:last-child { border-bottom: 0; }
.crit-name { flex: 1; font-weight: 600; font-size: 13.5px; }
.crit-evidence { color: var(--muted); font-size: 12.5px; font-style: italic; margin-top: 3px; }
.bar { height: 7px; border-radius: 5px; background: var(--bg-elevated); width: 130px; overflow: hidden; flex-shrink: 0; }
.bar > div { height: 100%; border-radius: 5px; background: var(--brand); }
.bar-good > div { background: var(--good); }
.bar-mid  > div { background: var(--mid); }
.bar-bad  > div { background: var(--bad); }

ul.clean { padding-left: 20px; }
ul.clean li { margin: 5px 0; }

.report { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; }
.chart-box { height: 250px; }
.mini-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters > div { min-width: 130px; }
.demo-banner { background: var(--mid-bg); color: var(--mid); padding: 10px 15px; border-radius: var(--radius-md); margin-bottom: 14px; font-size: 13px; border: 1px solid rgba(245,158,11,.2); }
audio { width: 100%; }

details summary { cursor: pointer; color: var(--link); }

/* ── Глобальный плеер (нижняя панель) ───────────────────────────────────── */
#playerBar {
  position: fixed; left: 216px; right: 0; bottom: 0; z-index: 100;
  display: none; align-items: center; gap: 12px;
  padding: 10px 24px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-elevated); border-top: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}
#playerBar.on { display: flex; }
.pb-play {
  width: 40px; height: 40px; border-radius: 50%; padding: 0; font-size: 15px;
  flex-shrink: 0; background: var(--brand); color: #fff;
}
.pb-main { flex: 1; min-width: 0; }
.pb-label {
  font-size: 12.5px; color: var(--text-secondary); margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pb-label a { font-weight: 600; }
.pb-progress-wrap { display: flex; align-items: center; gap: 10px; }
.pb-progress {
  flex: 1; height: 6px; border-radius: 4px; background: var(--bg-base);
  cursor: pointer; position: relative; border: 1px solid var(--border-subtle);
}
.pb-progress > div {
  height: 100%; border-radius: 4px; background: var(--brand);
  width: 0%; pointer-events: none; transition: width .2s linear;
}
.pb-time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pb-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pb-btn {
  padding: 5px 10px; font-size: 12px; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary); border: 1px solid var(--border-default);
}
.pb-btn:hover { background: var(--bg-hover); color: var(--ink); }
.pb-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pb-close {
  padding: 5px 9px; background: transparent; color: var(--muted);
  border: 0; font-size: 15px;
}
.pb-close:hover { color: var(--bad); background: transparent; }

/* ── Разделы настроек ───────────────────────────────────────────────────── */
.sec-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 4px; }
.sec-icon { font-size: 20px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-elevated); border-radius: var(--radius-md); flex-shrink: 0; }
.sec-title { font-weight: 700; font-size: 14.5px; }
.sec-hint { font-size: 12px; color: var(--muted); margin-top: 1px; }
.sec-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }

/* ── Всплывающая карточка звонка (как в CRM) ────────────────────────────── */
#callPopup {
  position: fixed; right: 20px; top: 20px; z-index: 400; width: 360px;
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  overflow: hidden; display: none;
  animation: popIn .25s cubic-bezier(.2,.8,.25,1.1);
}
#callPopup.on { display: block; }
@keyframes popIn { from { transform: translateY(-14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.cp-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 13.5px;
}
.cp-head.cp-missed { background: var(--bad); }
.cp-head .cp-x { margin-left: auto; cursor: pointer; opacity: .8; font-size: 16px; background: none; border: 0; color: #fff; padding: 0 2px; }
.cp-head .cp-x:hover { opacity: 1; background: none; }
.cp-body { padding: 14px 16px; }
.cp-phone { font-size: 19px; font-weight: 750; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.cp-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.cp-tags { display: flex; gap: 5px; flex-wrap: wrap; margin: 9px 0; }
.cp-facts { margin: 8px 0 4px; padding: 10px 12px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); font-size: 12.5px; line-height: 1.55; }
.cp-facts b { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); display: block; margin-bottom: 4px; }
.cp-summary { font-size: 12.5px; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; }
.cp-actions { display: flex; gap: 8px; margin-top: 12px; }
.cp-actions .btn { flex: 1; justify-content: center; font-size: 12.5px; padding: 7px 10px; }

/* ── Тосты (мини-статусы действий) ──────────────────────────────────────── */
#toasts {
  position: fixed; right: 20px; bottom: 86px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px; max-width: 380px;
}
.toast {
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 11px 15px;
  box-shadow: var(--shadow-md); font-size: 13px; color: var(--ink);
  display: flex; align-items: flex-start; gap: 9px;
  animation: toastIn .2s ease;
}
.toast::before { font-size: 14px; line-height: 1.3; }
.toast-ok  { border-left: 3px solid var(--good); } .toast-ok::before  { content: "✓"; color: var(--good); font-weight: 700; }
.toast-run { border-left: 3px solid var(--brand); } .toast-run::before { content: "⏳"; }
.toast-err { border-left: 3px solid var(--bad); }  .toast-err::before { content: "✕"; color: var(--bad); font-weight: 700; }
.toast.hide { opacity: 0; transform: translateX(16px); transition: all .3s; }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 800px) {
  #playerBar { left: 0; flex-wrap: wrap; }
  .pb-controls { order: 3; width: 100%; justify-content: center; }
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
}
