/* Студия трансляции — тёмная панель в духе мини-студии */
.live-dashboard-page .main-content {
    max-width: 1320px;
    margin: 0 auto;
    padding-bottom: 2.5rem;
}

.live-dash-wrap {
    padding: 0 1rem;
}

.live-dash-studio-header {
    margin-bottom: 1.25rem;
}

.live-dash-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.studio-back-btn--ghost {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.live-dash-status {
    display: inline-block;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.live-dash-status--live {
    background: rgba(255, 59, 48, 0.2);
    color: #ff8a80;
    border: 1px solid rgba(255, 59, 48, 0.35);
}
.live-dash-status--scheduled {
    background: rgba(62, 166, 255, 0.12);
    color: #9ecbff;
    border: 1px solid rgba(62, 166, 255, 0.28);
}
.live-dash-status--ended {
    background: rgba(255, 255, 255, 0.06);
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.live-dash-unlisted {
    color: #f5b041;
    font-weight: 600;
}

.live-dash-error {
    color: #ff8a80 !important;
}

.live-dash-access-denied {
    margin-top: 1rem;
}
.live-dash-access-denied a {
    color: #7ab8ff;
}

.live-dash-grid {
    display: grid;
    gap: 1.1rem;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas:
        "meta rail"
        "chat chat";
    align-items: start;
    transition: opacity 0.2s ease;
}

.live-dash-grid.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .live-dash-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "meta"
            "rail"
            "chat";
    }
}

.live-dash-panel--meta {
    grid-area: meta;
}

.live-dash-rail {
    grid-area: rail;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.live-dash-panel--chat {
    grid-area: chat;
}

.live-dash-panel {
    background: linear-gradient(165deg, #1f1f22 0%, #18181a 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 1.1rem 1.2rem 1.25rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.live-dash-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.live-dash-panel-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #f1f1f1);
}

.live-dash-chip {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(62, 166, 255, 0.14);
    color: #b6dcff;
    border: 1px solid rgba(62, 166, 255, 0.28);
}

.live-dash-chip--muted {
    background: rgba(255, 255, 255, 0.06);
    color: #aaa;
    border-color: rgba(255, 255, 255, 0.1);
}

.live-dash-field {
    display: block;
    margin-bottom: 0.85rem;
}

.live-dash-field-label {
    display: block;
    font-size: 0.82rem;
    color: #aaa;
    margin-bottom: 0.35rem;
}

.live-dash-input,
.live-dash-select,
.live-dash-textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    color: #f1f1f1;
    font-size: 0.95rem;
    padding: 0.55rem 0.75rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.live-dash-input:focus,
.live-dash-select:focus,
.live-dash-textarea:focus {
    border-color: rgba(62, 166, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(62, 166, 255, 0.2);
}

.live-dash-textarea {
    resize: vertical;
    min-height: 120px;
}

.live-dash-textarea.live-dash-textarea--description {
    resize: none;
    min-height: 140px;
    max-height: min(40vh, 320px);
    overflow-y: auto;
    scrollbar-color: rgba(120, 120, 120, 0.6) rgba(0, 0, 0, 0.25);
    scrollbar-width: thin;
}

.live-dash-textarea.live-dash-textarea--description::-webkit-scrollbar {
    width: 10px;
}
.live-dash-textarea.live-dash-textarea--description::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.22);
    border-radius: 8px;
    margin: 4px 0;
}
.live-dash-textarea.live-dash-textarea--description::-webkit-scrollbar-thumb {
    background: rgba(140, 140, 140, 0.55);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.live-dash-textarea.live-dash-textarea--description::-webkit-scrollbar-thumb:hover {
    background: rgba(170, 170, 170, 0.65);
    background-clip: padding-box;
}

.live-dash-panel--chat {
    background: linear-gradient(165deg, #232326 0%, #161618 55%, #141416 100%);
    border: 1px solid rgba(62, 166, 255, 0.12);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.live-dash-panel--chat .live-dash-panel-head {
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 1.1rem;
}

.live-dash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #f1f1f1;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.live-dash-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.live-dash-btn--primary {
    background: linear-gradient(135deg, #3ea6ff, #2b7fd1);
    border-color: rgba(62, 166, 255, 0.5);
    color: #fff;
}

.live-dash-btn--primary:hover {
    filter: brightness(1.05);
}

.live-dash-btn--ghost {
    background: rgba(255, 255, 255, 0.04);
}

.live-dash-form-status {
    margin: 0.65rem 0 0;
    min-height: 1.25rem;
    font-size: 0.85rem;
    color: #9ecbff;
}

.live-dash-hint {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    color: #777;
}

.live-dash-viewers-widget {
    text-align: center;
    padding: 0.5rem 0 0.25rem;
}

.live-dash-viewers-count {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    display: block;
    color: #fff;
    text-shadow: 0 4px 24px rgba(62, 166, 255, 0.25);
}

.live-dash-viewers-caption {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: #999;
}

.live-dash-preview-shell {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-dash-preview-video {
    width: 100%;
    max-height: 220px;
    display: block;
    object-fit: contain;
    background: #000;
}

.live-dash-preview-placeholder {
    padding: 1.5rem;
    text-align: center;
    color: #888;
    font-size: 0.88rem;
}

.live-dash-chat-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

@media (min-width: 720px) {
    .live-dash-chat-toolbar--split {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
    }
    .live-dash-chat-toolbar-left {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    .live-dash-chat-toolbar-right {
        flex-shrink: 0;
        padding-top: 1.4rem;
    }
    .live-dash-chat-toolbar-right .live-dash-btn--compact {
        width: auto;
        min-width: 7.5rem;
    }
}

.live-dash-chat-toolbar .live-dash-btn--ghost:not(.live-dash-btn--compact) {
    width: 100%;
    justify-content: center;
    border-color: rgba(62, 166, 255, 0.22);
    background: rgba(62, 166, 255, 0.08);
}

.live-dash-chat-toolbar .live-dash-btn--ghost:not(.live-dash-btn--compact):hover {
    background: rgba(62, 166, 255, 0.16);
    border-color: rgba(62, 166, 255, 0.38);
}

.live-dash-chat-toolbar-right .live-dash-btn--compact {
    border-color: rgba(62, 166, 255, 0.28);
    background: rgba(62, 166, 255, 0.1);
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
}

.live-dash-form-status--toolbar {
    margin: 0 0 1rem;
    min-height: 1.1rem;
    font-size: 0.8rem;
}

.live-dash-input--no-spinners {
    -moz-appearance: textfield;
    appearance: textfield;
}
.live-dash-input--no-spinners::-webkit-outer-spin-button,
.live-dash-input--no-spinners::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.live-dash-check--styled {
    position: relative;
    align-items: flex-start;
    gap: 0.65rem;
}
.live-dash-check-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    clip: rect(0, 0, 0, 0);
}
.live-dash-check-ui {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.15rem;
    border-radius: 4px;
    border: 2px solid rgba(62, 166, 255, 0.45);
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.live-dash-check-input:focus-visible + .live-dash-check-ui {
    box-shadow: 0 0 0 2px rgba(62, 166, 255, 0.35);
}
.live-dash-check-input:checked + .live-dash-check-ui {
    background: linear-gradient(135deg, #3ea6ff, #2b7fd1);
    border-color: rgba(62, 166, 255, 0.85);
}
.live-dash-check-input:checked + .live-dash-check-ui::after {
    content: "";
    width: 0.28rem;
    height: 0.55rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-0.02rem, -0.05rem);
}
.live-dash-check-label {
    flex: 1;
    min-width: 0;
}

/* Кастомный выбор категории эфира (как на стримерских площадках) */
.live-dash-cat-field {
    position: relative;
    width: 100%;
}

.live-dash-cat-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    min-height: 2.65rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(62, 166, 255, 0.22);
    background: linear-gradient(180deg, rgba(32, 34, 40, 0.98) 0%, rgba(14, 15, 18, 0.99) 100%);
    color: #f1f1f1;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.live-dash-cat-trigger:hover {
    border-color: rgba(62, 166, 255, 0.45);
}

.live-dash-cat-trigger:focus-visible,
.live-dash-cat-field.is-open .live-dash-cat-trigger {
    border-color: rgba(62, 166, 255, 0.75);
    box-shadow: 0 0 0 2px rgba(62, 166, 255, 0.22);
}

.live-dash-cat-trigger-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-dash-cat-listbox {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    max-height: min(52vh, 340px);
    overflow-y: auto;
    padding: 0.35rem;
    border-radius: 12px;
    border: 1px solid rgba(62, 166, 255, 0.28);
    background: linear-gradient(180deg, #1e2026 0%, #121316 100%);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    scrollbar-color: rgba(100, 120, 150, 0.5) rgba(0, 0, 0, 0.2);
    scrollbar-width: thin;
}

.live-dash-cat-listbox::-webkit-scrollbar {
    width: 8px;
}
.live-dash-cat-listbox::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}
.live-dash-cat-listbox::-webkit-scrollbar-thumb {
    background: rgba(90, 110, 140, 0.55);
    border-radius: 8px;
}

.live-dash-cat-option {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.55rem;
    margin: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #eaeaea;
    font-size: 0.92rem;
    text-align: left;
    cursor: pointer;
    outline: none;
    transition: background 0.12s ease;
}

.live-dash-cat-option:hover,
.live-dash-cat-option:focus-visible {
    background: rgba(62, 166, 255, 0.14);
}

.live-dash-cat-option[aria-selected="true"] {
    background: rgba(62, 166, 255, 0.22);
    color: #fff;
}

.live-dash-cat-option-label {
    display: block;
    min-width: 0;
}

.live-dash-btn--compact {
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
}

.live-dash-chat-lower {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    align-items: stretch;
}
@media (min-width: 900px) {
    .live-dash-chat-lower {
        grid-template-columns: minmax(260px, 300px) 1fr;
    }
}
.live-dash-chat-column--feed {
    display: flex;
    flex-direction: column;
    min-height: min(55vh, 420px);
}
.live-dash-chat-feed-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.1rem 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.35rem;
}
.live-dash-chat-feed-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #b6dcff;
}
.live-dash-chat-feed-hint {
    font-size: 0.72rem;
    color: #666;
}
.live-dash-chat-scroll {
    flex: 1;
    min-height: 200px;
    max-height: min(52vh, 520px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.live-dash-chat-scroll .live-dash-chat-list {
    flex: 1;
    overflow-y: auto;
    max-height: none;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.live-dash-chat-scroll .live-dash-chat-empty {
    margin: 0;
    padding: 0.85rem;
    text-align: center;
    flex-shrink: 0;
}

.live-dash-mod-field-wrap {
    position: relative;
    flex: 1 1 200px;
    min-width: 0;
}
.live-dash-btn--mod-add {
    flex-shrink: 0;
    align-self: flex-start;
}
.live-dash-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 40;
    max-height: 260px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid rgba(62, 166, 255, 0.22);
    background: #1a1c20;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    padding: 0.35rem;
}
.live-dash-suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    color: #eee;
    font-size: 0.86rem;
}
.live-dash-suggestion-item:hover,
.live-dash-suggestion-item.is-active {
    background: rgba(62, 166, 255, 0.16);
}
.live-dash-suggestion-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.live-dash-suggestion-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.live-dash-suggestion-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.live-dash-suggestion-user {
    font-size: 0.78rem;
    color: #9ecbff;
}

.live-dash-chat-mod--row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    max-width: 100%;
}

.live-dash-chat-text--deleted {
    font-style: italic;
    color: #9a9a9a !important;
    font-size: 0.86em;
}

.live-dash-admin-badge {
    color: #c9a4ff;
    font-weight: 600;
}
.live-dash-panel--admin-global {
    margin-bottom: 20px;
    padding: 1.1rem 1.15rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(145, 70, 255, 0.28);
    background: linear-gradient(165deg, rgba(28, 22, 42, 0.95) 0%, rgba(14, 14, 18, 0.98) 55%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.live-dash-panel-head--admin {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.live-dash-panel-head-main {
    min-width: 0;
    flex: 1;
}
.live-dash-hint--tight {
    margin: 6px 0 0;
    max-width: 720px;
}
.live-dash-chip--admin {
    background: rgba(145, 70, 255, 0.22);
    color: #e4d4ff;
    border: 1px solid rgba(145, 70, 255, 0.45);
    font-weight: 700;
    letter-spacing: 0.04em;
}
.live-dash-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    margin-bottom: 8px;
}
.live-dash-admin-refresh {
    flex: 0 0 auto;
    align-self: flex-end;
    min-height: 42px;
    min-width: 118px;
}
.live-dash-btn--toolbar {
    min-height: 42px;
    padding-left: 16px;
    padding-right: 16px;
    white-space: nowrap;
}
.live-dash-form-status--toolbar {
    display: block;
    width: 100%;
    min-height: 1.1em;
    margin: 0 0 10px;
    font-size: 12px;
    text-align: left;
    color: #9ecbff;
}
@media (max-width: 640px) {
    .live-dash-admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .live-dash-admin-refresh {
        width: 100%;
        align-self: stretch;
    }
}
.live-dash-field--stream-picker {
    flex: 1 1 280px;
    min-width: 0;
    margin: 0;
}
.live-dash-admin-toolbar .live-dash-field-label {
    margin-bottom: 6px;
}
.live-dash-stream-field {
    position: relative;
    width: 100%;
}
.live-dash-stream-trigger {
    width: 100%;
    min-height: 42px;
    padding: 10px 36px 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.35);
    color: #efeff1;
    text-align: left;
    cursor: pointer;
    font: inherit;
    position: relative;
}
.live-dash-stream-trigger::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #adadb8;
    border-bottom: 2px solid #adadb8;
    transform: translateY(-65%) rotate(45deg);
}
.live-dash-stream-trigger:hover,
.live-dash-stream-field.is-open .live-dash-stream-trigger {
    border-color: rgba(145, 70, 255, 0.55);
    background: rgba(145, 70, 255, 0.08);
}
.live-dash-stream-trigger-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.live-dash-stream-listbox {
    position: absolute;
    z-index: 50;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: min(320px, 50vh);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #1a1a1f;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.live-dash-stream-listbox[hidden] {
    display: none !important;
}
.live-dash-cat-listbox[hidden] {
    display: none !important;
}
.live-dash-stream-search {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    color: #efeff1;
    font: inherit;
    outline: none;
}
.live-dash-stream-options {
    overflow: auto;
    max-height: 260px;
    padding: 6px;
}
.live-dash-stream-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #efeff1;
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.live-dash-stream-option:hover,
.live-dash-stream-option[aria-selected="true"] {
    background: rgba(145, 70, 255, 0.16);
}
.live-dash-stream-option[hidden] {
    display: none;
}
.live-dash-stream-option-title {
    font-weight: 600;
    font-size: 13px;
}
.live-dash-stream-option-meta {
    font-size: 11px;
    color: #adadb8;
}
.live-dash-restrictions-list--global {
    max-height: 320px;
}
.live-dash-restrictions-stream {
    display: block;
    color: #adadb8;
    margin: 2px 0;
}
.live-dash-restrictions-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.live-dash-restrict-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.live-dash-restrict-badge--kick {
    background: rgba(255, 170, 50, 0.15);
    color: #ffc766;
    border: 1px solid rgba(255, 170, 50, 0.35);
}
.live-dash-restrict-badge--perm {
    background: rgba(235, 64, 52, 0.15);
    color: #ff8a80;
    border: 1px solid rgba(235, 64, 52, 0.35);
}
.live-dash-restrict-badge--timed {
    background: rgba(62, 166, 255, 0.12);
    color: #8ec5ff;
    border: 1px solid rgba(62, 166, 255, 0.3);
}
.live-dash-btn--unrestrict {
    flex-shrink: 0;
    white-space: nowrap;
}

.live-dash-restrictions-panel {
    margin-top: 0.85rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.09);
}
.live-dash-restrictions-panel .live-dash-hint--compact {
    margin-top: 0.15rem;
    color: #9a9aa8;
    line-height: 1.45;
}
.live-dash-restrictions-title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f2f2f5;
}
.live-dash-restrictions-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 12px;
    margin: 0.5rem 0 0.35rem;
}
.live-dash-restrictions-toolbar .live-dash-btn--toolbar {
    min-height: 36px;
}
.live-dash-restrictions-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    max-height: 220px;
    overflow: auto;
}
.live-dash-restrictions-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
}
.live-dash-restrictions-item:last-child {
    border-bottom: none;
}
.live-dash-restrictions-meta {
    min-width: 0;
    flex: 1;
}
.live-dash-restrictions-meta strong {
    color: #cfe6ff;
}
.live-dash-restrictions-meta small {
    display: block;
    color: #888;
    margin-top: 0.1rem;
}
.live-dash-restrictions-empty {
    margin: 0.5rem 0 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #a0a0ac;
}
.live-dash-restrictions-empty.is-hidden {
    display: none;
}

