/**
 * ═══════════════════════════════════════════════════════════════════════════
 *  МОДАЛЬНОЕ ОКНО ПОСТРОЕНИЯ МАРШРУТОВ — ПОЛНЫЙ РЕДИЗАЙН v2.0
 *  ═══════════════════════════════════════════════════════════════════════════
 */

/* ── Основная модалка ── */
.build-modal {
    max-width: 760px !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* ── Заголовок ── */
.bm-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.bm-header-text { flex: 1; min-width: 0; }

.bm-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #3a6fd6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb, 79, 140, 247), 0.3);
}
.bm-icon.spinning i { animation: spin 1.2s linear infinite; }
.bm-icon.success {
    background: linear-gradient(135deg, var(--success), #34d399);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.bm-icon.danger {
    background: linear-gradient(135deg, var(--danger), #f87171);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.bm-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
    line-height: 1.2;
}
.bm-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    min-height: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Сводная строка (ETP · TT · Method · Cache) ── */
.bm-summary-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.bm-summary-row i { font-size: 11px; margin-right: 4px; opacity: 0.7; }
.bm-summary-row b { color: var(--text-primary); font-weight: 600; }
.bm-summary-divider {
    width: 1px;
    height: 16px;
    background: var(--border-light);
}

/* ── Прогресс-бар ── */
.bm-progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.bm-bar {
    flex: 1;
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.bm-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #7eb3ff);
    border-radius: 5px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
}
.bm-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}
.bm-bar-fill.success {
    background: linear-gradient(90deg, var(--success), #34d399);
}
.bm-bar-fill.danger {
    background: linear-gradient(90deg, var(--danger), #f87171);
}
.bm-pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    min-width: 40px;
    text-align: right;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ── Этапы (горизонтальная полоска) ── */
.bm-stages-bar {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 12px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}
.bm-stage-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}
.bm-stage-item.active {
    background: var(--bg-primary);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}
.bm-stage-item.done {
    color: var(--success);
}
.bm-stage-ico {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    background: var(--bg-tertiary);
    transition: all 0.3s;
}
.bm-stage-item.active .bm-stage-ico {
    background: var(--accent);
    color: white;
    animation: pulse 1.5s ease-in-out infinite;
}
.bm-stage-item.done .bm-stage-ico {
    background: var(--success);
    color: white;
}
.bm-stage-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}
.bm-stage-item.active .bm-stage-badge {
    background: var(--accent-light);
    color: var(--accent);
}

/* Коннектор между этапами */
.bm-stage-connector {
    width: 24px;
    height: 2px;
    background: var(--border-light);
    flex-shrink: 0;
}
.bm-stage-connector.done {
    background: var(--success);
}

/* ── Карточка текущего ЭТП ── */
.bm-current-etp {
    display: none;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    animation: fadeIn 0.3s ease-out;
}
.bm-current-etp.visible { display: block; }
.bm-current-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.bm-current-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 1s ease-in-out infinite;
}
.bm-current-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}
.bm-current-progress {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
}
.bm-current-status {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 4px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-left: auto;
}
.bm-current-status i { margin-right: 4px; }
.bm-current-stats {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--text-muted);
}
.bm-current-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}
.bm-current-stat b { color: var(--text-secondary); }

