/* +
/* =========================================================
    РадиоШАНС — общие стили
   - Темы: light / dark (переключаются через [data-theme])
   - Адаптив: mobile-first, breakpoints 640/768/1024
   - Все цвета и размеры — CSS-переменные
   ========================================================= */

/* ---------- Темы и переменные ---------- */
:root {
    /* Палитра — свет (старый VK) */
    --color-primary:        #5181B8;
    --color-primary-hover:  #45688E;
    --color-success:        #4BB34B;
    --color-success-hover:  #3DA03D;
    --color-danger:         #E64646;
    --color-danger-hover:   #CF3333;
    --color-warning:        #FFA000;

    --bg:                   #E7E8EC;
    --bg-elev:              #FFFFFF;
    --bg-elev-2:            #F0F2F5;
    --bg-card:              var(--bg-elev);
    --bg-surface:           var(--bg-card);
    --bg-input:             #F2F3F5;

    --text:                 #000000;
    --text-muted:           #656565;
    --text-on-primary:      #FFFFFF;

    --border:               #DAD8D8;
    --border-strong:        #B8B8B8;
    --color-link:           #2A5885;
    --focus-ring:           rgba(81, 129, 184, 0.35);

    --shadow-sm:            0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow:               0 2px 8px rgba(0, 0, 0, 0.10);
    --shadow-lg:            0 8px 24px rgba(0, 0, 0, 0.15);

    /* Размеры */
    --radius-sm:            8px;
    --radius:               12px;
    --radius-lg:            16px;

    --space-1:              4px;
    --space-2:              8px;
    --space-3:              12px;
    --space-4:              16px;
    --space-5:              20px;
    --space-6:              24px;
    --space-8:              32px;
    --space-10:             40px;

    --font-sans:            'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --header-height:        64px;

    /* ----- Ширина контейнера контента -----
       Раскомментируйте нужный вариант (только один!).
       Текущий: 90% ширины окна, но не более 1400px (хорошо для 4K). */
    /* --container-max:        min(90%, 1400px); */
    /* --container-max:     min(95%, 1600px); */ /* шире (95%, до 1600px)            */
    /* --container-max:     min(85%, 1300px); */ /* уже  (85%, до 1300px)            */
    --container-max:     100%;              /* во всю ширину окна               */
    /* --container-max:     1200px; */            /* фиксированная ширина 1200px     */
    /* --container-max:     1100px; */            /* фиксированная ширина 1100px     */
    /* --container-max:     960px;  */            /* фиксированная ширина 960px      */
}

/* Тёмная тема */
:root[data-theme='dark'] {
    --color-primary:        #5181B8;
    --color-primary-hover:  #45688E;

    --bg:                   #141414;
    --bg-elev:              #222222;
    --bg-elev-2:            #2C2C2C;
    --bg-card:              var(--bg-elev);
    --bg-surface:           var(--bg-card);
    --bg-input:             #1A1A1A;

    --text:                 #E1E3E6;
    --text-muted:           #8A8F98;

    --border:               #363738;
    --border-strong:        #4E4F50;
    --color-link:           #71AAEB;
    --focus-ring:           rgba(81, 129, 184, 0.4);

    --shadow-sm:            0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow:               0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-lg:            0 8px 24px rgba(0, 0, 0, 0.6);
}

/* Светлая тема */
:root[data-theme='light'] {
    --color-primary:        #5181B8;
    --color-primary-hover:  #45688E;
    --color-success:        #4BB34B;
    --color-success-hover:  #3DA03D;
    --color-danger:         #E64646;
    --color-danger-hover:   #CF3333;
    --color-warning:        #FFA000;

    --bg:                   #E7E8EC;
    --bg-elev:              #FFFFFF;
    --bg-elev-2:            #F0F2F5;
    --bg-card:              var(--bg-elev);
    --bg-surface:           var(--bg-card);
    --bg-input:             #F2F3F5;

    --text:                 #000000;
    --text-muted:           #656565;
    --text-on-primary:      #FFFFFF;

    --border:               #DAD8D8;
    --border-strong:        #B8B8B8;
    --color-link:           #2A5885;
    --focus-ring:           rgba(81, 129, 184, 0.35);

    --shadow-sm:            0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow:               0 2px 8px rgba(0, 0, 0, 0.10);
    --shadow-lg:            0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Системная тёмная тема, если пользователь не выбирал явно */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --color-primary:        #5181B8;
        --color-primary-hover:  #45688E;
        --bg:                   #141414;
        --bg-elev:              #222222;
        --bg-elev-2:            #2C2C2C;
        --bg-card:              var(--bg-elev);
        --bg-input:             #1A1A1A;
        --text:                 #E1E3E6;
        --text-muted:           #8A8F98;
        --border:               #363738;
        --border-strong:        #4E4F50;
        --color-link:           #71AAEB;
        --focus-ring:           rgba(81, 129, 184, 0.4);
        --shadow-sm:            0 1px 2px rgba(0, 0, 0, 0.5);
        --shadow:               0 2px 8px rgba(0, 0, 0, 0.5);
        --shadow-lg:            0 8px 24px rgba(0, 0, 0, 0.6);
    }
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* HTML-атрибут hidden должен всегда скрывать элемент,
   даже если на нём установлен display: flex/grid и т.п. */
[hidden] { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-link); text-decoration: none; }
a:hover, a:focus, a:active { text-decoration: none !important; }

img { max-width: 100%; display: block; }

::selection {
    background: var(--color-primary);
    color: var(--text-on-primary);
}

/* ---------- Layout ---------- */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

.app-main--compact-top,
.app-main--no-header {
    padding-top: var(--space-3) !important;
}

@media (max-width: 640px) {
    .app-main { padding: var(--space-4) var(--space-3); }
    .app-main--compact-top,
    .app-main--no-header { padding-top: var(--space-2) !important; }
}

/* ---------- Header ---------- */
.app-header {
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(1.4) blur(8px);
}

.app-header__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-4);
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Главная навигация — ряд квадратных иконок */
.app-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: visible;
}

.app-nav__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elev-2);
    color: var(--text-muted);
    font-size: 18px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    transition: background .15s, color .15s, border-color .15s, transform .05s;
    text-decoration: none;
}

.app-nav__item:hover {
    background: var(--border);
    color: var(--text);
    text-decoration: none;
}

.app-nav__item:active { transform: translateY(1px); }
.app-nav__item:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.app-nav__item.is-active {
    background: var(--color-primary);
    color: var(--text-on-primary);
    border-color: var(--color-primary);
}

.app-header__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
/* Когда навигации нет (гость) — центрируем кнопки */
.app-header__inner > .app-header__actions:first-child {
    margin: 0 auto;
}

/* Блок пользователя в шапке (аватар + имя/псевдоним) */
.app-header__user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: var(--bg-elev-2);
    border: 1px solid transparent;
    border-radius: 9999px;
    color: var(--text);
    text-decoration: none;
    transition: background .15s, border-color .15s;
    max-width: 220px;
    cursor: pointer;
    font: inherit;
}

.app-header__user:hover {
    background: var(--border);
    text-decoration: none;
}

.app-header__user img,
.app-header__user-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elev);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 16px;
}

.app-header__user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.app-header__user-text strong {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.app-header__user-text small {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

@media (max-width: 640px) {
    .app-header__user-text { display: none; }
    .app-header__user      { padding: 2px; }
}

/* User avatar dropdown */
.app-header__user-wrap { display: inline-flex; }
.app-header__user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 200;
    padding: 4px 0;
}
.app-header__user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    font: inherit;
    transition: background .1s;
}
.app-header__user-dropdown-item:hover { background: var(--bg-elev-2); text-decoration: none; }
.app-header__user-dropdown-item .bi-sun-fill { display: none; }
:root[data-theme='dark'] .app-header__user-dropdown-item .bi-sun-fill { display: inline; }
:root[data-theme='dark'] .app-header__user-dropdown-item .bi-moon-fill { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .app-header__user-dropdown-item .bi-sun-fill { display: inline; }
    :root:not([data-theme]) .app-header__user-dropdown-item .bi-moon-fill { display: none; }
}

/* ---------- Theme toggle ---------- */
.theme-toggle .bi-sun-fill { display: none; }
.theme-toggle .bi-moon-fill { display: inline-block; }
:root[data-theme='dark'] .theme-toggle .bi-sun-fill { display: inline-block; }
:root[data-theme='dark'] .theme-toggle .bi-moon-fill { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-toggle .bi-sun-fill { display: inline-block; }
    :root:not([data-theme]) .theme-toggle .bi-moon-fill { display: none; }
}

/* Бренд для мобильного хедера */
.app-header__brand-mobile {
    display: none;
}

.app-nav__label {
    display: none;
}

@media (max-width: 768px) {
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }
    .app-header__inner {
        padding: 0 var(--space-4);
        height: 54px;
        justify-content: space-between;
    }
    .app-header__brand-mobile {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-weight: 700;
        color: var(--text);
        font-size: 16px;
        text-decoration: none;
    }
    .app-header__brand-mobile i {
        font-size: 19px;
        color: var(--color-primary);
    }
    .app-header__brand-mobile:hover {
        text-decoration: none;
        color: var(--text);
    }
    /* На мобильных верхняя полоса из 9 иконок скрывается в пользу нижнего iOS Tab Bar */
    .app-nav {
        display: none !important;
    }
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 10px 18px;
    height: 42px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
    white-space: nowrap;
}

.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.btn:disabled, .btn.is-disabled { opacity: 0.5; cursor: not-allowed; }
.btn:hover { text-decoration: none; }

.btn--block { width: 100%; }
.btn--lg    { padding: 14px 26px; font-size: 16px; }
.btn--sm    { padding: 7px 12px; font-size: 13px; }

.btn--primary { background: var(--color-primary); border-color: var(--color-primary); color: var(--text-on-primary); }
.btn--primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }

.btn--success { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.btn--success:hover { background: var(--color-success-hover); border-color: var(--color-success-hover); }

.btn--danger { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }
.btn--danger:hover { background: var(--color-danger-hover); border-color: var(--color-danger-hover); }

.btn--secondary { background: var(--bg-elev-2); border-color: var(--bg-elev-2); color: var(--text); }
.btn--secondary:hover { background: var(--border); border-color: var(--border); }

.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--bg-elev-2); }

.btn--vk {
    background: #0077FF;
    border-color: #0077FF;
    color: #fff;
}
.btn--vk:hover { background: #005BB5; border-color: #005BB5; }

/* Иконка-only кнопка */
.btn--icon {
    width: 38px;
    height: 38px;
    padding: 0;
}

/* ---------- Формы ---------- */
.form-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.form-row__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.form-row__hint {
    font-size: 13px;
    color: var(--text-muted);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 14px;
    height: 42px;
    max-height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text);
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
/* Safari date/time inputs рендерят внутренние элементы выше — принудительно ограничиваем */
.form-input[type="date"],
.form-input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    min-height: 42px;
    max-height: 42px;
}
:root[data-theme="dark"] input[type="date"],
:root[data-theme="dark"] input[type="time"] {
    color-scheme: dark;
}
:root[data-theme="light"] input[type="date"],
:root[data-theme="light"] input[type="time"] {
    color-scheme: light;
}
.form-textarea {
    height: auto;
    min-height: 88px;
    resize: vertical;
    line-height: 1.5;
}
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ---------- Карточки ---------- */
.card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.card + .card { margin-top: var(--space-4); }