.live-dash-restrictions-summary {
    margin: 0.5rem 0 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e4e4ec;
}

.live-dash-btn--block {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0.15rem;
}

.live-dash-btn--panel {
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #efeff1;
    font-weight: 600;
}

.live-dash-btn--panel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
}

.live-dash-restrictions-fullbox {
    margin-top: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.live-dash-restrictions-fullbox-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.live-dash-restrictions-fullbox-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ececf2;
}

.live-dash-restrictions-fullbox-count {
    font-size: 0.8rem;
    color: #a8a8b4;
    white-space: nowrap;
}

.live-dash-restrictions-fullbox--modal {
    margin-top: 0.35rem;
    max-height: min(52vh, 420px);
    overflow: auto;
    padding: 0.5rem;
}

.live-dash-restrictions-list--cards {
    max-height: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.1rem 0;
}

.live-dash-restrictions-list--global.live-dash-restrictions-list--cards {
    max-height: 360px;
    overflow: auto;
}

.live-dash-restrict-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.84rem;
    list-style: none;
}

.live-dash-restrict-card-body {
    flex: 1;
    min-width: 0;
}

.live-dash-restrict-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.2rem;
}

.live-dash-restrict-card-name {
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.25;
}

.live-dash-restrict-card-meta {
    margin: 0;
    font-size: 0.76rem;
    color: #888;
    line-height: 1.35;
}

