.char-insert-wrap {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Строки конфигуратора (здание / коннект): не растягивать wrap на 100% —
   иначе «Здание / Координаты / …» уезжают каждое на свою строку. */
.input-row > .char-insert-wrap {
    width: auto;
    flex: 1 1 120px;
    min-width: 100px;
    max-width: 260px;
}

.char-insert-wrap > input[type="text"],
.char-insert-wrap > input:not([type]),
.char-insert-wrap > input[type="search"],
.char-insert-wrap > textarea,
.char-insert-wrap > .input-field,
.char-insert-wrap > .table-input,
.char-insert-wrap > .tx-value-input,
.char-insert-wrap > .tx-name-input,
.char-insert-wrap > .prop-input,
.char-insert-wrap > .diagram-name-input {
    flex: 1 1 auto;
    width: 0; /* иначе width:100% из таблиц выталкивает кнопку ° */
    min-width: 0;
}

.char-insert-btn {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #c5ccd3;
    border-radius: 4px;
    background: #f4f6f8;
    color: #2c3e50;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}

.char-insert-btn:hover {
    background: #e8f4fc;
    border-color: #3498db;
}

.char-insert-palette {
    position: fixed;
    z-index: 12000;
    display: grid;
    grid-template-columns: repeat(8, 30px);
    gap: 3px;
    padding: 8px;
    background: #fff;
    border: 1px solid #b0b8c0;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.char-insert-char {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #e1e5eb;
    border-radius: 4px;
    background: #fafbfc;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    color: #2c3e50;
}

.char-insert-char:hover {
    background: #eaf4fc;
    border-color: #3498db;
}

/* SVG-редактор: поле + кнопка в сетке свойств */
.prop-grid .char-insert-wrap {
    grid-column: 2;
}

/* Модалки аккаунта: не ломать ширину form-group */
.form-group .char-insert-wrap {
    width: 100%;
}

.form-group .char-insert-wrap > input {
    width: 0;
}

/* Конфигуратор модели: Name / ShortName / Info в таблицах каналов */
.panel-group td .char-insert-wrap,
.Panel_Group td .char-insert-wrap,
table td .char-insert-wrap {
    display: inline-flex;
    width: 100%;
    min-width: 80px;
    vertical-align: middle;
}

.panel-group td .char-insert-wrap > input[type="text"],
.Panel_Group td .char-insert-wrap > input[type="text"],
table td .char-insert-wrap > input[type="text"] {
    width: 0;
    min-width: 0;
}