/* Внутри CSS Grid и Flex-контейнеров карточки не должны иметь сдвига margin-top */
[style*="grid"] > .card,
[style*="flex"] > .card,
.grid > .card,
.role-grid > .card {
    margin-top: 0;
}

.card__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap; /* кнопка справа уйдёт на новую строку, если узко */
}

.card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.card__subtitle {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-elev-2);
    color: var(--color-primary);
    font-size: 20px;
    flex-shrink: 0;
}

/* Универсальный hed для карточки: title слева, action справа,
   на мобиле title и кнопка в одну строку (кнопка ужимается до иконки). */
.card-head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border);
}

.card-head__title {
    flex: 1;
    min-width: 0;
}

.card-head__title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .card { padding: var(--space-4); }
    .card-head { gap: var(--space-2); }
}

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: var(--space-10) var(--space-4);
}

.hero__title {
    margin: 0 0 var(--space-3);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.hero__lead {
    max-width: 560px;
    margin: 0 auto var(--space-6);
    color: var(--text-muted);
    font-size: 17px;
}

/* ---------- Алерты ---------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    margin-bottom: var(--space-4);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}

.alert::before {
    font-family: 'bootstrap-icons';
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert--success {
    background: rgba(16, 185, 129, 0.10);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--color-success);
}
.alert--success::before { content: "\F26B"; /* check-circle-fill */ }

.alert--error {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--color-danger);
}
.alert--error::before { content: "\F33A"; /* exclamation-triangle-fill */ }

.alert--info {
    background: rgba(81, 129, 184, 0.10);
    border-color: rgba(81, 129, 184, 0.35);
    color: var(--color-primary);
}
.alert--info::before { content: "\F431"; /* info-circle-fill */ }

.alert--warning {
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--color-warning);
}
.alert--warning::before { content: "\F33A"; /* exclamation-triangle-fill */ }

/* ---------- Бейджи ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-elev-2);
    color: var(--text-muted);
}

.badge--primary { background: rgba(81, 129, 184, 0.15); color: var(--color-primary); }
.badge--success { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.badge--warning { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.badge--danger  { background: rgba(239, 68, 68, 0.15); color: var(--color-danger); }
.badge--info    { background: rgba(13, 202, 240, 0.15); color: #0DCAF0; }
.badge--purple  { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

/* ---------- Шапка карточки проекта (внутри .card на странице проекта) ---------- */
.project-card-head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border);
}

.project-card-head__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elev-2);
}

.project-card-head__avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 20px;
}

.project-card-head__title {
    flex: 1;
    min-width: 0;
}

.project-card-head__title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-card-head__title small {
    color: var(--text-muted);
    font-size: 13px;
    display: block;
    margin-top: 2px;
}

/* ---------- Список проектов ---------- */
.project-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-3);
}

.project-list__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .15s, transform .15s, box-shadow .15s;
    flex-wrap: nowrap;
    min-width: 0;
}

.project-list__item > * { min-width: 0; }

.project-list__item:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.project-list__item.is-current {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary) inset;
}

.project-list__item.is-blocked {
    background: color-mix(in srgb, var(--color-danger) 6%, var(--bg-elev));
    border-color: color-mix(in srgb, var(--color-danger) 30%, var(--border));
}
.project-list__item.is-blocked .project-list__avatar { opacity: 0.55; }
.project-list__item.is-blocked .project-list__info strong { color: var(--text-muted); }

.project-list__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elev-2);
}

.project-list__info { flex: 1; min-width: 0; }
.project-list__info a { color: var(--text); display: block; text-decoration: none; }
.project-list__info a:hover { text-decoration: none; }
.project-list__info a:hover strong { color: var(--color-primary); }
.project-list__info a strong { font-size: 15px; }
.project-list__info small {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 2px;
}

@media (max-width: 480px) {
    .project-list__item { flex-wrap: wrap; }
    .project-list__info { flex: 1 1 calc(100% - 60px); }
}

/* ---------- Таблица ---------- */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th, .table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table-wrap { overflow-x: auto; }

/* Компактная таблица для админских списков (треки, проекты, пользователи).
   Уменьшенный padding + полоски через зебру + hover для строк. */
.table--compact th,
.table--compact td {
    padding: 6px 10px;
    font-size: 13px;
    vertical-align: middle;
}
.table--compact tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.table--compact tbody tr:hover {
    background: var(--bg-elev-2);
}
.table--compact th {
    background: var(--bg-elev-2);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid var(--border);
}

/* ---------- Утилиты ---------- */
.muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.gap-2 { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.gap-3 { display: flex; gap: var(--space-3); flex-wrap: wrap; }

code, .code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--bg-elev-2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.92em;
    word-break: break-all;
}

/* ---------- Форма (вспомогательные классы) ---------- */
.form-actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-4);
    flex-wrap: wrap;
}


/* ---------- Слот для VK виджетов ---------- */
.vk-widget-slot {
    min-height: 48px;
    display: flex;
    align-items: center;
}

.vk-widget-slot iframe {
    max-width: 100% !important;
    border-radius: 6px;
}

/* Десктоп: показываем официальный VK Widget, скрываем фоллбек-кнопку */
.vk-allow--mobile  { display: none; }
.vk-allow--desktop { display: flex; }

/* Мобильные: VK Widget блокируется попап-фильтром Safari/Chrome,
   поэтому показываем обычную ссылку, а виджет прячем. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    .vk-allow--desktop { display: none; }
    .vk-allow--mobile  { display: block; }
}

/* ---------- d-none-mobile (если кому пригодится) ---------- */
@media (max-width: 640px) {
    .d-none-mobile { display: none !important; }
}


/* ---------- Guide Drawer (выезжающая панель справки) ---------- */
.guide-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: auto;
}

.guide-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.guide-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100%;
    background: var(--bg-elev);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: drawerSlideIn .2s ease-out;
}

@media (min-width: 640px) {
    .guide-drawer__panel { width: 50vw; }
}
@media (min-width: 1024px) {
    .guide-drawer__panel { width: 40vw; }
}
@media (min-width: 1440px) {
    .guide-drawer__panel { width: 33vw; }
}

@keyframes drawerSlideIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.guide-drawer__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.guide-drawer__title {
    flex: 1;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.guide-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-5);
    font-size: 14px;
    line-height: 1.6;
}

.guide-drawer__body h2 { font-size: 18px; margin: 0 0 var(--space-3); }
.guide-drawer__body h3 { font-size: 15px; margin: var(--space-4) 0 var(--space-2); }
.guide-drawer__body h4 { font-size: 14px; margin: var(--space-3) 0 var(--space-2); }
.guide-drawer__body p { margin: 0 0 var(--space-3); }
.guide-drawer__body ul, .guide-drawer__body ol { margin: 0 0 var(--space-3); padding-left: 20px; }
.guide-drawer__body li { margin-bottom: var(--space-1); }


/* ---------- Соглашение ---------- */
.agreement__text {
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    max-height: 380px;
    overflow-y: auto;
    margin-bottom: var(--space-4);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

.agreement__text p { margin: 0 0 var(--space-3); }
.agreement__text ol,
.agreement__text ul {
    margin: 0 0 var(--space-3);
    padding-left: 24px;
}
.agreement__text li { margin-bottom: 6px; }

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

.agreement__pad {
    margin-top: var(--space-2);
    background: #FFFFFF;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 6px;
    overflow: hidden;
    color-scheme: light; /* canvas всегда на белом, даже в тёмной теме */
}

.agreement__pad canvas {
    display: block;
    width: 100%;
    height: 200px;
    cursor: crosshair;
    touch-action: none;
    background: #FFFFFF;
}

.agreement__signature-preview {
    margin: var(--space-3) 0;
    padding: var(--space-3);
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color-scheme: light;
}

.agreement__signature-preview img {
    max-width: 320px;
    max-height: 120px;
}

/* form-check (чек-бокс с подписью) */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    cursor: pointer;
    margin-bottom: var(--space-3);
    user-select: none;
    font-size: 14px;
}

.form-check input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}


/* =====================================================
   Модальное окно (универсальное, см. partials/modal.php)
   ===================================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    pointer-events: auto;
}

@media (min-width: 640px) {
    .modal {
        align-items: center;
        padding: var(--space-4);
    }
}

.modal__backdrop,
.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

.modal__dialog,
.modal__box {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    animation: modalSlideUp .18s ease-out;
}

@media (min-width: 640px) {
    .modal__dialog,
    .modal__box {
        border-radius: var(--radius);
        animation: modalScaleIn .15s ease-out;
    }
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@keyframes modalScaleIn {
    from { transform: scale(0.96); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.modal__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
}

.modal__title {
    flex: 1;
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}

.modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}
.modal__close:hover { background: var(--bg-elev-2); color: var(--text); }

.modal__body {
    padding: var(--space-5);
    overflow-y: auto;
    color: var(--text);
    line-height: 1.55;
    font-size: 14px;
}

.modal__body .form-row { margin-bottom: var(--space-3); }

.modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5) var(--space-4);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .modal__footer .btn {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
    }
}

/* Модальное окно для волны трека (уменьшенная высота) */
.modal--waveform .modal__dialog {
    max-width: 90vw;
    max-height: 85vh;
    width: calc(90vw - 0px);
}

.modal__dialog--waveform {
    max-width: 90vw !important;
    max-height: 85vh !important;
}

.modal--waveform .modal__body {
    padding: var(--space-3);
    overflow: auto;
}

.modal--waveform #wfRoot {
    width: 100%;
    min-height: 300px;
    max-height: 60vh;
}

.modal--waveform .track-waveform {
    height: auto;
    display: flex;
    flex-direction: column;
}

.modal--waveform .wf-row {
    flex: 1;
    min-height: 0;
    max-height: 50vh;
    display: flex;
}

.modal--waveform #wfCanvas {
    flex: 1;
    min-width: 0;
}

.modal--waveform .wf-scale {
    width: 50px;
    flex-shrink: 0;
}

.modal--waveform .wf-info {
    margin-bottom: var(--space-2);
}

.modal--waveform .wf-info span {
    margin-right: var(--space-3);
    font-size: 13px;
}

.modal--waveform .wf-info #wfPeak,
.modal--waveform .wf-info #wfMean {
    font-weight: 600;
}

/* Цвета для Peak/Mean как у админа */
.modal--waveform .wf-info .peak-danger,
.modal--waveform .wf-info .peak-warning,
.modal--waveform .wf-info .peak-success,
.modal--waveform .wf-info .mean-danger,
.modal--waveform .wf-info .mean-warning,
.modal--waveform .wf-info .mean-success {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
}

