/* ============================================================
   NEBULA UI — GLASS STYLE
   Слой поверх существующей разметки: переопределяет ТОЛЬКО
   переменные и оформление, не трогая JS и структуру DOM.
   Активируется через html[data-style="glass"].
   Цветовые палитры (--primary и т.д.) берутся из текущих тем
   8 (light/dark × blue/violet/green/red), поэтому акценты —
   «наши».
   ============================================================ */

html[data-style="glass"] {
  --radius-sm: 9px;
  --radius-md: 11px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 200ms cubic-bezier(.16, 1, .3, 1);
  --transition-slow: 380ms cubic-bezier(.16, 1, .3, 1);
}

/* ---------- СВЕТЛЫЕ ---------- */
html[data-style="glass"][data-theme^="light-"] {
  --bg: #eceff5;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-2: rgba(255, 255, 255, 0.58);
  --surface-hover: rgba(17, 20, 32, 0.055);
  --surface-selected: color-mix(in srgb, var(--primary) 12%, transparent);
  --text: #111420;
  --text-secondary: #4a5261;
  --text-muted: #6d7587;
  --border: rgba(16, 22, 34, 0.11);
  --border-strong: rgba(16, 22, 34, 0.2);
  --shadow-1: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 24px -18px rgba(22, 32, 54, .45);
  --shadow-2: inset 0 1px 0 rgba(255,255,255,.92), 0 16px 32px -20px rgba(22, 32, 54, .45);
  --shadow-3: inset 0 1px 0 rgba(255,255,255,.95), 0 24px 44px -24px rgba(22, 32, 54, .5);
  --shadow-4: inset 0 1px 0 rgba(255,255,255,.95), 0 34px 60px -28px rgba(22, 32, 54, .55);
  --glass-line: rgba(255, 255, 255, 0.95);
  --glass-glow: var(--primary);
  --glass-glow-alpha: 22%;
  --grain-opacity: 0.018;
  --grid-line: rgba(16, 22, 34, 0.5);
  --on-primary: #ffffff;
}

/* ---------- ТЁМНЫЕ ---------- */
html[data-style="glass"][data-theme^="dark-"] {
  --bg: #05070b;
  --surface: rgba(255, 255, 255, 0.062);
  --surface-2: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.075);
  --surface-selected: color-mix(in srgb, var(--primary) 16%, transparent);
  --text: #f3f5f9;
  --text-secondary: #b3bac6;
  --text-muted: #828b9a;
  --border: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.22);
  --shadow-1: inset 0 1px 0 rgba(255,255,255,.10), 0 12px 26px -22px rgba(0,0,0,.9);
  --shadow-2: inset 0 1px 0 rgba(255,255,255,.12), 0 18px 34px -24px rgba(0,0,0,.92);
  --shadow-3: inset 0 1px 0 rgba(255,255,255,.16), 0 26px 48px -26px rgba(0,0,0,.95);
  --shadow-4: inset 0 1px 0 rgba(255,255,255,.18), 0 36px 66px -30px rgba(0,0,0,.98);
  --glass-line: rgba(255, 255, 255, 0.34);
  --glass-glow: var(--primary);
  --glass-glow-alpha: 18%;
  --grain-opacity: 0.045;
  --grid-line: rgba(255, 255, 255, 0.5);
  --on-primary: #06101d;
}

/* ---------- ФОН ---------- */
html[data-style="glass"] body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 700px at 14% -12%, color-mix(in srgb, var(--glass-glow) var(--glass-glow-alpha), transparent), transparent 62%),
    radial-gradient(900px 620px at 102% 112%, color-mix(in srgb, var(--glass-glow) 10%, transparent), transparent 62%);
  background-attachment: fixed;
  color: var(--text);
  transition: background-color .4s var(--transition), color .4s var(--transition);
}

/* деликатное зерно + сетка (как в превью) */
html[data-style="glass"] body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: soft-light;
  background-size: 220px 220px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.42' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
html[data-style="glass"] .app,
html[data-style="glass"] .main,
html[data-style="glass"] .appbar,
html[data-style="glass"] .sidebar { position: relative; z-index: 1; }

