
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');
/**
 * @violin-tutor/design-system
 * Точка входа — импортирует токены, базовые стили и компоненты.
 *
 * Подключение в HTML:
 *   <link rel="stylesheet" href="/design-system/index.css">
 *
 * Подключение через PostCSS / CSS-in-JS:
 *   @import '@violin-tutor/design-system';
 *//**
 * Color Tokens — @violin-tutor/design-system
 *
 * Это единственный источник правды для всех цветов проекта.
 * Меняй значения здесь — изменения применятся везде.
 */

:root {
  /* ── Backgrounds ─────────────────────────────────────── */
  --bg:    #0a0a12;   /* базовый фон страницы              */
  --bg2:   #0f0f1e;   /* приподнятые поверхности (sidebar) */
  --bg3:   #151525;   /* поверхность (инпуты, code-блоки)  */
  --card:  #1a1a2e;   /* карточки                          */
  --card2: #1f1f38;   /* карточки второго уровня           */

  /* ── Brand / Accent ──────────────────────────────────── */
  --accent:  #e8b86d;
  --accent2: #c9a14a;   /* hover-состояние акцента          */

  /* ── Semantic ────────────────────────────────────────── */
  --green:  #4ade80;   /* успех, хорошее состояние          */
  --red:    #f87171;   /* ошибка, предупреждение            */
  --blue:   #60a5fa;   /* информация, темп                  */
  --purple: #a78bfa;   /* специальные состояния             */

  /* ── Text ────────────────────────────────────────────── */
  --text:  #f0eee8;   /* основной текст                     */
  --text2: #a09e9a;   /* второстепенный текст               */
  --text3: #706e6a;   /* приглушённый / лейблы              */

  /* ── Borders ─────────────────────────────────────────── */
  --border:        rgba(232, 184, 109, 0.15);
  --border-subtle: rgba(232, 184, 109, 0.08);
  --border-strong: rgba(232, 184, 109, 0.35);

  /* ── Semantic extended ───────────────────────────────── */
  --yellow: #fbbf24;   /* задачи, предупреждения            */

  /* ── Glass / Depth ───────────────────────────────────── */
  --glass-bg:     rgba(26, 26, 46, 0.60);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* ── Gradients ───────────────────────────────────────── */
  --gradient-accent: linear-gradient(135deg, var(--accent), var(--purple));
  --gradient-warm:   linear-gradient(135deg, rgba(232,184,109,0.08), rgba(167,139,250,0.05));
  --gradient-card:   linear-gradient(135deg, var(--card), var(--card2));
}
/**
 * Typography Tokens — @violin-tutor/design-system
 * Шрифты загружаются через Google Fonts — единственный источник.
 */

:root {
  /* ── Шрифты ──────────────────────────────────────────── */
  --font-display: 'Playfair Display', serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  /* ── Размеры текста ──────────────────────────────────── */
  --text-xs:   12px;
  --text-sm:   13px;
  --text-base: 13px;
  --text-md:   14px;
  --text-lg:   15px;
  --text-xl:   18px;
  --text-2xl:  20px;
  --text-3xl:  24px;
  --text-4xl:  28px;
  --text-5xl:  46px;

  /* ── Межстрочный интервал ────────────────────────────── */
  --leading-tight:  1;
  --leading-normal: 1.55;
}
/**
 * Spacing Tokens — @violin-tutor/design-system
 * Шаг сетки: 4px
 */

:root {
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  28px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
}
/**
 * Border Radius Tokens — @violin-tutor/design-system
 */

:root {
  --radius-sm:   4px;
  --radius:      8px;
  --radius-md:   10px;
  --radius-lg:   12px;
  --radius-xl:   14px;
  --radius-2xl:  16px;
  --radius-full: 9999px;
}
/**
 * Shadow Tokens — @violin-tutor/design-system
 */

:root {
  --shadow-sm:          0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md:          0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg:          0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl:          0 16px 48px rgba(0, 0, 0, 0.7);
  --shadow-accent-glow: 0 0 8px rgba(232, 184, 109, 0.5);
  --shadow-accent-soft: 0 0 24px rgba(232, 184, 109, 0.15);
  --shadow-glow:        0 0 20px rgba(232, 184, 109, 0.20);
}
/**
 * Transition Tokens — @violin-tutor/design-system
 */

:root {
  --transition-fast: all 0.15s ease;
  --transition-base: all 0.20s ease;
  --transition-slow: all 0.30s ease;
}
/**
 * Z-Index Scale — @violin-tutor/design-system
 *
 * Единый источник истины для z-index.
 * Использование: z-index: var(--z-modal);
 *
 * Уровни:
 *   base      — обычный контент
 *   raised    — карточки с box-shadow (без z-index нет смысла)
 *   sticky    — шапка, sidebar
 *   dropdown  — выпадающие меню, тултипы относительно контента
 *   overlay   — полупрозрачный backdrop
 *   modal     — модальные окна
 *   toast     — уведомления (поверх модалей)
 *   tooltip   — тултипы (всегда сверху)
 */

:root {
  --z-base:     0;
  --z-raised:   10;
  --z-sticky:   100;
  --z-dropdown: 200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
  --z-tooltip:  600;
  --z-slider:   700;
}
/**
 * Reset — @violin-tutor/design-system
 */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/**
 * Base body & global styles — @violin-tutor/design-system
 */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
}

/* Thin accent scrollbars */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: var(--border); }

/* Text selection */
::-moz-selection {
  background: rgba(232, 184, 109, 0.25);
  color: var(--text);
}
::selection {
  background: rgba(232, 184, 109, 0.25);
  color: var(--text);
}
/**
 * Icon — @violin-tutor/design-system
 * Использование: <svg class="icon icon-md" aria-hidden="true">
 *                  <use href="/src/icons.svg#icon-NAME"></use>
 *                </svg>
 */

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

/* Fixed sizes */
.icon-xs  { width: 12px; height: 12px; }
.icon-sm  { width: 14px; height: 14px; }
.icon-md  { width: 16px; height: 16px; }
.icon-lg  { width: 18px; height: 18px; }
.icon-xl  { width: 20px; height: 20px; }
.icon-2xl { width: 24px; height: 24px; }
.icon-3xl { width: 32px; height: 32px; }