.modal--waveform .wf-info .peak-danger { background: rgba(220, 38, 38, 0.15); color: var(--color-danger); }
.modal--waveform .wf-info .peak-warning { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.modal--waveform .wf-info .peak-success { background: rgba(34, 197, 94, 0.15); color: var(--color-success); }

.modal--waveform .wf-info .mean-danger { background: rgba(220, 38, 38, 0.15); color: var(--color-danger); }
.modal--waveform .wf-info .mean-warning { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.modal--waveform .wf-info .mean-success { background: rgba(34, 197, 94, 0.15); color: var(--color-success); }

.modal--waveform .waveform-controls {
    margin-top: var(--space-2);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .modal--waveform .modal__dialog {
        max-width: 95vw !important;
        max-height: 90vh !important;
    }
    .modal--waveform #wfRoot {
        max-height: 50vh;
        min-height: 250px;
    }
    .modal--waveform .wf-row {
        max-height: 40vh;
    }
}


/* ---------- Чек-боксы авторов в форме загрузки трека ---------- */
.author-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.author-checkboxes .form-check {
    margin-bottom: 0;
}

/* file input стилизация */
.form-input[type="file"] {
    padding: 8px 12px;
    cursor: pointer;
}

.form-input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-elev-2);
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.form-input[type="file"]::file-selector-button:hover {
    background: var(--border);
}


/* =====================================================
   Настройки в стиле iPadOS Master-Detail
   ===================================================== */

.ipados-settings-mobile-select {
    display: none;
    margin-bottom: var(--space-3);
    background: var(--bg-elev);
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.ipados-mobile-select-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ipados-mobile-select-input {
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
}

.ipados-settings-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: flex-start;
}

/* Master Sidebar */
.ipados-settings-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 75px;
}

.ipados-settings-group {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.ipados-settings-group__title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px 6px 14px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border);
}

.ipados-settings-group__list {
    display: flex;
    flex-direction: column;
}

.ipados-settings-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.15s ease;
}

.ipados-settings-item:last-child {
    border-bottom: none;
}

.ipados-settings-item:hover {
    background: var(--bg-elev-2);
    text-decoration: none;
    color: var(--color-primary);
}

.ipados-settings-item.is-active {
    background: var(--color-primary);
    color: #ffffff;
    font-weight: 600;
}

.ipados-settings-item__icon {
    font-size: 15px;
    width: 20px;
    display: inline-flex;
    justify-content: center;
    color: var(--text-muted);
}
.ipados-settings-item.is-active .ipados-settings-item__icon {
    color: #ffffff;
}

.ipados-settings-item__text {
    flex: 1;
}

.ipados-settings-item__chevron {
    font-size: 12px;
    opacity: 0.4;
    transition: transform 0.15s;
}
.ipados-settings-item:hover .ipados-settings-item__chevron {
    opacity: 0.8;
    transform: translateX(2px);
}
.ipados-settings-item.is-active .ipados-settings-item__chevron {
    opacity: 0.9;
    color: #ffffff;
}

/* Detail Area */
.ipados-settings-detail {
    min-width: 0;
}

.ipados-inset-card {
    border-radius: 18px !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

.ipados-detail-head {
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-4);
}

/* Мобильный брейкпоинт (телефоны и узкие экраны) */
@media (max-width: 860px) {
    .ipados-settings-layout {
        grid-template-columns: 1fr;
    }
    .ipados-settings-sidebar {
        display: none;
    }
    .ipados-settings-mobile-select {
        display: block;
    }
}

.ipados-nav-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: var(--space-4);
}

/* 1-й уровень: Сегментированная панель iPadOS */
.ipados-segmented-bar {
    display: flex;
    gap: 8px;
    background: var(--bg-elev);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ipados-segmented-bar::-webkit-scrollbar {
    display: none;
}

.ipados-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.ipados-tab:hover {
    color: var(--text);
    background: var(--bg-elev-2);
    text-decoration: none;
}

.ipados-tab.is-active {
    background: var(--bg);
    color: var(--text);
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
}

.ipados-tab__icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elev-2);
    color: var(--cat-color, var(--color-primary));
    font-size: 14px;
    transition: transform 0.2s;
}

.ipados-tab.is-active .ipados-tab__icon {
    background: var(--cat-color, var(--color-primary));
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.ipados-badge {
    background: #ff3b30;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 5px rgba(255, 59, 48, 0.35);
}

/* 2-й уровень: Чипы подразделов (Sub-chips) */
.ipados-sub-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ipados-sub-chips::-webkit-scrollbar {
    display: none;
}

.ipados-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.ipados-chip:hover {
    color: var(--text);
    border-color: var(--border-strong, var(--border));
    background: var(--bg-elev-2);
    text-decoration: none;
}

.ipados-chip.is-active {
    background: var(--color-primary);
    color: var(--text-on-primary, #ffffff);
    border-color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

.ipados-chip__badge {
    background: rgba(255, 255, 255, 0.25);
    color: currentColor;
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 2px;
}
.ipados-chip:not(.is-active) .ipados-chip__badge {
    background: #ff3b30;
    color: #ffffff;
}

/* Мобильная адаптивность под iPad и iPhone */
@media (max-width: 768px) {
    .ipados-tab {
        padding: 6px 12px;
        font-size: 12.5px;
        gap: 6px;
    }
    .ipados-tab__icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    .ipados-chip {
        padding: 5px 11px;
        font-size: 12px;
    }
}

/* Под-навигация разделов (Размещение, Рекламодатель, Менеджер) */
.admin-subnav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    position: relative;
    align-items: center;
}

.admin-subnav__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s, border-color .15s, color .15s;
    cursor: pointer;
}
.admin-subnav__item:hover {
    background: var(--bg-elev-2);
    border-color: var(--border-strong, var(--border));
    text-decoration: none;
    color: var(--text);
}
.admin-subnav__item.is-active {
    background: var(--color-primary);
    color: var(--text-on-primary, #ffffff);
    border-color: var(--color-primary);
    font-weight: 600;
}
.admin-subnav__item span { display: inline; }
@media (max-width: 768px) {
    .admin-subnav__item { padding: 6px 10px; font-size: 12px; }
}

/* Карточка-обёртка для вкладок раздела «Размещение». */
.placement-tabs {
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-4);
}
.placement-tabs__nav {
    margin: 0;
    padding: 0;
}
.placement-tabs__nav .admin-subnav__item {
    font-size: 13px;
}

/* Dropdown «Ещё» */
.admin-subnav__more { display: inline-flex; }
.admin-subnav__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 200;
    padding: 4px 0;
}
.admin-subnav__dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    transition: background .1s;
}
.admin-subnav__dropdown-item:hover { background: var(--bg-elev-2); text-decoration: none; }
.admin-subnav__dropdown-item.is-active { color: var(--color-primary); font-weight: 600; }

/* =====================================================
   Apple iOS Segmented Control & Navigation System
   ===================================================== */

/* Сегментированный переключатель (iOS Segmented Control) */
.ios-segmented-control {
    display: flex;
    gap: 3px;
    padding: 3px;
    background: var(--bg-elev-2);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: var(--space-4);
    user-select: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ios-segmented-control__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 14px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.ios-segmented-control__item:hover {
    color: var(--text);
    text-decoration: none;
}

.ios-segmented-control__item.is-active {
    background: var(--bg-elev);
    color: var(--text);
    font-weight: 600;
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .ios-segmented-control__item.is-active {
    background: #2c2c2e;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.ios-segmented-control__item i {
    font-size: 14px;
}

.ios-segmented-control__item--btn {
    flex: 0 0 auto;
    padding: 8px 12px;
    background: none;
    cursor: pointer;
}

@media (max-width: 640px) {
    .ios-segmented-control {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .ios-segmented-control::-webkit-scrollbar {
        display: none;
    }
    .ios-segmented-control__item {
        font-size: 12.5px;
        padding: 7px 10px;
    }
}

/* -----------------------------------------------------
   Нижний мобильный iOS Tab Bar
   ----------------------------------------------------- */
.ios-tabbar {
    display: none;
}

@media (max-width: 768px) {
    .ios-tabbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(52px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: saturate(1.8) blur(20px);
        -webkit-backdrop-filter: saturate(1.8) blur(20px);
        border-top: 0.5px solid var(--border);
        align-items: center;
        justify-content: space-around;
        z-index: 1000;
        box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.04);
    }

    [data-theme="dark"] .ios-tabbar {
        background: rgba(24, 27, 34, 0.9);
        border-top: 0.5px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.2);
    }

    .ios-tabbar__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        color: var(--text-muted);
        text-decoration: none;
        border: none;
        background: none;
        cursor: pointer;
        padding: 4px 2px;
        user-select: none;
        transition: color 0.15s, transform 0.1s;
    }
    .ios-tabbar__item:active {
        transform: scale(0.92);
    }
    .ios-tabbar__icon {
        font-size: 19px;
        line-height: 1.1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .ios-tabbar__label {
        font-size: 10px;
        font-weight: 500;
        margin-top: 2px;
        line-height: 1;
        letter-spacing: -0.1px;
    }
    .ios-tabbar__item.is-active {
        color: var(--color-primary);
    }
    .ios-tabbar__item.is-active .ios-tabbar__label {
        font-weight: 600;
    }
}

/* -----------------------------------------------------
   Нижняя шторка iOS (Action Sheet)
   ----------------------------------------------------- */
.ios-sheet-backdrop {
    display: none;
}

@media (max-width: 768px) {
    .ios-sheet-backdrop {
        display: flex;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1050;
        flex-direction: column;
        justify-content: flex-end;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .ios-sheet-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }
    .ios-sheet {
        background: var(--bg);
        border-radius: 20px 20px 0 0;
        padding: 10px 16px calc(24px + env(safe-area-inset-bottom, 0px));
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
        gap: 10px;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
    }
    .ios-sheet-backdrop.is-open .ios-sheet {
        transform: translateY(0);
    }
    .ios-sheet__handle {
        width: 38px;
        height: 5px;
        border-radius: 3px;
        background: var(--border-strong, #8e8e93);
        margin: 0 auto 6px;
        opacity: 0.5;
    }
    .ios-sheet__group {
        background: var(--bg-elev);
        border-radius: 14px;
        overflow: hidden;
        border: 1px solid var(--border);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }
    .ios-sheet__item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        min-height: 48px;
        box-sizing: border-box;
        flex-shrink: 0;
        color: var(--text);
        font-size: 15px;
        font-weight: 500;
        text-decoration: none;
        border-bottom: 0.5px solid var(--border);
        transition: background 0.15s;
    }
    .ios-sheet__item:last-child {
        border-bottom: none;
    }
    .ios-sheet__item:hover, .ios-sheet__item:active {
        background: var(--bg-elev-2);
        text-decoration: none;
    }
    .ios-sheet__item.is-active {
        color: var(--color-primary);
        font-weight: 600;
    }
    .ios-sheet__item i {
        font-size: 18px;
        width: 22px;
        text-align: center;
        color: var(--color-primary);
    }
    .ios-sheet__item--danger {
        color: var(--color-danger);
    }
    .ios-sheet__item--danger i {
        color: var(--color-danger);
    }
    .ios-sheet__arrow {
        margin-left: auto;
        font-size: 12px !important;
        color: var(--text-muted) !important;
        width: auto !important;
    }
    .ios-sheet__cancel {
        background: var(--bg-elev);
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 14px;
        font-size: 16px;
        font-weight: 600;
        color: var(--color-primary);
        text-align: center;
        cursor: pointer;
        transition: background 0.15s;
    }
    .ios-sheet__cancel:active {
        background: var(--bg-elev-2);
    }
}

/* KPI карточки */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.kpi-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.kpi-card header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: var(--space-2);
}