/* ---------- САЙДБАР ---------- */
html[data-style="glass"] .sidebar {
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  box-shadow: none;
}
html[data-style="glass"] .sidebar-header { border-bottom: 1px solid var(--border); }
html[data-style="glass"] .brand-logo {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff), var(--primary));
  color: var(--on-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
}
html[data-style="glass"] .brand-text { font-weight: 600; letter-spacing: -0.01em; }
html[data-style="glass"] .sidebar-section-title {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
html[data-style="glass"] .nav-item {
  border-radius: var(--radius-md);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
html[data-style="glass"] .nav-item:hover { background: var(--surface-hover); transform: translateX(2px); }
html[data-style="glass"] .nav-item.active {
  background: var(--surface-selected);
  color: var(--text);
  box-shadow: inset 0 1px 0 var(--glass-line);
}
html[data-style="glass"] .nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 2px; height: 18px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: var(--primary);
}
html[data-style="glass"] .nav-item { position: relative; }
html[data-style="glass"] .sidebar-footer { border-top: 1px solid var(--border); }
html[data-style="glass"] .stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ---------- APPBAR ---------- */
html[data-style="glass"] .appbar {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: none;
}
html[data-style="glass"] .appbar-action {
  border-radius: var(--radius-md);
  transition: background var(--transition), transform var(--transition);
}
html[data-style="glass"] .appbar-action:hover { background: var(--surface-hover); }
html[data-style="glass"] .appbar-action:active { transform: scale(.94); }
html[data-style="glass"] .appbar-title { font-weight: 600; letter-spacing: -0.01em; }

/* ---------- КНОПКИ ---------- */
html[data-style="glass"] .btn {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 90%, #fff), var(--primary));
  color: var(--on-primary);
  border: 1px solid transparent;
  box-shadow: 0 12px 26px -16px color-mix(in srgb, var(--primary) 80%, transparent), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
html[data-style="glass"] .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px -16px color-mix(in srgb, var(--primary) 85%, transparent), inset 0 1px 0 rgba(255,255,255,.3);
}
html[data-style="glass"] .btn:active { transform: scale(.97); }
html[data-style="glass"] .btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: inset 0 1px 0 var(--glass-line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
html[data-style="glass"] .btn-ghost:hover { background: var(--surface-hover); border-color: var(--border-strong); transform: none; }
html[data-style="glass"] .btn-danger {
  background: linear-gradient(180deg, color-mix(in srgb, var(--error) 88%, #fff), var(--error));
}
html[data-style="glass"] .action-btn,
html[data-style="glass"] .btn-icon {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 var(--glass-line);
  transition: background var(--transition), transform var(--transition), color var(--transition);
}
html[data-style="glass"] .action-btn:hover,
html[data-style="glass"] .btn-icon:hover { background: var(--surface-hover); color: var(--text); transform: translateY(-1px); }
html[data-style="glass"] .action-btn:active { transform: scale(.92); }

/* ---------- КАРТОЧКИ / ПАНЕЛИ ---------- */
html[data-style="glass"] .vm-card,
html[data-style="glass"] .dash-card,
html[data-style="glass"] .dash-kpi-card,
html[data-style="glass"] .info-card,
html[data-style="glass"] .cluster-lb-tile,
html[data-style="glass"] .cluster-group,
html[data-style="glass"] .os-card,
html[data-style="glass"] .login-card,
html[data-style="glass"] .modal,
html[data-style="glass"] .theme-menu,
html[data-style="glass"] .warn-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  position: relative;
}
html[data-style="glass"] .vm-card { transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
html[data-style="glass"] .vm-card:hover,
html[data-style="glass"] .dash-kpi-card:hover,
html[data-style="glass"] .info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--border-strong);
}
/* световая кромка сверху (главный признак «стекла») */
html[data-style="glass"] .vm-card::after,
html[data-style="glass"] .dash-card::after,
html[data-style="glass"] .dash-kpi-card::after,
html[data-style="glass"] .info-card::after,
html[data-style="glass"] .login-card::after,
html[data-style="glass"] .modal::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(150deg, var(--glass-line), transparent 42%);
  opacity: .55;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
}
html[data-style="glass"] .dash-kpi-value { font-family: 'Roboto Mono', ui-monospace, monospace; letter-spacing: -0.02em; }
html[data-style="glass"] .dash-kpi-label { color: var(--text-secondary); }
html[data-style="glass"] .dash-card-title { font-weight: 600; letter-spacing: -0.01em; }

/* ---------- ТАБЛИЦЫ ---------- */
html[data-style="glass"] .vm-table-wrap,
html[data-style="glass"] .vm-table {
  background: transparent;
}
html[data-style="glass"] .vm-table thead th {
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
html[data-style="glass"] .vm-table tbody tr { transition: background var(--transition); }
html[data-style="glass"] .vm-table tbody tr:hover { background: var(--surface-hover); }
html[data-style="glass"] .vm-table tbody td { border-bottom: 1px solid var(--border); }
html[data-style="glass"] .vm-table tbody tr:last-child td { border-bottom: none; }

/* ---------- ПОЛЯ ---------- */
html[data-style="glass"] .form-row input,
html[data-style="glass"] .form-row select,
html[data-style="glass"] .form-row textarea,
html[data-style="glass"] input[type="text"],
html[data-style="glass"] input[type="email"],
html[data-style="glass"] input[type="password"],
html[data-style="glass"] input[type="number"],
html[data-style="glass"] select,
html[data-style="glass"] textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  box-shadow: inset 0 1px 0 var(--glass-line);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
html[data-style="glass"] .form-row input:focus,
html[data-style="glass"] .form-row select:focus,
html[data-style="glass"] textarea:focus,
html[data-style="glass"] input:focus,
html[data-style="glass"] select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent), inset 0 1px 0 var(--glass-line);
}
html[data-style="glass"] input[type="range"] { accent-color: var(--primary); }
html[data-style="glass"] .hint { color: var(--text-muted); }

