/* 📁НАЧАЛО ФАЙЛА editor_style.css v1.11 */
/* AI_ЗАМЕНИТЬ_ВЕСЬ_ФАЙЛ_CSS_НАЧАЛО */
html, body { height: 100%; margin: 0; padding: 0; overflow: hidden; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.3; background-color: #f0f2f5; color: #212529; font-size: 11.5px; }
.editor-container { width: 100%; height: 100%; max-width: 100%; margin: 0 auto; background: #ffffff; padding: 6px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.08); display: flex; flex-direction: row; gap: 6px; box-sizing: border-box; }
.pane { padding: 5px; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; background-color: #f8f9fa; border: 1px solid #ced4da; border-radius: 3px; }
#tree-pane { flex: 0 0 280px; display: flex; flex-direction: column; }
#tree-pane input[type="text"] { width: calc(100% - 10px); margin-bottom: 8px; padding: 5px; border: 1px solid #ced4da; border-radius: 3px; font-size: 0.9em; box-sizing: border-box; }
#center-content-pane { flex: 1.5; display: flex; flex-direction: column; gap: 6px; padding: 0; border: none; background-color: transparent; }
.sub-pane { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 5px; background-color: #f8f9fa; border: 1px solid #ced4da; border-radius: 3px; box-sizing: border-box; }
.sub-pane-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.sub-pane-header h3 { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
#clear-localstorage-btn { background-color: #6c757d; color: white; border-color: #5a6268; padding: 3px 8px; font-size: 0.8em; margin-top: 0; margin-left: 10px; flex-shrink: 0; border-radius: 3px; cursor: pointer; transition: background-color 0.2s, border-color 0.2s; box-sizing: border-box;}
#clear-localstorage-btn:hover { background-color: #5a6268; border-color: #545b62; }
.pane h3 { margin-top: 0; margin-bottom: 5px; color: #0056b3; font-size: 0.9em; text-align: left; border-bottom: 1px solid #e0e0e0; padding-bottom: 3px; flex-shrink: 0; }
.pane textarea, .sub-pane textarea { width: 100%; flex-grow: 1; font-family: 'Courier New', Courier, monospace; font-size: 11px; line-height: 1.3; border: 1px solid #adb5bd; border-radius: 3px; padding: 5px; resize: none; background-color: #ffffff; box-sizing: border-box; }
.marker-section textarea { resize: vertical; min-height: 60px; }
.pane button:not(#clear-localstorage-btn):not(#help-btn), .sub-pane .result-buttons-container button { padding: 4px 10px; margin-top: 8px; font-size: 0.85em; background-color: #cfe2ff; color: #052c65; border: 1px solid #9ec5fe; border-radius: 3px; cursor: pointer; transition: background-color 0.2s, border-color 0.2s; flex-shrink: 0; }
.pane button:not(#clear-localstorage-btn):not(#help-btn):hover, .sub-pane .result-buttons-container button:hover:not(#finalize-code-btn) { background-color: #b9d7fe; border-color: #86b7fe; }
.pane button:disabled:not(#clear-localstorage-btn):not(#help-btn), .sub-pane .result-buttons-container button:disabled { background-color: #e9ecef; border-color: #ced4da; color: #6c757d; cursor: not-allowed; }
#right-ai-pane { flex: 1; }
#marker-inputs { display: flex; flex-direction: column; gap: 6px; flex-grow: 1; overflow-y: auto; padding-right: 5px; }
.marker-section { border: 1px dashed #007bff; padding: 6px; background-color: #f0f2f5; border-radius: 3px; transition: background-color 0.3s, border-color 0.3s; display: flex; flex-direction: column; gap: 4px; }
.marker-section label { display: block; font-weight: 600; margin-bottom: 0; color: #0056b3; font-size: 0.85em; }
.marker-section .assigned-ctatub4uk-id { font-size: 0.8em; color: #555; background-color: #e0e0e0; padding: 3px 5px; border-radius: 3px; margin: 0 0 4px 0; font-style: normal; font-weight: bold; }
.marker-section .assigned-ctatub4uk-id:empty::before { content: "CTATuB4uK ID: не присвоен"; color: #777; font-weight: normal; }
.marker-section .problem-details { background-color: #fffacd; border: 1px solid #f0e68c; border-radius: 3px; padding: 5px; margin: 2px 0 4px 0; }
.marker-section .problem-details h4 { margin: 0 0 3px 0; font-size: 0.75em; color: #8B4513; font-weight: bold; }
.marker-section .problem-description { font-size: 0.78em; color: #333; line-height: 1.4; margin: 0; white-space: pre-wrap; max-height: 80px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #ccc #f0f0f0; }
.marker-section .problem-description:empty::before { content: "(Описание проблемы/задачи от ИИ появится здесь)"; color: #888; font-style: italic; }
.marker-section pre { background-color: #e9ecef; border: 1px solid #dee2e6; padding: 4px; border-radius: 2px; max-height: 100px; overflow: auto; font-family: 'Courier New', Courier, monospace; font-size: 0.8em; margin-top: 0; color: #495057; white-space: pre-wrap; word-break: break-all; box-sizing: border-box; width: 100%; }
#code-tree { flex-grow: 1; overflow-y: auto; font-size: 0.85em; padding-right: 5px; margin-bottom: 5px; }
#code-tree ul { list-style-type: none; padding-left: 15px; margin: 3px 0; }
#code-tree li { padding: 2px 0; position: relative; }
#code-tree .tree-node > span { cursor: pointer; padding: 1px 3px; border-radius: 2px; display: inline-block; color: #495057; transition: background-color 0.2s, color 0.2s; }
#code-tree .tree-node > span:hover { background-color: #e2e3e5; color: #052c65; }
#code-tree .tree-node.collapsed > ul { display: none; }
#code-tree .tree-node .marker-number { font-weight: normal; color: #007bff; margin-right: 3px; }
#code-tree .tree-node .ctatub4uk-id-display { font-weight: normal; color: #28a745; margin-left: 3px; margin-right: 3px; font-size: 0.9em; background-color: #e6ffed; padding: 0 2px; border-radius: 2px; }
#code-tree .tree-node .marker-toggler { display: inline-block; width: 1em; color: #0056b3; margin-right: 2px; }
#code-tree .tree-node .marker-icon-insert { color: #28a745; margin-right: 2px; }
#code-tree .tree-node .marker-name { font-weight: 600; }
#code-tree .tree-node .marker-type { font-size: 0.9em; color: #6c757d; margin-left: 4px; }
#code-tree .tree-node > span.active-tree-item { background-color: #ffeeba !important; border: 1px solid #ffdf7e; color: #856404 !important; }
#code-tree .tree-node .marker-name.search-highlight { background-color: #fff3cd; padding: 0 2px; border-radius: 2px; }
.marker-section.active-marker-section { background-color: #e6f7ff; border-color: #91d5ff; border-style: solid; }
.result-buttons-container { display: flex; gap: 10px; margin-top: 8px; }
.result-buttons-container button { flex-grow: 1; margin-top: 0; }
#finalize-code-btn { background-color: #28a745; color: white; border-color: #1e7e34; }
#finalize-code-btn:hover { background-color: #218838; border-color: #19692c; }
#help-btn { background-color: #cfe2ff; color: #052c65; border: 1px solid #9ec5fe; width: calc(100% - 0px); margin-top: 0; margin-bottom: 8px; padding: 4px 10px; font-size: 0.85em; font-weight: normal; border-radius: 3px; cursor: pointer; transition: background-color 0.2s, border-color 0.2s; box-sizing: border-box; flex-shrink: 0; }
#help-btn:hover { background-color: #b9d7fe; border-color: #86b7fe; }
.modal-hidden { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
.modal-content { background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888; width: 80%; max-width: 700px; border-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); position: relative; max-height: 80vh; display: flex; flex-direction: column; }
.modal-content h2 { margin-top: 0; color: #0056b3; border-bottom: 1px solid #eee; padding-bottom: 10px; }
#help-content { flex-grow: 1; overflow-y: auto; line-height: 1.5; font-size: 0.9em; }
#help-content p, #help-content ul, #help-content h3, #help-content h4 { margin-bottom: 10px; }
#help-content h3 { font-size: 1.1em; color: #004c99; margin-top: 15px; }
#help-content h4 { font-size: 1em; color: #004c99; margin-top: 10px; }
#help-content ul { padding-left: 20px; }
#help-content code { background-color: #e9ecef; padding: 2px 4px; border-radius: 3px; font-family: 'Courier New', Courier, monospace; }
.modal-close-btn { color: #aaa; float: right; font-size: 28px; font-weight: bold; position: absolute; top: 5px; right: 15px; }
.modal-close-btn:hover, .modal-close-btn:focus { color: black; text-decoration: none; cursor: pointer; }
#ctatub4uk-log-container { margin-top: 10px; border-top: 1px solid #ced4da; padding-top: 5px; display: flex; flex-direction: column; min-height: 100px; max-height: 200px; overflow: hidden; flex-shrink: 0; }
#ctatub4uk-log-container h3 { font-size: 0.85em; color: #0056b3; margin-top: 0; margin-bottom: 5px; padding-bottom: 3px; border-bottom: 1px solid #e0e0e0; }
#ctatub4uk-log-list { flex-grow: 1; overflow-y: auto; font-size: 0.8em; padding-right: 5px; }
#ctatub4uk-log-list p { color: #6c757d; font-style: italic; text-align: center; margin-top: 10px; }
.ctatub4uk-log-item { padding: 4px; border-bottom: 1px solid #e9ecef; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 5px; }
.ctatub4uk-log-item:hover { background-color: #e9ecef; }
.ctatub4uk-log-item.active-log-item { background-color: #d1ecf1; border-left: 3px solid #007bff; padding-left: 2px; }
.log-item-id { font-weight: bold; color: #007bff; white-space: nowrap; }
.log-item-problem { flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #495057; }
.log-item-marker-ref { font-size: 0.9em; color: #6c757d; white-space: nowrap; }
.log-item-status { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; border: 1px solid #ccc; margin-left: 5px; }
.status-актуально { background-color: #adb5bd; } .status-исправлено { background-color: #28a745; } .status-требует_доработки { background-color: #ffc107; } .status-отклонено, .status-ошибка_выполнения { background-color: #dc3545; } .status-ошибка_css { background-color: #17a2b8; }

/* AI_ДОБАВИТЬ_АДАПТИВНЫЕ_СТИЛИ_ДЛЯ_МОБИЛЬНЫХ_НАЧАЛО */
@media (max-width: 800px) {
    html, body {
        overflow: auto; /* Разрешить прокрутку на мобильных */
        height: auto;
        font-size: 13px; /* Немного увеличить базовый шрифт для читаемости */
    }
    .editor-container {
        flex-direction: column; /* Панели друг под другом */
        height: auto;
        overflow-y: auto;
        padding: 4px;
        gap: 8px;
    }
    .pane {
        flex: 1 1 auto; /* Убрать фиксированную ширину, разрешить расти и сжиматься */
        min-height: 250px; /* Минимальная высота, чтобы панели не схлопывались */
        overflow: visible;
    }
    #tree-pane, #right-ai-pane, #center-content-pane {
        flex-basis: auto;
    }
    .sub-pane {
        min-height: 200px;
    }
    .pane textarea, .sub-pane textarea {
        min-height: 150px; /* Увеличить минимальную высоту полей ввода */
        font-size: 12px;
    }
    .modal-content {
        width: 95%; /* Модальное окно почти на всю ширину */
        max-height: 90vh;
    }
    #ctatub4uk-log-container {
        max-height: 150px; /* Ограничить высоту лога на мобильных */
    }
}
/* AI_ДОБАВИТЬ_АДАПТИВНЫЕ_СТИЛИ_ДЛЯ_МОБИЛЬНЫХ_КОНЕЦ */
/* 📁КОНЕЦ ФАЙЛА editor_style.css v1.11 */