.kpi-card__value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-3);
}

.kpi-card__items {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border);
    padding-top: var(--space-2);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kpi-card__items li {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.kpi-card__items li span { color: var(--text-muted); }
.kpi-card__items li strong { font-weight: 600; }
.kpi-card__items strong.is-warning { color: var(--color-warning); }
.kpi-card__items strong.is-danger  { color: var(--color-danger); }

.kpi-card--muted .kpi-card__value { color: var(--text-muted); }

/* Список «требует внимания» */
.attention-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.attention-list li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-elev-2);
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.attention-list li i { font-size: 20px; flex-shrink: 0; }
.attention-list li span { flex: 1; }

/* Табы (фильтры в /admin/tracks) */
.tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-elev-2);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}
.tabs__item:hover { background: var(--border); text-decoration: none; }
.tabs__item.is-active { background: var(--color-primary); color: var(--text-on-primary); }
.tabs__count {
    background: rgba(255,255,255,.18);
    padding: 1px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}
.tabs__item:not(.is-active) .tabs__count { background: var(--bg-elev); color: var(--text-muted); }

/* ============ Пагинатор ============ */
/* Используется на админских списках. Один блок снизу:
   слева — счётчик «1–30 из 119», в центре — номера страниц,
   справа — селектор «На странице: 30». */
.paginator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) 0 0;
    flex-wrap: wrap;
}
.paginator__info {
    color: var(--text-muted);
    font-size: 13px;
    flex-shrink: 0;
}
.paginator__nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.paginator__btn,
.paginator__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-elev-2);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s;
}
.paginator__btn:hover,
.paginator__page:hover {
    background: var(--border);
    text-decoration: none;
}
.paginator__btn.is-disabled {
    opacity: .4;
    pointer-events: none;
}
.paginator__page.is-active {
    background: var(--color-primary);
    color: var(--text-on-primary);
    border-color: var(--color-primary);
}
.paginator__gap {
    color: var(--text-muted);
    padding: 0 4px;
}
.paginator__per-page {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex-shrink: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.paginator__per-page-label {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
    white-space: nowrap;
}
.form-select--sm {
    padding: 4px 24px 4px 8px;
    font-size: 13px;
    height: auto;
}

/* ============ Компактный список треков (для админки) ============ */
/* Вместо .project-list__item с обложкой 48×48 — одна строка на трек.
   Меньше визуального шума и в 5 раз компактнее. */
.track-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.track-list__item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.3;
}
.track-list__item:hover { background: var(--bg-elev-2); }
.track-list__drag {
    cursor: grab;
    color: var(--text-muted);
    padding: 0 4px;
    flex-shrink: 0;
}
.track-list__title {
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.track-list__meta {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-list__del {
    width: 28px;
    height: 28px;
    padding: 0;
    color: var(--text-muted);
}
.track-list__del:hover {
    background: var(--color-danger-bg, rgba(220, 38, 38, .1));
    color: var(--color-danger, #dc2626);
}
@media (max-width: 640px) {
    .track-list__item {
        grid-template-columns: auto 1fr auto;
    }
    .track-list__meta { display: none; }
}

/* Вариант для админки: добавлена колонка действий справа.
   Колонки: title (1fr), meta (auto), actions (auto). */
.track-list--admin .track-list__item {
    grid-template-columns: 1fr auto auto;
}
.track-list__actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* ============ Чарты (админка) ============ */
.charts-kpi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-3);
    margin: var(--space-3) 0 var(--space-4);
}
.charts-kpi__card {
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}
.charts-kpi__card i {
    color: var(--text-muted);
    font-size: 18px;
}
.charts-kpi__card--live i { color: var(--color-success, #22c55e); }
.charts-kpi__value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.charts-kpi__label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.charts-section-title {
    font-size: 14px;
    font-weight: 600;
    margin: var(--space-4) 0 var(--space-2);
    color: var(--text);
}

/* Прогресс-бар в строке таблицы (для антирейтинга) */
.charts-bar {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 18px;
    background: var(--bg-elev-2);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.charts-bar__fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
}
.charts-bar__label {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    color: var(--text);
}

/* Гистограмма «по часам» (мини-график) */
.charts-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 100px;
    padding: 4px 0 18px;
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--border);
    position: relative;
}
.charts-bars__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    position: relative;
}
.charts-bars__fill {
    width: 100%;
    background: var(--color-primary);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
}
.charts-bars__num {
    font-size: 9px;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.charts-bars__label {
    position: absolute;
    bottom: -16px;
    font-size: 10px;
    color: var(--text-muted);
}

/* Сетка для двух колонок таблиц рядом (страны + устройства) */
.charts-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}
@media (max-width: 720px) {
    .charts-grid-2 { grid-template-columns: 1fr; }
}

/* ============ Календарь расписания DJ ============ */
.dj-cal__nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.dj-cal__title {
    font-size: 14px;
    color: var(--text);
    margin-left: var(--space-2);
}

@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; display: inline-block; }

/* Общая структура день/неделя — табличная сетка с фиксированной высотой часа 54px */
.dj-cal {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: auto;
    background: var(--bg-elev);
    margin-top: var(--space-2);
}
.dj-cal__head,
.dj-cal__body {
    display: grid;
}
.dj-cal--week .dj-cal__head,
.dj-cal--week .dj-cal__body {
    grid-template-columns: 50px repeat(7, 1fr);
}
.dj-cal--day .dj-cal__head,
.dj-cal--day .dj-cal__body {
    grid-template-columns: 50px 1fr;
}
.dj-cal__hours-corner {
    border-bottom: 1px solid var(--border);
    background: var(--bg-elev-2);
}
.dj-cal__day-head {
    text-align: center;
    padding: 6px 4px;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-elev-2);
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.2;
}
.dj-cal__day-head small {
    display: block;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 10px;
}
.dj-cal__day-head strong {
    font-size: 18px;
    color: var(--text);
}
.dj-cal__day-head.is-today strong {
    color: var(--color-primary);
}

.dj-cal__hours {
    border-right: 1px solid var(--border);
}
.dj-cal__hour-label {
    height: 54px;
    padding-right: 6px;
    text-align: right;
    font-size: 11px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    line-height: 54px;
}

.dj-cal__day-col {
    position: relative;
    border-left: 1px solid var(--border);
    min-height: calc(54px * 24);
}
.dj-cal__cell {
    height: 54px;
    border-bottom: 1px solid var(--border);
}
.dj-cal__cell:nth-child(even) {
    background: rgba(255,255,255,.015);
}
[data-theme="light"] .dj-cal__cell:nth-child(even) {
    background: rgba(0,0,0,.015);
}

/* Слот эфира — позиционирован абсолютно поверх ячеек */
.dj-cal__slot {
    position: absolute;
    left: 4px;
    right: 4px;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 12px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    transition: opacity .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
    padding: 4px 6px;
    line-height: 1.2;
    border: 1px solid rgba(255,255,255,.15);
}
.dj-cal__slot:hover { box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.dj-cal__slot:active { cursor: grabbing; }
.dj-cal__slot.is-one-time {
    /* Разовый слот — пунктирная рамка чтобы отличался от регулярного */
    border-style: dashed;
    border-width: 2px;
    border-color: rgba(255,255,255,.55);
}
.dj-cal__slot-time {
    font-size: 11px;
    opacity: .85;
    font-variant-numeric: tabular-nums;
}
.dj-cal__slot-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dj-cal__slot-resize {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    cursor: ns-resize;
    background: linear-gradient(transparent, rgba(0,0,0,.2));
}

.dj-cal__empty {
    padding: var(--space-4);
    text-align: center;
}

/* ===== Месяц ===== */
.dj-cal--month {
    padding: 0;
}
.dj-cal__month-head {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--bg-elev-2);
    border-bottom: 1px solid var(--border);
}
.dj-cal__month-head > div {
    padding: 8px;
    text-align: center;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    border-right: 1px solid var(--border);
}
.dj-cal__month-head > div:last-child { border-right: none; }

.dj-cal__month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}
.dj-cal__month-cell {
    min-height: 120px;
    padding: 6px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-elev);
    transition: background .15s;
}
.dj-cal__month-cell:hover {
    background: var(--bg-elev-2);
    text-decoration: none;
}
.dj-cal__month-cell.is-other-month {
    background: var(--bg);
    color: var(--text-muted);
}
.dj-cal__month-cell.is-today .dj-cal__month-date {
    background: var(--color-primary);
    color: var(--text-on-primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dj-cal__month-date {
    font-size: 13px;
    font-weight: 600;
}
.dj-cal__month-slots {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.dj-cal__month-dot {
    font-size: 11px;
    color: white;
    padding: 2px 5px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.dj-cal__month-more {
    font-size: 10px;
    color: var(--text-muted);
}

/* ===== Чекбоксы дней недели в форме «Добавить» ===== */
.dj-days {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.dj-days__item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elev-2);
    cursor: pointer;
    font-size: 13px;
    user-select: none;
}
.dj-days__item input { margin: 0; }
.dj-days__item:has(input:checked) {
    background: var(--color-primary);
    color: var(--text-on-primary);
    border-color: var(--color-primary);
}

/* Переключатель типа загрузки в админке (admin/upload) */
.upload-type-switch {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.upload-type-switch__btn {
    flex: 1;
    min-width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elev);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
    transition: border-color .15s, background .15s;
}
.upload-type-switch__btn:hover { background: var(--bg-elev-2); }
.upload-type-switch__btn.is-active {
    border-color: var(--color-primary);
    background: rgba(81, 129, 184, 0.08);
    color: var(--color-primary);
}
.upload-type-switch__btn i { font-size: 20px; }

/* DJ-комната */
.dj-room-controls {
    display: flex;
    gap: var(--space-3);
    align-items: end;
    flex-wrap: wrap;
}
.dj-now-playing__row {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}
.dj-now-playing__cover {
    width: 80px; height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elev-2);
}
.dj-now-playing__cover--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 32px;
}
.dj-now-playing__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dj-now-playing__info strong { font-size: 16px; }
.dj-now-playing__title { font-size: 14px; color: var(--text-muted); }

.dj-progress {
    height: 6px;
    background: var(--bg-elev-2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}
.dj-progress > span {
    display: block;
    height: 100%;
    background: var(--color-primary);
    transition: width .3s linear;
}
/* (RTL-вариант оставлен на случай возврата прогресс-бара в будущем.) */
.dj-progress--rtl {
    display: flex;
    justify-content: flex-end;
}
.dj-progress--rtl > span { transition: width .5s linear; }

.dj-now-playing__time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}
.dj-now-playing__time-sep { opacity: .5; }

/* Тонкая шапка трека: обложка + название + таймер. Поднята в самый верх
   комнаты — не «Сейчас в эфире», просто что играет, без заголовка. */
.dj-track-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 8px 12px;
    margin-bottom: var(--space-3);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.dj-track-bar__cover {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elev-2);
}
.dj-track-bar__cover--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 22px;
}
.dj-track-bar__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.dj-track-bar__info strong {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dj-track-bar__title {
    font-size: 13px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dj-track-bar__time {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, monospace;
    font-size: 13px;
    color: var(--text-muted);
}
.dj-track-bar__time--left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    flex-shrink: 0;
    min-width: 68px;
    padding-right: 12px;
    border-right: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    gap: 1px;
}
.dj-timer-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    width: 100%;
}
.dj-timer-sub {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    opacity: 0.75;
}
.dj-timer-row--total .dj-timer-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}
.dj-timer-row--remain .dj-timer-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    transition: color 0.2s;
}
.dj-timer-row--remain .dj-timer-val.is-warning {
    color: #f59e0b;
}
.dj-timer-row--remain .dj-timer-val.is-danger {
    color: #ef4444;
    font-weight: 800;
}
.dj-track-bar__sep { opacity: .4; margin: 0 4px; }