/* ---------- ПИЛЮЛИ-СТАТУСЫ / ЧИПЫ ---------- */
html[data-style="glass"] .vm-state-chip,
html[data-style="glass"] .page-counter,
html[data-style="glass"] .user-chip {
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--glass-line);
}
html[data-style="glass"] .view-switcher {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}
html[data-style="glass"] .view-switcher button { border-radius: 999px; }
html[data-style="glass"] .view-switcher button.active {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff), var(--primary));
  color: var(--on-primary);
}

/* ---------- МОДАЛКИ ---------- */
html[data-style="glass"] .modal-backdrop {
  background: color-mix(in srgb, #000 62%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
html[data-style="glass"] .modal {
  box-shadow: var(--shadow-4);
  animation: glassModalIn 260ms cubic-bezier(.16, 1, .3, 1);
}
@keyframes glassModalIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}
html[data-style="glass"] .modal-head { border-bottom: 1px solid var(--border); background: transparent; }
html[data-style="glass"] .modal-foot { border-top: 1px solid var(--border); background: transparent; }
html[data-style="glass"] .modal-icon {
  background: var(--surface-selected);
  color: var(--primary);
  border-radius: var(--radius-md);
}
html[data-style="glass"] .modal-title { font-weight: 600; letter-spacing: -0.01em; }

/* ---------- ТЕМЫ ---------- */
html[data-style="glass"] .theme-menu-cyber { display: none !important; }
html[data-style="glass"] .theme-menu {
  padding: 8px;
  box-shadow: var(--shadow-3);
}
html[data-style="glass"] .theme-swatch {
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--glass-line);
  transition: transform var(--transition), box-shadow var(--transition);
}
html[data-style="glass"] .theme-option:hover .theme-swatch { transform: scale(1.12); }
html[data-style="glass"] .theme-option.active .theme-swatch {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary);
}

/* ---------- СЛУЖЕБНОЕ ---------- */
html[data-style="glass"] .snackbar-stack > * {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
html[data-style="glass"] .empty { color: var(--text-muted); }
html[data-style="glass"] .empty-title { color: var(--text-secondary); font-weight: 600; }
html[data-style="glass"] .warn-box {
  border-color: color-mix(in srgb, var(--warning) 40%, var(--border));
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
}
html[data-style="glass"] #styleToggleBtn { display: none !important; }

/* ---------- АНИМАЦИИ ВХОДА ---------- */
html[data-style="glass"] .view-container { animation: glassViewIn 320ms cubic-bezier(.16, 1, .3, 1); }
@keyframes glassViewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
html[data-style="glass"] .vm-card.is-new { animation: glassCardIn 380ms cubic-bezier(.16, 1, .3, 1) backwards; }
@keyframes glassCardIn {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: none; }
}

/* ---------- A11Y ---------- */
@media (prefers-reduced-motion: reduce) {
  html[data-style="glass"] * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ============================================================
   ЭКРАН ВХОДА / РЕГИСТРАЦИИ
   ============================================================ */
html[data-style="glass"] .login-bg {
  background: transparent;
}
html[data-style="glass"] .login-bg::before,
html[data-style="glass"] .login-bg::after {
  background: var(--primary);
  opacity: .18;
  filter: blur(110px);
}
html[data-style="glass"] .login-card {
  width: 400px;
  padding: 34px 32px 30px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  box-shadow: inset 0 1px 0 var(--glass-line), 0 40px 80px -40px rgba(0, 0, 0, .85);
  animation: glassCardIn 380ms cubic-bezier(.16, 1, .3, 1);
}
html[data-style="glass"] .login-logo { margin-bottom: 22px; gap: 12px; }
html[data-style="glass"] .login-logo h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
}
html[data-style="glass"] .login-logo p { font-size: 11.5px; color: var(--text-muted); }

/* табы «Вход / Регистрация» — пилюля */
html[data-style="glass"] #authTabLogin,
html[data-style="glass"] #authTabRegister {
  border-radius: 9px !important;
  transition: background var(--transition), color var(--transition);
}
html[data-style="glass"] #authTabLogin:not(.active),
html[data-style="glass"] #authTabRegister:not(.active) {
  color: var(--text-muted) !important;
}
html[data-style="glass"] #authTabLogin.active,
html[data-style="glass"] #authTabRegister.active {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff), var(--primary)) !important;
  color: var(--on-primary) !important;
  box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--primary) 80%, transparent);
}
html[data-style="glass"] .login-card .form-row label {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}
html[data-style="glass"] .login-card .btn {
  padding: 12px !important;
  font-size: 13.5px;
  border-radius: 12px;
}

/* ============================================================
   МАСТЕР СОЗДАНИЯ ВМ
   ============================================================ */