/* Semantic colours */
.icon-accent  { color: var(--accent);  }
.icon-green   { color: var(--green);   }
.icon-red     { color: var(--red);     }
.icon-blue    { color: var(--blue);    }
.icon-purple  { color: var(--purple);  }
.icon-yellow  { color: var(--yellow);  }
.icon-muted   { color: var(--text3);   }
/**
 * Button — @violin-tutor/design-system
 *
 * Base:      .btn
 * Variants:  .btn-primary  .btn-secondary  .btn-danger
 *            .btn-ghost    .btn-gradient
 * Sizes:     .btn-sm  .btn-xs
 * States:    :disabled / [disabled] / .btn-loading
 * Aliases:   .btn-save → .btn-primary  |  .btn-cancel → .btn-secondary
 *            .btn-search → .btn-primary .btn-sm
 */

/* ── Base ────────────────────────────────────────────────── */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: var(--text-md);
  font-weight: 600;
  font-family: var(--font-body);
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

/* ── Primary — accent gold ───────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: #0a0a12;
  justify-content: center;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent2);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* ── Secondary — subtle border ──────────────────────────── */
.btn-secondary {
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Ghost — transparent, accent hover ──────────────────── */
.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(232, 184, 109, 0.08);
  border-color: var(--border-strong);
  color: var(--accent);
}

/* ── Gradient — premium feel ────────────────────────────── */
.btn-gradient {
  background: var(--gradient-accent);
  color: #0a0a12;
  border: none;
}
.btn-gradient:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* ── Danger ──────────────────────────────────────────────── */
.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
  border: 1px solid rgba(248, 113, 113, 0.25);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.22);
  border-color: rgba(248, 113, 113, 0.4);
}

/* ── Sizes ───────────────────────────────────────────────── */
.btn-sm {
  padding: 7px 14px;
  font-size: var(--text-sm);
  gap: 6px;
}
.btn-xs {
  padding: 4px 10px;
  font-size: var(--text-xs);
  gap: 4px;
}

/* ── Disabled ────────────────────────────────────────────── */
.btn:disabled,
.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Loading ─────────────────────────────────────────────── */
.btn-loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn-loading::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ── Aliases (backward compat) ───────────────────────────── */
/* prefer .btn .btn-primary instead of .btn-save */
.btn-save   { padding:10px 20px; background:var(--accent); border:none; color:#0a0a12; border-radius:var(--radius); font-weight:600; cursor:pointer; font-family:var(--font-body); font-size:var(--text-md); transition:var(--transition-base); }
.btn-save:hover:not(:disabled) { background:var(--accent2); }
/* prefer .btn .btn-secondary instead of .btn-cancel */
.btn-cancel { padding:10px 20px; border:1px solid var(--border); background:none; color:var(--text2); border-radius:var(--radius); cursor:pointer; font-family:var(--font-body); font-size:var(--text-md); transition:var(--transition-base); }
.btn-cancel:hover:not(:disabled) { border-color:var(--accent); color:var(--accent); }
/* prefer .btn .btn-primary .btn-sm instead of .btn-search */
.btn-search { padding:9px 18px; background:var(--accent); border:none; border-radius:var(--radius); color:#0a0a12; font-weight:600; font-size:var(--text-base); cursor:pointer; font-family:var(--font-body); transition:var(--transition-base); }
.btn-search:hover:not(:disabled) { background:var(--accent2); }

/* ── Table actions ───────────────────────────────────────── */
.action-btn-sm {
  padding: 5px 10px;
  font-size: var(--text-sm);
  border: 1px solid var(--border);
  background: none;
  color: var(--text2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.action-btn-sm:hover        { border-color: var(--accent); color: var(--accent); }
.action-btn-sm.danger:hover { border-color: var(--red);    color: var(--red);    }

.action-btn {
  flex: 1;
  padding: 8px;
  font-size: var(--text-sm);
  border: 1px solid var(--border);
  background: none;
  color: var(--text2);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition-base);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.action-btn:hover        { border-color: var(--accent); color: var(--accent); }
.action-btn.danger:hover { border-color: var(--red);    color: var(--red);    }
/**
 * Form — @violin-tutor/design-system
 * .form-group  .form-control  .form-select  .form-error  .search-input
 */

.form-group { margin-bottom: var(--space-4); }

.form-group label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  color: var(--text);
  font-size: var(--text-md);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}
.form-control:focus {
  border-color: rgba(232, 184, 109, 0.5);
}
.form-control::-moz-placeholder { color: var(--text3); }
.form-control::placeholder { color: var(--text3); }

.form-select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  color: var(--text);
  font-size: var(--text-md);
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
}

.form-error {
  color: var(--red);
  font-size: var(--text-sm);
  margin-top: 6px;
}

/* Inline search — tables, admin panels */
.search-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 12px;
  color: var(--text);
  font-size: var(--text-base);
  font-family: var(--font-body);
  outline: none;
  width: 220px;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: rgba(232, 184, 109, 0.5); }

/* Admin filter row inputs */
.filter-input {
  padding: 9px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--text-base);
  font-family: var(--font-body);
  outline: none;
  min-width: 220px;
  transition: border-color 0.2s;
}
.filter-input:focus { border-color: rgba(232, 184, 109, 0.4); }

.filter-select {
  padding: 9px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--text-base);
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
}
.filter-select option { background: var(--card); }

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

/* Two-column form row */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Hint text below inputs */
.hint { font-size: var(--text-sm); color: var(--text3); margin-top: 4px; }

/* ── Floating Label ───────────────────────────────────────── */
/*
  Разметка:
    <div class="float-label-wrap">
      <input class="form-control" id="email" placeholder=" ">
      <label for="email">Email</label>
    </div>

  Важно: placeholder=" " (пробел) — нужен для :placeholder-shown.
*/

.float-label-wrap {
  position: relative;
  margin-bottom: var(--space-4);
}

.float-label-wrap .form-control {
  padding-top: 20px;
  padding-bottom: 8px;
}

.float-label-wrap label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-md);
  color: var(--text3);
  pointer-events: none;
  transition: var(--transition-fast);
  background: transparent;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