.live-dash-restrict-card-stream {
    margin: 0 0 0.2rem;
    font-size: 0.78rem;
    color: #adadb8;
    line-height: 1.35;
}

.live-dash-modal-card--wide {
    width: min(560px, 100%);
    max-height: min(88vh, 640px);
}

.live-dash-mod-btn--tiny {
    padding: 0.2rem 0.45rem;
    font-size: 0.68rem;
}

.live-dash-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.live-dash-modal.is-open {
    display: flex;
}
.live-dash-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}
.live-dash-modal-card {
    position: relative;
    width: min(420px, 100%);
    max-height: min(86vh, 560px);
    overflow: auto;
    border-radius: 14px;
    border: 1px solid rgba(62, 166, 255, 0.22);
    background: linear-gradient(165deg, #232326 0%, #161618 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    padding: 1.1rem 1.15rem 1rem;
}
.live-dash-modal-close {
    position: absolute;
    top: 0.45rem;
    right: 0.5rem;
    border: none;
    background: transparent;
    color: #aaa;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.live-dash-modal-close:hover {
    color: #fff;
}
.live-dash-modal-title {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    padding-right: 1.5rem;
}
.live-dash-modal-body {
    font-size: 0.88rem;
    color: #ccc;
    line-height: 1.45;
}
.live-dash-modal-loading {
    margin: 0;
    color: #888;
}
.live-dash-modal-body dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 0.75rem;
}
.live-dash-modal-body dt {
    color: #888;
    font-size: 0.78rem;
}
.live-dash-modal-body dd {
    margin: 0;
    color: #eaeaea;
}
.live-dash-modal-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.65rem;
}
.live-dash-modal-user {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #efeff1;
}
.live-dash-modal-hint {
    margin: 0 0 14px;
}
.live-mod-modal-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.live-mod-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #efeff1;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.live-mod-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
}
.live-mod-option--danger {
    border-color: rgba(235, 64, 52, 0.35);
    background: rgba(235, 64, 52, 0.08);
}
.live-mod-option--danger:hover {
    border-color: rgba(235, 64, 52, 0.55);
    background: rgba(235, 64, 52, 0.14);
}
.live-mod-option-title { font-size: 14px; font-weight: 700; }
.live-mod-option-desc { font-size: 12px; line-height: 1.4; color: #adadb8; }
.live-mod-cancel { width: 100%; margin-top: 4px; }

.live-dash-modal-actions {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.live-dash-btn--danger {
    background: rgba(220, 60, 60, 0.18);
    border-color: rgba(255, 99, 99, 0.45);
    color: #ffb4b4;
}
.live-dash-btn--danger:hover {
    background: rgba(220, 60, 60, 0.28);
}

.live-dash-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #ccc;
}

.live-dash-input--narrow {
    max-width: 120px;
}

.live-dash-check {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: #ddd;
    cursor: pointer;
}

.live-dash-check input {
    margin-top: 0.2rem;
}

.live-dash-help {
    display: block;
    color: #888;
    font-weight: 400;
    margin-top: 0.15rem;
}

.live-dash-chat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.live-dash-chat-item {
    padding: 0;
    border-bottom: none;
    font-size: 0.86rem;
    line-height: 1.35;
}

.live-dash-chat-msg-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    padding: 2px 5px;
    border-radius: 4px;
}