html[data-style="glass"] .os-card {
  border-width: 1px;
  border-color: var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 var(--glass-line);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
html[data-style="glass"] .os-card:hover:not(.selected) {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: var(--shadow-2);
}
html[data-style="glass"] .os-card.selected {
  border-color: color-mix(in srgb, var(--primary) 70%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent), inset 0 1px 0 var(--glass-line);
}
html[data-style="glass"] .os-card.selected img { transform: scale(1.06); }
html[data-style="glass"] .os-card .os-check {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--primary) 80%, transparent);
}
html[data-style="glass"] .os-card-name { font-size: 14.5px; font-weight: 600; }
html[data-style="glass"] .os-card-desc { font-size: 10.5px; color: var(--text-muted); }

/* превью стоимости в мастере */
html[data-style="glass"] #newVmCostPreview {
  background: color-mix(in srgb, var(--primary) 9%, var(--surface)) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--border));
  border-radius: var(--radius-lg) !important;
  padding: 14px 16px !important;
  box-shadow: inset 0 1px 0 var(--glass-line);
}

/* слайдеры CPU/RAM/диска */
html[data-style="glass"] input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--primary) 75%, transparent),
    color-mix(in srgb, var(--primary) 22%, transparent));
  outline: none;
}
html[data-style="glass"] input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--primary) 40%, #dfe3ea));
  border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .55), inset 0 1px 0 #fff;
  cursor: pointer;
  transition: transform .18s var(--spring, cubic-bezier(.34,1.56,.64,1));
}
html[data-style="glass"] input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }
html[data-style="glass"] input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .5);
  cursor: pointer;
}
html[data-style="glass"] .form-row label b { color: var(--text); font-weight: 600; }

/* ============================================================
   K8s: ЗАКАЗ КЛАСТЕРА И КАРТОЧКА
   ============================================================ */
html[data-style="glass"] .cluster-section-title {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
html[data-style="glass"] .cluster-steps {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 var(--glass-line);
}
html[data-style="glass"] .cluster-group {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 var(--glass-line);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
html[data-style="glass"] .cluster-group:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-2);
}
html[data-style="glass"] .cluster-group-head {
  border-bottom: 1px solid var(--border);
}
html[data-style="glass"] .cluster-group-head-right,
html[data-style="glass"] .cluster-cost {
  font-variant-numeric: tabular-nums;
}
html[data-style="glass"] .cluster-lb-tile,
html[data-style="glass"] .cluster-ng-add,
html[data-style="glass"] .node-grid .os-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 var(--glass-line);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
html[data-style="glass"] .cluster-lb-tile:hover,
html[data-style="glass"] .cluster-ng-add:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: var(--shadow-2);
}
html[data-style="glass"] .cluster-lb-price,
html[data-style="glass"] .cluster-section-price {
  border-top: 1px dashed var(--border);
}

/* ============================================================
   ФИНАНСЫ / ОБЗОР: графики и списки
   ============================================================ */
html[data-style="glass"] .dash-donut-wrap,
html[data-style="glass"] .tm-canvas-wrap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 var(--glass-line);
}
html[data-style="glass"] .dash-row {
  border-top: 1px solid var(--border);
}
html[data-style="glass"] .dash-row > * { min-width: 0; }
html[data-style="glass"] .dash-legend-row {
  border-bottom: 1px dashed var(--border);
  padding: 6px 0;
}
html[data-style="glass"] .dash-legend-row:last-child { border-bottom: 0; }
html[data-style="glass"] .dash-legend-swatch {
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
}
html[data-style="glass"] .info-card-grid {
  display: grid;
  gap: 12px;
}
html[data-style="glass"] .info-card-label {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* ============================================================
   АДМИНКА
   ============================================================ */
html[data-style="glass"] .admin-layout > * { min-width: 0; }
html[data-style="glass"] .user-chip {
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--glass-line);
}
html[data-style="glass"] #adminUsersList > * {
  border-radius: var(--radius-md);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
html[data-style="glass"] #adminUsersList > *:hover {
  background: var(--surface-hover);
  transform: translateX(2px);
}
html[data-style="glass"] #adminUsersList > .selected,
html[data-style="glass"] #adminUsersList > [style*="border-color"],
html[data-style="glass"] #adminUsersList > [style*="border-left"] {
  background: var(--surface-selected);
}

/* ============================================================
   МОДАЛКИ: таблицы и списки внутри
   ============================================================ */
html[data-style="glass"] .modal-body table thead th {
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
html[data-style="glass"] .modal-body table tbody tr { transition: background var(--transition); }
html[data-style="glass"] .modal-body table tbody tr:hover { background: var(--surface-hover); }
html[data-style="glass"] .modal-body table tbody td { border-bottom: 1px solid var(--border); }

/* бейджи статусов VM в таблицах и карточках */
html[data-style="glass"] .vm-state-chip {
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
}
html[data-style="glass"] .sort-ind { opacity: .45; }

/* ============================================================
   ТЕМЫ: сетка 4 × 2 (4 светлых / 4 тёмных)
   ============================================================ */
html[data-style="glass"] .theme-menu {
  padding: 10px 10px 8px;
  border-radius: 16px;
  min-width: 232px;
}
html[data-style="glass"] .theme-menu-section {
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  padding: 6px 2px 4px;
}
html[data-style="glass"] .theme-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}
html[data-style="glass"] .theme-option:hover {
  background: var(--surface-hover);
  color: var(--text);
}
html[data-style="glass"] .theme-option.active {
  background: var(--surface-selected);
  color: var(--text);
  font-weight: 600;
}
html[data-style="glass"] .theme-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .22), 0 2px 6px -3px rgba(0, 0, 0, .5);
}
html[data-style="glass"] .theme-option.active .theme-swatch {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary);
}