/* Лейбл поднимается когда поле заполнено или в фокусе */
.float-label-wrap .form-control:not(:-moz-placeholder) + label {
  top: 10px;
  transform: translateY(0);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.5px;
}
.float-label-wrap .form-control:focus + label,
.float-label-wrap .form-control:not(:placeholder-shown) + label {
  top: 10px;
  transform: translateY(0);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.5px;
}

/* Акцентная нижняя линия вместо рамки */
.float-label-wrap .form-control:focus {
  border-color: rgba(232, 184, 109, 0.5);
  box-shadow: 0 2px 0 -1px rgba(232, 184, 109, 0.3);
}

/* Вариант с нижним бордером (Material-style) */
.float-label-wrap.underline .form-control {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding-left: 0;
}

.float-label-wrap.underline label { left: 0; }

.float-label-wrap.underline .form-control:focus {
  border-bottom-color: var(--accent);
  box-shadow: none;
}

.float-label-wrap.underline .form-control:not(:-moz-placeholder) + label {
  color: var(--accent);
}

.float-label-wrap.underline .form-control:focus + label,
.float-label-wrap.underline .form-control:not(:placeholder-shown) + label {
  color: var(--accent);
}

/* ── Input с иконкой ──────────────────────────────────────── */
/*
  Разметка:
    <div class="input-icon-wrap">
      <svg class="input-icon">...</svg>
      <input class="form-control" ...>
    </div>
*/

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap .form-control { padding-left: 40px; }

.input-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--text3);
  pointer-events: none;
  flex-shrink: 0;
}

.input-icon-wrap .form-control:focus ~ .input-icon,
.input-icon-wrap:focus-within .input-icon {
  color: var(--accent);
}

/* Icon справа (кнопка показа пароля, очистка) */
.input-icon-wrap .form-control.icon-right { padding-left: 14px; padding-right: 40px; }

.input-icon.right {
  left: auto;
  right: 12px;
  cursor: pointer;
  pointer-events: auto;
  transition: var(--transition-fast);
}

.input-icon.right:hover { color: var(--text2); }

/* ── Checkbox / Radio стилизованные ──────────────────────── */

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  margin-bottom: var(--space-3);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg3);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition-fast);
  position: relative;
}

.form-check input[type="radio"] { border-radius: 50%; }

.form-check input[type="checkbox"]:checked,
.form-check input[type="radio"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.form-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: 2px solid #0a0a12;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.form-check input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0a0a12;
}

.form-check label {
  font-size: var(--text-base);
  color: var(--text2);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
}

/* ── Toggle Switch ────────────────────────────────────────── */
/*
  Разметка:
    <label class="toggle">
      <input type="checkbox">
      <span class="toggle-track"></span>
      <span class="toggle-label">Включить</span>
    </label>
*/

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.toggle input { display: none; }

.toggle-track {
  width: 38px;
  height: 22px;
  background: var(--bg3);
  border: 1.5px solid var(--border-strong);
  border-radius: 99px;
  position: relative;
  transition: var(--transition-base);
  flex-shrink: 0;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text3);
  transition: var(--transition-base);
}

.toggle input:checked + .toggle-track {
  background: rgba(232, 184, 109, 0.2);
  border-color: var(--accent);
}

.toggle input:checked + .toggle-track::after {
  left: 17px;
  background: var(--accent);
}

.toggle-label {
  font-size: var(--text-base);
  color: var(--text2);
}
/**
 * Card variants — @violin-tutor/design-system
 * .card  .glass-card  .instr-card  .metric-card  .stat-card
 * .tip-card  .session-card  .plan-card
 * .progress-bar  .progress-fill (gradient)
 */

/* Generic */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

/* Glassmorphism — поверх тёмного фона или изображения */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow-xl);
}

/* Glass + accent border */
.glass-card.accent {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Gradient card — для stat-карточек с градиентным фоном */
.gradient-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
}

.gradient-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

/* Instrument picker */
.instr-card {
  background: rgba(26, 26, 46, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 12px var(--space-3);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.instr-card:hover {
  border-color: var(--border);
  background: rgba(26, 26, 46, 0.75);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.instr-card.selected {
  border-color: var(--accent);
  background: rgba(232, 184, 109, 0.10);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.instr-card .emoji {
  font-size: 26px;
  display: block;
  line-height: 1;
}
.instr-card .icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}
.instr-card .name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text2);
  line-height: var(--leading-tight);
}
.instr-card.selected .name { color: var(--text); }

/* Metrics sidebar */
.metric-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px;
}
.metric-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-bottom: 5px;
}
.metric-val {
  font-family: var(--font-mono);
  font-size: var(--text-4xl);
  font-weight: 500;
  line-height: var(--leading-tight);
}
.metric-bar {
  margin-top: 7px;
  height: 3px;
  background: var(--bg2);
  border-radius: 2px;
  overflow: hidden;
}
.metric-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}
.fill-green  { background: var(--green);  }
.fill-blue   { background: var(--blue);   }
.fill-purple { background: var(--purple); }
.fill-accent { background: var(--accent); }

/* Admin stats */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.stat-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: var(--text-4xl);
  font-weight: 500;
}
.stat-sub { font-size: var(--text-xs); color: var(--text3); margin-top: 4px; }

/* AI Tips */
.tip-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 13px;
  animation: fadeUp 0.35s ease;
  border-left: 3px solid var(--accent);
}
.tip-card.good    { border-left-color: var(--green); }
.tip-card.warning { border-left-color: var(--red);   }

.tip-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.tip-type {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
}
.tip-time  { margin-left: auto; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text3); }
.tip-text  { font-size: var(--text-base); line-height: var(--leading-normal); color: var(--text2); }
.tip-loading { display: flex; gap: 4px; align-items: center; padding: 4px 0; }

