        body {
            background-color: #f5f5f5;
            padding-top: 70px;
        }
        pre {
            background: #222;
            color: #0f0;
            padding: 10px;
            border-radius: .375rem;
            max-height: 300px;
            overflow: auto;
        }
        textarea {
            font-family: monospace;
        }
        .chip-container {
            display: flex;
            flex-wrap: wrap;
            gap: .25rem;
            padding: .375rem .75rem;
            border: 1px solid #ced4da;
            border-radius: .375rem;
            background-color: #fff;
            min-height: calc(2.25rem + 2px);
            cursor: text;
        }
        .chip {
            display: inline-flex;
            align-items: center;
            padding: .25rem .5rem;
            border-radius: 999px;
            background-color: #e9ecef;
            font-size: .875rem;
        }
        .chip input {
            border: none;
            background: transparent;
            width: 4rem;
            text-align: center;
            outline: none;
        }
        .chip-remove {
            border: none;
            background: transparent;
            font-size: .75rem;
            margin-left: .25rem;
            cursor: pointer;
        }
        .chip-new-input {
            border: none;
            outline: none;
            min-width: 3rem;
            flex: 0 0 auto;
        }
        /* Логи */
        #logs-box {
            background: #111;
            color: #0f0;
            font-family: monospace;
            font-size: 0.8rem;
            padding: 10px;
            border-radius: .375rem;
            max-height: 400px;
            overflow-y: auto;
            white-space: pre-wrap;
        }
        .log-line {
            display: block;
        }
        .log-warn {
            color: #ff0;
        }
        .log-error {
            color: #ff4d4d;
        }

        /* PnL table */
        #pnls-table-wrap {
            max-height: 420px;
            overflow: auto;
        }

        /* Компактные отступы для формы настроек */
        #settings-form .mb-3 {
            margin-bottom: 0.5rem !important;
        }
        #settings-form legend {
            font-size: 0.85rem;
        }
        #settings-form label.form-label {
            margin-bottom: 0.15rem;
            font-size: 0.85rem;
        }
        #settings-form input.form-control {
            padding-top: 0.15rem;
            padding-bottom: 0.15rem;
            height: 2rem;
            font-size: 0.85rem;
        }
        #apply-settings-btn {
            margin-top: 0.25rem;
        }
        /* Компактный блок Algo info */
        #algo-info { font-size: 0.85rem; }
        .algo-info-table.table { margin-bottom: .25rem; }
        .algo-info-table th,
        .algo-info-table td { padding: .15rem .35rem; }
        .algo-info-title { font-size: 0.9rem; margin-bottom: 0.25rem; }

        /* Подсветка несоответствия значений (input отличается от источника истины) */
        .input-dirty {
            background-color: #fff3cd !important; /* bootstrap warning bg */
            border-color: #987b00 !important;
        }
        /* Для уровней подсвечиваем именно контейнер (у него и есть рамка) */
        #levels-chips.input-dirty {
            background-color: #fff3cd !important;
            border-color: #987b00 !important;
        }