/* ============================================================
   СНЭКБАРЫ, ТУЛТИПЫ, СКРОЛЛБАР
   ============================================================ */
html[data-style="glass"] .snackbar-stack { gap: 8px; }
html[data-style="glass"] .snackbar-stack > * {
  border-radius: 12px;
  box-shadow: var(--shadow-3);
  font-size: 12.5px;
}
html[data-style="glass"] .tip-popup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
  font-size: 11.5px;
}
html[data-style="glass"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-style="glass"] ::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text) 18%, transparent);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
html[data-style="glass"] ::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--text) 30%, transparent);
  background-clip: content-box;
}

/* ============================================================
   МОБИЛЬНЫЙ DRAWER
   ============================================================ */
html[data-style="glass"] .sidebar-overlay {
  background: rgba(4, 6, 10, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
html[data-style="glass"] .app.sidebar-open .sidebar {
  box-shadow: 0 0 0 1px var(--border), 30px 0 80px -40px rgba(0, 0, 0, .9);
}

/* ============================================================
   КАРТОЧКА ВМ: выбранное состояние, метаданные, статусы
   ============================================================ */
html[data-style="glass"] .vm-card.selected {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent), var(--shadow-2);
}
html[data-style="glass"] .vm-card-head { border-bottom: 1px solid transparent; }
html[data-style="glass"] .vm-card-id,
html[data-style="glass"] .vm-id-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--text-muted);
}
html[data-style="glass"] .vm-card-name { font-weight: 600; letter-spacing: -.01em; }
html[data-style="glass"] .vm-meta { border-top: 1px dashed var(--border); padding-top: 8px; }
html[data-style="glass"] .vm-meta-item { color: var(--text-secondary); font-size: 11.5px; }
html[data-style="glass"] .vm-meta-item b,
html[data-style="glass"] .vm-meta-item strong { color: var(--text); font-weight: 600; }
html[data-style="glass"] .vm-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}
html[data-style="glass"] .vm-actions {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  gap: 4px;
}
html[data-style="glass"] .vm-actions .action-btn { width: 28px; height: 28px; }
html[data-style="glass"] .ip-copy-btn {
  background: rgba(127, 127, 127, .10);
  border: 1px solid var(--border-soft, var(--border));
  border-radius: 7px;
  transition: background var(--transition), color var(--transition);
}
html[data-style="glass"] .ip-copy-btn:hover { background: var(--surface-hover); }

/* ============================================================
   МОДАЛКИ ВМ: бэкапы, тома, диски, rescue, история, метрики
   ============================================================ */
html[data-style="glass"] #vmBackupsList > *,
html[data-style="glass"] #vmVolumesList > * {
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
html[data-style="glass"] #vmBackupsList > *:hover,
html[data-style="glass"] #vmVolumesList > *:hover { background: var(--surface-hover); }

/* заголовки «секций» внутри модалок (h4/h5/p с bold) */
html[data-style="glass"] .modal-body > div[style*="font-weight:700"],
html[data-style="glass"] .modal-body .panel-title { letter-spacing: -.01em; }

/* метрики ВМ */
html[data-style="glass"] .tm-stat-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 var(--glass-line);
  padding: 10px 12px;
}
html[data-style="glass"] .tm-stat-label {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
html[data-style="glass"] .tm-stat-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}
html[data-style="glass"] .tm-range-switcher {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  display: inline-flex;
  gap: 2px;
}
html[data-style="glass"] .tm-range-btn {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
html[data-style="glass"] .tm-range-btn.active,
html[data-style="glass"] .tm-range-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff), var(--primary));
  color: var(--on-primary);
}
html[data-style="glass"] .tm-canvas-wrap {
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 var(--glass-line);
}
html[data-style="glass"] .tm-canvas-wrap canvas { border-radius: 10px; }

/* empty-состояния */
html[data-style="glass"] .empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  padding: 22px 16px;
}
html[data-style="glass"] .empty .material-icons-round { opacity: .5; }
html[data-style="glass"] .empty-title { font-size: 13.5px; }

/* ресурсы/слайдеры в модалке resize */
html[data-style="glass"] .modal-body .hint { color: var(--text-muted); }
html[data-style="glass"] .modal-body input[type="number"] {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  text-align: right;
}

/* ============================================================
   ПРОФИЛЬ / SSH-КЛЮЧИ / КВОТА
   ============================================================ */