/* Session history */
.session-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-3);
  cursor: pointer;
  transition: border-color 0.2s;
}
.session-card:hover { border-color: rgba(232, 184, 109, 0.35); }
.session-header  { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--space-3); }
.session-title   { font-size: var(--text-lg); font-weight: 600; }
.session-date    { font-size: var(--text-sm); color: var(--text3); margin-top: 3px; }
.session-scores  { display: flex; gap: 10px; flex-wrap: wrap; }
.score-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: var(--text-sm);
  color: var(--text2);
}
.score-pill span { font-weight: 600; color: var(--text); }
.session-errors  { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.error-tag {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: var(--red);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

/* Subscription plans */
.plan-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
}
.plan-card.current {
  border-color: rgba(232, 184, 109, 0.5);
  background: rgba(232, 184, 109, 0.04);
}
.plan-price       { font-family: var(--font-mono); font-size: var(--text-4xl); color: var(--accent); margin: 10px 0; }
.plan-price span  { font-size: var(--text-md); color: var(--text3); }
.plan-feature {
  font-size: var(--text-sm);
  color: var(--text2);
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.plan-feature::before { content: '✓'; color: var(--green); font-size: var(--text-xs); }

/* Текущий план — акцентный бордер + glow */
.plan-card.current {
  border-color: var(--border-strong);
  background: rgba(232, 184, 109, 0.06);
  box-shadow: var(--shadow-glow);
}

/* Хэдер плана с иконкой и бейджем */
.plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.plan-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
}

.plan-badge-current {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(232, 184, 109, 0.2);
  border: 1px solid rgba(232, 184, 109, 0.35);
  color: var(--accent);
}

/* Usage progress bar внутри карточки плана */
.plan-usage {
  margin: 10px 0;
}

.plan-usage-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text3);
  margin-bottom: 5px;
}

.plan-usage-label span:last-child {
  font-family: var(--font-mono);
}

/* ── Gradient Progress Bars ───────────────────────────────── */

.progress-bar {
  height: 6px;
  background: var(--bg3);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar.sm { height: 4px; }
.progress-bar.lg { height: 10px; }

.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Семантические варианты */
.progress-fill.accent  { background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.progress-fill.green   { background: linear-gradient(90deg, #22c55e, var(--green)); }
.progress-fill.blue    { background: linear-gradient(90deg, #3b82f6, var(--blue)); }
.progress-fill.purple  { background: linear-gradient(90deg, #7c3aed, var(--purple)); }
.progress-fill.red     { background: linear-gradient(90deg, #dc2626, var(--red)); }
.progress-fill.yellow  { background: linear-gradient(90deg, #d97706, var(--yellow)); }

/* Радужный / score composite */
.progress-fill.score {
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--green));
  background-size: 200% 100%;
  /* ширина задаётся через JS: style="width: 75%; --score-bg-pos: 0%" */
}

/* Пульсирующий — активное занятие */
@keyframes progress-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.75; }
}

.progress-fill.pulse { animation: progress-pulse 1.8s ease-in-out infinite; }

/* Подписанный прогресс (label over bar) */
.progress-labeled {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.progress-labeled-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.progress-labeled-title {
  font-size: var(--text-sm);
  color: var(--text2);
}

.progress-labeled-value {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text3);
}

/* ── Score bars (учитель / прогресс ученика) ─────────────── */

.score-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.score-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text3);
}

.score-bar-label span:last-child {
  font-family: var(--font-mono);
  color: var(--text2);
}
/**
 * Badge & Plan tags — @violin-tutor/design-system
 * .badge  .badge-active  .badge-inactive
 * .plan-tag  .plan-free  .plan-student  .plan-practice_plus  .plan-school
 */

.badge {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
}
.badge-active   { background: rgba(74,  222, 128, 0.15); color: var(--green); }
.badge-inactive { background: rgba(248, 113, 113, 0.15); color: var(--red);   }

/* Subscription plan tags */
.plan-tag {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.plan-free          { background: rgba(106, 104,  96, 0.3);  color: var(--text3);  }
.plan-student       { background: rgba(96,  165, 250, 0.2);  color: var(--blue);   }
.plan-practice_plus { background: rgba(167, 139, 250, 0.2);  color: var(--purple); }
.plan-school        { background: rgba(232, 184, 109, 0.2);  color: var(--accent); }
.plan-enterprise    { background: rgba(74,  222, 128, 0.15); color: var(--green);  }

/* Role badges (admin tables) */
.badge-admin    { background: rgba(248, 113, 113, 0.15); color: var(--red);    }
.badge-teacher  { background: rgba(167, 139, 250, 0.15); color: var(--purple); }
.badge-student  { background: rgba(96,  165, 250, 0.15); color: var(--blue);   }

/* Subscription status */
.badge-cancelled { background: rgba(248, 113, 113, 0.1);  color: var(--red);   }
.badge-expired   { background: rgba(106, 104,  96, 0.2);  color: var(--text3); }
.badge-free      { background: rgba(106, 104,  96, 0.2);  color: var(--text3); }
.badge-practice  { background: rgba(232, 184, 109, 0.15); color: var(--accent);}
.badge-school    { background: rgba(167, 139, 250, 0.15); color: var(--purple); }
/**
 * Modal — @violin-tutor/design-system
 * .modal-bg  .modal  .modal-title  .modal-footer
 */

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.85);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.modal-bg.show { display: flex; }

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: 18px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: var(--space-5);
}

/* Alias used in standalone admin pages */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.85);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.modal-overlay.show { display: flex; }

/* Chat scrollbar inside modal */
.modal ::-webkit-scrollbar { width: 3px; }
.modal ::-webkit-scrollbar-thumb { background: var(--border); }
/**
 * Table — @violin-tutor/design-system
 * .table-wrap  .table-header  .table
 */

.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 10px 14px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 11px 14px;
  font-size: var(--text-base);
  border-bottom: 1px solid rgba(232, 184, 109, 0.06);
}

.table tr:hover td {
  background: rgba(232, 184, 109, 0.03);
}
/**
 * Navigation — @violin-tutor/design-system
 *
 * Компоненты:
 *   .nav-btn              — горизонтальные tab-кнопки (шапка SPA)
 *   .sidebar              — фиксированный левый sidebar (admin/*.html)
 *   .nav-item             — пункт sidebar (active-state: левый border)
 *   .nav-badge            — счётчик на пункте меню
 *   .admin-nav-item       — legacy (совместимость)
 *   .lang-switcher        — переключатель RU/EN
 *   .user-badge           — юзер-чип в шапке
 *   .logo                 — логотип
 */

/* ── Горизонтальные nav-кнопки (шапка SPA) ───────────────── */

.nav-btn {
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: none;
  color: var(--text2);
  cursor: pointer;
  font-size: var(--text-base);
  font-family: var(--font-body);
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: relative;
}

.nav-btn:hover {
  background: var(--bg3);
  border-color: var(--border-subtle);
  color: var(--text);
}

.nav-btn.active {
  background: rgba(232, 184, 109, 0.08);
  border-color: var(--border);
  color: var(--accent);
}

/* Нижний индикатор — альтернатива для tab-bar */
.nav-btn.underline-indicator {
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 10px;
}

.nav-btn.underline-indicator.active {
  background: none;
  border-bottom-color: var(--accent);
  color: var(--accent);
}

/* ── Sidebar (admin/*.html) ───────────────────────────────── */

.sidebar {
  width: 220px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: var(--z-sticky);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-logo {
  padding: 20px 20px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

.sidebar-bottom {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Пункт меню sidebar ───────────────────────────────────── */
/*
  Ключевая деталь: active-state = левый border-left 3px accent.
  Левый padding уменьшается на 3px чтобы текст не прыгал.
*/

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 20px;
  color: var(--text2);
  text-decoration: none;
  font-size: var(--text-md);
  transition: var(--transition-base);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-family: var(--font-body);
  text-align: left;
  border-left: 3px solid transparent;
  position: relative;
}

/* Hover */
.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-left-color: var(--border);
}

/* Active — левый border + accent + лёгкий фон */
.nav-item.active {
  color: var(--accent);
  background: rgba(232, 184, 109, 0.08);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* Иконка в пункте меню */
.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  opacity: 1;
}

/* Разделитель */
.nav-sep {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 16px;
}

/* Секция-заголовок (опционально) */
.nav-section-title {
  padding: 8px 20px 4px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  font-weight: 600;
}

/* ── Badge-счётчик на пункте меню ────────────────────────── */
/*
  Разметка:
    <button class="nav-item">
      <svg class="nav-icon">...</svg>
      <span>Пользователи</span>
      <span class="nav-badge">12</span>
    </button>

  Для красного предупреждения: class="nav-badge danger"
*/

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: rgba(232, 184, 109, 0.15);
  border: 1px solid rgba(232, 184, 109, 0.25);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.nav-badge.danger {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.25);
  color: var(--red);
  /* Пульсация — привлечение внимания */
  animation: badge-pulse 2s ease-in-out infinite;
}

.nav-badge.blue {
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.25);
  color: var(--blue);
}

/* Убрать пульс если нет pending items */
.nav-badge:empty { display: none; }

@keyframes badge-pulse {
  0%, 100% { box-shadow: none; }
  50%       { box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2); }
}

/* ── Legacy: admin-nav-item (совместимость v3.x) ─────────── */

.admin-nav-item {
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: var(--text2);
  cursor: pointer;
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-base);
}

