/* Design tokens — resolved appearance (body.theme-light / body.cyber) */
:root {
  --ku-transition-theme: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

html {
  color-scheme: dark;
}

body {
  transition: var(--ku-transition-theme);
}

body.theme-light {
  color-scheme: light;
  --bg: #f2f2f7;
  --card: #ffffff;
  --card2: #e8e8ed;
  --border: #c7c7cc;
  --text: #1c1c1e;
  --muted: #636366;
  --accent: #007aff;
  --green: #248a3d;
  --red: #d70015;
  --yellow: #9a6b00;
  --green-bg: rgba(36, 138, 61, 0.12);
  --red-bg: rgba(215, 0, 21, 0.10);
  --yellow-bg: rgba(154, 107, 0, 0.12);
  background: var(--bg) !important;
  color: var(--text);
}

body.theme-light .hdr {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .ku-theme-btn,
body.theme-light .ku-voice-btn,
body.theme-light .ku-lang-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--muted);
}

body.theme-light .ku-theme-btn:hover,
body.theme-light .ku-voice-btn:hover,
body.theme-light .ku-lang-btn:hover {
  color: var(--text);
  border-color: rgba(0, 0, 0, 0.22);
  background: rgba(0, 0, 0, 0.06);
}

/* Keenetic Unified — Stage 6 UI refresh.
 *
 * Этот файл добавляется ПОВЕРХ существующих стилей страниц и подключается
 * единственным <link rel="stylesheet" href="/static/ku-theme.css">.
 *
 * Что добавляет:
 *  - glow-pulse для UP-статусов (зелёные dots/badges)
 *  - alert-shake для DOWN-статусов
 *  - smooth fade-in для cards при первом появлении
 *  - skeleton-loading placeholder
 *  - cyber-theme (через body.cyber) с CRT/neon ощущением
 *  - mute-indicator badge в header
 *
 * Ничего не переписывает существующее — только добавляет.
 */

/* ── Soft pulse для UP/OK статусов ─────────────────────────────────────── */
@keyframes ku-pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.40); }
  50%      { box-shadow: 0 0 0 6px rgba(48, 209, 88, 0.00); }
}

/* Dot.ok + Dot.up — пульсирующий «живой» ореол */
.dot.ok, .dot.up {
  animation: ku-pulse-green 2.4s ease-out infinite;
}
/* Badge .on в карточках — лёгкая «дышащая» граница */
.badge.on, .ab.on {
  animation: ku-pulse-green 3.2s ease-out infinite;
}

/* ── Tense pulse для DOWN — медленнее, не раздражает ──────────────────── */
@keyframes ku-pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 69, 58, 0.45); }
  50%      { box-shadow: 0 0 0 7px rgba(255, 69, 58, 0.00); }
}
.dot.fail, .dot.down {
  animation: ku-pulse-red 1.6s ease-out infinite;
}

/* WARN — спокойнее */
@keyframes ku-pulse-yellow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 214, 10, 0.36); }
  50%      { box-shadow: 0 0 0 5px rgba(255, 214, 10, 0.00); }
}
.dot.warn { animation: ku-pulse-yellow 2.8s ease-out infinite; }

/* ── Smooth fade-in для cards / sections ──────────────────────────────── */
@keyframes ku-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card, .section, .stat, .matrix .row {
  animation: ku-fade-in 0.32s ease-out both;
}

/* ── Skeleton placeholder для загрузки ─────────────────────────────────── */
.ku-skel {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.10) 50%,
    rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: ku-skel-shimmer 1.4s infinite;
  border-radius: 8px;
  min-height: 14px;
  color: transparent !important;
  user-select: none;
}
@keyframes ku-skel-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Cyber theme (body.cyber) ──────────────────────────────────────────── */
body.cyber {
  --bg: #06060d;
  --card: #0c0e1a;
  --card2: #131628;
  --border: #1f2540;
  --text: #d8f7ff;
  --muted: #6b7aa0;
  --accent: #18d2ff;
  --green: #2bff8f;
  --red: #ff4f7f;
  --yellow: #ffd54a;
  --green-bg: rgba(43, 255, 143, 0.10);
  --red-bg:   rgba(255, 79, 127, 0.10);
  --yellow-bg:rgba(255, 213, 74, 0.10);

  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(24, 210, 255, 0.06), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgba(43, 255, 143, 0.05), transparent 60%),
    var(--bg) !important;
}