html[data-style="glass"] .modal-body h4,
html[data-style="glass"] .modal-body h5 {
  letter-spacing: -.01em;
  font-weight: 600;
}
/* список SSH-ключей */
html[data-style="glass"] #profileSshList > * {
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
html[data-style="glass"] #profileSshList > *:hover { background: var(--surface-hover); }
html[data-style="glass"] #profileSshNew {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  line-height: 1.5;
}
/* блок «SSH-ключи» в профиле — отдельная стеклянная секция */
html[data-style="glass"] #modalProfile .info-card,
html[data-style="glass"] #modalQuota .info-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 var(--glass-line);
  padding: 14px 16px;
}
/* поля квот: числа моно, подписи капсом */
html[data-style="glass"] #modalQuota .form-row label {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
html[data-style="glass"] #modalQuota input[type="number"] {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  text-align: right;
  font-weight: 600;
}
/* код-пароль в credentials */
html[data-style="glass"] #modalCredentials code,
html[data-style="glass"] #modalCredentials .mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 8px;
}

/* ============================================================
   КАРТОЧКА K8s-КЛАСТЕРА
   ============================================================ */
html[data-style="glass"] .cluster-group-spec {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
html[data-style="glass"] .cluster-group-head {
  font-weight: 600;
  letter-spacing: -.01em;
}
html[data-style="glass"] .cluster-group-head-right {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--text);
}
html[data-style="glass"] .node-grid {
  display: grid;
  gap: 10px;
}
html[data-style="glass"] .node-grid .os-card,
html[data-style="glass"] .node-grid > * {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 var(--glass-line);
}
html[data-style="glass"] .tile-full { grid-column: 1 / -1; }
html[data-style="glass"] .cluster-ng-live { font-variant-numeric: tabular-nums; }
html[data-style="glass"] .cluster-ng-actions .btn-icon { width: 28px; height: 28px; }

/* ============================================================
   БАННЕР ЗАМОРОЗКИ
   ============================================================ */
html[data-style="glass"] #freezeBanner {
  background: color-mix(in srgb, var(--error) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--error) 34%, var(--border));
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 var(--glass-line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ============================================================
   ТАБЛИЧНЫЙ ВИД СПИСКА ВМ
   ============================================================ */
html[data-style="glass"] .vm-table {
  border-collapse: separate;
  border-spacing: 0;
}
html[data-style="glass"] .vm-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
html[data-style="glass"] .vm-table tbody tr.selected {
  background: var(--surface-selected);
}
html[data-style="glass"] .vm-table tbody td:first-child { padding-left: 18px; }
html[data-style="glass"] .vm-table tbody td:last-child { padding-right: 18px; }
html[data-style="glass"] .vm-name-cell { font-weight: 600; }
html[data-style="glass"] .vm-os-icon-table { opacity: .95; }

/* ============================================================
   ФИНАНСЫ: KPI и история транзакций
   ============================================================ */
html[data-style="glass"] #billingBalance,
html[data-style="glass"] #billingHourly,
html[data-style="glass"] #billingMonthly,
html[data-style="glass"] #billingDeadline {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: -.01em;
}
html[data-style="glass"] #billingStatus,
html[data-style="glass"] #billingQuotaRest,
html[data-style="glass"] #billingDeadlineSub {
  font-size: 11px;
  color: var(--text-muted);
}
html[data-style="glass"] #billingQuotaVm,
html[data-style="glass"] #billingQuotaCpu {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* карточка истории транзакций */
html[data-style="glass"] #billingTxList {
  margin-top: 10px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
html[data-style="glass"] #billingTxList .vm-table {
  width: 100%;
}
html[data-style="glass"] #billingTxList .vm-table thead th {
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 9px 12px;
}
html[data-style="glass"] #billingTxList .vm-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
html[data-style="glass"] #billingTxList .vm-table tbody tr:last-child td { border-bottom: 0; }
html[data-style="glass"] #billingTxList .vm-table tbody tr:hover { background: var(--surface-hover); }
html[data-style="glass"] #billingTxList .vm-table tbody td:first-child { padding-left: 16px; }
html[data-style="glass"] #billingTxList .vm-table tbody td:last-child { padding-right: 16px; }

/* ============================================================
   ОБЗОР: легенда и бэкапы
   ============================================================ */
html[data-style="glass"] #dashDonutLegend .dash-legend-row { align-items: center; }
html[data-style="glass"] #dashDonutLegend .dash-legend-value,
html[data-style="glass"] #dashDonutLegend .dash-legend-pct {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--text);
}
html[data-style="glass"] #dashDonutLegend .dash-legend-label {
  color: var(--text-secondary);
  font-size: 11.5px;
}
html[data-style="glass"] #kpiBackupCount,
html[data-style="glass"] #kpiBackupSize,
html[data-style="glass"] #kpiMonthlyProjection,
html[data-style="glass"] #kpiHourlyRate,
html[data-style="glass"] #kpiCpuTotal,
html[data-style="glass"] #kpiRamTotal,
html[data-style="glass"] #kpiDiskTotal,
html[data-style="glass"] #kpiTotalVms,
html[data-style="glass"] #kpiActiveVms {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: -.01em;
}