.live-dash-chat-item:hover .live-dash-chat-msg-row {
    background: rgba(255, 255, 255, 0.05);
}

.live-dash-chat-msg-main {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.live-dash-chat-badge {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 4px;
    color: #e4b84a;
}

.live-dash-chat-badge--mod {
    color: #7ab8ff;
}

.live-dash-chat-author {
    font-weight: 700;
    margin-right: 0;
}

.live-dash-chat-colon {
    color: #adadb8;
    font-weight: 600;
    margin-right: 4px;
    margin-left: 1px;
}

.live-dash-chat-text {
    color: #efeff1;
    word-break: break-word;
}

.live-dash-chat-mod {
    flex-shrink: 0;
    display: flex;
    gap: 0.25rem;
    flex-wrap: nowrap;
    align-items: center;
    padding-top: 0;
}

.live-dash-mod-btn {
    padding: 0.18rem 0.42rem;
    font-size: 0.68rem;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #ddd;
    cursor: pointer;
}

.live-dash-mod-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.live-dash-mod-btn--danger {
    border-color: rgba(255, 99, 99, 0.35);
    color: #ffb4b4;
}

.live-dash-chat-empty {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: #777;
}

.live-dash-chat-empty.is-hidden {
    display: none;
}

.live-dash-mod-panel {
    margin-bottom: 0;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.live-dash-mod-panel .live-dash-btn--ghost {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.live-dash-mod-panel .live-dash-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.22);
}

.live-dash-mod-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #e8e8e8;
}