.admin-nav-item:hover,
.admin-nav-item.active {
  background: var(--bg3);
  border-color: var(--border);
  color: var(--accent);
}

/* ── Переключатель языка ──────────────────────────────────── */

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.lang-btn {
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: var(--transition-base);
}

.lang-btn.active,
.lang-btn:hover {
  background: var(--bg3);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Юзер-чип в шапке ────────────────────────────────────── */

.user-badge {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: var(--text-sm);
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-base);
}

.user-badge:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* ── Admin role badge ─────────────────────────────────────── */

.admin-badge {
  font-size: var(--text-sm);
  padding: 3px 8px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--red);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  margin-bottom: 8px;
  display: inline-block;
}

/* ── Логотип ──────────────────────────────────────────────── */

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--accent);
}

/* ── Main content area (рядом с fixed sidebar) ───────────── */

.main {
  margin-left: 220px;
  flex: 1;
  padding: 32px;
}

/* ── Breadcrumb ───────────────────────────────────────────── */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text3);
  margin-bottom: var(--space-5);
}

.breadcrumb-item { color: var(--text3); }
.breadcrumb-item.active { color: var(--text2); }
.breadcrumb-sep { color: var(--text3); font-size: 10px; }

/* ── Mobile overlay (резервировано) ──────────────────────── */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: calc(var(--z-sticky) - 1);
  backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open { display: block; }
  .main { margin-left: 0; }
}
/**
 * Layout — @violin-tutor/design-system
 * Страницы, header, app-body, sidebar, admin layout
 */

/* Page visibility */
.page        { display: none; min-height: 100vh; }
.page.active { display: flex; flex-direction: column; }

/* ── Header ──────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 18, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.nav { display: flex; align-items: center; gap: 6px; }

/* ── Main app: two-column ─────────────────────────────────── */
.app-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  overflow: hidden;
  height: calc(100vh - 57px);
}

/* ── Video pane ───────────────────────────────────────────── */
.video-pane {
  background: #050508;
  position: relative;
  border-right: 1px solid var(--border);
}
.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
}
.instrument-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
  width: 340px;
  max-height: 55vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Полный заголовок группы инструментов */
.instr-group-label {
  grid-column: 1 / -1;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text3);
  font-family: var(--font-mono);
  padding: 4px 0 2px;
  border-bottom: 1px solid var(--border-subtle);
  margin-top: 4px;
}
.piece-form { width: 280px; display: flex; flex-direction: column; gap: 10px; }