/* ============================================================
   МОБИЛЬНЫЙ ПРОГОН (≤640): без «жирных» эффектов, читаемо
   ============================================================ */
@media (max-width: 640px) {
  html[data-style="glass"] .vm-card,
  html[data-style="glass"] .dash-card,
  html[data-style="glass"] .dash-kpi-card,
  html[data-style="glass"] .login-card,
  html[data-style="glass"] .modal {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  html[data-style="glass"] .login-card {
    padding: 24px 20px 22px;
    width: 100%;
  }
  html[data-style="glass"] .theme-menu { min-width: 210px; }
  html[data-style="glass"] .os-card { padding: 14px 8px 12px; }
  html[data-style="glass"] .os-card img { width: 44px; height: 44px; }
  html[data-style="glass"] .modal-body { padding: 14px; }
  html[data-style="glass"] #billingTxList .vm-table { min-width: 520px; }
}

/* ============================================================
   ФИНАЛЬНАЯ ПОЛИРОВКА: заголовки, счётчики, мелочи
   ============================================================ */
html[data-style="glass"] .page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
html[data-style="glass"] .page-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.02em;
}
html[data-style="glass"] .page-counter {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
}
html[data-style="glass"] .appbar-spacer { flex: 1; }
html[data-style="glass"] .appbar-burger {
  border-radius: var(--radius-md);
  transition: background var(--transition), transform var(--transition);
}
html[data-style="glass"] .appbar-burger:active { transform: scale(.92); }

/* баланс и статистика в сайдбаре */
html[data-style="glass"] .nav-finance-inline {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
html[data-style="glass"] .nav-finance-amount {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
html[data-style="glass"] .nav-finance-eta {
  font-size: 9.5px;
  color: var(--warn);
  letter-spacing: .02em;
}
html[data-style="glass"] .stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11.5px;
  color: var(--text-secondary);
  padding: 2px 0;
}
html[data-style="glass"] .stat-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

/* K8s-заказ: счётчик воркеров и опции */
html[data-style="glass"] .cluster-ng-count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 600;
  min-width: 22px;
  text-align: center;
}
html[data-style="glass"] .cluster-ng-opts,
html[data-style="glass"] .cluster-ng-add-head,
html[data-style="glass"] .cluster-ng-add-foot {
  gap: 8px;
}
html[data-style="glass"] .cluster-ng-add {
  border-style: dashed;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}
html[data-style="glass"] .cluster-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft, var(--surface-selected));
  color: var(--primary);
}
html[data-style="glass"] .cluster-groups { display: grid; gap: 10px; }
html[data-style="glass"] .cluster-lb-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
html[data-style="glass"] .cluster-lb-price-head,
html[data-style="glass"] .cluster-lb-price-list {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
}
html[data-style="glass"] .cluster-lb-hint,
html[data-style="glass"] .cluster-spec-empty {
  font-size: 11px;
  color: var(--text-muted);
}
html[data-style="glass"] .cluster-section-split {
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  margin-top: 12px;
}
html[data-style="glass"] .ng-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 var(--glass-line);
}
html[data-style="glass"] .ng-block-head { border-bottom: 1px solid var(--border); }
html[data-style="glass"] .ng-block-title { font-weight: 600; font-size: 12.5px; }

/* Обзор: подписи KPI и пустые состояния */
html[data-style="glass"] .dash-kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}
html[data-style="glass"] .dash-kpi-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
html[data-style="glass"] .dash-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  padding: 18px;
  text-align: center;
}
html[data-style="glass"] .dash-donut-legend { display: grid; gap: 4px; }
html[data-style="glass"] .dash-donut-svg { filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .25)); }

/* мелочи */
html[data-style="glass"] .modal-close {
  border-radius: 9px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
html[data-style="glass"] .modal-close:hover { background: var(--surface-hover); color: var(--text); }
html[data-style="glass"] .modal-close:active { transform: scale(.9); }
html[data-style="glass"] .unit {
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: .04em;
}
html[data-style="glass"] .form-grid-2 {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}
html[data-style="glass"] .auth-tab { transition: background var(--transition), color var(--transition); }
html[data-style="glass"] .pulse {
  animation: glassPulse 1.8s ease-in-out infinite;
}
@keyframes glassPulse {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

/* ============================================================
   ОСТАТКИ: сетки, подписи, утилиты
   ============================================================ */
html[data-style="glass"] .vm-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
html[data-style="glass"] .vm-card-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
}
html[data-style="glass"] .vm-table-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}
html[data-style="glass"] .vm-table-actions .action-btn { width: 26px; height: 26px; }
html[data-style="glass"] .sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
html[data-style="glass"] .nav-label { font-size: 12.5px; }
html[data-style="glass"] .tile-short,
html[data-style="glass"] .wide { min-width: 0; }
html[data-style="glass"] .theme-menu-modern { display: block; }

/* ============================================================
   МИКРОАНИМАЦИИ (стекло)
   ============================================================ */