/* Лёгкий CRT-scanline эффект — оч ненавязчиво (8% контраст) */
body.cyber::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.000) 0px,
    rgba(255, 255, 255, 0.000) 2px,
    rgba(255, 255, 255, 0.018) 3px,
    rgba(255, 255, 255, 0.000) 4px
  );
  z-index: 9000;
  mix-blend-mode: overlay;
}

/* Cyber: заголовки с лёгким neon-glow */
body.cyber h1, body.cyber h2, body.cyber h3,
body.cyber .hdr-logo, body.cyber .section h2 {
  text-shadow: 0 0 12px rgba(24, 210, 255, 0.20);
}

/* Cyber: акценты «загораются» сильнее */
body.cyber .badge.on, body.cyber .ab.on, body.cyber .dot.ok, body.cyber .dot.up {
  box-shadow: 0 0 12px rgba(43, 255, 143, 0.32);
}
body.cyber .badge.off, body.cyber .ab.off, body.cyber .dot.fail, body.cyber .dot.down {
  box-shadow: 0 0 14px rgba(255, 79, 127, 0.32);
}

/* Cyber: ссылка nav слегка светится в активной вкладке */
body.cyber .ntab.active {
  box-shadow: 0 0 14px rgba(24, 210, 255, 0.45);
}