/* ── Sidebar (practice panel) ────────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  overflow: hidden;
}
.section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text3);
  margin-bottom: var(--space-3);
}

/* Tips list */
.tips-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Bottom controls */
.controls {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: var(--bg);
}
.ctrl {
  flex: 1;
  padding: 9px 6px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  font-size: var(--text-xs);
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.ctrl:hover,
.ctrl.active {
  border-color: var(--border-strong);
  color: var(--accent);
  background: rgba(232, 184, 109, 0.06);
}
.ctrl-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
/* Legacy emoji icon in ctrl */
.ctrl-icon-emoji { font-size: 17px; }

/* ── HUD (session overlay) ───────────────────────────────── */
.session-view { position: absolute; inset: 0; display: none; }
.session-view.active { display: block; }
.hud-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.hud-badge {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: var(--text-base);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 5px;
}
.warning-toast {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(248, 113, 113, 0.9);
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: var(--text-base);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.warning-toast.show { opacity: 1; }
.cents-overlay {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
}

/* ── Pitch / Cents bar ───────────────────────────────────── */
.pitch-row  { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.note-big {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--accent);
  min-width: 76px;
  line-height: var(--leading-tight);
}
.cents-bar {
  position: relative;
  height: 26px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.cents-zones { position: absolute; inset: 0; display: flex; }
.cz { flex: 1; }
.cz-low  { background: rgba(96,  165, 250, 0.1); }
.cz-mid  { background: rgba(74,  222, 128, 0.15); }
.cz-high { background: rgba(248, 113, 113, 0.1); }
.cents-line   { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--text3); }
.cents-needle {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  transition: left 0.15s ease;
  box-shadow: var(--shadow-accent-glow);
}
.cents-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text3);
}
.posture-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.posture-item {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  transition: border-color 0.3s;
}
.posture-item.ok   { border-color: rgba(74,  222, 128, 0.3); }
.posture-item.warn { border-color: rgba(248, 113, 113, 0.4); }
.posture-name { font-size: var(--text-sm); color: var(--text2); }

/* ── Page wrap (history, subscription…) ─────────────────── */
.page-wrap {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--text);
  margin-bottom: var(--space-5);
}

/* ── Stats grid ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ── Admin layout ────────────────────────────────────────── */
.admin-layout {
  display: flex;
  height: calc(100vh - 57px);
  overflow: hidden;
}
.admin-nav {
  width: 220px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── Auth ────────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(167, 139, 250, 0.08), transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(232, 184, 109, 0.06), transparent 60%),
    var(--bg);
}
.auth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl), 0 0 60px rgba(167, 139, 250, 0.07);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .emoji { font-size: 40px; }
.auth-logo h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--accent);
  margin-top: 8px;
}
.auth-logo p { font-size: var(--text-sm); color: var(--text3); margin-top: 4px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: var(--text-base); color: var(--text3); }
.auth-switch a { color: var(--accent); cursor: pointer; text-decoration: none; }
/**
 * Animations & Loading states — @violin-tutor/design-system
 */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

@keyframes dotB {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1;   }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}

/* Typing dots (AI loading) */
.dot {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--accent);
  animation: dotB 1.2s ease-in-out infinite;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
/**
 * Skeleton Screens — @violin-tutor/design-system
 *
 * Используй вместо спиннеров при первой загрузке контента.
 *
 * Базовый класс:   .skeleton
 * Варианты:        .skeleton-text   .skeleton-title  .skeleton-circle
 *                  .skeleton-btn    .skeleton-badge  .skeleton-avatar
 * Составные блоки: .skeleton-card   .skeleton-stat   .skeleton-row
 *                  .skeleton-table
 */

/* ── Базовая анимация ─────────────────────────────────────── */

@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg3)        0%,
    rgba(255,255,255,0.06) 50%,
    var(--bg3)        100%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius);
}

/* ── Текстовые варианты ───────────────────────────────────── */

.skeleton-text {
  composes: skeleton;
  height: 14px;
  width: 100%;
  border-radius: 4px;
}