html[data-style="glass"] .cluster-ng-count {
  display: inline-block;
  transition: color var(--transition);
}
html[data-style="glass"] .cluster-ng-count.is-bump {
  animation: glassNumBump 420ms cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes glassNumBump {
  0%   { transform: translateY(0) scale(1); color: var(--text); }
  35%  { transform: translateY(-5px) scale(1.14); color: var(--primary); }
  100% { transform: translateY(0) scale(1); color: var(--text); }
}
html[data-style="glass"] .cluster-ng-add .btn:active,
html[data-style="glass"] .cluster-ng-actions .btn-icon:active {
  transform: scale(.9);
}

/* ============================================================
   ГРАФИКИ: мягкое появление при открытии модалки/вкладки
   ============================================================ */
html[data-style="glass"] .tm-canvas-wrap {
  animation: glassChartIn 420ms cubic-bezier(.16, 1, .3, 1) both;
}
html[data-style="glass"] .tm-canvas-wrap:nth-of-type(2) { animation-delay: 70ms; }
html[data-style="glass"] .tm-canvas-wrap:nth-of-type(3) { animation-delay: 140ms; }
html[data-style="glass"] .tm-canvas-wrap:nth-of-type(4) { animation-delay: 210ms; }
@keyframes glassChartIn {
  from { opacity: 0; transform: translateY(10px) scale(.99); }
  to   { opacity: 1; transform: none; }
}
html[data-style="glass"] .dash-donut-svg,
html[data-style="glass"] #dashDonut {
  animation: glassChartIn 480ms cubic-bezier(.16, 1, .3, 1) both;
}
/* полосы/столбики bar-графиков, если это DOM, а не canvas */
html[data-style="glass"] .dash-row .bar > i {
  animation: glassBarGrow 620ms cubic-bezier(.16, 1, .3, 1) both;
  transform-origin: left center;
}
@keyframes glassBarGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ============================================================
   СНЭКБАРЫ: варианты по типу сообщения
   ============================================================ */
html[data-style="glass"] .snackbar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: glassSnackIn 280ms cubic-bezier(.16, 1, .3, 1) both;
}
html[data-style="glass"] .snackbar.leaving {
  animation: glassSnackOut 240ms ease forwards;
}
html[data-style="glass"] .snackbar.success {
  background: color-mix(in srgb, var(--success) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--success) 40%, var(--border));
  color: var(--text);
}
html[data-style="glass"] .snackbar.error {
  background: color-mix(in srgb, var(--error) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--error) 42%, var(--border));
  color: var(--text);
}
html[data-style="glass"] .snackbar.success .material-icons-round { color: var(--success); }
html[data-style="glass"] .snackbar.error .material-icons-round { color: var(--error); }
@keyframes glassSnackIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes glassSnackOut {
  to { opacity: 0; transform: translateY(8px) scale(.98); }
}

/* ============================================================
   ЗАГРУЗКА: «дышащая» иконка в пустых состояниях
   ============================================================ */
html[data-style="glass"] .empty .material-icons-round {
  animation: glassBreathe 1.9s ease-in-out infinite;
}
@keyframes glassBreathe {
  0%, 100% { opacity: .35; transform: scale(.97); }
  50%      { opacity: .7;  transform: scale(1.03); }
}

/* ============================================================
   КАРТОЧКИ: чуть более «дорогой» hover
   ============================================================ */
html[data-style="glass"] .vm-card:hover,
html[data-style="glass"] .dash-kpi-card:hover,
html[data-style="glass"] .info-card:hover {
  transform: translateY(-3px);
}
html[data-style="glass"] .vm-card:active { transform: translateY(-1px) scale(.995); }

/* кнопки действий на карточке ВМ: подсветка при hover */
html[data-style="glass"] .vm-actions .action-btn:hover {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

/* ============================================================
   ТЕМА НА ЭКРАНЕ ВХОДА
   ============================================================ */
html[data-style="glass"] .login-themes {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
html[data-style="glass"] .login-themes-label {
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
html[data-style="glass"] .login-themes-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}
html[data-style="glass"] .login-theme {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  cursor: pointer;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
html[data-style="glass"] .login-theme::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2);
}
html[data-style="glass"] .login-theme:hover {
  transform: translateY(-2px) scale(1.08);
  border-color: var(--border-strong);
}
html[data-style="glass"] .login-theme:active { transform: scale(.92); }
html[data-style="glass"] .login-theme.active {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--dot);
}

/* ============================================================
   ЗЕРНО: делаем его заметным (v2), но всё ещё деликатным
   ============================================================ */
html[data-style="glass"] {
  --grain-opacity: .09;
}
html[data-style="glass"][data-theme^="light-"] { --grain-opacity: .05; }
html[data-style="glass"][data-theme^="dark-"]  { --grain-opacity: .09; }
html[data-style="glass"] body::after {
  /* overlay/soft-light на почти чёрном фоне гасят шум в ноль — обычная
     альфа-композиция даёт ту самую «плёночную» крупу из макета */
  mix-blend-mode: normal;
  background-size: 180px 180px;
  opacity: var(--grain-opacity);
  z-index: 3;
  pointer-events: none;
}