/* ── Shared two-row header (KU_HDR / dashboard layout) ─────────────────── */
.hdr {
  padding: 10px 20px 12px;
  min-height: auto;
  height: auto;
  background: rgba(28, 28, 30, 0.72);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-start;
}
.ku-page-hdr .hdr {
  margin: 0;
}
.ku-page-hdr {
  margin: 0 0 20px;
}
body:has(.wrap) .ku-page-hdr .hdr,
body:has(.wrap) .ku-page-hdr {
  margin-left: 0;
  margin-right: 0;
}
.hdr-top {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  width: 100%;
  min-height: 40px;
  flex-wrap: nowrap;
  min-width: 0;
}
.hdr-logo {
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
  color: var(--text, #f5f5f7);
  flex-shrink: 0;
}
.hdr-logo em {
  font-style: normal;
  color: var(--accent, #0a84ff);
}
.hdr-nav {
  display: flex;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
}
.hdr-nav::-webkit-scrollbar {
  display: none;
}
.ntab {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted, #86868b);
  transition: 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.ntab:hover {
  color: var(--text, #f5f5f7);
  background: rgba(255, 255, 255, 0.08);
}
.ntab.active {
  background: var(--accent, #0a84ff);
  color: #fff;
}
.hdr-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-left: auto;
  padding: 3px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.hdr-bar {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hdr-bar::-webkit-scrollbar {
  display: none;
}
.hdr-mid {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
}
.hdr-bar-sep {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  margin: 0 4px;
  align-self: center;
}
.hdr-install {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 2px 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.hdr-inst {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text, #f5f5f7);
  white-space: nowrap;
  line-height: 1.2;
  transition: 0.15s;
}
.hdr-inst:hover {
  background: rgba(255, 255, 255, 0.08);
}
.hdr-inst.setup {
  border: 1px solid rgba(10, 132, 255, 0.45);
  color: #64d2ff;
}
.hdr-inst.pc {
  border: 1px solid rgba(191, 90, 242, 0.45);
  color: #bf5af2;
}
.hdr-inst.guide {
  border: 1px solid rgba(48, 209, 88, 0.45);
  color: #30d158;
}
.hdr-inst.ssh {
  border: 1px solid rgba(255, 159, 10, 0.5);
  color: var(--orange, #ff9f0a);
}
.hdr-inst.diag {
  border: 1px solid rgba(134, 134, 139, 0.45);
  color: var(--muted, #86868b);
}
.hdr-checks {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.hdr-act {
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1.2;
  transition: 0.15s;
}
.hdr-act.speed {
  border-color: rgba(10, 132, 255, 0.5);
  background: rgba(10, 132, 255, 0.12);
  color: var(--accent, #0a84ff);
}
.hdr-act.tg-agent {
  background: #2c2c2e;
  color: #f5f5f7;
  border: 1px solid transparent;
}
.hdr-act.tg-agent[data-on="1"] {
  border-color: #30d158;
  color: #30d158;
}
.hdr-act.tunnel {
  border-color: rgba(48, 209, 88, 0.5);
  background: rgba(48, 209, 88, 0.12);
  color: var(--green, #30d158);
}
.logout-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted, #86868b);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}
.logout-btn:hover {
  color: var(--text, #f5f5f7);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}
/* Legacy single-row pages: stack right column under nav on narrow screens */
.hdr:not(:has(.hdr-top)) {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 54px;
  gap: 16px;
}
.hdr:not(:has(.hdr-top)) .hdr-nav {
  flex-wrap: wrap;
}
.hdr:not(:has(.hdr-top)) .hdr-r {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}
@media (max-width: 1100px) {
  .hdr-top {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .hdr-nav {
    order: 2;
    flex: 1 1 100%;
  }
  .hdr-toolbar,
  .hdr-top > .ku-hdr-controls {
    order: 1;
    margin-left: auto;
  }
  .hdr-bar {
    justify-content: flex-start;
  }
  .hdr-mid {
    justify-content: flex-start;
  }
}
@media (max-width: 720px) and (min-width: 481px) {
  .ku-page-hdr .hdr-nav {
    display: none;
  }
  .hdr-mid {
    justify-content: center;
  }
}
@media (max-width: 720px) {
  .ku-page-hdr .hdr-nav {
    display: none;
  }
}

/* Quick links: setup / PC / monitoring in header (legacy pages only) */
.ku-hdr-quick {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 2px 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ku-hdr-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.ku-hdr-quick-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}
.hdr-r .logout-btn,
.ku-hdr-controls .logout-btn {
  order: 99;
  margin-left: 2px;
}
.ku-hdr-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-left: auto;
}
.hdr-top > .ku-hdr-controls,
.hdr-top > .hdr-toolbar.ku-hdr-controls {
  order: 1;
}
.hdr:has(.hdr-top) .hdr-r > .logout-btn {
  display: none;
}
.hdr-top .ku-hdr-controls .logout-btn {
  display: inline-flex;
}

/* ── Toolbar в шапке (macOS-style, без position:fixed) ─────────────────── */
.ku-theme-btn,
.ku-voice-btn,
.ku-lang-btn,
.ku-mute-pill {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  z-index: auto;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: color .15s, background .15s, border-color .15s;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}
.ku-theme-btn,
.ku-voice-btn,
.ku-lang-btn {
  display: inline-flex;
}
.ku-theme-btn:hover,
.ku-voice-btn:hover,
.ku-lang-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}
body.cyber .ku-theme-btn,
body.cyber .ku-voice-btn,
body.cyber .ku-lang-btn {
  color: var(--accent);
  border-color: rgba(24, 210, 255, 0.35);
}

.ku-mute-pill {
  background: rgba(255, 214, 10, 0.12);
  border-color: rgba(255, 214, 10, 0.35);
  color: #ffd60a;
}
.ku-mute-pill:hover {
  background: rgba(255, 214, 10, 0.22);
}
.ku-mute-pill.show {
  display: inline-flex;
  gap: 5px;
}

.ku-mute-menu {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.ku-mute-menu.open .ku-mute-dropdown {
  display: block;
}
.ku-mute-trigger.ku-mute-active {
  color: #ffd60a;
  border-color: rgba(255, 214, 10, 0.45);
  background: rgba(255, 214, 10, 0.14);
}
.ku-mute-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 168px;
  z-index: 400;
  padding: 6px;
  border-radius: 12px;
  background: var(--card, #1c1c1e);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.ku-mute-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text, #f5f5f7);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
}
.ku-mute-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.ku-mute-dropdown-unmute {
  color: var(--green, #30d158);
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px 8px 4px 4px;
}
.ku-mute-setup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 69, 58, 0.1);
  border: 1px solid rgba(255, 69, 58, 0.35);
  color: #ff8a80;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: color .15s, background .15s, border-color .15s;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}
.ku-mute-setup-btn:hover {
  color: #fff;
  border-color: rgba(255, 69, 58, 0.55);
  background: rgba(255, 69, 58, 0.22);
}

/* Страницы без .hdr-toolbar — плавающие кнопки внизу справа */
body:not(:has(.hdr-toolbar)) .ku-theme-btn,
body:not(:has(.hdr-toolbar)) .ku-voice-btn,
body:not(:has(.hdr-toolbar)) .ku-lang-btn {
  position: fixed;
  bottom: 72px;
  z-index: 200;
  display: inline-flex;
}
body:not(:has(.hdr-toolbar)) .ku-theme-btn { right: 12px; }
body:not(:has(.hdr-toolbar)) .ku-voice-btn { right: 100px; }
body:not(:has(.hdr-toolbar)) .ku-lang-btn { right: 188px; }
body:not(:has(.hdr-toolbar)) .ku-mute-pill.show {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 200;
  display: inline-flex;
}

@media (max-width: 720px) {
  .hdr-r {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .pills {
    max-width: 100%;
    order: 1;
    flex: 1 1 100%;
  }
  .hdr-toolbar {
    order: 2;
  }
  .logout-btn {
    order: 3;
  }
}

/* ── Tunnel matrix: glow при self-heal в процессе ──────────────────────── */
.row .heal-active {
  animation: ku-pulse-yellow 1.1s ease-in-out infinite;
  color: var(--yellow);
  font-weight: 700;
}

/* ── Кнопки hover lift ─────────────────────────────────────────────────── */
.btn, .ibtn, .ntab {
  transition: transform .12s ease-out, color .15s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover:not(:disabled), .ibtn:hover { transform: translateY(-1px); }

/* prefers-reduced-motion — выключить анимации для пользователей с такой настройкой */
@media (prefers-reduced-motion: reduce) {
  .dot, .badge, .ab, .card, .section, .stat, .matrix .row,
  .ku-skel { animation: none !important; }
}

/* ── Справка «?» (раскрывающаяся инструкция) ───────────────────────────── */
.ku-section-head,
.ku-card-head,
.ku-inline-help-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}
.ku-section-head > h1,
.ku-section-head > h2,
.ku-section-head > h3,
.ku-card-head > h3 { margin: 0; flex: 1 1 auto; min-width: 140px; }
.ku-section-head > h1 { font-size: inherit; font-weight: inherit; }

.ku-help {
  flex: 0 0 auto;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.45;
}
.ku-help[open] {
  flex: 1 1 100%;
  order: 99;
}
.ku-help > summary {
  list-style: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-left: auto;
  background: rgba(10, 132, 255, 0.18);
  border: 1px solid rgba(10, 132, 255, 0.45);
  color: var(--accent, #0a84ff);
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  user-select: none;
  transition: background 0.15s, border-color 0.15s, transform 0.12s ease-out;
}
.ku-help > summary::-webkit-details-marker { display: none; }
.ku-help > summary:hover { transform: translateY(-1px); background: rgba(10, 132, 255, 0.28); }
.ku-help[open] > summary { background: rgba(10, 132, 255, 0.35); }

.ku-help-body {
  margin-top: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  max-width: min(760px, 100%);
  color: rgba(245, 245, 247, 0.88);
  font-size: 12px;
  text-align: left;
  font-weight: 500;
}
.ku-help-body p { margin: 0 0 0.65em; }
.ku-help-body p:last-child { margin-bottom: 0; }
.ku-help-body ul,
.ku-help-body ol { margin: 0.35em 0 0.65em 1.15em; padding: 0; }
.ku-help-body li { margin-bottom: 0.35em; }
.ku-help-body code {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
}
.ku-help-body strong { color: var(--text, #f5f5f7); }

/* ── Mass-action sticky progress bar (ku-mass.js) ─────────────────────── */
.ku-mass-progress {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10050;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(12, 12, 18, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.ku-mass-progress.on {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.ku-mass-progress-inner {
  max-width: 720px;
  margin: 0 auto;
}
.ku-mass-progress-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.ku-mass-progress-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #f5f5f7);
  flex: 1 1 auto;
  min-width: 120px;
}
.ku-mass-progress-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent, #0a84ff);
  font-variant-numeric: tabular-nums;
}
.ku-mass-progress-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--muted, #86868b);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.ku-mass-progress-cancel:hover {
  color: var(--text, #f5f5f7);
  border-color: rgba(255, 69, 58, 0.5);
}
.ku-mass-progress-sub {
  font-size: 12px;
  color: var(--muted, #86868b);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ku-mass-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}
.ku-mass-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0a84ff, #30d158);
  border-radius: 6px;
  transition: width 0.35s ease;
}

/* VPS CPU/RAM/диск в шапке (ku-theme pollVpsHdrStats) */
.hdr-stats {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  flex-shrink: 0;
  min-width: 0;
  max-width: none;
  overflow-x: visible;
  overflow-y: visible;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hdr-mid .hdr-stats {
  margin-left: 0;
}
@media (max-width: 480px) {
  .hdr-bar {
    overflow-x: auto;
  }
  .hdr-mid {
    justify-content: flex-start;
  }
  .hdr-stats {
    justify-content: flex-start;
    overflow: visible;
  }
  .hdr-install,
  .hdr-checks {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .hdr-bar-sep {
    display: none;
  }
}
.hdr-stats::-webkit-scrollbar { display: none; }
.hst {
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  min-width: 42px;
  line-height: 1;
}
.hst .hst-v { font-size: 12px; font-weight: 800; letter-spacing: -0.3px; color: var(--green, #30d158); }
.hst .hst-l { font-size: 7px; font-weight: 600; color: var(--muted, #86868b); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 1px; }
.hst.h-ram .hst-v { color: var(--blue, #64d2ff); }
.hst.h-disk .hst-v { color: var(--orange, #ff9f0a); }
.hst.sev-warn { border-color: rgba(255, 159, 10, 0.45); box-shadow: 0 0 0 1px rgba(255, 159, 10, 0.2) inset; }
.hst.sev-warn .hst-v { color: var(--orange, #ff9f0a) !important; }
.hst.sev-crit { border-color: rgba(255, 69, 58, 0.5); box-shadow: 0 0 0 1px rgba(255, 69, 58, 0.25) inset; }
.hst.sev-crit .hst-v { color: var(--red, #ff453a) !important; }

/* Dashboard: bottom events ticker above brand / refresh chrome (v20260518d3) */
html[data-ku-page="dashboard"] body {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
.ku-dash-ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  height: 34px;
  overflow: hidden;
  background: linear-gradient(180deg, #141416, #0d0d0f);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.ku-dash-ticker::before,
.ku-dash-ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 3;
  pointer-events: none;
}
.ku-dash-ticker::before {
  left: 0;
  background: linear-gradient(90deg, #0d0d0f, transparent);
}
.ku-dash-ticker::after {
  right: 0;
  background: linear-gradient(270deg, #0d0d0f, transparent);
}
.ku-dash-ticker-label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64d2ff;
  background: #0d0d0f;
  padding: 0 8px 0 0;
}
.ku-dash-ticker-track {
  display: flex;
  align-items: center;
  height: 34px;
  padding-left: 88px;
  padding-right: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #c9c9d1;
  min-width: 0;
}
.ku-dash-ticker-track--loading {
  animation: none;
}
.ku-dash-ticker-single {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.ku-dash-ticker-marquee {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  min-width: 0;
}
.ku-dash-ticker-track--marquee .ku-dash-ticker-marquee {
  animation: ku-dash-ticker-scroll 240s linear infinite;
}
.ku-dash-ticker-track--marquee.paused .ku-dash-ticker-marquee,
.ku-dash-ticker-track.paused .ku-dash-ticker-marquee {
  animation-play-state: paused;
}
@keyframes ku-dash-ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
html[data-ku-page="dashboard"] #ku-brand {
  bottom: calc(40px + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 110 !important;
  max-width: min(68vw, 480px);
  pointer-events: auto;
}
html[data-ku-page="dashboard"] .ku-dash-refresh-wrap {
  bottom: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 120 !important;
}
html[data-ku-page="dashboard"] .hydra-push-toast {
  bottom: calc(108px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 480px) {
  html[data-ku-page="dashboard"] .hdr .ku-pca-full {
    display: none;
  }
  html[data-ku-page="dashboard"] .ku-dash-ticker-label {
    display: none;
  }
  html[data-ku-page="dashboard"] .ku-dash-ticker-track {
    padding-left: 12px;
  }
  html[data-ku-page="dashboard"] #ku-brand {
    max-width: min(88vw, 320px);
    font-size: 10px;
    line-height: 1.25;
    gap: 2px 6px;
  }
}