/* Если composes не поддерживается (PostCSS без modules) — дублируем */
.skeleton-text {
  background: linear-gradient(
    90deg,
    var(--bg3)              0%,
    rgba(255,255,255,0.06)  50%,
    var(--bg3)              100%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  height: 14px;
  width: 100%;
  border-radius: 4px;
}

.skeleton-title {
  background: linear-gradient(
    90deg,
    var(--bg3)              0%,
    rgba(255,255,255,0.06)  50%,
    var(--bg3)              100%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  height: 22px;
  width: 60%;
  border-radius: 4px;
}

/* ── Форматные варианты ───────────────────────────────────── */

.skeleton-circle {
  background: linear-gradient(
    90deg,
    var(--bg3)              0%,
    rgba(255,255,255,0.06)  50%,
    var(--bg3)              100%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-avatar {
  background: linear-gradient(
    90deg,
    var(--bg3)              0%,
    rgba(255,255,255,0.06)  50%,
    var(--bg3)              100%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-btn {
  background: linear-gradient(
    90deg,
    var(--bg3)              0%,
    rgba(255,255,255,0.06)  50%,
    var(--bg3)              100%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  height: 36px;
  width: 100px;
  border-radius: var(--radius);
}

.skeleton-badge {
  background: linear-gradient(
    90deg,
    var(--bg3)              0%,
    rgba(255,255,255,0.06)  50%,
    var(--bg3)              100%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  height: 22px;
  width: 64px;
  border-radius: 99px;
  display: inline-block;
}

/* ── Составные блоки ──────────────────────────────────────── */

/* Карточка — 3 строки текста */
.skeleton-card {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-card .skeleton-title {
  margin-bottom: 4px;
}

.skeleton-card .skeleton-text:nth-child(3) { width: 85%; }
.skeleton-card .skeleton-text:nth-child(4) { width: 65%; }

/* Stat-карточка — число + лейбл */
.skeleton-stat {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-stat-label {
  background: linear-gradient(
    90deg,
    var(--bg3)              0%,
    rgba(255,255,255,0.06)  50%,
    var(--bg3)              100%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  height: 11px;
  width: 70px;
  border-radius: 3px;
}

.skeleton-stat-value {
  background: linear-gradient(
    90deg,
    var(--bg3)              0%,
    rgba(255,255,255,0.06)  50%,
    var(--bg3)              100%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  height: 32px;
  width: 90px;
  border-radius: 4px;
}

/* Строка списка — аватар + 2 строки */
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.skeleton-row-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.skeleton-row-lines .skeleton-text:last-child { width: 50%; }

/* Таблица — 5 строк × 4 ячейки */
.skeleton-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.skeleton-table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.skeleton-table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}

.skeleton-table-row:last-child { border-bottom: none; }

.skeleton-table .skeleton-text { height: 13px; }

/* ── Утилиты ─────────────────────────────────────────────── */

/* Замедлить анимацию при reduced motion */
@media (prefers-reduced-motion: reduce) {
  .skeleton,
  .skeleton-text,
  .skeleton-title,
  .skeleton-circle,
  .skeleton-avatar,
  .skeleton-btn,
  .skeleton-badge,
  .skeleton-stat-label,
  .skeleton-stat-value {
    animation: none;
    background: var(--bg3);
  }
}
/**
 * Toast notifications — @violin-tutor/design-system
 *
 * Архитектура:
 *   #toast-region  — aria-live контейнер (один на страницу)
 *   .toast         — одно уведомление внутри региона
 *
 * Разметка (обязательная для a11y):
 *   <div id="toast-region"
 *        role="status"
 *        aria-live="polite"
 *        aria-atomic="false"
 *        class="toast-region">
 *   </div>
 *
 * Для критичных ошибок (немедленное зачитывание):
 *   aria-live="assertive" + role="alert"
 *
 * JS-паттерн:
 *   const t = document.createElement('div');
 *   t.className = 'toast toast-success';
 *   t.textContent = 'Сохранено';
 *   toastRegion.appendChild(t);
 *   requestAnimationFrame(() => t.classList.add('show'));
 *   setTimeout(() => { t.classList.remove('show');
 *     t.addEventListener('transitionend', () => t.remove()); }, 3000);
 *
 * Варианты:   .toast-success  .toast-error  .toast-warning  .toast-info
 * Позиции:    .toast-region (bottom-center)
 *             .toast-region.top-right
 *             .toast-region.top-center
 *             .toast-region.bottom-right
 */

/* ── Toast Region (aria-live контейнер) ──────────────────── */

.toast-region {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column-reverse; /* новые сверху */
  align-items: center;
  gap: 8px;
  pointer-events: none;
  /* Без width — ширина по контенту */
}

/* top-right */
.toast-region.top-right {
  bottom: auto;
  top: 24px;
  left: auto;
  right: 24px;
  transform: none;
  align-items: flex-end;
  flex-direction: column;
}

/* top-center */
.toast-region.top-center {
  bottom: auto;
  top: 24px;
  flex-direction: column;
}

/* bottom-right */
.toast-region.bottom-right {
  left: auto;
  right: 24px;
  transform: none;
  align-items: flex-end;
}

/* ── Одно уведомление ─────────────────────────────────────── */

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: var(--text-md);
  font-family: var(--font-body);
  line-height: var(--leading-normal);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  max-width: 360px;
  min-width: 220px;
  display: flex;
  align-items: flex-start;
  gap: 10px;

  /* Начальное состояние — скрыт */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

/* Видимое состояние */
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* В top-регионах — анимация сверху */
.toast-region.top-right .toast,
.toast-region.top-center .toast {
  transform: translateY(-10px);
}

.toast-region.top-right .toast.show,
.toast-region.top-center .toast.show {
  transform: translateY(0);
}

/* ── Иконка тоста ─────────────────────────────────────────── */

.toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Контент ─────────────────────────────────────────────── */

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text);
  margin-bottom: 2px;
}

.toast-desc {
  font-size: var(--text-sm);
  color: var(--text2);
  line-height: var(--leading-normal);
}

/* Кнопка закрытия */
.toast-close {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition-fast);
  margin-left: auto;
}

.toast-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

/* ── Семантические варианты ───────────────────────────────── */

.toast-success {
  border-color: rgba(74, 222, 128, 0.30);
  background: rgba(74, 222, 128, 0.06);
}

.toast-success .toast-icon { color: var(--green); }
.toast-success .toast-title { color: var(--green); }

.toast-error {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.06);
}

.toast-error .toast-icon { color: var(--red); }
.toast-error .toast-title { color: var(--red); }

.toast-warning {
  border-color: rgba(251, 191, 36, 0.30);
  background: rgba(251, 191, 36, 0.05);
}

.toast-warning .toast-icon { color: var(--yellow); }
.toast-warning .toast-title { color: var(--yellow); }

.toast-info {
  border-color: rgba(96, 165, 250, 0.30);
  background: rgba(96, 165, 250, 0.05);
}

.toast-info .toast-icon { color: var(--blue); }
.toast-info .toast-title { color: var(--blue); }

/* ── Loading toast (прогресс) ────────────────────────────── */

.toast-loading {
  border-color: var(--border);
}

.toast-loading .toast-icon {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Progress bar внутри тоста ───────────────────────────── */

.toast-with-progress {
  flex-direction: column;
  gap: 8px;
}

.toast-progress-bar {
  height: 3px;
  background: var(--bg3);
  border-radius: 99px;
  overflow: hidden;
  width: 100%;
}

.toast-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.1s linear;
}

.toast-success .toast-progress-fill { background: var(--green);  }
.toast-error   .toast-progress-fill { background: var(--red);    }
.toast-warning .toast-progress-fill { background: var(--yellow); }
.toast-info    .toast-progress-fill { background: var(--blue);   }

/* ── Legacy: одиночный .toast без regional контейнера ───── */
/*
  Обратная совместимость с v3.x кодом:
    const toast = document.getElementById('toast');
    toast.textContent = '...';
    toast.className = 'toast toast-success show';
*/

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: var(--text-md);
  opacity: 0;
  transition: opacity var(--transition-base), transform var(--transition-base);
  z-index: var(--z-toast);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#toast.toast-success { border-color: rgba(74,  222, 128, 0.4); color: var(--green); }
#toast.toast-error   { border-color: rgba(248, 113, 113, 0.4); color: var(--red);   }
#toast.toast-warning { border-color: rgba(251, 191,  36, 0.4); color: var(--yellow); }
#toast.toast-info    { border-color: rgba(96,  165, 250, 0.4); color: var(--blue);  }

/* ── Reduced motion ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity var(--transition-fast); }
  #toast { transition: opacity var(--transition-fast); }
}
/**
 * Pagination — @violin-tutor/design-system
 * .pagination  .page-btn  .page-btn.active  .page-btn:disabled
 */

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.page-btn {
  padding: 7px 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text2);
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--text-base);
  font-family: var(--font-body);
  transition: all 0.2s;
}
.page-btn:hover           { border-color: var(--accent); color: var(--accent); }
.page-btn.active          { background: var(--accent); color: #0a0a12; border-color: var(--accent); }
.page-btn:disabled        { opacity: 0.3; cursor: not-allowed; }
/**
 * Slider Stack — @violin-tutor/design-system
 *
 * Панели-слайдеры, выезжающие справа. Используются для CRM-сущностей
 * (Lead, Account, Task и др.) вместо модальных окон.
 *
 * z-index: var(--z-slider) = 700
 *   > tooltip (600) > toast (500) > modal (400)
 *
 * Особенности:
 *   - Клик по backdrop НЕ закрывает (в отличие от modal) — данные не теряются
 *   - Esc закрывает только верхнюю панель
 *   - Крестик закрытия — левый верхний угол
 *   - Несколько открытых панелей отображаются как стопка
 */

/* ─── Backdrop ───────────────────────────────────────────────────────────────
   Перекрывает страницу (pointer-events: all), но onclick НЕ навешивается —
   случайное закрытие исключено. */
.slider-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.65);
  z-index: calc(var(--z-slider) - 1);
  backdrop-filter: blur(2px);
}

/* ─── Panel ──────────────────────────────────────────────────────────────────*/
.slider-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 640px;
  max-width: 100vw;
  background: var(--surface, #1a1a18);
  border-left: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  z-index: var(--z-slider);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -8px 0 48px rgba(0, 0, 0, 0.55);
  animation: slider-enter 200ms ease forwards;
  will-change: transform, opacity;
}

/* Панели, скрытые под верхней — сдвинуты влево и приглушены */
.slider-panel--below {
  transform: translateX(calc(-28px * var(--slider-depth, 1)));
  opacity: calc(1 - 0.18 * var(--slider-depth, 1));
  pointer-events: none;
  filter: brightness(0.8);
  animation: none; /* уже смонтированы */
}

/* ─── Animations ─────────────────────────────────────────────────────────────*/
@keyframes slider-enter {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slider-exit {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.slider-panel--exiting {
  animation: slider-exit 180ms ease forwards;
  pointer-events: none;
}

/* ─── Close button — верхний левый угол ─────────────────────────────────────*/
.slider-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: transparent;
  color: var(--text3, #706e6a);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  transition: background var(--transition-fast, 120ms ease),
              color var(--transition-fast, 120ms ease);
  z-index: 2;
  flex-shrink: 0;
}

.slider-close:hover {
  background: var(--border, rgba(255, 255, 255, 0.08));
  color: var(--text1, #f0ede6);
}

/* ─── Header ─────────────────────────────────────────────────────────────────*/
.slider-header {
  display: flex;
  align-items: center;
  gap: 10px;
  /* Отступ слева — под крестик */
  padding: 14px 30px 14px 56px;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.05));
  min-height: 58px;
  flex-shrink: 0;
}

.slider-title {
  font-family: var(--font-display, inherit);
  font-size: var(--text-lg, 16px);
  font-weight: 600;
  color: var(--text1, #f0ede6);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slider-subtitle {
  font-size: var(--text-sm, 13px);
  color: var(--text3, #706e6a);
  flex-shrink: 0;
}

/* Breadcrumb-цепочка при глубоком стеке */
.slider-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 30px 10px 56px;
  flex-shrink: 0;
}

.slider-breadcrumb-item {
  font-size: var(--text-xs, 12px);
  color: var(--text3, #706e6a);
  cursor: pointer;
}

.slider-breadcrumb-item:hover { color: var(--text2, #a0a09a); }

.slider-breadcrumb-sep {
  font-size: var(--text-xs, 12px);
  color: var(--border, rgba(255, 255, 255, 0.2));
}

/* ─── Tabs inside slider ─────────────────────────────────────────────────────*/
.slider-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.05));
  padding: 0 30px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.slider-tabs::-webkit-scrollbar { display: none; }

.slider-tab {
  padding: 10px 16px;
  font-size: var(--text-sm, 13px);
  color: var(--text3, #706e6a);
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  white-space: nowrap;
  transition: color var(--transition-fast, 120ms ease),
              border-color var(--transition-fast, 120ms ease);
  flex-shrink: 0;
}

.slider-tab:hover { color: var(--text1, #f0ede6); }

.slider-tab.active {
  color: var(--accent, #d4a843);
  border-bottom-color: var(--accent, #d4a843);
}

/* ─── Body — скроллируемый контент ──────────────────────────────────────────*/
.slider-body {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  overscroll-behavior: contain;
}

.slider-body::-webkit-scrollbar { width: 4px; }
.slider-body::-webkit-scrollbar-track { background: transparent; }
.slider-body::-webkit-scrollbar-thumb {
  background: var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 2px;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────*/
.slider-footer {
  padding: 14px 30px;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.05));
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
  background: var(--surface, #1a1a18);
}

/* ─── Section inside slider body ─────────────────────────────────────────────*/
.slider-section {
  margin-bottom: 28px;
}

.slider-section + .slider-section {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.05));
}

.slider-section-title {
  font-size: var(--text-xs, 12px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3, #706e6a);
  margin-bottom: 14px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────*/
@media (max-width: 700px) {
  .slider-panel {
    width: 100vw;
    border-left: none;
  }

  .slider-panel--below {
    transform: none;
    display: none; /* на мобильном прячем нижние панели */
  }
}

/* ─── Reduced motion ─────────────────────────────────────────────────────────*/
@media (prefers-reduced-motion: reduce) {
  .slider-panel {
    animation: none;
  }

  .slider-panel--exiting {
    animation: none;
  }
}
/**
 * Utilities — @violin-tutor/design-system
 * Атомарные хелперы — цвет, отступы, flex, состояния
 */

/* ── Text colors ─────────────────────────────────────────── */
.text-accent { color: var(--accent);  }
.text-green  { color: var(--green);   }
.text-red    { color: var(--red);     }
.text-blue   { color: var(--blue);    }
.text-purple { color: var(--purple);  }
.text-muted  { color: var(--text3);   }

/* ── Flex ────────────────────────────────────────────────── */
.flex-row { display: flex; align-items: center; gap: 8px; }

/* ── Spacing ─────────────────────────────────────────────── */
.gap-2 { gap: 8px; }
.mt-2  { margin-top: 8px; }
.mb-2  { margin-bottom: 8px; }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px; color: var(--text3); }
.empty-state .emoji { font-size: 40px; display: block; margin-bottom: 12px; }