/* ── Geo-статистика (компактная) ── */
.bm-geo-stats {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    margin-bottom: 8px;
    background: rgba(var(--accent-rgb, 79, 140, 247), 0.05);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.bm-geo-stats.visible { display: flex; }
.bm-geo-stats i { font-size: 10px; margin-right: 3px; opacity: 0.7; }
.bm-geo-stats b { color: var(--accent); font-weight: 600; }
.bm-geo-divider {
    width: 1px;
    height: 12px;
    background: var(--border-light);
}

/* ── Кнопка свернуть ── */
.bm-minimize-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    flex-shrink: 0;
}
.bm-minimize-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ── Вкладки ── */
.bm-tabs {
    display: flex;
    gap: 2px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: 1px solid var(--border-light);
    border-bottom: none;
    flex-shrink: 0;
    margin-bottom: 0;
}
.bm-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.bm-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}
.bm-tab.active {
    background: var(--bg-primary);
    color: var(--accent);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.bm-tab-badge {
    background: var(--warning);
    color: white;
    border-radius: 10px;
    padding: 1px 5px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
}

/* ── Панели вкладок ── */
.bm-tab-panels {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.bm-tab-panel {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: var(--bg-card);
}
.bm-tab-panel.active {
    display: flex;
}

/* ── Лог (главный элемент) ── */
.bm-log {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    background: var(--bg-primary);
    font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.6;
    min-height: 200px;
    max-height: 300px;
}

/* ── Панель предупреждений ── */
.bm-warn-panel {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    background: var(--bg-primary);
    font-size: 12px;
    min-height: 200px;
    max-height: 300px;
}
.bm-empty-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
}
.bm-empty-hint i {
    color: var(--success);
    font-size: 18px;
}
.bm-warn-entry {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 5px 8px;
    margin-bottom: 4px;
    background: rgba(245, 158, 11, 0.06);
    border-left: 3px solid var(--warning);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 11px;
    animation: logFadeIn 0.2s ease-out;
}
.bm-warn-entry-etp {
    font-size: 10px;
    color: var(--text-muted);
    flex-shrink: 0;
    font-weight: 600;
    min-width: 60px;
}
.bm-warn-entry-msg {
    flex: 1;
    color: var(--text-secondary);
    word-break: break-word;
}

/* ── Разделитель ЭТП в логе ── */
.bm-log-etp-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    margin: 4px 0;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
}
.bm-log-etp-header:first-child { margin-top: 0; }
.bm-log-etp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.bm-log-etp-status {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}
.bm-log-etp-header.done .bm-log-etp-status {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.bm-log-etp-header.warn .bm-log-etp-status {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}
.bm-log-etp-header.error .bm-log-etp-status {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ── Строка лога ── */
.bm-log-entry {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 2px 0;
    animation: logFadeIn 0.2s ease-out;
}
@keyframes logFadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}
.bm-log-time {
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 38px;
    font-size: 11px;
    opacity: 0.7;
}
.bm-log-ico {
    flex-shrink: 0;
    font-size: 10px;
    width: 14px;
    text-align: center;
}
.bm-log-msg {
    color: var(--text-secondary);
    word-break: break-word;
    flex: 1;
}
.bm-log-ok    .bm-log-ico { color: var(--success); }
.bm-log-ok    .bm-log-msg { color: var(--success); }
.bm-log-warn  .bm-log-ico { color: var(--warning); }
.bm-log-warn  .bm-log-msg { color: var(--warning); }
.bm-log-error .bm-log-ico { color: var(--danger); }
.bm-log-error .bm-log-msg { color: var(--danger); font-weight: 600; }
.bm-log-api   .bm-log-ico { color: #38bdf8; }
.bm-log-api   .bm-log-msg { color: #38bdf8; }
.bm-log-algo  .bm-log-ico { color: var(--accent); }
.bm-log-algo  .bm-log-msg { color: var(--accent); }
.bm-log-geo   .bm-log-ico { color: #38bdf8; }
.bm-log-geo   .bm-log-msg { color: #38bdf8; }
.bm-log-limit .bm-log-ico { color: #f97316; }
.bm-log-limit .bm-log-msg { color: #f97316; }
.bm-log-info  .bm-log-ico { color: var(--text-muted); }

/* Отступ для под-сообщений */
.bm-log-indent {
    padding-left: 20px;
    border-left: 2px solid var(--border-light);
    margin-left: 4px;
}

/* ── Итоговый результат ── */
#bmPanelResult {
    overflow-y: auto;
}
.bm-result {
    padding: 16px;
    border-radius: 0;
    font-size: 12px;
    animation: fadeIn 0.4s ease-out;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.bm-result.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.bm-result.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}
.bm-result-stats {
    display: flex;
    margin-bottom: 16px;
    gap: 0;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.bm-result-stat {
    flex: 1;
    text-align: center;
    padding: 16px 12px;
    border-right: 1px solid var(--border-light);
}
.bm-result-stat:last-child { border-right: none; }
.bm-result-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--success);
    line-height: 1;
    margin-bottom: 4px;
}
.bm-result-num.warn { color: var(--warning); }
.bm-result-num.danger { color: var(--danger); }
.bm-result-lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.bm-warn-item {
    font-size: 11px;
    padding: 6px 10px;
    color: var(--warning);
    border-left: 3px solid var(--warning);
    margin-bottom: 4px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    animation: fadeIn 0.3s ease-out;
}
.bm-warn-item i { margin-right: 6px; }

/* ── Итоговая таблица по ЭТП ── */
.bm-summary-wrap {
    max-height: 250px;
    overflow-y: auto;
    margin-top: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}
.bm-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}
.bm-summary-table th {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    padding: 8px 8px;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.bm-summary-table th:first-child { text-align: left; }
.bm-summary-table td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}
.bm-summary-table td:first-child { text-align: left; }
.bm-summary-table td small {
    color: var(--text-muted);
    font-size: 9px;
    margin-left: 2px;
}
.bm-km-extended { color: var(--warning); font-weight: 600; }
.bm-km-over { color: var(--danger); font-weight: 700; }
.bm-summary-table tr:hover td {
    background: var(--bg-secondary);
}

/* ── Footer ── */
.bm-footer {
    margin-top: 12px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ── Экспорт лога ── */
.bm-export-btn {
    background: none;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 12px;
    font-size: 11px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.bm-export-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Мини-виджет прогресса ── */
.bm-mini-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    min-width: 240px;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.2s;
}
.bm-mini-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}
.bm-mini-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #7eb3ff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.bm-mini-icon i { animation: spin 1.2s linear infinite; }
.bm-mini-info { flex: 1; min-width: 0; }
.bm-mini-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}
.bm-mini-bar {
    height: 5px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}
.bm-mini-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #7eb3ff);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}
.bm-mini-pct {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    min-width: 40px;
    text-align: right;
}
.bm-mini-expand {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
}
.bm-mini-expand:hover { color: var(--accent); }
.bm-mini-widget.success .bm-mini-icon {
    background: linear-gradient(135deg, var(--success), #34d399);
}
.bm-mini-widget.success .bm-mini-icon i { animation: none; }
.bm-mini-widget.success .bm-mini-pct { color: var(--success); }
.bm-mini-widget.success .bm-mini-bar-fill {
    background: linear-gradient(90deg, var(--success), #34d399);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Адаптивность ── */
@media (max-width: 600px) {
    .build-modal {
        max-width: 100% !important;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    .bm-stages-bar {
        flex-wrap: wrap;
    }
    .bm-stage-item {
        flex: none;
        width: 50%;
    }
    .bm-result-stats {
        flex-direction: column;
    }
    .bm-result-stat {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    .bm-summary-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .bm-summary-divider {
        display: none;
    }
}

/* ── Анимация спиннера ── */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── Спойлеры для группировки предупреждений ── */
.bm-spoiler {
    margin: 4px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
}
.bm-spoiler-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
    user-select: none;
}
.bm-spoiler-header:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.bm-spoiler-header i {
    font-size: 10px;
    transition: transform 0.2s;
}
.bm-spoiler.open .bm-spoiler-header i {
    transform: rotate(90deg);
}
.bm-spoiler-ico {
    font-size: 12px;
}
.bm-spoiler-title {
    flex: 1;
}
.bm-spoiler-count {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-weight: 600;
}
.bm-spoiler.open .bm-spoiler-count {
    background: var(--accent-light);
    color: var(--accent);
}
.bm-spoiler-content {
    display: none;
    padding: 0 12px 8px 12px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-primary);
}
.bm-spoiler.open .bm-spoiler-content {
    display: block;
    animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}
.bm-spoiler-item {
    padding: 4px 0;
    font-size: 11px;
    color: var(--text-muted);
    border-bottom: 1px dashed var(--border-light);
}
.bm-spoiler-item:last-child {
    border-bottom: none;
}
.bm-spoiler-item b {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Цветовые варианты спойлеров */
.bm-spoiler.warn .bm-spoiler-header { color: var(--warning); }
.bm-spoiler.warn .bm-spoiler-ico { color: var(--warning); }
.bm-spoiler.warn .bm-spoiler-count { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.bm-spoiler.info .bm-spoiler-ico { color: #38bdf8; }
.bm-spoiler.info .bm-spoiler-count { background: rgba(56, 189, 248, 0.1); color: #38bdf8; }

/* ═══ ЭТП-спойлеры (details/summary) ═══ */
.bm-etp-spoiler {
    margin: 6px 0;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card, #fff);
}
.bm-etp-spoiler[open] {
    border-color: var(--accent, #4f8cf7);
}
.bm-etp-spoiler.done { border-left: 3px solid var(--success, #10b981); }
.bm-etp-spoiler.warn { border-left: 3px solid #f59e0b; }
.bm-etp-spoiler.error { border-left: 3px solid #ef4444; }

.bm-etp-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    font-weight: 500;
    list-style: none;
}
.bm-etp-summary::-webkit-details-marker { display: none; }
.bm-etp-summary::marker { display: none; content: ''; }

.bm-etp-summary:hover { background: var(--bg-hover, rgba(0,0,0,0.03)); }

.bm-etp-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.bm-etp-summary-name {
    font-weight: 600;
    white-space: nowrap;
}
.bm-etp-summary-stats {
    flex: 1;
    color: var(--text-secondary, #6b7280);
    font-size: 12px;
    font-weight: 400;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bm-etp-summary-status {
    flex-shrink: 0;
    font-size: 14px;
}
.bm-etp-detail {
    padding: 4px 12px 8px;
    border-top: 1px solid var(--border, #e5e7eb);
    max-height: 300px;
    overflow-y: auto;
}
.bm-etp-detail .bm-log-entry {
    font-size: 11px;
    padding: 1px 0;
}