/* Микшер: добавочные блоки внутри сайдбара. */
.dj-mixer-playlist {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: var(--space-2);
    border-top: 1px solid var(--border);
}
.dj-mixer-playlist .form-row__label {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}
.dj-mixer-end {
    margin-top: var(--space-2);
}

/* Чат DJ-комнаты (заглушка) */
.dj-chat {
    flex: 1;
    min-height: 160px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-2);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dj-chat__msg {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.35;
}
.dj-chat__msg--listener { background: rgba(59, 130, 246, 0.10); }
.dj-chat__msg--dj       { background: rgba(16, 185, 129, 0.12); border-left: 3px solid #10b981; }
.dj-chat__msg-author {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.dj-chat__msg-sep {
    color: var(--text-muted);
    flex-shrink: 0;
}
.dj-chat__msg-text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}
.dj-chat__msg-del {
    flex-shrink: 0;
    margin-left: auto;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    transition: background .15s, color .15s;
}
.dj-chat__msg-del:hover {
    background: rgba(239, 68, 68, .15);
    color: var(--color-danger);
}

/* Кнопка ВКЛ эфирной студии (стандартный размер как у остальных кнопок) */
.dj-init-box {
    margin-bottom: var(--space-2, 8px);
}
.dj-btn-init-on {
    min-height: 42px;
    height: 42px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm, 8px);
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.dj-btn-init-on:active {
    transform: scale(0.98);
}

/* Буст микрофона в DJ-комнате */
.dj-mic-boost {
    margin-top: 10px;
    padding: 8px 10px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
}
.dj-mic-boost__label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.dj-mic-boost__btns {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
}
.dj-mic-boost__btn {
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s ease;
}
.dj-mic-boost__btn:hover {
    color: var(--text);
    border-color: var(--border-strong);
}
.dj-mic-boost__btn.is-active {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 1px 4px rgba(81, 129, 184, 0.4);
}

.dj-listeners-chat {
    display: grid;
    grid-template-columns: minmax(350px, 1.4fr) 1fr 1.1fr;
    gap: var(--space-3);
    padding: var(--space-3);
}
.dj-lc-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.dj-lc-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.dj-lc-head strong { font-size: 14px; }
.dj-lc-head .muted { font-variant-numeric: tabular-nums; font-size: 13px; }
.dj-lc-empty { padding: var(--space-3) 0; font-size: 13px; }

/* Голосования */
.dj-votes {
    flex: 1;
    min-height: 160px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-2);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dj-vote-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.35;
    background: rgba(251, 146, 60, 0.10);
    border-left: 3px solid #fb923c;
}
.dj-vote-item__score {
    font-size: 16px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}
.dj-vote-item__info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dj-vote-item__author {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
}
.dj-vote-item__city {
    font-size: 11px;
    color: var(--text-muted);
}

/* Слушатели + голосование + чат: три панели в одной карточке. */
.dj-listeners-chat {
    display: grid;
    grid-template-columns: minmax(350px, 1.4fr) 1fr 1.1fr;
    gap: var(--space-3);
    padding: var(--space-3);
}

.dj-listeners-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-height: 160px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.dj-listeners-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 32px;
    padding: 0 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.dj-listeners-list__item:last-child { border-bottom: none; }
.dj-listener-col-loc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
}
.dj-listeners-list__flag {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
}
.dj-listeners-list__loc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text);
}
.dj-listener-device {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dj-listener-user {
    flex-shrink: 0;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    color: #4a76a8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dj-listener-user:hover {
    text-decoration: underline;
}
.dj-listener-user--admin {
    color: #f59e0b;
}
.dj-listener-user--guest {
    color: var(--text-muted);
    font-weight: 400;
    opacity: 0.75;
}

/* Вкладки Очередь / Об артисте */
.dj-queue-tabs {
    margin-bottom: 0;
    padding-bottom: 0;
    gap: 6px;
}
.dj-queue-tabs .tabs__item {
    cursor: pointer;
    border: none;
    font-size: 13px;
    padding: 6px 12px;
}
.dj-artist-card {
    padding: var(--space-3) 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dj-artist-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dj-artist-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-elev-2);
    flex-shrink: 0;
}
.dj-artist-avatar--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-muted);
}
.dj-artist-title-block {
    flex: 1;
    min-width: 0;
}
.dj-artist-name {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dj-artist-city {
    font-size: 12px;
}
.dj-artist-vk-btn {
    flex-shrink: 0;
    font-size: 12px;
    padding: 4px 10px;
}
.dj-artist-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg-elev-2);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    max-height: 220px;
    overflow-y: auto;
    word-break: break-word;
}
.dj-artist-empty {
    padding: var(--space-4) 0;
}

/* Компактная очередь треков в DJ-комнате — больше треков на экран. */
.dj-queue {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.dj-queue__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}
.dj-queue__item:last-child { border-bottom: none; }
.dj-queue__cover {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elev-2);
}
.dj-queue__cover--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 16px;
}
.dj-queue__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.dj-queue__info strong {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dj-queue__info small { font-size: 11px; }

/* Карточка-обёртка джинглов — без шапки, экономим место. */
.dj-jingles-card { padding: var(--space-3); }
.dj-jingles-card .dj-jingles { margin: 0; }

.dj-mixer-back { margin-top: 4px; }

.dj-jingles {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
    flex-wrap: wrap;
}
.dj-jingles form { flex: 1; min-width: 180px; }

/* Микшер DJ: вертикальные фейдеры (слева в зоне большого пальца на планшете)
   и VU-метры справа от фейдеров — чтобы палец не загораживал индикацию. */
.dj-room-grid {
    display: grid;
    grid-template-columns: minmax(180px, 220px) 1fr;
    gap: var(--space-4);
    align-items: start;
    margin-top: var(--space-4); /* отступ от карточки «Эфирная комната» сверху */
}
.dj-mixer-panel {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-3);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    /* Мобильный safe-area */
    max-width: 100%;
    box-sizing: border-box;
}
.dj-mixer-channels {
    display: flex;
    gap: var(--space-3);
    justify-content: space-around;
    align-items: flex-end;
}
.dj-channel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}
.dj-channel__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dj-channel__body {
    display: flex;
    align-items: stretch;
    gap: 6px;
    height: 220px;
}
.dj-channel__val {
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: var(--text-muted);
}

/* Вертикальный VU-метр (тонкий, чтобы не занимать много места) */
.dj-vu-vert {
    width: 8px;
    min-width: 8px;
    height: 100%;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.dj-vu-vert__fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: linear-gradient(to top, #10b981 0%, #f59e0b 70%, #ef4444 95%);
    transition: height .04s ease-out;
}
.dj-vu-vert__fill--mic {
    background: linear-gradient(to top, #3b82f6 0%, #f59e0b 70%, #ef4444 95%);
}
.dj-vu-vert__peak {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0%;
    height: 2px;
    background: #ffffff;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    transition: bottom .05s linear;
}

/* Бейдж прямого эфира в комнате DJ */
.dj-onair-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all .2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.dj-onair-badge--off {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.dj-onair-badge--off .dj-onair-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}
.dj-onair-badge--music {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.dj-onair-badge--music .dj-onair-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
    box-shadow: 0 0 6px #3b82f6;
}
.dj-onair-badge--mic {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.5);
    animation: dj-pulse 1.5s infinite;
}
.dj-onair-badge--mic .dj-onair-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}
@keyframes dj-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

/* Вертикальный фейдер (range) */
.dj-fader-vert {
    -webkit-appearance: slider-vertical;
    writing-mode: bt-lr;
    width: 28px;
    min-width: 28px;
    height: 100%;
    margin: 0;
    padding: 0;
    accent-color: var(--color-primary);
}

/* Кнопки микшера */
.dj-mixer-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.dj-btn-air-toggle {
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 13px;
    padding: 10px 14px;
    transition: all .2s ease;
}
.dj-btn-air-toggle.btn--success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    color: #fff;
}
.dj-btn-air-toggle.btn--success:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}
.dj-btn-air-toggle.btn--danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    color: #fff;
}
.dj-btn-air-toggle.btn--danger:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.55);
}

/* Планшет: всё ещё две колонки, но микшер уже */
@media (max-width: 1024px) {
    .dj-room-grid { grid-template-columns: 180px 1fr; }
    .dj-channel__body { height: 200px; }
}

/* Мобильный: микшер сверху одной строкой, фейдеры компактные */
@media (max-width: 768px) {
    .dj-room-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    .dj-mixer-panel {
        position: static;
        order: -1; /* над контентом — под рукой */
        padding: var(--space-3) var(--space-3) var(--space-2);
    }
    .dj-mixer-channels {
        gap: var(--space-2);
    }
    .dj-channel__body { height: 140px; }
    .dj-channel__label { font-size: 11px; }
    .dj-fader-vert { width: 22px; min-width: 22px; }
    .dj-mixer-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .dj-mixer-buttons .btn { flex: 1; min-width: 30%; }

    .dj-topbar { padding: 4px; }
    .dj-topbar__air { font-size: 13px; padding: 4px 8px; letter-spacing: .1em; }
    .dj-topbar__listeners { padding: 2px 8px; font-size: 13px; }

    .dj-track-bar { padding: 6px 8px; gap: 8px; }
    .dj-track-bar__cover { width: 36px; height: 36px; }
    .dj-track-bar__time { font-size: 12px; }

    .dj-listeners-chat {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }
    .dj-listeners-list { min-height: 120px; max-height: 200px; }
    .dj-votes { min-height: 140px; max-height: 240px; }
    .dj-chat { min-height: 140px; max-height: 240px; }
}

/* Поиск треков (в редакторе плейлиста) */
.track-search {
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
}
.track-search__head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}
.track-search__head .form-input { flex: 1; }
.track-search__results {
    max-height: 380px;
    overflow-y: auto;
}
.track-search__results .project-list { gap: 6px; }
.track-search__results .project-list__item { padding: 8px 10px; }

/* Группа кнопок добавления трека из поиска (now/next/end). Адаптив: на узких
   экранах кнопки сжимаются в сетку, чтобы не вылезать за пределы карточки. */