.live-dash-mod-add {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.live-dash-input--mod {
    flex: 1 1 200px;
    min-width: 0;
}

.live-dash-mod-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.live-dash-mod-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.88rem;
}

.live-dash-mod-item:last-child {
    border-bottom: none;
}

.live-dash-mod-name {
    color: #ddd;
    min-width: 0;
}

.live-dash-chat-user .live-dash-badge-icon {
    vertical-align: middle;
    margin-right: 0.25rem;
}

.live-dash-empty-wrap {
    text-align: center;
    padding: 2rem 1rem;
}

.live-dash-empty-hero {
    display: block;
    margin: 0 auto 1rem;
    opacity: 0.85;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
}

.live-dash-inline-link {
    color: #7ab8ff;
    font-weight: 600;
}

body.light-theme .live-dash-panel {
    background: #fff;
    border-color: #e5e5e5;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

body.light-theme .live-dash-panel-title,
body.light-theme .live-dash-viewers-count {
    color: #0f0f0f;
}

body.light-theme .live-dash-input,
body.light-theme .live-dash-select,
body.light-theme .live-dash-textarea {
    background: #fafafa;
    color: #111;
    border-color: #ccc;
}

body.light-theme .live-dash-chat-list {
    background: #fafafa;
    border-color: #e0e0e0;
}

body.light-theme .live-dash-chat-item {
    border-bottom-color: #eee;
}

body.light-theme .live-dash-chat-text {
    color: #222;
}

body.light-theme .live-dash-cat-trigger {
    background: linear-gradient(180deg, #fafafa 0%, #ececec 100%);
    color: #111;
    border-color: #bbb;
}

body.light-theme .live-dash-cat-trigger:hover {
    border-color: #3ea6ff;
}

body.light-theme .live-dash-cat-trigger:focus-visible,
body.light-theme .live-dash-cat-field.is-open .live-dash-cat-trigger {
    border-color: #2b7fd1;
    box-shadow: 0 0 0 2px rgba(62, 166, 255, 0.2);
}

body.light-theme .live-dash-cat-listbox {
    background: #fff;
    border-color: #ccc;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
    scrollbar-color: rgba(0, 0, 0, 0.25) #f0f0f0;
}

body.light-theme .live-dash-cat-option {
    color: #111;
}

body.light-theme .live-dash-cat-option:hover,
body.light-theme .live-dash-cat-option:focus-visible {
    background: rgba(62, 166, 255, 0.1);
}

body.light-theme .live-dash-cat-option[aria-selected="true"] {
    background: rgba(62, 166, 255, 0.18);
}

body.light-theme .live-dash-textarea.live-dash-textarea--description {
    scrollbar-color: rgba(0, 0, 0, 0.35) #e8e8e8;
}

body.light-theme .live-dash-chat-scroll {
    background: #f5f5f5;
    border-color: #e0e0e0;
}

body.light-theme .live-dash-suggestions {
    background: #fff;
    border-color: #ccc;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

body.light-theme .live-dash-suggestion-item {
    color: #111;
}

body.light-theme .live-dash-suggestion-item:hover,
body.light-theme .live-dash-suggestion-item.is-active {
    background: rgba(62, 166, 255, 0.12);
}

body.light-theme .live-dash-modal-card {
    background: #fff;
    border-color: #ddd;
}

body.light-theme .live-dash-modal-body {
    color: #333;
}

body.light-theme .live-dash-modal-body dd {
    color: #111;
}

/* ── Мобилка: студия трансляции на всю ширину ── */
@media (max-width: 900px) {
    body.live-dashboard-page .page-container:not(.no-sidebar) {
        display: block;
    }

    /* Не задаём transform здесь — иначе перебивается .sidebar-mobile-open и меню не выезжает */
    body.live-dashboard-page .page-container:not(.no-sidebar):not(.sidebar-mobile-open) .sidebar {
        position: fixed !important;
        left: 0;
        top: var(--header-height, 56px);
        width: min(300px, 88vw) !important;
    }

    body.live-dashboard-page .page-container.sidebar-mobile-open .sidebar {
        position: fixed !important;
        left: 0;
        top: var(--header-height, 56px);
        width: min(300px, 88vw) !important;
        transform: translateX(0) !important;
        z-index: 250 !important;
        visibility: visible !important;
    }

    body.live-dashboard-page .page-container:not(.no-sidebar) .main-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        margin: 0 !important;
        padding: 12px max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        box-sizing: border-box;
    }

    body.live-dashboard-page .live-dashboard-shell,
    body.live-dashboard-page .live-dash-wrap {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body.live-dashboard-page .live-dash-studio-header.studio-shell-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }

    body.live-dashboard-page .live-dash-header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    body.live-dashboard-page .live-dash-header-actions .studio-back-btn {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
        text-align: center;
    }

    body.live-dashboard-page .live-dash-grid {
        gap: 12px;
    }

    body.live-dashboard-page .live-dash-panel {
        padding: 14px 14px 16px;
    }

    body.live-dashboard-page .live-dash-panel-head {
        align-items: flex-start;
    }

    body.live-dashboard-page .live-dash-chip {
        max-width: 100%;
        white-space: normal;
        text-align: left;
        line-height: 1.3;
    }

    body.live-dashboard-page .live-dash-meta-form .live-dash-btn--primary,
    body.live-dashboard-page .live-dash-btn--panel,
    body.live-dashboard-page .live-dash-btn--block {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

    body.live-dashboard-page .live-dash-cat-field,
    body.live-dashboard-page .live-dash-cat-trigger,
    body.live-dashboard-page .live-dash-stream-field,
    body.live-dashboard-page .live-dash-stream-trigger {
        width: 100%;
        box-sizing: border-box;
    }

    body.live-dashboard-page .live-dash-mod-add {
        flex-direction: column;
        align-items: stretch;
    }

    body.live-dashboard-page .live-dash-mod-field-wrap,
    body.live-dashboard-page .live-dash-input--mod {
        flex: 1 1 auto;
        width: 100%;
    }

    body.live-dashboard-page .live-dash-btn--mod-add {
        width: 100%;
        align-self: stretch;
    }

    body.live-dashboard-page .live-dash-chat-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    body.live-dashboard-page .live-dash-chat-toolbar-left,
    body.live-dashboard-page .live-dash-chat-toolbar-right {
        width: 100%;
        justify-content: stretch;
    }

    body.live-dashboard-page .live-dash-chat-toolbar-right .live-dash-btn--compact {
        flex: 1 1 0;
    }

    body.live-dashboard-page .live-dash-admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    body.live-dashboard-page .live-dash-field--stream-picker,
    body.live-dashboard-page .live-dash-stream-field {
        width: 100%;
    }

    body.live-dashboard-page .live-dash-restrictions-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    body.live-dashboard-page .live-dash-restrictions-toolbar .live-dash-btn--toolbar {
        width: 100%;
    }

    body.live-dashboard-page .live-dash-modal {
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    }

    body.live-dashboard-page .live-dash-modal-card,
    body.live-dashboard-page .live-dash-modal-card--wide {
        width: min(100%, 560px);
        max-height: min(88dvh, 640px);
    }

    body.live-dashboard-page .live-dash-modal-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    body.live-dashboard-page .live-dash-modal-actions .live-dash-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }
}


