:root {
    --bg-app: #000000;
    --bg-panel: #0a0a0a;
    --bg-active: #1a1a1a;
    --border: #333333;
    --text-main: #ffffff;
    --text-dim: #888888;
    --sidebar-width: 300px;
    --right-panel-width: 380px;
    --bottom-panel-height: 200px;
    --chat-input-height: 96px;
    --order-safe-bottom: 28px;
    --titlebar-height: 36px;
    --statusbar-height: 24px;
    --activity-width: 48px;
    --font-ui: "Segoe UI", "IBM Plex Sans", sans-serif;
    --font-code: "Cascadia Code", "Consolas", "Courier New", monospace;
    /* Cursor-like soft corners */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
html, body { height: 100%; }
body {
    background: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font-ui);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    user-select: text;
}

/* Контекстное Copy/Paste-меню: едино для HTML, Monaco и терминала. */
.cluster-clipboard-menu {
    position: fixed;
    z-index: 10000;
    display: flex;
    min-width: 128px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #555;
    border-radius: var(--radius-sm);
    background: #171717;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .55);
}
.cluster-clipboard-menu[hidden] { display: none; }
.cluster-clipboard-menu button {
    border: 0;
    padding: 8px 12px;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    font: 12px var(--font-ui);
    text-align: left;
}
.cluster-clipboard-menu button:hover:not(:disabled) { background: #303030; }
.cluster-clipboard-menu button:disabled { color: #666; cursor: default; }

.titlebar-time-tools { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 0 10px; -webkit-app-region: no-drag; font: 600 10px var(--font-code); }
.time-tool { border: 1px solid #303030; border-radius: 4px; background: #121212; color: #ddd; padding: 3px 6px; cursor: pointer; white-space: nowrap; }
.time-tool:hover { border-color: #777; background: #202020; }
.time-tool.is-alert { color: #fff; background: #be2525; border-color: #ff6a6a; animation: timer-alert .8s infinite alternate; }
.date-time-preview { padding: 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: 600 14px var(--font-code); color: #e8a838; }
.date-time-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; padding: 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.date-time-tool-value { min-width: 96px; padding: 6px 0; color: #e8a838; font: 700 13px var(--font-code); }
@keyframes timer-alert { to { filter: brightness(1.5); } }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

.dim { color: var(--text-dim); }
.tiny { font-size: 10px; margin-top: 4px; }

/* Базовые элементы форм и нижняя строка IDE. */
.status-bar {
    height: var(--statusbar-height);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    background: var(--text-main);
    color: var(--bg-app);
    font-size: 11px;
    font-weight: 700;
}
.status-left, .status-right { display: flex; gap: 14px; }
.status-foma-model { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-account { border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; padding: 0; }
.status-account:hover { text-decoration: underline; }
.status-components { border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; padding: 0; }
.status-components:hover { text-decoration: underline; }
.status-components.warn { color: #a30d0d; }
.status-components-progress { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #174a9c; }
.status-components-progress.is-error { color: #a30d0d; }
.status-date-time { font-family: var(--font-code); font-size: 13px; font-weight: 800; }

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--text-main);
    color: var(--bg-app);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.btn:hover { opacity: .9; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { border: 1px solid var(--border); background: transparent; color: var(--text-main); }
.btn.ghost:hover { border-color: var(--text-main); }
.btn.compact { padding: 4px 10px; font-size: 11px; }
.btn.primary { background: #1a4a3a; border-color: #2d7a5c; color: #c8f5e0; }
.btn.ghost.danger { color: #f88; border-color: #844; }

button, .icon-btn, .activity-bar, .sidebar, .titlebar { user-select: none; }
.icon-btn img { width: 22px; height: 22px; display: block; pointer-events: none; }
.icon-btn-exit { color: #ef4444; }
.icon-btn-exit:hover, .icon-btn-exit:focus-visible { color: #fecaca; }
.activity-exit-menu {
    position: fixed;
    left: 45px;
    bottom: 36px;
    z-index: 50;
    width: 116px;
    padding: 5px;
    border: 1px solid #713030;
    border-radius: var(--radius-md);
    background: #181114;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}
.activity-exit-menu button { display: flex; width: 100%; justify-content: space-between; gap: 10px; padding: 8px 9px; border: 0; border-radius: 4px; background: transparent; color: #fecaca; cursor: pointer; text-align: left; font: 600 12px var(--font-code); }
.activity-exit-menu button:hover, .activity-exit-menu button:focus-visible { background: #4a1d25; outline: none; }
.activity-exit-menu span { color: #fca5a5; font-size: 10px; font-weight: 400; }

/* Устаревшие вкладки настроек сохранены для совместимости обработчиков. */
.ide-settings-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
}
.ide-settings-tab {
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #121212;
    color: var(--text-dim);
    cursor: pointer;
    font: 700 12px var(--font-ui);
}
.ide-settings-tab:hover { border-color: #777; color: var(--text-main); }
.ide-settings-tab.active { background: var(--text-main); border-color: var(--text-main); color: var(--bg-app); }
.ide-tab-panel[hidden] { display: none !important; }
.legal-templates-warning { border-left: 3px solid #f59e0b; padding-left: 8px; }
.legal-templates-toolbar { display: flex; gap: 8px; margin: 10px 0; }
.legal-templates-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px; }
.legal-template-card { position: relative; isolation: isolate; display: grid; grid-template-rows: minmax(58px, auto) minmax(42px, auto) 38px; align-content: stretch; gap: 10px; min-height: 190px; height: 190px; padding: 14px; overflow: hidden; color: #fafafa; border: 1px solid #393b40; border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(255, 255, 255, .13), transparent 30%), linear-gradient(160deg, #202126 0%, #09090b 45%, #020203 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), inset 0 -1px 0 rgba(0, 0, 0, .75), 0 8px 18px rgba(0, 0, 0, .32); }
.legal-template-card::before { content: ''; position: absolute; z-index: -1; inset: -30% 28% auto -25%; height: 100%; pointer-events: none; opacity: .55; background: radial-gradient(ellipse, rgba(154, 198, 255, .2), transparent 68%); }
.legal-template-approval-status { position: absolute; top: 10px; right: 12px; z-index: 1; padding: 3px 7px; border: 1px solid currentColor; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.legal-template-approval-status.is-unapproved { color: #ff6b75; background: rgba(180, 35, 48, .16); }
.legal-template-approval-status.is-approved { color: #53e08c; background: rgba(35, 160, 83, .16); }
.legal-template-main, .legal-template-options, .legal-template-actions { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.legal-template-main { display: grid; align-content: start; gap: 7px; }
.legal-template-main strong { color: #fafafa; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.legal-template-status { color: #a7a9b0; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.legal-template-options { align-items: center; justify-content: space-between; flex-wrap: wrap; }
.legal-template-actions { align-items: center; border-top: 1px solid rgba(148, 163, 184, .16); padding-top: 8px; }
.legal-template-actions .btn { min-height: 30px; }
.legal-template-agent, .legal-template-approve { display: inline-flex; align-items: center; justify-content: center; width: 30px; min-width: 30px; padding: 5px; }
.legal-template-agent img { width: 16px; height: 16px; filter: grayscale(1) brightness(0) invert(1); }
.legal-template-approve { width: 42px; min-width: 42px; height: 42px; padding: 4px; color: #39e27d; border-color: #39e27d; background: #050505; box-shadow: inset 0 0 0 1px rgba(57, 226, 125, .22); }
.legal-template-approve:hover, .legal-template-approve:focus-visible { color: #62f39a; border-color: #62f39a; background: #050505; box-shadow: 0 0 0 2px rgba(57, 226, 125, .18), inset 0 0 0 1px rgba(98, 243, 154, .35); }
.legal-template-approve:disabled { opacity: 1; color: #39e27d; border-color: #39e27d; background: #050505; cursor: default; }
.legal-template-approve svg { width: 30px; height: 30px; }
#gitStatus { min-height: 72px; white-space: pre-wrap; }
.git-history { display: flex; min-height: 0; flex: 1; flex-direction: column; }
/* История, файлы и diff — рабочие данные: их можно выделять и копировать мышью. */
#gitPanel, #gitPanel button, #gitPanel code, #gitPanel pre { user-select: text; -webkit-user-select: text; }
.git-history__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.git-history__head strong { display: block; font-size: 12px; }
.git-history__head .tiny { display: block; margin-top: 2px; }
.git-history__list { flex: 1 1 auto; min-height: 160px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-app); }
.git-history-row { display: flex; width: 100%; min-height: 48px; padding: 5px 8px; gap: 6px; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); background: transparent; color: var(--text-main); cursor: pointer; text-align: left; }
.git-history-row:hover, .git-history-row.active { background: var(--bg-active); }
.git-graph { display: block; width: 32px; flex: 0 0 32px; overflow: visible; }
.git-graph__line, .git-graph__edge { fill: none; stroke: #5e82bc; stroke-width: 2; opacity: .82; }
.git-graph__edge { stroke: #9cc3ff; }
.git-graph__node { fill: #9cc3ff; stroke: var(--bg-app); stroke-width: 2; }
.git-history-row__body { display: grid; flex: 1 1 auto; min-width: 0; gap: 2px; }
.git-history-row__body > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.git-history-row code, .git-detail__title code { color: #9cc3ff; font: 11px var(--font-mono); }
.git-history-row small, .git-detail__meta { color: var(--text-dim); font-size: 10px; }
.git-history-row mark { width: fit-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 3px; padding: 1px 4px; background: #263b2f; color: #a7efbf; font: 9px var(--font-mono); }
.git-history__detail { max-height: 420px; margin: 0 0 10px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px; background: var(--bg-app); }
.git-detail__title { display: flex; align-items: baseline; gap: 7px; }
.git-detail__title strong { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.git-detail__meta { margin: 4px 0 8px; }
.git-detail__message { margin: 5px 0; white-space: pre-wrap; color: var(--text-dim); font: 11px var(--font-ui); }
.git-detail__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 8px 0; }
.git-file-list { max-height: 160px; margin: 7px 0; padding: 0; overflow: auto; list-style: none; font: 11px var(--font-mono); }
.git-file-list li { display: flex; gap: 6px; padding: 3px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.git-file-row { display: flex; align-items: center; width: 100%; gap: 6px; border: 0; padding: 2px 3px; background: transparent; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.git-file-row:hover, .git-file-row.active { background: var(--bg-active); border-radius: 3px; }
.git-file-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.git-file-list em { margin-left: auto; color: var(--text-dim); font-style: normal; white-space: nowrap; }
.git-file-status { min-width: 18px; color: #9cc3ff; }
.git-commit-diff { max-height: 310px; margin: 8px 0 0; overflow: auto; font-size: 10px; }

.field {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-app);
    color: var(--text-main);
    font: 12px var(--font-ui);
}
.field.compact { width: auto; min-width: 100px; padding: 4px 8px; }
.foma-approval-controls { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; }
.foma-approval-btn, .foma-auto-btn { border: 1px solid var(--border); background: transparent; color: var(--text-dim); border-radius: var(--radius-sm); cursor: pointer; font-weight: 800; line-height: 1; }
.foma-approval-btn { width: 25px; height: 25px; font-size: 19px; }
.foma-approval-btn--reject:hover, .foma-approval-btn--reject.is-active { color: #ff5c67; border-color: #a93440; background: rgba(180, 35, 48, .18); }
.foma-approval-btn--approve:hover, .foma-approval-btn--approve.is-active { color: #53e08c; border-color: #2c9a5d; background: rgba(35, 160, 83, .18); }
.foma-auto-btn { padding: 6px 8px; font-size: 10px; letter-spacing: .04em; }
.foma-auto-btn:hover, .foma-auto-btn.is-active { color: var(--text-main); border-color: var(--text-main); background: var(--bg-active); }
.foma-clear-btn {
    width: 25px;
    height: 25px;
    margin-left: 2px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #8a6b22;
    border-radius: var(--radius-sm);
    background: rgba(178, 128, 20, .15);
    color: #f6c453;
    cursor: pointer;
}
.foma-clear-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.foma-clear-btn:hover { border-color: #f6c453; background: rgba(246, 196, 83, .24); color: #ffe29a; }
.foma-clear-btn:focus-visible { outline: 1px solid #f6c453; outline-offset: 2px; }
.field:focus { border-color: var(--text-main); }
.field-label {
    display: block;
    margin: 12px 0 4px;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.titlebar {
    height: var(--titlebar-height);
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 50;
}
.titlebar-drag {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 10px;
    height: 100%;
    -webkit-app-region: drag;
    min-width: 0;
}
.titlebar-icon {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    -webkit-app-region: no-drag;
}
.titlebar-brand {
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 13px;
    white-space: nowrap;
}
.titlebar-status {
    display: flex;
    gap: 8px;
    padding: 0 8px;
    -webkit-app-region: no-drag;
}
.pill {
    background: var(--bg-active);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 3px 10px;
    font-size: 11px;
    font-family: var(--font-code);
    cursor: pointer;
    border-radius: var(--radius-md);
}
.pill:hover { border-color: var(--text-main); color: var(--text-main); }
.power-rail {
    display: block;
    height: 4px;
    background: #1a2030;
    border: 1px solid var(--border);
    overflow: hidden;
    border-radius: var(--radius-pill);
    position: relative;
}
.power-rail > i {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ef4444, #f59e0b 40%, #22c55e);
    transition: width 0.35s ease, height 0.35s ease;
}
.power-rail.is-vertical {
    width: 100%;
    height: 52px;
    border-radius: 3px;
}
.act-meter-api .power-rail.is-vertical {
    height: 104px;
}
.power-rail.is-vertical > i {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 0%;
    background: linear-gradient(180deg, #22c55e 0%, #f59e0b 55%, #ef4444 100%);
}
.power-rail.low > i { background: linear-gradient(90deg, #7f1d1d, #ef4444); }
.power-rail.is-vertical.low > i {
    background: linear-gradient(180deg, #ef4444 0%, #7f1d1d 100%);
}
.power-pool {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    max-height: 180px;
    overflow: auto;
}
.power-row {
    display: grid;
    grid-template-columns: 1fr 44px;
    gap: 6px 8px;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid var(--border);
    background: #141820;
    font-size: 11px;
}
.power-row .pr-name { color: var(--text-main); font-weight: 600; }
.power-row .pr-detail { grid-column: 1 / -1; font-size: 10px; color: var(--text-dim); }
.power-row .pr-pct { text-align: right; font-family: var(--font-code); font-weight: 700; }
.power-row .pr-bar {
    grid-column: 1 / -1;
    height: 6px;
    background: #1a2030;
    border: 1px solid var(--border);
    overflow: hidden;
}
.power-row .pr-bar > i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #e8a838 45%, #2ec4b6);
}
.power-row.mode-cooldown .pr-bar > i { background: linear-gradient(90deg, #64748b, #94a3b8); }
.problems-foma-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(239,68,68,0.15), transparent);
    font-size: 11px;
    color: var(--text-main);
}
.problems-foma-banner[hidden] { display: none !important; }
.window-controls {
    display: flex;
    height: 100%;
    -webkit-app-region: no-drag;
}
.win-btn {
    width: 46px;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 14px;
    cursor: pointer;
}
.win-btn:hover { background: var(--bg-active); }
.win-close:hover { background: #c42b1c; }

.workspace {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.activity-bar {
    width: var(--activity-width);
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 6px;
    gap: 4px;
    flex-shrink: 0;
}
.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    opacity: 0.75;
}
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.activity-architecture-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.activity-devbook-icon {
    width: 20px;
    height: 20px;
    fill: none;
}
.activity-btn-label { display: none; }
.logcat-activity-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.logcat-activity-btn svg path { fill: none; }
.icon-btn:hover { opacity: 1; background: var(--bg-active); }
.icon-btn.active {
    opacity: 1;
    color: var(--text-main);
    box-shadow: inset 2px 0 0 var(--text-main);
}

/* Нижний блок activity: API / err / Foma */
.activity-meters {
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 6px 5px 2px;
    border-top: 1px solid var(--border);
}
.act-meter {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 0;
    border: none;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-family: var(--font-code);
    line-height: 1.15;
    border-radius: var(--radius-md);
}
.act-meter:hover {
    background: var(--bg-active);
    color: var(--text-main);
}
.act-meter-rail {
    width: 100%;
    box-sizing: border-box;
}
.act-meter-pct {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}
.act-meter-count {
    font-size: 9px;
    opacity: 0.85;
}
.act-meter-tag {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.7;
}
.problems-rail {
    display: block;
    height: 36px;
    background: #1a2030;
    border: 1px solid var(--border);
    overflow: hidden;
    border-radius: 3px;
    position: relative;
}
.problems-rail > i {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, #f87171, #b91c1c);
    transition: height 0.3s ease;
}
.act-meter-problems.is-warn .problems-rail > i {
    background: linear-gradient(180deg, #fbbf24, #b45309);
}
.act-meter-problems.has-errors .act-meter-pct { color: #f87171; }
.act-meter-problems.is-warn .act-meter-pct { color: #fbbf24; }
.act-meter-foma-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
    margin: 4px 0 2px;
}
.act-meter-foma.is-busy .act-meter-foma-dot {
    background: #ef4444; /* занят = красный (как в Студии) */
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.45);
    animation: actMaestroPulse 1.1s ease-in-out infinite;
}
.act-meter-foma.is-error .act-meter-foma-dot {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.35);
    animation: none;
}
.act-meter-foma.is-checking .act-meter-foma-dot {
    background: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.35);
    animation: actMaestroPulse 1.1s ease-in-out infinite;
}
/* иконка Студии: красная точка, пока кто-то в цехе занят */
.icon-btn[data-view="workspace"].has-live-work {
    position: relative;
    color: #fca5a5;
    opacity: 1;
}
.icon-btn[data-view="workspace"].has-live-work::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.35);
    animation: actMaestroPulse 1.1s ease-in-out infinite;
}
@keyframes actMaestroPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.85); }
}

.sidebar {
    width: var(--sidebar-width);
    min-width: 160px;
    max-width: 480px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
    flex-shrink: 0;
}
.sidebar.collapsed { display: none; }
.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}
.sidebar-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
}
.sidebar-body {
    flex: 1;
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.sidebar-body > .side-panel:not([hidden]) {
    flex: 1;
    min-height: 0;
}
.help-side-panel { align-items: center; justify-content: center; gap: 10px; padding: 28px 20px; text-align: center; color: var(--text-dim); }
.help-side-panel h2 { margin: 0; color: var(--text-main); font-size: 16px; }
.help-side-panel p { max-width: 250px; margin: 0; line-height: 1.5; }
.help-side-icon { display: grid; width: 48px; height: 48px; place-items: center; border: 2px solid #67e8f9; border-radius: 50%; color: #67e8f9; font: 700 28px/1 var(--font-code); }