.track-search__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.track-search__actions .btn--icon {
    width: 34px;
    height: 34px;
}
@media (max-width: 480px) {
    .track-search__actions .btn--icon {
        width: 30px;
        height: 30px;
    }
}

/* Блок «начать эфир» на /studio: выбор плейлиста и кнопка одной формой. */
.dj-air-status { display: flex; flex-direction: column; gap: var(--space-3); }
.dj-air-actions { margin-top: var(--space-3); }
.dj-air-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: end;
}
.dj-air-form .form-select { flex: 1; min-width: 200px; max-width: 360px; }
.dj-air-form .form-row__label {
    width: 100%;
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Длительность трека в списке */
.dur {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}
.dur--trimmed {
    background: rgba(255, 193, 7, 0.18);
    color: var(--text);
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}
.dur--orig {
    color: var(--text-muted);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
    margin-left: 4px;
    font-size: 11px;
}

/* Волна */
.track-waveform {
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

/* Кастомная волна (waveform.js) */
.wf-root {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
}
.wf-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    font-size: 12px;
    color: var(--text-muted);
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-2);
    border-bottom: 1px solid var(--border);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.wf-info b { color: var(--text); font-weight: 600; }
.wf-row {
    position: relative;
    display: flex;
    gap: 0;
    align-items: stretch;
}
.wf-row canvas {
    flex: 1;
    width: 100%;
    height: 220px;
    cursor: crosshair;
    display: block;
}
.wf-scale {
    position: relative;
    width: 38px;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.wf-scale__mark {
    position: absolute;
    left: 4px;
    transform: translateY(-50%);
    white-space: nowrap;
}
.wf-scale__mark::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    width: 4px;
    height: 1px;
    background: var(--border-strong);
}
.wf-scale__mark--ref {
    color: var(--color-success);
    font-weight: 700;
}
.wf-scale__mark--ref::before {
    background: var(--color-success);
    width: 6px;
    left: -6px;
    height: 2px;
}

.waveform-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-3);
    flex-wrap: wrap;
}
.waveform-time {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    color: var(--text-muted);
}
.waveform-info { font-size: 13px; }

@media (max-width: 640px) {
    .wf-row canvas { height: 160px; }
    .wf-scale { width: 32px; font-size: 9px; }
    .wf-info { font-size: 11px; gap: var(--space-1) var(--space-3); }
}

/* ============ Mesh topology (admin) ============ */
.mesh-stats { display: flex; gap: var(--space-4); margin-bottom: var(--space-3); flex-wrap: wrap; }
.mesh-tree-wrap { overflow: auto; }
.mesh-tree { width: 100%; min-height: 420px; background: var(--bg-elev-2); border-radius: var(--radius); }
.mesh-tree__node { fill: var(--color-success); cursor: pointer; transition: fill .2s; }
.mesh-tree__node--server { fill: var(--color-primary); }
.mesh-tree__node--dj { fill: #a855f7; }
.mesh-tree__node--connecting { fill: var(--text-muted); }
.mesh-tree__node--dead { fill: var(--color-danger); }
.mesh-tree__edge { stroke: var(--border-strong); stroke-width: 1.5; }
.mesh-tree__edge--backup { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 4 3; }
.mesh-tree__label { font-size: 11px; fill: var(--text); pointer-events: none; font-weight: 500; }

/* ============ Radio Player (home page) ============ */
/*
 * Главная (/) — отдельная самостоятельная страница, БЕЗ общего layout.
 * Шапка минимальная: только две кнопки справа — «Размести трек / Кабинет»
 * и переключатель темы. Меню для музыкантов сюда не выводится.
 *
 * Кабинет (/home) — отдельный интерфейс для музыкантов с полным меню.
 * Открывается по ссылке в новой вкладке.
 */
.home-page {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.home-page .app-header {
    border-bottom: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.home-page .app-header--slim {
    height: 40px;
    min-height: 40px;
    border-bottom: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.home-page .app-header--slim .app-header__inner {
    height: 40px;
    padding: 0 var(--space-3);
}
.home-page .app-header--slim .app-nav__item {
    width: 34px;
    height: 34px;
    font-size: 16px;
    border-radius: 8px;
}
.home-page .app-header--slim .app-nav__item--vk {
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
}
.home-page .app-header--slim .app-nav__item--vk:hover {
    transform: scale(1.08);
    background: transparent;
}
.home-page .app-header--slim .app-nav__item--wide {
    width: auto;
    padding: 0 10px;
    font-size: 12px;
    gap: 5px;
    font-weight: 500;
}
.home-page .app-header--slim .app-nav__item--wide span {
    font-size: 12px;
    white-space: nowrap;
}
.app-nav__item--fan {
    border-color: rgba(236, 72, 153, 0.25) !important;
    background: rgba(236, 72, 153, 0.08) !important;
    color: var(--text) !important;
}
.app-nav__item--fan:hover {
    background: rgba(236, 72, 153, 0.16) !important;
    border-color: rgba(236, 72, 153, 0.45) !important;
}
@media (max-width: 600px) {
    .home-page .app-header--slim .app-nav__item--wide {
        padding: 0 7px;
        font-size: 11px;
        gap: 3px;
    }
    .home-page .app-header--slim .app-nav__item--wide span {
        font-size: 11px;
    }
}
@media (max-width: 480px) {
    .home-page .app-header--slim .app-nav__item--wide span,
    .app-header .app-header__actions .app-nav__item--wide span {
        display: none !important;
    }
    .home-page .app-header--slim .app-nav__item--wide,
    .app-header .app-header__actions .app-nav__item--wide {
        width: 34px !important;
        height: 34px !important;
        padding: 0 !important;
        justify-content: center !important;
    }
}
.home-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding: var(--space-4);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    align-items: stretch;
}

/* Десктоп: 2 колонки, плеер — один из элементов сетки */
@media (min-width: 768px) {
    .home-main {
        grid-template-columns: repeat(2, 1fr);
        padding: var(--space-5) var(--space-4);
        gap: var(--space-5);
    }
}
@media (min-width: 1200px) {
    .home-main {
        grid-template-columns: repeat(3, 1fr);
    }
}

.radio-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    justify-self: center;
    width: 100%;
}

.radio-player__card {
    position: relative;
    width: min(90vw, 100%);
    max-width: 400px;
    aspect-ratio: 1;
    border-radius: 15px;
    overflow: hidden;
    background: var(--bg-elev-2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Обложка — круглая, крутится как пластинка */
/* Два слоя для плавной смены (fade crossfade) */
.radio-player__cover {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 85%;
    height: 85%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.35);
    opacity: 0;
    transition: opacity .8s ease;
    z-index: 1;
}
.radio-player__cover.is-visible { opacity: 1; }
[data-theme="light"] .radio-player__cover {
    border-color: rgba(0,0,0,.25);
}
.radio-player__card.is-spinning .radio-player__cover {
    animation: radio-spin 10s linear infinite;
}
.radio-player__cover-fallback {
    width: 85%;
    height: 85%;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: var(--text-muted);
    background: var(--bg-elev);
    z-index: 0;
}
[data-theme="light"] .radio-player__cover-fallback { border-color: rgba(0,0,0,.25); }
.radio-player__card.is-spinning .radio-player__cover-fallback {
    animation: radio-spin 10s linear infinite;
}
@keyframes radio-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* Для cover слоёв: вращение + translate */
.radio-player__card.is-spinning .radio-player__cover {
    animation: radio-spin-cover 10s linear infinite;
}
@keyframes radio-spin-cover {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Центр пластинки (дырка) */
.radio-player__hole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--bg-elev-2);
    border-radius: 50%;
    border: 2px solid var(--border);
    z-index: 2;
    pointer-events: none;
}

/* Кнопка Play */
.radio-player__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(0,0,0,.4);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .2s;
    z-index: 10;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.radio-player__play:hover {
    background: rgba(0,0,0,.6);
    transform: translate(-50%, -50%) scale(1.08);
}
.radio-player__play:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

/* Артист — сверху по центру */
.radio-player__artist-top {
    position: absolute;
    top: var(--space-1);
    left: 0;
    right: 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    z-index: 3;
    pointer-events: none;
    padding: 0 var(--space-4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Название трека — снизу по центру */
.radio-player__title-bottom {
    position: absolute;
    bottom: var(--space-1);
    left: 0;
    right: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    z-index: 3;
    pointer-events: none;
    padding: 0 var(--space-4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Кнопка «ещё» */
.radio-player__more {
    position: absolute;
    bottom: var(--space-2);
    right: var(--space-2);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.3);
    background: rgba(0,0,0,.4);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background .2s, transform .2s;
}
[data-theme="light"] .radio-player__more {
    border-color: rgba(0,0,0,.2);
    background: rgba(255,255,255,.6);
    color: var(--text);
}
.radio-player__more:hover { background: rgba(0,0,0,.7); transform: scale(1.08); }
[data-theme="light"] .radio-player__more:hover { background: rgba(0,0,0,.15); }

/* Кнопка отключения звука (Mute) */
.radio-player__mute {
    position: absolute;
    bottom: var(--space-2);
    left: var(--space-2);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.3);
    background: rgba(0,0,0,.4);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background .2s, transform .2s, color .2s;
}
[data-theme="light"] .radio-player__mute {
    border-color: rgba(0,0,0,.2);
    background: rgba(255,255,255,.6);
    color: var(--text);
}
.radio-player__mute:hover { background: rgba(0,0,0,.7); transform: scale(1.08); }
[data-theme="light"] .radio-player__mute:hover { background: rgba(0,0,0,.15); }
.radio-player__mute.is-muted {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
}

.radio-player__auth {
    text-align: center;
    margin-bottom: var(--space-3);
}
.radio-player__auth .btn {
    font-size: 12px;
    opacity: .7;
    transition: opacity .2s;
}
.radio-player__auth .btn:hover { opacity: 1; }

/* Кнопка навигации с текстом — та же высота 42px, ширина по содержимому */
.app-nav__item--wide {
    width: auto;
    padding: 0 var(--space-3);
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}
.app-nav__item--wide i { font-size: 16px; }

/* ============ Radio Modal (player extras) ============ */
/* Оверлей внутри карточки плеера */
.radio-player__overlay {
    position: absolute;
    inset: 0;
    border-radius: 15px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: rgba(15, 23, 42, .88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
[data-theme="light"] .radio-player__overlay {
    background: rgba(248, 250, 252, .9);
}

.radio-player__ov-section {
    width: 100%;
    text-align: center;
}

/* Голосование */
.radio-player__ov-vote {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
}
.radio-player__ov-vote-btn {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.08);
    font-size: 24px;
    cursor: pointer;
    transition: transform .15s, background .15s, border-color .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
[data-theme="light"] .radio-player__ov-vote-btn {
    border-color: rgba(0,0,0,.15);
    background: rgba(0,0,0,.05);
}
.radio-player__ov-vote-btn:hover { transform: scale(1.15); }
.radio-player__ov-vote-btn.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.2);
}

.radio-player__ov-status {
    margin-top: var(--space-2);
    font-size: 13px;
    color: rgba(255,255,255,.7);
}
[data-theme="light"] .radio-player__ov-status { color: var(--text-muted); }

/* Чат */
.radio-player__ov-chat {
    display: flex;
    gap: var(--space-2);
}
.radio-player__ov-chat-input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 14px;
    outline: none;
}
[data-theme="light"] .radio-player__ov-chat-input {
    border-color: rgba(0,0,0,.15);
    background: rgba(0,0,0,.05);
    color: var(--text);
}
.radio-player__ov-chat-input::placeholder { color: rgba(255,255,255,.4); }
[data-theme="light"] .radio-player__ov-chat-input::placeholder { color: var(--text-muted); }
.radio-player__ov-chat-send {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Донат */
.radio-player__ov-donate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s;
}
[data-theme="light"] .radio-player__ov-donate {
    border-color: rgba(0,0,0,.15);
    background: rgba(0,0,0,.05);
    color: var(--text);
}
.radio-player__ov-donate:hover { background: rgba(255,255,255,.15); }
[data-theme="light"] .radio-player__ov-donate:hover { background: rgba(0,0,0,.1); }


/* ===== Сетка вещания (/admin/grid) ===== */
/* Маленькие цветные пилюли в шапке для подписи слоёв */
.grid-layer-pill {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}
.grid-layer-pill--dj      { background: rgb(60,120,200); }
.grid-layer-pill--program { background: rgb(60,160,90);  }
.grid-layer-pill--ad      { background: rgb(220,80,80);  }

/* Слоты на сетке: рамка чуть толще, при hover подсвечиваем */
.grid-slot {
    color: white;
    border-left: 3px solid rgba(255,255,255,.4);
}
.grid-slot:hover {
    filter: brightness(1.15);
}
/* Конфликт DJ↔Program: жёлтая рамка-предупреждение */
.grid-slot--overlap {
    outline: 2px solid #ffcc00;
    outline-offset: -2px;
    box-shadow: 0 0 0 2px rgba(255,204,0,.3);
}


/* ===== Информационное табло DJ-комнаты (.dj-upcoming) ===== */
/* Плашка между info и time в .dj-track-bar — показывает ближайшие
   врезки рекламы и программ (polling 60 сек) */
.dj-upcoming {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}
.dj-upcoming__item {
    pointer-events: auto;
}
.dj-upcoming__item {
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-elev-2);
    border-left: 3px solid var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dj-upcoming__item--ad      { border-left-color: rgb(220,80,80); }
.dj-upcoming__item--program { border-left-color: rgb(60,160,90); }
.dj-upcoming__item.is-soon  {
    animation: dj-upcoming-pulse 1s ease-in-out infinite alternate;
}
@keyframes dj-upcoming-pulse {
    from { background: var(--bg-elev-2); }
    to   { background: rgba(220,80,80,.18); }
}
.dj-upcoming__time {
    font-weight: 700;
    font-feature-settings: "tnum";
}
.dj-upcoming__label {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: .04em;
    color: var(--text-muted);
}
.dj-upcoming__name {
    font-weight: 500;
}
.dj-upcoming__when {
    font-size: 11px;
}


/* ===== Список блоков главной (настройки) ===== */
.settings-blocks-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.settings-blocks-list__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: grab;
    transition: border-color .15s, opacity .15s;
}
.settings-blocks-list__item:active { cursor: grabbing; }
.settings-blocks-list__drag {
    color: var(--text-muted);
    font-size: 16px;
    cursor: grab;
}
.settings-blocks-list__title {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
}
.settings-blocks-list__title-input {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    border: none;
    border-bottom: 1px dashed var(--border);
    background: transparent;
    color: var(--text);
    padding: 2px 4px;
    outline: none;
    min-width: 0;
}
.settings-blocks-list__title-input:focus {
    border-bottom-color: var(--color-primary);
}
.settings-blocks-list__toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}


/* ===== Блоки главной страницы ===== */
/* Верхняя полоса важной информации */
.info-bar {
    width: 100%;
    max-width: 1200px;
    margin: var(--space-4) auto var(--space-6) auto;
    padding: var(--space-5);
    background: var(--bg-elev);
    border: none;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
@media (prefers-color-scheme: dark) {
    .info-bar {
        background: var(--bg-elev);
    }
}
.info-bar__inner {
    font-size: 14px;
    line-height: 1.6;
}
.info-bar__inner p { margin: 0; }
.info-bar__inner a { color: var(--color-primary); text-decoration: underline; }
.info-bar__inner a:hover { text-decoration: none; }
.info-bar__inner strong { font-weight: 600; }
.info-bar__inner em { font-style: italic; }

/* Блоки теперь прямые дети .home-main (grid), обёртка .home-blocks не используется */
.home-block {
    background: var(--bg-elev);
    border: none;
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    min-height: 120px;
}
.home-block__header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    font-size: 15px;
    font-weight: 600;
}
.home-block__header i {
    color: var(--color-primary);
    font-size: 18px;
}
.home-block__loading {
    padding: var(--space-6) 0;
}


/* ===== Внутренности блоков главной ===== */
.home-schedule-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.home-schedule-list li {
    display: flex; align-items: center; gap: 8px; font-size: 14px;
}
.home-schedule-list li i { color: var(--text-muted); }

.home-top-list {
    list-style: none; margin: 0; padding: 0; counter-reset: top;
    display: flex; flex-direction: column; gap: 6px;
}
.home-top-list li {
    counter-increment: top;
    display: flex; align-items: center; gap: 8px; font-size: 13px;
}
.home-top-list li::before {
    content: counter(top); font-weight: 700; color: var(--color-primary);
    min-width: 20px; text-align: center;
}
.home-top-list__cover { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }

.home-new-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 6px;
}
.home-new-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.home-new-list__cover { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }

.home-artists-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 10px;
}
.home-artists-grid__item {
    display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.home-artists-grid__item img,
.home-artists-grid__item span {
    width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
    background: var(--bg-elev-2); display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 20px;
}
.home-artists-grid__item small { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70px; }

/* Блок погоды */
.home-weather__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
}
.home-weather__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    cursor: default;
}
.home-weather__circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform .15s;
    position: relative;
    gap: 3px;
}
.home-weather__item:hover .home-weather__circle {
    transform: scale(1.08);
}
.home-weather__emoji {
    font-size: 16px;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}
.home-weather__temp {
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
.home-weather__city {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70px;
}

.home-stats-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3);
}
.home-stats-grid__item {
    text-align: center; padding: var(--space-3);
    background: var(--bg-elev-2); border-radius: var(--radius-sm);
}
.home-stats-grid__item strong { display: block; font-size: 22px; font-weight: 700; }
.home-stats-grid__item small { color: var(--text-muted); font-size: 12px; }

.home-geo-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 4px;
}
.home-geo-list li { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.home-geo-list li:last-child { border-bottom: none; }

.home-history-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 6px;
}
.home-history-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.home-history-list__cover { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }

/* Блок текстовой информации */
.home-info-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
}
.home-info-content p { margin: 0 0 12px; }
.home-info-content p:last-child { margin-bottom: 0; }
.home-info-content strong { font-weight: 600; }
.home-info-content em { font-style: italic; }
.home-info-content ul, .home-info-content ol { margin: 8px 0; padding-left: 20px; }
.home-info-content li { margin-bottom: 4px; }
.home-info-content a { color: var(--color-primary); text-decoration: underline; }
.home-info-content a:hover { text-decoration: none; }

.settings-blocks-list__opts {
    width: 100%;
    padding: var(--space-2) 0 0 36px;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    font-size: 13px;
}
.settings-blocks-list__opts .form-check { margin-bottom: 0; }
.settings-blocks-list__opts .form-input { padding: 6px 8px; font-size: 13px; }
.settings-blocks-list__opts .form-select { padding: 6px 8px; font-size: 13px; }
.settings-blocks-list__opts .form-row { flex-direction: row; align-items: center; gap: 8px; margin-bottom: 0; }
.settings-blocks-list__item {
    flex-wrap: wrap;
}


/* ===== Страница помощи ===== */
.help-sections {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.help-section {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.help-section summary {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elev-2);
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    list-style: none;
    user-select: none;
}
.help-section summary::-webkit-details-marker { display: none; }
.help-section summary::before {
    content: '▸';
    transition: transform .15s;
    font-size: 12px;
    color: var(--text-muted);
}
.help-section[open] summary::before { transform: rotate(90deg); }
.help-section summary:hover { background: var(--border); }
.help-section__body {
    padding: var(--space-4);
    font-size: 14px;
    line-height: 1.7;
}
.help-section__body h4 { margin: var(--space-3) 0 var(--space-2); font-size: 15px; }
.help-section__body ol, .help-section__body ul { padding-left: 20px; margin: var(--space-2) 0; }
.help-section__body li { margin-bottom: 6px; }
.help-section__body p { margin: 0 0 var(--space-3); }

/* ===== Прозрачная красная кнопка ===== */
.btn.btn--danger.btn--transparent {
    background: transparent;
    border-color: var(--color-danger);
    color: var(--color-danger);
}

/* ===== Универсальные плашки в стиле iOS (карточки внутри карточек) ===== */
.ios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: var(--space-3);
    margin: var(--space-2) 0;
}

.ios-card-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-decoration: none !important;
    color: var(--text);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ios-card-tile:hover,
.ios-card-tile:hover * {
    text-decoration: none !important;
}

.ios-card-tile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--border-strong);
}

.ios-card-tile--active {
    border-color: var(--color-success);
    background: rgba(75, 179, 75, 0.06);
    box-shadow: 0 0 0 1px var(--color-success), 0 2px 8px rgba(75, 179, 75, 0.12);
}

.ios-card-tile--compact {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
}

/* ==========================================================================
   VK Badges & Cards (User / Project)
   ========================================================================== */
.vk-badge-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2.5px;
    background: #0077ff;
    color: #ffffff !important;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    border-radius: 3px;
    padding: 2px 5px;
    text-decoration: none !important;
    transition: background-color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
    vertical-align: middle;
    flex-shrink: 0;
}
.vk-badge-btn:hover {
    background: #005ece;
    color: #ffffff !important;
    transform: scale(1.05);
}
.vk-badge-btn i {
    font-size: 8px;
}
.vk-badge-btn--lg {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    gap: 4px;
}
.vk-badge-btn--lg i {
    font-size: 9.5px;
}

/* Compact KPI Chips */
.kpi-chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--space-3);
}
.kpi-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 12.5px;
    color: var(--text-muted);
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.kpi-chip:hover {
    border-color: var(--border-strong);
    background: var(--bg-elev-2);
}
.kpi-chip i {
    font-size: 13px;
    color: var(--color-primary);
}
.kpi-chip strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.kpi-chip--success i { color: var(--color-success); }
.kpi-chip--warning i { color: var(--color-warning); }
.kpi-chip--danger i  { color: var(--color-danger); }
.kpi-chip--info i    { color: #0dcaf0; }

/* Standardized Project Description */
.project-desc-card {
    margin: var(--space-3) 0 0;
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
}
.project-desc-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}
.project-desc-content {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    max-height: 72px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.25s ease;
}
.project-desc-content.is-folded::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: linear-gradient(to bottom, rgba(0,0,0,0), var(--bg-elev-1));
    pointer-events: none;
}
.project-desc-content.is-unfolded {
    max-height: 3000px;
}
.project-desc-toggle {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.project-desc-toggle:hover {
    text-decoration: underline;
}

.user-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}
.user-card-profile {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}
.user-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.user-card-avatar-fallback {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-elev-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 32px;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   AJAX Track Uploader, Progress & Cover Preview
   -------------------------------------------------------------------------- */
.upload-audio-info {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text);
}
.upload-audio-info.is-visible {
    display: flex;
}
.upload-audio-info i {
    font-size: 18px;
    color: var(--color-primary);
}
.upload-cover-wrap {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 6px;
}
.upload-cover-preview {
    width: 104px;
    height: 104px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    border: 2px dashed var(--border);
    background: var(--bg-elev-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.upload-cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.upload-cover-preview i {
    font-size: 34px;
    color: var(--text-muted);
}
.upload-cover-fields {
    flex: 1;
    min-width: 0;
}
.upload-cover-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-elev-2);
    color: var(--text-muted);
}
.upload-cover-badge.is-valid {
    color: var(--color-success);
    background: rgba(34, 197, 94, 0.12);
}
.upload-cover-badge.is-invalid {
    color: var(--color-danger);
    background: rgba(220, 38, 38, 0.12);
}
.upload-progress-card {
    display: none;
    margin-top: var(--space-4);
    padding: 16px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.upload-progress-card.is-active {
    display: block;
}
.upload-progress-bar-bg {
    height: 10px;
    background: var(--bg-elev-1);
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
    border: 1px solid var(--border);
    position: relative;
}
.upload-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), #60a5fa);
    border-radius: 5px;
    transition: width 0.15s ease-out;
}
.upload-progress-bar-fill.is-indeterminate {
    width: 100% !important;
    background: linear-gradient(90deg, var(--color-primary), #60a5fa, var(--color-primary));
    background-size: 200% 100%;
    animation: uploadShimmer 1.5s infinite linear;
}
@keyframes uploadShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.upload-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 8px;
}
.upload-progress-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

/* --------------------------------------------------------------------------
   Distribution Tracks: Drag & Drop Reorder, Multi-Upload Queue
   -------------------------------------------------------------------------- */
.track-row-draggable {
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.track-row-draggable.is-dragging {
    opacity: 0.35;
    background: var(--bg-elev-2) !important;
}
.track-row-draggable.drag-over {
    border-top: 2px solid var(--color-primary) !important;
    background: rgba(37, 99, 235, 0.08) !important;
}
.drag-handle {
    cursor: grab;
    user-select: none;
    color: var(--text-muted);
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
}
.drag-handle:active {
    cursor: grabbing;
}
.drag-handle:hover {
    color: var(--color-primary);
    background: var(--bg-elev-2);
}
.track-order-btns {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    margin-left: 2px;
    vertical-align: middle;
}
.btn-order-move {
    background: none;
    border: none;
    padding: 1px 3px;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    color: var(--text-muted);
    border-radius: 2px;
}
.btn-order-move:hover {
    color: var(--color-primary);
    background: var(--bg-elev-2);
}
.track-filename-badge {
    display: inline-block;
    font-family: monospace;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--bg-elev-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
    margin-top: 3px;
}
.reorder-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-surface);
    color: var(--text);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}
.reorder-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Batch Upload Queue */
.dist-upload-card {
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-top: var(--space-4);
}
.dist-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    background: var(--bg-surface);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}
.dist-dropzone:hover, .dist-dropzone.is-dragover {
    border-color: var(--color-primary);
    background: rgba(37, 99, 235, 0.04);
}
.dist-dropzone i {
    font-size: 32px;
    color: var(--color-primary);
    display: block;
    margin-bottom: 8px;
}
.dist-queue-list {
    margin-top: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dist-queue-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    transition: border-color 0.2s;
}
.dist-queue-item.is-uploading {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}
.dist-queue-item.is-done {
    border-color: var(--color-success);
    background: rgba(34, 197, 94, 0.04);
}
.dist-queue-item.is-error {
    border-color: var(--color-danger);
    background: rgba(220, 38, 38, 0.04);
}
.dist-queue-progress {
    height: 6px;
    background: var(--bg-elev-2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}
.dist-queue-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--color-primary);
    transition: width 0.15s ease-out;
}
.dist-queue-extra {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}
.dist-queue-extra.is-open {
    display: block;
}

/* =========================================================================
   ПОЛНОЭКРАННОЕ СТАРТОВОЕ ПРОМО ЭКОСИСТЕМЫ В БЛОКЕ ЭФИРА (ПО ОЧЕРЕДИ НА ВСЕ ОКНО)
   ========================================================================= */
.portal-promo-intro-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    border-radius: 16px;
    background: rgba(18, 20, 26, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
:root[data-theme="light"] .portal-promo-intro-overlay {
    background: rgba(245, 247, 250, 0.96);
}
.portal-promo-intro-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.portal-promo-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.portal-promo-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.portal-promo-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
.portal-promo-slide-inner {
    max-width: 520px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
}
.portal-promo-slide-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin-bottom: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.portal-promo-slide-badge {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 5px 14px;
    border-radius: 9999px;
    margin-bottom: 14px;
    display: inline-block;
}
.portal-promo-slide-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text, #f1f5f9);
    margin-bottom: 12px;
    line-height: 1.3;
}
:root[data-theme="light"] .portal-promo-slide-title {
    color: #0f172a;
}
.portal-promo-slide-text {
    font-size: 16px;
    color: var(--text-muted, #94a3b8);
    line-height: 1.55;
    max-width: 480px;
    font-weight: 500;
}
:root[data-theme="light"] .portal-promo-slide-text {
    color: #475569;
}
@media (max-width: 540px) {
    .portal-promo-slide-inner {
        padding: 16px 12px;
    }
    .portal-promo-slide-icon {
        width: 56px;
        height: 56px;
        font-size: 26px;
        margin-bottom: 10px;
        border-radius: 16px;
    }
    .portal-promo-slide-badge {
        font-size: 11px;
        padding: 4px 10px;
        margin-bottom: 8px;
    }
    .portal-promo-slide-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    .portal-promo-slide-text {
        font-size: 13.5px;
        line-height: 1.45;
    }
}
.portal-promo-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    z-index: 2;
}
.portal-promo-dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
}
:root[data-theme="light"] .portal-promo-dot {
    background: rgba(0, 0, 0, 0.2);
}
.portal-promo-dot.is-active {
    width: 18px;
    background: var(--color-primary, #3b82f6);
}
.portal-promo-intro-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text, #f1f5f9);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 25;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}
.portal-promo-intro-close:hover {
    background: rgba(255, 255, 255, 0.2);
}
:root[data-theme="light"] .portal-promo-intro-close {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

/* =====================================================
   Интерактивная карточка артиста в стиле iPadOS
   ===================================================== */
.ipados-artist-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.ipados-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary, #38bdf8);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.ipados-back-btn:hover {
    background: rgba(56, 189, 248, 0.22);
    transform: translateX(-2px);
    border-color: rgba(56, 189, 248, 0.4);
}
.ipados-artist-card-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: var(--text, #f1f5f9);
}
:root[data-theme="light"] .ipados-artist-card-title {
    color: #0f172a;
}
.ipados-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 17px;
    color: var(--text-muted, #94a3b8);
    background: var(--bg-elev-2, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}
.ipados-icon-btn:hover {
    color: var(--color-primary, #38bdf8);
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.1);
    transform: translateY(-1px);
}
.ipados-artist-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.ipados-stat-card {
    background: var(--bg-elev-2, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px 6px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.ipados-stat-val {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 3px;
}
.ipados-stat-val.text-primary { color: #10b981; }
.ipados-stat-val.text-gold    { color: #f59e0b; }
.ipados-stat-val.text-pink    { color: #ec4899; }
.ipados-stat-lbl {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
}
.ipados-boost-box {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid rgba(236, 72, 153, 0.25);
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.ipados-boost-box__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}
.ipados-boost-box__title {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text, #f1f5f9);
    display: flex;
    align-items: center;
    gap: 6px;
}
:root[data-theme="light"] .ipados-boost-box__title {
    color: #0f172a;
}
.ipados-boost-user-balance {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
}
.ipados-boost-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.ipados-boost-btn {
    border: 1px solid rgba(236, 72, 153, 0.3);
    background: var(--bg-elev, rgba(255, 255, 255, 0.06));
    color: #ec4899;
    border-radius: 10px;
    padding: 7px 4px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.ipados-boost-btn:hover {
    background: rgba(236, 72, 153, 0.2);
    border-color: #ec4899;
    transform: translateY(-1px);
}
.ipados-boost-btn--primary {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}
.ipados-boost-btn--primary:hover {
    background: linear-gradient(135deg, #f43f5e 0%, #be185d 100%);
    box-shadow: 0 6px 16px rgba(236, 72, 153, 0.5);
    transform: translateY(-1px);
}
.ipados-artist-track-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--bg-elev-2, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border);
    margin-bottom: 6px;
    transition: all 0.2s ease;
}
.ipados-artist-track-item:hover {
    background: var(--bg-elev-3, rgba(255, 255, 255, 0.08));
    border-color: var(--border-strong, rgba(255, 255, 255, 0.15));
}
.ipados-artist-track-cover {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.ipados-artist-track-info {
    flex: 1;
    min-width: 0;
}
.ipados-artist-track-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text, #f1f5f9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
:root[data-theme="light"] .ipados-artist-track-title {
    color: #0f172a;
}
.ipados-artist-track-artist {
    font-size: 11.5px;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ipados-artist-track-meta {
    flex-shrink: 0;
}
.ipados-rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 800;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 4px 8px;
    border-radius: 8px;
}
@keyframes boostPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: #f43f5e; }
    100% { transform: scale(1); }
}
.boost-pulse-animation {
    display: inline-block;
    animation: boostPulse 0.6s ease-out;
}

/* =========================================================================
   ЕДИНАЯ НАВИГАЦИОННАЯ ПАНЕЛЬ IPADOS ДЛЯ ПУБЛИЧНЫХ СТРАНИЦ (/partners, /posters, /artist)
   ========================================================================= */
.artist-public-navbar {
    position: sticky;
    top: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
:root[data-theme="light"] .artist-public-navbar {
    background: rgba(255, 255, 255, 0.85);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
.artist-public-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 15px;
}
:root[data-theme="light"] .artist-public-brand {
    color: #0f172a;
}
.artist-public-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}
.artist-public-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.artist-nav-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
}
.artist-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: all 0.15s ease;
}
:root[data-theme="light"] .artist-nav-pill {
    color: #475569;
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}
.artist-nav-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}
:root[data-theme="light"] .artist-nav-pill:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.08);
}
.artist-nav-pill.is-active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.btn-live-stream {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-live-stream:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5);
}
.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}
:root[data-theme="light"] .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
    color: #475569;
}
.theme-toggle-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}
:root[data-theme="light"] .theme-toggle-btn:hover {
    color: #0f172a;
}



